Re: How to optimize image loading during core animation?

2011-02-16 Thread Tomáš Znamenáček
Hello, since no one replied so far, I’d take a try. I’m not much familiar with desktop Cocoa, but on iOS we have to be careful to keep longer actions from the main thread, since delays in the main thread block the UI. Isn’t this about the same issue? Image loading would be the first thing I wo

Re: Receiving global window events?

2011-02-16 Thread Eric Schlegel
On Feb 16, 2011, at 2:07 PM, Mr. Gecko wrote: > My guess is I'll have to keep track of applications starting and get their > pid to do everything. I was kinda hoping for a register for all, but it > doesn't seem to have it. No, sorry, there's no way to register for notifications across all pro

Webkit failing on release build

2011-02-16 Thread Bruce Cresanta
Hello, I'm trying to run the release target of a project using webkit.It results in the following error: dyld: Symbol not found: __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE Referenced from: /System/Library/Frameworks/WebKit.framework

Re: Question about split view

2011-02-16 Thread Matt Neuburg
Actually, now that I think of it, an even simpler, more sweeping solution is to make the split view controller your own UISplitViewController subclass, and implement didReceiveMemoryWarning to return immediately: - (void) didReceiveMemoryWarning { return; } Now the detail view will never be

Re: Determine if other process is running 32 or 64 bits

2011-02-16 Thread Greg Parker
On Feb 16, 2011, at 3:59 PM, Jerry Krinock wrote: > On 2011 Feb 16, at 12:05, Ken Thomases wrote: > >> If it's actually an application, and you can target 10.6, use >> -[NSRunningApplication executableArchitecture]. > > Thanks, but need 10.5 support. > > I suppose I could spend hours searching

Re: Two Newbie Questions

2011-02-16 Thread Graham Cox
On 17/02/2011, at 10:53 AM, Bruce Cresanta wrote: > I thought there was a long process to make the control even visible to > IB? I could create a custom view and set the class, but that wouldn't show > the button would it? No, it would show a blank green rectangle (if it's a NSView su

Re: Determine if other process is running 32 or 64 bits

2011-02-16 Thread Jerry Krinock
On 2011 Feb 16, at 12:05, Ken Thomases wrote: > If it's actually an application, and you can target 10.6, use > -[NSRunningApplication executableArchitecture]. Thanks, but need 10.5 support. > Otherwise, you can use sysctl() as illustrated in this Tech Q&A >

Re: Two Newbie Questions

2011-02-16 Thread Bruce Cresanta
Graham, I thought there was a long process to make the control even visible to IB? I could create a custom view and set the class, but that wouldn't show the button would it? Thanks, Bruce On Feb 16, 2011, at 4:51 PM, Graham Cox wrote: > > On 17/02/2011, at 10:17 AM, Bruce Cresan

Re: Two Newbie Questions

2011-02-16 Thread Graham Cox
On 17/02/2011, at 10:17 AM, Bruce Cresanta wrote: > I would like to change it to a regular button without setting up my custom > control to be compatible with IB. As long as it's a view of some kind you don't need to do anything special to be compatible with IB - just set the class of the obj

Re: Two Newbie Questions

2011-02-16 Thread Nick Zitzmann
On Feb 16, 2011, at 3:56 PM, Bruce Cresanta wrote: > I have an NSTableView set up to a datasource of a single array. When I run > my code, I get two columns (the default in IB) instead of just one with the > data duplicated in each column.I only want one column, how best to > achieve thi

Re: Two Newbie Questions

2011-02-16 Thread Bruce Cresanta
Hi Sherm, About my second question.I've written a custom control that currently has and icon tracked by a tracking area to perform an action. I would like to change it to a regular button without setting up my custom control to be compatible with IB. Thanks, Bruce On Feb 16, 20

Re: Two Newbie Questions

2011-02-16 Thread Sherm Pendley
On Wed, Feb 16, 2011 at 5:56 PM, Bruce Cresanta wrote: > > I have an NSTableView set up to a datasource of a single array.   When I run > my code, I get two columns (the default in IB) instead of just one with the > data duplicated in each column.    I only want one column, how best to > achiev

Two Newbie Questions

2011-02-16 Thread Bruce Cresanta
Hello, I have two newbie questions. I have an NSTableView set up to a datasource of a single array. When I run my code, I get two columns (the default in IB) instead of just one with the data duplicated in each column.I only want one column, how best to achieve this? Secondl

Re: Receiving global window events?

