nomad-software / tkd

GUI toolkit for the D programming language based on Tcl/Tk
MIT License
117 stars 16 forks source link

Allow setting TreeView column values directly #28

Closed callumenator closed 9 years ago

callumenator commented 9 years ago

I couldn't see a way to do this, so I added:

member itemId to TreeViewRow, changed TreeView to use this id when inserting into tree. method setValue to TreeView to update the value of a given row's column, using itemId to identify the row.

nomad-software commented 9 years ago

Great thanks!

The tree view could do with a bit more love as to be honest it was rushed and i didn't put a great deal of thought into it. I tried to abstract away any mention of id's and tried to provide an API that was more object oriented. Really though thinking about it, updating columns should be a simple process and i don't see any issue with what you have presented here.

I'm going to merge this and then re-factor it a little because we don't need to handle the generation of the row id's ourselves, tcl does that. I'll get it sorted and release a new version with this change in.

nomad-software commented 9 years ago

Refactored slightly in commit: https://github.com/nomad-software/tkd/commit/9874b40a8fdedaef4663811823f2188b29a10dff