New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

need help from a programmer


Post Reply New Thread Subscribe

 
Thread Tools
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
how do i write Vbcrlf (It's from visual basic) at coaca?

vbcrlf put texts under each other
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,496
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
For logging using "NSLog", the newline, carriage return is added for you automatically..

The vbCrLf command basically adds a Carriage Return, and Line Feed..

What are you trying to do?

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
i want to write"Hey" then press button then it shows,then write "What's up?" and press button,then i get this
----------
hey
what's up?
----------
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,496
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
So you are trying to do a command line program in Cocoa?

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
i don't know what do you mean but if you know something about visual basic tell me what does VBCRLF equal in cocoa
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,817
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
A carriage return is accomplished by using \r and a line break is \n.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
okay i tried to write "\n" but it gave me choices on of them was Nsstring/Nstring. so it's not purely \n xD.could you write an exist code for me?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,817
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
You put \r and \n within the confines of your string. So, a string might look like the following:
Code:
NSString *myString = @"My String\n";
That would produce:
Code:
My String
<new line>

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
Quote:
Originally Posted by vansmith View Post
You put \r and \n within the confines of your string. So, a string might look like the following:
Code:
NSString *myString = @"My String\n";
That would produce:
Code:
My String
<new line>
thanks a lot. you helped me a lot. you are the first guy who gave me the right answer for my questions xD
QUOTE Thanks
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
well,rigth now i'm stuck xD . i want to connect to commands with each other :S
i want to say ( X + _"Something" .stringvalue; so how is it?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,817
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Can you reword that? I'm not sure I understand what you're trying to do.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,496
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
To concatenate two strings, you have a couple of options. One is to use to use a NSMutableString, and the other is to string with the NSString, but create a new one..

So for example..
Code:
NSString *first = @"Hello ";
NSString *second = @"World";

NSString *result = @"";
result = [result stringByAppendingString:first];
result = [result stringByAppendingString:second];
The NSString result now contains "Hello World" in it..

The second option is
Code:
NSString *second = @"World";
NSMutableString *result = @"Hello ";

result = [result appendString:first];
The NSMutableString result now contains "Hello World".

You might want to read up on Mutable and Immutable objects and see the pros and cons about using one over the other..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
Yodda_Hunter

 
Member Since: Jun 08, 2013
Location: Būr said,Egypt
Posts: 158
Yodda_Hunter is on a distinguished road
Mac Specs: MacBook Pro (i5)

Yodda_Hunter is offline
Quote:
Originally Posted by vansmith View Post
You put \r and \n within the confines of your string. So, a string might look like the following:
Code:
NSString *myString = @"My String\n";
That would produce:
Code:
My String
<new line>
that's what i wanted but no exactly, i wanna variable instead of constants
QUOTE Thanks

Post Reply New Thread Subscribe


« need help with that problem | Building Android on a MBP (need help with an error) »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
LF programmer Esfruga iOS Development 0 07-20-2011 08:55 PM
Need iPhone & iPad App Programmer wallstreet iOS and Apps 0 06-24-2010 12:40 AM
Looking For (occasional) iPhone App Module Programmer cobol85 iOS and Apps 0 06-11-2010 11:57 PM
Pear-PC programmer died fabio Apple Rumors and Reports 21 07-12-2004 01:21 AM
Programmer aims to crack iTunes DRM Murlyn iPod Hardware and Accessories 2 11-25-2003 07:16 PM

All times are GMT -4. The time now is 01:58 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?