Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to give property empty date-time value?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01047270
Message ID:
01047470
Vues:
10
>either try to set it with the compare-operator
>
>={// ::}
>
>or set a statement in the init
>
>this.tDateTime = {// ::}


Thank you, Frank. (I'm thinking "FRAHHNNK" as I type this. :)

I had forgotten about the equal operator which changes the way the property value is interpreted. That's what it took to make it work.

I realized if I looked at the class view code, it would also shed light on what is happening. I set my six different time-date properties six different ways and this is what I got. The value after initializaiton are as shown in DEBUG.
** property value entry: {//:} --changes to--> {}
** class view code:      tEffective = {}
** value after init:	 {  /  /    }

** property value entry: ={//:}
** class view code:      tLastWakeupScan = ({//:})
** value after init:     /  /       :  :  

** property value entry: ctod(" ")
** class view code:      tHibernateWarning = [ctod(" ")]
** value after init:     "ctod(" ")"

** property value entry: =ctod(" ")
** class view code:      tLastActivity = (ctod(" "))
** value after init:     /  /       :  :  

** property value entry: dtot({})
** class view code:      tUnitsCheck = "dtot({})"
** value after init:     "dtot({})"

** property value entry: =dtot({})
** class view code:      tSeeDetail = (dtot({}))
** value after init:     /  /       :  :  
So there are many ways to get an empty date-time value IF you remember to use the equal operator. Without it, none of them produce the desired value.

Of these three methods, I like this one best: ={//:}

Thanks to Benn and Fabio also.

Peter
Peter Robinson ** Rodes Design ** Virginia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform