Hi,
I found a "simple" way to display any dialogs based on nibs as sheets. The only preconditions are that the nib is NSPanel-based and all buttons are bound to performClickButton.
This also works with "created windows" which will be updated. See tiny screencast:
http://www.bibiko.de/TM_SHEET_PROGRESS.mov (1M)
Code: TOKEN=$("$DIALOG" window create ~/Desktop/progress -ep '{min=0;max=100;value=0;textcolor="#00FF00";}') C=0 TXT="" while [ $C -lt 100 ] do M="$C% ready on window token $TOKEN" TXT=$(echo -en "$M\n$TXT") echo "{value='$C';message='$M';text='$TXT';}" | "$DIALOG" window update $TOKEN C=$(($C + 2)) done
"$DIALOG" window close $TOKEN
Any comments?
--Hans