• 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:15:40 +0200

I have adapted it - now it is compiling correct,
but the output in terminal is strange:

NSDictionary *tmpDict = [NSDictionary dictionaryWithDictionary:@"SCNetworkConnectionCopyStatistics(scncRef)"];


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

iBook-G4:~/stats/build/Debug sl$ ./stats -o
Outgoing
2007-10-03 21:14:57.051 stats[3028] *** _NSAutoreleaseNoPool(): Object 0x50f290 of class NSCFString autoreleased with no pool in place - just leaking
2007-10-03 21:14:57.052 stats[3028] *** -[NSCFString count]: selector not recognized [self = 0x25044]
2007-10-03 21:14:57.053 stats[3028] *** _NSAutoreleaseNoPool(): Object 0x50da20 of class NSCFString autoreleased with no pool in place - just leaking
2007-10-03 21:14:57.054 stats[3028] *** _NSAutoreleaseNoPool(): Object 0x50b2a0 of class NSCFString autoreleased with no pool in place - just leaking
2007-10-03 21:14:57.054 stats[3028] *** _NSAutoreleaseNoPool(): Object 0x50b280 of class NSException autoreleased with no pool in place - just leaking
2007-10-03 21:14:57.055 stats[3028] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSCFString count]: selector not recognized [self = 0x25044]
Trace/BPT trap
iBook-G4:~/stats/build/Debug sl$ 

I am sorry for stealing your time, but I am not able to deal with that...

Thanks for your help!

Stefan


On Oct 3, 2007, at 9:03 PM, Stefan Lehrner wrote:

Mike helped me with that:

NSDictionary *tmpDict = [NSDictionary dictionaryWithDictionary:SCNetworkConnectionCopyExtendendStatus(scncRef)];

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

The following occurs now:

1) When compiling I get the following: warning passing argument 1 of 'dictionarywithDictionary:' makes pointer from integer without a cast
2) When running in terminal (-t) I get: 

Time
ZeroLink: unknown symbol '_SCNetworkConnectionCopyExtendendStatus'
Abort trap

Thanks for your time!

Best Regards,

Stefan


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



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

This email sent to email@hidden

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

  • Prev by Date: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Next by Date: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Previous by thread: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Next by thread: Re: SCNetworkConnection - Dictionary/Subdictionary
  • Index(es):
    • Date
    • Thread