NSUInteger in for-loop?

2008-09-14 Thread Alex Reynolds
Thanks all for your quick insight! -Alex ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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

Re: NSUInteger in for-loop?

2008-09-14 Thread Graff
On Sep 14, 2008, at 9:15 PM, Alex Reynolds <[EMAIL PROTECTED]> wrote: I'm wondering if I'm using unsigned integers (specifically NSUInteger) properly or not. I was under the impression that unsigned integers run from 0 to MAX_INT, but when I use them in a "for" loop within these bounds, the l

Re: NSUInteger in for-loop?

2008-09-14 Thread Jason Coco
On Sep 15, 2008, at 00:45 , Brett Powley wrote: On 15/09/2008, at 2:15 PM, Alex Reynolds wrote: I'm wondering if I'm using unsigned integers (specifically NSUInteger) properly or not. I was under the impression that unsigned integers run from 0 to MAX_INT, but when I use them in a "for"

Re: NSUInteger in for-loop?

2008-09-14 Thread Jason Coco
On Sep 15, 2008, at 00:44 , Alex Reynolds wrote: The %lu with casting seems to run into the same issue as %u: ... 2008-09-14 21:43:07.241 NSUIntTest[19779:10b] NSUInteger: 2 2008-09-14 21:43:07.259 NSUIntTest[19779:10b] NSUInteger: 1 2008-09-14 21:43:07.260 NSUIntTest[19779:10b] NSUInteger: 0

Re: NSUInteger in for-loop?

2008-09-14 Thread Clark Cox
On Sun, Sep 14, 2008 at 9:44 PM, Alex Reynolds <[EMAIL PROTECTED]> wrote: > The %lu with casting seems to run into the same issue as %u: > > ... > 2008-09-14 21:43:07.241 NSUIntTest[19779:10b] NSUInteger: 2 > 2008-09-14 21:43:07.259 NSUIntTest[19779:10b] NSUInteger: 1 > 2008-09-14 21:43:07.260 NSUI

Re: NSUInteger in for-loop?

2008-09-14 Thread Jason Coco
On Sep 15, 2008, at 00:42 , Alex Reynolds wrote: Interesting: ... 2008-09-14 21:38:56.311 NSUIntTest[19750:10b] NSUInteger: 2 2008-09-14 21:38:56.329 NSUIntTest[19750:10b] NSUInteger: 1 2008-09-14 21:38:56.341 NSUIntTest[19750:10b] NSUInteger: 0 2008-09-14 21:38:56.344 NSUIntTest[19750:10b] NS

Re: NSUInteger in for-loop?

2008-09-14 Thread Brett Powley
On 15/09/2008, at 2:15 PM, Alex Reynolds wrote: I'm wondering if I'm using unsigned integers (specifically NSUInteger) properly or not. I was under the impression that unsigned integers run from 0 to MAX_INT, but when I use them in a "for" loop within these bounds, the loop does not seem

Re: NSUInteger in for-loop?

2008-09-14 Thread Alex Reynolds
The %lu with casting seems to run into the same issue as %u: ... 2008-09-14 21:43:07.241 NSUIntTest[19779:10b] NSUInteger: 2 2008-09-14 21:43:07.259 NSUIntTest[19779:10b] NSUInteger: 1 2008-09-14 21:43:07.260 NSUIntTest[19779:10b] NSUInteger: 0 2008-09-14 21:43:07.261 NSUIntTest[19779:10b] NSUInt

Re: NSUInteger in for-loop?

2008-09-14 Thread Alex Reynolds
Interesting: ... 2008-09-14 21:38:56.311 NSUIntTest[19750:10b] NSUInteger: 2 2008-09-14 21:38:56.329 NSUIntTest[19750:10b] NSUInteger: 1 2008-09-14 21:38:56.341 NSUIntTest[19750:10b] NSUInteger: 0 2008-09-14 21:38:56.344 NSUIntTest[19750:10b] NSUInteger: 4294967295 2008-09-14 21:38:56.344 NSUIntT

Re: NSUInteger in for-loop?

2008-09-14 Thread j o a r
On Sep 14, 2008, at 9:15 PM, Alex Reynolds wrote: I'm wondering if I'm using unsigned integers (specifically NSUInteger) properly or not. I was under the impression that unsigned integers run from 0 to MAX_INT, but when I use them in a "for" loop within these bounds, the loop does not se

Re: NSUInteger in for-loop?

2008-09-14 Thread Jerry Krinock
On 2008 Sep, 14, at 21:31, Nathan Kinsinger wrote: On Sep 14, 2008, at 10:15 PM, Alex Reynolds wrote: NSLog(@"NSUInteger: %d", counter); The correct type modifier for unsigned integers is %u not %d. Switch it and try again to see what's really happening. Ah, I believe he'll pro

Re: NSUInteger in for-loop?

2008-09-14 Thread Nathan Kinsinger
On Sep 14, 2008, at 10:15 PM, Alex Reynolds wrote: NSLog(@"NSUInteger: %d", counter); The correct type modifier for unsigned integers is %u not %d. Switch it and try again to see what's really happening. --Nathan ___ Cocoa-dev mailing l

NSUInteger in for-loop?

2008-09-14 Thread Alex Reynolds
I'm wondering if I'm using unsigned integers (specifically NSUInteger) properly or not. I was under the impression that unsigned integers run from 0 to MAX_INT, but when I use them in a "for" loop within these bounds, the loop does not seem to always obey these constraints. For example:

Re: mailbundle info

2008-09-14 Thread Mark Munz
On Sun, Sep 14, 2008 at 12:47 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > rdar://problem/6218715 > Will probably be marked as duplicate, but it doesn't hurt. Actually, most definitely will be marked as duplicate (I know I've put in a few requests over the years), but I am told that if enough peop

Re: NameAndPassword Sample Code

2008-09-14 Thread Jason Coco
On Sep 14, 2008, at 16:30 , Patrick Neave wrote: Sorry for the long post, but I have been stuck on this for a while now and not sure how to proceed. Looking forward to your replies. Hi Patrick, I haven't read this yet, so I'm not sure if it will be useful or not, but it may... assuming

Re: brain-dead NSThread question ...

2008-09-14 Thread Shawn Erickson
On Sun, Sep 14, 2008 at 4:12 PM, John Michael Zorko <[EMAIL PROTECTED]> wrote: > > Hello, all ... > > I'm trying to launch a thread to connect to a server and stream some data. > What i'm seeing is that, while my thread launches, the NSURLConnection > callbacks are never called, and it's probably

Re: brain-dead NSThread question ...

2008-09-14 Thread Ken Thomases
On Sep 14, 2008, at 6:36 PM, John Michael Zorko wrote: sleep() is just blocking the thread, so no event is processed. Use run loops instead. Try to replace sleep() with [[NSRunLoop currentRunLoop] runMode:beforeDate:] You mean the NSURLConnection callbacks are not callbacks in the C / C

Re: brain-dead NSThread question ...

2008-09-14 Thread Jason Coco
On Sep 14, 2008, at 19:36 , John Michael Zorko wrote: Julien et al, sleep() is just blocking the thread, so no event is processed. Use run loops instead. Try to replace sleep() with [[NSRunLoop currentRunLoop] runMode:beforeDate:] You mean the NSURLConnection callbacks are not callb

Re: brain-dead NSThread question ...

2008-09-14 Thread John Michael Zorko
Julien et al, sleep() is just blocking the thread, so no event is processed. Use run loops instead. Try to replace sleep() with [[NSRunLoop currentRunLoop] runMode:beforeDate:] You mean the NSURLConnection callbacks are not callbacks in the C / C+ + sense i.e. they're more like dispat

Re: brain-dead NSThread question ...

2008-09-14 Thread Julien Jalon
sleep() is just blocking the thread, so no event is processed. Use run loops instead. Try to replace sleep() with [[NSRunLoop currentRunLoop] runMode:beforeDate:] -- Julien ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

brain-dead NSThread question ...

2008-09-14 Thread John Michael Zorko
Hello, all ... I'm trying to launch a thread to connect to a server and stream some data. What i'm seeing is that, while my thread launches, the NSURLConnection callbacks are never called, and it's probably some silly thing i'm not understanding about ObjC / Cocoa (being an old C / C++

Re: NSOutlineView: Which row is selected.

2008-09-14 Thread Nick Zitzmann
On Sep 14, 2008, at 9:58 AM, John Cebasek wrote: I've got an NSOutlineView and am trying to determine which row is selected. I thought [super selectedRow]; (calling NSTableView's selectedRow method) would do the trick, but all I'm getting back from that call is -1. How does one determine

NSOutlineView: Which row is selected.

2008-09-14 Thread John Cebasek
Hi All: Noobie question follows: I've got an NSOutlineView and am trying to determine which row is selected. I thought [super selectedRow]; (calling NSTableView's selectedRow method) would do the trick, but all I'm getting back from that call is -1. How does one determine which row is se

NameAndPassword Sample Code

2008-09-14 Thread Patrick Neave
Hi List, I am getting back into Cocoa after a 2-3 year break and diving straight in to the Security Frameworks. I had some help a couple of weeks ago from this list (thanks Charles :-)) when trying to get the bannersample example working and am hoping for the same again. In looking at the

Re: mailbundle info

2008-09-14 Thread Kyle Sluder
On Sun, Sep 14, 2008 at 2:32 PM, Mark Munz <[EMAIL PROTECTED]> wrote: > Log a bug/enhancement request with Apple via http://bugreport.apple.com rdar://problem/6218715 Will probably be marked as duplicate, but it doesn't hurt. --Kyle Sluder ___ Cocoa-d

Re: mailbundle info

2008-09-14 Thread Mark Munz
On Wed, Sep 10, 2008 at 3:00 PM, Stephane Huaulme <[EMAIL PROTECTED]> wrote: > where can i find info on how to create a mailbundle? > Log a bug/enhancement request with Apple via http://bugreport.apple.com After 7+ years, it really is time for them to provide a public plug-in API for Mail. The mo

Re: NSXMLParser and character entities?

2008-09-14 Thread Nathan Kinsinger
On Sep 12, 2008, at 3:56 PM, Kai wrote: When NSXMLParser hits a character entity like ä (-> German umlaut 'ä'), it sends parser:resolveExternalEntityName:systemID: to its delegate and if this is not implemented or returns nil, parser:parseErrorOccurred: is called with NSXMLParserUndeclar