Code Monkey home page Code Monkey logo

Comments (3)

rwoldford avatar rwoldford commented on August 25, 2024

Adrian

Any chance of you getting to this one?

from loon.

sebres avatar sebres commented on August 25, 2024

As for invalid command name "0" for uplevel #0 [$activewidget scaleto world]", it is pretty clear:
the method "scaleto" can return 0, at least I found correct method in

The commit as well as return 0 is not an issue directly, but it looks like here and there are some code pieces with a bit confusing basic Tcl handling, for example:

uplevel #0 [$activewidget scaleto world]

uplevel #0 [update idletasks]

I can provide a PR fixing that...


Command uplevel #0 cmd processing the command cmd at top-level,
but in case of uplevel #0 [cmd], Tcl would firstly execute cmd at current level and then the result (returned by this command) at top-level.
If command returns empty value (or does not return something at all), uplevel #0 [cmd] is comparable with uplevel #0 {}, what simply does nothing.

There are 3 "solutions" depending on expected behavior:

  • either one should rewrite it as uplevel #0 [list cmd arg1 ... argN] to force execution of cmd at top-level;
  • or to relocate it to event like after 0 [list cmd arg1 ... argN] to execute it retarded (as event, at top-level too)
  • or even to remove uplevel #0 [ at all, so cmd arg1 ... argN only, if execution in the current level is allowed (because doing the job all the time).

For example uplevel #0 [update idletasks] is the same as update idletasks (variant 3), because update always executes pending events at top-level and always returns nothing, so uplevel #0 {} is simply called after an update (and doing really nothing there).

from loon.

waddella avatar waddella commented on August 25, 2024

thanks @sebres. @rwoldford these issues are fixed now. Please let me know if you still find some issues with switching graphs.

from loon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.