DialogDesign0R V1.85

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Re: DialogDesign0R V1.82

Post by storck »

HeX0R wrote: Sat Jan 21, 2023 2:34 pm Disabling only makes it non reacting to user Input, what you are looking for is "invisible".
I have no PC with me, but an invisible Dialog will not pop-up, so you seem to make something wrong.

In case you're just using the example code DD ist producing through its templates, change the template to your needs, or remove the HideWindow() command it adds.
The example template ist only there to offer a quick possibilty to show the dialogs in PB, not to be included in your app.
You have to create your own template then.
Or alter the existing (preferences / template Editor)
Yes I was using the example code generated by DD (version 1.82). I tried today again with two windows with one editor in each. Set both windows to be invisible and disabled. The generated code starts both windows visible and enabled as far as I can type in both editors. If I disable the editors, they become disabled or invisible if I check that option. Doesn't seem to work with the windows though. Well, whatever, I guess I do something wrong. Don't really understand what though. Anyways, thank you for the reply. I'll have to experiment some more.

/ Storck
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.82

Post by HeX0R »

As said:
Remove the HideWindow() from the template and all will be good.

Go to preferences, select Miscellaneous Tab, press the button behind "Save Template" (which starts the template editor), select "FileFooter", find the line

Code: Select all

HideWindow(DialogWindow(i), 0)
remove it, or comment it, then click on save, or "save as" to name it to... don't know, "my very own save template"
Make sure, that your open dialog uses that new template then (select dialog node in the tree and you find the special dialog settings on the right).

Those template are pretty useful, as soon as you get used to them.
I typically don't add the XML in those *.pbi files, but I add all of the ID constants.
That makes it quite comfortable for the program using it, I simply include that *.pbi and have all runtime constants defined.
And whenever I change the dialog, those constants will change also.

For smaller projects I include the XML also inside that *.pbi.
The system should be very flexible, but I agree, it might not be clear from the first sight.
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Re: DialogDesign0R V1.82

Post by storck »

HeX0R wrote: Sun Jan 22, 2023 10:23 pm As said:
Remove the HideWindow() from the template and all will be good.
Yeah, you are right of course. Changed the template. All was good. I can see how the template system could be very useful indeed.

Thank you for your quick response. I started using PureBasic way back, but haven't used it a lot these last years, so things are sometimes not that obvious to me in general.

Best regards,

Storck
Last edited by storck on Mon Jan 23, 2023 6:59 pm, edited 1 time in total.
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.82

Post by HeX0R »

You mean it didn't work when you simply overwrote the example template?
Well.. that should make no difference, I might have to look into it.
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Re: DialogDesign0R V1.82

Post by storck »

HeX0R wrote: Mon Jan 23, 2023 6:58 pm You mean it didn't work when you simply overwrote the example template?
Well.. that should make no difference, I might have to look into it.
After restarting DD I found that the default template actually was changed when i overwrote it.

/ Storck
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.83

Post by HeX0R »

V1.83 (source only)
  • added CTRL+F to search for IDs or Names within the XML
  • added quite some AddOn features (as preparation for a multilanguage addon)
    you probably should recompile your existing AddOns
  • fixed some bugs
  • added template item "extra stuff", which is for statusbars, toolbars and menus
    to be able to use same IDs for toolbars and menus (which makes sense) (*3)
    you should delete SaveTemplates/default_save_template.json (will be recreated at first start)
  • added a constant #USE_MYTOOLBARSTANDARD_PBI
    For all those, who never used StandardToolbarButtons (which are no longer available since PB6.0), set it to #False
  • Debug Tool will be cleared before you load a xml into it (*1)
  • fixed a bug in the AddStuff.pbi for Mac (*3)
  • Saving Template will immediately make use of it (if the currently open dialog uses it) (*2)
(*1) thanks to tj1010
(*2) thanks to Storck
(*3) thanks to matbal
boddhi
Enthusiast
Enthusiast
Posts: 240
Joined: Mon Nov 15, 2010 9:53 pm

Re: DialogDesign0R V1.83

Post by boddhi »

Hello,

Thanks for your great tool, saving lot of time !
PureBasic Debugger wrote:Line 3189 : The list doesn't have a current element.
Line 3189 - DDesign0r_v02.pb

Code: Select all

3189 If AddOn()\DDReady
3190    AddOn()\DDReady()
3191 EndIf
The error probably happens because the directory "GetDefPath() + "AddOns" + #PS$ + SubFolder$" doesn't exist (Line 467 in DD_AddonHandling.pbi)
No AddOn() is created

To avoid this, I had to add this condition :

Code: Select all

If ListSize(AddOn())
  If AddOn()\DDReady
    AddOn()\DDReady()
  EndIf
EndIf
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.83

Post by HeX0R »

That folder surely exists, the problem is, that you don't have any compiled AddOns in it.
I'll fix that in a few minutes.
Thanks!
boddhi
Enthusiast
Enthusiast
Posts: 240
Joined: Mon Nov 15, 2010 9:53 pm

Re: DialogDesign0R V1.83

Post by boddhi »

@Hex0r
I'm new user :wink:

Indeed, the AddOns directory exists in the root folder containing the main source file but not in the one expected by the code.
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.83

Post by HeX0R »

That could only happen when:
  1. you didn't use the dd.pbp project file to compile
  2. you are compiling into temp folder
  3. you've copied the binary somewhere else without copying the folders that belong to it
The project file makes sure that you are compiling into the source folder, then all needed folders are in place and reachable.

Anyway, it was clearly a bug, I simply didn't check for existing (compiled) addons.
boddhi
Enthusiast
Enthusiast
Posts: 240
Joined: Mon Nov 15, 2010 9:53 pm

Re: DialogDesign0R V1.83

Post by boddhi »

HeX0R wrote:
  1. you didn't use the dd.pbp project file to compile    Yes, indeed I used "DDesign0r_v02.pb" to compile    :oops:
  2. you are compiling into temp folder   No
  3. you've copied the binary somewhere else without copying the folders that belong to it   and no    :)
dmontaine
User
User
Posts: 45
Joined: Tue Jun 04, 2019 1:03 pm

Re: DialogDesign0R V1.83

Post by dmontaine »

Tried to compile using pb 6.01 on Linux Mint 21.1 Cinnamon. Program compiles with both the asm and c backends. Will not run as user, will run as root. Errors running as root:

(dd_x64:14891): GLib-GObject-WARNING **: 12:58:13.542: cannot register existing type 'GtkWidget'

(dd_x64:14891): GLib-GObject-CRITICAL **: 12:58:13.542: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(dd_x64:14891): GLib-GObject-WARNING **: 12:58:13.542: cannot register existing type 'GtkBuildable'

(dd_x64:14891): GLib-GObject-CRITICAL **: 12:58:13.542: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(dd_x64:14891): GLib-CRITICAL **: 12:58:13.542: g_once_init_leave: assertion 'result != 0' failed

(dd_x64:14891): GLib-GObject-CRITICAL **: 12:58:13.542: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(dd_x64:14891): GLib-GObject-CRITICAL **: 12:58:13.542: g_type_register_static: assertion 'parent_type > 0' failed
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: DialogDesign0R V1.83

Post by HeX0R »

Did you see the compiler warning?
You should better use the qt subsystem on linux!
Maybe it doesn't run at all now on GTK, dunno
All GUI apps under linux with gtk behaving... odd, therefore I just gave-up on gtk.
I should probably remove that warning and replace it with an error message.
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: DialogDesign0R V1.83

Post by Lunasole »

Still active. I haven't look at your DD since moment years ago (v.1.49), but have no doubts it is made good.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Ktim07
User
User
Posts: 21
Joined: Wed Jun 28, 2023 7:55 pm

Re: DialogDesign0R V1.83

Post by Ktim07 »

I tried this very interesting utility today, I am a new user. But I quickly noticed something, when for example one adds a menu bar, and the first Item is File. How do you add an item under File eg Open?? (I don't know if I am doing it wrong but I couldn't figure this out as some options are disabled). Then I also think It would be useful if for example say one could add a button say "Click me" and then the window shown outside (the out put structure) allows one to edit some of the Button properties visually in that out put window like the size & position & results automatically reflected in the dialog designer ( I know this is done manually inside the dialog because those options are provided for) I am just saying it would be easier
Serious souls !!!
Post Reply