Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-10-2011, 06:23 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 53
thehindutimes is on a distinguished road
Default scemantics question

Can anyone tell me what it wants me to do here?
I've tried : and , but it won't work. What am I supposed to put at the (here)?

[orderComposer setMessageBody:@"%i", [[order objectAtIndex:i]integerValue ] (here) isHTML:NO]; error "expected :"



Thanks!

Last edited by thehindutimes; 09-10-2011 at 06:56 AM.
thehindutimes is offline   Reply With Quote
Old 09-10-2011, 07:13 AM   #2 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: Ypsilanti, Michigan
Age: 63
Posts: 1,549
RLScott is on a distinguished road
Default

Quote:
Originally Posted by thehindutimes View Post
Can anyone tell me what it wants me to do here?
I've tried : and , but it won't work. What am I supposed to put at the (here)?

[orderComposer setMessageBody:@"%i", [[order objectAtIndex:i]integerValue ] (here) isHTML:NO]; error "expected :"



Thanks!
The problem is that setMessageBody only takes a NSString parameter. It does not do formatting, like with the %i. You will have to prepare a formatted NSString first and pass that to the method. See NSString stringWithFormat.
RLScott is offline   Reply With Quote
Old 09-10-2011, 09:32 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 53
thehindutimes is on a distinguished road
Default

Like this?

[orderComposer setMessageBody:@"%@", mailString isHTML:NO];

Cause that doesn't work, even if I put mailString within []
thehindutimes is offline   Reply With Quote
Old 09-10-2011, 11:08 AM   #4 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 577
Speed is on a distinguished road
Default

The method accepts an NSString and not the format parameters that you are trying to add. Look at the [NSString stringWithFormat:] method and try to pass that in.
Speed is offline   Reply With Quote
Old 09-10-2011, 11:17 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 53
thehindutimes is on a distinguished road
Default

Got it, thanks!
thehindutimes is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 412
9 members and 403 guests
apatsufas, Eclectic, fiftysixty, JackReidy, teebee74, tim0504, UMAD, yomo710, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,904
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:01 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0