Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1733
Message
From
30/05/2019 06:03:09
 
 
To
30/05/2019 03:04:53
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
01668856
Message ID:
01668871
Views:
63
>>Hi,
>>
>>I am facing error :
>>"Classdefinition fs_frmmaintenance is not found"
>>The code line causing this:
>>This.Newobject("fs_Maintenance1","fs_frmMaintenance")
>>The class is in the classlib which is set with set Classlib to and most curious is that a few lines above you will find:
>>
>>This.Newobject("fs_Actions1", "fs_Actions")
>>which executes normaly
>>Both fs_Actions and fs_frmMaintenance are in the same Classlib
>>
>>help file is not very helpfull in this respect, besides it states
>>" The class definition specified in a CREATEOBJECT( ) function cannot be located. " which is wrong as this is a Newobject and not createobject
>>
>>I am puzzled.
>>
>>Any advise is welcome
>>
>Beste Koen,
>
>Are you by any chance running this code outside the executable or in EXECSCRIPT() ? If so, the above could be explained as the code you are running cannot find the class. The code then is not able to look for classes inside the EXE.
>
>The fact that the other class could be found might be due to the fact that VFP caches classes once they are loaded for the first time. Subsequent object creation will load the class definition from cache rather than from the class library or PRG.
>
>Walter,

Goede morgen,

No Walter the code is not running in Execscript. The other objects in the same routine get instantiated properly, the object "fs_frmMaintenance" does not.
with following code:
With this
.newobject("fs_maintenance1","fs_maintenance")
--
I found that in this object there is a (small) mistake in one of its text boxes.
When I change my code without correcting that text box, into
With This
.Newobject("fs_Maintenance1", "fs_frmmaintenance", "foxscheduler.vcx" )
the fr_Maintenance1 is instantiated and imm. gives a meaningfull error about the textbox.
correct that and execute again now without the 3rd parameter and all goes OK
When time permits, I will construct an example to test my findings.

Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform