Ok, good advice. I'm now using this line but still getting an error.
=NEWOBJECT( 'oAddRec', 'GridAddRec','FM_BaseButtons.vcx' )
The error is that "c:\FMSDev_Sch\libs\FM_BaseButtons.vcx" does not exist. But I have verified that it does and that there is a SET CLASSLIB to it in my Main program. Why can't it find it?
>SET CLASSLIB is set to the right class library?
>
>FWIW, I prefer using NEWOBJECT instead of CREATEOBJECT because I can specify the class library to use in the same call. No confusion or side effect if the SET CLASSLIB get modified later.
>
>>I am removing the dependency on the WizBtns classes in our base classes. This appears to be the last thing to do.
>>
>>I have a custom class in the FM_BaseButtons library called GridAddRec. In the AddRec method of the FM_ButtonBar class I make this call:
>>
>>
>>oAddRec = CREATE("GridAddRec")
>>
>>
>>But it is unable to create it. If I have the WizBtns.vcx in my project, it works. I copied the custom class from there into FM_BaseButtons and made sure there were no references to WizBtns.
>>
>>Why would the CREATE not be able to find the GridAddRec class if it exists in the same library?