This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes iOS and the fly likes Problem with NSString stringByExpandingTildeInPath method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Mobile » iOS
Bookmark "Problem with NSString stringByExpandingTildeInPath method" Watch "Problem with NSString stringByExpandingTildeInPath method" New topic
Author

Problem with NSString stringByExpandingTildeInPath method

Alexandre Baldo
Ranch Hand

Joined: Aug 04, 2006
Posts: 48
Hi! I just began to study Objective-C and I am not an expert in MAC OS either.

I'm trying to use the stringByExpandingTildeInPath:



It would be expected for this method to return the String "/Users/baldo" (suppose my user is 'baldo'). But the NSLog just prints '~'.

What I am doing wrong?

Thank you!


...ops!<br>-----------------<br>
SCJD<br>
SCWCD 1.4<br>
SCJP 1.4
Daniel Abramowicz
Greenhorn

Joined: Feb 10, 2011
Posts: 3
I am having the same problem.

Why doesn't it expand the tide?
Daniel Abramowicz
Greenhorn

Joined: Feb 10, 2011
Posts: 3
I Can't believe it took HOURS for me to solve this

That's why I hate apple

the problem is that there are apparently 2 different characters for the "~"... one of them is a small tide like the one that appears over the "a" in "ã" and the other one is in the center and bigger, like "~".
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Daniel Abramowicz wrote:I Can't believe it took HOURS for me to solve this

That's why I hate apple

the problem is that there are apparently 2 different characters for the "~"... one of them is a small tide like the one that appears over the "a" in "ã" and the other one is in the center and bigger, like "~".

Where is Apple's fault?
Daniel Abramowicz
Greenhorn

Joined: Feb 10, 2011
Posts: 3
It`s actually Unix fault...

That's OK since I don't like linux either :P


(only one ~ in windows)
 
 
subject: Problem with NSString stringByExpandingTildeInPath method