> It might be because I have tcl/
> tk-8.5.1 installed, which is still alpha iarc? They have antialiasing,
> however, which lower versions of tcl/tk lack...
Not directly related to your problem, but my understanding is that Tk
anti-aliasing won't trickle through to Python's Tkinter, and hence to
Leo, until and new Python/Tkinter version, maybe in 2.6, more likely
3.0?
I'd like to be wrong about this, because I'd like anti-aliased Leo, but
this is what I read somewhere. I guess it implies Tkinter will be
relying on Tk 8.4 until the update occurs.
Cheers -Terry
Hi, I'd like to try out leo, but whenever I type something in the body
window, I get the following error...
<type 'exceptions.TypeError'>: unsupported operand type(s) for +:
'_tkinter.Tcl_Obj' and 'int'
> Hmm, well, I did recompile python after installing tcl/tk 8.5, and leo
> looked a lot nicer after that.
Excellent, looks like I'll be compiling python today :-)
I don't know why the open source community is so slow to get to
anti-alias fonts, emacs only just got it's act sorted out in the last
year or so too. I know Gtk has had them for some time, but still.
Cheers -Terry
> > <type 'exceptions.TypeError'>: unsupported operand type(s) for +:
> > '_tkinter.Tcl_Obj' and 'int'
>
> This is a known, very serious, error in Tk/tkinter. There is a
> workaround, but it is too ugly to repeat :-)
But Leo looks so much better with anti-aliased fonts... could you
repeat it anyway? Please?
Cheers -Terry
https://sourceforge.net/forum/message.php?msg_id=4078577
which suggests this:
import Tkinter
Tkinter.wantobjects = 0
which does seem to fix the problem.
Well, the traceback on keystroke problem anyway, it's looking as if 8.5
breaks cleo somehow.
Too bad plumloco was abducted by aliens or whatever, gtk is probably
the long term solution to these issues. Hope he's doing ok.
I guess I want to take the Tk specific code out of cleo anyway, so
maybe that'll fix it.
Cheers -Terry
Hmm, I just found this:
https://sourceforge.net/forum/message.php?msg_id=4078577
which suggests this:
import Tkinter
Tkinter.wantobjects = 0
which does seem to fix the problem.
Well, the traceback on keystroke problem anyway, it's looking as if 8.5
breaks cleo somehow.
Too bad plumloco was abducted by aliens or whatever, gtk is probably
the long term solution to these issues. Hope he's doing ok.
> Anyway, it seems to me that probably only a few of Leo's core files
> should require the
> Tkinter.wantobjects = 0 hack. My guess is that only the
> leoTkinterX.pyfiles, but I could be wrong. Which files did you
> modify?
Um, ahem, well, I just stuck it at the beginning of leo.py, but if it
can be restricted to a few core files that would be great because...
> > Well, the traceback on keystroke problem anyway, it's looking as if
> > 8.5 breaks cleo somehow.
... cleo actually works fine with 8.5.1, until you enable the
wantobjects = 0 hack. Which I don't understand at all, I'd have
expected cleo to break in the same way as leo, not the reverse.
Cheers -Terry
> > > Well, the traceback on keystroke problem anyway, it's looking as
> > > if 8.5 breaks cleo somehow.
>
> ... cleo actually works fine with 8.5.1, until you enable the
> wantobjects = 0 hack.
Isolating the wantobjects = 0 hack in the leoTkinterX.py files gives
the same result as just doing it once at the start of leo.py. I.e. leo
works fine but cleo breaks. I intend to make cleo Tk free, relying on
only leos icon system for graphics, so I guess this problem will go
away, although not in a very satisfactory way.
Hmm, checking 8.4.x with wantobjects = 0, same thing, leo ok, cleo not.
Cheers -Terry
> Leo's bzr trunk now contains the wantobjects = 0 hack. For now, I've
> just put
> the code at the start of leo.py. This is the "simplest thing that
> could possibly work".
I wonder if it might be best to undo that. It's making leo work for
everyone running tkinter with Tk 8.5.1 (all two of us :-) but breaking
cleo for everyone else. As soon as I can I'll have an icon only Tk free
version of cleo for consideration.
Cheers -Terry
On Fri, 29 Feb 2008 09:53:33 -0800 (PST)
> Leo's bzr trunk now contains the wantobjects = 0 hack.
I wonder if it might be best to undo that.