Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub Classed Forms Undefined when Compiled

Status
Not open for further replies.

jsams

Programmer
Aug 22, 2000
73
US
I created a form class (tform based on form) and stored it in a classlib. I then created two sub-class forms based on tform stored in the same classlib. I added the classlib to the project. I can modify tform and the two sub-class forms from the project. The sub-class forms inherit and display properties and methods setup in the parent class, tform. I have a menu setup (also in the project) that calls the two sub-class forms.

When I compile the project for and EXE it tells me the two sub-classed forms can not be found, undefined. The tform exists outside the classlib as a physical .scx and .sct, the two sub-class forms do not(only in classlib). I added a SET CLASSLIB TO myclasslib in the main.prg which does not help. Obviously I am missing something here. Any help would be appreciated.

Thanks,
John
 
is it included in your project?

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
Yes (I assume your refering to my classlib).
John
 
When you say, "The tform exists outside the classlib as a physical .scx and .sct", are you referring to a form you created directly from the tform class you were talking about? It sounds like you've created an SCX form, based on the tform class, and you call it with DO FORM TFORM. The two subforms don't have SCX forms based on them, so you need to call them with CREATEOBJECT instead. Please show the code you're using to call these two subclassed forms.



-BP
 
Yep, your right BPeisch, thanks for the help. Was trying to invoke them with a "DO FORM...". I setup a CREATEOBJECT to create and invoked with SHOW.

Thanks again,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top