Re: Sharing a model

2011-02-13 Thread Scott Steinman
Thank you for the replies so far. I had not designed my program as a document-based application because I did not think that I would save and open data files. However, I have changed my viewpoint. It might also make implementing your suggestions easier. -Scott Steinman __

Re: Sharing a model

2011-02-13 Thread Kyle Sluder
On Sun, Feb 13, 2011 at 9:27 PM, Graham Cox wrote: >> 3. When should the reference to the model be set up in each controller? > > It will be done for you when the document is created from the nib. All you > need to do is populate the model from the file when the file is opened. > NSDocument prov

Re: Sharing a model

2011-02-13 Thread Graham Cox
On 13/02/2011, at 7:57 PM, Scott Steinman wrote: > I'd like to split up the controller class into more manageable parts. I'm > hoping to have one controller for the graphics NSView alone and another for > everything else in the window. Both controllers would need access to the same > model. W

IKImageBrowserView moveItemsAtIndexes and imageRepresentationType

2011-02-13 Thread Greg Wilson
I have an App which uses IKImageBrowserView and wanted to implement moveItemsAtIndexes. I added the necessary protocol routine - (BOOL) imageBrowser:(IKImageBrowserView *) view moveItemsAtIndexes: (NSIndexSet *)indexes toIndex:(NSUInteger)destinationIndex { NSLog(@"moving items");

Sharing a model

2011-02-13 Thread Scott Steinman
Please forgive me since I'm a Cocoa newbie (having programmed in about a dozen programming languages on many computer architectures -- this hints at my age!), but I can't find an answer to what I think should be a simple question via the Apple documentation, multiple Cocoa books, or web search e

Re: Parsing PDF

2011-02-13 Thread Scott Ribe
On Feb 13, 2011, at 5:02 PM, Graham Cox wrote: > Hi all, > > I'm about to embark on a fairly serious bit of coding to extract all the > graphic objects from a PDF file to turn them into editable entities in a > drawing app. > > First, the documentation references some sample code called 'Voyeu

NSScrollView subclass not working with inertia

2011-02-13 Thread Carter Allen
I am currently implementing my own NSTableView replacement that uses views instead of cells, and is fairly similar to the way that UITableView works (uses reusable views, queuing, etc.) Everything is working quite well, except for one problem. Similar to how UITableView works, the new table view

Quick Look Preview with Scrollbar

2011-02-13 Thread Andrew Madsen
I'm writing a Quick Look Plug-in to generate previews of my application's (Core Data) documents. I've got the generator working ok with one problem. If the document is large/long, and I return an preview that is say 5000 pixels high, Quick Look scales the preview image instead of putting it in a

Parsing PDF

2011-02-13 Thread Graham Cox
Hi all, I'm about to embark on a fairly serious bit of coding to extract all the graphic objects from a PDF file to turn them into editable entities in a drawing app. First, the documentation references some sample code called 'Voyeur' (/Developer/Examples/Quartz/PDF/Voyeur) but this no longe

Re: NSUnicodeStringEncoding

2011-02-13 Thread Kyle Sluder
On Sun, Feb 13, 2011 at 3:17 PM, Todd Heberlein wrote: > [[NSString alloc] initWithBytes:byte_stream length:len > encoding:NSUTF16LittleEndianStringEncoding] Just make sure you're guaranteed to get little-endian UTF-16 from your C++ string. :) --Kyle Sluder _

Re: NSUnicodeStringEncoding

2011-02-13 Thread Todd Heberlein
On Feb 11, 2011, at 11:10 AM, Kyle Sluder wrote: > NSUnicodeStringEncoding is an alias for NSUTF16StringEncoding. You're > best off getting UTF16 from your C++ string and explicitly using the > NSUTF16StringEncoding constant when creating your NSString. Since > UTF16 is the canonical representatio

Re: Canceling NSInvocationOperation

2011-02-13 Thread Matt Neuburg
> Message: 4 > Date: Sat, 12 Feb 2011 12:43:26 -0800 > From: Chase Latta > Subject: Canceling NSInvocationOperation > > I guess the root of my question is how do I access the > operation from within my method that I am passing to > initWithTarget:selector:object when I create my invocation oper

NSTreeController -setSelectionIndexPaths: calls scrollRowToVisible:

2011-02-13 Thread jonat...@mugginsoft.com
Calling NStreeController setSelectionIndexPaths: causes the new selection to be scrolled into view. IIRC, this is not the behaviour exhibited in NSArrayController with setSelectedObjects: I cannot see any API to influence this (correct me, please, if I have missed it). At present, as a workaro

Re: WebKit - javascript / DOM listeners only fire once

2011-02-13 Thread Stephen J. Butler
On Sun, Feb 13, 2011 at 8:02 AM, Darren Wheatley wrote: > When the application runs and the user clicks on the first row, everything > works fine. The "click" event is trapped, and my Objective-C method is > successfully called. > > However, when the user clicks on a second (or subsequent) recor

WebKit - javascript / DOM listeners only fire once

2011-02-13 Thread Darren Wheatley
Hi, I have a Mac client application written in Cocoa / Objective-C that presents the user with a list of html documents in a table (master view), and when the user clicks on a row it loads the selected HTML page into a WebView (detail view). Every HTML page has a listener on "click" that calls

Re: Canceling NSInvocationOperation

2011-02-13 Thread claw
in apple documentation, they are talking about cancel & isCancelled method the fact is texto : "cancelling an operation does not immediately force it to stop what it is doing" so why not add another method , it's goal : verify the availability to iterate the queue inside the nsoperation and th