1. New to Euphoria and GUI

Greetings All

I am new to Euphoria and GUI programming, although an experienced=20
programmer. I was looking around for a decent tool for programming=20
because QBASIC limitations were annoying me and I wanted to write a=20
couple of programs that would be used by a other people and so needed to=
=20
look nice and be easy to learn to use.

I found Euphoria and have decided that this is really a great tool for=20
what I want to do, and it is clear that there are lots of people doing=20
many of the things I want to do with Euphoria, and this forum is very=20
active. Great! I have downloaded about a hundred things already.

Clearly a number of people have put a great deal of effort into Win32Lib=
=20
and many other tools available.  However being inexperienced in GUI I=20
cannot understand the jargon and the help information in Win32Lib.

The Encyclop=E6dia Euphoria is very useful for finding help on lots of=20
stuff, but it doesn't answer my basic questions about GUI terminology.=20
When I look up "create" it tells me that one of the fields is "flags"=20
but there doesn't seem to be a list anywhere of the available flags.

Then I found EUwinGUI which is much simpler that Win32Lib but still does=
=20
everything I want to do with a window (I think). Also, the Window=20
Designer is an easy way to make nice looking stuff and to see the code=20
and begin to learn the jargon from that. Well done Andrea Cini!

If anyone knows of a web site or DLable help file that gives a basic=20
course in GUI terminology and the possible values for flags, options etc=
=20
then I would like to know about that.

You can expect some questions from me in the near future.  In fact there=
=20
is one coming right up after this post  smile

Happy programming

Ray Tomes

new topic     » topic index » view message » categorize

2. Re: New to Euphoria and GUI

On Mon, 16 Jun 2003 12:01:27 +1200, Ray Tomes <rtomes at ihug.co.nz> wrote:

>
>
> Greetings All
>
> I am new to Euphoria

Hi Ray. Welcome to the community. There are many people here who can help 
you with learning Euphoria. Just ask away!

> and GUI programming, although an experienced=20
> programmer. I was looking around for a decent tool for programming=20
> because QBASIC limitations were annoying me and I wanted to write a=20
> couple of programs that would be used by a other people and so needed to=
> =20
> look nice and be easy to learn to use.
>
> I found Euphoria and have decided that this is really a great tool for=20
> what I want to do, and it is clear that there are lots of people doing=20
> many of the things I want to do with Euphoria, and this forum is very=20
> active. Great! I have downloaded about a hundred things already.
>
> Clearly a number of people have put a great deal of effort into Win32Lib=
> =20
> and many other tools available.  However being inexperienced in GUI I=20
> cannot understand the jargon and the help information in Win32Lib.

[snip]
Windows programming is difficult for many reasons, one being that getting 
information about it is hard. Another is the complexity that can be 
involved. The various Windows libraries that have been written for Euphoria 
attempt to simplify the experience, but at some stage you can't get away 
from having to learn some *very* new things.

> If anyone knows of a web site or DLable help file that gives a basic=20
> course in GUI terminology and the possible values for flags, options etc=
> =20
> then I would like to know about that.

The ultimate reference is Microsoft's SDK (Software Development Kit) for 
Windows. This is downloadable but is simply ENORMOUS ( 
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ ). You can also 
order the CD from Microsoft which has a nominial shipping cost. A problem 
with the SDK is that there is just so much information in it. Until you get 
some practice with using it, it can take awhile to find the tiny snippet 
that you are looking for. But in spite of this, it is invaluable.

There are many sites on the web that say they teach Window programming - 
some are okay and others no so much. You may have to experiement a bit with 
them.

The best book available is Charles Petzold's "Programming Windows" ( 
http://www.charlespetzold.com/pw5/index.html ) now in its 5th edition. Try 
getting a second hand copy off Amazon or similar site. Its around $US42.

As for a simple ... "what are the flags I can use?" This is asked very 
often so I may be I could pick out the info from the Microsoft 
documentation and present it in the win32lib docs. There are LOTS of values 
though.

You mention you are new to GUI programming. The style of coding for GUI and 
non-GUI is quite different and if you need help, just holler and we can 
give you some hints.


-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view message » categorize

3. Re: New to Euphoria and GUI

Maybe you haven't tried IDE for win32lib. It has a nice and
easy-to-use GUI to design your programs, and for the flags thing, you
can see "Style" on the properties and you can select the avaliable
styles by right clicking on it or select menu Edit/Visual Window
Styles Explorer.. I think win32lib is more recommended since it is
still developed actively and more users use it.

About the System Wide HotKey, you can use it like this:

