• 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
Re: UInt8 > NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UInt8 > NSString


  • Subject: Re: UInt8 > NSString
  • From: Jones Curtis <email@hidden>
  • Date: Mon, 5 Mar 2007 08:52:51 -0500

On Mar 5, 2007, at 08.47.48, Dominik Pich wrote:

Easiest would be to modify the method to return a NSString, I think.

Code:
--------
NSString mainMacAddress()
{
kern_return_t kernResult = KERN_SUCCESS; // on PowerPC this is an int (4 bytes)
io_iterator_t intfIterator;
UInt8 MACAddress[kIOEthernetAddressSize];
NSString string;
kernResult = FindEthernetInterfaces(&intfIterator);
...
return string;
}

Change that line:

	NSString string;

to

	NSString * string;

and you'll be in business. Probably wouldn't hurt to initialize it ("= nil") at the same time, too.


-- Curtis Jones email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >shortcut for selecting in NSPopUpButton (From: email@hidden)
 >UInt8 > NSString (From: arri <email@hidden>)
 >Re: UInt8 > NSString (From: Dominik Pich <email@hidden>)

  • Prev by Date: Re: UInt8 > NSString
  • Next by Date: Re: UInt8 > NSString
  • Previous by thread: Re: UInt8 > NSString
  • Next by thread: Re: UInt8 > NSString
  • Index(es):
    • Date
    • Thread