小编And*_*rea的帖子

使用三个相关的NSPopUpButton在CoreData中设置值

我希望用适当的条款表达自己.

我有三个实体:客户,国家,.与国家状态,有两种关系.所以我可以创建一些国家并选择其中一个我可以创建属于它的一些.

为了创建实体"客户"的界面,我把三个NSPopUpButton's:

  • 第一个选择国家,
  • 第二个显示与所选国家/地区相关的.
  • 最后一个显示与所选州相关的邮政编码.

我的问题是我无法通过所选NSPopUpButton实体"客户" 传递数据.NSPopoUpButton通过绑定工作:

  • 内容(绑定到:country,arrangeObjects),
  • 内容值(绑定到:country,arrangeObjects,model key:country),
  • 选定的索引(绑定到:country,selectionIndex).

我该怎么做才能确保三者选择的数据NSPopUpButton's记录在实体"客户"的相应字段中?

xcode core-data nsarraycontroller

13
推荐指数
1
解决办法
433
查看次数

占位符和NSLocalizedString

我正在尝试翻译我的应用程序,当有半个占位符时,我发现很难翻译.我需要找到以下代码:

[textView1 insertText:[NSString stringWithFormat:@"%@ è il %i/%i/%i. Il giorno delle settimana è %@. La Festa è compresa nel calcolo. \n", nomeFesta, giornoFesta, meseFesta, annoFestaModificato, ggSett]];
Run Code Online (Sandbox Code Playgroud)

我把文件localizable.string(英文):

"festaCompresa" = @"%@ is the %i/%i/%i. the day of the week is %@. The holidays is included in the calculation. \n";
Run Code Online (Sandbox Code Playgroud)

然后我编辑了这段代码:

[textView1 insertText:[NSString stringWithFormat:NSLocalizedString(@"festaCompresaW, @""), nomeFesta, giornoFesta, meseFesta, annoFestaModificato, ggSett]];
Run Code Online (Sandbox Code Playgroud)

这是行不通的.

cocoa objective-c nslocalizedstring

6
推荐指数
2
解决办法
1716
查看次数

Take an action when user switches tabs on an NSTabView

I have an application that contains an NSTabView. Whenever the user changes tabs, I need to run an operation. How can I do that?

cocoa objective-c nstabview

2
推荐指数
1
解决办法
1956
查看次数