--- Fred Kiefer <[EMAIL PROTECTED]> wrote:
> Gregory John Casamento wrote:
> > 
> > P.S. Fred, I'm aware of no place in the code where it replaces items with
> NULL
> > if they are nil. :)
> > 
> 
> Sorry, my fault, I used the word NULL as a short hand for [NSNull null], 
> as can be see in the following line (used about five times in the code 
> of NSOutlineView):
> 
>    id sitem = (startitem == nil)?[NSNull null]:startitem;
> 
> This makes it possible to work with nil almost as if it was a valid 
> item, but why would you want to do this? This also has been done half 
> heartedly, so some of the replacements, as in the method at hand 
> (reloadItem:reloadChildren:) hs not been done.

The above is a special case. In NSOutlineView "nil" is considered to be the
root of the tree, but you can't store nil as the key of a something in a NSMap,
so I used NSNull as a substitute.  The only time you will receive the item=nil
is in the case of the "root" element which contains the first displayed element
of the tree.  

See, in the documentation, the method "levelForItem:" for this.

Thanks, GJC

=====
Gregory John Casamento -- CEO/President Open Logic Corp.
-- bheron on #gnustep, #linuxstep, & #gormtalk ---------------- 
Please sign the petition against software patents at: 
http://www.petitiononline.com/pasp01/petition.html 
-- Maintainer of Gorm (featured in April Linux Journal) -------

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to