I am currently trying to use the AddProperty method of a Session Object to add properties dynamically at run time. When running my code in development mode the properties appear to be there. After compiling the code into a DLL the properties are not there. What's up with that? Heres some similar code
DEFINE CLASS oMyobject AS SESSION OLEPUBLIC
DIMENSION aRecordSet[2,4]
PROCEDURE LOADCURSORS
WITH THIS
.aRecordSet[1,1] = "MYTABLE1"
.aRecordSet[2,1] = "MYTABLE2"
ENDWITH
ENDPROC
PROCEDURE LOADDE
WITH THIS
FOR i = 1 TO ALEN(.aRecordSet,1)
.AddProperty(.aRecordSet[i,1]
ENDFOR
ENDWITH
ENDPROC
ENDDEFINE
When running the DLL:
ox = CREATEOBJECT("MYAPP.oMYOBJECT")
ox.LoadCursors()
ox.LoadDE()
When running the development code:
change the object from being olepublic then
ox = CREATEOBJECT("oMYOBJECT")
ox.LoadCursors()
ox.LoadDE()
In development properties appear in debugger
in DLL properties should but do not appear in DLL
Terry Rooks
Software Systems Architect
Microsoft Certified Solution Developer.Net
If at first you don't succeed, then skydiving definitely isn't for you.