Giter Club home page Giter Club logo

Comments (14)

nomad-software avatar nomad-software commented on June 14, 2024

Can you explain how i can recreate this error please? Also check you have linked to the correct version of the Tcl/Tk libraries.

from tkd.

 avatar commented on June 14, 2024

I'm using Dub to build. I assume I have correct libraries. I am on win7. and using latest beta. put a couple of buttons on a form and hit the tab key. It should tab from the exit button to the about button, unless I am misunderstanding what is supposed to happen: If you have a command prompt window open you can see the TCL errors display

    auto exitButton = new Button(buttonFrame,"Exit")
        .focus
        .setKeyboardFocus(KeyboardFocus.normal)
        .pack();

    auto aboutButton = new Button(buttonFrame,"About")
        .setKeyboardFocus(KeyboardFocus.normal)
        .pack();

from tkd.

nomad-software avatar nomad-software commented on June 14, 2024

I've just tested your example on Window 7, building with dub and everything works fine.

I assume I have correct libraries.

How did you install the Tcl/Tk libraries? Are you using the ActiveTcl library mentioned in the readme or are you using the DLLs supplied in the tcltk repo?

from tkd.

 avatar commented on June 14, 2024

Hi Gary
I have TKD 1.0.6 beta. TCLTK 8.6.2 and I am not using active state install.
I build TKD with just 'DUB'.
I put tkd.lib file in the folder with my main.d and the three dll's in the tcltk dist x86 folder. I compile with DMD 2.065 the following. DMD main.d tkd.lib.

Everything works except the tabbing thing. It appears to me that the two things it is looking for are in the tcl scripts. "tk_focusNext" and "TabToWindow"

I will try downloading ActiveState and try it, and let you know what happens
Thanks
Dave

from tkd.

 avatar commented on June 14, 2024

It works with ActiveState install. Which brings me to the following question. Can I use what is distributed with TKD without worrying about ActiveState license? I.e. do the TCL scripts in TKD belong to ActiveState? I can build TCL DLL's myself, I read where that is OK,

from tkd.

 avatar commented on June 14, 2024

I really need to distribute without requiring an activestate install if possible, I was reading the scripts license.terms file, and it makes it sound like it is ok to use the scripts however I need. Active state license is pretty straitforward that it requires purchase if using it commercially

from tkd.

 avatar commented on June 14, 2024

Ha! found the problem. tclindex.tcl in your distribution is missing the entries for focus.tcl I cut and pasted and it works!

from tkd.

nomad-software avatar nomad-software commented on June 14, 2024

Right thanks, i'll take a look and remove anything from ActiveTcl in the tcltk repo. I'll update the library too. I'll compile Tcl myself and include those DLL's. Stay tuned!

from tkd.

 avatar commented on June 14, 2024

Cool. Thanks Gary

from tkd.

nomad-software avatar nomad-software commented on June 14, 2024

Ok i've sorted out the files and everything works nicely on x86 and x64 but i need to wait until the new version of dub is out until i can release a new version that uses these new libraries. Purely because the new version of dub allows me to copy across the libs during build. I don't want people building something then scratching their heads why a missing dll error appears :)

from tkd.

nomad-software avatar nomad-software commented on June 14, 2024

I noticed there was a lot of Tk missing from tclIndex so i've added it all. If you want to get your hands on it now you can see master here: https://github.com/nomad-software/tcltk I'll do a proper release of this when the new version of dub is out.

from tkd.

 avatar commented on June 14, 2024

I'll do it, I understand the dub issue. I got plenty to do for a while,
not a problem on waiting.

I hope you don't mind me firing issues at you! I got another one. The
Text widget is not a "themed" widget so it does not respond to setState.
It lets you call setState but just silently ignores what you tell it to
do. I was trying to make a text widget read only and it was not working.
it was silently ignoring the setState. I caught it in the debugger, and
then saw that I could turn tcl error display on by passing the debug
command to it, and it then told me that "state" was an invalid command.

I read the following - http://wiki.tcl.tk/1152
then I made a little subclass to get around it.

class MyText : Text
{
this(UiElement parent)
{
super(parent);
}

public void ReadOnly(bool disabled)
{
    if(disabled)
    {
        this._tk.eval("%s configure -state disabled", this.id);
    }
    else
    {
        this._tk.eval("%s configure -state normal", this.id);
    }
}

}

Later
Dave

On Wed, May 21, 2014 at 3:53 PM, Gary Willoughby
[email protected]:

I noticed there was a lot of Tk missing from tclIndex so i've added it
all. If you want to get your hands on it now you can see master here:
https://github.com/nomad-software/tcltk I'll do a proper release of this
when the new version of dub is out.


Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-43805638
.

from tkd.

nomad-software avatar nomad-software commented on June 14, 2024

Added method to the text widget. fc3d2d0

from tkd.

nomad-software avatar nomad-software commented on June 14, 2024

I'll marked this as fixed as i'll release the changes when a new release of dub is done.

from tkd.

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.