Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How disappointed I am .
Message
From
05/02/2002 14:10:11
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
05/02/2002 03:22:24
Max Chen
Yx Software
Shunde, China
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00615259
Message ID:
00615676
Views:
20
>*- the following codes try to add property and method for a command button
>aSelObj(aArray)
>o=aArray(1) && store a reference of a command button in form designer
>o.AddProperty('test_p','1')
>o.WriteMethod('test_m',"? ok ",.t.) &&the .t. means create new method
>
>Ok, it seems ok, the property inspect window shows what i had added,
>the new property and the new method. Then open the scx file by a use,
>what i add is there.
>
>Great, i think i can write a short routine to add properties and
>methods for objects containing in a form on design time. My code will
>be more good...

The actual bug is that this shouldn't work on anything but the class/form you're editing - that's what you can do from the menu, and it shouldn't allow you to add properties/methods to the members. Still, it allows you to do that, and then loses it. IMO, the bug is not that it loses it, but that it lets you do it.

The morale of the story: use this only for the outermost object (form or class you're editing), not on its members. As to doing it with the button, you can do it on the button's class, as Vlad said.

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