开发者

Connect Outlets to an Array

开发者 https://www.devze.com 2023-03-24 20:43 出处:网络
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 al

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

精彩评论

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