Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling empty grids and changes to the number of rows & columns #9

Open
ghost opened this issue May 3, 2014 · 6 comments
Open

Handling empty grids and changes to the number of rows & columns #9

ghost opened this issue May 3, 2014 · 6 comments
Labels

Comments

@ghost
Copy link

ghost commented May 3, 2014

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?

@ghost ghost added the bug label May 3, 2014
@ghost
Copy link
Author

ghost commented May 8, 2014

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.

@ghost
Copy link
Author

ghost commented May 13, 2014

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.

@mikecsh
Copy link
Owner

mikecsh commented May 19, 2014

Hi, I can take a look at this in the first week of June - sounds excellent!

@ghost
Copy link
Author

ghost commented Jun 5, 2014

Midweek ping!

pixelspark referenced this issue in pixelspark/mbtablegrid Mar 14, 2015
pixelspark referenced this issue in pixelspark/mbtablegrid Mar 14, 2015
* commit 'd792ac5ad1c5c06060a3ab522744f2c7a7beaa44': (55 commits)
  #42: column sizing fixes
  #25: copy/paste support
  #41: auto-complete cell content enhancement
  #33: quick view button tweaks
  Typo fix
  #41: auto-complete cell content enhancement WIP
  #40: fill drawing enhancements
  #33: quick view & fill dot only visible on hover
  #39: footer narrow window issue fix
  #34: moving columns fix
  #38: deprecated drag method fix
  #35: formatter exception fix
  #32: footer scroll view syncing fix
  #32: scroll view syncing fixes
  Changed minimum column width to 30 pts.
  #30: column width resizing fix
  #9 & #10: summary row completed
  #11: fill click tweak
  #11: fill now adds & removes rows when dragging beyond the size of the table
  Fixed crash if multiple cells are selected and you start typing.
  ...

Conflicts:
	MBTableGrid.m
	MBTableGrid.xcodeproj/project.pbxproj
	MBTableGridContentView.m
	MBTableGridHeaderCell.m
	MBTableGridHeaderView.m
@DivineDominion
Copy link

Pinging for news :)

@mikecsh
Copy link
Owner

mikecsh commented Apr 15, 2016

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants