awakeFromNib

2008-06-16 Thread David Harper
Hello, I am setting up a preferences window, and I would like awakeFromNib: to be invoked earlier than it does. Currently, it only gets invoked when the preferences window is shown / opened. I expected that there might be an option to specify this in the .nib file itself, and I got my hopes u

awakeFromNib

2008-06-16 Thread David Harper
Hello, After some exploration into NSWindowController methods, I found that invoking [... window] after initWithWindowNibName had the desired result. +(PreferencesController *) sharedPreferencesController { if (!sharedPreferencesController) { sharedPreferencesController = [[self allo

NSBezierPath fill pattern?

2008-07-14 Thread David Harper
Hello, I'm hoping to find a way to fill an NSBezierPath with a bitmap pattern of arbitrary size - probably something like 32x32. It will be a 2-color "on-off" (foreground-background) pattern where each color can be defined by the user. Looking through the NSBezierPath class documentation, not

registration code issues

2008-07-30 Thread David Harper
Hello, My Cocoa Application is currently in beta, and there is a single beta tester who insists his registration code is not working. I've extensively looked into the issue and it seems that the code works correctly up to the if statement which simply says: if ([validCode isEqualToString:ente

keydown, determining if a keypress was "repeated"

2008-03-03 Thread David Harper
Hello, When a keyDown event is received, does anyone know how to determine whether the event was caused by a key press or a timed repeat? For example, when the x key is pressed and held, I would prefer to ignore the events following the initial key press. Thanks in advance, -Dave H.

alBufferData, void * data

2008-04-07 Thread David Harper
hello! I'm trying to figure out how to use openAL without alut (as alut is no longer included in the openAL framework). The roadblock I am facing is that alBufferData requires a pointer to a sound's bitmap data. NSSound doesn't seem to have the appropriate method. Any suggestions? Please let

NSMutableArray comparator; sorting on insert

2009-01-16 Thread David Harper
Hello, I have written a comparator that returns an NSComparisonResult based on the comparison of two objects as required for     [(NSMutableArray *)someArray sortUsingSelector:@selector(theSelector:)] Now, I want this array to remain sorted after each insert.  For now I am inserting, then sort

KeyDown woes =(

2009-01-30 Thread David Harper
Hello, I have been using keyDown for many years now, and thought I knew all the tricks to make it work... But now I have an NSOpenGLView subclass whose window is an NSPanel subclass without a title bar, that is the first responder and overrides the keydown: method, and yet beeps every time a k

keydown woes update

2009-01-30 Thread David Harper
Hi, It seems i sent my question a moment too soon.  To answer my own question in case anyone is curious, NSPanels, by default return NO for -(BOOL) canBecomeKeyWindow, whereas NSWindows return YES. - Dave h. ___ Cocoa-dev mailing list (Cocoa-dev@lis

interrupting a modified document save (as) invocation, security

2009-05-12 Thread David Harper
Hello, I'm finalizing an application which disallows document saving when not registered.  I've put interrupts in my NSDocument subclass' -saveDocument: and -saveDocumentAs: methods so that [super ...] is only invoked if the application is registered. However, I've just noticed that when a doc

display optimization / display rectangles

2009-05-14 Thread David Harper
Hello, I'm working on optimizing a document based application, and I've found that overdrawing is a significant contributor to the (tolerable, but non-ideal) performance issues I am experiencing. The reason overdrawing occurs is as follows: Let's say the user draws a line in the document from