Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when creating object from class?? Weird..
Message
From
04/07/1999 12:54:21
 
 
To
04/07/1999 12:20:41
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00237303
Message ID:
00237343
Views:
10
I doubt you are getting the same error as you reported before changing your calling syntax. What error are you getting?

If ou want to have bound controls in a form class then you have to make sure that the tables are opened from the load event of the form, because form classes don't have DataEnvironments.

>Thanks to all of you. However, I still get the same problem even I follow what all of you said.
>
>I have tried this and it seems like another solution , but wasn't very prefect one:
>The class is a form which contains textboxes where I set the Controlsource to the fields from my table such as member.name which is one of them. Here, the problem occurs. But when I remove all the Controlsource which were set in the class , the problem went off. For that I have to set the every Controlsource in my prg file when calling the class.
>
>Hmmm...??
>
>Gan
>
>
>>>I have a class named "myclass" in c:\data\classlib.vcx where a.vcx is my class library
>>>
>>>then i have this few codes in my prg file to call "myclass"
>>>
>>>set path to c:\data\
>>>set classlib to classlib
>>>
>>>frmDetail = createobject("classlib.myclass")
>>>frmDetail.show
>>>read events
>>>
>>>However, I got this error msg when it tried to create the object from the class, "Error instantiating the object", saying from the Help that "The server for the object is not registered properly, resources are low, or a required .DLL isn’t present."
>>>
>>>What does this means?
>>>Thanks.
>>
>>Mark pegged it. The way you phrased your CREATEOBJECT is used when calling a COM server. when calling a regular VFP class, just use the name of the class.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform