Re: sharing file descriptors to an NSTask

2010-08-31 Thread Michael Ash
On Wed, Sep 1, 2010 at 1:33 AM, Dave Keck wrote: > Off topic 2: It's strange behavior in the first place, since AFAIK, > there's no efficient way of closing open descriptors short of for(i = > 3; i < getdtablesize(); i++) close(i); It's actually normal and necessary behavior for a general-purpose

Re: sharing file descriptors to an NSTask

2010-08-31 Thread Dave Keck
Indeed NSTask closes open descriptors in the child. I could have sworn this was documented somewhere, but I can't seem to find the relevant text at the moment. To get around this behavior (and other NSTask bugs and shortcomings), I chose to write my own NSTask equivalent. Alternatively, you could

Re: where are the CALayer struts and springs on iPhone?

2010-08-31 Thread Scott Anguish
Have you filed a bug? On Aug 31, 2010, at 1:58 PM, Matt Neuburg wrote: > The docs say in big letters: > >> iPhone OS Note: The CALayer class in iPhone OS only supports the "struts and >> springs" positioning model, it does not provide custom layout managers. > > I am not the first person to ask

sharing file descriptors to an NSTask

2010-08-31 Thread Scott Ribe
Is there any way to have a process launched via NSTask access file descriptors opened in the parent process? Other than stdin, stdout & stderr. It looks to me like the NSTask launching machinery may close descriptors, and I don't see a way to control that. The descriptors in question do return 0

Re: core data issues iOS 4.0.2

2010-08-31 Thread Damien Cooke
Fritz, Thanks for the pointer, I had over looked this document in my own search. The issue was that I had deleted the record ok, but just a few lines further down I had referenced one of the fields of the deleted record... (only idiots do that! ) So the clue was from the document you pointed

Re: Finding Core Data objects in Instruments

2010-08-31 Thread Melissa J. Turner
On Aug 30, 2010, at 7:35 PM, Rick Mann wrote: > We're having a hard time tracking down our smaller leaks in our iPad app. > When running on the simulator, one thing we noticed is that none of our Core > Data objects shows up in Leaks or Allocations (all of them have custom > NSManagedObject su

Re: Finding source of EXC_BREAKPOINT crash

2010-08-31 Thread Wim Lewis
On Aug 30, 2010, at 7:10 AM, Ben wrote: > My app is built with a base SDK and deployment target of 10.5, but will only > run on 10.6 systems. On 10.5 systems it crashes on launch with an > EXC_BREAKPOINT and the following message: > > Dyld Error Message: > unknown required load command 0x80

where are the CALayer struts and springs on iPhone?

2010-08-31 Thread Matt Neuburg
The docs say in big letters: > iPhone OS Note: The CALayer class in iPhone OS only supports the "struts and > springs" positioning model, it does not provide custom layout managers. I am not the first person to ask: supports "struts and springs" *how*? A CALayer has no autoresizingMask. Surely ei

Re: zlib works in Dubug, not in Release

2010-08-31 Thread Wim Lewis
On Aug 30, 2010, at 7:51 PM, Trygve Inda wrote: >> I am uncompressing data with zlib: >> >> err = uncompress( buffer, &bufferLength, (const Bytef*)data + sizeof( uLongf >> ), [self length] - sizeof( uLongf ) ); >> > [] > Just as a follow-up. More research revels that the data was compressed

Re: can you autorelease toll-free bridged types

2010-08-31 Thread Shawn Erickson
On Tue, Aug 31, 2010 at 9:45 AM, David Duncan wrote: > > On Aug 31, 2010, at 9:34 AM, Roland King wrote: > >> Of course I now have to ask if I *were* doing it .. what's the issue? > > Under GC -retain, -release, -autorelease and -retainCount are no-ops > (objc_msgSend doesn't even dispatch them).

Re: can you autorelease toll-free bridged types

2010-08-31 Thread David Duncan
On Aug 31, 2010, at 9:34 AM, Roland King wrote: > Of course I now have to ask if I *were* doing it .. what's the issue? Under GC -retain, -release, -autorelease and -retainCount are no-ops (objc_msgSend doesn't even dispatch them). > Is it that autorelease doesn't do anything so the CF type ne

Re: can you autorelease toll-free bridged types

2010-08-31 Thread Sean McBride
On Wed, 1 Sep 2010 00:34:45 +0800, Roland King said: >Thanks for the confirmation ... in this case I'm doing Middles Ages iOs >memory managed code so definitely not dual mode. > >Of course I now have to ask if I *were* doing it .. what's the issue? Is >it that autorelease doesn't do anything so th

Re: can you autorelease toll-free bridged types

2010-08-31 Thread Roland King
Thanks for the confirmation ... in this case I'm doing Middles Ages iOs memory managed code so definitely not dual mode. Of course I now have to ask if I *were* doing it .. what's the issue? Is it that autorelease doesn't do anything so the CF type never gets the CFRelease() call it would do f

Re: can you autorelease toll-free bridged types

2010-08-31 Thread Dave DeLong
If you are writing dual-mode code, can't you just wrap the CFDictionaryCreateMutable() call with CFMakeCollectable()? Dave On Aug 31, 2010, at 10:20 AM, Mike Abdullah wrote: > On 31 Aug 2010, at 17:02, Roland King wrote: > >> can you do this? >> >> CFMutableDictionaryRef tokenByParent =

Re: can you autorelease toll-free bridged types

2010-08-31 Thread Mike Abdullah
On 31 Aug 2010, at 17:02, Roland King wrote: > can you do this? > > CFMutableDictionaryRef tokenByParent = CFDictionaryCreateMutable( NULL, > 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks ); > [ (NSMutableDictionary*)tokenByParent autorelease ]; > > with of c

Re: NSCell and partial redraw

2010-08-31 Thread Mike Abdullah
On 31 Aug 2010, at 17:03, Patrick Mau wrote: > Hallo Fritz > > Thanks a lot for your comments. I just have a few remarks to clarify what I > meant. > Please see below. > > On 31.08.2010, at 17:26, Fritz Anderson wrote: > >> On 31 Aug 2010, at 4:59 AM, Patrick Mau wrote: >> >>> Let's assume I

Re: NSCell and partial redraw

2010-08-31 Thread Patrick Mau
Hallo Fritz Thanks a lot for your comments. I just have a few remarks to clarify what I meant. Please see below. On 31.08.2010, at 17:26, Fritz Anderson wrote: > On 31 Aug 2010, at 4:59 AM, Patrick Mau wrote: > >> Let's assume I have a custom NSView that will use to custom NSCell instances >>

can you autorelease toll-free bridged types

2010-08-31 Thread Roland King
can you do this? CFMutableDictionaryRef tokenByParent = CFDictionaryCreateMutable( NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks ); [ (NSMutableDictionary*)tokenByParent autorelease ]; with of course the desire to continue using tokenByParent in the r

Re: NSCell and partial redraw

2010-08-31 Thread Fritz Anderson
On 31 Aug 2010, at 4:59 AM, Patrick Mau wrote: > Let's assume I have a custom NSView that will use to custom NSCell instances > to render its contents. > Now, if "drawRect:" is called on the NSView, I get the dirty rect that needs > to be redrawn. > > The NSCell class on the other hands uses: >

Re: Binding an objects "Enabled" to a button in IB

2010-08-31 Thread Joanna Carter
Hi Mikael > Joanna: do you mean that by applying Jerry's method, we put parts of the > Controller's duty into the View? Essentially, yes. The primary design idea behind MVC is that there should be absolutely no business logic in the View; the View should provide a means of interacting with the

Re: Finding source of EXC_BREAKPOINT crash

2010-08-31 Thread Mark Ritchie
Hey! On 30/Aug/2010, at 6:37 PM, Greg Parker wrote: > Most likely the static libraries or some other part of your code was not > built with deployment target 10.5. Double-check your project settings and > build logs. I've not done this for a while however I think it was the DYLD_PRINT_* envir

Re: Binding an objects "Enabled" to a button in IB

2010-08-31 Thread Jerry Krinock
On 2010 Aug 31, at 00:34, Joanna Carter wrote: > Eeeuuuwww!!! > > It might work but is it really code as we know it ? ;-) It's definitely not code, Joanna. That's what the poster asked for, though. Poster wanted to know if we could do it "in IB". > Surely, if you already have a controller f

Re: Binding an objects "Enabled" to a button in IB

2010-08-31 Thread cocoa
Hi Jerry and Joanna, Thank you both for your comments on this. Joanna: do you mean that by applying Jerry's method, we put parts of the Controller's duty into the View? /Mikael > Hi Jerry > >>> Le 30 août 2010 à 13:26, co...@wamundson.eu a écrit : >>> Can this binding be done … completely

NSCell and partial redraw

2010-08-31 Thread Patrick Mau
Hallo everyone Let's assume I have a custom NSView that will use to custom NSCell instances to render its contents. Now, if "drawRect:" is called on the NSView, I get the dirty rect that needs to be redrawn. The NSCell class on the other hands uses: - (void)drawWithFrame:(NSRect)cellFrame inVi

Re: Need specialized keyboard for iPad app

2010-08-31 Thread Jack Nutting
On Tue, Aug 31, 2010 at 9:01 AM, Jay Reynolds Freeman wrote: > I need to construct a specialized keyboard (the software kind) for an iPad > app I am working on (using the SDKs and other tools that are presently > available to all developers).  Searching the net and the developer > documentation

Re: Binding an objects "Enabled" to a button in IB

2010-08-31 Thread Joanna Carter
Hi Jerry >> Le 30 août 2010 à 13:26, co...@wamundson.eu a écrit : >> >>> Can this binding be done … completely in the nib file (in IB)? > > The answer is yes because the controller Joanna refers to may be an > NSObjectController from the Library in IB. > > Because the "Bind to" popup in Interf

Need specialized keyboard for iPad app

2010-08-31 Thread Jay Reynolds Freeman
I need to construct a specialized keyboard (the software kind) for an iPad app I am working on (using the SDKs and other tools that are presently available to all developers). Searching the net and the developer documentation finds many ad-hoc examples of how to do it, but I have not found any