Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing classloc causes error
Message
 
 
To
19/10/1998 11:38:41
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00138319
Message ID:
00148146
Views:
17
Rock,

You may have to go hand edit the .scx to get rid of what you've gotten into here. The error is complaining that this is what's wrong:

x = createobject( "PageFrame" )
x.AddObject( "grdX", "grid" )

You can not add a grid to a PageFrame, the only thing that can be added to a PageFrame is a Page:

x.AddObject( "pagTest", "Page" )
x.pagTest.AddObject( "grdX", "Grid" )

You can add a grid to the page of a pageframe.

So somewhere in your form you've got it trying to ADD OBJECT something that can't be put into the container it's trying to be put it. Viewing the source from the ClassBrowser might help you figure out where the problem is.

>I got a similar error when I subclassed my pageframe. This is what the help system has to say about these errors.
>
>Object class is invalid for this container (Error 1744)::
>You have attempted to add a member object to a parent object with the AddObject method. It cannot be added because the member object’s class cannot be a member of the parent’s object class. For example, you cannot add a Grid object to a PageFrame object.
>
>I put fox grid objects on fox pageframe objects all the time. The problem I got was when I subclassed the pageframe object. The interesting thing is that this error only shows up after edit the form in question. If you take a working form and change the classes of the controls and just run it, it will work. If you edit the form and change anything, anywhere, then you get the error. What I've done is reclass my pageframe back to a fox pageframe, make my form edits and reclass the pageframe to my baseclass again.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform