From: Alpha-Bugzilla <alp...@ic...> - 2002-10-31 10:15:44
|
[This e-mail has been automatically generated.] http://www.maths.mq.edu.au/~steffen/Alpha/bugzilla/show_bug.cgi?id=647 ------- Additional Comments From vi...@sa... 2002-10-31 21:15 ------- On Thu, 31 Oct 2002, Alpha-Bugzilla wrote: > ------- Additional Comments From vi...@sa... 2002-10-31 20:54 ------- > proc dialog::setControlValue {dialItemSetCmd name val type} { > #tclLog "dialog::setControlValue $dialItemSetCmd $name $val $type" > set varInfo [list $name $type] > > if {[info commands ::dialog::specialView::$type] != ""} { > set view [::dialog::specialView::$type $val] > } else { > set view $val > } > eval $dialItemSetCmd [list $varInfo $view] > } I think I can see perhaps what Lars is getting at now: the above code doesn't really take account of information that Alphatk/Alpha8/X has. The application knows how much space is available for the item, and therefore whether it needs to be appreviated or not. 'dialog::specialView::$type' accomplishes two tasks: (i) prettification (which we want here), and (ii) abbreviation (which we may not want, and which we certainly want to be able to control). So, while the above code is better than before, an ideal solution will be more complex. What is really needed is to evaluate: eval $dialItemSetCmd [list $varInfo $prettyVersion] and then for Alphatk/X/8 internally to call back out to AlphaTcl if and only if it wants $prettyVersion abbreviated. Lars: does that sound right? Any suggestions for how to make use of dialogsNew's utility code to accomplish this? (it obviously requires changes to Alphatk/8/X but that's fine). cheers, Vince. -- This e-mail has been sent to you by the Alpha-Bugzilla bugsystem (http://www.maths.mq.edu.au/~steffen/Alpha/bugzilla/) I am an automated system, please direct your replies or complaints to my maintainer <st...@ma...> |