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

Group
 
 

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

Submitter:  Doug Simons <theeggcamefirst>
Submitted:  Tue 23 Dec 2008 09:47:36 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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>
Group Member
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-04-08 FredKiefer StatusReady For Test Fixed
        Open/ClosedIn Test Closed
    2009-01-04 FredKiefer StatusNone Ready For Test
        Open/ClosedOpen In Test
    2008-12-23 FredKiefer Assigned toNone FredKiefer

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code