Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-24 Thread Martin Hewitson
Gentlemen, thank you for those succinct responses. I'll go through my code base and make the necessary changes. Best wishes, Martin On 24, Jun, 2012, at 07:55 AM, Conrad Shultz wrote: As Roland indicated, yes, this is a general statement. It would be advisable to read the Error Handling

Re: sandbox question about copying from bundle

2012-06-24 Thread Rick C.
Ok here's my follow-up...I confirmed that everything I told you was true and finally said to myself I will just communicate with this executable inside my bundle. This works until I submit it to the Mac App Store and I get invalid binary because this executable (3rd party) is not sandboxed.

Re: Sandboxing and calling Launchctl

2012-06-24 Thread Rick C.
This helped me thanks! Unfortunately I wasn't try to launch my helper app via launchd so it was a bit different. But had to say thanks! :-) rc On Jun 1, 2012, at 9:30 AM, Alex Zavatone wrote: If you haven't watched the video for Session 204 - App Sandbox and the Mac App Store from the

Re: Why do we use -fobjc-arc instead of removing code with #define?

2012-06-24 Thread Jean-Daniel Dupas
Le 24 juin 2012 à 07:18, Roland King a écrit : On Jun 24, 2012, at 12:25 PM, Graham Cox wrote: On 24/06/2012, at 1:55 PM, Jerry Krinock wrote: Why didn't Apple do the same thing for ARC? Because ARC is a compiler technology that inserts -retain, -release automatically and

Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-24 Thread Dennis
On Jun 23, 2012, at 10:46 PM, Roland King wrote: Yes that is a general statement. You should check the return value of the method and only if it indicates there's an error, check the error object. There is no guarantee that the error object was not set at some point during the method

Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-24 Thread Roland King
No. On 24 Jun, 2012, at 11:14 PM, Dennis li...@dbandel.com wrote: On Jun 23, 2012, at 10:46 PM, Roland King wrote: Yes that is a general statement. You should check the return value of the method and only if it indicates there's an error, check the error object. There is no guarantee

Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-24 Thread Martin Hewitson
On 24, Jun, 2012, at 05:14 PM, Dennis wrote: On Jun 23, 2012, at 10:46 PM, Roland King wrote: Yes that is a general statement. You should check the return value of the method and only if it indicates there's an error, check the error object. There is no guarantee that the error object

Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-24 Thread Jens Alfke
On Jun 24, 2012, at 8:14 AM, Dennis wrote: What if you explicitly set your NSError variable's value to nil immediately before using it? Wouldn't it be safe to trust in that case? To expand on Roland's pithy No: * You call method A with an NSError** that points to a nil pointer. * A calls B,

Document-scoped security conundrum (and bug)...

2012-06-24 Thread Matthew Weinstein
Dear cocoa-devs, I'm trying to adapt my app to app and document scoped security bookmarks. I think I'm running into a catch 22. since my documents reference pdfs dropped on my window, it makes sense to use document scoped bookmarks, but since the user may not have saved the document, I can't

Re: sandbox question about copying from bundle

2012-06-24 Thread Todd Heberlein
On Jun 24, 2012, at 2:47 AM, Rick C. wrote: Ok here's my follow-up...I confirmed that everything I told you was true and finally said to myself I will just communicate with this executable inside my bundle. This works until I submit it to the Mac App Store and I get invalid binary

UISegmentedControl description is wrong.

2012-06-24 Thread Gavin Stokes
Am I overlooking it in the doc, or does the doc fail to state that the segmented control acts like a radio button? This appears to be wrong: A UISegmentedControl object is a horizontal control made of multiple segments, each segment functioning as a discrete button. A segmented control affords a

Re: UISegmentedControl description is wrong.

2012-06-24 Thread Richard Altenburg (Brainchild)
The documentation does fail to mention the radio button mechanism for the UISegmentedControl, but some books about iOS programming do mention it. Too bad you had to find this out on your own, and also sorry to say that you can not change this behavior (except by subclassing the control and

Re: UISegmentedControl description is wrong.

2012-06-24 Thread Alex Zavatone
Do you mean that it acts like an individual radio button or a radio button group? I think it acts like a group, not a single button. On Jun 24, 2012, at 6:46 PM, Gavin Stokes wrote: Am I overlooking it in the doc, or does the doc fail to state that the segmented control acts like a radio

Re: sandbox question about copying from bundle

2012-06-24 Thread Rick C.
Yes that is right I was doing it wrong thank you very much! Now the only other issue I had was am I not allowed to write my helper app to my application support folder and send NSTask to it there? It seems this only works if I keep it inside of my bundle? rc On Jun 25, 2012, at 5:08 AM,

Re: sandbox question about copying from bundle

2012-06-24 Thread Rick C.
That does make sense I was just looking for a definitive answer... :-) Now I am writing my helper to the app support folder inside of my sandbox that's why I thought it might work, but it might not based on how you described it. And I'm guessing it might also be possible that with the inherit

Re: UISegmentedControl description is wrong.

2012-06-24 Thread Gavin Stokes
Thanks, guys. I knew that this is how it usually works, but started wondering because the doc seems to go out of its way NOT to mention it. How can you write multiple (wrong) descriptions of this control without noting this fundamental aspect of its function? Not to mention the poor design of

Re: UISegmentedControl description is wrong.

2012-06-24 Thread Jens Alfke
On Jun 24, 2012, at 8:29 PM, Gavin Stokes wrote: I knew that this is how it usually works, but started wondering because the doc seems to go out of its way NOT to mention it. How can you write multiple (wrong) descriptions of this control without noting this fundamental aspect of its

Re: UISegmentedControl description is wrong.

2012-06-24 Thread Kyle Sluder
On Sun, Jun 24, 2012, at 08:38 PM, Jens Alfke wrote: Uh, guys, you _can_ make segmented controls act as other than radio buttons. It's just that the API for it is on the cell (NSSegmentedCell), not the control. Just change the tracking mode: UI, not NS. --Kyle Sluder

Trap mouse and keyboard events

2012-06-24 Thread Abhijeet Singh
Hi,I want to perform some action in my application whenever user presses any key on keyboard or uses the mouse. How can I trap these eventsThanksAbhijeetDear cocoadev ! Get Yourself a cool, short @in.com Email ID now! ___ Cocoa-dev mailing list