August 03, 2017 Re: How to build GUI-based applications in D ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dukc | On Tuesday, 1 August 2017 at 16:12:45 UTC, Dukc wrote: > On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote: >> i couldn't set control's width and height (Button widget) shows error. maybe it works a different way. > > 1. Try layoutHeight/width. Remember to set it for the main widget too, not just the children of it. > > 2. DlangUI is not intended to define sizes in pixels as a standard practice. Instead, use layouts and layout sizes. This is intended to courage you to make your program resolution-agnostic. > > But I'm a beginner at this topic too. Take these with a grain of salt thank you Dukc it worked, i should adapt with this different naming style. (as comparing to C#) [yesterday] but today, when i went to create another project, it failed. i get this message: D:\ashit\documents\D\simpled>dub init simpled dlangui Couldn't find package: dlangui. it works without the "dlangui" option, but then when i execute run command: D:\ashit\documents\D\simpled>dub run Performing "debug" build using dmd for x86. simpled ~master: building configuration "application"... source\app.d(2,8): Error: module dlangui is in file 'dlangui.d' which cannot be read import path[0] = source import path[1] = C:\dmd2\windows\bin\..\..\src\phobos import path[2] = C:\dmd2\windows\bin\..\..\src\druntime\import dmd failed with exit code 1. this is the path i have extracted the dlangui files: D:\ashit\software\D Compiler\DlangUI\dlangui-master how to define dlangui for DUB? |
August 05, 2017 Re: How to build GUI-based applications in D ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ashit | On Thursday, 3 August 2017 at 10:02:19 UTC, ashit wrote:
> On Tuesday, 1 August 2017 at 16:12:45 UTC, Dukc wrote:
>> On Tuesday, 1 August 2017 at 15:18:12 UTC, ashit wrote:
>>> i couldn't set control's width and height (Button widget) shows error. maybe it works a different way.
>>
>> 1. Try layoutHeight/width. Remember to set it for the main widget too, not just the children of it.
>>
>> 2. DlangUI is not intended to define sizes in pixels as a standard practice. Instead, use layouts and layout sizes. This is intended to courage you to make your program resolution-agnostic.
>>
>> But I'm a beginner at this topic too. Take these with a grain of salt
>
> thank you Dukc
>
> it worked, i should adapt with this different naming style. (as comparing to C#)
> [yesterday]
> but today, when i went to create another project, it failed.
> i get this message:
>
> D:\ashit\documents\D\simpled>dub init simpled dlangui
> Couldn't find package: dlangui.
>
> it works without the "dlangui" option, but then when i execute run command:
>
> D:\ashit\documents\D\simpled>dub run
> Performing "debug" build using dmd for x86.
> simpled ~master: building configuration "application"...
> source\app.d(2,8): Error: module dlangui is in file 'dlangui.d' which cannot be
> read
> import path[0] = source
> import path[1] = C:\dmd2\windows\bin\..\..\src\phobos
> import path[2] = C:\dmd2\windows\bin\..\..\src\druntime\import
> dmd failed with exit code 1.
>
> this is the path i have extracted the dlangui files:
>
> D:\ashit\software\D Compiler\DlangUI\dlangui-master
>
> how to define dlangui for DUB?
The DlangUI docs has you covered with everything you need to set it up both on the github README file or the github wiki.
Its just:
dub init PROJECT_NAME dlangui
This will create project and add dlangui as dependency. Creating a project requires Internet connection to download the dlangui package. You may also add dlangui as a dependency in the project's dub.json file.
|
August 05, 2017 Re: How to build GUI-based applications in D ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ashit | On 2017-08-01 17:45, ashit wrote: > thank you James > > i should try that. > i was always enjoy the pure and efficiency of C. that made me stubborn > to learn java. Just to be clear, there's no Java code in DWT. Everything is ported to D. -- /Jacob Carlborg |
August 05, 2017 Re: How to build GUI-based applications in D ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to aberba | On Saturday, 5 August 2017 at 07:10:50 UTC, aberba wrote:
> The DlangUI docs has you covered with everything you need to set it up both on the github README file or the github wiki.
>
> Its just:
>
> dub init PROJECT_NAME dlangui
>
>
> This will create project and add dlangui as dependency. Creating a project requires Internet connection to download the dlangui package. You may also add dlangui as a dependency in the project's dub.json file.
thank you aberba
ok, so this is useless to me.
i want something fully functional stand-alone tools.
i have no internet connection there.
|
August 05, 2017 Re: How to build GUI-based applications in D ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ashit | thank you everybody for your time to answer my questions. |
August 07, 2017 Re: How to build GUI-based applications in D ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ashit | > thank you aberba
>
> ok, so this is useless to me.
> i want something fully functional stand-alone tools.
> i have no internet connection there.
Don't worry, DlangUI is stand-alone: you only need the connection to download it, but not to use it nor to compile with. Dub will function without connection if you have already downloaded the needed dependencies.
If you have no connection at all for the device you develop with, you can use dub add-local to register a package you have fetched manually.
|
Copyright © 1999-2021 by the D Language Foundation