General information
Category:
COM/DCOM and OLE Automation
hi,
Ive got a quick question...
Ive got a class roughy written as .
define Class myclass as de Olepublic
prop1=''
prop2=''
procedure MakeCAClass(lcCAfilename As string) as Integer
* 'String-ify' file
lcFileasStr=filetostr(lcCAfilename)
* Get the cursor name .. we'll use it as the property too.
lcname=strextract()
Public &lcname
this.addproperty(&lcname)
public &lcname
this.&lcname=CreateObject('Cursorclass', lcCAfilename) & Add CursorAdapter
return 1
Endproc
enddef
Define CursorClass as cursoradapter
Proc Init (lcCAfilename as String)
*Make Cursor adapter from definitions in File.
........
endproc
enddef
Im my main.prg Ive got ...
* after compile the above as a dll. the following 2 lines work
lxDataenv=createObject('mycom.myclass')
?lxDataenv.MakeCAClass('Mytable_definitions_file')
*--- This line does not work when calling the DLL ( Work when Class Code is
*--- called from procedure file though) This leads me to believe that i'm missing *--- something with regards to COM behavior.
?lxdataenv.mytable.selectcmd
the above line returns (unknown member mytable) as an error.
In fact lxdataenv.mytable is not exposed or doesnt exist at all.
I know that the cursor adapter table was created and opened. I checked this by using other methods on the myclass level. My code ran successfully ( I get no errors but... I cant seem to expose mytable after I create it using the addproperty method.
Is there something that Im missing? maybe a declaration that will expose mytable while using the class as a dll ?
Any help is appreciated..
Thanks
Brian Bolton
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only