Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AddProperty and Com.dll
Message
From
31/10/1998 17:04:04
 
 
To
31/10/1998 13:46:45
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00152924
Message ID:
00153210
Views:
24
Thanks for your help.


The propblem occurs when a method of the class uses the addproperty() method. as follows
x = createobject("comprop.testaddprop")
x.addprop()

Addprop Method
this.addproperty("test1", "test1")

? x.test1
Error Unknown Name.


This error only occurs when the component is a com.dll. When I use the set classlib to ... and
x = createobject("testaddprop")
the above code works.


I could not get your solution to work. There was a property that existed in my class when I compiled it. I ran the following code:

x = createobject("comprop.testaddprop")
x.test7 = "test7"
? x.test7
Returned test7

? x.returnprop(test7)
Error varialbe test7 not found

? x.returnprop('test7')
Error Unknown Name




>I had a lot of trouble with this same sort of thing -- sharing the data component of a COM object. After several months (literally) talking to the MS help lines I learned the secret. It seems that you must expose a method in the COM object to return any of the data properties. Instead of:
>
>de = createobject('databridge.de')
>? de.propname
>
>you need to:
>
>de = createobject('databridge.de')
>? de.returnprop(propname)
>
>I hope this helps.
>
>Rick Grinter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform