Re: Suggested maximum size of NSCachesDirectory on iOS

2013-06-09 Thread Robert Vojta
Hi Markus, On Sunday, 9. June 2013 at 23:13, Markus Spoettl wrote: > on iOS, is there any documentation on how much space an app should use at > most when storing things in the location returned by NSFileManagers's > -URLsForDirectory: with NSCachesDirectory? Are there any hard numbers (like

Search field in menu, like Help menu has

2013-06-09 Thread Jerry Krinock
My OS X app programmatically creates a menu which is displayed in its (1) Dock Menu (2) Status Item (3) a menu which use can pop up anywhere via a global keyboard shortcut, which invokes -[NSMenu popUpMenuPositioningItem:atLocation:inView:] I would like to add a search field at the top of this m

Suggested maximum size of NSCachesDirectory on iOS

2013-06-09 Thread Markus Spoettl
Hi, on iOS, is there any documentation on how much space an app should use at most when storing things in the location returned by NSFileManagers's -URLsForDirectory: with NSCachesDirectory? Are there any hard numbers (like for example "never more than 1/20th of the entire disk", or somethin

Re: error in using NSNumber's numberWithInt: method not flagged

2013-06-09 Thread Jens Alfke
This is correct behavior. C allows casting between pointer and integer types. It’s used a lot for doing pointer arithmetic. (C’s ancestor BCPL didn’t even have separate integer and pointer types.) You might get an optional compiler warning if the integer type narrower than a pointer, but that’s

Re: error in using NSNumber's numberWithInt: method not flagged

2013-06-09 Thread John McCall
On Jun 9, 2013, at 1:32 PM, Kyle Sluder wrote: > On Jun 9, 2013, at 1:26 PM, Boyd Collier wrote: >> Quite by chance, I stumbled on to what seems to be an error that ought to be >> caught by the compiler but wasn't. Here's an example: >> >> NSNumber *testNumber = [NSNumber numberWithInt:5]; >

Re: error in using NSNumber's numberWithInt: method not flagged

2013-06-09 Thread Kyle Sluder
On Jun 9, 2013, at 1:26 PM, Boyd Collier wrote: > > Quite by chance, I stumbled on to what seems to be an error that ought to be > caught by the compiler but wasn't. Here's an example: > >NSNumber *testNumber = [NSNumber numberWithInt:5]; >int testInt = (int)testNumber; > > […snip…]

error in using NSNumber's numberWithInt: method not flagged

2013-06-09 Thread Boyd Collier
Quite by chance, I stumbled on to what seems to be an error that ought to be caught by the compiler but wasn't. Here's an example: NSNumber *testNumber = [NSNumber numberWithInt:5]; int testInt = (int)testNumber; However, the value of testInt when running the above is wildly in

Re: NSURLConnection and 404

2013-06-09 Thread Koen van der Drift
On Jun 9, 2013, at 5:54 AM, Jean-Daniel Dupas wrote: > The NSConnectionDelegate protocol has a method that pass you the response: > > - (void)connection:(NSURLConnection *)connection > didReceiveResponse:(NSURLResponse *)response > > You can test if the response is of type NSHTTPURLResponse (

UICollectionView with NSFetchedResultsController; compatible?

2013-06-09 Thread Michael Crawford
I just finished watching Marcus Zarra's NSFetchedResultsController presentation from iDeveloper.tv . At about 25 minutes into the presentation, Marcus says the NSFetchedResultsController only works well with table-view controllers. I had planned to use it with a collection-view, which is why I

Re: NSPopUpButtonCell - How To Get The Changed Value

2013-06-09 Thread Jerry Krinock
On 2013 Jun 08, at 18:28, Chris Tracewell wrote: > I can't seem to make KVO work since it's an array in a dictionary inside an > array. In the area of tables and bindings, there are typically a half dozen design patterns which should work but don't, and one that works. Binding to an array

Re: NSURLConnection and 404

2013-06-09 Thread Gerriet M. Denkmann
On 9 Jun 2013, at 16:54, Jean-Daniel Dupas wrote: > > Le 9 juin 2013 à 11:35, Gerriet M. Denkmann a écrit : > >> This works fine, but blocks my for 1 sec on a good day - who know how long >> if the net is slow: >> >> url = something/which/might/exist/or/not.gif >> data = [ NSData dataWithCo

Re: NSURLConnection and 404

2013-06-09 Thread Jean-Daniel Dupas
Le 9 juin 2013 à 11:35, Gerriet M. Denkmann a écrit : > This works fine, but blocks my for 1 sec on a good day - who know how long if > the net is slow: > > url = something/which/might/exist/or/not.gif > data = [ NSData dataWithContentsOfURL: url options: mask error: &outError ]; > > So I am

Re: NSURLConnection and 404

2013-06-09 Thread Koen van der Drift
On Jun 9, 2013, at 5:35 AM, Gerriet M. Denkmann wrote: > Is there a way to get just the status (in this case 404) without parsing the > data? > I looked at the NSURLConnection delegate methods, but did not find anything > which looked appropriate. I do something like this: - (void) connecti

NSURLConnection and 404

2013-06-09 Thread Gerriet M. Denkmann
This works fine, but blocks my for 1 sec on a good day - who know how long if the net is slow: url = something/which/might/exist/or/not.gif data = [ NSData dataWithContentsOfURL: url options: mask error: &outError ]; So I am trying to use NSURLConnection instead. Also works fine. Only: if my ur