Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No - No ... Default!
Message
From
02/09/2006 17:48:27
 
 
To
02/09/2006 13:58:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01150433
Message ID:
01150562
Views:
19
>>>>The edtbox is subclassed from the bsse class editbox.
>>>
>>>The nodefault is there to prevent the native behavior of the control. For programmaticchange the behavior is to assign the value to control's .value - so the value wouldn't be assigned.
>>>
>>
>>not true.
>>
>>The value is assigned BEFORE programmaticChange.
>>
>>NODEFAULT stop the AFTER phase, where the value is copied int the (ControlSource)
>
>I somehow expected you to jump in here - thanks. I hope this makes the situation clear Tommy.
>
>Just curious, does this mean that a nodefault in programmaticchange does nothing in an unbound control?

No. YOU SKIP AN EBOX.VALUE datatype evaluation.

The VFP logic is:
* program
ebox.Value = exp

* vfp operations (incomplete)
#IF NOT TYPE('EXP')=='C'
    #ERROR 1881
#ENDIF

#value_Assign('sometext')
* BUG1: if you remove "this.Value = ..." in the value_Assign routine,
*   VFP continue in any case

#programmaticChange
#IF NODEFAULT is found
      #RETURN
#ENDIF

* BUG2
#GET TYPE('M.THIS.VALUE') && this perform a Value read for compare value datatype with bound datatype

#IF ControSource is empty
   #RETURN
#ENDIF

#GET TYPE(M.THIS.ControSource)  && BOUND DATATYPE

#if #POSSIBLE #CONVERT this.value to the M.THIS.ControSource DATATYPE
  #STORE #CONVERT(this.value) TO (M.THIS.ControSource)
#ELSE
  #ERROR ...
#ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform