如何从文档nib访问主要笔记本中的项目? [英] How to access items in the main nib from a document nib?

查看:176
本文介绍了如何从文档nib访问主要笔记本中的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个基于NSDocument的应用程序,其中有一个检查窗口。这个检查窗口是Pwnshop.nib的一部分,这是我的主要笔尖。我有另一个名为Document.nib的nib,它是文档窗口。我想能够改变检查器基于哪个文档窗口是活动的,sorta像Interface Builder的检查器。问题是我想访问另一个nib 中的对象。注意,有多个文档窗口,但只有一个检查器窗口。

I'm making an NSDocument-based application in which I have an inspector window. This inspector window is part of Pwnshop.nib which is my main nib. I have another nib called 'Document.nib,' which is the document window. I want to be able to change the inspector based on which document window is the active one, sorta like Interface Builder's inspector. The problem is that I want to access an object in another nib. Note that there are multiple document windows, but only one inspector window.

有人可以帮助我吗?

推荐答案

我可以推荐这个文章(均来自 Cocoa与爱),了解如何构建Cocoa项目的基本课程。他们将回答您的所有问题,并让您开始走正确的方式建立应用程序。

I can recommend both this and this article (both from Cocoa with Love) for a fundamental lesson in how to structure a Cocoa project. They will answer all of your questions and get you started on a path to building applications the right way.

这篇关于如何从文档nib访问主要笔记本中的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