while(index != NSNotFound)
        {
                for(i=0;i<count;i++)
                {
                        BMatrixCell *bmxc = [cells objectAtIndex:i];
int cmp = bfn.GetFileName().CompareNoCase(bmxc- >mBFilename.GetFileName());
                        if(cmp == 0)
                        {
                                [bmxc setState:NSOnState];
                                [_browserView getRow:&row column:&col 
ofCell:bmxc];
                                NSInteger pos = (row*cols)+col;
                                [_browserView setSelectionFrom:pos to:pos 
anchor:pos highlight:YES];
                                break;
                        }
                }
        }


There is more code above and below this snippet but the point is that after executing with multiple bmxc cells that should be selected only the last one found is selected.

BUT, if [bmxc setState:NSOnState]; is not called as in:


        while(index != NSNotFound)
        {                       for(i=0;i<count;i++)
                {
                        BMatrixCell *bmxc = [cells objectAtIndex:i];
int cmp = bfn.GetFileName().CompareNoCase(bmxc- >mBFilename.GetFileName());
                        if(cmp == 0)
                        {
                                [_browserView getRow:&row column:&col 
ofCell:bmxc];
                                NSInteger pos = (row*cols)+col;
                                [_browserView setSelectionFrom:pos to:pos 
anchor:pos highlight:YES];
                                break;
                        }
                }
        }


then all expected to be selected cells are selected !
Seems like strange behavior to me.  Comments please.

-koko
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to