Re: Need Better Understanding of Modal Delegates
Re: Need Better Understanding of Modal Delegates
- Subject: Re: Need Better Understanding of Modal Delegates
- From: Brian Ganninger <email@hidden>
- Date: Mon, 19 Feb 2007 01:13:29 -0600
On Feb 18, 2007, at 11:13 PM, Jerry Krinock wrote:
on 07/02/17 16:20, Brian Ganninger at email@hidden wrote:
You are running the dialog in different modes, and that's what needs
to be understood...
Brian, thanks I understand that this is "the way it is", but it
seems to me
like the "the way it is" doesn't make sense, and since most things
in Cocoa
make sense, I wonder why this doesn't. Maybe the inability to
return a
value is an unintended side effect of making the sheet document-
modal, and I
should just accept the fact that even in Cocoa, the world is not
perfectly
round and symmetric?
I think it's just a side effect of being asynchronous, i.e., document-
modal. Using callbacks is a more infrequent design pattern in Cocoa,
but I wouldn't say it doesn't make sense :) [and certainly isn't
unheard of]
And, also, regarding my second question, if my Cosmetics Dept.
insisted that
my "save:" method, returning an error/result, put up a sheet
instead of a
dialog, has anyone ever done this? Maybe I could do it by spinning
off
another thread, but that seems like a pretty complicated solution to a
pretty everyday problem.
There's no workaround that I know of that will still allow sheets to
be used. A sheet-invoking method will continue on in execution after
the beginSheet... call thus workarounds are going to be convoluted.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden