[TxMt] Re: Suggestion for DIALOG2 enhancement - interactive async windows
bibiko at eva.mpg.de
Tue Aug 12 10:51:42 UTC 2008
On 4 Aug 2008, at 11:44, Allan Odgaard wrote:
> On 9 Jul 2008, at 10:42, Hans-Joerg Bibiko wrote:
>> I didn't find a way to do this. That's why I introduced a new method
>> to '"$DIALOG" window' named 'getparams'.
>> This method is very simple. It write the current NSDictionary
>> 'parameters' of the current nibController to the standard output.
> I would suggest that we instead make this an extension of wait or a
> new monitor command.
> So one would call: "$DIALOG" window monitor «property 1» [.. «property
> n»] «token»
> This command then returns if «property i» changes, and returns a
> dictionary with the changed properties.
> This would be implemented by using key/value observing. Two problems
> though, 1) what if the property is changed while no-one is observing
> it, but later the user calls the command (this could be solved by
> storing a copy of the initial parameters and reference + update these,
> each time the user monitors a property, and 2) monitor doesn’t imply
> waiting for actions, but for all practical purposes, this would be
> Based on the above, it might be better with:
> "$DIALOG" window observe «property» «token»
> This will immediately return the value of «property» _and_ setup KVO
> for this, which makes "$DIALOG" window wait «token» return, if that
> property is changed.
> This solves both #1 and #2.
Thanks. I agree. This would be a very nice enhancement ;)
More information about the textmate