Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining if an object's value is inherited/changed
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01047410
Message ID:
01047466
Vues:
8
BINGO !!!

That did the trick. I *knew* there was a simple way to do this.

Many thanks, Fabio...VERY useful.


>>Hi folks,
>>
>>Okay, this one's driving me absolutely nucking futs today.
>>
>>I have a specialized ADO-populated ComboBox, to which I've added (and populated with a default value) a property called icDataLinkFileName to hold the name of the UDL file (if any) which is used by the data handler to populate the control.
>>
>>Now, in one of the methods of this control, I need to check if this property has been changed in the particular *instance* of the control (ie, when the developer dropped the control onto the form/container, they decided to set the property to something other than its default value). Should be a breeze, right? WROOONG...
>>
>>I've tried the following, all with no luck:
>>a) SYS( 1269, THIS, "icDataLinkFileName", 0 ) always returns false
>>b) PEMSTATUS( THIS, "icDataLinkFileName", 0 ) always returns false
>>c) PEMSTATUS( THIS, "icDataLinkFileName", 4 ) always returns true
>>d) PEMSTATUS( THIS, "icDataLinkFileName", 6 ) always returns true
>>
>>All the UDL files exist, in the correct location. When I change it in the property sheet, for either the class or the instance, the correct value is there. BUT IT WON'T TELL ME THAT IT'S BEEN CHANGED FROM THE DEFAULT.
>>
>>This *CAN'T BE THAT DIFFICULT* !!!! What stupid, idiotically simple since-VFP-was-invented function am I overlooking here???
>>
>>Apologies for the frustrated SHOUTING :) and
>>TIA,
>
>The VFP OOP design is incomplete.
>
>The PEMSTATUS(,0) it is not applicable to the objects members of a class.
>Example:
>
>ComboClass   icDataLinkFileName = "some"
>ContainerClass
>   ComboClass  is a member and any changes is not visible
>               then  icDataLinkFileName = "other" return unchange
>Form scx
> ContainerClass
>    ComboClass  here a change return TRUE, but resettodefault return "some" !
>
>
>try, if useful:
>
>? NOT GETPEM(this,"icDataLinkFileName")==GETPEM(this.class,"icDataLinkFileName")
>
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform