• 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
Re: Conceptual problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conceptual problem


  • Subject: Re: Conceptual problem
  • From: Chris Hanson <email@hidden>
  • Date: Thu, 9 Jan 2003 02:18:21 -0600

At 6:01 PM +1300 1/9/03, Michael Norris wrote:
For instance: [MyDocument newEntry] is obviously wrong, as the compiler complains about "factory methods". How would I get a handle to the current instantiation of the NSDocument class?

Or is this a conceptual problem I'm having? Should I be sending that message somewhere else?

Probably.

I'd implement it as something your table view's delegate can handle, using something like this:

- (void)userHitTabInLastRow
{
id myDelegate = [self delgate];

if ([myDelegate respondsToSelector:@(userHitTabInLastRowOfTableView:)]) {
[myDelegate userHitTabInLastRowOfTableView:self];
}
}

Then make your NSDocument subclass -- or whatever object you want to actually handle adding a new row to the bottom of your table view -- your table view's delegate in Interface Builder, and have it respond to the message -userHitTabInLastRowOfTableView:(MyTableView *).

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.

References: 
 >Conceptual problem (From: Michael Norris <email@hidden>)

  • Prev by Date: Re: Forcing NSUserDefaults being written to disk?
  • Next by Date: Re: Aqua Human Interface and Safari
  • Previous by thread: Conceptual problem
  • Next by thread: Re: Conceptual problem
  • Index(es):
    • Date
    • Thread