Re: NSSavePanel problem with sandboxing

2013-09-06 Thread Kyle Sluder
On Fri, Sep 6, 2013, at 08:16 AM, Manfred Schwind wrote: > > the pointer value for the save panel never changes, but the object it > > points to has some serious changes of identity. > > For me this sounds like an "overrelease" or "access after release" > problem. > You could try to run with enab

Re: NSSavePanel problem with sandboxing

2013-09-06 Thread Manfred Schwind
> the pointer value for the save panel never changes, but the object it points > to has some serious changes of identity. For me this sounds like an "overrelease" or "access after release" problem. You could try to run with enabled zombie objects. Regards, Mani

Re: NSSavePanel problem with sandboxing

2013-09-06 Thread Graham Cox
On 06/09/2013, at 1:33 AM, Fritz Anderson wrote: > The next thing I'd do is to see if the protocol would be of any > comfort. I think it may even be preferred to resetting the window's first > responder. It's never been clear to me how that protocol is implemented with respect to dialogs,

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
On 05/09/2013, at 8:54 PM, Kyle Sluder wrote: > What happens if you ask one of your accessory controls for its -window > and ask _that_ object to -makeFirstResponder:? That window should be in > your own process. Works on 10.8, but in fact the control's window is the same object as the save p

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Kyle Sluder
On Thu, Sep 5, 2013, at 11:33 AM, Graham Cox wrote: > > On 05/09/2013, at 8:31 PM, Kyle Sluder wrote: > > > Is this even necessary? The save panel's values should be correct at > > time of dismissal. > > > But fields in my accessory view might not be. That's the problem I'm > trying to solve -

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Fritz Anderson
On 5 Sep 2013, at 1:27 PM, Graham Cox wrote: > I'm using NSSavePanel in a sandboxed app. The panel includes a custom > accessory view, which works fine. > > I run the panel using -[NSSavePanel > beginSheetModalForWindow:completionHandler:]; > > In the completion handler, I call [savePanel mak

NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
I'm using NSSavePanel in a sandboxed app. The panel includes a custom accessory view, which works fine. I run the panel using -[NSSavePanel beginSheetModalForWindow:completionHandler:]; In the completion handler, I call [savePanel makeFirstResponder:savePanel] so that any text fields left in a

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
On 05/09/2013, at 8:31 PM, Kyle Sluder wrote: > Is this even necessary? The save panel's values should be correct at > time of dismissal. But fields in my accessory view might not be. That's the problem I'm trying to solve - I've entered a value in a text field but have done nothing to 'commi

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Kyle Sluder
On Thu, Sep 5, 2013, at 11:27 AM, Graham Cox wrote: > What can I do here to workaround this? Is this even necessary? The save panel's values should be correct at time of dismissal. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSSavePanel problem

2013-02-24 Thread Peter Hudson
As you suggested Kyle, I tried to log this as a bug on bugreporter - but I couldn't log on due to a bug in the log on process. I was directed to a page to advise Apple of my difficulties I'll try again tommorrow. Thanks again Quincy. Peter On 24 Feb 2013, at 21:28, Kyle Sluder wrote:

Re: NSSavePanel problem

2013-02-24 Thread Kyle Sluder
On Feb 24, 2013, at 12:27 PM, Peter Hudson wrote: > I commented out the setRequiredFileType: and all is well again. > > As you point out, this method is deprecated. > > I've never come across a deprecated method that malfunctions beforeā€¦... And it shouldn't! Please file a bug. Hopefu

Re: NSSavePanel problem

2013-02-24 Thread Peter Hudson
Well Quincey, your comment on the last line of code here was salient :- > NSSavePanel *sp = [NSSavePanel savePanel]; > [sp setTitle:@"Save as HTML"]; > [sp setRequiredFileType:@"html"]; I commented out the setRequiredFileType: and all is well again. As you point

Re: NSSavePanel problem

2013-02-24 Thread Eric Gorr
It may take more effort to reproduce the problem then just building a minimal app with a NSSavePanel. I have little doubt that works as, if it did not, nearly every application out there would be crashing and they aren't. It will take effort, but you will likely need to replicate the conditions

Re: NSSavePanel problem

2013-02-24 Thread Quincey Morris
On Feb 24, 2013, at 09:10 , Kyle Sluder wrote: > If that doesn't clear the problem, try launching your app with the Shift key > held down (or turn on "Don't restore windows" in your Debug scheme's editor, > or set the ApplePersistenceIgnoreState default to YES). Good idea. I'd also try using

Re: NSSavePanel problem

2013-02-24 Thread Kyle Sluder
On Feb 24, 2013, at 8:21 AM, Peter Hudson wrote: > > Having spent ( to my horror ) nearly a 100 hours trying to run this to > ground, I have decided that our users won't get an option where to put their > files. > I'll create a directory on the desktop for them and dump any output into that

Re: NSSavePanel problem

2013-02-24 Thread Peter Hudson
I have built a minimal app in xCode 4.6 ( latest release ) running on 10.8.2 - and naturally the directory popup in the NSSavePanel works perfectly. I started the save panel, as before, with runModal. I have gone back to my main app and stripped the method to practically nothing but setting

Re: NSSavePanel problem

2013-02-24 Thread Peter Hudson
I'll see if I can reproduce this problem in a small app. Many thanks to everyone. Peter On 24 Feb 2013, at 13:35, Andy Lee wrote: > Okay, you're calling plain old runModal, so that rules out a contextInfo > memory management bug. And you don't set a delegate, so that rules out > another pl

