Menu

#1719 TK_OPTION_NULL_OK not fully supported

open
5
2009-10-27
2004-06-05
Joe English
No

Tk_SetOptions() does not recognize the
TK_OPTION_NULL_OK flag bit for options of type
TK_OPTION_INT, TK_OPTION_BOOL, and a few others.

This causes a bug in the Tile widgets (current CVS
HEAD), which use null defaults in several places. For
example:

tlabel .l
.l configure -width [.l cget -width]
==> Error 'expected integer but got ""'

Workaround possible but this should be fixed in the core.

Discussion

  • Joe English

    Joe English - 2008-11-09
    • status: open --> closed-invalid
     
  • Jan Nijtmans

    Jan Nijtmans - 2008-11-19

    Why is this one invalid? If the documentation doesn't
    mention this, either the documentation should be modified
    to menthion that TK_OPTION_NULL_OK is not supported
    for some options, either the implementation should be
    modified to allow TK_OPTION_NULL_OK for all options.

    (I don't mind which solution is chosen, but I don't
    think that this artifact is invalid)

     
  • Joe English

    Joe English - 2008-11-19

    (Sorry, I added a comment when I changed the status, but it didn't get posted).

    The documentation already states "Not all option types support the TK_OPTION_NULL_OK flag; for those that do, there is an explicit indication of that fact in the descriptions below [...]".

     
  • Joe English

    Joe English - 2009-10-27

    dburns reports on the Tcl'ers chat that this is causing problems for GUIB (a gui builder); if a user selects a value for one of the affected by-default-NULL options, it's imposible to reset it back to the default empty value. Reopening.

     
  • Joe English

    Joe English - 2009-10-27
    • milestone: 377005 -->
    • assigned_to: hobbs --> jenglish
    • status: closed-invalid --> open
     
MongoDB Logo MongoDB