开发者

Connect Outlets to an Array

Today I was writing a Sudoku Solver and I had everything needed already coded. But now I have a big problem with the UI: How can I connect multiply NSTextFields (81) to an Array inside an object. I already heard about the Array Controller, but I think 开发者_如何学Pythonthat isn't the right thing.

Thanks, Leo


Don't. Just give them each a unique tag and set their action. The action can use its sender parameter to retrieve the tag and figure out which field changed. Or, if you want to find a particular field (say, to set the contents from a saved puzzle), use -viewWithTag: to find the one you're looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