Re: Alert Sheets hard wired in Interface Builder

2008-06-03 Thread John Love
Thank you everyone ... I went back to Apple Docs on Sheets and found everything you stated ... I apologize for not being a careful reader. John Love ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Re: Alert Sheets hard wired in Interface Builder

2008-06-01 Thread Nathan Kinsinger
On Jun 1, 2008, at 12:19 PM, John Love wrote: 1) I found the culprit on the sheet appearing as a separate window, and not a sheet .. you were right cause somehow the passed docWindow was apparently nil .. anyway, called my sheet routine from a different part of MyDocument.m .. and now the

Re: Alert Sheets hard wired in Interface Builder

2008-06-01 Thread Jens Alfke
On 1 Jun '08, at 11:19 AM, John Love wrote: the NSAlert is type-cast as a NSWindow when passed to my dlgEndSelector, so that "unrecognized selector" is mystifying. That's your problem, then: NSAlert isn't an NSWindow; it's a direct subclass of NSObject. Your -endCalculateSheet: method's fir

Re: Alert Sheets hard wired in Interface Builder

2008-06-01 Thread John Love
1) I found the culprit on the sheet appearing as a separate window, and not a sheet .. you were right cause somehow the passed docWindow was apparently nil .. anyway, called my sheet routine from a different part of MyDocument.m .. and now the sheet appears as a sheet. 2) the problem remaining cen

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread Jens Alfke
On 31 May '08, at 9:40 AM, John Love wrote: 2008-05-31 12:33:55.434 Calculate Medical[1926:10b] *** -[NSAlert endErrorSheet:code:info:]: unrecognized selector sent to instance 0x16ed20 That's an exception being thrown. There's no such (public) Cocoa method -endErrorSheet:code:info:, so is

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread Keary Suska
5/31/08 10:40 AM, also sprach [EMAIL PROTECTED]: > - (void) endCalculateSheet:(NSWindow*)theSheet code:(int)returnCode > info:(void*)contextInfo { > if (returnCode == NSAlertDefaultReturn) { // "Good Bye!" > > NSLog(@"Default Button clicked"); // does not log this entry > > }

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread John Love
More NSLog data: 2008-05-31 12:33:51.001 Calculate Medical[1926:10b] NSWindow does not support utility styleMask 0x10 2008-05-31 12:33:51.023 Calculate Medical[1926:10b] NSWindow does not support utility styleMask 0x10 2008-05-31 12:33:55.434 Calculate Medical[1926:10b] *** -[NSAlert endErrorShe

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread John Love
On Fri, May 30, 2008 at 3:33 PM, John Love <[EMAIL PROTECTED]<[EMAIL PROTECTED]>> wrote: > Here's some code snippets that I'm having problems with .. the code is > sorta working in that an alert *window* appears, but not as a drop-down > sheet as I think the following calls for: (and even when err

Re: Alert Sheets hard wired in Interface Builder

2008-05-28 Thread Chris Hanson
On May 27, 2008, at 9:06 PM, Jens Alfke wrote: On 27 May '08, at 1:40 PM, Kyle Sluder wrote: You're looking for +[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:], I'm not surprised the OP didn't find this … it's my candidate for Most Misplaced Cocoa Metho

Re: Alert Sheets hard wired in Interface Builder

2008-05-28 Thread Graham Cox
Here's a trivial category to address this. Whether it's really worth using is hard to say, but for what it's worth: @interface NSWindow (SheetAdditions) - (void) beginSheet:(NSWindow*) sheet modalDelegate:(id) modalDelegate didEndSelector:(SEL) didEndSelector contextInfo:(void*) contextInfo

Re: Alert Sheets hard wired in Interface Builder

2008-05-28 Thread Jens Alfke
On 28 May '08, at 8:29 PM, Scott Ribe wrote: Yes, the method could be in NSWindow and call on NSApplication to get that done, but, should a window really be able to have such a drastic effect on the events going to other windows??? It doesn't. A sheet doesn't change anything in the app's o

Re: Alert Sheets hard wired in Interface Builder

2008-05-28 Thread Kyle Sluder
On Wed, May 28, 2008 at 11:29 PM, Scott Ribe <[EMAIL PROTECTED]> wrote: > Probably because it involves the run loop and event dispatch, since the > running a window as a sheet must ensure that the window to which the sheet > is attached does not receive events, yet a click in that parent window mus

Re: Alert Sheets hard wired in Interface Builder

2008-05-28 Thread Scott Ribe
> I agree with your assessment. What business has NSApplication > providing this method? it doesn't make sense. Probably because it involves the run loop and event dispatch, since the running a window as a sheet must ensure that the window to which the sheet is attached does not receive events, ye

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Graham Cox
I agree with your assessment. What business has NSApplication providing this method? it doesn't make sense. Easy to fix with a category though. G. On 28 May 2008, at 2:06 pm, Jens Alfke wrote: On 27 May '08, at 1:40 PM, Kyle Sluder wrote: You're looking for +[NSApplication beginSheet:m

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Jens Alfke
On 27 May '08, at 1:40 PM, Kyle Sluder wrote: You're looking for +[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:], I'm not surprised the OP didn't find this … it's my candidate for Most Misplaced Cocoa Method. I've always wondered why this isn't an inst

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Kyle Sluder
On Tue, May 27, 2008 at 4:28 PM, John Love <[EMAIL PROTECTED]> wrote: > Instead of calling NSAlertSheet with sender, defaultButton etc., is there a > way to call a window sheet whose GUI is hard wired in Interface Builder. I > know that in Applescript Studio, all you have to do is provide a name f

Re: Alert Sheets hard wired in Interface Builder

2008-05-27 Thread Sherman Pendley
On May 27, 2008, at 4:28 PM, John Love wrote: Instead of calling NSAlertSheet with sender, defaultButton etc., is there a way to call a window sheet whose GUI is hard wired in Interface Builder. Sure - pretty much any window you can build in IB, can be used as a sheet. Have a look at:

Alert Sheets hard wired in Interface Builder

2008-05-27 Thread John Love
Instead of calling NSAlertSheet with sender, defaultButton etc., is there a way to call a window sheet whose GUI is hard wired in Interface Builder. I know that in Applescript Studio, all you have to do is provide a name for the sheet you wish to call and it appears. Can the same implementation s