In addition to what Alex said...
On Jul 9, 2008, at 3:12 PM, Kevin Walzer wrote:
-(IBAction)getCount:(id)sender
{
NSString *string = [textField stringValue];
int *stringLength = [string length]; //warning: initialization
makes pointer from integer without a cast
This declares stringLength as a pointer to an int. You don't want it
to be a pointer, it should just be an int. So, remove the asterisk.
For somebody learning C and Objective-C at the same time, it can be
confusing. On the one hand, most Objective-C objects are stored into
explicit pointer variables (except "id" where the pointerness is
implicit). On the other hand, many of the C standard types are not
pointers to objects -- they are just "scalars". I think you need to
review the basics of C.
[textLabel setStringValue:@"\"[EMAIL PROTECTED]" is %d characters long", string,
stringLength]; //error: too many arguments to function
'setStringValue:'
NSLog(@"%@", string);
}
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]