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.
-=Gary