Re: NSSavePanel problem

2013-02-24 Thread Andy Lee
Okay, you're calling plain old runModal, so that rules out a contextInfo memory management bug. And you don't set a delegate, so that rules out another place to look for bugs. I'm stumped. I'd repeat Eric's suggestion to reduce this to the simplest possible app that reproduces the problem. Also

Re: NSSavePanel problem

2013-02-24 Thread Andy Lee
On Feb 24, 2013, at 12:50 AM, Quincey Morris wrote: > About the only plausible way an app's code might affect something like this, > which is straightforwardly deep in NSSavePanel code, might be if there was an > accessory view doing something wrong. But even then, it seems unlikely that > mer

Re: NSSavePanel problem

2013-02-24 Thread Eric Gorr
If you attempt to develop a sample application which reproduces the problem, can you do so? If so, making the sample application available might be quite useful in tracking down the problem. On Feb 24, 2013, at 4:26 AM, Peter Hudson wrote: > Here is the code for running the NSSavePanel. > I r

Re: NSSavePanel problem

2013-02-24 Thread Peter Hudson
Here is the code for running the NSSavePanel. I run the panel using runModal. I simply never return from the runModal if I click the directory popup. Peter -(IBAction)exportDayOutOfDaysReportToHTML:(id)sender { NSSavePanel *sp = [NSSavePanel savePanel]; [sp setTitle:@"

Re: NSSavePanel problem

2013-02-23 Thread Quincey Morris
On Feb 23, 2013, at 20:46 , Jon Gary wrote: > Just because a crash happens in an apple framework doesn't mean it's note our > bug. If you can't take the time to run the code with zombies on, it's a > waste of everyone else's time guessing what's going on. Sure, I wasn't intending to suggest

Re: NSSavePanel problem

2013-02-23 Thread Jon Gary
Just because a crash happens in an apple framework doesn't mean it's note our bug. If you can't take the time to run the code with zombies on, it's a waste of everyone else's time guessing what's going on. -- Jon On Feb 23, 2013, at 9:57 PM, Quincey Morris wrote: > On Feb 23, 2013, at 18:1

Re: NSSavePanel problem

2013-02-23 Thread Andy Lee
On Feb 23, 2013, at 9:57 PM, Quincey Morris wrote: > On Feb 23, 2013, at 18:12 , Andy Lee wrote: > >> Also, to repeat part of Graham's question: is the window you're attaching >> the sheet to a floating window or a regular window? Maybe the sandboxing is >> irrelevant. >> >>> How do you run

Re: NSSavePanel problem

2013-02-23 Thread Quincey Morris
On Feb 23, 2013, at 18:12 , Andy Lee wrote: > Also, to repeat part of Graham's question: is the window you're attaching the > sheet to a floating window or a regular window? Maybe the sandboxing is > irrelevant. > >> How do you run it as a panel standalone - as opposed to as a sheet ? > > I d

Re: NSSavePanel problem

2013-02-23 Thread Andy Lee
On Feb 23, 2013, at 7:40 PM, Peter Hudson wrote: > I wondered if it's possible to run the save panel without the row of widgets > which the directory picker popup is in ? > I couldn't find an API to remove it though. It might be possible, but I doubt it -- those controls seem an integral part o

Re: NSSavePanel problem

2013-02-23 Thread Mills, Steve
On Feb 23, 2013, at 18:43, "Peter Hudson" wrote: > I'm not using sandboxing - the app only runs on OSX. > > I wondered if it's possible to run the save panel without the row of widgets > which the directory picker popup is in ? >From the look of that crash log, it looks like something could be

Re: NSSavePanel problem

2013-02-23 Thread Peter Hudson
I'm not using sandboxing - the app only runs on OSX. I wondered if it's possible to run the save panel without the row of widgets which the directory picker popup is in ? I couldn't find an API to remove it though. How do you run it as a panel standalone - as opposed to as a sheet ? Peter On

Re: NSSavePanel problem

2013-02-23 Thread Graham Cox
On 24/02/2013, at 10:49 AM, Peter Hudson wrote: > Here is a truncated crash log - whole log exceeds dev-list max size; I have seen something similar when running the save panel as a sheet attached to a floating window with sandboxing does that sound like your situation? I fixed it tempor

Re: NSSavePanel problem

2013-02-23 Thread Peter Hudson
Hi Jon Here is a truncated crash log - whole log exceeds dev-list max size; Process: WattWenn [215] Path:/Users/USER/Desktop/*/WattWenn.app/Contents/MacOS/WattWenn Identifier: WattWenn Version: V 3.1 Beta [ 0344-20120504 UI Change ] (???) Code Type: X86 (N

Re: NSSavePanel problem

2013-02-23 Thread Jon Gary
Post a crash log? Did you run with zombies on? -- Jon On Feb 23, 2013, at 6:14 PM, Peter Hudson wrote: > Hi All > > I use an NSSavePanel to save data to file in HTML format. > This panel is run from a button in one of the panels in the app. > > The whole mechanism has been working absolut

NSSavePanel problem

2013-02-23 Thread Peter Hudson
Hi All I use an NSSavePanel to save data to file in HTML format. This panel is run from a button in one of the panels in the app. The whole mechanism has been working absolutely fine for a long time - up until 10.8. I know find that if I click in the "select directory popup" that the app