Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApp sendAction: to: from question



On Tue, 28 Dec 2004 21:05:32 -0500, Bruce Truax <email@hidden> said:
>I use NSApp sendAction: to: from: in a windowDidBecomeKey method to cause
>the contents of and editor window to be updated whenever it is brought to
>the front.  The method is:
>
>- (void)windowDidBecomeKey:(NSNotification *)aNotification
>{
>    //now send the commands to update the table
>    [NSApp sendAction:@selector(setLensDataBeingRecievedYES) to:nil
>from:nil];
>    [NSApp sendAction:@selector(processCommand:) to:nil
>from:@"\nEOS\nLENO\nRTG ALL\nVBA\n"];
>    NSLog(@"Did Become Key");
>}

This is a very indirect way to message to the editor window. Why not message
the window's controller directly? m.

-- 
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.