[MacRuby-devel] How to use NSIndexSet with tableView data

2010-10-23 Thread Pixoo
Hi ! I'm trying to use a tableView with MacRuby. What I want to do is remove items from my data array based on the tableView selection. I used @tableView.selectedRowsIndexes but it returns a NSIndexSet and I don't know how to use it with my array. Can you give me some leads on the subject ? Than

Re: [MacRuby-devel] How to use NSIndexSet with tableView data

2010-10-23 Thread Pixoo
ke the following? > > $ macirb > irb(main):001:0> a = ['apple', 'tuna', 'orange'] > => ["apple", "tuna", "orange"] > irb(main):002:0> indices = NSIndexSet.indexSetWithIndex(1) > => # > irb(main):003:0> fis

Re: [MacRuby-devel] How to use NSIndexSet with tableView data

2010-10-23 Thread Pixoo
s in > > http://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/Classes/NSIndexSet_Class/Reference/Reference.html > > -- > Alistair Holt > > > On 23 Oct 2010, at 13:14, Pixoo wrote: > > > NSIndexSet > _

Re: [MacRuby-devel] How to use NSIndexSet with tableView data

2010-10-23 Thread Pixoo
> town and add this to NSIndexSet: http://gist.github.com/642166 > > HTH, > Eloy > > On Sat, Oct 23, 2010 at 2:14 PM, Pixoo wrote: > > That doesn't match what I need. > > Ok, here is what I have : > > > > My data is the @items variable which is an arra