Global Hotkeys - Trouble with sizeof EventHotKeyRef

2009-09-24 Thread Tobias Zimmerman
EqualToValue¹ of the comparator?) Any and all advice on this would be appreciated. Relevant code is below. Thanks in advance Tobias Zimmerman /* Method to register hotkeys /* > - (void)assignHotKey: (UInt32)keyEquiv >modifiers: (UInt32)mods > hotKeyNumber: (NSInt

Global Hotkeys in 64-bit mode

2009-09-25 Thread Tobias Zimmerman
the one that comes through as data1 in the NSEvent. It appears to be a 32-bit to 64-bit conversion issue, and my code works fine when compiled in 32-bit mode. Has anyone made global hotkeys work in 64-bit mode? Thanks Tobias Zimmerman ___ Cocoa-dev

Re: Notification when displays are detected?

2009-12-30 Thread Tobias Zimmerman
Adding this method to your application delegate should be sufficient: -(void)applicationDidChangeScreenParameters: (NSNotification *)notice { //Handle Display Change Here } If this isn't in the main class of your app, then you can make the class an NSApp delgate by adding this line to the cla

Re: Help using NSAppleScript

2008-12-30 Thread Tobias Zimmerman
Thank you very much for your help. One reason I had avoided using NSScreen is that I am working with CGDisplay functions and AppleScript, and so want to keep all of the coordinates in an upper-left-origin orientation, but I may try the NSScreen method and see if I can use one of the flipping func

What determines VSIZE allocation?

2009-01-14 Thread Tobias Zimmerman
I have searched for an answer to this question, including in Amit Singh's book, but have not found the answer (at least, not in a form that I recognize it). I have a fairly simple Cocoa app that creates an NSStatusItem with a small menu. It is compiled using Garbage Collection and in 64bit mode (i

Re: Cocoa-dev Digest, Vol 6, Issue 86

2009-01-15 Thread Tobias Zimmerman
> > > On Thu, Jan 15, 2009 at 1:59 AM, Bill Bumgarner wrote: > >> > >> For example, an application's VSIZE might be growing over time > >> because it is > >> mmap()'ing a bunch of files (or a few small files). If the app > >> fails to > >> unmap, the VSIZE will grow and the app may likely exhaus

Re: What Determines VSIZE allocation?

2009-01-15 Thread Tobias Zimmerman
> > I believe, if I understood Bill Bumgarner's message correctly, is that > the 8GB range being assigned to the app is due in part to the design > of the garbage collector, libauto. I doubt that Apache is compiled to > use the garbage collector at all and thus, is not having that memory > range al

Using NSAppleScript With AXMakeProcessTrusted -- and/or, How To Indirectly Launch A Secure Agent

2009-01-31 Thread Tobias Zimmerman
I have a somewhat complex problem I am hoping the list can help me with. Ultimately, what I am trying to do is grant my application rights to use the Accessibility API without forcing users to turn on ³Enable access for assistive devices². My application uses AppleScripts (primarily calling System

Re: Using NSAppleScript With AXMakeProcessTrusted -- and/or, > How To Indirectly Launch A Secure Agent

2009-02-01 Thread Tobias Zimmerman
l > Message-ID: > Content-Type: text/plain; charset="ISO-8859-1" > > on 2009-01-31 4:44 PM, Tobias Zimmerman at automa...@gmail.com wrote: > >> So, I have read up on the AXMakeProcessTrusted function, and seen the >> example at http://caffeinatedcocoa.co

Obtaining Display EDID (DDC) Information From User Level App

2009-02-22 Thread Tobias Zimmerman
Apologies if this is the wrong forum ‹ I am not entirely sure what category this question properly falls under. If someone suggests a better list, I will move the question there. I want to obtain the name of a display (monitor) by manufacturer and brand. Most (not all) displays report this using

NSPrefrencePane with Garbage Collection won't work in System Preferences?

2009-02-27 Thread Tobias Zimmerman
Can someone confirm that the System Preferences application cannot load a preference pane that is compiled with garbage collection? Even linking to a framework compiled with GC ³supported² causes System Prefs to reject my preference pane (Give an error saying it cannot be loaded). Turn off GC and

Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?

2009-02-27 Thread Tobias Zimmerman
; Date: Fri, 27 Feb 2009 11:08:27 -0800 > To: Nick Zitzmann > Cc: Tobias Zimmerman , "cocoa-dev@lists.apple.com" > > Subject: Re: NSPrefrencePane with Garbage Collection won't work in System > Preferences? > > On Feb 27, 2009, at 11:00 AM, Nick Zitzmann wro

Re: NSPrefrencePane with Garbage Collection won't work in System Preferences?

2009-02-27 Thread Tobias Zimmerman
-supported")? Again, the only parts of my code that touch the system prefs is the Pane and the framework, neither of which are compiled with GC-required. > From: Bill Bumgarner > Date: Fri, 27 Feb 2009 12:18:34 -0800 > To: Tobias Zimmerman > Cc: Nick Zitzmann , "cocoa-dev@l

Re: Listening key board event while application in status bar

2009-03-03 Thread Tobias Zimmerman
Information and an example of the function Eric references can be found on the following website, which I found very helpful when implementing global hotkeys in my statusItem: http://dbachrach.com/blog/2005/11/28/program-global-hotkeys-in-cocoa-easily/ Tobias Zimmerman > Hi Vijay, > &g

Simulating (or obtaining) menubar effect in a Cell

2009-03-23 Thread Tobias Zimmerman
Hello all- I am working with an NSMatrix, and I would like one cell of the Matrix to act just like an item in the menu bar. Specifically: Single clicking should open a menu; holding the mouse down should open the menu and then close it when released; when selected the item should highlight/invert

Re: NSObliquenessAttributeName, labelFontOfSize, & Italic

2009-03-23 Thread Tobias Zimmerman
> From: Eric Gorr > Subject: NSObliquenessAttributeName, labelFontOfSize, & Italic > The solution proposed in the thread was to just add > NSObliquenessAttributeName, which is easy enough, but I am not sure > what the appropriate angle should be. > > Is there a standard angle which should be use

Re: Simulating (or obtaining) menubar effect in a Cell

2009-03-24 Thread Tobias Zimmerman
> Date: Tue, 24 Mar 2009 07:47:47 + > From: Benjamin Dobson > Subject: Re: Simulating (or obtaining) menubar effect in a Cell > In what way does NSPopUpButtonCell act incorrectly? It seems to work > for me, but obviously, I don't know exactly what your target is. I am trying to simulate an

How can I draw an election map?

2009-03-30 Thread Tobias Zimmerman
I am starting a new project that involves simulating various US election results. I want to plot the results using an election map similar to the ones that were all over the web during last year¹s election. However, I would like to do this in Cocoa/Objective-C rather than having to learn Python o

Re: Scaling an entire CGPath?

2009-04-22 Thread Tobias Zimmerman
Sorry if I am missing the point, but is [CG|NS]AffineTransform what you are looking for? I have only used them in at the Cocoa view level (NSBezierPath, NSAffineTransform), so my information may not be correct for CGPath. The "Transforms" section of the Quartz 2D guide may be helpful: >

Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-22 Thread Tobias Zimmerman
I am trying to find a way to ensure that a series of NSBezierPaths are drawn using [NSBezierPath defaultLineWidth] value. However, contrary to documentation and expectation, my paths seem to automatically assign themselves the value 1.0 for their own lineWidth property. First, the documentation f

Re: Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-27 Thread Tobias Zimmerman
e same width in a separate view that has a different dot-pitch, pixel ratio, etc. > From: Graham Cox > Date: Thu, 23 Apr 2009 10:27:25 +1000 > To: Tobias Zimmerman > Cc: "cocoa-dev@lists.apple.com" > Subject: Re: Removing or ignoring "lineWidth" property of