Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SaveAsClass Bug?
Message
From
30/08/2001 10:16:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/08/2001 09:27:26
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00550608
Message ID:
00550848
Views:
13
>>Open class the same way you're openning .SCX form, using Modify command.
>>
>>>When you have a form object store in a vcx instead of a scx the code in the object do not get saved with the saveasclass method. So if you put code in the click event of the textbox it is not there in the mysubclass, but if the form is an scx it is.
>>>
>>>
>>> oForm = NewObject('frmForm','myclass.vcx')
>>> oForm.Textbox1.SaveAsClass('mysubclass','textbox1')
>>>
>>>
>>>Does anyone have a work around for this?
>
>I am tring to use saveasclass at runtime to save the controls on the form.

Tough one. Doing it at runtime doesn't, but (if there's not too much of it), you can create a blank form, copy/paste all the controls from the class to it, and then it with the controls on the form. I tried it manually with just one control, and it works from the menu. I opened the new form with the pasted control, and just did
=aselobj(a,1)
a[1].controls[1].saveasclass('test','dummy')
and there it was.
HTH

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