• 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: SCNetworkConnection - Dictionary/Subdictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCNetworkConnection - Dictionary/Subdictionary


  • Subject: Re: SCNetworkConnection - Dictionary/Subdictionary
  • From: Stefan Lehrner <email@hidden>
  • Date: Wed, 3 Oct 2007 21:40:27 +0200

Hi,

I have adapted this and now it is compiling correct - but the result in terminal is not working correct:

NSDictionary *tmpDict = [NSDictionary dictionaryForKey:@"SCNetworkConnectionCopyExtendendStatus(scncRef)"];

id i = [[tmpDict objectForKey:@"PPP"] objectForKey:@"ConnectTime"];
if( i!= nil)
printf("%i\n", [i intValue]);
else
printf("nicht verbunden\n");


Terminal output:

iBook-G4:~/stats/build/Debug sl$ ./stats -t
Time
2007-10-03 21:39:47.110 stats[3160] *** _NSAutoreleaseNoPool(): Object 0x50cd10 of class NSCFString autoreleased with no pool in place - just leaking
2007-10-03 21:39:47.111 stats[3160] *** +[NSDictionary dictionaryForKey:]: selector not recognized
2007-10-03 21:39:47.112 stats[3160] *** _NSAutoreleaseNoPool(): Object 0x50db90 of class NSCFString autoreleased with no pool in place - just leaking
2007-10-03 21:39:47.112 stats[3160] *** _NSAutoreleaseNoPool(): Object 0x50e220 of class NSCFString autoreleased with no pool in place - just leaking
2007-10-03 21:39:47.113 stats[3160] *** _NSAutoreleaseNoPool(): Object 0x50e200 of class NSException autoreleased with no pool in place - just leaking
2007-10-03 21:39:47.113 stats[3160] *** Uncaught exception: <NSInvalidArgumentException> *** +[NSDictionary dictionaryForKey:]: selector not recognized
Trace/BPT trap
iBook-G4:~/stats/build/Debug sl$


I don*t have a clue how to handle this...

thanks for your help,

Stefan


serialport c

On Oct 3, 2007, at 8:25 PM, Stefan Lehrner wrote:

Hi,

can someone please help me?

I need to get the  "ConnectTime"  from the
Dictionary "SCNetworkConnectionExtendedStatus" subdirectory "PPP"

Sorry, I have no idea how to fetch this... I tried


id a = [[SCNetworkConnectionCopyExtendedStatus objectForKey:@"PPP"] objectForKey:@"ConnectTime"];
if (a != NULL) {
printf ("%i\n", [a intValue]);
}
else {
printf ("nicht verbunden\n");
}


But it compiled with an error message: /Users/sl/stats/stats.m:85: warning: invalid receiver type '¿¿v'

Maybe someone can bring into the darkness?

Thanks for your help,

Stefan


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: SCNetworkConnection - Dictionary/Subdictionary
      • From: Hal Mueller <email@hidden>
References: 
 >SCNetworkConnection - Dictionary/Subdictionary (From: Stefan Lehrner <email@hidden>)

  • Prev by Date: Re: Should I be trying to use bindings for this?
  • Next by Date: Re: Should I be trying to use bindings for this?
  • Previous by thread: SCNetworkConnection - Dictionary/Subdictionary
  • Next by thread: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Index(es):
    • Date
    • Thread