DDgui Syntax Error On Run

Previous topic - Next topic

CW

Hi all,

I have been exploring KittyHello's DDgui toolbox, and I am very impressed with how fast, smooth, and handy DDgui is.
I had some trouble with it, though. I could not get it to run when loading it as an existing project from the GLbasic Samples folder. When attempted, I received the following error: (See attached image.) Debug mode gave no additional information.

It took me about an hour to get DDgui to work, and only after transplanting the 'DDgui_Test' main program, the 'Sources' code, and the associated apps folder to a fresh "sandbox" project, which I had made so as to work from a clean slate. I also had to reset the current directory and create a new custom font, and I'm not entirely sure I've captured full functionality.

The programing in DDgui is well over my head, and I wasn't able to do more than beat at it with a stick in the hopes that it would start to run for me. Fortunately, this approach seemed to work. I would love to see DDgui in its native state, as intended, so that I can assess its full capabilities (just in case I broke something when poking it with my stick.)

Has anyone else had this trouble, or does anyone know what the message, 'syntax error' in line one is referring to?

Thanks!
-CW

PS: If you haven't checked out DDgui yet, you definitely owe it to yourself to do so.

MrTAToad

That sounds as though you are trying to compile the program without the project - it does compile and run fine as it is.

The loaded project should look like :

CW

Ok, Thx Toad. I'll have another go at it this evening. -CW

CW

#3
Well now, that is odd.

After comparing your screen shot to my own GLbasic editor, I noticed that I had three files loaded, rather than just your two. I had a Main Program file, a Sources file, and one 'Other' file. When I deleted the "Other" file DDgui complied and ran just fine for me from the Samples folder. Doubtless I screwed things up somehow on my original attempt to load the project and wound up saving it back to my system. If I go home and the project loads without a hitch on my desktop, than that must be what I did.

Thanks Mr. Toad! Your input has resolved my dilemma.  :)
-CW

CW

#4
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:

Quote
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