Menu

#648 -configuremethod

open-later
snit (26)
5
2006-08-19
2005-08-18
No

Things like:

option -text -configuremethod [list SetText 1]
method SetText {num option value} {
$win.lbl$num configure -text $value
set options($option) $value
}

wont work. Perhaps the callback should be concatenated
(uplevel) when executed.

snit 1.0

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-08-18

    Logged In: YES
    user_id=72656

    I was thinking about this myself for -validatemethod. I
    wanted to be able to allow things like:

    option -place -default center -validatemethod [list ListOf
    $placeValues]
    option -modal -default none -validatemethod [list ListOf
    $modalValues]
    ....

     
  • Will Duquette

    Will Duquette - 2006-08-09

    Logged In: YES
    user_id=372859

    The current behavior is as it is by design; there was considerable discussion
    on the Snit mailing list about at the time. I forget the details; you can find
    them in the Snit mailing list archives (which you can find via the Snit
    home page, http://www.wjduquette.com/snit\).

    As for the -validatemethod, it will soon be deprecated; it's being replaced
    by a "-type" option. I've got the code written and will be starting on the
    documentation updates this week; the new version will be included in
    the Tcllib release for this year's Tcl/Tk conference in October.

     
  • Will Duquette

    Will Duquette - 2006-08-19
    • status: open --> open-later
     
  • Will Duquette

    Will Duquette - 2006-08-19

    Logged In: YES
    user_id=372859

    Note that "option -type" is now available in CVS. As for updating -
    configuremethod and -cgetmethod as described here, I'll have to think about it
    some more.