• 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
Curious about inconsistent-seeming types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Curious about inconsistent-seeming types


  • Subject: Curious about inconsistent-seeming types
  • From: Andrew Merenbach <email@hidden>
  • Date: Wed, 25 Jun 2003 17:56:29 -0700

The NSOutlineViewDataSource protocol contains the following method declaration:

- (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item;

--with an integer typecast. Although the docs say that this method is 'called very frequently, so it must be efficient,' there could obviously be no negative items. Additionally, NSArray has methods such as objectAtIndex:, which return an unsigned, rather than a signed, integer. Is it conceivable that these differences could (hypothetically) cause a problem in larger arrays that need to display hierarchical data? Is this an oversight? Optimisation?

I couldn't quite come up with a name for this question, and thus turned up little in the archives.

Take care,
Andrew
_______________________________________________
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.

  • Follow-Ups:
    • Re: Curious about inconsistent-seeming types
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: NSFrameRectWithWidth incorrect behavior
  • Next by Date: Re: OCUnit vs OBJCUnit
  • Previous by thread: NSFrameRectWithWidth incorrect behavior
  • Next by thread: Re: Curious about inconsistent-seeming types
  • Index(es):
    • Date
    • Thread