Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewObject syntax problems
Message
From
09/02/2000 10:02:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
NewObject syntax problems
Miscellaneous
Thread ID:
00329404
Message ID:
00329404
Views:
63
I understand the newObject syntax, but I am unable to get the command to work.

I have a class in a library I am trying to instantiate. I can successfully use CreateObject(). I would like to use NewObject as then I will not have to do the set classlib to work before it...

Existing Code:

This Works...
SET CLASSLIB TO search.vcx ADDITIVE
loFind = CREATEOBJECT(lcClass,This.ControlSource,Thisform)

This does not work ( File 'C:\vfp6\master.phone_01' does not exist )
loFind = NewObject(lcClass,"SEARCH.VCX",This.ControlSource,Thisform)
I beleive its looking for the search.vcx somewhere...
loFind = NewObject(lcClass,"SEARCH.VCX","MY.EXE",This.ControlSource,Thisform)
* this bombs also
Can someone help the the NewObject syntax...I have tried it several different ways and it is a mystery to me.

I've tried this ( Function argument value, type, or count is invalid.)
loFind = NewObject(lcClass,This.ControlSource,Thisform)
Next
Reply
Map
View

Click here to load this message in the networking platform