Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ER: functions in methods
Message
From
19/10/2001 13:39:56
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00569195
Message ID:
00571021
Views:
30
>>Then, again, there's really no need for that, as you can always have a class which will do it. In VFP7 there's a new thing which I have just discovered, third parameter to the WriteMethod method, lCreateMethod, which allows you to add methods on the fly while designing - even to members of a container, without any need to go for their classes to add methods there. This means you can just add a snippet object, which will be a placeholder to keep any such snippets you may need. It would still be neat and handy and would avoid the clutter you got when all the methods were defined (for they had to be) at the form or class level. Now you can add methods to any button on your form, without the need to mess up their class definition, or to subclass them. This is way cool - thanks for spurring up my curiosity, I was nicely surprised with what I found.
>
>Just to be clear, what you have found with WriteMethod doesn?t help my problem, right? It sounds like it solves a similar problem: adding snippets to the thing that they are relevant to (like a button.) So you have to call the WriteMethod, there is no menu option to do this? How odd.

Let's say you have a form with one button, open it for editing, select the button and from the menu select Forsm/NewMethod. It will add a method to the form. To add a method to the button,
=aselobj(oObj)
oObj[1].writemethod("newmethod","* just a comment", .t.)
Look at the PEMs for the button now, and you'll see the new method in bold - it has the content now. You may understand my excitement as this is what I was looking for for more than four years.

This is also a cool way to make a better conversion tool for FP screens. Doesn't address your problem but does help a lot with mine :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform