Mailing Lists: Apple Mailing Lists

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

Best way to implement calling another controller/class?



I'm trying to determine what would be the best way to implement some functionality in one of my programs. My program has three class controllers. One operates the functionality of the window and which tab window should be in front. Then I have two other class controllers which manage the functionality of each of the tabbed windows.

I want to be able to drop files onto my application, and the window controller will take in the files, decide what to do with them, and then send them off to the proper controller. Will I need to call a new class instance, or can I send the information some other way, or perhaps just make the information global between all three of the classes?

Here is a general idea in what I'm trying to do.

- (BOOL) application:(NSApplication *)theApplication openFile:(NSString *)filename
{
if (some_case)
{
// call one controller class and send file name(s)
}
else
{
// call the other controller class and send file name(s)
}
return NO;
}

Chad Armstrong
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



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.