Open ghost opened 10 years ago
Another option regarding empty selection indexes: if there is at least one cell, force at least one selected row and one selected column—this matches current behaviour. Selected row (column) indexes are empty if and only if there are no rows (resp. columns), so any method that inspects -firstIndex
or -lastIndex
only needs to make sure that the grid is not empty.
I’ll work on implementing this throughout the code base in the emptytable branch.
I believe the emptytable branch is ready to be merged into master, but I could definitely use more eyes. I’ll wait for two weeks before merging.
Hi, I can take a look at this in the first week of June - sounds excellent!
Midweek ping!
Pinging for news :)
@bavarious @DivineDominion Hi both, I'm afraid I no longer have any free time to spend on mbtablegrid, especially considering I'm not using it in any apps. My suggestion would be to use either one of the much more advanced and maintained forks from @brendand or @pixelspark - good luck!
I’ve created a branch called ‘emptytable’ with some changes to MBTableGrid so that it is able to handle empty grids and changes to the number of rows & columns, especially when rows & columns are removed.
Comments are welcome.
One thing that I think we should do is to review
selected{Row,Column}Indexes
for no selection. I see there’s code that assumes that-firstIndex
and-lastIndex
are always valid, but that’s not the case when we have an empty grid. In-[MBTableGrid initWithFrame:]
, these index sets default to index 0. Should we change them to empty sets and review all code that uses them?