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

italiano40

macrumors 65816
Original poster
Oct 7, 2007
1,080
0
NY
error: void value not ignored as it ought to be

what should i do here is the code
Code:
NSString *ip=[ipaddresstextbox selectText:self];
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
You're assigning the result of a void function to an NSString *. The error means "that thing returns nothing, so you can't assign it to something". From:
http://developer.apple.com/document...//apple_ref/occ/instm/NSTextField/selectText:

"selectText:
Ends editing and selects the entire contents of the receiver if it’s selectable.

Code:
- (void)selectText:(id)sender
"

selectText returns void. I think you want stringValue.

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.