Re: Messed up UTIs in NSDocument-based application

2012-01-13 Thread Michael Thon
What happens if you define two document types? "My Document", Extension: "myext", Identifier: "" "My Document", Extension: "myext", Identifier: "com.mycompany.myext" Although it might be better to use a new extension for the new doc type. On Jan 11, 2012, at 4:26 AM, Donald Ness wrote: > So I re

Re: Problem in updating NSTextView on Mac OS X 10.7

2011-09-07 Thread Michael Thon
On Sep 2, 2011, at 3:25 PM, Payal Mundhada wrote: > > > > > Hi All, > > I have programatically added NSTextView Object. > > I want to remove old text from it and insert the new text. This NSTextView > object is not editable. I am setting value in it using function setString. > > I want t

Re: using AppKit additions in background threads

2011-09-06 Thread Michael Thon
On Sep 6, 2011, at 9:23 PM, Douglas Davidson wrote: > > On Sep 6, 2011, at 11:53 AM, Jens Alfke wrote: > >> On Sep 6, 2011, at 11:11 AM, Michael Thon wrote: >> >>> Yup, they're HTML, all right. Now I'm thinking of moving this code to a >>> s

Re: using AppKit additions in background threads

2011-09-06 Thread Michael Thon
On Sep 7, 2011, at 4:22 AM, Glenn L. Austin wrote: > I would ship the files pre-converted. > If I could do that I wouldn't have any of these problems in the first place. The app is converting users' documents. > On Sep 6, 2011, at 4:29 PM, Mark Munz wrote: > >> One thing that 3rd party dev

Re: using AppKit additions in background threads

2011-09-06 Thread Michael Thon
On Sep 6, 2011, at 6:23 PM, Douglas Davidson wrote: > > On Sep 6, 2011, at 9:20 AM, Michael Thon wrote: > >> I'm importing data to an NSAttributedString using the method: >> initWithData:options:documentAttributes:error: which is an AppKit addition >> to NSA

using AppKit additions in background threads

2011-09-06 Thread Michael Thon
I'm importing data to an NSAttributedString using the method: initWithData:options:documentAttributes:error: which is an AppKit addition to NSAttributedString. I'm doing this in an NSOperation running on a separate thread, and what I see is that the UI of the app becomes unresponsive while thi

tools for writing help books

2011-06-08 Thread Michael Thon
What tools to y'all recommend for writing content for the help viewer on Mac OS? Do you write them directly in html/xhtml? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Cont

Re: WebKit: how to handle downloadable files?

2011-01-05 Thread Michael Thon
hat I should be able to know the MIME type before any of the WebFrameLoad delegate methods are called, but I'm not sure how. On Jan 5, 2011, at 12:59 PM, Mike Abdullah wrote: > What do you mean by "handle" them? > > On 5 Jan 2011, at 11:47, Michael Thon wrote: > >

WebKit: how to handle downloadable files?

2011-01-05 Thread Michael Thon
I'm looking through the WebKit Programming Guide but I can't find any documentation on how to handle files that should be downloaded instead of displayed in the webview. Can anyone point me to an example or some documentation? Thanks ___ Cocoa-dev m

Re: Search Kit memory management

2010-08-01 Thread Michael Thon
On Aug 1, 2010, at 6:44 PM, Ken Thomases wrote: > On Aug 1, 2010, at 11:10 AM, Michael Thon wrote: > >> I should probably just stick to my observations and state that "Real Mem" in >> Activity Monitor is reduced by several hundred MB when the NSOperation >>

Re: Search Kit memory management

2010-08-01 Thread Michael Thon
On Aug 1, 2010, at 3:12 PM, Ken Thomases wrote: > On Aug 1, 2010, at 1:43 AM, Michael Thon wrote: > >> I am indexing possibly tens of thousands of documents. No matter what I >> tried, I could not get search kit to release its memory, even after closing >> the ind

Re: Search Kit memory management

2010-08-01 Thread Michael Thon
> > Hi Mike, > > What happens if you periodically call SKIndexFlush() in your loop? > > After closing the index, did you use Instruments to confirm that your > allocated memory is still allocated or did you look at memory usage in > Activity Monitor? Due to underlying memory management, Activi

Re: Search Kit memory management

2010-07-31 Thread Michael Thon
On Jul 31, 2010, at 12:15 PM, Ken Thomases wrote: > On Jul 31, 2010, at 2:24 AM, Michael Thon wrote: > >> I am indexing a large set of files using Search Kit. I find that memory >> usage (reported by Activity Monitor) keeps growing in my app, as it indexes >> more

Search Kit memory management

2010-07-31 Thread Michael Thon
I am indexing a large set of files using Search Kit. I find that memory usage (reported by Activity Monitor) keeps growing in my app, as it indexes more documents. I don't find any memory leaks. In Instruments, I find that there can sometimes be hundreds of SKDocumentRef objects marked as liv

Re: phrase searching with SearchKit

2010-07-02 Thread Michael Thon
On Jul 2, 2010, at 11:09 AM, Michael Thon wrote: > I'm trying to set up an index with SearchKit and search it with quoted > phrases. It is my understanding that I need to enable proximity indexing to > get phrase searches to work. If I don't enable proximity indexing, th

phrase searching with SearchKit

2010-07-02 Thread Michael Thon
I'm trying to set up an index with SearchKit and search it with quoted phrases. It is my understanding that I need to enable proximity indexing to get phrase searches to work. If I don't enable proximity indexing, then it seems like my quoted string is treated as separate search terms. Howeve

Re: using a tableview delegate

2010-02-05 Thread Michael Thon
On Feb 5, 2010, at 10:52 PM, Graham Cox wrote: > > On 06/02/2010, at 1:38 AM, Michael Thon wrote: > >> I guess it must come from NSTableView. > > > A guess isn't a lot to go on. Set a break point on objc_exception_throw and > find out? Your reply prompted

Re: using a tableview delegate

2010-02-05 Thread Michael Thon
On Feb 5, 2010, at 12:13 PM, Graham Cox wrote: > > On 05/02/2010, at 9:55 PM, Michael Thon wrote: > >> Instead of putting my delegate methods in the window controller, should I >> instead subclass NSArrayController and put the delegate methods in there? >> Doesn&#

using a tableview delegate

2010-02-05 Thread Michael Thon
I have bound an NSTableView to an array controller which is set to entity mode to fetch data from the managed object context. I would like override a method in the table view delegate protocol to control how data are displayed in the cell. When I set the table view's delegate to the window con

freeing memory from an NSOperation

2009-12-21 Thread Michael Thon
Are NSOperations freed when they finish running or when the whole queue is finished? My NSOperations seem to hang around, taking up memory even after they have finished their job. At least, as far as I can tell using the Object Allocations instrument which shows them as living. I am using an

Re: Oh notification, where are you?

2009-09-21 Thread Michael Thon
On Sep 22, 2009, at 3:03 AM, Rob Keniger wrote: On 22/09/2009, at 2:31 AM, Michael Thon wrote: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(sendNotification:) name

Oh notification, where are you?

2009-09-21 Thread Michael Thon
When I instantiate and run an NSMetadataQuery on the main thread I can register for, and receive its notifications, but when I try to run the same code on a separate thread it seems like the notifications are not being delivered. I assumed that NSMetadataQuery was still delivering its noti

Re: how to get a managedObjectContext in a nib file

2009-09-02 Thread Michael Thon
On Sep 2, 2009, at 4:16 PM, Sean Kline wrote: To what entity is your Array Controller bound? (just checking to see if you did this...forgive the question if it is too basic) I finally got it working. Instead of having the window controller set its own managedObjectContext in awakeFromNib,

how to get a managedObjectContext in a nib file

2009-09-02 Thread Michael Thon
I created a new nib file in my project and in that nib file I need an array controller bound to my app's managed object context. I made an instance of AppDelegate in the nib file and bound to that. The array controller works except that entities added to the array are not being permanent

Re: core-data app design question

2009-08-28 Thread Michael Thon
On Aug 28, 2009, at 8:37 AM, Martin Hewitson wrote: Dear list, I have a question, or rather, I'm looking for advice, on the design of an application. Essentially I'm wanting to write a labbook-type application. My plan was to use core-data for the model. In the model will be an Entry ent

Re: Syncronizing class files and Core Data entities

2009-08-18 Thread Michael Thon
On Aug 18, 2009, at 11:06 PM, Sean McBride wrote: On 8/18/09 7:30 PM, Michael Thon said: In XCode, class files for core data entities can be generated by selecting the data model, then selecting New File from the File menu and selecting Managed Object Class from the window. If you edit the

Syncronizing class files and Core Data entities

2009-08-18 Thread Michael Thon
In XCode, class files for core data entities can be generated by selecting the data model, then selecting New File from the File menu and selecting Managed Object Class from the window. If you edit the class files and then edit the data model, there seems to be no way to sync the changes i