Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error With VCX in ClassLib Stack ???
Message
 
To
24/05/2004 16:36:24
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00906698
Message ID:
00906731
Views:
13
I've run into problems before where I had a different version of the classlib in the search path and it was getting loaded instead of the one I wanted. Just a thought.


>Hi,
>
>I have the following code that adds some containers "on the fly". This works in dev mode and the class library containing the classes is in the ClassLib stack :-
>
>
>m.cPageExpr = 'THIS.Page' + TRANSFORM(THIS.ACTIVEPAGE)
>IF NOT PEMSTATUS(EVALUATE(m.cPageExpr), 'oCntethniccountsview04', 5)
>	EVALUATE(m.cPageExpr + [.ADDOBJECT('oCntethniccountsview04', 'cntethniccountsview04')])
>	m.oContainer = EVALUATE(m.cPageExpr + '.oCntethniccountsview04')
>	m.oContainer.TOP 	= 263
>	m.oContainer.LEFT	= 250
>ENDIF
>IF NOT PEMSTATUS(EVALUATE(m.cPageExpr), 'oCntethniccountsview05', 5)
>	EVALUATE(m.cPageExpr + [.ADDOBJECT('oCntethniccountsview05', 'cntethniccountsview05')])
>	m.oContainer = EVALUATE(m.cPageExpr + '.oCntethniccountsview05')
>	m.oContainer.TOP 	= 263
>	m.oContainer.LEFT	= 234
>ENDIF
>THISFORM.oStateManager.BroadCast('REG YEAR')
>
>
>However, on site, we are getting a somewhat annoying "Locate Class" dialog that says ... "Error instantiating class. Cannot find "c:\vgs\source\hecontainers.vcx".
>
>FYI, hecontainers.vcx is built in to the .EXE file.
>
>VFP must have found the hecontainers.vcx library in the classlib stack because it has at the very least identified which VCX the container classes belong to or can be found in with no clue from the developer code ie., ADDOBJECT() does not have a "cModule" type property in which to specify the containing library file. The VCX (and many others in question) are built in to the distributed EXE and are in the SET CLASSLIB TO stack.
>
>So, to recap, VFP identifies that the container classes it needs can be found in hecontainers.vcx. It then goes on to say that it cannot find the class in question although it must have to know that the containers classes belong in the class library that it says it cannot actually find.
>
>Any ideas what might be happening here?
>
>VFP8 SP1.
>
>Thanks.
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform