[TxMt] tm_dialog: call a other tm_dialog from tm_dialog without closing the first

Allan Odgaard throw-away-1 at macromates.com
Sat Aug 4 04:23:57 UTC 2007


On 3. Aug 2007, at 13:32, Hans-Joerg Bibiko wrote:

> [...]
> I wonder if it would be possible to write a nib which contains a  
> button, e.g. 'Browse', and if I press this button it opens an other  
> nib (or in that case a file select dialog). The returned value from  
> the called nib (file select) will set a value in the first nib?

That should be possible.

If you open a nib asynchronously (-a) and bind a button action to  
returnArgument: or connect it to performButtonClick: then the button  
will make "$DIALOG" -w«token» return, but will not close the window  
or anything (using performButtonClick: you will get the label + tag  
for the button clicked in the resulting plist).

Then do your stuff and update first nib using "$DIALOG" -t«token»  
when you have the updated plist (model).




More information about the textmate mailing list