Skip navigation.
 
mlRe: -stringValue on NSTextfield does not reflect actual contents [SOLVED]
FROM : Philip Dow
DATE : Tue Jul 25 21:52:45 2006

> Also, on a different topic, I realize this conversation has been held
> before, but I find it very odd behaviour to begin a sheet with 
> beingSheet:
> (which makes it window-modal, automatically) and then suddenly call
> runModelForWindow: on the sheet (which makes it app-modal). If you 
> wanted an
> app-modal window, why did you summon a sheet? The standard UI is that
> stand-alone dialogs are app-modal, sheets are window-modal. m.


Thinking about it, I saw it done this way somewhere else. A search, 
and I believe my reason lies in "Presenting a Series of Sheets," part 
of the "Sheets" documentation.

file:///Developer/ADC%20Reference%20Library/documentation/Cocoa/
Conceptual/Sheets/index.html#//apple_ref/doc/uid/10000002i

   - (void)showMoreInfo: (NSWindow *)window
   // User has asked for more information about the delete. Display it.
   {
       if (!moreInfoSheet)
           [NSBundle loadNibNamed: @"DeleteExpenseInfo" owner: self];
       [NSApp beginSheet: moreInfoSheet
               modalForWindow: window
               modalDelegate: nil
               didEndSelector: nil
               contextInfo: nil];
       [NSApp runModalForWindow: moreInfoSheet];
       // Sheet is up here.
       [NSApp endSheet: moreInfoSheet];
       [moreInfoSheet orderOut: self];
   }

A cursory look at the documentation suggests this code presents the 
second in a series of sheets. At some point, I know I needed to do 
this. Yeah, I can even say where. I believe I started copy/pasting 
that code into other objects and eventually it became my standard way 
of going about a sheet. I've never noticed a difference while the 
application is actually running, so I haven't investigated it further.

-Phil

Related mailsAuthorDate
mlRe: -stringValue on NSTextfield does not reflect actual contents [SOLVED] Matt Neuburg Jul 24, 19:05
mlRe: -stringValue on NSTextfield does not reflect actual contents [SOLVED] Philip Dow Jul 25, 21:52