Re: Global HotKey

2011-02-08 Thread Andy Lee
On Feb 9, 2011, at 12:56 AM, Daniel Ketel wrote: > Looks like I have to use Carbon and hope Apple will continue to support it. > Thank you for your help. You might be interested in Dave DeLong's Objective-C wrapper, called DDHotKey: You might also be

Re: Global HotKey

2011-02-08 Thread Daniel Ketel
Hi, Looks like I have to use Carbon and hope Apple will continue to support it. Thank you for your help. Best Regards, Daniel Ketel On Feb 9, 2011, at 06:30, Shazron Abdullah wrote: > That's the only way. The parts of Carbon that have 64-bit support removed are > the UI parts, much of it is su

Re: Global HotKey

2011-02-08 Thread Shazron Abdullah
That's the only way. The parts of Carbon that have 64-bit support removed are the UI parts, much of it is supported in 64-bit form and I haven't heard otherwise from Apple (yet) On 2011-02-07, at 2:01 PM, Daniel Ketel wrote: > Hello List, > > I need to add global hotkey support to my cocoa app

Re: Printing Appears Very Small in Lower-Left Corner of Page

2011-02-08 Thread Thomas Dineen
Gerry, Seems if you knew the printer's resolution you can determine the pixel within XML Horz/Vert to use. As a first step, try to find the printer's resolution. based on this you can then determine the expected size you want to print, a 5" by 7" or a 6" by 4" or 8" by 10". Horizontal is inches_

CATransformLayer doesn't support implicit animation?

2011-02-08 Thread Indragie Karunaratne
I'm trying to animate a CATransformLayer (the transform layer is a sublayer of the layer of a layer hosting NSView). Here's my animation code: CGFloat zDistance = 850; CGFloat scaleFactor = BACK_COVER_WIDTH / self.transformLayer.bounds.size.width; CATransform3D rotation = CATransform

Re: Printing Appears Very Small in Lower-Left Corner of Page

2011-02-08 Thread Tom dineen
Gery some minor pointa might be related if you can take a read here... is dpi same as pixels per inch (ppi). a fact using Photoshop or printing is to use 200 or 300 ppi (the density or spatial resolution). screens are fine with 100 ppi an iPhone4 creates a photo with 72 ppi. but to print this

Disable scrolling on NSScrollView

2011-02-08 Thread Indragie Karunaratne
Hi, I'm looking for something similar to UIScrollView's scrollEnabled property in NSScrollView. I've checked the class documentation and there is nothing similar to scrollEnabled, but would there be a way to disable scrolling in an NSScrollView subclass? Thanks.__

Re: why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread Bryce Redd
The scroll bar indicator is sent to the front each time the scroll view motion stops and starts, this would require a new layout. On Tue, Feb 8, 2011 at 10:15 AM, David Duncan wrote: > On Feb 8, 2011, at 8:15 AM, Roland King wrote: > > > I can't see why UIScrollView would call layoutSubviews ever

NSComboxBox does not keep scrolled‏

2011-02-08 Thread FirstName LastName
Hello, I have a selectable non-editable NSComboBox that displays a path chosen via a NSOpenPanel. Its list is used as a history of the most recently selected paths. I use its field editor's scrollRangeToVisible method to scroll the path so that the file name and extension are visible. Howe

Global HotKey

2011-02-08 Thread Daniel Ketel
Hello List, I need to add global hotkey support to my cocoa application. I have googled quite a bit, but it currently it seems to me there is no way to set hotkeys with cocoa. The only way I was able to find was to use carbon. But since carbon is to be deprecated I do not want to use it. After

Re: NSDocument without Save

2011-02-08 Thread Jerry Krinock
On Tue, Feb 8, 2011 at 9:29 PM, Graham Cox wrote: > What's the proper way to do this? I searched the archives but surprisingly I > couldn't find any previous discussion of this, even though I would have > thought it's quite a common thing. Probably it's more common to present a sheet saying "

Re: CoreData Migration Problems

2011-02-08 Thread Jerry Krinock
On 2011 Feb 08, at 13:21, Gordon Apple wrote: > PersistentStoreCoordinator is non-nil. Store returns nil. Well, -addPersistentStoreWithType:configuration:URL:options:error: is only being passed trivial parameters, except for the URL. Log that URL and make sure that its parent directory exists

Re: NSDocument without Save

2011-02-08 Thread Marc Respass
> I'm trying to prevent NSDocument from doing any saving at all, for a demo > version of my app. I need to suppress the menu commands (done) and all the > automated UI such as the 'save changes' dialog and 'Save As' dialog even > though the doc is marked dirty. I've also removed the actual save

Re: NSDocument without Save

2011-02-08 Thread Graham Cox
On 09/02/2011, at 1:46 PM, Sherm Pendley wrote: > On Tue, Feb 8, 2011 at 9:29 PM, Graham Cox wrote: >> I'm trying to prevent NSDocument from doing any saving at all, for a demo >> version of my app. I need to suppress the menu commands (done) and all the >> automated UI such as the 'save chang

Re: NSDocument without Save

