|Sep 9, 2006, 08:59 AM||#1|
NSMatrix simple question
I am trying to create a calculator in Cocoa. So far, I have the parser ready (made in C++) but my problem lies into building the interface. This is a screenshot of my interface so far (very primitive).
All I want to do is to press a button and have its name appeared into the NSTextField. I could do that by making 10 different functions for each button, but I thought that an NSMatrix would help, so these 10 buttons you see are all NSMatrix.
My question is: How do I take the value of each button pressed in the NSMatrix so that I can display it into the textfield?
(of course there are many ways to do it... but I want to know the way which is more flexible).
Last edited by Soulstorm; Sep 9, 2006 at 09:05 AM.
|Sep 9, 2006, 09:20 AM||#2|
Am I creating a memory leak here?
I think I made it, but I think that I am creating a memory leak. Can you check the function that updates the nstextfield? Am I creating a memory leak there?
|Sep 9, 2006, 01:54 PM||#3|
As far as memory leaks go, you're fine. For reference, here's the line you're referring to:
[theText setStringValue:[[theText stringValue] stringByAppendingString:[[theMatrix selectedCell] title]]];
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Simple Domain Question||MathBunny123||Windows, Linux & Others on the Mac||3||Mar 15, 2014 02:02 PM|
|Simple question??||davidra||Apple TV and Home Theater||5||Jan 21, 2014 02:19 PM|
|Resolved: Question about a simple restore||aDRock1154||iPhone Tips, Help and Troubleshooting||2||May 8, 2013 07:09 AM|
|Simple WordPress question.||definitive||Web Design and Development||1||Jan 22, 2013 08:52 AM|
|Simple Question...HD or Proxy||joeysarks||Digital Video||9||Oct 15, 2012 03:04 AM|
All times are GMT -5. The time now is 07:00 AM.