Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array of non-default properties
Message
From
24/10/2001 14:26:57
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00572626
Message ID:
00572812
Views:
48
This message has been marked as a message which has helped to the initial question of the thread.
>>>OK. Just put any type of cotainer (container, grid, pageframe etc) with a textbox in it and try.
>>>Cetin
>>
>>BTW I'm not talking about selected objects. Try w/o selecting from form level.
>>Cetin
>
>No, no :) This is a SIMPLE FormBuilder for simple forms without pageframes and grids :)

First, traversing is simple - look at "Drilling Down to Objects" Thread #570451 Message #571238.

Second, you don't need the array at all. Simply, in metacode, inside the loop where you traverse properties:
if pemstatus() && changed
   vProperty=getpem(oOldObject, lcProperty)
   oNewObject.WriteExpression(lcProperty,vProperty)
endif
The exception is the .name, of course, which would have to be replaced once the old object is discarded. The methods can be handled similarly (readmethod, writemethod) but you'd need VFP7 to add a method if it doesn't exist already. There was a very neat trick about adding a method in VFP6, but doesn't exactly work each time - addproperty(cMethodName), writemethod(cMethodName, cMethodContent), and then save the whole thing. Next time you open it for editing, it's a method with the code in it. In VFP7, there's an addition in syntax, writemethod(cMethodName, cMethodContent, lAddIfNew), and you can add methods to anything with it.
The other thing you may have problems with, if you're adding and destroying objects on the fly (as I propose), is that the objects[] collection will dynamically get populated and depopulated, so you'd better have a copy of the references in an array - and keep in mind that this array needs to be declared local, because the recursion would be a mess without it.

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