Re: Processing mouse clicks using Quartz events

2011-02-15 Thread Tomáš Znamenáček
> I don't know, but we all are. What are you actually trying to do? If you > just want to process mouse clicks this is surely not the way to go about it. 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. Whe

Re: Binding to an NSMutableArray

2011-02-15 Thread Stephen J. Butler
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. Ahh ha, figured it out. Here's my example: https://netfiles.uiuc.edu/xythoswfs/webui/_xy-40162

Re: Binding to an NSMutableArray

2011-02-15 Thread Stephen J. Butler
On Tue, Feb 15, 2011 at 11:08 PM, Lorenzo Thurman wrote: > I should add that there are 2 tables side by side in the app. On the left, 3 > columns, fname, lname bound directly to Student object as > controller.fname/lname and the count of infractions in the third column using > infractions.@coun

Re: Binding to an NSMutableArray

2011-02-15 Thread Lorenzo Thurman
On Feb 15, 2011, at 10:42 PM, "Stephen J. Butler" wrote: > On Tue, Feb 15, 2011 at 10:37 PM, Lorenzo Thurman > wrote: >> I have an object, Student, that contains firstName and lastName as instance >> variables. Student also contains an NSMutableArray of infraction objects >> that contains

Re: Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
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 not make any sense in the main menu...they could go there, but

Re: Binding to an NSMutableArray

2011-02-15 Thread Stephen J. Butler
On Tue, Feb 15, 2011 at 10:37 PM, Lorenzo Thurman wrote: > I have an object, Student, that contains firstName and lastName as instance > variables. Student also contains an NSMutableArray of infraction objects > that contains NSString's for the infraction name, location, punishment and > an NSDate

Re: Processing mouse clicks using Quartz events

2011-02-15 Thread Graham Cox
On 16/02/2011, at 3:53 AM, Tomáš Znamenáček wrote: > Am I missing something? I don't know, but we all are. What are you actually trying to do? If you just want to process mouse clicks this is surely not the way to go about it. --Graham ___ Cocoa-d

Binding to an NSMutableArray

2011-02-15 Thread Lorenzo Thurman
I have an object, Student, that contains firstName and lastName as instance variables. Student also contains an NSMutableArray of infraction objects that contains NSString's for the infraction name, location, punishment and an NSDate. I want to bind these infraction objects to the columns of an NST

Re: Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
On 2/15/11 7:49 PM, Graham Cox wrote: On 16/02/2011, at 2:36 PM, Randy Widell wrote: I have a view displaying waveforms. 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 not make any sense in the main menu.

Re: Key equivalents for non-menu items

2011-02-15 Thread mlist0...@gmail.com
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 not make > any sense in the main menu...they could go there, but they would be clutter. Why do you think th

Processing mouse clicks using Quartz events

2011-02-15 Thread Tomáš Znamenáček
Hello! I have a CGEventTap and I would like to catch mouse click events. Detecting a mouse click event is easy, but I don’t want some of the clicks to get processed by the rest of the system. And I can’t figure out how. The system only sends low-level events like mouseUp, mouseDown, mouseDragge

Animation doesn't reach end value

2011-02-15 Thread Florian Ebeling
Hi, 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 properties are frameSize, frameOrigin and animatedFontSize, but

Re: Key equivalents for non-menu items

2011-02-15 Thread Graham Cox
On 16/02/2011, at 2:36 PM, Randy Widell wrote: > I have a view displaying waveforms. 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 not make any sense in the main menu...they could go there, > but they

Re: Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
On 2/15/11 6:11 PM, Kyle Sluder wrote: On Tue, Feb 15, 2011 at 5:40 PM, Randy Widell wrote: I am trying to wrap my mind around something and the Apple docs are just not helping. I am not sure if I am looking in the wrong places or what, but I am just not getting it. Binding a menu item to Fir

Re: Key equivalents for non-menu items

2011-02-15 Thread Kyle Sluder
On Tue, Feb 15, 2011 at 5:40 PM, Randy Widell wrote: > I am trying to wrap my mind around something and the Apple docs are just not > helping.  I am not sure if I am looking in the wrong places or what, but I > am just not getting it. > > Binding a menu item to First Responder and setting a key eq

Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
I am trying to wrap my mind around something and the Apple docs are just not helping. I am not sure if I am looking in the wrong places or what, but I am just not getting it. Binding a menu item to First Responder and setting a key equivalent for the menu item is trivial. However, what if I

Re: Sleep Notification

2011-02-15 Thread Laurent Daudelin
Gordon, I use performSelector:withObject:afterDelay: (not exactly NSTimer but close, I would guess), but maybe they don't work exactly the same. I download from the Internet on a regular basis. I thought about those cases when the app is put to the background to sleep and all other situations d

Re: rewriting observed keyPath

2011-02-15 Thread Quincey Morris
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.parameters" are equivalent. Kyle beat me to the punch on this part of the answer, but

Re: Sleep Notification

2011-02-15 Thread Gordon Apple
In accordance with the rules, I suspend timers (I have my own suspendable timer wrapper class for NSTimer) and I terminate comm links when in the background. No problem. It works. I get notifications when it re-activates and can re-establish comm. Unfortunately, when the iPad screen goes down,

Re: Tracking a EXC_BAD_ACCESS when zombies don't work

2011-02-15 Thread Sean McBride
On Tue, 15 Feb 2011 12:41:51 -0800, Keith Blount said: >I'm trying to debug an EXC_BAD_ACCESS crash in my application and am >tearing my hair out trying to find the cause. I have NSZombieEnabled set >to YES, but this isn't providing me with any information (using >NSZombieEnabled is always one of

Tracking a EXC_BAD_ACCESS when zombies don't work

2011-02-15 Thread Keith Blount
Hello, I'm trying to debug an EXC_BAD_ACCESS crash in my application and am tearing my hair out trying to find the cause. I have NSZombieEnabled set to YES, but this isn't providing me with any information (using NSZombieEnabled is always one of the first things I try with crashes like this one

Re: converting app to a document based app

2011-02-15 Thread Matt Neuburg
On Tue, 15 Feb 2011 21:00:42 +0530, Nick Rogers said: >Hi, >Googled a lot but didn't find anything. >Can some one send definitive steps for converting a non-document based app to >a document based app. > Simply start all over with a fresh document-based app project. (I see now that Quincey Morr

Re: awakeFromNib on main thread?

2011-02-15 Thread Matt Neuburg
On Mon, 14 Feb 2011 16:57:02 -0800 (PST), Jon Sigman said: >I did a search of the docs but didn't find this question addressed... >During the object instantiation phase of app startup, is every -awakeFromNib >method guaranteed to be called on the app's main thread? If this is a serious concern,

Re: Sleep Notification

2011-02-15 Thread Matt Neuburg
On Sat, 12 Feb 2011 13:01:28 -0600, Gordon Apple said: >If it exists, could somebody point me to notifiers for sleep/wake in iOS? > >I have a comm link that goes down with sleep. I would like to bring it up >again on wake (in case the user forgot to disable sleep). I'm already doing >this for ap

Re: converting app to a document based app

2011-02-15 Thread Seth Willits
On Feb 15, 2011, at 7:30 AM, Nick Rogers wrote: > Can some one send definitive steps for converting a non-document based app to > a document based app. Add an NSDocument subclass, add that class to the list of document types in Info.plist. (GUI editor in the Properties tab by Get Info on the ap

Re: rewriting observed keyPath

2011-02-15 Thread Kyle Sluder
On Tue, Feb 15, 2011 at 11:09 AM, Remco Poelstra wrote: > Thanks for your reply. > The problem with this solution is that when I do a setValue:object > forKeyPath:@"preset0.parameter", and @"preset0" is the current preset, than > no KVO message is sent to observers observing the @"current" variant

Re: iPhone UISearchDisplayController how to handle memory warning

2011-02-15 Thread Matt Neuburg
[Sorry to pick this up a month-and-a-half later, but I've only just gotten around to testing.] I can't reproduce the problem. I constructed a test app that I believe is what you're describing: Navigation Controller Table View Table View's header view is a Search Bar UISe

Re: rewriting observed keyPath

2011-02-15 Thread Remco Poelstra
Hi, Thanks for your reply. The problem with this solution is that when I do a setValue:object forKeyPath:@"preset0.parameter", and @"preset0" is the current preset, than no KVO message is sent to observers observing the @"current" variant of the keyPath. That would only happen, if they used

Re: converting app to a document based app

2011-02-15 Thread Quincey Morris
On Feb 15, 2011, at 07:30, Nick Rogers wrote: > Hi, > Googled a lot but didn't find anything. > Can some one send definitive steps for converting a non-document based app to > a document based app. 1. Create a new project using the document-based app template. 2. Move the code you need from the

Contextual menu commands in the Finder

2011-02-15 Thread David Catmull
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 only apply to files in certai

Re: rewriting observed keyPath

2011-02-15 Thread Quincey Morris
On Feb 15, 2011, at 05:11, Remco Poelstra wrote: > I've a "PresetsController" which holds a dictionary containing preset > settings for my application. The presets contain trees (Mutable Dictionaries) > of keys. > To save the GUI code from bothering with tracking the current preset, I want > to

Re: Sharing a model

2011-02-15 Thread Kyle Sluder
On Feb 15, 2011, at 8:50 AM, Marc Respass wrote: > Keep in mind that in an NSDocument-based application, your NSDocument > subclass *is* the model. You can have multiple windows all looking at the > same model. You can get the document from the window's controller and the > window from any vie

Re: Nib not awoken

2011-02-15 Thread Ross Carter
On Feb 15, 2011, at 10:49 AM, Bruce Cresanta wrote: > I am using an NSDocument based application and I'm having trouble with > the following code: > > -(void) analyzePressed > { > NSString * raw = [[[NSString alloc] initWithBytes:[pageData bytes] > length:[pageData length] encoding

Re: Re: Sharing a model

2011-02-15 Thread Marc Respass
> 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. > Keep in mind that in an NSDocument-based application, your NSDocum

Re: Using NSTerminateLater with a Status Item

2011-02-15 Thread Jeff Johnson
On Feb 14, 2011, at 3:25 PM, jonat...@mugginsoft.com wrote: > On 14 Feb 2011, at 19:29, Olivier Lance wrote: > >> Hi Jeff, >> >> Well that's what I was afraid to learn... >> Gotta find a workaround then! >> > I don't know if this would fly or not but... > > Rather than conventionally returnin

Re: Community Suggestions on Encryption

2011-02-15 Thread Jean-Daniel Dupas
Le 15 févr. 2011 à 16:35, Brad Stone a écrit : > I've been doing a lot of hunting to find a simple way for me to encrypt an > NSString and NSData. I've found a bunch of useful blogs like Cocoa Nut > (http://cocoa-nut.de/?tag=encryption, Deusty:Using OpenSSL in Cocoa > (http://deusty.blogspot.

Nib not awoken

2011-02-15 Thread Bruce Cresanta
Hello, I am using an NSDocument based application and I'm having trouble with the following code: -(void) analyzePressed { NSString * raw = [[[NSString alloc] initWithBytes:[pageData bytes] length:[pageData length] encoding: NSUTF8StringEncoding] retain]; id analyzerdoc

Community Suggestions on Encryption

2011-02-15 Thread Brad Stone
I've been doing a lot of hunting to find a simple way for me to encrypt an NSString and NSData. I've found a bunch of useful blogs like Cocoa Nut (http://cocoa-nut.de/?tag=encryption, Deusty:Using OpenSSL in Cocoa (http://deusty.blogspot.com/2007/01/using-openssl-in-cocoa.html) and the SSCrypt

converting app to a document based app

2011-02-15 Thread Nick Rogers
Hi, Googled a lot but didn't find anything. Can some one send definitive steps for converting a non-document based app to a document based app. In my app, there is a MainMenu.nib and an AppController class. I'd also want to convert the nib to a xib. I'd really appreciate any help on this. Wishe

rewriting observed keyPath

2011-02-15 Thread Remco Poelstra
Hi, I've a "PresetsController" which holds a dictionary containing preset settings for my application. The presets contain trees (Mutable Dictionaries) of keys. To save the GUI code from bothering with tracking the current preset, I want to give my PresetController the option to replace a keyPat