NSRangePointer trouble!


hi

i'm trying write method returns nsrangepointer, i'm getting garbage values back. when method part of same object that's calling it, works fine. when method part of object doesn't. can help?

method:
myobject
code:
  -(bool)test:(nsrangepointer)range {      range->length = 6;      range->location = 1;      return yes;  }  
getting range pointer:
adifferentobject
code:
  nsrange charrange;  [myobjectinstance test:&charrange];  nslog(@"test range: %@",nsstringfromrange(charrange));  
the output like: test range: {140734799801952, 4300215136}

thanks!
 

seems problem basics of c. calling value. need call reference.
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Rogue - the old text based game. I can't find it!

RAID in Early 2009 Mac Pro

NBC Releases Summer Olympics iOS Apps, Offering Livestreaming of All 302 Events