Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Don Quixote de la Mancha
On Thu, Nov 10, 2011 at 6:47 PM, Quincey Morris wrote: > You haven't (IIRC) demonstrated that your app is not receiving memory > warnings. I implemented both the app delegate and view controller memory warnings, then set breakpoints at both of them. The breakpoints don't get hit. > You probably

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Martin Wierschin
>> calloc() and malloc() are documented to return NULL when there isn't >> enough memory to satisfy the user's request. Their implementation is >> simply broken if they don't do that. > > Because calloc and malloc never return, they are not violating the spec. > > Nothing about the POSIX spec re

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Quincey Morris
On Nov 10, 2011, at 18:03 , Don Quixote de la Mancha wrote: > I don't have a problem with the system killing runaway processes. > What I have a problem with is that calloc() NEVER returns NULL. If it > ever did, I would have plenty of opportunity to deallocate ALL of the > memory I just allocated

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Kyle Sluder
On Thu, Nov 10, 2011 at 6:03 PM, Don Quixote de la Mancha wrote: > calloc() and malloc() are documented to return NULL when there isn't > enough memory to satisfy the user's request.  Their implementation is > simply broken if they don't do that. Because calloc and malloc never return, they are n

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Don Quixote de la Mancha
On Thu, Nov 10, 2011 at 9:52 AM, Kyle Sluder wrote: > Read carefully: “If you allocate memory faster than the OS can re-claim it > from other processes…” In other words, the system protects against apps that > might've gotten trapped in an infinite loop of allocating memory. Better to > kill th

Re: DTS

2011-11-10 Thread Fritz Anderson
On 10 Nov 2011, at 6:18 PM, Roland King wrote: > Anyone else have recent experience of using DTS to answer questions this list > can't? I fear this channel is now also swamped and has may be losing its > usefulness. Not sure how on-topic this is… I have filed three DTS incidents in the last t

Re: nscollectionview dims and brightens frequently with call to setContent:

2011-11-10 Thread Kyle Sluder
On Thu, Nov 10, 2011 at 3:09 PM, Michael Hanna wrote: > in an nscollectionview, I call setContent: every time I get a new item for > the collection view. The annoying side-effect of this is that the whole > view dims and brightens each time setContent: is called.. not visually > appealing. Are yo

DTS

2011-11-10 Thread Roland King
Has anyone used a DTS support incident recently? I keep them as my magic bullets for when I can't figure stuff out whatever I try. The last 2 I used I got 2day turnaround and a great answer each time, my latest has been languishing for a week untouched. Anyone else have recent experience of us

nscollectionview dims and brightens frequently with call to setContent:

2011-11-10 Thread Michael Hanna
in an nscollectionview, I call setContent: every time I get a new item for the collection view. The annoying side-effect of this is that the whole view dims and brightens each time setContent: is called.. not visually appealing. I've tried disabling CATransactions while calling setContent: but tha

Re: Logging in Xcode 4.2

2011-11-10 Thread Graham Cox
On 11/11/2011, at 3:13 AM, Matt Neuburg wrote: > Graham - get over it, dude! Not because you're wrong, but because you're > shaking your head about the *wrong* thing. You haven't seen the half of it > yet. Just wait until the debug area (including the console) start popping up > and down into

Cocoaheads - Silicon Valley November Meeting

2011-11-10 Thread Tedd Fox
BIG, #AWESOME thanks to David Phillip Oster for getting us the room!! Our November 17 7pm-9pm meeting will be at Grand Teton Tech Talk Room, GWC-2 (Google West Campus 2) 1501 Salado Dr. Mountain View CA. http://turbozen.com/cocoaheads/Grand%20Teton.jpg is a map of the building, so you can see

[Moderator] Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Scott Anguish
The trivia isn’t Cocoa related. Please don’t post it to the list. Greg is an expert in the core OS stuff, and the discussion was on topic. It’s now way off topic. Please stop the inappropriate aspects of the thread. Memory management is complicated enough without adding irrelevant trivia. Than

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread James Montgomerie
On 10 Nov 2011, at 17:52, Kyle Sluder wrote: > On Nov 10, 2011, at 9:33 AM, James Montgomerie wrote: > >> On 9 Nov 2011, at 17:33, Dave Camp wrote: >>> This was discussed at a WWDC session a couple of years ago. If your app >>> attempts to allocate a large block of memory, and the OS cannot get

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Richard Somers
On Nov 9, 2011, at 12:46 AM, Greg Parker wrote: > Note that Shuttle missions carried ordinary laptops running ordinary > operating systems to do the science work other than flying the spacecraft. > The scientists couldn't afford Shuttle-grade development costs nor > Shuttle-grade development sc

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Glenn L. Austin
On Nov 10, 2011, at 9:52 AM, Kyle Sluder wrote: > On Nov 10, 2011, at 9:33 AM, James Montgomerie wrote: > >> On 9 Nov 2011, at 17:33, Dave Camp wrote: >>> This was discussed at a WWDC session a couple of years ago. If your app >>> attempts to allocate a large block of memory, and the OS cannot

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Kyle Sluder
On Nov 10, 2011, at 9:33 AM, James Montgomerie wrote: > On 9 Nov 2011, at 17:33, Dave Camp wrote: >> This was discussed at a WWDC session a couple of years ago. If your app >> attempts to allocate a large block of memory, and the OS cannot get other >> processes to give up memory in a timely fa

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread David Duncan
On Nov 10, 2011, at 9:33 AM, James Montgomerie wrote: > On 9 Nov 2011, at 17:33, Dave Camp wrote: >> This was discussed at a WWDC session a couple of years ago. If your app >> attempts to allocate a large block of memory, and the OS cannot get other >> processes to give up memory in a timely fas

Re: Logging in Xcode 4.2

2011-11-10 Thread Matt Neuburg
On Nov 10, 2011, at 9:13 AM, Kyle Sluder wrote: > On Thu, Nov 10, 2011 at 8:44 AM, Richard Somers > wrote: >> I think they will eventually get it right. No way am I going back to Xcode 3. > > Xcode brought with it some massive improvements (workspaces with > multiple projects!) at some serious

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread James Montgomerie
On 9 Nov 2011, at 17:33, Dave Camp wrote: > This was discussed at a WWDC session a couple of years ago. If your app > attempts to allocate a large block of memory, and the OS cannot get other > processes to give up memory in a timely fashion, your app will be killed. > > It's the reverse of you

Re: Logging in Xcode 4.2

2011-11-10 Thread Kyle Sluder
On Thu, Nov 10, 2011 at 8:44 AM, Richard Somers wrote: > I think they will eventually get it right. No way am I going back to Xcode 3. Xcode brought with it some massive improvements (workspaces with multiple projects!) at some serious usability expense. __

Re: Logging in Xcode 4.2

2011-11-10 Thread Richard Somers
On Nov 10, 2011, at 9:13 AM, Matt Neuburg wrote: > Sometimes it pops up a little way. > > Sometimes it pops up a long way. > > Sometimes it fails to pop. > > Sometimes it pops but when you stop the app it doesn't pop back down. > > It's non-deterministic programming! Xcode animation! I think

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Richard Somers
On Nov 9, 2011, at 9:36 AM, Andy O'Meara wrote: > Well, if you have a serial number/license scheme, copy-protection scheme, > crypto, or payment mechanisms that use objC, then realize they're on display > for everyone to see. Use functions instead of a class to restrict the amount of informatio

Re: Logging in Xcode 4.2

2011-11-10 Thread Matt Neuburg
On Thu, 10 Nov 2011 09:11:25 +1100, Graham Cox said: >Thanks, that's got it. > >I dunno XCode what the hell happened to you? *shakes head* > Graham - get over it, dude! Not because you're wrong, but because you're shaking your head about the *wrong* thing. You haven't seen the half of it yet.

Re: UITapGestureRecognizer and state/action w/rt numberOfTapsRequired

2011-11-10 Thread Matt Neuburg
On Tue, 08 Nov 2011 12:56:03 -0800, Ben Kennedy said: >>From >>http://developer.apple.com/library/ios/#documentation/uikit/reference/UITapGestureRecognizer_Class/Reference/Reference.html >> : > >> Although taps are discrete gestures, they are discrete for each state of the >> gesture recognizer;

Re: Why does changing a UIScrollView's contentInset change contentOffset?

2011-11-10 Thread Matt Neuburg
On Tue, 08 Nov 2011 12:05:55 -0500, David Hoerl said: >when I set "contentInset" that contentOffset was getting set to >0,0. > >Is this known behavior (or desired behavior?) Don't beat yourself up over this. You figured it out (well done!), the workaround is obvious, and now you can move on. Bu

Re: UITextField and UIGestureRecognizers

2011-11-10 Thread glenn andreas
On Nov 10, 2011, at 9:41 AM, Matt Neuburg wrote: > On Mon, 07 Nov 2011 17:32:46 +0100, Olivier Palliere > said: >> I have a UITextField on a view. I want the user to be able to edit it by >> single tapping on it, but I want to display a popover to chose from a list >> when the user does a lon

Re: Different deployment target for iPhone & iPad

2011-11-10 Thread Matt Neuburg
On Tue, 08 Nov 2011 21:59:59 +0530, Sasikumar JP said: >Is it possible to set the iPad minimum deployment target as iOS 5 and iPhone >deployment target as ios 4.2 I don't think so. Most apps that I'm familiar with, if they have issues like this, simply have two different apps. m. -- matt neubu

Re: UITextField and UIGestureRecognizers

2011-11-10 Thread Matt Neuburg
On Mon, 07 Nov 2011 17:32:46 +0100, Olivier Palliere said: >I have a UITextField on a view. I want the user to be able to edit it by >single tapping on it, but I want to display a popover to chose from a list >when the user does a long press on the UITextfield. > >To do this, I added a LongPres

Re: UIViewController containment and storyboarding

2011-11-10 Thread Matt Neuburg
On Sat, 05 Nov 2011 21:48:42 +0800, Roland King said: >Is there any support for UIViewController containment with storyboarding? Yes, but you have to careful about what you mean by "support". I see two possible misapprehensions here: 1) The storyboard editor knows nothing your custom container

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Ian Joyner
On 10 Nov 2011, at 21:22, Andreas Grosam wrote: > > On Nov 10, 2011, at 2:04 AM, Ian Joyner wrote: > > > So, in other words, you prefer "polymorphic runtime resolved" symbols over > "compile-time resolved symbols" (like in C++). Not saying that at all, and don't really agree with that. If a c

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Ian Joyner
On 10 Nov 2011, at 21:13, Karl Goiser wrote: > > On 10/11/2011, at 12:04 PM, Ian Joyner wrote: > >> It's the old I have a hammer so everything looks like a nail, but in C++'s >> case it's I have a programming language, so everything gets put in that. We >> really need to get away from that ki

Re: Best way to determine whether iTunes is installed or not on Mac

2011-11-10 Thread Mike Abdullah
The bundle identifier is the right thing to base your check on. Show us your code and we'll be able to tell you if you're dong anything wrong Sent from my iPad On 10 Nov 2011, at 05:01 AM, Vaibhao Mahore wrote: > Hello, >I would like to know best way to determine whether iTune

Re: Changing the appearance of buttons

2011-11-10 Thread Preston Sumner
On Nov 9, 2011, at 10:54 PM, John Joyce wrote: > > On Nov 10, 2011, at 7:07 AM, Preston Sumner wrote: > >> On Nov 9, 2011, at 3:34 AM, Andreas Mayer wrote: >> >>> >>> Am 08.11.2011 um 22:40 schrieb Tom Jeffries: >>> Mac. >>> >>> You will have to use your own subclass of NSButton. >> >>

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Andreas Grosam
On Nov 10, 2011, at 2:04 AM, Ian Joyner wrote: So, in other words, you prefer "polymorphic runtime resolved" symbols over "compile-time resolved symbols" (like in C++). I just don't understand, why this makes C++ namespace syntax ugly, and why you still state that C++ namespace is inflexible

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Karl Goiser
On 10/11/2011, at 12:04 PM, Ian Joyner wrote: > It's the old I have a hammer so everything looks like a nail, but in C++'s > case it's I have a programming language, so everything gets put in that. We > really need to get away from that kind of thinking about programming > languages and get ba