Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1733
Message
From
29/05/2019 17:08:49
 
 
To
29/05/2019 14:58:14
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
01668856
Message ID:
01668862
Views:
60
>>Both fs_frmmaintenance and fs_Header are classes in the same classlib (vcx) file.
>>fs_frmMaintenance errors and fs_Header1 not and is created.
>>NewObject, to my opion requires newobject(cObjectName, cClassname) and not the cClassLibraryName, VFP will look in the loaded classlibraries (VCX) files for the Class = 2ndParameter.
>
>You're right, the classlibrary parameter is optional, and the help claims it defaults to .vcx - thought I could swear I saw it find a .prg in a project (or on the set("path") perhaps) and not a .vcx when extension was omitted, but then my memory isn't as I remember it.
>
>So we're back at square one. In cases like this, I'd just go to class browser and copy-paste the name of the class from it into the code, because my eyes also fail me sometimes and the obvious typo isn't.

Dragan,
you have pointed me to the correct direction. It is a little bit different and VFP help is not 100% correct, as I can see it.
The Helpfile gives
NEWOBJECT(cClassName [, cModule [, cInApplication | 0
[, eParameter1, eParameter2, ...]]])

However it should be NEWOBJECT(cNewObject,cClassName[ . cClassLib])

If you omit cClasslib VFP searches in the loaded classlibs for the cClassName.
In case there is an error in the cClassName, meaning in one of the objects, the NewObject will not be created and error 1733 wil come. In case you have added the 3rd Parameter and you have an error in one of the objects, the object will be created and an error will occur which object in the NewObject has an error.
Seems to me there needs to be something changed in the helpfile on subject newobject()function and in the subject of error 1733.

Thanks,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform