Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ER: functions in methods
Message
 
À
18/10/2001 12:19:31
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00569195
Message ID:
00570641
Vues:
28
>>How do you know it would be major?
>
>From messing a lot with .vcx and .scx files and getting to understand how it gets compiled. It parses the .methods memo and looks for the Procedure and EndProcedure lines, and stores their line numbers (or just byte offsets) somewhere in the compiled code. Just try to mess up with the memo without recompiling and see how it gets confused, i.e. out of sync. It also has to echo all the names of changed/added properties, array properties and methods in the Reserved3 memo.
>Now allowing for snippets inside methods would require multiple levels here, and would require recursion etc. As it is now, the compiler is still single-pass (and that's what makes it so fast).

I don't think what you described is 'that' major. I am sure those developers can handle recursion, etc. As far as speed goes, the time saved compiling is quickly wasted on the alternative solutions.



>
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform