[Drawkit] mMainDrawingView outlet connection when using DKDrawingDocument subclass

Allan Daly allandaly at me.com
Thu Jul 2 06:03:35 PDT 2009


Thanks (as always) for your quick reply, Graham.

Dragging MyDocument.h into Interface Builder made no improvement, but  
dragging in DKDrawingDocument.h from the headers folder of the XCode  
'Frameworks/Linked Frameworks' tree into Interface Builder did. I  
guess that was enough to get it to refresh/rebuild/whatever and  
trigger the connection. That's a good tip to know about.

Linking in the DK framework as I described does not produce any  
startup or build errors. Is what you're saying below that if you want  
to actually be able to debug down into the framework (set breakpoints,  
etc) then you need the common build products location? I haven't run  
across the need for this yet but I'll give that a try if I do.

-Allan


On Jul 1, 2009, at 11:23 PM, Graham Cox wrote:

>
> On 02/07/2009, at 3:59 PM, Allan Daly wrote:
>
>> 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?
>
> I don't think so. It sounds like you've done the right thing setting  
> up the project and linking the framework.
>
>> Since MyDocument is a subclass of DKDrawingDocument, should the  
>> IBOutlets defined in the superclass be available through the  
>> subclass?
>
> Yes, they should.
>>
>> I'm probably missing something very basic and easy here. I hope one  
>> of you can point it out for me.
>>
>
> I think it could be something as simple as IB not always picking up  
> the files - maybe it can't automatically do that with framework  
> classes. (?) But anyway, try dragging DKDrawingDocument.h into IB's  
> main window. That will cause it to reparse the header and hopefully  
> you should then see the outlet. If it still doesn't show up, let me  
> know and I'll have another think.
>
> Another thought occurs - since IB is now more tightly integrated  
> with Xcode, it may be relying on certain file locations to find  
> things. For debugging, you need to set up the project so that there  
> is a common build location for both DK and the app you're building -  
> IB may be relying on that. A sure symptom of that not working is  
> when you run your app from Xcode it barfs on launch with a  
> 'framework not found' error. To solve this, open the project build  
> settings and add this under 'Build Products Path'  ../../../DrawKit/ 
> Trunk/Source/build  (you may need to change the exact path depending  
> on how your app project is organised - this is mine because my app  
> follows the same structure as DK itself with {Dev Folder}/MyApp/ 
> Trunk/Source and DK is also inside the {Dev Folder}, so I back up to  
> there and then back down again (heaven help me if I decide to  
> reorganise!).
>
> This has the side effect of dumping your app builds into DK's build  
> folder, but this seems to be how Xcode 3+ wants you to do things.
>
> --Graham
>
>
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net



More information about the Drawkit mailing list