Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating class on the fly
Message
From
19/03/2001 23:58:49
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00486674
Message ID:
00486754
Views:
15
>Hi everyone.
>
>I have a problem that I'm not sure how to solve. I'm adding object to different pages on a pageframe on the fly at runtime. These are in a container with an activex flat scrollbar tied to it. Once I create everything I want to save it as a class using the Saveasclass method of the form. However when I try, it returns the error "One of the members of this class is based on a nonvisual class. Cannot write .VCX file." Every object including the activex control have a saveasclass method, except for the pages on the pageframe. Is this where I might be having the problem? Any suggestions would be great!

That exactly is your problem. Some of the base classes, like page, header, column and session (as far as I can remember at this moment) can't be created and saved visually. You can, though, opt for a container, i.e. save the container (can't save the page), and define the page programmatically, then in page's .init you can newobject() the container from the classlib where you saved the container. At runtime, you can newobject('MyNewPageName','MyPageClass','MyPageDef.prg') somewhere in the pageframe's code.

Sounds like some juggling, but it's... well, jugglable.

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