- Open IDE (please use IDE rather than
  typing manually it is much more interesting).
- Press Ctrl+A to open "Manage Include Statements"
- Add "hotkey.e"
- Double click the Window in the IDE.
- Change the second dropdown from "w32HClick" to "(General)"
- type something like this:

    procedure Window1_onHotKey(object id)
        setText(Window1, "Hotkey with id " & sprintf(id) & " is pressed")
    end procedure
    onHotKey = routine_id("Window1_onHotKey")
  
- then type the others using the library's documentation
  (setHotKey, killHotKey, etc)
    
R> Greetings All

R> I am new to Euphoria and GUI programming, although an experienced=20
R> programmer. I was looking around for a decent tool for programming=20
R> because QBASIC limitations were annoying me and I wanted to write a=20
R> couple of programs that would be used by a other people and so needed to=
R> =20
R> look nice and be easy to learn to use.

R> I found Euphoria and have decided that this is really a great tool for=20
R> what I want to do, and it is clear that there are lots of people doing=20
R> many of the things I want to do with Euphoria, and this forum is very=20
R> active. Great! I have downloaded about a hundred things already.

R> Clearly a number of people have put a great deal of effort into Win32Lib=
R> =20
R> and many other tools available.  However being inexperienced in GUI I=20
R> cannot understand the jargon and the help information in Win32Lib.

R> The Encyclop=E6dia Euphoria is very useful for finding help on lots of=20
R> stuff, but it doesn't answer my basic questions about GUI terminology.=20
R> When I look up "create" it tells me that one of the fields is "flags"=20
R> but there doesn't seem to be a list anywhere of the available flags.

R> Then I found EUwinGUI which is much simpler that Win32Lib but still does=
R> =20
R> everything I want to do with a window (I think). Also, the Window=20
R> Designer is an easy way to make nice looking stuff and to see the code=20
R> and begin to learn the jargon from that. Well done Andrea Cini!

R> If anyone knows of a web site or DLable help file that gives a basic=20
R> course in GUI terminology and the possible values for flags, options etc=
R> =20
R> then I would like to know about that.

R> You can expect some questions from me in the near future.  In fact there=
R> =20
R> is one coming right up after this post  smile

R> Happy programming

R> Ray Tomes

new topic     » goto parent     » topic index » view message » categorize

4. Re: New to Euphoria and GUI

Hi Ray,

You could be a great help to many other newcomers to Euphoria and Windows
GUI programming if you could spell out to us what is confusing about the
Win32Lib help, so it could be improved to help newbies better.


For instance:

Were you able to tell where to *begin* with the Win32Lib help documentation?
(I still think it would be helpful to have a single html help doc in the
main folder which would jump to the beginning of the help documentation
that's inside the Doc folder, since there's a lot of docs in there.)

If you were able to find the beginning of the help doc, then did you notice
the "double link" to "General Info", which shows a synopsis of Win32Lib,
including some of the fundamental GUI jargon?  (The links in that synopsis
don't work right, because the main documentation is created directly from
comments in Win32Lib by a "MakeDoc.exw" program, and the synopsis is not a
part of the main library.  But all the terms that show as links do have
separate sections in the main doc that you can go to.)

And did you notice the FAQ referenced in the main doc?  It's incomplete, but
could maybe be a little helpful nonetheless.

Dan Moyer


----- Original Message -----
From: "Ray Tomes" <rtomes at ihug.co.nz>
To: "EUforum" <EUforum at topica.com>
Sent: Sunday, June 15, 2003 5:01 PM
Subject: New to Euphoria and GUI


>
>
> Greetings All
>
> I am new to Euphoria and GUI programming, although an experienced=20
> programmer. I was looking around for a decent tool for programming=20
> because QBASIC limitations were annoying me and I wanted to write a=20
> couple of programs that would be used by a other people and so needed to=
> =20
> look nice and be easy to learn to use.
>
> I found Euphoria and have decided that this is really a great tool for=20
> what I want to do, and it is clear that there are lots of people doing=20
> many of the things I want to do with Euphoria, and this forum is very=20
> active. Great! I have downloaded about a hundred things already.
>
> Clearly a number of people have put a great deal of effort into Win32Lib=
> =20
> and many other tools available.  However being inexperienced in GUI I=20
> cannot understand the jargon and the help information in Win32Lib.
>
> The Encyclop=E6dia Euphoria is very useful for finding help on lots of=20
> stuff, but it doesn't answer my basic questions about GUI terminology.=20
> When I look up "create" it tells me that one of the fields is "flags"=20
> but there doesn't seem to be a list anywhere of the available flags.
>
> Then I found EUwinGUI which is much simpler that Win32Lib but still does=
> =20
> everything I want to do with a window (I think). Also, the Window=20
> Designer is an easy way to make nice looking stuff and to see the code=20
> and begin to learn the jargon from that. Well done Andrea Cini!
>
> If anyone knows of a web site or DLable help file that gives a basic=20
> course in GUI terminology and the possible values for flags, options etc=
> =20
> then I would like to know about that.
>
> You can expect some questions from me in the near future.  In fact there=
> =20
> is one coming right up after this post  smile
>
> Happy programming
>
> Ray Tomes
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: New to Euphoria and GUI

Dan Moyer wrote:

> You could be a great help to many other newcomers to Euphoria and Windows
> GUI programming if you could spell out to us what is confusing about the
> Win32Lib help, so it could be improved to help newbies better.

Hi Dan and Derek

Thanks to all those that replied to my posts. I would be very happy to 
relate my experience with beginning to use Euphoria and Win32Lib. 
Hopefully this is useful in making euphoria easier to get on to.

It is clear to me now that Euphoria is a gem.  However I nearly missed 
this gem because I DLed Euphoria and couldn't get it to run.  All I got 
was some very DOSsy looking window and an error message about not being 
to find some includes. At that time I continued to look for other 
languages on the web.  Later, I had another look at Euphoria to decide 
whether to persist or delete it.  I really liked the data structure of 
Euphoria and so decided to persist.

It turned out that I hadn't set up the autoexec.bat file for the 
location of Euphoria in "program files".  So I found out about that and 
put in the two changes it said.  However it still didn't work.  It was 
clearly looking for something in C:\euphoria: in spite of the two 
changes I made to autoexec.bat and so I decided it was a bug and moved 
euphoria to c:\euphoria and made a further change to autoexec.bat and it 
got things going.  Later I found out form some other document (don't ask 
me which) that there was a third parameter needed in autoexec.bat which 
was set euinc I think, but this was not mentioned with the other two.

After DLing lots of stuff (about a hundred zips) I found the EU 
encyclopedia which is a very useful help facility because until then the 
help seemed very scattered. I would suggest pointing new people towards 
this or even making it a part of the basic system DL instead of the many 
little txt files.

Before addressing your specific question on Win32Lib, I need to say that 
I am a very experienced programmer, but have no previous experience of 
GUI programming and its way of event driven routines.  I have written 
Interrupt driven routines however and so am generally familiar with the 
concepts.  For me, the big hurdle to jump here is the jargon.  Often the 
help will use exactly the same word as the parameter to describe what to 
put there and I don't know enough to know what that variable is. This is 
of course a matter of me getting educated, and as Derek Parnell pointed 
out there is information overload.

So what I really need before I can use Win32Lib is the concepts and the 
jargon explained.  I can pick these up quickly from examples which are 
simple enough, if they say this is a such and such and here is how it works.

> For instance:

> Were you able to tell where to *begin* with the Win32Lib help documentation?
> (I still think it would be helpful to have a single html help doc in the
> main folder which would jump to the beginning of the help documentation
> that's inside the Doc folder, since there's a lot of docs in there.)

This might turn out to be embarrassing for me, but never mind ... no 
doubt someone will say "look at this dummy!" if I missed the most 
obvious thing.   smile  ...

I cannot find a help for win32lib in my euphoria folders.  I have 
win32lib.ew itself in include but nothing in doc. So I think all the 
information that I have is in the EU encyclopedia.  Other than that I 
was looking at the comments in win32lib.

Actually I cannot recall with the DL for win32lib whether it was just 
the .ew or whether there was a zip with extra documentation, but if 
there was I cannot find it.

> If you were able to find the beginning of the help doc, then did you notice
> the "double link" to "General Info", which shows a synopsis of Win32Lib,
> including some of the fundamental GUI jargon?  (The links in that synopsis
> don't work right, because the main documentation is created directly from
> comments in Win32Lib by a "MakeDoc.exw" program, and the synopsis is not a
> part of the main library.  But all the terms that show as links do have
> separate sections in the main doc that you can go to.)

I came across mention of MakeDoc.exw and thought it sounded like a nice 
idea but I don't think that I ever ran it.  This is, as you probably 
have anticipated, probably a factor in my confusion.

> And did you notice the FAQ referenced in the main doc?  It's incomplete, but
> could maybe be a little helpful nonetheless.

This is a list of what I have in my doc folder. I have had a look at all 
of this I think. If it should have led me to something else, then I 
missed it.  I am not sure what you mean by "main doc".

C:\EUPHORIA\DOC\basic.doc
C:\EUPHORIA\DOC\bind.doc
C:\EUPHORIA\DOC\c.doc
C:\EUPHORIA\DOC\database.doc
C:\EUPHORIA\DOC\ed.doc
C:\EUPHORIA\DOC\EncyclopaediaREADME.TXT
C:\EUPHORIA\DOC\ENCYEU.CNT
C:\EUPHORIA\DOC\EncyEu.FTS
C:\EUPHORIA\DOC\EncyEu.GID
C:\EUPHORIA\DOC\ENCYEU.HLP
C:\EUPHORIA\DOC\HELP.EW
C:\EUPHORIA\DOC\install.doc
C:\EUPHORIA\DOC\LIBRARY.DOC
C:\EUPHORIA\DOC\overview.doc
C:\EUPHORIA\DOC\perform.doc
C:\EUPHORIA\DOC\platform.doc
C:\EUPHORIA\DOC\REFMAN.DOC
C:\EUPHORIA\DOC\relnotes.doc
C:\EUPHORIA\DOC\trouble.doc
C:\EUPHORIA\DOC\web.doc
C:\EUPHORIA\DOC\what2do.doc

At the moment, in spite of a suggestion to the contrary, I am planning 
to do some more playing around with EUwinGui because I find it easier to 
follow for an old programmer used to procedural code and making the 
transition to random events of unknown types happening everywhere.

One of my sons is a programmer and once started to show me Visual Basic 
because QBASIC was becoming a bit limited with long file names and lack 
of memory available (otherwise I like it for getting very quick 
results). However Visual Basic seemed to require vast amounts of code to 
do even a simple thing and I suspect that this is a little bit true with 
Win32Lib also, being the very nature of all these event types that one 
has to deal with. That is what I like about the window designer for 
EUwinGUI, is I only need to put some code in for the bits I am 
interested in. But I can see what the different event types are and the 
different thingys that each window is made up from and so the concepts 
are starting to form. In another few months I might even be able to 
write a GUI beginners guide to Euphoria myself  :)

All the best

Ray

new topic     » goto parent     » topic index » view message » categorize

6. Re: New to Euphoria and GUI

On Tue, 17 Jun 2003 11:24:49 +1200 (06/17/03 09:24:49)
, Ray Tomes <rtomes at ihug.co.nz> wrote:

Assuming you unzip the win32lib files into C:\win32lib\ folder, you should 
find the documentation in the subfolder C:\win32lib\Docs. Click on the file 
"win32lib.htm" to start reading.

-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view message » categorize

7. Re: New to Euphoria and GUI

Derek Parnell wrote:

> Assuming you unzip the win32lib files into C:\win32lib\ folder, you 
> should find the documentation in the subfolder C:\win32lib\Docs. Click 
> on the file "win32lib.htm" to start reading.

Hi Derek

I have just discovered something!  I searched for "win32lib.*" on my 
computer and I did not have any zip or doc or html.  It seems that I got 
my version of Win32Lib when I DLed waveedit05, which included it but not 
the docs! Of course I found some docs in EU Encylopedia.

So I just DLed the w32005901.zip file and discovered a whole lot of 
material that I haven't seen before. ... be back in a few days  :)

Many thanks

Ray

new topic     » goto parent     » topic index » view message » categorize

8. Re: New to Euphoria and GUI

Ray,

As Derek has pointed out, if you unzip Win32Lib into some folder of its own
(could make it within the Euphoria one), that folder will then have 3
sub-folders: Demo, Docs, and Include.

The Win32Lib documentation is in *that* Docs folder (*not* the Euphoria docs
folder!), and starts at either "win32lib.htm" (which is actually a manual
"re-direct" to the actual beginning help doc, for compatibility's sake with
the IDE), or "index.htm" ("new" name for the actual beginning of the help
doc).

There is also a "RunDemos.exw" program in the "Demo" folder which may be
helpful (I wrote that one).

And there is an IDE (Integrated Development Environment) which makes using
Win32Lib a LOT easier, because it's graphically oriented, just click things
with your mouse & it writes the GUI code for you (David Cuny started that
one, and Judith Evans has *extensively* expanded it).

More comments below, interspersed with original message.

----- Original Message -----
From: "Ray Tomes" <rtomes at ihug.co.nz>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, June 16, 2003 4:24 PM
Subject: Re: New to Euphoria and GUI


>
>
> Dan Moyer wrote:
>
> > You could be a great help to many other newcomers to Euphoria and
Windows
> > GUI programming if you could spell out to us what is confusing about the
> > Win32Lib help, so it could be improved to help newbies better.
>
> Hi Dan and Derek
>
> Thanks to all those that replied to my posts. I would be very happy to
> relate my experience with beginning to use Euphoria and Win32Lib.
> Hopefully this is useful in making euphoria easier to get on to.
>
> It is clear to me now that Euphoria is a gem.  However I nearly missed
> this gem because I DLed Euphoria and couldn't get it to run.

I think this is an important problem.  If someone has trouble getting
started, they're all too likely to give up on Euphoria.

> All I got
> was some very DOSsy looking window and an error message about not being
> to find some includes. At that time I continued to look for other
> languages on the web.  Later, I had another look at Euphoria to decide
> whether to persist or delete it.  I really liked the data structure of
> Euphoria and so decided to persist.
>
> It turned out that I hadn't set up the autoexec.bat file for the
> location of Euphoria in "program files".  So I found out about that and
> put in the two changes it said.  However it still didn't work.  It was
> clearly looking for something in C:\euphoria: in spite of the two
> changes I made to autoexec.bat and so I decided it was a bug and moved
> euphoria to c:\euphoria and made a further change to autoexec.bat and it
> got things going.  Later I found out form some other document (don't ask
> me which) that there was a third parameter needed in autoexec.bat which
> was set euinc I think, but this was not mentioned with the other two.
>
> After DLing lots of stuff (about a hundred zips) I found the EU
> encyclopedia which is a very useful help facility because until then the
> help seemed very scattered. I would suggest pointing new people towards
> this or even making it a part of the basic system DL instead of the many
> little txt files.

I haven't looked at the encyclopedia, but I suspect you're right that it
would help to point people to it. However, there is a fine manual included
with Euphoria, it's the html version of all those little text files, & it's
in the "Html" folder under the installed Euphoria folder.  Problem is, just
like all those little text files, it's hard to know where to *start*.  So I
think there should be an html file, "manual.html" included in the main
Euphoria folder, so people could simply click on it and get re-directed to
"REFMAN.HTM" which is the actual start of the manual.


>
> Before addressing your specific question on Win32Lib, I need to say that
> I am a very experienced programmer, but have no previous experience of
> GUI programming and its way of event driven routines.  I have written
> Interrupt driven routines however and so am generally familiar with the
> concepts.  For me, the big hurdle to jump here is the jargon.  Often the
> help will use exactly the same word as the parameter to describe what to
> put there and I don't know enough to know what that variable is. This is
> of course a matter of me getting educated, and as Derek Parnell pointed
> out there is information overload.
>
> So what I really need before I can use Win32Lib is the concepts and the
> jargon explained.  I can pick these up quickly from examples which are
> simple enough, if they say this is a such and such and here is how it
works.
>
> > For instance:
>
> > Were you able to tell where to *begin* with the Win32Lib help
documentation?
> > (I still think it would be helpful to have a single html help doc in the
> > main folder which would jump to the beginning of the help documentation
> > that's inside the Doc folder, since there's a lot of docs in there.)
>
> This might turn out to be embarrassing for me, but never mind ... no
> doubt someone will say "look at this dummy!" if I missed the most
> obvious thing.   smile  ...

Not at all; I asked the question because I don't think the organization of
the distribution of Win32Lib is quite good enough for new users.  It used to
be everything was in one folder, which got to be excessive and confusing;
then from suggestions here Derek divided it into 3 sub-folders, which is
much nicer. But I think there should be one or two obvious things included
in the otherwise bare *main* folder besides just the sub-folders, like a
re-direct to the main help doc that's inside the Doc folder, and something
similar for RunDemos.  That way a new user wouldn't have to hunt for
anything.


>
> I cannot find a help for win32lib in my euphoria folders.  I have
> win32lib.ew itself in include but nothing in doc. So I think all the
> information that I have is in the EU encyclopedia.  Other than that I
> was looking at the comments in win32lib.

As mentioned above, the help docs for Win32Lib should have unzipped into a
sub-folder inside a separate Win32Lib folder (which might or might not be in
your Euphoria folder, depending on where you unzipped it); if you can't find
the separate Win32Lib folder, maybe re-download Win32Lib so you *know* where
you're putting it.

>
> Actually I cannot recall with the DL for win32lib whether it was just
> the .ew or whether there was a zip with extra documentation, but if
> there was I cannot find it.
>
> > If you were able to find the beginning of the help doc, then did you
notice
> > the "double link" to "General Info", which shows a synopsis of Win32Lib,
> > including some of the fundamental GUI jargon?  (The links in that
synopsis
> > don't work right, because the main documentation is created directly
from
> > comments in Win32Lib by a "MakeDoc.exw" program, and the synopsis is not
a
> > part of the main library.  But all the terms that show as links do have
> > separate sections in the main doc that you can go to.)

I'm going to be sending Derek a new version of that synopsis with correct
links.

>
> I came across mention of MakeDoc.exw and thought it sounded like a nice
> idea but I don't think that I ever ran it.  This is, as you probably
> have anticipated, probably a factor in my confusion.

Not really, that's just included as an *example* of Win32Lib programming,
it's only intended to be used by the library creator to generate the help
doc from the imbedded tagged comments in the library (the very comments you
were looking at!).

>
> > And did you notice the FAQ referenced in the main doc?  It's incomplete,
but
> > could maybe be a little helpful nonetheless.
>
> This is a list of what I have in my doc folder. I have had a look at all
> of this I think. If it should have led me to something else, then I
> missed it.  I am not sure what you mean by "main doc".

You're looking in your EUPHORIA "doc" folder, you need to look in the
WIN32LIB doc folder.  The main help doc in the Win32Lib Doc folder would be
either index.htm or win32lib.htm.

>
> C:\EUPHORIA\DOC\basic.doc
> C:\EUPHORIA\DOC\bind.doc
> C:\EUPHORIA\DOC\c.doc
> C:\EUPHORIA\DOC\database.doc
> C:\EUPHORIA\DOC\ed.doc
> C:\EUPHORIA\DOC\EncyclopaediaREADME.TXT
> C:\EUPHORIA\DOC\ENCYEU.CNT
> C:\EUPHORIA\DOC\EncyEu.FTS
> C:\EUPHORIA\DOC\EncyEu.GID
> C:\EUPHORIA\DOC\ENCYEU.HLP
> C:\EUPHORIA\DOC\HELP.EW
> C:\EUPHORIA\DOC\install.doc
> C:\EUPHORIA\DOC\LIBRARY.DOC
> C:\EUPHORIA\DOC\overview.doc
> C:\EUPHORIA\DOC\perform.doc
> C:\EUPHORIA\DOC\platform.doc
> C:\EUPHORIA\DOC\REFMAN.DOC
> C:\EUPHORIA\DOC\relnotes.doc
> C:\EUPHORIA\DOC\trouble.doc
> C:\EUPHORIA\DOC\web.doc
> C:\EUPHORIA\DOC\what2do.doc
>
> At the moment, in spite of a suggestion to the contrary, I am planning
> to do some more playing around with EUwinGui because I find it easier to
> follow for an old programmer used to procedural code and making the
> transition to random events of unknown types happening everywhere.

That's fine, it probably deserves more use/attention.

And what you'll find out eventually is that they're not actually random &
unknown, but rather selected by you the programmer to be watched for, from a
list of pre-specified types of events.

>
> One of my sons is a programmer and once started to show me Visual Basic
> because QBASIC was becoming a bit limited with long file names and lack
> of memory available (otherwise I like it for getting very quick
> results). However Visual Basic seemed to require vast amounts of code to
> do even a simple thing and I suspect that this is a little bit true with
> Win32Lib also, being the very nature of all these event types that one
> has to deal with.

That's true.

> That is what I like about the window designer for
> EUwinGUI, is I only need to put some code in for the bits I am
> interested in. But I can see what the different event types are and the
> different thingys that each window is made up from and so the concepts
> are starting to form. In another few months I might even be able to
> write a GUI beginners guide to Euphoria myself  :)

Not at all a bad idea  :)

>
> All the best
>
> Ray
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

9. Re: New to Euphoria and GUI

Dan Moyer wrote:

> There is also a "RunDemos.exw" program in the "Demo" folder which may be
> helpful (I wrote that one).

I have had a lot of fun running these demos. They have taught me a lot.
I think at least one demo has a memory leak because after running a 
bunch of these my other applications began to show strange fonts which 
usually means something lost all the memory and a reboot is in order.

I cannot find a keystroke capture demo though, and that is the thing I 
need. Also in Win32Lib the only documentation on keystroke capture seems 
to be in events where it has:

    const w32HKeyPress   "Printable" key is pressed.

and when I look at that it says:

    [const]
    w32HKeyPress
    "Printable" key is pressed.
    Category: Events

    parms = { integer keyCode, integer shift}

    The keyCode is ANSII value of the key. Only "visible" keys are
    reported with this function. To trap "special" keys (such as the
    cursor keys), use onKeyDown.

Now I find this confusing.  It says "Const" and then it says "parms". 
Does this mean that eventtype is w32HKeyPress and keycode will have the 
key pressed in it?  Because when I use "keyCode" it says that it isn't 
defined.  ??? sad

> And there is an IDE (Integrated Development Environment) which makes using
> Win32Lib a LOT easier, because it's graphically oriented, just click things
> with your mouse & it writes the GUI code for you (David Cuny started that
> one, and Judith Evans has *extensively* expanded it).

OK, I got this too.  Sounds like a super version of windows designer 
that I already enjoyed learning - OK back to school!

It seems that most of my problems where from accidentally getting 
win32Lib with an application which included the library and not the 
docs. So when I came across Win32Lib again in the archives I said "I 
have that already" which of course I didn't really - at least not the 
documentation. At present I am a happy little chappy apart from not 
being able to find out how to get a keystroke.

Thanks again Dan

Ray Tomes

new topic     » goto parent     » topic index » view message » categorize

10. Re: New to Euphoria and GUI

bill at genient.com wrote:

> Can I just slip in a little plug for my book, here?  It's precisely
> because of people like yourself that I decided to write a book on
> Euphoria with particular reference to Windows programming.  Should be
> out around August and hopefully will answer a few questions.  Watch the
> Euphoria web site.

Hi Bill

Is that your book that had the first 3 chapters on the site?
I read those and got some good tips there thanks.

Ray

new topic     » goto parent     » topic index » view message » categorize

11. Re: New to Euphoria and GUI

On Tue, 17 Jun 2003 20:30:38 +1200, Ray Tomes <rtomes at ihug.co.nz>
wrote:

>I cannot find a keystroke capture demo though, and that is the thing I=20
>need.

Hi Ray,
I wrote a program for a Finnish user having trouble with their
keyboard a few weeks ago. I've cleaned it up as a demo for you, see
below.

>    parms =3D { integer keyCode, integer shift}
>Now I find this confusing.  It says "Const" and then it says "parms".=20
w32HKeyPress and w32HKeyDown are constants that you use in setHandler
to associate routines with those events. It is describing the
parameter passed to the routines. See below, keycode=3Dparams[1] and
shift=3Dparams[2] at the start of keyboardEvent().

Pete

without warning
include win32lib.ew

constant MAIN=3Dcreate(Window,"Finnish",0,50,50,400,180,0),
		 lab1=3Dcreate(LText,"",MAIN,10,10,300,25,0),
		 lab2=3Dcreate(LText,"",MAIN,10,40,300,25,0),
		 lab3=3Dcreate(LText,"",MAIN,10,70,300,25,0),
		 lab4=3Dcreate(LText,"",MAIN,10,100,300,25,0),
		 labl=3D{lab1,lab2,lab3,lab4}
sequence keys, funcs, funcdes
keys=3D"{}\\@"
funcs=3D{VK_RETURN,VK_LEFT,VK_F1,VK_PAGEDOWN}
funcdes=3D{"Return","Left","F1","Page Down"}

integer next
		next=3D0

procedure st()
	next+=3D1
	if keys[1]=3D'{' then
		setText(labl[next],"Press "&keys[next])
	else
		setText(labl[next],"Press "&funcdes[next])
	end if
end procedure
st()

procedure keyboardEvent(integer self, integer event, sequence params)
integer keycode, shift
	keycode=3Dparams[1]
	shift=3Dparams[2]
	setText(MAIN,sprintf("%02x %02x",{keycode,shift}))

	if keycode=3Dkeys[next] then
		if next=3Dlength(keys) then
			if keys[1]=3D'{' then
				for i=3D1 to length(keys) do
					setText(labl[i],"")
				end for
				next=3D0
				keys=3Dfuncs*-1
			else
				closeWindow(MAIN)
				return
			end if
		end if
		st()
	end if
end procedure
setHandler(MAIN,w32HKeyPress,routine_id("keyboardEvent"))

procedure convertSpecialKeys(integer self, integer event, sequence
params)
	-- send special keys as negative to distinguish from 'normal' keys
	params[1]*=3D-1
	keyboardEvent(self,event,params)
end procedure
setHandler(MAIN,w32HKeyDown,routine_id("convertSpecialKeys"))

WinMain(MAIN,Normal)

new topic     » goto parent     » topic index » view message » categorize

12. Re: New to Euphoria and GUI

On Monday 16 June 2003 07:24 pm, Ray wrote:

> Before addressing your specific question on Win32Lib, I need to say that
> I am a very experienced programmer, but have no previous experience of
> GUI programming and its way of event driven routines.  I have written
> Interrupt driven routines however and so am generally familiar with the
> concepts.  For me, the big hurdle to jump here is the jargon.  Often the
> help will use exactly the same word as the parameter to describe what to
> put there and I don't know enough to know what that variable is. This is
> of course a matter of me getting educated, and as Derek Parnell pointed
> out there is information overload.

The jump from procedural to event-driven programming is one of the 
most difficult hurdles for a seasoned programmer to clear. It requires a 
clean break from the past. 

Those who try to make a gradual transition wind up writing 
"really bad" windows programs.  By "really bad", I mean programs which 
are unnerving and confusing to someone used to Windows apps, as well 
as being undependable in their results.

I find this approach works for me, and saves a lot of grief.

1. I design the screen (or screens) first, using Judith's IDE. 
   There's enough functionality in Windows so that, with only 
   a tiny amount of coding (mostly opening and closing 
   windows) you can "demo" the look and feel 
   of your new application.  This is important because nearly 
   everything  a GUI app does, it does "visually".  Even processes 
   being done in the background need to be started by the user, and 
   then need to notify the user in some way -  pop up a message 
  when done, change the cursor while  working, modify a menu selection, 
   or something similar. 

   Be sure that _everything_ a user is allowed to do is available 
   via a menu selection or a button press. 

2. Go back in and "flesh out" the routines with your own code which 
    manipulates the data. 
    The skeletons of those routines will already exist. If they don't, 
    that's an indication that you need to go back to step 1, 
    and re-think your design. 

    Here, of course, is where you'll first need to know the jargon. 
    Fortunately, what you need to know will now be directly related to 
the use of only one or two specific controls, so it will be easier to find
the answer to any questions.

3. Go back again and add any safety and convenience features needed 
   - for example:
    If a file is not open, the "Save" and "Save As" menu items should be 
   greyed out, unusable. 
   If your app can only open one file at a time, the "Open" menu item 
   should be deactivated once a file is already open. 
   --
   This list should be expanded as needed, and it's really important to 
   do this, because these things can prevent an inexperienced or confused user 
   from trashing valuable data by trying to do the wrong thing at the wrong 
   time. 

Because the GUI elements often make up 80-90% of the code in 
a given program, using the IDE to automatically generate this code 
can save a tremendous amount of time. In addition, it manages to 
keep most of that code hidden from the programmer, so you can 
concentrate on the parts _you_ need to wrtte.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

13. Re: New to Euphoria and GUI

irvm at ellijay.com wrote:

> The jump from procedural to event-driven programming is one of the 
> most difficult hurdles for a seasoned programmer to clear. It requires a 
> clean break from the past. 
> 
> Those who try to make a gradual transition wind up writing 
> "really bad" windows programs.  By "really bad", I mean programs which 
> are unnerving and confusing to someone used to Windows apps, as well 
> as being undependable in their results.
> 
> I find this approach works for me, and saves a lot of grief.
...

Hi Irv

I was definitely one of those that resisted the change.  My son tried to 
teach me Visual Basic a few years back but I didn't want to write 
programs that way. However now that I have looked at some demos and seen 
how this style hangs together I feel much happier about the differences 
and hope to not be one of those that writes programs to unnerve people.

Thanks for the tips about the methodology

Ray Tomes

new topic     » goto parent     » topic index » view message » categorize

14. Re: New to Euphoria and GUI

aku saya wrote:

> Maybe you haven't tried IDE for win32lib. It has a nice and
> easy-to-use GUI to design your programs, and for the flags thing, you
> can see "Style" on the properties and you can select the avaliable
> styles by right clicking on it or select menu Edit/Visual Window
> Styles Explorer.. I think win32lib is more recommended since it is
> still developed actively and more users use it.

Now that I found that I didn't have the help for Win32Lib or IDE, I can 
see the wisdom of this advise.

Thank you Aku Saya

Ray

new topic     » goto parent     » topic index » view message » categorize

15. Re: New to Euphoria and GUI

Pete Lomax wrote:
> I wrote a program for a Finnish user having trouble with their
> keyboard a few weeks ago. I've cleaned it up as a demo for you, see
> below.

> w32HKeyPress and w32HKeyDown are constants that you use in setHandler
> to associate routines with those events. It is describing the
> parameter passed to the routines. See below, keycode=params[1] and
> shift=params[2] at the start of keyboardEvent().

Hi Pete

Ah! The bit about keycode=params[1] was what I didn't understand.
Thanks, that is a nice demo.

Ray

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu