• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Text field that takes hexadecimal values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text field that takes hexadecimal values


  • Subject: Text field that takes hexadecimal values
  • From: Neil Baylis <email@hidden>
  • Date: Fri, 7 Oct 2005 08:23:59 -0700

I've figured out how to write a hexadecimal value from my controller
object into a text field in the UI.

How do I get the value from a text field into an integer, interpreted
as hex instead of decimal?

I.e., is there a hex equivalent of intValue?

Currently I'm doing this: [node setNid:[nodeId intValue]];

But I want to do this: [node setNid:[nodeId intHexValue]];

It's hard to find anything about this in the documentation. There's
plenty about $ signs and floating point etc., but nothing about hex.
Do I need to first get the value as a C string, and then use sscanf()
to convert it? Seems clunky. Is there a better way?

Thanks
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Context menu for NSTableView cell
  • Next by Date: Re: Context menu for NSTableView cell
  • Previous by thread: Re: Context menu for NSTableView cell
  • Next by thread: [Meeting] Next CocoaHeads: Oct 11 (Portland), Oct 13 (PIT, STL, BOS, SiliconValley)
  • Index(es):
    • Date
    • Thread