This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with NSString stringByExpandingTildeInPath method

 
Alexandre Baldo
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

 
Daniel Abramowicz
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problem.

Why doesn't it expand the tide?
 
Daniel Abramowicz
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It`s actually Unix fault...

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


(only one ~ in windows)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic