May 10, 2024, 03:36:29 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Wish List-Skeleton Handler

Started by Kym, January 16, 2010, 06:33:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kym

This is what I want to  put on  my wish list for EBasic.

When you design your Dialog and then generate the Skeleton Code

you should be able to Compile and Execute your code without having to

Type in the Do modal  command as the skeleton code should already do this for you.

A trap for new users, as no errors are given when compiling , that without this command
you will have no output on the Screen,

Kym


AdrianFox

I had the same experience, Kym and couldn't understand why this was.   But then you realise there are a number  of other ways of showing the dialog box and having the Dialog Editor just create a single way of doing this  would probably inhibit you reading properly through the manual.  And if you are creating a window, then there is another way again.
It IS all in the manual when you work your way through it.  As an inexperienced programmer, I would agree the manual can be cryptic and many things are poorly explained, but there is a lot of help on the forums which overcome this problem.
If you want something superior to the Dialog Editor, the Emergence Designer is great (even though it is still a beta version), and produces  a completely self-contained window or dialog with its associated controls  It also provides lots of hints on how to build your program as a project, especially in the use of global variables.   Make sure you are aware that the code is contained in an include file as well as the globals.eba and the program file though.  This is not immediately evident.
As a general principle, I think for novices there should be far more very basic examples with programming languages, as I found a lot of the examples in EB lack sufficient comment. You have to compile them sometimes before you realise what they do.   This seems to be the problem with lots of programming guides which give you step by step guides on how to display, 'Hello World' and then leave you very much in the dark.
What is obvious to experienced programmers is not obvious to beginners, and it takes a real skill to produce documentation which will help both.
The more I use Emergence, the more I find it can do, and the more solutions I find.  It is a great language which is well worth perservering with. 
Perhaps this is a project that others might like to take on board to extend Emergence Basic's popularity with novice programmers.

:)
Adrian Fox

Kym

Adrian, I was thinking there was a reason it has been programed this way, but if  a
person was to stumble across a link on some web page somwhere about this great
basic programming language .ie EBasic, then was to download  and install said program
only to find that after Compiling a simple dialog, with no errors given ,that there was
no output on the screen.What would he or she be thinking. I leave that to your imagination.
A lot of people would quickly un-install , said program and go searching for something else
to do their programming task with.
Having used a few different versions of basic , I did not give up so easy, but it certainly
had me scratching my head for a few hours .

Take for example,  if i were using jbasic and its dialog editor ,produce the code, and press the
run button and my dialog would be shown on the screen, oh! it works. so giving you confidence
in the program as a whole. Which is not the case here. Therefore the reason for this Wish list.

As to EBasics capabilities , I will be exploring them for along time to come , simply awesome!

Kym.








LarryMc

Kym

Reading the help file helps a lot. ;)
If EB was just like other basics it wouldn't be the powerful tool that it is.

In the Dialog Editor/GUI Designer section of the help file it states:
Quote:

Generating source code

Select the Dialog menu and choose Generate Source.

The source code can be copied to the system clipboard, or opened in a new window. Paste the code in your program by selecting Paste from the Edit menu. The code generated consists of the definitions for the CREATEDIALOG and CONTROL statements. In order to create a fully functional dialog in the program you need to define the dialog variable and a message handler. The following skeleton code can be used to create a functional dialog application for testing.


DEF d1:DIALOG

REM Paste the generated code from the dialog editor here

DOMODAL d1
END

SUB handler
SELECT @CLASS
    CASE @IDINITDIALOG
        CENTERWINDOW d1
ENDSELECT
RETURN
ENDSUB

As of version 1.2 of the IDE you can also chose to have the GUI designer create a complete skeleton handler for your dialog automatically.

UNQUOTE

it creates a complete skeleton handler; not a working program which is why the code above is given.

It even goes on to tell you what to do if you wanted a window instead of a dialog.

Larry

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Quote from: Kym on January 16, 2010, 06:33:13 AM
Type in the Do modal  command as the skeleton code should already do this for you.
Forgot to mention that not all dialogs are called with domodal; see SHOWDIALOG command

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

AdrianFox

Kym's comment really rang true with me, as when I first downloaded EB I did exactly what he says:  I tried out the program, couldn't get the dialog editor to "work", gave up and went on to play with other far inferior basic dialects.  (Though thank goodness, I came back and perservered. )

While I understand what Larry says, most people, particularly complete novices,  are pretty poor at reading manuals and help files and expect instant gratification!   (NOT good, I know, but don't they say that today's youth has an attention of span of about 45 seconds?).

What if  the Dialog Editor simply generated a 'remark' at that point in the code to the effect that you need to insert 'Domodal d1' at that point  as ONE way of displaying the dialogue? 

Having said all that, Kym,  unfortunately this isn't the best time for any of us to be submitting wish lists or requests for changes for reasons that will be apparent if you look at some of the other Forum headings, (if you haven't done that yet.)

Adrian Fox

aurelCB

January 18, 2010, 03:27:09 AM #6 Last Edit: January 18, 2010, 04:08:10 AM by aurelCB
Guys i completly understand new people who try run his first program.
I remember my first atempt to try EBasic(IBpro) i instanly give up.Why?
Simply becose many people are used to intrpreters like JB/LB or similiar...
So i choose Creative which gives me instant start of any example.
Probably becose of this i love Creative.However EBasic offer full power of windows programming
that's the fact.

For me will be best option open 'Help' on menubar.
Find item EBasic user guide.
Click on this item.
When Help apear find in topics - topic 'Windows Programming'.
Click on this topic.When topic is open you will see first item 'Opening a window'.
Click this item and scroll down.You will find in gray rectangle example- how open window.
So select complet example and copy them to EBasic editor.
Of course you must before click in toolbar button 'New'.
So when you copy and paste this example to editor click in menu 'Save As...'
And save this example ,for example with name FirstWin,click save in save dialog box.
Then find on toolbar button where is word EXE ,click this button.
You will see new dialog with caption 'Executable Options'.
Find 'Executable Target' and select 'Windows EXE'.
Click on button 'Create' and that's all.
Wait a second and your program will showed.

I hope that i dont talk to much.... ;D

all best
Zlatko

mrainey

QuoteI hope that i dont talk to much


Did you say something?   :D
Software For Metalworking
http://closetolerancesoftware.com

LarryMc

Maybe the Visual Designer (when it's done) will solve the problem about how to get started. ;)

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

psevet

Larry,

As the help file for Autoit includes this feature, would it be possible to have a "open this script" button where applicable ?

Just a thought.

regards,

Pierre

LarryMc

Quote from: psevet on January 18, 2010, 12:32:42 PM
Larry,

As the help file for Autoit includes this feature, would it be possible to have a "open this script" button where applicable ?

Just a thought.

regards,

Pierre

With all the work left to do on the visual designer and as slow as i am in modifying/adding-to Paul's code I wouldn't be holding your breath for me to add a feature that is for something that i know absolutely nothing about at this time. ;)

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Kym

QuoteHaving said all that, Kym,  unfortunately this isn't the best time for any of us to be submitting wish lists or requests for changes for reasons that will be apparent if you look at some of the other Forum headings, (if you haven't done that yet.)

Adrian , I hear where you are coming from on this one . ( Read the Forum post,s even before I became a member) .

QuoteReading the help file helps a lot. Wink
If EB was just like other basics it wouldn't be the powerful tool that it is.

Now Larry , its okay to point at the help file and  say the answers in there , but for any newbie to EBasic,
it takes time to absorb and understand what he, she has just read. this not being a five minute job.
Then to find the exact answer one is looking for being another matter.
This not being a issue for those more experienced users.

With there now being a free version issues like this are sure to crop up more often.

Kym