2011-02-08 Thread Sherm Pendley
On Tue, Feb 8, 2011 at 9:29 PM, Graham Cox wrote: > I'm trying to prevent NSDocument from doing any saving at all, for a demo > version of my app. I need to suppress the menu commands (done) and all the > automated UI such as the 'save changes' dialog and 'Save As' dialog even > though the doc

NSDocument without Save

2011-02-08 Thread Graham Cox
I'm trying to prevent NSDocument from doing any saving at all, for a demo version of my app. I need to suppress the menu commands (done) and all the automated UI such as the 'save changes' dialog and 'Save As' dialog even though the doc is marked dirty. I've also removed the actual save code. A

Right views for a N items, each of which can have M items within it?

2011-02-08 Thread Brian Marick
I previously had a single-column collection view. Each element corresponded to a file. If you hit space while an element was selected, you'd get the quicklook. If you double-clicked, you'd open the file. So that looked like this: Element Element Element This was implemented as an

Re: Initializing NSError **, again Re: CoreData Migration Problems

2011-02-08 Thread Quincey Morris
On Feb 8, 2011, at 15:07, Fritz Anderson wrote: > The documentation for AVAudioPlayer's initWithContentsOfURL:error: and > initWithData:error: methods, however, call for "the address of a > nil-initialized NSError object," whatever that is. I think they mean a > nil-initialized pointer to an NS

Re: Initializing NSError **, again Re: CoreData Migration Problems

2011-02-08 Thread Fritz Anderson
On 8 Feb 2011, at 5:07 PM, Fritz Anderson wrote: > The documentation for AVAudioPlayer's initWithContentsOfURL:error: and > initWithData:error: methods, however, call for "the address of a > nil-initialized NSError object," whatever that is. I think they mean a > nil-initialized pointer to an N

Initializing NSError **, again Re: CoreData Migration Problems

2011-02-08 Thread Fritz Anderson
On 8 Feb 2011, at 2:51 PM, Quincey Morris wrote: > P.S. It's OT, but initializing 'error' to nil before passing it to an > error-returning method is both a waste of time and semantically incorrect -- > it's an *output only* parameter to the method. OTOH, setting it to nil isn't > inherently har

Re: Need help sorting with NSSortDescriptor and/or/NSPredicate (Core Data)

2011-02-08 Thread Ernesto Giannotta
On 07-feb-2011, at 16:29, Ken Thomases wrote: > On Feb 7, 2011, at 8:56 AM, Michael Crawford wrote: > >> I'm trying to implement a feature where I sort a cross-section of music from >> multiple genres with up to two different keys, where the items with a genre >> matching the first key appear

Re: CoreData Migration Problems

2011-02-08 Thread Gordon Apple
Guess I'm just in the habit of initializing things. :-) PersistentStoreCoordinator is non-nil. Store returns nil. Console just gives the infamous message: "Storage:persistentStoreCoordinator The operation couldn¹t be completed. (Cocoa error 1560.)" On 2/8/11 2:51 PM, "Quincey Morris" wrote:

Re: CoreData Migration Problems

2011-02-08 Thread Quincey Morris
On Feb 8, 2011, at 12:08, Gordon Apple wrote: >persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] > initWithManagedObjectModel: self.managedObjectModel]; > >NSError *error = nil; >NSPersistentStore* store = >[persistentStoreCoordinator addPersistentStoreWithType:NS

CoreData Migration Problems

2011-02-08 Thread Gordon Apple
I am trying to migrate an existing app CoreData database to a new version. Theoretically, this should be what's called a simple migration. I have not been able to get it to work. Just to see what it's trying to do, I went ahead and let it generate a mapping model, which appears to be correct. Bu

Re: why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread David Duncan
On Feb 8, 2011, at 8:15 AM, Roland King wrote: > I can't see why UIScrollView would call layoutSubviews every time it scrolls, > I expected that it would call layoutSubviews once only when its geometry > changes (or you ask it to) and after that would just scroll its contained > view quietly.

Re: UILabel contentView is 'left' out of IB but the default should be 'redraw'

2011-02-08 Thread David Duncan
On Feb 8, 2011, at 7:15 AM, Roland King wrote: > 1) does that sound like an IB bug which needs reporting? This looks like a bug in the documentation, as labels created in code are created using left content mode. > 2) why does setFrame cause a redraw when setBounds/setCenter doesn't if the >

why does UIScrollView call layoutSubviews every time it scrolls?

2011-02-08 Thread Roland King
Motivation: I have a view to display which is normally larger than the area it has to fit in (like UITextView which extends a UIScrollView) so my custom UIView is a UIScrollView subclass, the idea is that when setFrame: gets called, I will eventually get a layoutSubviews which calculates the req

UILabel contentView is 'left' out of IB but the default should be 'redraw'

2011-02-08 Thread Roland King
According to the documentation for UILabel the default contentMode is 'redraw'. I've been chasing an issue in my code where I set the center and bounds of one in layoutSubviews of the parent to keep it centered but it wasn't being, it was moving all over the place. I randomly found that calling

OK to share managed object model across MOCs?

2011-02-08 Thread Marc Respass
Hi all, I have an NSDocument based application and each document has its own core data stack (NSPersistentDocument is inappropriate for my application). Each document gets its own model, store coordinator, and object context. It occurred to me that the model is the same model for each document