Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eventbinding to a property
Message
From
04/02/2016 15:03:42
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
04/02/2016 06:50:14
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:
01630853
Views:
53
>>>>>Should be faster. It doesn't involve the whole expression evaluator, this is just the simper "get me a property value" mechanism.
>>>>
>>>>Then the rules from above do not change. Simpler in otherpropuser. Thanks for the hint.
>>>
>>>Well I'm not quite clear on what the rules are, but at least this way you can bind multiple properties to the same method, and the method would know the name and value of the property which changed. If you need something else, then I solved the problem you didn't have :).
>>
>>Oh, my problem is that I have method that needs the value from a property. What property is not fixed. The method is used independend of the change of the property. I have more changes then uses. And I have more time on the use then on the change, for that. That defines the rules - as less calls to EVAL or GETPEM as possible.
>>
>>You helped with the solution - by bringing up GETPEM. :)
>
>I must say I still have not grokked your main intent and was tentatively visualizing a logger you can bind to a list of properties like Dragan hinted.
>But you also repeatedly mentioned "A" property and speed - when I last timed in vfp6, _access & _assign method calls were quite fast, and in there you already have the value as parameter. And if your method needs to be fed by ***some*** properties, defining _assing methods should be easy, and perhaps a quick check whether that event in this situation should call your method is an easy call to a hash...
>
>Sometimes you should give a broader pic (including numbers like # of properties to bind eventually and concurrently) to minimize the guesswork.
>If you are really after a logger for timing, C is necessary most of the times. Been there, done that - back in fpw times and that fwk is harder to set up, but has less Heisenberg effects than coverage profiler.

This would need mor keypressing and translating.
It's a hook that is called in special cases. It hooks into forms. The property stores information over a record. it might be several records traced in a form, so there are many properties. I need to hook to one of the properties - the name is changing with the form, but the hook class (at least the working part, through inheritance) is the same. The form should not be altered in this process. I can subclass the hook, and give it a string describing the property. If the hook kicks in, it needs to get the recent value. I can now EVAL or GETPEM the string and work with it. Or - and that was the idea - I can BINDEVENT to the prop and read the value. But this is useless if I need to fiddle around with AEVENTS / GETPEM or EVAL to get the value every time the property on the form is changed. There are other and better ways then eventbinding there too.

BTW you should _ASSIGN and _ACCESS to a property and single step through setting and getting the property. That's fun ...
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
Reply
Map
View

Click here to load this message in the networking platform