bugGNUstep - Bugs: bug #4410, NSDocumentController's...

 
 

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

bug #4410: NSDocumentController's -application:openFile: can't work

Submitted by:  Enrico Sersale <esersale>
Submitted on:  Tue 22 Jul 2003 10:23:24 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Adam Fedor <fedor>
Open/Closed: Closed

Mon 12 Jan 2004 04:31:52 AM UTC, comment #2:

2004-01-10 Adam Fedor <fedor@gnu.org>

* orderFront fixes

Adam Fedor <fedor>
Project AdministratorIn charge of this item.
Tue 22 Jul 2003 11:54:34 AM UTC, comment #1:

A similar problem exists in Gorm. This patch fixes it.

--- Gorm.m 2003-07-22 14:50:26.000000000 +0300
+++ Gorm.m_copy 2003-07-22 14:50:47.000000000 +0300
@@ -1242,7 +1242,8 @@
}
else
{
- [[doc window] makeKeyAndOrderFront: self];
+ [[doc window] orderFrontRegardless];
+ [[doc window] makeKeyWindow];
}

return (doc != nil);

Enrico Sersale <esersale>
Project Member
Tue 22 Jul 2003 10:23:24 AM UTC, original submission:

If you take a not document-based application, for example ImageViewer, you will see that -application:openFile: is implemented in the app controller, in this case "AppController.m".
When the app is not active and an other app or tool calls its -application:openFile: through DO, ImageViewer creates a new window and shows it:
[window orderFrontRegardless];
[window makeKeyWindow];
[window display];

this doesn't work for document-based applications, because -application:openFile, implemented in NSDocumentController, calls -showWindow: in NSWindowController. And NSWindowController's -showWindow: calls -makeKeyAndOrderFront: for its window.
But NSWindow's -makeKeyAndOrderFront: returns without doing anything if, as in this case, the app is not active. And the new window is newer shown.

Enrico Sersale <esersale>
Project Member

 

No files currently attached

 

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 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 12 Jan 2004 04:31:52 AM UTCfedorItem GroupNone=>Bug
  StatusNone=>Fixed
  Assigned toNone=>fedor
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1