Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 7, 2009, 03:10 AM   #1
medasmx
macrumors member
 
Join Date: Nov 2008
nsmatrix - calculator

Below is code for a basic ten button nsmatrix(of numbers), which should output the number to a text-field. The difficulty I am having is setting the ibaction (mytextoutput) to the matrix -- I can't do it in the IB. It only allows myMatrix to be set to the matrix, Do I need to do this programatically. I have tried to read about tags but not getting anywhere. The program runs without errors but when pushing buttons nothing happens. Thanks. Adam.

#import <Cocoa/Cocoa.h>


@interface AppController : NSObject {
IBOutlet NSTextField*myTextField;
IBOutlet NSMatrix*myMatrix;
}
-(IBAction)myTextOutputid)sender;

@end

#import "AppController.h"


@implementation AppController

-(IBAction)myTextOutputid)sender
{
[myTextField setStringValue:[[NSMatrix selectedCell]title]];
}

@end
medasmx is offline   0 Reply With Quote
Old Apr 7, 2009, 05:03 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
What do you mean you can't do it? When you control-drag from the matrix to your controller, do you see your myTextOutput: method show up in the list?
kainjow is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
What's 0 - -2^2 on your Calculator ? OSMac Community Discussion 7 Oct 15, 2013 09:57 PM
Want a really good calculator? trudnai iPhone and iPod touch Apps 0 Mar 11, 2013 06:55 PM
Calculator Monster jessica-sor iPhone and iPod touch Apps 5 Jan 25, 2013 07:42 PM
Crazy Calculator Full--Change the way you use calculator wwssttt iPad Apps 0 Dec 30, 2012 06:37 AM
Which calculator app are your using ? idea2real iPhone and iPod touch Apps 13 Oct 18, 2012 01:27 AM

Forum Jump

All times are GMT -5. The time now is 07:32 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC