Re: Scripting Bridge warning: 'no class for scripting class "iTunesBrowserWindow"'

2011-10-23 Thread Gabriel Roth
> I think iTunesBrowserWindow *is* the classForScriptingClass and that you want > to ask for classForScriptingClass:@"browser window". m. Yes, that seems to be correct. Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Scripting Bridge warning: 'no class for scripting class "iTunesBrowserWindow"'

2011-10-20 Thread Gabriel Roth
Hello all: The Scripting Bridge header file for iTunes identifies iTunesBrowserWindow as a subclass of iTunesWindow. But when I run the following code: iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; SBElementArray *windows = [iTunes window

Re: + (void) initialize not getting called

2011-07-24 Thread Gabriel Roth
On Sun, Jul 24, 2011 at 3:33 PM, Ken Tozier wrote: > I wrote a class that stores data common to all instances in an, init file, > but when I create new instances, + (void) initialize isn't getting called. I can't tell for sure from your email, but it seems like you might be expecting initialize

Re: Smooth resizing of a text field

2011-07-20 Thread Gabriel Roth
On Wed, Jul 20, 2011 at 4:12 PM, Fritz Anderson wrote: > > A couple of minutes' search turned up drawCenteredShrinkingToFitInRect: in > NSAttributedString-OAExtensions. I don't think it's on-point for what you're > looking for, but you may be able to derive a technique. To report back: With som

Smooth resizing of a text field

2011-07-20 Thread Gabriel Roth
My application displays a non-editable text string in an NSTextField. When the user adjusts a slider, the entire window and all its subviews—including this text field—should resize smoothly. My first thought was to bind the font size of the text field to a property and have that property set to a

Re: Unable to re-add tracking area after it's been removed

2011-07-18 Thread Gabriel Roth
ul 18, 2011, at 04:59, Gabriel Roth wrote: > >> Thanks for the corrections. But changing the line in question to >> >>      myTrackingArea = [[NSTrackingArea alloc] >> initWithRect:self.blueView.bounds >> options:(NSTrackingMouseEnteredAndExited | >> NSTrackin

Re: Unable to re-add tracking area after it's been removed

2011-07-18 Thread Gabriel Roth
> Well, one thing that's wrong is that the tracking area is supposed to be in > the "target" view's coordinate system, > that is, blueView's, but you specified it in blueView's parent view's > coordinate system. > > IAC, if what you want is to track the mouse when it enter's blueView, then > mos

Unable to re-add tracking area after it's been removed

2011-07-17 Thread Gabriel Roth
I'm attempting to add, remove, and re-add an instance of NSTrackingArea to a custom view. Adding works fine; removing works fine; but when I attempt to add it to the view again, the tracking area is not added. Here's the code: - (void)applicationDidFinishLaunching:(NSNotification *)aNotification

Re: beginner's question: having problems with saving/loading

2009-05-13 Thread Gabriel Roth
her (large) gaps in my understanding. gr. On Tue, May 12, 2009 at 4:10 PM, mmalc Crawford wrote: > > On May 11, 2009, at 12:42 PM, Gabriel Roth wrote: > > >> The app contains just one class (besides MyDocument), called >> AppController. The code for AppController is pa

beginner's question: having problems with saving/loading

2009-05-11 Thread Gabriel Roth
In my attempt to learn Cocoa programming, I’m working on a tiny app to practice saving and loading files. Each document window contains a text field, a label, and a button. The user types a string into the text field and clicks the button, and the same text appears in the label. When the document i