Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access & Assign ok with OLEControl?
Message
 
 
À
22/10/2001 13:28:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00571710
Message ID:
00571766
Vues:
25
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform