• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Best way to implement calling another controller/class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best way to implement calling another controller/class?


  • Subject: Best way to implement calling another controller/class?
  • From: Chad Armstrong <email@hidden>
  • Date: Tue, 27 Jan 2004 10:42:38 -0600

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.

  • Prev by Date: Re: Making a String from a non-NSString
  • Next by Date: Re: How to get non-resolved FSRef from POSIX path
  • Previous by thread: [JOB OPENING] Chronos L.C. Seeks Software Engineer (Cocoa)
  • Next by thread: RunLoop and callback function
  • Index(es):
    • Date
    • Thread