[Drawkit] mMainDrawingView outlet connection when using DKDrawingDocument subclass

Allan Daly allandaly at me.com
Wed Jul 1 22:59:06 PDT 2009


I'm wondering if anyone can help me with something that seems like it  
should be easy but has got me stumped ...

I'm starting a document-based application that uses DK. I'm  
subclassing DKDrawingDocument and I understand that I need to hook up  
the IBOutlet DKDrawingView * mMainDrawingView to the DKDrawingView in  
Interface Builder, but for some reason this outlet does not show up in  
IB and I cannot figure out how to make that connection.

Here are the steps I'm taking.

1) Create new XCode project ... Cocoa Document Based Application.

2) Add in the GCDrawKit.framework as a linked framework by right- 
clicking on the 'Linked Frameworks' folder and choosing 'Add Existing  
Framework' then navigating to the debug release version DK that I have  
compiled previously.

3) Add a 'Copy Files' build phase to the application target, and set  
the destination of this copy phase to the 'Frameworks' area of the  
bundle. Then I drag the DK framework that I linked in step (2) into  
this build phase.

4) Open MyDocument.h (created by default as part of the 'New Project'  
process) and edit this so that MyDocument is a subclass of  
DKDrawingDocument.

5) Open up MyDocument.xib in IB and clear out the dummy content then  
drop a custom view on top of that.

6) I set the class of the custom view to be DKDrawingView using the  
inspector identity tab.

7) I set the class of the File's Owner to be MyDocument using the  
inspector identity tab.

At this point I would have thought that the IBOutlet defined for  
mMainDrawingView would now be available to connect to in the File's  
Owner list since MyDocument is a subclass of DKDrawingDocument. But  
it's not.

Is the way that I'm linking in the DK framework causing problems?
Since MyDocument is a subclass of DKDrawingDocument, should the  
IBOutlets defined in the superclass be available through the subclass?

I'm probably missing something very basic and easy here. I hope one of  
you can point it out for me.

Thanks a lot.

-Allan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20090701/2d0931a3/attachment.htm>


More information about the Drawkit mailing list