Chromium Tabs in Cocoa (Outlets turning up NULL from 'TabContents.xib')

别说谁变了你拦得住时间么 提交于 2019-12-24 19:20:07

问题


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) and CTTabContentsController (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 of ppDocument I'm adding to the XIB), but it doesn't work and the outlet instances show up (intermittently) as NULL 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 from ppDocumentController, as well as one from ppDocument to ppDocumentController)


回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!