Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eventbinding to a property
Message
From
04/02/2016 03:08:52
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
04/02/2016 03:05:40
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01630781
Message ID:
01630789
Views:
60
>>Hi,
>>
>>I do not understand how to
BINDEVENT
to a property so that the delegate gets the value I set to the property.
>>Any ideas?
>>
>>Lutz
>
>Hi Lutz,
>
>Use this way:
>
>
>* Universal Thread ID: 1630781 - to Lutz
>ot = CREATEOBJECT("cl_test")
>od = CREATEOBJECT("cl_delegate")
>BINDEVENT(ot, "somevalue", od, "get_somevalue_changed")
>ot.somevalue = 10
>RETURN
>
>
>DEFINE CLASS cl_test AS Custom
>	somevalue = 0
>ENDDEFINE
>
>DEFINE CLASS cl_delegate AS Custom
>	PROCEDURE get_somevalue_changed
>		? "The value have changed"
>	ENDPROC
>ENDDEFINE
>
>
>Best Regards! :)

Hi Fernando,

Question is:

to what value?
ot = CREATEOBJECT("cl_test")
od = CREATEOBJECT("cl_delegate")

BINDEVENT(ot, "somevalue", od, "get_somevalue_changed")
ot.somevalue = 10
BINDEVENT(ot, "otherprop", od, "get_somevalue_changed")
ot.otherprop = 50
...
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform