Re: Imported UTI taking precedence over Exported UTI

2016-07-01 Thread Matthew LeRoy
On 7/1/16, 4:26 PM, "Quincey Morris" <quinceymor...@rivergatesoftware.com> wrote: > >On Jul 1, 2016, at 13:03 , Matthew LeRoy <mle...@minitab.com> wrote: > > > Just to clarify, there’s only one file extension in question here. > > > > >

Re: Imported UTI taking precedence over Exported UTI

2016-07-01 Thread Matthew LeRoy
On July 1, 2016, at 12:52 PM, Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: >On Jul 1, 2016, at 09:18 , Matthew LeRoy <mle...@minitab.com> wrote: > > > Steps to troubleshoot/rectify the issue? > > > >Since it’s hard to find out what’s goi

Imported UTI taking precedence over Exported UTI

2016-07-01 Thread Matthew LeRoy
Hi, I’m having an issue where it appears that an Imported UTI for a certain file extension declared by one application is taking precedence over an Exported UTI for the same file extension declared by a second application. Everything I’ve read in the docs and elsewhere states that Exported

RE: NSTableView is messaging zombie delegate

2016-05-09 Thread Matthew LeRoy
On May 8, 2016, at 13:19, Quincey Morris wrote: If you look at your backtrace again, you’ll see that it crashed doing something with rows. It’s as likely trying to message your data source as your delegate. You should nil that as well. Note

Re: NSTableView is messaging zombie delegate

2016-05-08 Thread Matthew LeRoy
>On May 6, 2016, at 1:03 PM, Matthew LeRoy <mle...@minitab.com> wrote: > > My understanding is that NSTableView's delegate is a zeroing weak > reference > > >Are you sure? Historically it’s been unsafe_unretained — in the old days >before weak references or AR

NSTableView is messaging zombie delegate

2016-05-06 Thread Matthew LeRoy
Hello, I'm having an issue where an NSTableView appears to be messaging its delegate after the delegate has been deallocated, causing an EXC_BAD_ACCESS crash. It doesn't always happen, but it happens regularly. My understanding is that NSTableView's delegate is a zeroing weak reference, and so

Sizing NSScrollView width to exactly fit NSTableView

2015-07-07 Thread Matthew LeRoy
Hi, I’m trying to figure out how to correctly calculate the required width of an NSScrollView such that it will exactly fit the NSTableView inside, with no horizontal scroller and no “filler column” to the right of the last column in the table. The number of columns in the table changes based

Re: NSDocumentTitlebarPopoverViewController zombie on Yosemite

2015-05-29 Thread Matthew LeRoy
/ On May 28, 2015, at 11:34 AM, Matthew LeRoy mle...@minitab.commailto:mle...@minitab.com wrote: Hi, Anybody know anything about NSDocumentTitlebarPopoverViewController, and/or why I’m getting application crashes due to a zombie’d instance thereof? Document-based app, Deployment Target and SDK

NSDocumentTitlebarPopoverViewController zombie on Yosemite

2015-05-28 Thread Matthew LeRoy
Hi, Anybody know anything about NSDocumentTitlebarPopoverViewController, and/or why I’m getting application crashes due to a zombie’d instance thereof? Document-based app, Deployment Target and SDK both 10.8. Built using Xcode 5.1.1 (5B1008) on Yosemite 10.10.3; running on the same system.

Re: Open document panel always on top - Mountain Lion

2014-10-15 Thread Matthew LeRoy
On 10/10/14, 8:29 PM, Quincey Morris quinceymor...@rivergatesoftware.commailto:quinceymor...@rivergatesoftware.com wrote: On Oct 10, 2014, at 13:34 , Matthew LeRoy mle...@minitab.commailto:mle...@minitab.com wrote: Not entirely sure where to go from here. It’s not clear to me whether

Re: Open document panel always on top - Mountain Lion

2014-10-10 Thread Matthew LeRoy
Ah, I see, I thought you were already *providing* a completion handler somewhere, but I guess you’re not. In that case, I think you would override -[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:], like this: … snip … Just make sure that the password

Open document panel always on top - Mountain Lion

2014-10-09 Thread Matthew LeRoy
Good morning, My document-based application can potentially display an app-modal dialog via [NSApp runModalForWindow:] from within my override of [NSDocument readFromURL:ofType:error:], in order to prompt the user for the password to open a document. For the most part, this works just fine.

Re: Open document panel always on top - Mountain Lion

2014-10-09 Thread Matthew LeRoy
On 10/9/14, 1:00 PM, Quincey Morris quinceymor...@rivergatesoftware.commailto:quinceymor...@rivergatesoftware.com wrote: On Oct 9, 2014, at 07:21 , Matthew LeRoy mle...@minitab.commailto:mle...@minitab.com wrote: My document-based application can potentially display an app-modal dialog via

Re: Open document panel always on top - Mountain Lion

2014-10-09 Thread Matthew LeRoy
On 10/9/14, 4:06 PM, Quincey Morris quinceymor...@rivergatesoftware.commailto:quinceymor...@rivergatesoftware.com wrote: On Oct 9, 2014, at 12:33 , Matthew LeRoy mle...@minitab.commailto:mle...@minitab.com wrote: I agree this sounds like a better idea. There’s no good reason I can’t prompt

