Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope of Properties
Message
 
 
To
08/12/2001 23:52:49
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00591662
Message ID:
00591789
Views:
31
How exactly did you reference this property in the Click of the button? Where in the Debugger it says that property is local?

>Hi Sergey
> I just tried code exactly as described. I did create the property through the visual design environment, not at runtime using addproperty(), but that shouldn't make a difference. I assigned it the parameter in the init method, and then tried to display that value ( just for testing ), in the click method of a command button. An error was generated ( unknown variable ... ) and in the debugger, the scope of said property was listed as local. I don't know what I'm missing here, but I'm obviously missing something. Any ideas?
>
>Thanks
>Carmen
>>Hi Carmen,
>>The parameters are passed to the form's Init event not Load.
* Form's Init
>>LPARAMETERS parameter1
>>thisform.property = parameter1
However the Load event wouldn't see this property change because it fires before Init.
>>
>>>Hi Ed
>>> A very informative explanation. Just to elaborate a bit on my actions, I defined the property using the form design environment. I accessed the form menu and added the new property and then ran the form. At that point, the property shows up in the (Other) tab in the properties of the form as a logical data type. In the load method, and I tried it in the init method as well, is where I tried to assign a parameter passed by another form to that property. I tried to assign it two different ways thinking that I had made a syntactical error. I tried as follows
>>> load method code:
>>> thisform.property = parameter passed,
>>> and I tried
>>> thisform.property.value = parameter passed
>>>Neither one of the above worked, so I fell back ( I know OO philosophy ), on the tried and true public variable. If you could tell me how to correct whatever mistake I made, I will incorporate it. Thanks again Ed.
>>>
< snip >
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform