Skip navigation.
 
mlCrazy Behind the Scenes Hard-wiring in AppKit?
FROM : Seth Willits
DATE : Thu Dec 09 23:12:50 2004

Here's a strange one:

Realizing that I couldn't use existing document classes to accomplish 
tabbed documents, I started writing my own classes from scratch and 
have been working on it off and on when I have a few minutes of free 
time. Today I just noticed that if use the Document Types list in the 
target's Properties view, somehow AppKit watches for instances of those 
classes to be created and automatically calls methods on those classes 
(methods like makeWindowControllers, _handleDocumentFileChanges, 
isDocumentEdited), regardless of whether they're subclasses of 
NSDocument or not.

How weird is that? Or is it at all? I simply want to make a group of 
classes so that I can contain multiple documents within a single view, 
but on my path to doing so I'm finding a couple of short-circuit paths 
that AppKit is taking to make normal document applications simpler to 
write. However, it seems that they are imposing limitations on my own 
application which has nothing to do with the standard document classes.

I could just not use the document types list, but how else then is 
Finder supposed to know my application works with those documents?



Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"All is not gold that glitters."
    -- Miguel de Cervantes
------------------------------------------------------------------------
---

Related mailsAuthorDate
mlCrazy Behind the Scenes Hard-wiring in AppKit? Seth Willits Dec 9, 23:12
mlCrazy Behind the Scenes Hard-wiring in AppKit? Seth Willits Dec 10, 03:27
mlRe: Crazy Behind the Scenes Hard-wiring in AppKit? R. Scott Thompson Dec 10, 05:45
mlRe: Crazy Behind the Scenes Hard-wiring in AppKit? Seth Willits Dec 10, 06:16