BASIC

Author Topic: Guichan  (Read 5349 times)

MrTAToad

  • Guest
Guichan
« on: 2010-Jan-30 »
Got the main test program up and running, and so here is the complete set of files.

For some reason, debug and release modes are still causing a few problems as you can see from the screenshots.

If anyone wants to look them over and see what problems there are, it'll be very useful :)

The RAR compressed code can be found at http://miscthings.co.uk/guichan/guichan.rar

[attachment deleted by admin]

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2628
    • View Profile
Re: Guichan
« Reply #1 on: 2010-Jan-30 »
Get rid of your "IF blah=x THEN DEBUG "BLAH"", as the DEBUG command is removed in the final build compilation, resulting in ""IF blah=x THEN" I assume. So just use "IF"/"ENDIF" blocks for your debugging code and it works fine.

Ala...

"Main Guichan Test Program.gbas"

Changed lines...

Code: GLBasic [Select]
IF label%=0
DEBUG "Error : Label"
ENDIF

IF listBox%=0
DEBUG "Error : ListBox\n"
ENDIF

IF tabbedArea%=0
DEBUG "Error : Tabbed Area\n"
ENDIF
 

In the way of a small debugging tip, another, better way is to simply encapsulate your debug code in a preprocessor commands, as its a sure way of ensuring no extra code is in your program...

For example...

Code: GLBasic [Select]
?DEFINE GLB_DEBUG // Remark this line in final compilation to remove all debug code

?IFDEF GLB_DEBUG
IF label%=0 THEN DEBUG "Error : Label"
?ENDIF
 
« Last Edit: 2010-Jan-30 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5021
  • O Rly?
    • View Profile
Re: Guichan
« Reply #2 on: 2010-Jan-30 »
I have many crashes on the Main Program!

If i hit on Label1 the Button then the program chrashes...
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

  • Guest
Re: Guichan
« Reply #3 on: 2010-Jan-30 »
Yet it doesn't here...  Were you playing around the tabs first ?

Bigsofty - Some good ideas there!  It does appear that those IF/DEBUG statements were causing problems and not letting the dropdown/icon bits be added...

I've updated the programs - so if you can give that a try.  No doubt it'll crash again though :)  I suspect its the mouse handling routine that causes it, but unfortunately as soon as the debug statement goes in, all is fine  >:D

« Last Edit: 2010-Jan-30 by MrTAToad »

MrTAToad

  • Guest
Re: Guichan
« Reply #4 on: 2010-Jan-30 »
Yes, its way too fast at the moment...  You should try typing something for real fun :)

Hmm - something interesting with Windows 7 - it appears to work okay when compatibility mode is activated...  The only downside is that the program can't be re-compiled until compatability mode is turned off...

Unfortunately the XP version quickly ends up non-responsive - mainly because the program soon takes up 99% CPU power (and more memory), so thats got to be sorted...
« Last Edit: 2010-Jan-30 by MrTAToad »

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2628
    • View Profile
Re: Guichan
« Reply #5 on: 2010-Jan-30 »
Although some little bug'ets still exist, this seems to be an excellent GUI, very promising!  :good:
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Quentin

  • Prof. Inline
  • *****
  • Posts: 915
    • View Profile
Re: Guichan
« Reply #6 on: 2010-Jan-30 »
looks very nice.
But what are the differences/benefits compared to DDGui?

MrTAToad

  • Guest
Re: Guichan
« Reply #7 on: 2010-Jan-30 »
The main differences are the extra widgets - DDGui doesn't have drop-down boxes, for example...

The full list includes :

Buttons
ListBoxes
Dropdown Lists
Icons
Labels
Radio buttons
Scroll areas (usually part of lists)
Sliders
Textboxes
Text Fields (needs to be coded)
Windows

The main other advantage is that positioning isn't relative to other widgets or the size of the window - its absolute positioning all the way...
« Last Edit: 2010-Jan-30 by MrTAToad »

MrTAToad

  • Guest
Re: Guichan
« Reply #8 on: 2010-Jan-30 »
Think I've finally solved the tab hanging problem :)

Somehow, the tabs death function managed to have a comparison ( == ) in it in place of assignment ( = ).  No idea how it happened, but it seems to have solved the problem...

Okay - updated Guichan compressed file is now available  :happy:
« Last Edit: 2010-Jan-30 by MrTAToad »

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5021
  • O Rly?
    • View Profile
Re: Guichan
« Reply #9 on: 2010-Feb-03 »
Ohhhh i wrote Lable1 i mean Tab1 ... SRY  :S
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

  • Guest
Re: Guichan
« Reply #10 on: 2010-Feb-03 »
Dont worry - I knew what you meant!

MrTAToad

  • Guest
Re: Guichan
« Reply #11 on: 2010-Feb-05 »
I've added multi-line edit boxes.  I think its all working correctly now



[attachment deleted by admin]

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2628
    • View Profile
Re: Guichan
« Reply #12 on: 2010-Feb-05 »
Looks great!

Small problem though, when you type in the multi-line widget and the cursor goes out the screen, scroll bars appear but you can't scroll the window with them and the window does not keep up with the cursor.

Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

MrTAToad

  • Guest
Re: Guichan
« Reply #13 on: 2010-Feb-05 »
Thats odd - scroll bars should scroll the area.  Have to look into that.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: Guichan
« Reply #14 on: 2010-Feb-06 »
Very cool. I'm just wondering what sort of parameters are available the listbox? For example; colours and columns.