2011-02-16 Thread Mr. Gecko
My guess is I'll have to keep track of applications starting and get their pid to do everything. I was kinda hoping for a register for all, but it doesn't seem to have it. AXObserverRef observer; AXObserverCreate(0, testEvent, &observer); AXObserverAddNotification(observer, NULL, kAXWindowMiniatu

Re: Question about split view

2011-02-16 Thread Matt Neuburg
>On Sun, 16 Jan 2011 18:35:45 -0500, Phillip Mills >said: >>I see a problem with the following scenario: >>1) Start with the template project for a split view >>2) Add a function where a modal view can be shown over it using a style of >>UIModalPresentationFullScreen >>3) Run in portrait mode >>

Re: System Prefs trying to relaunch in 32bit mode

2011-02-16 Thread Kyle Sluder
2011/2/16 Trygve Inda : > The error reported is: > > 2011-02-16 21:05:49.803 System Preferences[64108:a0f] dlopen_preflight > failed with dlopen_preflight(/Users/trygve/Library/PreferencePanes/ > MyProduct.prefPane/Contents/MacOS/MyProduct): no suitable image found.  Did > find: > > /Users/trygve/L

System Prefs trying to relaunch in 32bit mode

2011-02-16 Thread Trygve Inda
I am building a System Pref Pane. I target ppc ppc64 i386 and x86_64... Lipo -info confirms these are all in the binary, but System Preferences launches in 32bit mode when I try to install my pane. In a previous project it works, so I am not sure what is happening. The error reported is: 2011-0

Re: Receiving global window events?

2011-02-16 Thread Eric Schlegel
On Feb 16, 2011, at 12:21 PM, Mr. Gecko wrote: > eventType.eventClass = kEventClassWindow; > eventType.eventKind = kEventWindowCollapsing; > > I would expect this to work as it works for keyboard and mouse events. From CarbonEvents.h: /* * GetEventMonitorTarget() * *Currently, the ev

Receiving global window events?

2011-02-16 Thread Mr. Gecko
Hello. I'm trying to have my application receive events of windows from other applications. I have tried carbon events, I may be doing it wrong, but it doesn't work. For an example, if I wanted to watch for when an window minimizes to the dock, I'll use the following. EventTypeSpec eventType; ev

Re: Determine if other process is running 32 or 64 bits

2011-02-16 Thread Sean McBride
On Wed, 16 Feb 2011 11:44:22 -0800, Jerry Krinock said: >I need my app to determine if *another* app is running in 32-bit or 64- >bit mode. I have found that I can do that with this unix command: > > ps -ax -o flags -o command | grep TargetAppExecutableName > >The 3rd least significant bit of t

Re: Determine if other process is running 32 or 64 bits

2011-02-16 Thread Ken Thomases
On Feb 16, 2011, at 1:44 PM, Jerry Krinock wrote: > I need my app to determine if *another* app is running in 32-bit or 64-bit > mode. I have found that I can do that with this unix command: > > ps -ax -o flags -o command | grep TargetAppExecutableName > > The 3rd least significant bit of th

Determine if other process is running 32 or 64 bits

2011-02-16 Thread Jerry Krinock
I need my app to determine if *another* app is running in 32-bit or 64-bit mode. I have found that I can do that with this unix command: ps -ax -o flags -o command | grep TargetAppExecutableName The 3rd least significant bit of the 'flags' is 'LP64', which is 1 for a 64-bit process and 0 fo

Re: Tracking a EXC_BAD_ACCESS when zombies don't work

2011-02-16 Thread Sean McBride
On Wed, 16 Feb 2011 11:17:27 -0800, Keith Blount said: >The debugging continues... You could try valgrind too: It works decently on Mac OS now (though no Obj-C GC support still)... -- Sean McBride

Re: Tracking a EXC_BAD_ACCESS when zombies don't work

2011-02-16 Thread Keith Blount
Hi Bruce, Many thanks for the reply. Unfortunately that's a little trickier than it sounds - my app has around 200,000 lines of code. :) That said, I know that the trigger is page layout mode but I've already been through the page layout code (and the page-layout-switching code) several times c

Re: Tracking a EXC_BAD_ACCESS when zombies don't work

2011-02-16 Thread Bruce Cresanta
A big clue is in your backtrace: #261968 0x98d06f38 in CFRelease #261969 0x98d06f38 in CFRelease #261970 0x98d06f38 in CFRelease #261971 0x98d33c6d in _CFAutoreleasePoolPop #261972 0x9867d0aa in NSPopAutoreleasePool #261973 0x9867cfd2 in -[NSAutoreleasePool drain] #261974 0x986c4596 in _NSAppleEve

Re: Animation doesn't reach end value

2011-02-16 Thread Matt Neuburg
On Tue, 15 Feb 2011 14:47:26 +0100, Florian Ebeling said: >I try to create a view which creates an effect that is similar to the >Find Indicator in NSTextView. To achieve that there is a view with >text which is animated using CAAnimation objects registered via >setAnimations:. The animated prope

Re: Tracking a EXC_BAD_ACCESS when zombies don't work

2011-02-16 Thread Keith Blount
Many thanks for the reply, Sean, much appreciated. Unfortunately still no joy, though. I had already tried setting the CFZombieLevel to 3 (and other values - sorry, I should have mentioned that), but according to the tech notes, since 10.5 Core Foundation types are covered by NSZombie anyway (wh

Re: Contextual menu commands in the Finder

2011-02-16 Thread Gregory Weston
David Catmull wrote: > So I gather that now that the new 64-bit Finder doesn't support the old CM > plugin API, the only way to add commands to the Finder's contextual menus is > with the services API. The problem I'm having with doing it as a service is > that the commands I want to add should

Re: Community Suggestions on Encryption

2011-02-16 Thread Brad Stone
Jean - thanks to your tip I was able to find this code at http://pastie.org/966473. It works very well (I tried to paste it below but it was too big) for NSString ivars. What I'm working on now is to try to figure out how to encrypt/decrypt an NSData iVar. I have an NSData ivar which is bi

Re: Binding to an NSMutableArray

2011-02-16 Thread Lorenzo Thurman
On Wed, Feb 16, 2011 at 12:23 AM, Stephen J. Butler < stephen.but...@gmail.com> wrote: > On Wed, Feb 16, 2011 at 12:05 AM, Stephen J. Butler > wrote: > > It works, I just wrote up an example. But unfortunately my > > universities file storage is crapping out and I can't share it at the > > moment

How to optimize image loading during core animation?

2011-02-16 Thread Gabriel Zachmann
I am implementing a screensaver that is basically a photo show. The photos are animated using Core Animation (nothing complicated). The problem now is that when the screensaver switches to the next photo, the animation judders. The judder happens, as far as I can tell, only with large images, e.g

Re: rewriting observed keyPath

2011-02-16 Thread Remco Poelstra
Op 16 feb 2011, om 11:39 heeft Quincey Morris het volgende geschreven: > On Feb 16, 2011, at 00:19, Remco Poelstra wrote: > >> Leaves me wondering how that KVO registering works, how does the runtime now >> that it's the same path that is monitored? > > Actually, there's no magic involved* --

Re: rewriting observed keyPath

2011-02-16 Thread Quincey Morris
On Feb 16, 2011, at 00:19, Remco Poelstra wrote: > Leaves me wondering how that KVO registering works, how does the runtime now > that it's the same path that is monitored? Actually, there's no magic involved* -- it's kind of obvious**, in the sense that it has to work this way***, even if the

Re: Contextual menu commands in the Finder

2011-02-16 Thread Norbert M. Doerner
That is indeed incredibly lame of the very weak Services API structure, but the only way to do it today. We can only hope that many bug reports (bugreporter.apple.com !!) will help Apple to massively improve these context menus soon to bring them back to the usefulness of the Carbon time. I

Re: Processing mouse clicks using Quartz events

2011-02-16 Thread Tomáš Znamenáček
Kyle Sluder wrote: > Sounds like you want a Quartz event tap filter. You can create one using > CGEventTapCreate. That’s exactly what I am doing, but as I wrote, I found it hard to filter a whole mouse click event, since the tap filter only receives the low-level event types. When I receive a

Re: Key equivalents for non-menu items

2011-02-16 Thread John Joyce
On Feb 16, 2011, at 1:58 PM, Randy Widell wrote: > On 2/15/11 8:20 PM, mlist0...@gmail.com wrote: >> On Feb 15, 2011, at 7:36 PM, Randy Widell wrote: >> >>> I would like to have a keyboard shortcut that tags a location on the >>> waveforms at the location of the mouse cursor. These commands do

Re: rewriting observed keyPath

2011-02-16 Thread Remco Poelstra
Op 15 feb 2011, om 23:59 heeft Quincey Morris het volgende geschreven: > On Feb 15, 2011, at 11:27, Kyle Sluder wrote: > >> As long as -current and -preset0 return the same object, and that >> object is KVO-compliant for @"parameters", then observing >> @"current.parameters" and @"preset0.parame

Re: Processing mouse clicks using Quartz events

2011-02-16 Thread Kyle Sluder
On Feb 15, 2011, at 11:23 PM, Tomáš Znamenáček wrote: > I have a system utility application that needs to be triggered by a mouse > click on certain UI elements. In all applications, not just mine. When the > application notices the right kind of a mouse click, I want to “steal” the > event to