Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-10-19 Thread Marek Hrušovský
; I just had a beta tester contact me about a very similar error/crash. It's > slightly different than I've seen before, but it certainly seems related. > > The tester was closing a window backed by NSDocument. In response the > AppKit document machinery was attempting to create an NSSavePan

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-10-19 Thread Gary L. Wade
pages you should find related to the save panel UI hierarchy under sand boxing that should help, though. Search on things like NSSavePanel, sandbox, NSRemoteView, etc. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/ > On Oct 19, 2015, at 8:22 AM, Marek Hrušovský <xhrus...@gma

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-17 Thread Martin Wierschin
I just had a beta tester contact me about a very similar error/crash. It's slightly different than I've seen before, but it certainly seems related. The tester was closing a window backed by NSDocument. In response the AppKit document machinery was attempting to create an NSSavePanel, to allow

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Mike Abdullah
On 16 Jul 2015, at 02:33, Graham Cox graham@bigpond.com wrote: Pertinent details below - the line marked com.myapp contains the code listed previously, which is an action method invoked by a menu command. Date/Time: 2015-07-15 10:32:36.027 -0400 OS Version:

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Martin Wierschin
That logic makes good sense Mike. Unfortunately it doesn't seem to avert the crash. My own app, which still encounters this crash from time to time, actually already does what you suggest: after the save operation has been completed, the accessory view removes itself from the NSSavePanel

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Mike Abdullah
perhaps. This is Apple’s bug, but if my guess is correct, you could probably work around it by manually _removing_ your accessory view from NSSavePanel once the panel returns, rather than leaving semi-attached there. ___ Cocoa-dev mailing list (Cocoa-dev

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Martin Wierschin
I've also seen this crash, as reported by users of my own sandboxed app, though I've never reproduced it myself. I've also seen other situations where NSSavePanel and NSOpenPanel trigger XPC assertions/exceptions. For example: *** Assertion failure in +[NSXPCSharedListener

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Graham Cox
could probably work around it by manually _removing_ your accessory view from NSSavePanel once the panel returns, rather than leaving semi-attached there. In my case the accessory view is reused, in that it’s defined in a nib and referenced by an outlet. I keep a strong reference to it so

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-15 Thread Conrad Shultz
On Jul 15, 2015, at 3:53 PM, Graham Cox graham@bigpond.com wrote: This works 99% of the time, but sometimes it just crashes. This seems to occur when the app has just been activated after using a different app, and this save panel is requested within a few seconds of the activation,

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-15 Thread Graham Cox
On 16 Jul 2015, at 11:01 am, Conrad Shultz conrad_shu...@apple.com wrote: On Jul 15, 2015, at 3:53 PM, Graham Cox graham@bigpond.com wrote: This works 99% of the time, but sometimes it just crashes. This seems to occur when the app has just been activated after using a different

Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-15 Thread Graham Cox
In a sandboxed app, I do: NSSavePanel* sp = [NSSavePanel savePanel]; [sp setAccessoryView:some_view]; This works 99% of the time, but sometimes it just crashes. This seems to occur when the app has just been activated after using a different app, and this save panel is requested within

NSSavePanel load error

2014-10-27 Thread edward taffel
may have dirtied layout in the middle of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed. i have not sub-calsses NSSavePanel this only occurs on the first

Re: NSSavePanel load error

2014-10-27 Thread Lee Ann Rucker
of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed. i have not sub-calsses NSSavePanel this only occurs on the first NSSavePanel load; further close

Re: NSSavePanel load error

2014-10-27 Thread edward taffel
thanks for your speedy reply lee ann! pleased someone else thinks it a bug. cheers, edward ps: that should have read: ‘i have not sub-calssed NSSavePanel’. On Oct 27, 2014, at 3:49 PM, Lee Ann Rucker lruc...@vmware.com wrote: Apple bug - according to classdump, that class has had

NSSavePanel?

2014-03-06 Thread livinginlosangeles
What’s Adobe’s beef with NSSavePanel? I found this while running fs_usage on my computer. Adobe Easter Egg? 11:14:46 getattrlist /Volumes/DriveA/030514 0.14 Adobe Photos 11:14:46 getattrlist es/DriveA/030514/TestSave0.10 Adobe Photos 11:14:46 lstat64

Re: NSSavePanel?

2014-03-06 Thread Kyle Sluder
On Thu, Mar 6, 2014, at 11:20 AM, livinginlosange...@mac.com wrote: What’s Adobe’s beef with NSSavePanel? I found this while running fs_usage on my computer. Adobe Easter Egg? No clue, but this thread isn't going to provide any useful discussion. --Kyle Sluder

Re: NSSavePanel?

2014-03-06 Thread Todd Heberlein
-time Todd On Mar 6, 2014, at 11:20 AM, livinginlosange...@mac.com wrote: What’s Adobe’s beef with NSSavePanel? I found this while running fs_usage on my computer. Adobe Easter Egg? 11:14:46 getattrlist /Volumes/DriveA/030514 0.14 Adobe Photos 11:14:46 getattrlist

Re: NSSavePanel?

2014-03-06 Thread SevenBits
. For a detailed video on this problem, see Data Fence: Audit Data vs. Last Access Time http://www.toddheberlein.com/videos/2014/1/27/data-fence-audit-data-vs-last-access-time Todd On Mar 6, 2014, at 11:20 AM, livinginlosange...@mac.com wrote: What’s Adobe’s beef with NSSavePanel? I found

MODERATOR: End of Thread (was Re: NSSavePanel?)

2014-03-06 Thread Chris Hanson
This is off-topic for cocoa-dev. -- Chris Hanson, cocoa-dev co-moderator ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: NSSavePanel problem with sandboxing

2013-09-06 Thread Graham Cox
is implemented with respect to dialogs, or windows in general. It's implemented by NSController, which is not inherited by NSWindowController, and even if it were, NSSavePanel doesn't appear to have a window controller. If it's implemented by individual text fields, that means I'd have to track which text

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 Kyle Sluder
objects. What? No. There is no bug here. If your app is sandboxed, each NSSavePanel instance swaps out its implementation at runtime, based on whether Powerbox is showing the out-of-process save panel. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa

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 with sandboxing

2013-09-05 Thread Graham Cox
On 05/09/2013, at 8:31 PM, Kyle Sluder k...@ksluder.com 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

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

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Fritz Anderson
On 5 Sep 2013, at 1:27 PM, Graham Cox graham@bigpond.com 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

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 k...@ksluder.com 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

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
On 05/09/2013, at 8:54 PM, Kyle Sluder k...@ksluder.com 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

Dynamically change file name extension in NSSavePanel when extension is hidden

2013-07-10 Thread Antonio Nunes
Hi, I show an NSSavePanel that offers the option to hide the file extension. It also offers the user to switch between saving .txt and .rtf formats. When the user changes the format, the following code is run: - (IBAction)formatForTextExportChanged:(id)sender { self.textExportFormat

Re: Dynamically change file name extension in NSSavePanel when extension is hidden

2013-07-10 Thread Antonio Nunes
wrote: Hi, I show an NSSavePanel that offers the option to hide the file extension. It also offers the user to switch between saving .txt and .rtf formats. When the user changes the format, the following code is run: - (IBAction)formatForTextExportChanged:(id)sender

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-24 Thread Eric Gorr
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:@Save as HTML]; [sp

Re: NSSavePanel problem

2013-02-24 Thread Andy Lee
On Feb 24, 2013, at 12:50 AM, Quincey Morris quinceymor...@rivergatesoftware.com 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

Re: NSSavePanel problem

2013-02-24 Thread Andy Lee
. Also try the things Quincey mentioned to see if you can make the bug go away as mysteriously as it arose. --Andy On Feb 24, 2013, at 4:26 AM, Peter Hudson peter.hud...@me.com wrote: Here is the code for running the NSSavePanel. I run the panel using runModal. I simply never return from

Re: NSSavePanel problem

2013-02-24 Thread Peter Hudson
AM, Peter Hudson peter.hud...@me.com wrote: 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

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 Kyle Sluder
On Feb 24, 2013, at 8:21 AM, Peter Hudson peter.hud...@me.com 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

Re: NSSavePanel problem

2013-02-24 Thread Quincey Morris
! http://bugreport.apple.com. It could be that Apple knows about this issue already. Yes, and attaching a crash dump might provide sufficient information to isolate the problem. On Feb 24, 2013, at 01:26 , Peter Hudson peter.hud...@me.com wrote: NSSavePanel *sp = [NSSavePanel savePanel

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 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 out

Re: NSSavePanel problem

2013-02-24 Thread Kyle Sluder
On Feb 24, 2013, at 12:27 PM, Peter Hudson peter.hud...@me.com 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

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

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

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 peter.hud...@me.com 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

Re: NSSavePanel problem

2013-02-23 Thread Peter Hudson
_realDoModalLoop:peek:] + 334 28 com.apple.AppKit0x92a51404 -[NSApplication _doModalLoop:peek:] + 67 29 com.apple.AppKit0x92a515c5 -[NSApplication runModalForWindow:] + 198 30 com.apple.AppKit0x92cea55f -[NSSavePanel runModal] + 389 31

Re: NSSavePanel problem

2013-02-23 Thread Graham Cox
On 24/02/2013, at 10:49 AM, Peter Hudson peter.hud...@me.com 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?

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

Re: NSSavePanel problem

2013-02-23 Thread Mills, Steve
On Feb 23, 2013, at 18:43, Peter Hudson peter.hud...@me.com 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

Re: NSSavePanel problem

2013-02-23 Thread Andy Lee
it as a panel standalone - as opposed to as a sheet ? I don't remember the method name offhand, but you'll find it if you look at the docs for NSSavePanel. If you try it and the crash goes away, please let us know -- I'm curious. --Andy Peter On 24 Feb 2013, at 00:35, Graham Cox graham

Re: NSSavePanel problem

2013-02-23 Thread Quincey Morris
? I don't remember the method name offhand, but you'll find it if you look at the docs for NSSavePanel. If you try it and the crash goes away, please let us know -- I'm curious. Peter didn't run it as a sheet. You can see in line 30 of the backtrace that his app invoked -[NSSavePanel runModal

Re: NSSavePanel problem

2013-02-23 Thread Andy Lee
the sandboxing is irrelevant. How do you run it as a panel standalone - as opposed to as a sheet ? I don't remember the method name offhand, but you'll find it if you look at the docs for NSSavePanel. If you try it and the crash goes away, please let us know -- I'm curious. Peter didn't run

Re: NSSavePanel problem

2013-02-23 Thread Jon Gary
to as a sheet ? I don't remember the method name offhand, but you'll find it if you look at the docs for NSSavePanel. If you try it and the crash goes away, please let us know -- I'm curious. Peter didn't run it as a sheet. You can see in line 30 of the backtrace that his app invoked

Re: NSSavePanel problem

2013-02-23 Thread Quincey Morris
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 merely popping up a standard menu control would crash like this. 2. I have actually, maybe 3-4 times since 10.8 was released, had

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-23 Thread Thomas Bunch
Following up on my own question, NSSavePanel can be made to “work” under PowerBox with a UTI that has no file extension, but it does get upset with itself and fail an assertion when it elects to automatically turn on the hide extension checkbox in response to the user changing the file type

Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Thomas Bunch
Hi folks, NSSavePanel does not like UTTypes with no file extension. Under PowerBox, I can't find a good workaround. One of OmniPlan's export types is a directory full of HTML and associated resources. Being an old NeXT guy, I immediately called this a .htmld file, but when the feature

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Quincey Morris
On Jan 17, 2013, at 14:12 , Thomas Bunch t...@omnigroup.com wrote: Launch, take your document (very much a stub), File - Export…, My Flat Format. Now File - Export… again but this time pick My HTML Folder Export. If you have your file extensions visible you'll see at this point that the

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Thomas Bunch
Yes, in fact, I do exactly this. It's kind of suboptimal, in that NSSavePanel will first give you a warning: “Foo.oplx” already exists. Do you want to replace it?” and so on… the user will probably reflexively accept that one. Then we check and see that you're asking to dump a folder of web

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Quincey Morris
On Jan 17, 2013, at 16:20 , Thomas Bunch t...@omnigroup.com wrote: Yes, in fact, I do exactly this. It's kind of suboptimal, in that NSSavePanel will first give you a warning: “Foo.oplx” already exists. Do you want to replace it?” and so on… the user will probably reflexively accept

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Thomas Bunch
gotten it fixed. I will post an update tomorrow. I don't think your number 2 will be workable, since we're sandboxed/PowerBoxed here. If the NSSavePanel gives me a security scoped URL to a give file system path, I may not be able to write to a variant of that path. -Tom On Jan 17, 2013, at 4:57

Re: NSSavePanel default file type

2012-06-13 Thread Kurt Sutter
I have a save panel with a custom accessory view, but the file type popup is created by NSSavePanel If I had an offiacial way to get the NSPopUpButton I could send it a message to select the right item. Is there a way to get that button object? Are you using a pre-built export dialog

NSSavePanel default file type

2012-06-12 Thread Kurt Sutter
Hi list Our app allows to export its documents in a variety of formats, such as jpeg, tiff, png, pdf . Hence, we have set up the NSSavePanel to sport a file types popup that allows the user to select the desired file type. Now we want that save panel to remember the format of the last export

Re: NSSavePanel default file type

2012-06-12 Thread Kurt Sutter
I could, if there were an official api to get that NSPopUpButton. Is there? I did not find one. Kurt On 12. Jun 2012, at 23:15, Martin Wierschin wrote: Our app allows to export its documents in a variety of formats, such as jpeg, tiff, png, pdf . Hence, we have set up the NSSavePanel

Re: NSSavePanel default file type

2012-06-12 Thread Todd Freese
, if there were an official api to get that NSPopUpButton. Is there? I did not find one. Kurt On 12. Jun 2012, at 23:15, Martin Wierschin wrote: Our app allows to export its documents in a variety of formats, such as jpeg, tiff, png, pdf . Hence, we have set up the NSSavePanel to sport

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-10 Thread Samuel Williams
: I've had no problems at all with NSSavePanel under the sandbox (the inherited methods limitation that Graham mentioned excepted). My usage looks almost exactly like the code above except that I call -beginSheetModalForWindow:completionHandler: instead of -runModal. BUT. You need

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-08 Thread Samuel Williams
I've had no problems at all with NSSavePanel under the sandbox (the inherited methods limitation that Graham mentioned excepted). My usage looks almost exactly like the code above except that I call -beginSheetModalForWindow:completionHandler: instead of -runModal. BUT. You need

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-08 Thread Corbin Dunn
On Jun 8, 2012, at 11:20 AM, Samuel Williams space.ship.travel...@gmail.com wrote: I've had no problems at all with NSSavePanel under the sandbox (the inherited methods limitation that Graham mentioned excepted). My usage looks almost exactly like the code above except that I call

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-06 Thread Mike Abdullah
What entitlements do you have? On 6 Jun 2012, at 04:41, Samuel Williams wrote: Hi, I'm having trouble with NSSavePanel runModal in a sandbox: NSSavePanel * savePanel = [NSSavePanel savePanel]; savePanel.title = @Document Migration; savePanel.directoryURL = url

Preventing NSSavePanel from alerting file overwrite

2012-06-06 Thread Gordon Apple
Is there a way to block NSSavePanel from alerting a file overwrite? I¹m using it simply to establish a URL and later alert about overwrite when a record command is issued. I would prefer to not have the user see this twice. ___ Cocoa-dev mailing list

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-06 Thread Rainer Brockerhoff
is riddled with severe bugs under the current sandbox implementation? The dev forums will reveal more details. Also, NSSavePanel doesn't inherit from NSPanel under sandboxing, so if you are expecting to use inherited methods, they don't work. ... On 06/06/2012, at 1:41 PM, Samuel Williams

Re: Preventing NSSavePanel from alerting file overwrite

2012-06-06 Thread Lee Ann Rucker
On Jun 6, 2012, at 10:04 AM, Gordon Apple wrote: Is there a way to block NSSavePanel from alerting a file overwrite? I¹m using it simply to establish a URL and later alert about overwrite when a record command is issued. I would prefer to not have the user see this twice. Implement

Re: Preventing NSSavePanel from alerting file overwrite

2012-06-06 Thread Mike Abdullah
Use an NSOpenPanel instead? On 6 Jun 2012, at 18:04, Gordon Apple wrote: Is there a way to block NSSavePanel from alerting a file overwrite? I¹m using it simply to establish a URL and later alert about overwrite when a record command is issued. I would prefer to not have the user see

Re: Preventing NSSavePanel from alerting file overwrite

2012-06-06 Thread Fritz Anderson
: Open and Save Dialog Behavior with App Sandbox Certain NSOpenPanel and NSSavePanel methods behave differently when App Sandbox is enabled for your app: • You cannot invoke the OK button using the ok: method. • You cannot rewrite the user’s selection using

Re: Preventing NSSavePanel from alerting file overwrite

2012-06-06 Thread Corbin Dunn
On Jun 6, 2012, at 10:04 AM, Gordon Apple g...@ed4u.com wrote: Is there a way to block NSSavePanel from alerting a file overwrite? I¹m using it simply to establish a URL and later alert about overwrite when a record command is issued. I would prefer to not have the user see this twice

Re: Preventing NSSavePanel from alerting file overwrite

2012-06-06 Thread Gordon Apple
wrote: Use an NSOpenPanel instead? On 6 Jun 2012, at 18:04, Gordon Apple wrote: Is there a way to block NSSavePanel from alerting a file overwrite? I¹m using it simply to establish a URL and later alert about overwrite when a record command is issued. I would prefer to not have the user

NSSavePanel runModal isn't working in sandbox?

2012-06-05 Thread Samuel Williams
Hi, I'm having trouble with NSSavePanel runModal in a sandbox: NSSavePanel * savePanel = [NSSavePanel savePanel]; savePanel.title = @Document Migration; savePanel.directoryURL = url; savePanel.nameFieldStringValue = [url lastPathComponent]; savePanel.allowedFileTypes = [NSArray

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-05 Thread Graham Cox
Are you aware that this class is riddled with severe bugs under the current sandbox implementation? The dev forums will reveal more details. Also, NSSavePanel doesn't inherit from NSPanel under sandboxing, so if you are expecting to use inherited methods, they don't work. File bugs - we can't

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-05 Thread Samuel Williams
Hi Graham, What dev forums are you talking about? NSSavePanel seems completely unusable. Even the simplest example isn't working for me: - (void) finishLaunching { [super finishLaunching]; NSSavePanel * savePanel = [NSSavePanel savePanel]; [savePanel runModal]; NSLog(@End model session

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-05 Thread Graham Cox
in the documentation. However, Apple engineers contributing to the forums are more candid. The current documentation does talk about the differences with NSSavePanel, or at least how it's supposed to work: https://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide

Re: NSSavePanel: Another sandbox issue

2012-05-31 Thread Alex Zavatone
On May 30, 2012, at 10:54 PM, Marco S Hyman wrote: 3. When I use -setDirectoryURL: and the URL is somewhere in my sandbox, the actual URL displayed is the old location, back in ~/Library/Application Support (!) When using a sandbox in Mac OS X 10.7 and later, the home directory is the

Re: NSSavePanel: Another sandbox issue

2012-05-31 Thread Kyle Sluder
On May 31, 2012, at 2:43 PM, Alex Zavatone wrote: So, before I start waving my hands in the air, running around the office and panicking, does this mean that the user can not save files where ever he/she wants to on the HD in future versions of the Mac OS? No, it's completely and totally

Re: NSSavePanel: Another sandbox issue

2012-05-31 Thread Alex Zavatone
On May 31, 2012, at 5:46 PM, Kyle Sluder wrote: On May 31, 2012, at 2:43 PM, Alex Zavatone wrote: So, before I start waving my hands in the air, running around the office and panicking, does this mean that the user can not save files where ever he/she wants to on the HD in future

Re: NSSavePanel: Another sandbox issue

2012-05-31 Thread Marco S Hyman
On May 31, 2012, at 2:46 PM, Kyle Sluder wrote: On May 31, 2012, at 2:43 PM, Alex Zavatone wrote: So, before I start waving my hands in the air, running around the office and panicking, does this mean that the user can not save files where ever he/she wants to on the HD in future

Re: NSSavePanel: Another sandbox issue

2012-05-31 Thread Alex Zavatone
On May 31, 2012, at 5:46 PM, Kyle Sluder wrote: On May 31, 2012, at 2:43 PM, Alex Zavatone wrote: So, before I start waving my hands in the air, running around the office and panicking, does this mean that the user can not save files where ever he/she wants to on the HD in future

NSSavePanel: Another sandbox issue

2012-05-30 Thread Graham Cox
:] () The code is very simple: NSSavePanel*savePanel = [NSSavePanel savePanel]; define completion handler - omitted for brevity [savePanel setCanCreateDirectories:YES]; [savePanel setCanSelectHiddenExtension:NO]; [savePanel

Re: NSSavePanel: Another sandbox issue

2012-05-30 Thread Graham Cox
0x7fff8e2f2389 -[FIFinderView setViewStyle:] + 253 15 AppKit 0x7fff8b389cd7 -[NSSavePanel beginWithCompletionHandler:] + 88 16 com.apple.security.pboxd0x00010f0e985f com.apple.security.pboxd + 14431 17

Re: NSSavePanel: Another sandbox issue

2012-05-30 Thread Graham Cox
On 31/05/2012, at 9:57 AM, Graham Cox wrote: So, internally the panel is throwing an exception, due to a nil object. But why? what am I doing wrong here? OK, some more discoveries. 1. The problem only occurs with a delegate set on the panel. The delegate isn't called - just its presence

Re: NSSavePanel: Another sandbox issue

2012-05-30 Thread Kyle Sluder
On May 30, 2012, at 7:54 PM, Marco S Hyman m...@snafu.org wrote: In a sandboxed app that will be /Users/user/Library/Containers/app/Data/Documents/ What? No! The whole point of sandboxing and NSSavePanel is that Powerbox will poke holes into the user's *actual* Documents directory. Graham

Re: NSSavePanel: Another sandbox issue

2012-05-30 Thread Graham Cox
On 31/05/2012, at 12:54 PM, Marco S Hyman wrote: The user doesn't know or care what the actual path is. Why are you trying to show it in a save dialog. I don't, as such, but the save panel shows the full path and it's simply wrong. I have a specific location inside my Application Support

Re: NSSavePanel: Another sandbox issue

2012-05-30 Thread Roland King
P.S. Just saw this: http://www.macworld.com.au/news/ac-devs-air-frustrations-at-mac-app-store-sandboxing-debacle-55502/ I would say that's a pretty reasonable article about the current state of sandboxing as I understand it. I've given up for a while on the OSX thing I was writing

Proper handling of NSSavePanel and 'Do you want to replace it?' dialog

2011-09-16 Thread Sean McBride
Hi all, NSSavePanel will automatically show the user a 'Do you want to replace' sheet if he tries to save with an existing name. What the correct way to proceed when replacement is needed? Option 1: First delete the existing item yourself. I've read this doesn't work when sandboxed (not sure

Re: Proper handling of NSSavePanel and 'Do you want to replace it?' dialog

2011-09-16 Thread Nick Zitzmann
On Sep 16, 2011, at 12:33 PM, Sean McBride wrote: Hi all, NSSavePanel will automatically show the user a 'Do you want to replace' sheet if he tries to save with an existing name. What the correct way to proceed when replacement is needed? Option 1: First delete the existing item

Re: NSSavePanel called from 64-bit NPAPI plugin

2011-06-25 Thread Kevin Peterson
On 6/19/2011 10:41 PM, Kevin Peterson wrote: I'm attempting a save as [NSSavePanel savePanel] modal dialog from an NPAPI plugin compiled for x86_64 and running under Safari 5.0.5 on OSX 10.6.7. Whenever the call to runModal completes Safari ends up in a wedged state in which none of menu

NSSavePanel called from 64-bit NPAPI plugin

2011-06-20 Thread Kevin Peterson
I'm attempting a save as [NSSavePanel savePanel] modal dialog from an NPAPI plugin compiled for x86_64 and running under Safari 5.0.5 on OSX 10.6.7. Whenever the call to runModal completes Safari ends up in a wedged state in which none of menu pull downs are accessible (all greyed out

Re: NSSavePanel panel:shouldShowFilename:

2010-11-17 Thread Corbin Dunn
On Nov 15, 2010, at 7:57 PM, Leo wrote: From: Quincey Morris quinceymor...@earthlink.net a number of system extensions (like Default Folder, but I think that wasn't the first) added the ability to option-click on a disabled item to prefill the text field with an existing name, At some

Re: NSSavePanel panel:shouldShowFilename:

2010-11-16 Thread Leo
From: Quincey Morris quinceymor...@earthlink.net a number of system extensions (like Default Folder, but I think that wasn't the first) added the ability to option-click on a disabled item to prefill the text field with an existing name, At some point (possibly Mac OS X 10.0), Apple quietly

NSSavePanel panel:shouldShowFilename:

2010-11-15 Thread Stephen Blinkhorn
Hello, Something doesn't seem right here. Returning NO for NSSavePanel's panel:shouldShowFilename: delegate will grey out/de-activate an item in the file browser but the item can still be selected and doing so copies the file name string into the Save As: text field. Is this the

Re: NSSavePanel panel:shouldShowFilename:

2010-11-15 Thread Graham Cox
On 16/11/2010, at 10:41 AM, Stephen Blinkhorn wrote: Returning NO for NSSavePanel's panel:shouldShowFilename: delegate will grey out/de-activate an item in the file browser but the item can still be selected and doing so copies the file name string into the Save As: text field. Is this

Re: NSSavePanel panel:shouldShowFilename:

2010-11-15 Thread Kyle Sluder
On Mon, Nov 15, 2010 at 3:41 PM, Stephen Blinkhorn stephen.blinkh...@audiospillage.com wrote: Hello, Something doesn't seem right here. Returning NO for NSSavePanel's panel:shouldShowFilename: delegate will grey out/de-activate an item in the file browser but the item can still be selected

Re: NSSavePanel panel:shouldShowFilename:

2010-11-15 Thread Quincey Morris
On Nov 15, 2010, at 15:41, Stephen Blinkhorn wrote: Returning NO for NSSavePanel's panel:shouldShowFilename: delegate will grey out/de-activate an item in the file browser but the item can still be selected and doing so copies the file name string into the Save As: text field. Is this

Re: NSSavePanel panel:shouldShowFilename:

2010-11-15 Thread Stephen Blinkhorn
Thanks for the comprehensive replies. On 15 Nov 2010, at 17:47, Graham Cox wrote: On 16/11/2010, at 10:41 AM, Stephen Blinkhorn wrote: Returning NO for NSSavePanel's panel:shouldShowFilename: delegate will grey out/de-activate an item in the file browser but the item can still be

  1   2   3   >