Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change to European date
Message
De
16/11/2018 13:43:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01663305
Message ID:
01663466
Vues:
50
>>
>>DEFINE CLASS DateSetting AS Custom
>>   Value = ""
>>    PROCEDURE INIT
>>        THIS.Value = SET("DATE")
>>    ENDPROC
>>    PROCEDURE Set
>>        LPARAMETERS tcValue
>>        SET DATE &tcValue
>>    ENDPROC
>>    PROCEDURE Destroy
>>        LOCAL lcValue
>>        lcValue = THIS.Value
>>        SET DATE &lcValue
>>    ENDPROC
>>ENDDEFINE
>>
Tom Rettig's envlib.prg does this in .init() - saves the current value to this.oldval, and sets the date (or any other setting, there's a subclass for each) to whatever is passed as parameter to init. Pretty much the same idea, but saves you one line when calling - and that's 50% of the lines you need to write :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform