Working on Flux, doing a Pod viewer, ran into a missing or at least desired API. I have Pod contents loaded into a Tree control, and with reflection I get lots of nice info, particularly the doccomments for types, fields, methods. So I made a hover-help to present that, and now for the wish -- Tree has API for onAction, onSelect, onPopup, that translate mouse position to the node being clicked (returned in the event.data slot) -- but mousemoves etc don't get that, all you get is the untranslated x,y. Which you can't translate yourself since there's no Api for which previous nodes are open/closed.
Not a big deal, it means hover-help necessarily applies only to last-selected node, so there's a lot more clicking to browse around the tree.
Not even sure if this is a request; there's a lot to be said for having a somewhat more minimal set of core APIs. Probably the more extensive functionality should be left for custom widgets. But it'd be nice...
I guess what I'm really asking is, future direction. Is it intended that FWT is more or less closed, or should it be grown? I like it either way, really.
brianTue 24 Mar 2009
I definitely want to keep FTW growing as people need functionality! I want it to become a powerful, but simple to use toolkit.
I will take a look tomorrow at this issue.
To restate your core problem:
mouse move gives you raw tree x,y but not the node
nor does it provide a way to map node to x,y
Does that sum it up?
KevinKelleyTue 24 Mar 2009
Yep, that's it. Would be nice if the onMouseXXX family did what onAction does, putting the appropriate into the Event.data field.
brianWed 25 Mar 2009
I've pushed a change which adds the following new methods:
I didn't change the actual event objects (since those are generated by the base Widget class). But at least now you can easily map a coordinate to a tree node or table cell.
Note: for those of you working off the hg tip, you might want to hold off pulling the latest stuff until I do a build later this afternoon. I've been messing around with various bootstrap issues to try and fix the Unix bootstrap problem (I think I have it fixed).
KevinKelleyWed 25 Mar 2009
Obj? Tree.nodeAt(Point)
Great! That should do it, thanks. --minimizes the code to be executed, too; translations don't have to happen on events that're ignored, but this lets me get the info when I need it.
KevinKelley Tue 24 Mar 2009
Working on Flux, doing a Pod viewer, ran into a missing or at least desired API. I have Pod contents loaded into a Tree control, and with reflection I get lots of nice info, particularly the doccomments for types, fields, methods. So I made a hover-help to present that, and now for the wish -- Tree has API for onAction, onSelect, onPopup, that translate mouse position to the node being clicked (returned in the event.data slot) -- but mousemoves etc don't get that, all you get is the untranslated x,y. Which you can't translate yourself since there's no Api for which previous nodes are open/closed.
Not a big deal, it means hover-help necessarily applies only to last-selected node, so there's a lot more clicking to browse around the tree.
Not even sure if this is a request; there's a lot to be said for having a somewhat more minimal set of core APIs. Probably the more extensive functionality should be left for custom widgets. But it'd be nice...
I guess what I'm really asking is, future direction. Is it intended that FWT is more or less closed, or should it be grown? I like it either way, really.
brian Tue 24 Mar 2009
I definitely want to keep FTW growing as people need functionality! I want it to become a powerful, but simple to use toolkit.
I will take a look tomorrow at this issue.
To restate your core problem:
Does that sum it up?
KevinKelley Tue 24 Mar 2009
Yep, that's it. Would be nice if the onMouseXXX family did what onAction does, putting the appropriate into the Event.data field.
brian Wed 25 Mar 2009
I've pushed a change which adds the following new methods:
I didn't change the actual event objects (since those are generated by the base Widget class). But at least now you can easily map a coordinate to a tree node or table cell.
Note: for those of you working off the hg tip, you might want to hold off pulling the latest stuff until I do a build later this afternoon. I've been messing around with various bootstrap issues to try and fix the Unix bootstrap problem (I think I have it fixed).
KevinKelley Wed 25 Mar 2009
Great! That should do it, thanks. --minimizes the code to be executed, too; translations don't have to happen on events that're ignored, but this lets me get the info when I need it.