Documentation?

Previous topic - Next topic

Cliff3D

I have to agree with FutureCow's long-past comments that the documentation for GLBasic is not welcoming to me. I'm struggling to find things. While the community is great and has been pointing me in the right direction, I'd rather the information I want was easier to find.

As a typical and timely example, take my current frustration - multiple files. I've just fought my way into getting Multiple Sourc eFiles working because even the intern does not lead one by the hand to making it WORK - there seem to be missing steps and information.

I'd love to see a Wikki (maybe I have just missed that too?) which users could manage to extend and update the documentation :)

Moru

There was a try by one of the community to make a wiki for GLBasic. It hasn't happened much there since everyone seems to know everything already :-)

http://wiki.just-do-i-t.com/index.php?title=GLBasic_Wiki

About your question for multiple source files:

Code (glbasic) Select
GLOBAL gFileTest1
GLOBAL gFileTest2
GLOBAL value%, ok1, ok2

gFileTest1 = GENFILE()
test1$ = "test.bin"
ok1 = OPENFILE(gFileTest1, test1$, TRUE)

gFileTest2 = GENFILE() // Must be called after OPENFILE, otherwise you get the same ID
test2$ = "test.bin"
ok2 = OPENFILE(gFileTest2, test2$, TRUE)

IF (ok1 AND ok2)
READBYTE gFileTest1, value%
READBYTE gFileTest2, value%
ENDIF


(untested but should get you started at least)

Quentin

the official help should also be available at

http://www.glbasic.com/xmlhelp.php

but you're right. Would be nice if the chm file was updated too

MrTAToad

#3
And dont forget my website too!  Really must start getting that wiki updated too...

Did you say that you had trouble adding multiple source files to a project ?

Cliff3D

#4
Ah - it's more multiple source files within GLBasic. I have this hankering to have the "main" file have the main routine and perhaps some subroutines and functions, but have a secondary .gbas file which contains the types, extended type, and probably some subroutines and functions. The idea being to make it easier to include the model handling routine in other projects (no copy and paste - just reuse the source file) but... well, to begin with I didn't select the "insert file to project" and I couldn't find where to "select the file" to make it the "main" one and I get all sorts of errors when I tried to move code between the source files.

for example, right now it's "working" using 2 source files provided I keep the split very very simple and just have the types in the library file... but even then I get a bunch of "warnings" :(

Code (glbasic) Select
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.8.044 SN:1c15d767 - 2D, WIN32
"ReadOBJ.gbas"(0) warning : note : TYPE OBJModel is not declared

"ReadOBJ.gbas"(130) warning : note : TYPE OBJModel is not declared

"ReadOBJ.gbas"(130) warning : note : TYPE OBJModel is not declared

"ReadOBJ.gbas"(130) warning : note : TYPE OBJModel is not declared

"ReadOBJ.gbas"(130) warning : note : TYPE OBJModel is not declared

Wordcount:291 commands
compiling:
IncrediBuild skips: ReadOBJ.gbas, LoadOBJ.gbas,

linking:
success
_______________________________________
*** Finished ***
Elapsed: 2.4 sec. Time: 11:42
Build: 1 succeeded.


It's fine when run, but I am concerend about missing a warning tha tI SHOULD pay attention to because it's lost in what I consider to be "false warnings".

Any thoughts? Is there a step I can/should take that will tell GLBasic how to compile these two files (call them main.gbas and type.gbas) without throwing up false warnings?

I'm going to go find MrToad's website now to see if there's something there that will help me on this specific one... Thanks! :)

EDIT:- I've spent a while just tidying up the code and trying to get it to split nicely - and it's done, working, no errors or warnings :D

MrTAToad

You can ignore the warnings.  Hopefully they will be removed in the next update.

Moru

Quote from: MrTAToad on 2010-Sep-06
And dont forget my website too!  Really must start getting that wiki updated too...

Yes sorry, I got interrupted and just posted to get it saved :-)

Wampus

Quote from: MrTAToad on 2010-Sep-06
And dont forget my website too!  Really must start getting that wiki updated too...

Did you say that you had trouble adding multiple source files to a project ?
Yes, excellent website MrTAToad. Thanks.

There are a lot more features and uses of GLBasic's commands than covered in the basic help file. More than a few times I've discovered them through people on the forum here. Its great that people are so helpful but a collaborative dedicated Wiki would be an excellent way to make all that knowledge easier to access. I'd definitely contribute to http://wiki.just-do-i-t.com/index.php?title=GLBasic_Wiki over time if there was a collective effort involved. Perhaps every time something significant comes out in the forum there could be a reminder to update the Wiki with the information? Something like that.

Cliff3D

Hmmmm... a Wiki sounds potentially very useful indeed, but I must confess that one is depressingly empty. I mean - there is practically everything left to do!

I was having trouble with multiple sources in GLBasic, which turned out to be a combination of messy code (mine) and incomplete/inaccurate documentation. I still don't know how to change the "main" source file to be the master/main: module, but I DO know know to "add to project" a new source - creating it while a project is already open is NOT enough!

MrTAToad

I'm working on the Wiki - at the moment, I'm detailing (in minute detail) everything in the IDE.

You can start having a look at : http://wiki.just-do-i-t.com/index.php?title=GLBasic_Wiki

Cliff3D

Yup, nice clean start just a loong way to go. I suspect most Wiki's have a tough time starting up until they gather sufficient momentum that their progress more-or-less snowballs. It's getting that initial momentum going so that people believe in the Wiki enough to update and extend it. For example, ideally everything should be covered from at least two angles.

The IDE should be documented, obviously, but also everything in the IDE should be documented from the perspective of "wanting to complete task X". For preference the command "insert file to project" - from the context menu that comes up when you right-click the Text Editor window - should be mentioned in the section on Multiple Source Files. Because when I most need documentary help is when I have something in mind that I want to do, rather than wondering what a command I've come across does. Mostly ;)

MrTAToad

I've added a bit about adding multiple source files to a project!

Cliff3D

Thnaks. Tho - I can't find it! (eyesight must be worse than I knew :( )

MrTAToad

Its in the The project maintenance area section...

okee

MrAToad, I'm not really familiar with the workings of Wiki systems
but is it possible for users to add comments and examples for each command ?
I like the way PHP.net has done their help system

http://www.php.net/manual/en/language.variables.scope.php
also the ability to type a command after the url brings you to
that command i.e.
www.php.net/print
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)