Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bguy

macrumors newbie
Original poster
May 30, 2009
28
0
I want to create a two dimensional array of textfields in order to allow them to "understand" their relationship with one another. My first thought was to have a method that would take two inputs and return the correct textfield, but it doesn't allow textfields to be used as a method type. How can I do this?
 
I want to create a two dimensional array of textfields in order to allow them to "understand" their relationship with one another. My first thought was to have a method that would take two inputs and return the correct textfield, but it doesn't allow textfields to be used as a method type. How can I do this?

You do know the difference between say "NSTextField" and "NSTextField *" ?
 
I want to create a two dimensional array of textfields in order to allow them to "understand" their relationship with one another. My first thought was to have a method that would take two inputs and return the correct textfield, but it doesn't allow textfields to be used as a method type. How can I do this?

Post your code. We can't debug descriptions of malfunctioning code.
 
AI Coding Help

I solved it, I accidently had a constant where a variable should have been. It works well now.
 
One way is to assign values to the tag attribute (an int) on your text fields. Then you can pass around an int variable if you want (and use it in switch statements).

Also, by convention in Objective-C, method and variable names begin with a lowercase letter. An uppercase name typically denotes a class. It's not incorrect (won't result in an error), but it'll look odd to an Obj-C programmer trying to read it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.