This message is for anyone who would like to use DDgui features in their own programs.
Today I ran into a lot of trouble trying to load up the DDgui toolbox. I made some mistakes; yet my mistakes are your opportunity to avoid them.
If you read the DDgui text file (which is included in two formats in the DDgui folder), you will read the following:
Make a project
First thing you do is to create a project, then add the DDgui.gbas file from the
Samples/common directory to your project. Just use the "file" tab at the right side of
the GLBasic editor to do this.
(See Screenshot_1)
The process looks pretty straight forward, and it is; so long as you pay close attention when the instructions say to add the DDgui.gbas file from the
Samples/Common folder. If you look for this file in the DDgui folder, like I did, you will not find it. You WILL find a file named DDgui (see ScreenShot_2), but that is the wrong file. That is a .gbap project file,
not a .gbas file. Load that one up and you are screwed. The file will jump to the 'Other' branch of the tree, rather than 'Sources', and your program will throw the puzzling syntax error on line 1, as seen in my original post at the very top of this thread. Try to run that and the editor will drop your program and load up the DDgui_test program from the Samples folder instead! Make any changes trying to figure out what went wrong, and at that point you are only one 'Run' click away from screwing up the demo file as well!
(See ScreenShot_3)
However, don't panic. The fix is quite easy once you understand what went wrong. None of the files you want or need have been lost. You only have to know where to look for them. The associations are just messed up, that's all. To repair the damage, do the following.
First go to the Files tab on the right side of the editor.
Delete any files present under 'Other', as well as any .gbap files which may be listed under 'Sources'.
Left click on 'Sources' and choose the Add function. A file select wizard will open.
Go to GLbasic, Samples, _Projects_, Common folder (NOT the DDgui folder!), click on the DDgui.gbas file and click 'OK'.
If your project looks like Screen_Shot_4, with your own project name listed alone under "Main Program", DDgui.bas listed under "Sources", and nothing under "Other", then you are golden.
The powerful DDgui toolbox is loaded up and is yours to configure and command. (I found that the creation of a nice custom font to use with DDgui, loaded and set, can really make the interface pop!)
Cheers!
-CW