Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1744 -Object class invalid for this container
Message
 
 
To
26/03/2002 10:33:17
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00637255
Message ID:
00637261
Views:
19
You can not add objects to a session class as it is not a container class. You can test this in VFP 7 with intellisense:

o = newobject('session')
o. && there is no add object in the popup list.

o = newobject('custom')
o. && addobject is in the popup list

When you programmatically define a class, ADD OBJECT at the beginning of the class code is the same as object.addobject

>I have a rather simple OLEPUBLIC class that will not build when OLEPUBLIC is added. It returns error 1744, as per the title.
>
>The text of this error says:
>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.
>
>The first line of code is:
>DEFINE CLASS ToXxxxxxx as Session OLEPUBLIC
>
>and within that class definition I have the following line:
>ADD OBJECT TimerPop as Timer (appears before any method code)
>and later in the code there is a line:
>ENDDEFINE
>DEFINE CLASS TimerPop as Timer

>
>The code does invoke PROCS that use wwIPSTUFF from WC, but the above line is my only known use of "Add Object" (not AddObject as stated in the error text).
>
>Seems to me that I should be able to add a Timer object to a Session object. But this is my first ever attempt at something like this, so I likely misunderstand how things really work.
>
>What am I doing wrong?
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform