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

 
 

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

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

Submitted by:  Sašo Kiselkov <diablos>
Submitted on:  Thu 13 Apr 2006 06:10:46 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

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>
Project 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>

 

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

 

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
Sun 23 Apr 2006 10:41:40 PM UTCFredKieferCategoryNone=>Gui/AppKit
  Item GroupNone=>Bug
  StatusNone=>Fixed
  Open/ClosedOpen=>Closed
Thu 13 Apr 2006 06:10:46 AM UTCdiablosAttached File-=>Added NSDocumentController-fileTypeFix.patch, #9776

Back to the top


Powered by Savane 3.1-cleanup1