bugGNUstep - Bugs: bug #16338, Problem creating untitled...

Group
 
 

bug #16338: Problem creating untitled documents of types other than the first file type listed with a particular document class

Submitter:  Sašo Kiselkov <diablos>
Submitted:  Thu 13 Apr 2006 06:10:46 AM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 23 Apr 2006 10:41:40 PM UTC, comment #1: 

Submitted this patch. In the long run this should be replaced by a call to one of the new Mac OSX 10.4 methods on NSDocument.

Thank you Saso!

Fred Kiefer <FredKiefer>
Group Member
Thu 13 Apr 2006 06:10:46 AM UTC, original submission:  

The problem is this:

 - suppose I have a document class Document, which handles file types "A", "B" and "C"
 - if you try to create an untitled document of type "B" or "C" (with either -[NSDocumentController makeUntitledDocumentOfType:] or -[NSDocumentController openUntitledDocumentOfType:display:]), you will always get a Document subclass, which thinks it's file type is "A" (since it's first in the list)
 - the fix is to add a -[NSDocument setFileType:] invocation in -[NSDocumentController makeUntitledDocumentOfType:] which tells the document subclass which file type has been requested.

I've attached a patch which does this.

Sašo Kiselkov <diablos>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #9776:  NSDocumentController-fileTypeFix.patch added by diablos (554B - text/x-patch - A patch which fixes the file type issue.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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
2006-04-23 FredKiefer CategoryNone Gui/AppKit
    Item GroupNone Bug
    StatusNone Fixed
    Open/ClosedOpen Closed
2006-04-13 diablos Attached File- Added NSDocumentController-fileTypeFix.patch, #9776

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code