[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sending messages to objects
From: |
Peter Karlsson |
Subject: |
Sending messages to objects |
Date: |
Mon, 03 Mar 2003 12:45:16 +0000 |
I have a question about sending messages to objects.
In my code snippet I send a message to a button, telling it to change the
title to 'newtitle'. So what happens is that the button I press changes the
title. This is just an example so don't ask me why I did it that way :-).
The question is: How do I change the title on the button from another place
in my code? In this example I use sender as the reciever. It must be
possible to give the button a name, right? But how? Outlets?
- (IBAction)buttonAction:(id)sender
{
NSString *name = @"newtitle";
[sender setTitle:name];
}
Best regards Peter
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
- Sending messages to objects,
Peter Karlsson <=