Page 1 of 1
Access the current date in a conditional method
Posted: Thu Aug 20, 2009 2:32 pm
by rolly
Is anyone aware of a way I can get access to the current date in a conditional method?
I obviously can't declare a 'Date' variable, nor can I access the app.actualTimeServer type methods.
I'm sure there must be some way to do this.
Thanks
Roland
Re: Access the current date in a conditional method
Posted: Thu Aug 20, 2009 2:37 pm
by BeeJay
I believe the reason this is blocked is because they need a "trigger" to re-evaluate a condition.
If use of dates was allowed as part of the condition, then you could have the situation where an object no longer meets the condition simply as a result of elapsed time, but because no actual update has occurred they would have no "trigger" for re-evaluation of the condition.
Cheers,
BeeJay.
Re: Access the current date in a conditional method
Posted: Thu Aug 20, 2009 2:41 pm
by BeeJay
I should make it clear that in my posting I was referring to when a condition has been used as a constraint on an automatic inverse. Obviously you can have conditions that are never used as a constraint, but the same enforcement rules need to apply regardless in case it is ever used as a constraint in the future.
Cheers,
BeeJay.
Re: Access the current date in a conditional method
Posted: Thu Aug 20, 2009 4:48 pm
by rolly
Thanks BeeJay, I must admit that I perhaps hadn't thought through my use of dates in conditions far enough, so thanx for the extra info.
So under the hood I would have to assume that jade re-evaluates conditional methods which are used as constraints when any of the attributes or references touched in the conditional method change and must setup some sort of internal triggers?
Roland