nomad-software / tkd

GUI toolkit for the D programming language based on Tcl/Tk
MIT License
117 stars 16 forks source link

Error: module `tkdapplication` is in file 'tkd\tkdapplication.d' which cannot be read #58

Closed Shadowblitz16 closed 4 years ago

Shadowblitz16 commented 4 years ago

I keep getting this error

program.d(1): Error: module `tkdapplication` is in file 'tkd\tkdapplication.d' which cannot be read

when doing this..

module pure_editor.main;
import tkd.tkdapplication;

void main()
{
    auto app = new Application();                        // Create the application.
    app.run();  
}

class Application : TkdApplication
{
    override protected void initInterface()              // Initialise user interface.
    {
        auto frame = new Frame(2, ReliefStyle.groove)    // Create a frame.
            .pack(10);                                   // Place the frame.

        auto label = new Label(frame, "Hello World!")    // Create a label.
            .pack(10);                                   // Place the label.

        auto exitButton = new Button(frame, "Exit")      // Create a button.
            .setCommand(&this.exitCommand)               // Use the callback.
            .pack(10);                                   // Place the button.
    }

    private void exitCommand(CommandArgs args)           // Create a callback.
    {
        this.exit();                                     // Exit the application.
    }
}

I have installed dub and am using vs code right now with this extension https://marketplace.visualstudio.com/items?itemName=webfreak.code-d

nomad-software commented 4 years ago

It looks like a dub configuration problem. i.e. it can't find the tkd source code.

Shadowblitz16 commented 4 years ago

I installed dub using the windows installer. does it need anything else besides dub add tdk?

Shadowblitz16 commented 4 years ago

dub is not generating the packages at all. I followed this tutorial and got this

nomad-software commented 4 years ago

You'll have to ask the dub guys.