Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have an error messege and can't figure out what it means 1

Status
Not open for further replies.

tclbud

Programmer
May 29, 2002
2
US
I'm trying to run a program that creates a notebook with tabs and can't get past an error that says "Bad screen distance #AEAEB2B2C3C3" I don't understand what it means.
The error comes at "switch -- $tag" can anyone help?

proc Rnotebook:create {w args} {
global Rnotebook tcl_platform

frame $w -borderwidth 0 -relief flat

set Rnotebook($w,ntab) 1
set Rnotebook($w,tabs) {1}
set Rnotebook($w,current) 0
set Rnotebook($w,theight) 30
set Rnotebook($w,padx) 0
set Rnotebook($w,bwidth) 2
set Rnotebook($w,background) [$w cget -background]
set Rnotebook($w,foreground) black

foreach {tag value} $args {
switch -- $tag {
-borderwidth {
set Rnotebook($w,bwidth) $value

}
-height {
set Rnotebook($w,theight) $value
}
-tabs {
set Rnotebook($w,tabs) $value
set Rnotebook($w,nbtab) [llength $value]
}
-nbtab {
set Rnotebook($w,nbtab) $value
}
-padx {
set Rnotebook($w,padx) $value
}
-background {
set Rnotebook($w,background) $value
}
-foreground {
set Rnotebook($w,foreground) $value
}
}
}




 
Hm. There would seem to be something going on beyond what you've presented here. The only obvious problem I see with the code you posted is that there is a missing close brace (}). If this is simply a typo in your posting, then the problem is unlikely to be in this code block. On the other hand, if your actual code is missing the close brace, that might cause some problems.

By the way, do you realize that the tabbed notebook megawidget is one of the most commonly implemented megawidgets in Tcl extensions? Off the top of my head, I know of 4 extensions implementing one: Blt, Bwidgets, [ignore][incr Widgets][/ignore], and Tix. At this point, there's hardly any need to implement your own except for the programming practice. To learn more about these extensions, visit the Tcl'ers Wiki at and search on the various package names. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top