• 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
Problem with NSHost
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with NSHost


  • Subject: Problem with NSHost
  • From: Arthur VIGAN <email@hidden>
  • Date: Tue, 18 Feb 2003 20:20:25 +0100

Hi,

I am trying to display the current IP of a Mac in a menu using:

NSHost *host = [NSHost currentHost];
NSString *ipAddress = [host address];

It's working well when I use it once, but if I disconnect, or if the IP changes, I always get the same IP from NSHost.
I tried to use [NSHost setHostCacheEnabled:NO] or [NSHost flushHostCache], but it didn't change anything...
Any idea to have it working?

Thanks in advance,

-- Arthur
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: RE: loading nib from jnilib - now java from cocoa!
  • Next by Date: Re: AddressBook searching broken in 10.2.4
  • Previous by thread: RE: loading nib from jnilib - now java from cocoa!
  • Next by thread: SomebodyPleaseHelpMe - sample Java bridge test
  • Index(es):
    • Date
    • Thread