Prompting user (NSAlert) during document reading

2014-08-27 Thread Matthew LeRoy
Good morning, I’ve got a scenario where I need to prompt the user during reading of a document in my OS X document-based application. There have been some minor changes to the format of my document files, and I need to support opening documents saved in the old format and prompting the user to

Re: Prompting user (NSAlert) during document reading

2014-08-27 Thread Matthew LeRoy
On 8/27/14, 12:32 PM, Kyle Sluder k...@ksluder.com wrote: On Aug 27, 2014, at 8:43 AM, edward taffel etaf...@me.com wrote: On Aug 27, 2014, at 11:30 AM, Matthew LeRoy mle...@minitab.com wrote: This seems to work in initial testing ‹ the alert displays ‹ but I get a message in the console

Re: Document architecture: locking document files while open

2014-05-23 Thread Matthew LeRoy
On 5/22/14, 12:21 PM, Jens Alfke j...@mooseyard.com wrote: If you implement the lower-level read/write methods in NSDocument, you have full control over opening and closing the file. You can then make whatever filesystem calls you want to lock/unlock it. You¹re talking about

Document architecture: locking document files while open

2014-05-22 Thread Matthew LeRoy
Good morning, Does anyone have any idea if there is a way to get the document architecture to lock a document file when it is opened? When I say “lock”, I’m talking about an exclusive file lock at the filesystem level, as in no other user or process can open, move, or delete the file. I’m not

Document Architecture: saving or renaming a document overtop of an existing, open document

2014-02-05 Thread Matthew LeRoy
I’m getting a weird experience in my document-based application while doing something that I thought surely would have been accounted for automatically by the document architecture. Namely, saving (or renaming) a document overtop of an existing document which is also open in the app. Say I

Preserving undo actions on deleted targets

2014-01-29 Thread Matthew LeRoy
I’m wondering if someone can provide some guidance or best practices on how I might preserve actions on the undo/redo stack when the target of those actions is deleted? For example, say I have an application that allows me to add and remove records to and from a list — employee records, items

Re: Preserving undo actions on deleted targets

2014-01-29 Thread Matthew LeRoy
On Jan 29, 2014, at 11:07 AM, Keary Suska cocoa-...@esoteritech.com wrote: As the object of an action the deleted object should be retained by NSUndoManager, so you don't have to track it yourself. *light bulb* For whatever reason, I had it in my head that neither the target of the undo

Odd behavior re: -windowWillReturnUndoManager:

2014-01-16 Thread Matthew LeRoy
Good morning, I’m implementing a floating document inspector for my document-based app, and am having trouble getting undo/redo working reliably when the inspector is the key window. Specifically, NSWindowDelegate’s -windowWillReturnUndoManager: doesn’t seem to be doing the trick like

Re: Implementing keyboard shortcuts for shifting focus

2013-11-22 Thread Matthew LeRoy
On Nov 22, 2013, at 12:55 AM, dangerwillrobinsondan...@gmail.com wrote: Sent from my iPhone On 2013/11/22, at 0:19, Matthew LeRoy mle...@minitab.com wrote: Good morning, I've got a document-based application and I'm trying to figure out the proper way to implement keyboard shortcuts

NSTextField: edits are committed even when -control:isValidObject: returns NO

2013-07-11 Thread Matthew LeRoy
Good morning, I'm trying to implement some input validation on an NSTextField using NSControlTextEditingDelegate's -control:isValidObject: method -- simple stuff like validating that the entered text is parsable as a number, falls within a certain range, etc. (I know that NSNumberFormatter is

Re: NSTextField: edits are committed even when -control:isValidObject: returns NO

2013-07-11 Thread Matthew LeRoy
to be the delegate -- or subclass NSTextField and implement textShouldEndEditing: there. On Jul 11, 2013, at 12:39 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Jul 11, 2013, at 9:00 AM, Matthew LeRoy wrote: I'm trying to implement some input validation on an NSTextField using

Re: NSTextField: edits are committed even when -control:isValidObject: returns NO

2013-07-11 Thread Matthew LeRoy
...@rivergatesoftware.com wrote: On Jul 11, 2013, at 11:23 , Matthew LeRoy mle...@minitab.commailto:mle...@minitab.com wrote: I had previously considered the same approach you suggested regarding adding to the checkbox's action method. The problem is that our desired behavior is to allow the checkbox

Re: [SOLVED] NSTextField: edits are committed even when -control:isValidObject: returns NO

2013-07-11 Thread Matthew LeRoy
Boy, do I feel like a dummy. While investigating when setObjectValue: is getting called on the cell, I set a breakpoint in my override of that method and decided to check the call stack to see who was calling it -- assuming that it was the text field itself in its implementation of

NSOpenPanel not properly validating/updating with respect to allowedFileTypes

2013-07-02 Thread Matthew LeRoy
Hi, I'm looking for some help troubleshooting some behavior with NSOpenPanel, where it doesn't seem to be properly validating and updating the user interface with respect to changes I'm making to allowedFileTypes. This is in a Document-based app using the 10.7 SDK, running on 10.8.3. I've