Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access & Assign ok with OLEControl?
Message
 
 
To
22/10/2001 13:28:45
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00571710
Message ID:
00571766
Views:
26
>Hi Larry,
>
>>When you say you "created the methods but didn't actually code them", what does that mean? Is the default code that VFP puts into those methods still there or did you delete that code.
>
>I let VFP do it's thing and left it at that. I just brought up the displayonly property in the Edit Property/Method menu option and checked off the Access and Assign check boxes. I did not remove or alter the code in any way - just saved it and moved on to something else.
>
>>And when you attempt to set a default value, how are you doing that? From the Property Sheet or via code?
>
>I'm trying to set the default value through the property sheet - that's the ideal method - one place to look.
>
>One other thing to mention. When I then go in and try to change the value from .T. to anything else, it doesn't take. If I then go and remove the access and assign methods (once again, through the Edit Property/Method menu) it's value in the property sheet reads "Write-Only" and cannot be tweaked! That's why I said "Rule" in my original post. I'm banging my head against a rule here - I can feel it.
>
>Thanks again...
>

Erik,
>I'm trying to set the default value through the property sheet - that's the ideal method - one place to look.

With Access and Assign methods, that isn't necessarily the case. Assign methods don't fire if the property is set via the Property Sheet. In order to have it fire, you need to add code to the Init to set the Value to itself.

As for your error, I was able to duplicate it setting only the Access method. This may be a bug (not sure). Do you need the Access method for your purposes? This method is sometimes used for calculated variables. It fires whenever you access the property. Are you going to put extra processing in that you want to fire whenever this property is accessed?

FWIW, you can delete the new property and start over.

Assign is used alot for validation purposes. If you don't want a user assigning an invalid vale to the property, you can check the incoming value in the Assign method and disregard it if necessary.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform