|
From: Steve L. <st...@Di...> - 2006-01-25 02:18:47
|
hi Joe,
As discussed, attached is my feedback re the Tile notebook.
I've started moving an cross-platform / multi-lingual app to Tile and
I wanted to give you some feedback re the highs and the lows that
I've encountered, with the specific intent of helping make Tile reach
it's obvious potential.
The application itself uses BWidgets + tablelist (plus optcl and a
few other extensions).
Overall, the process has been relatively easy - largely because I use
ActiveState's style package and therefore tend to not play around
with widget options explicitly.
Getting BWidgets to play nicer with Tile was easy enough, thanks to
Jeff's mods in the latest BWidgets
package require BWidgets
Widget::theme 1
Likewise, the newer versions of tablelist have some tile support
package require tablelist_tile
The main issue I've struck so far has been limitations with the
notebook widget. Whilst I suspect that notebook can do everything I
want, I find it much less convenient to use than the BWidget notebook.
For example, BWidget NoteBook has a raisecmd option, that causes the
specified command to be run when a tab is raised. Also, it allows
symbolic names for tabs. I use this extensively, and it is quite
convenient to say something like
$notebook insert end TabName -frame $frame -raisecmd [list raisecmd
TabName]
where the raisecmd proc can then do whatever it needs to do for the
current tab. Or I could have written it like
$notebook insert end TabName -frame $frame -raisecmd raisecmd
and within raisecommand use "$notebook raised" to get the symbolic
name of the currently raised tab.
I realise I can use the <<NotebookTabChanged>> virtual event, but
it is nowhere near as convenient. Setting it up is easy enough ....
bind $notebook <<NotebookTabChanged>> raisecmd
But within raisecmd I then have to discover which tab was raised.
Sounds simple, but without symbolic names for tabs I can either use
the numeric index (which will breaks because not all tabs are
displayed) or the tab text (which will break because the application
is multilingual). I'm assuming that I could use the child pane
window, except I don't see any way of retrieving it. For example
$notebook tab current
returns
-padding 0 -sticky nsew -state normal -text TabName -image {} -
compound none -underline -1
In the end I worked around it by creating all the tabs I might need
and leaving unused ones hidden - and then using numeric indices. A
pain and the resulting application code is much more complicated than
it needs to be.
I'm not even sure what the solution should be - a "-raisecmd" option,
symbolic tab names, a way of passing the child pane window in the
event binding, modify the "notebook select" command to return the
selected tab if no index is specified, whatever. I just know that
Tile notebook is good but could be much better with a little effort.
Now please don't think I'm saying that the Tile notebook is all bad -
it isn't and I wouldn't have invested the time if I didn't think the
end results justified it. But equally, please don't gloss over the
issue either. Leaving aside the pros/cons of the BWidget
implementation - the authors clearly understood the requirements of
application development and it would be a shame if Tile remains more
difficult to use for the application programmer.
I realise that there are different ways of achieving the same
outcome, but my concern is that issues like the above are an
impediment to Tile realising it's potential.
Best regards
Steve
|