Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ER: functions in methods
Message
From
17/10/2001 03:18:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00569195
Message ID:
00569421
Views:
30
>I would like to once again vent my frustration with the message: "Methods and events cannot contain nested procedures or class definitions."
>
>I can understand that the format that methods are stored in the vcx might make it difficult, but I am sure it can be overcome. Might have to start enforcing the use of ENDFUNC.
>
>Yes, I can work around it by adding yet another method, but I think things could be better organized if we had the ability to have a function in a method.
>
>For instance: I have a class with 10 methods A-J. Method A needs to call K() and L(). So I add 2 more methods. Now I have 12 (A-L), and there is no clear indication that A, K and L are related, and K and L are not used by anything else. I can help the situation by naming them Ak() and Al(), but that is goofy.

The usual answer to this is that you can reorganize your stuff, and group your related functionality into a separate class. So if A is having dependent methods K and L which are not used anywhere else, it may be a good moment to think of a new class which will have new methods: A, K and L, and the A method in the orginal class will simply call the A method of an object based on this new class.

back to same old

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

Click here to load this message in the networking platform