Re: Report error broken???

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Mon, 24 Apr 1995 11:36:37 +0100

> Andrew Joseph Kompanek writes
>
> In STk2.1.6 when an error is encountered I get the following:
>
> *** Error:
> No applicable method for #[<generic> 40034c48]
> in call (raise ".report-error.button0" ".report-error.default")
>
> *** Error:
> window name "report-error" already exists in parent
>
> *** Error:
> window name "report-error" already exists in parent
>
> where the last error keeps repeating until I break out of it. I'm
> not sure if this is a problem I somehow caused hwen I added a primitive
> to the interpreter or what might be wrong.
>
> I can't figure out what's going wrong and a project has stalled because
> of this. I wasn't having any problems with 2.1.5...
>

The most probable thing is that you have defined a method called "raise" in
your program. But, the error procedure which popup a window (and which is
written in Scheme) overload the Tk command raise.

Two ways are possible to circumvent the problem:

        1. Rename the raise in the file Lib/error.stk to Tk:raise (which is another
name for the Tk command raise)
        2. define a method for raise which will call the standard raise if
parameters don't match the method you have defined. Something like
                (define-method raise l
                        (apply Tk:raise l))
should do the job.


First solution (i.e. prefixing all the Tk commands with "Tk:") is clearly my
work (it is on my TODO list since a long time)

Second solution has the advantage to bemore general.

                -- Erick
Received on Mon Apr 24 1995 - 11:36:39 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST