问题
I'm struggling to use Chromium Tabs in Cocoa and I really seem to be missing something.
I've subclassed
CTBrowserWindowController
(ppEditor
),CTBrowser
(ppDocumentBrowser
),CTTabContents
(ppDocument
) andCTTabContentsController
(ppDocumentController
)Editor creates new Documents by :
[self addTabContents:(ppDocument*)doc];
(and I've also tried first adding a Document Controller for the specific document first, but this doesn't work either)I'm connecting my outlets from
TabContents.xib
(either to File Owner :ppDocumentController
or to an instance ofppDocument
I'm adding to the XIB), but it doesn't work and the outlet instances show up (intermittently) asNULL
pointers.
So, what could be going wrong?
NOTE :
When connecting actions (either to the ppDocument class, or the ppDocumentController), these - weirdly so - do work....
There is some cross-referencing between classes (e.g. there is a pointer to
ppDocument
fromppDocumentController
, as well as one fromppDocument
toppDocumentController
)
回答1:
Problem solved.
Although, I have no idea how - I basically did the whole thing from scratch and ooops, it worked (I must have missed something in the first place...)
来源:https://stackoverflow.com/questions/9774862/chromium-tabs-in-cocoa-outlets-turning-up-null-from-tabcontents-xib