Menu

#923 option get command responding to invalid input

obsolete: 8.3
open
3
2003-11-12
2000-11-01
No

OriginalBugID: 5957 Bug
Version: 8.3
SubmitDate: '2000-06-27'
LastModified:
Severity: MED
Status: UnAssn
Submitter: techsupp
OS: Windows NT
Machine: Dell OptiPlex GX1

Name:
Allen Flick

ReproducibleScript:
Within ~/.Xdefaults..... *Button.background: cyan
then within Wish Console

% pack [button .b -text Button]
% option get .b background Button
cyan
% option get .b background Width
cyan
% option get .b background Relief
cyan
% pack [button .b -text Button]
% option get .b background Button
cyan
% option get .b background Label
cyan
% option get .b background Text
cyan

ObservedBehavior:
No matter what is put in for "class" of option database value, the response is only for the "name"
of the option database value.

DesiredBehavior:
If the "name" option with the given "class" does not exist, I'd expect to get an
empty string as the response. Or some error code & message.

Discussion

  • Donal K. Fellows

    It is part of the defined behaviour of options under X that option names are always preferred to option classes. Tk implements exactly this, so the behaviour you describe is correct, if surprising. Perhaps a documentation change would be useful, but certainly not a code change.

     
  • Donal K. Fellows

    • priority: 5 --> 3
    • labels: 104343 --> 104335
     
  • Don Porter

    Don Porter - 2001-03-23
    • labels: 104335 --> 57. [option]
     
  • Don Porter

    Don Porter - 2003-11-12
    • assigned_to: nobody --> hobbs
     
MongoDB Logo MongoDB