472,993 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

Tkinter "Expected boolean value"


Good morning.

I've got a Tkinter problem:

File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""

Now a few weeks ago there was a similar problem with the boolean value.
That's when the tcl started returning "???" for unknown fields in a
callback. This looks to be related. I am running the newest cygwin version
of python (Python 2.3 (#1, Aug 5 2003, 09:49:11)) with libtk and libtcl
8.4.

Is it possible to fix this without re-compiling? I've got a lot of
c-modules/wrappers etc. I'll have to do an installation of my program soon
and so far I've been able to use only the stock versions of cygwin.

Greg

"Many a man may look respectable, and yet be able to hide at will behind a
spiral staircase."
- Pelham (Plum) Grenville Wodehouse
Jul 18 '05 #1
4 5149

I am sorry to be reposting this after only 20 hours, but this newsgroup is
very busy and I am quite desperate for an answer.

Please, if you know anything about this problem - let me know.
I am running the newest version of both python and tcl/tk available for
cygwin.

Grzegorz Dostatni

On Thu, 27 Nov 2003, Grzegorz Dostatni wrote:

Good morning.

I've got a Tkinter problem:

File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""

Now a few weeks ago there was a similar problem with the boolean value.
That's when the tcl started returning "???" for unknown fields in a
callback. This looks to be related. I am running the newest cygwin version
of python (Python 2.3 (#1, Aug 5 2003, 09:49:11)) with libtk and libtcl
8.4.

Is it possible to fix this without re-compiling? I've got a lot of
c-modules/wrappers etc. I'll have to do an installation of my program soon
and so far I've been able to use only the stock versions of cygwin.

Greg

"Many a man may look respectable, and yet be able to hide at will behind a
spiral staircase."
- Pelham (Plum) Grenville Wodehouse


Jul 18 '05 #2
You'd do better with tk8.3 than 8.4. There were some incompatible
changes in Tk 8.4's "bind" command that cause Python problems. I'm not
sure in what version of Python this problem is fixed.

As for your 'expected boolean value' problem, there's not enough
information for me to guess the cause. It's not something I've heard of
before. If you want help, your best bet would be to post a small
program that is runnable and demonstrates the problem.

Jeff

Jul 18 '05 #3
Grzegorz Dostatni <gr******@ee.ualberta.ca> wrote:
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""


I guess: Tcl needs a boolean value and gets an empty string?

Try to look in this direction.

Mike
Jul 18 '05 #4
Grzegorz Dostatni <gr******@ee.ualberta.ca> wrote:
File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2310, in selection_present
return self.tk.getboolean(
TclError: expected boolean value but got ""


After looking in the man-page of Tcl_GetBoolean here is a more precise
answer.

"Tcl_GetBoolean expects string to specify a boolean value. If string is
any of 0, false, no, or off, then Tcl_GetBoolean stores a zero value at
*boolPtr. If string is any of 1, true, yes, or on, then 1 is stored at
*boolPtr. Any of these values may be abbreviated, and upper-case
spellings are also acceptable."

Hope that helps.

Mike

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Danny | last post by:
Hi I don't understand why I keep getting "Error: Object expected" I tried different things and haven't been able to solve it. I'm a newbie so I'm not sure what I'm doing wrong. The debugger breaks...
5
by: Rick | last post by:
I wrote the following code as part of a page where users can reorder a list of items by highlighting an item in a list box and clicking an "up" or "down" button to move the items around. The code...
2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
6
by: Alan Silver | last post by:
Hello, I am data binding a repeater that has a checkbox in the ItemTemplate. The data value coming out of the database is a char(1) field containing either "y" or "n". I want to use this value...
3
by: Jon | last post by:
I'm learning about datatables. When using the example provided by MS in the ..NET Framework Class Library for DATATABLE (see below) I get an error on line 3 that says "Type expected". Is something...
16
by: Steve Chapel | last post by:
When I load the page <https://bugzilla.mozilla.org/attachment.cgi?id=237739with Internet Explorer 7 RC 1, I get the error "Object Expected" at line 174. When I click on the button, I also get the...
2
by: thj | last post by:
Hi. I've got this form that I'm trying to validate: <form id="periodForm" action="" method="post"> <p> Periode: <input id="startDate" name="startDate" type="text" size="7" value="<%=...
9
by: Rohit | last post by:
I am trying to initialize an array whose initializers depend on value of Enums. I take enum and then decide the initializer value, so that even if enum value changes because of addition to list...
9
by: erictheone | last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.