bugGNUstep - Bugs: bug #25162, NSDocumentController won't display...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25162: NSDocumentController won't display a document already opened without display

Submitted by:  Doug Simons <theeggcamefirst>
Submitted on:  Tue 23 Dec 2008 09:47:36 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

Mon 05 Jan 2009 07:04:12 PM UTC, comment #5:

That appears to have fixed the problem for me. Thanks!! I haven't tested extensively, but I took a quick look at the code, which looks like it makes sense (the parts that I understood!).

Doug Simons <theeggcamefirst>
Sun 04 Jan 2009 10:24:03 PM UTC, comment #4:

I added some code in the line of what Wolfgang suggested to SVN, could you please test and inspect that code and report back?

And could somebody please file a bug report to Apple and complain about their documentation?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 04 Jan 2009 03:20:30 PM UTC, comment #3:

The documentation is correct on that makeWindowControllers isn't sent to an existing document in Cocoa. However, Cocoa sends makeWindowControllers to a fresh document even if the display argument of the openDocument... method is NO and this is were GNUstep is getting things wrong. The only way to suppress the creation of a window controller for a fresh document in Cocoa is by having -shouldCreateUI return NO.

Wolfgang Lux <wlux>
Wed 24 Dec 2008 12:05:46 AM UTC, comment #2:

Hmm, yes that bit of documentation seems a bit confusing. It sounds from that like the makeWindowControllers message doesn't get sent if the document is already open. Maybe showWindows should just call makeWindowControllers if the window controllers haven't already been made. Otherwise it's a pretty useless method in that case!

And yes, in Cocoa it works fine -- this method displays the document when the display flag is YES.

Doug Simons <theeggcamefirst>
Tue 23 Dec 2008 10:20:23 PM UTC, comment #1:

This is an interesting bug report, as I am currently working on this class. It is clear that what you describe is the cause of the problem, but how would we reconcile any solution with Apple's documentation where it says:

"and sends the document makeWindowControllers and showWindows messages if displayDocument is YES. If the document is already
open it is just sent a showWindows message if displayDocument is YES."

Did you test your expected behaviour on Apple? Does it work there?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue 23 Dec 2008 09:47:36 PM UTC, original submission:

NSDocumentController's openDocumentWithContentsOfFile:display: method won't display a document when the display flag is YES if the same method has been previously called with the display flag set to NO. It appears that the window controllers aren't being created in that case.

Doug Simons <theeggcamefirst>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wlux (Posted a comment)
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by theeggcamefirst (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Apr 2009 06:59:30 AM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Sun 04 Jan 2009 10:24:03 PM UTCFredKieferStatusNone=>Ready For Test
      Open/ClosedOpen=>In Test
    Tue 23 Dec 2008 10:20:23 PM UTCFredKieferAssigned toNone=>FredKiefer

    Back to the top


    Powered by Savane 3.1-cleanup1