Le 22 janv. 2012 à 11:08 Matin, Christian Schmitz a écrit:

>> A ShowModalSheetForDirectory method would be the missing method here, simply 
>> because a NSSavePanel is meant to suspend the current method. Or is there a 
>> workaround?
> 
> Maybe simply do a loop and wait?
> 
> do
>   delayMBS 0.1
> loop until done
> 
> or something like that.

I've considered various ways for that. In the example above, I'd have to use 
App.DoEvents to not block the UI (no problem for me, but some say it's to be 
avoided).
Another consideration is to invoke my various methods in a thread, so I could 
suspend the thread. Here, I have a problem when the save is started by a 
CancelClose event (I have to remember the AppQuitting parameter and either 
close the window again or quit the app (again). Whichever is ugly).

> As you see in Apple's documentation for NSSavePanel class, we use this method:
> 
> beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:

So the behaviour (of not having a modal variant) is because Apple doesn't 
provide it, I'm right?
(because it seems odd to me they have a modal behaviour for non-sheet variants, 
then)

Thanks!
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to