CHANGED event (OpenInsight Specific)
At 07 DEC 1998 06:13:46PM Paxton Scott wrote:
I've got a bunch of date fields - edit line controls.
Rather than use a default, I'd like the user to type something. Thought it would be nice to type T for today. Put the following on the CHANGED event:
declare function set_property
IF newdata=T' THEN
TODAY=set_property(CtrlEntid, "TEXT", OCONV(DATE(), 'D') )END
Worked great! So, did it to another edit control…no work???
in another form, put it on 3 controls, one worked???
CAn't see any difference. Tried to trap with a MSG, and it appears as if the event is not executing. Another symptom is a beep as each character is entered on the non working controls. can enter part of a date say 12/3 and tab or enter, and 3 DEC 1998 comes up just fine on all of the controls.
Any ideas??? Thanks! arcs@wws.net
Paxton,
If you look at the system monitor is it reporting any errors when you get the beep?
cpates@sprezzatura.com
World Leaders in all things RevSoft
=== At 08 DEC 1998 10:32AM Oystein Reigem wrote: ===
Paxton,
I've had cases where I needed to do stuff while the user typed, and sometimes I had problems with either CHANGED or CHAR. My memory fails me as to which of them. But perhaps you could try the CHAR event and see if you have more luck than with CHANGED?
- Oystein -
=== At 10 DEC 1998 12:56PM dsig@teleport.com wrote: ===
Scott,
Here is a bit of code that I use in date fields (this is the 'char' event.)
If the user enteres 'd' or 'D' it places the date .. if the user does '+' or '-' then the date increments/decrements.
Haven't had any problem with this in any field/screen i use.
dsig@teleport.com
David Tod Sigafoos ~ SigSolutions
dsig@teleport.com voice: 503-639-8080
ParentId=Get_Property(CtrlEntId,"PARENT")
Begin Case
Case BaseCtrl=ACT_DATE" OR BaseCtrl=FU_DATE"
VirtCode=Passedparam
If VirtCode=+" or VirtCode=-" Then
CurVal=Get_Property(CtrlEntId,"TEXT")Convert "+-" to "" in CurVal
CurDate=Iconv(CurVal,"D")If CurDate=" Then CurDate=Date() -1
Begin CaseCase VirtCode=+"NewDate=CurDate + 1Case VirtCode=-"NewDate=CurDate - 1End Case
NewVal=Oconv(NewDate,"D2/")x=Set_Property(CtrlEntId,"TEXT",NewVal)
End ElseIf VirtCode=D" or VirtCode=d" ThenSet_Property(CtrlEntId,DefProp$,Oconv(Date(),"D2-")EndEndEnd Case