[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== CHANGED event (OpenInsight Specific) ====
=== At 07 DEC 1998 06:13:46PM Paxton Scott wrote: ===
{{tag>"OpenInsight Specific"}}
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
[url=http://www.wws.net/arcs/]ARCS, Inc.
[img]http://www.wws.net/arcs/arcslogo.gif[/img]
----
=== At 08 DEC 1998 09:39AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Ltd[/url] wrote: ===
Paxton,
If you look at the system monitor is it reporting any errors when you get the beep?
cpates@sprezzatura.com
[url=http://www.sprezzatura.com" ]Sprezzatura Ltd[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== 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 [i]either[/i] 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 Case
Case VirtCode=+"
NewDate=CurDate + 1
Case VirtCode=-"
NewDate=CurDate - 1
End Case
*
NewVal=Oconv(NewDate,"D2/")
x=Set_Property(CtrlEntId,"TEXT",NewVal)
*
End Else
If VirtCode=D" or VirtCode=d" Then
Set_Property(CtrlEntId,DefProp$,Oconv(Date(),"D2-")
End
End
End Case
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=B1C865ABAD344A8A852566D3007F9A81|View this thread on the forum...]]