View Full Version : Application for thinBasic startup
ErosOlmi
07-04-2009, 12:51
I'm preparing a thinBasic application that will be executed just after thinBasic installation.
This thinBasic application will welcomed thinBasic user and than will try to drive user through thinBasic world and secrets. I'm thinking of a sort of multi-step dialog where every step can show a thinBasic info:
welcome
what is thinBasic
where to start
how to start
where is the help and how to use it
show the many examples
...
I will give this a go and than posted sources in order to have your feedback and suggestions.
In the meantime, feel free to suggest anything.
Ciao
Eros
Changes:
2009.04.16: added application .ini setup file where will be stored application configuration parameters
2009.04.13: redesigned html structures
2009.04.10: redesigned tutorial
redesigned html structures
2009.04.08 23:59: redesigned tutorial treeview (no more listview)
Tutorials can be nested in subdirectories up to 2 levels (maybe more in future)
Used richedit control to show tutorial info
2009.04.08 17:10: fixed bugs mentioned by Petr
2009.04.08: finished main application layout and logic
added main web pages placeholders and css file
2009.04.07: attached example modified: added Support html page
attached first example
Michael Hartlef
07-04-2009, 14:51
Good idea. And unique I think. :eusaclap:
Do you know Wink]? http://www.debugmode.com/wink/
I used to make a tutorial about how to use IndeED. It was well received.
Michael
Petr Schreiber
07-04-2009, 20:02
Good looking proggie Mike,
I was thinking of simple dialog with embedded browser ( to make it look nice ).
Eros, I would add:
- how to create bundled EXE
- where to get support ( forum )
- checkbox at the end of installation "show me guided tour"
Petr
Great idea, then later it can be expanded out to other modules.
DarkBasic and DarkBasicPro had very nice tutorials integrated with help and teaching.
It made it a pleasure to learn from. Also all the teachings had links to examples that covered at least what the text covered.
I think in the end, once thinBasic is in not to intense development cycle it will be really a great way to show all it can do.
ErosOlmi
07-04-2009, 23:55
Good idea. And unique I think. :eusaclap:
Do you know Wink]? http://www.debugmode.com/wink/
I used to make a tutorial about how to use IndeED. It was well received.
Michael
Mike,
thanks for your suggestion but at first I would like to develop it 100% using thinBasic and release as source code in thinBasic setup.
In this way it can serve both as tutorial and as an example of thinBasic capabilities.
Ciao
Eros
ErosOlmi
08-04-2009, 07:30
To give you a rough idea of what I mean I've attached to the first post of this thread a bundled exe of the tutorial I'm preparing.
When I will be at a good point I will release as source code as a standard thinBasic script example.
The script make use of a new UI control that will be present in next release: WebBrowser control. It is still under development and not sure it will work in Win9x systems.
I need to create nice and professional web pages to be used in the tutorial. I need a style direction.
Let me know.
Eros
Petr Schreiber
08-04-2009, 07:58
Hi Eros,
really very nice layout and icons.
I would recommend to use HTML for the right frame completely. Some of the pages could be generated using script on the fly.
For example the first page pointing to source code of tutorial - the path could be hyperlink, generated using APP_PATH + \thinBasic\SampleScripts\Tutorial\ at the time of finishing installation.
Petr
ErosOlmi
08-04-2009, 08:07
Yes, I agree. All the right pages will be html so the limit will just be fantasy.
At the moment I'm working to define the layout and behave of the application. I want it to be like a box where to easily add new tutorials. So some part of the the left tree will be constructed on the fly using whatever material will be found on disk. In this way everyone can help developing specific tutorials just making html static pages and putting them under html sub directory.
I'm also working on a css style sheet file that will be used in all pages in order to keep a common shared layout to html pages.
Another idea is to create an "immediate execution window" where user can experiment and run little pieces of scripts on the fly. A sort of "thinBasic Tray agent" (do you remember Petr?) little editor. In this way every tutorial can copy/paste pieces of script and test them. Advancing to the tutorial there will be thinAir introduction.
Ciao
Eros
ErosOlmi
08-04-2009, 15:30
Updated application in first post of this thread.
_________________________________________________
Ok, I think I've finished the main application layout schema.
I've also started to develop CSS file.
More important: I've created a way to create tutorials very easy to be followed by anyone.
How to create a tutorial
_________________________________________________
A tutorial consists of a directory (as a minimum) containing the following files:
info.inicontains all the info about tutorial: name, version, author, description, ...
Index.htmIs the main page of the tutorial.
In order to maintain a common layout, this file (and all .htm files) should have a link to common.css style sheet file present in "\html\css\" directory. So in all of your .html files add the following line:
<link rel="styleSheet" href="../../css/common.css" Type="text/css">
Additional .htm files or images files can be present but the above is the minimum.
Once you have created the above files into a directory, name the directory something like "XXX My tutorial" and place it under "\html\Tutorials". Substitute XXX with a number that will be used to sort tutorials in the application list.
_________________________________________________
For the moment this is all.
I have additional ideas but I need to implement a bit new web browser control in order to be able to interact with DOM elements.
Ciao
Eros
Petr Schreiber
08-04-2009, 16:04
Eros,
very good work.
I have two problems on my PC with latest version:
$CRLF characters displayed in Tutorials section
ThinBasic sample scripts item does display invalid web site
Your idea with "tray agent" like window looks good to me, but I'm not sure how I would code syntax highlighting in TB now, maybe with help of scintilla?
Thanks,
Petr
ErosOlmi
08-04-2009, 16:14
I have two problems on my PC with latest version:
$CRLF characters displayed in Tutorials section
ThinBasic sample scripts item does display invalid web site
Thanks. I will fix $CRLF.
Regarding sample scripts directory, for the moment something is hard coded in the script.
In this case sample scripts are hard coded as be placed into C:\thinBasic\SampleScripts\
In next update I will automatically determine correct path.
On syntax highlight, I still need to think about a solution. Maybe solution is to invoke directly thinAir passing the script to be executed on the fly.
Developing this script was a please because complex things like embedding a WebBrowser or loading files is just one line.
I will soon release full source that at the moment is around 750 lines but I've repeated many functions that I'm sure I can reduce to one so final code will be les than 500 lines.
I'm now preparing some real tutorial to also be used as schema for others.
Ciao
Eros
ErosOlmi
08-04-2009, 17:13
Updated application in first post of this thread.
_________________________________________________
Fixed multiline tutorial description
Fixed automatic determination of ..\thinBasic\SampleScript\ directory regardless of where thinBasic has been installed.
Petr Schreiber
08-04-2009, 17:22
Hi Eros,
perfect!
There is just one more CRLF problem in the tutorial author field, see attached screenshot.
Petr
ErosOlmi
08-04-2009, 17:24
Sorry, I didn't check Author.
I will check it and also think about creation date, last update date, tutorial version, ...
Maybe all in one XML file is better :D
Ciao
Eros
ErosOlmi
08-04-2009, 22:02
I'm changing the info file. I will use an INI file because it is very easy to manage and has power similar to an XML.
I'm also thinking about a way to have multi level tutorial directories and construct a treeview of all tutorials on the fly.
I will post soon an update.
ErosOlmi
09-04-2009, 00:03
Updated application in first post of this thread.
_________________________________________________
Redesigned tutorial treeview. No more listview in tutorial window but treeview is built on the fly using disk directories.
Tutorials can be nested in subdirectories up to 2 levels (maybe more in future)
Used richedit control to show tutorial info
I think I'm quite closed to finish application logic and layout so I will dedicate more on building first complete tutorial.
Ciao
Eros
Eros, looks great and I like the layout. You came up with a very nice solution I must say and I think this will make getting into thinBasic that much nicer!!
Petr Schreiber
09-04-2009, 07:02
Very attractive look,
I like the new author-name-date field.
Thank you,
Petr
Lionheart008
09-04-2009, 12:46
hi eros, hi all:)
very interesting layout and content... I like it very much and this one will help new thinbasic users to get a short overview about functionality and possibilities how to work / handle with thinbasic language behaviour ...
Startup tutorial describing the very basic intial info ...
Author: thinBasic Team Level: beginner Version: 1.0
- and if possible to create at the end of the startup example you can choose a "link to the forum", where the user can a closer look at special themes... you can for example make some "highlighters" to the various script examples of thinbasic the new user can find more infos...
this task I have had in my mind to create tutorials some weeks ago... ;)
- perhaps you can build a "Link library (index list)" of all examples we can build for the tinbasic startup files...???
like the idea very much:) it's important to find "new users" for thinbasic and by a good startup option they will stay here (must laugh) :D
have a nice day, good luck for more ideas, Lionheart
ps: I can build some little exercises and short tutorials for beginners ;)
pps: sorry,but who will check all these informations ??? we need a startup help team??? ;)
ErosOlmi
11-04-2009, 01:33
Updated application in first post of this thread.
_________________________________________________
Redesigned application source code, now it is 200 lines less.
Redesigned html templates for turorials.
Cleaned up code. Source code is available for those having access to thinBasic 1.7.8.0 beta
Ciao
Eros
Petr Schreiber
11-04-2009, 09:17
Eros,
you do such a great job - the last version is again big jump forward.
Very nice!
Petr
And I thought it looked good before, wow-- really nice work Eros!!
ErosOlmi
13-04-2009, 18:33
Updated application in first post of this thread.
_________________________________________________
Redesigned application source code to be prepared to source code examples interactions
Important redesign html templates for turorials: no more frames usage (create problems) but a nice javascript menu quite easy to be setup.
For those having access to thinBasic beta 1.7.8.0 development, full source code of this application will be inside it.
Ciao
Eros
Petr Schreiber
13-04-2009, 19:03
New "chapter" menu looks very professional :eusaclap:
ErosOlmi
13-04-2009, 19:07
Thanks Petr.
And I think it is very easy to maintain the toc.htm (table of content) page, very easy to understand and improve.
I think I've also found a way to interact with source code present into html pages.
If source code will be present I will activate a button able to get the code directly from the page and prepare for execution. In this way people can work completely on the tutorial without the need of annoying copy/paste, save file, execute, just one click to get the source example and click on Test button.
I hope to be able to do this but so far it seems possible.
Ciao
Eros
Michael Hartlef
13-04-2009, 19:11
That is really cool. I like it a lot. Thanks!
Eros, I got an idea while playing with the new startup application.
What about putting the html files on the server so that they are in one place and can be edited by those working on it?
For example. I saw some typos and could have fixed them and uploaded the fixes. You could then use the latest html files from the ftp server
before you bundle the next version of thinBasic.
If you can't provide ftp with your server, let me know... we can set it up on my server, which is at a fulltime hosted site with fast
connection (http://www.hostmonster.com/)
ErosOlmi
13-04-2009, 21:10
Kent,
current html files are just testing and placeholder to show what is possible to do. I do not care about content at the moment (in fact there are just titles). So do not care to them but just to the application capabilities and layout.
Regarding the idea to have templates on internet somewhere, there are no limitations because you can develop your web pages as you like: locally, or on the web.
Web browser will that open whatever is redirected the link.
But again, do not care now. I need the application done and done correctly before spending time on content.
Ciao
Eros
I see, so you see it as parts will be handled by contributors and no central repository. I totally understand about it being a prototype, but you are fleshing it out so quickly I thought perhaps you were into the next stage:) You are an alien, not only in gaming and scoring incredible scores, but also in outputting incredible amounts of new code and examples. When gene splicing comes around, I would like some of that Eros dna :)
ErosOlmi
13-04-2009, 21:28
:oops: do not exaggerate !
Do you know that little .ini file in each of the tutorials? Di you see version number? ;)
One of the idea is to maintain a central repository of tutorials each of its version number and Tutorial application able to check if all local tutorials are up to date. And if not, able to download updated versions. So some kind of "Turorial update" via internet.
But this is future (near by anyhow)
Ciao
Eros
That sounds cool Eros, auto update!
ErosOlmi
13-04-2009, 21:34
Exactly.
But I need the main application done first.
Than stabilize the html layout giving the rules to all those willing to contribute to tutorials.
Than some very introductory tutorials.
efly2020
14-04-2009, 17:48
:beta: A small suggestion: the "Intro Tutorial" needs a 'Go back one page' button.
ErosOlmi
14-04-2009, 17:54
Sorry, can you explain a little more?
Thanks
efly2020
14-04-2009, 18:16
When selecting 'thinBasic sample scripts' and then a directory is selected,
there is no Back button to be able to easily get to other directories with
sample scripts. :cray:
ErosOlmi
14-04-2009, 19:40
Ok, I got it. Nice idea. In reality there should be a left blue are where to select parent directory but this can vary from computer to computer.
I will see what I can do but I think I can add something.
Ciao
Eros
ErosOlmi
16-04-2009, 07:28
Updated application in first post of this thread.
_________________________________________________
Added application .ini setup file where will be stored application configuration parameters.
Simplified source code (included in thinBasic beta 1.7.8.0 (http://community.thinbasic.com/index.php?topic=2588.0)) taking advantage from the new way of passing UDT elements to function as function parameters (http://community.thinbasic.com/index.php?topic=2602.0).
Ciao
Eros
marcuslee
21-11-2009, 06:10
This startup application is a great idea. Is it still being developed?
I don't have a lot of time, for we are moving two states away (from Texas to Kansas) in about a week. But, I would like to contribute where I can.
The tutorial idea is wonderful because it is a good place to start for beginners or amateur programmers like myself. The help file is a daunting place to go when you have little clue what to do. The help file is a great place if you just need clarification on syntax or equates or something.
I've seen online tutorials on programming for other languages. They usually take a step by step approach, not really a subject approach. I also have a couple of programming books that take a similar approach. Maybe someting like this can be used for the startup tutorials.
Here's an example of the format that I am wondering about:
Lesson 1 - Introduction to Programming & thinBasic
Lesson 2 - Variables (which could be subdivided into different sections for different types of variables)
Lesson 3 - Input & Output
Lesson 4 - Expressions
Lesson 5 - Loops (which could be divided to describe different ways to loop)
Lesson 6 - Subroutines & Functions (which could probably be organized into an entire tutorial by itself)
Lesson 7 - etc ...
The above sample format is just an idea. It shows a list of major programming concepts, but doesn't get into the nitty gritty details of so many other things. But, some further organization can make learning thinBasic easy for all kinds of people: those who have never programmed before, those like me who program some but live by the help file, and those that know how to program but need a refresher on one section or another.
What does everyone else think?
Mark
ErosOlmi
21-11-2009, 09:11
Hi Mark.
all the best for your moving.
Yes, tutorial is always under development even if recently there were not really changes other than Petr has started to write some introductory contents.
If you install thinBasic beta version 1.7.10.0 ( http://community.thinbasic.com/index.php?topic=2899.msg21972#msg21972 ), at the end of the installation you will see it (if you checked to run tutorial).
After installation you can get full tutorial source code in \thinBasic\SampleScripts\Tutorial\ directory, tutorial application is 100% written in thinBasic.
And under \thinBasic\SampleScripts\Tutorial\html\Tutorials\ you can get tutorial contents.
If you have time and want to contribute, just check it, understand how it is made in terms of contents (it is all pure html and few JavaScripts), copy one chapter from \thinBasic\SampleScripts\Tutorial\html\Tutorials\ into a new directory keeping the names of files and add/change new pages/content.
Once done, just send new content to me at support@thinbasic.com
I will check it and if all will be ok I will add it into next thinBasic release.
Let me know if you have any difficulties.
Ciao and take care.
Eros