1. Getting started with IDE

I'm investigating use of Euphoria, but just cannot get started with IDE.

Could someone talk me through a simple program such as adding two numbers.

I cannot get the widgets (buttons for example) to link to any code.

Perhaps Charles Newbold could write another chapter to his excellent Intro to
Euphoria Programming covering basic use of the IDE

Any help greatly appreciated!

new topic     » topic index » view message » categorize

2. Re: Getting started with IDE

JAYBEEDEE wrote:
> 
> I'm investigating use of Euphoria, but just cannot get started with IDE.
> 
> Could someone talk me through a simple program such as adding two numbers.
> \
atom first_num,second_num
first_num=1
sec_num=2
?first_num + second_num


> I cannot get the widgets (buttons for example) to link to any code.

this is an wxWindows issue not an IDE issue.

> 
> Perhaps Charles Newbold could write another chapter to his excellent Intro to
> Euphoria Programming covering basic use of the IDE
> 
> Any help greatly appreciated!


Don Cole

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

3. Re: Getting started with IDE

Oh! One more thing,

Use IDE to create all the Windows,Buttons,etc.(controls) for you program.

Then write all the exection of the controls by hand. With Edita or some kind of
editor.



Don Cole

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

4. Re: Getting started with IDE

don cole wrote:
> 
> JAYBEEDEE wrote:
> > 
> > I'm investigating use of Euphoria, but just cannot get started with IDE.
> > 
> > Could someone talk me through a simple program such as adding two numbers.
> > \
> }}}
<eucode>
> atom first_num,second_num
> first_num=1
> sec_num=2
> ?first_num + second_num
> </eucode>
{{{

> 
> > I cannot get the widgets (buttons for example) to link to any code.
> 
> this is an wxWindows issue not an IDE issue.
> 
> > 
> > Perhaps Charles Newbold could write another chapter to his excellent Intro
> > to
> > Euphoria Programming covering basic use of the IDE
> > 
> > Any help greatly appreciated!
> 
> 
> Don Cole

Thanks, Don,

Fine, but if I put that code into an IDE button procedure it will only revert to
the DOS window to run.

How does one set up the equivalent of Visual Basic's Input or Output Boxes, and
get the output shown in a window window?

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

5. Re: Getting started with IDE

JAYBEEDEE wrote:
> > > I'm investigating use of Euphoria, but just cannot get started with IDE.
> > > 
> > > Could someone talk me through a simple program such as adding two numbers.

> 
> How does one set up the equivalent of Visual Basic's Input or Output Boxes,
> and get the output shown in a window window?

In the IDE, if you double-click on your button widget it should open up the code
editor. You can select the event you wish to trap, for buttons that would
normally be the 'Click' event. Then write your code to add the numbers.

For example, let's assume you have three edittext fields Num1, Num2, and Num3.
And a button named 'AddNumbers'. In the code editor for the button initially it
looks like ...

procedure AddNumbers_onClick (integer self, integer event, sequence
params)--params is ()
end procedure
setHandler( AddNumbers, w32HClick, routine_id("AddNumbers_onClick"))

and you code something like ...

procedure AddNumbers_onClick (integer self, integer event, sequence
params)--params is ()
  atom n,m
  n = getNumber(Num1)
  m = getNumber(Num2)
  setText(Num3, n+m)
end procedure
setHandler( AddNumbers, w32HClick, routine_id("AddNumbers_onClick"))

And that's it. Press F5 to run it.

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

6. Re: Getting started with IDE

JAYBEEDEE wrote:
> 
> don cole wrote:
> > 
> > JAYBEEDEE wrote:
> > > 
> > > I'm investigating use of Euphoria, but just cannot get started with IDE.
> > > 
> > > Could someone talk me through a simple program such as adding two numbers.
> > > \
> > }}}
<eucode>
> > atom first_num,second_num
> > first_num=1
> > sec_num=2
> > ?first_num + second_num
> > </eucode>
{{{

> > 
> > > I cannot get the widgets (buttons for example) to link to any code.
> > 
> > this is an wxWindows issue not an IDE issue.

Not really, a widget is a device on a window, wxWidgets is the name of the
program that puts widgets on the window.

> > 
> > > 
> > > Perhaps Charles Newbold could write another chapter to his excellent Intro
> > > to
> > > Euphoria Programming covering basic use of the IDE
> > > 
> > > Any help greatly appreciated!
> > 
> > 
> > Don Cole
> 
> Thanks, Don,
> 
> Fine, but if I put that code into an IDE button procedure it will only revert
> to the DOS window to run.
> 
> How does one set up the equivalent of Visual Basic's Input or Output Boxes,
> and get the output shown in a window window?

A _very_ quick tutorial on adding two numbers

1. Open the IDE
2. Click the input tab from the controls at the bottom
3. Click an input box (hold your mouse over the controls - it will say Edit
text)
4. Click somewhere on Window 1
5. Click the input box on the contriols section again
6. Click under the previously created input box
7. Click the controls tab of the controls
8. Click a button
9. Click somehwere else on Window 1
10. Add another input box
11. By clicking on each of the controls on the window, you can reposition and
resize them ubntil you have what you like
12. Click an input, select caption in the property list, and delete the caption
(not the name). Repeat for the other input boxes.
13. Click the button, change the caption to 'Add'
14. Double click the Add button
15. copy and paste the following code into the new window that has popped up.

object a, b, c

a = 0
b = 0

if length(getText(EditText2)) > 0  then
	a = w32TextToNumber(getText(EditText2))	
end if
if length(getText(EditText3)) > 0  then
	b = w32TextToNumber(getText(EditText3))	
end if

c = a + b

setText(EditText5, sprintf("%f", {c}) )


http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

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

7. Re: Getting started with IDE

JAYBEEDEE wrote:
> 
> don cole wrote:
> > 
> > JAYBEEDEE wrote:
> > > 
> > > I'm investigating use of Euphoria, but just cannot get started with IDE.
> > > 
> > > Could someone talk me through a simple program such as adding two numbers.
> > > \
> > 
> > atom first_num,second_num
> > first_num=1
> > sec_num=2
> > ?first_num + second_num
> > 
> > 
> > > I cannot get the widgets (buttons for example) to link to any code.
> > 
> > this is an wxWindows issue not an IDE issue.

Not really, a widget is a device on a window, wxWidgets is the name of the
program
that puts widgets on the window.

> > 
> > > 
> > > Perhaps Charles Newbold could write another chapter to his excellent Intro
> > > to
> > > Euphoria Programming covering basic use of the IDE
> > > 
> > > Any help greatly appreciated!
> > 
> > 
> > Don Cole
> 
> Thanks, Don,
> 
> Fine, but if I put that code into an IDE button procedure it will only revert
> to the DOS window to run.
> 
> How does one set up the equivalent of Visual Basic's Input or Output Boxes,
> and get the output shown in a window window?

A _very_ quick tutorial on adding two numbers

1. Open the IDE
2. Click the input tab from the controls at the bottom
3. Click an input box (hold your mouse over the controls - it will say Edit
text)
4. Click somewhere on Window 1
5. Click the input box on the contriols section again
6. Click under the previously created input box
7. Click the controls tab of the controls
8. Click a button
9. Click somehwere else on Window 1
10. Add another input box
11. By clicking on each of the controls on the window, you can reposition and
resize them ubntil you have what you like
12. Click an input, select caption in the property list, and delete the caption
(not the name). Repeat for the other input boxes.
13. Click the button, change the caption to 'Add'
14. Double click the Add button
15. copy and paste the following code into the new window that has popped up.

object a, b, c

a = 0
b = 0

if length(getText(EditText2)) > 0  then
	a = w32TextToNumber(getText(EditText2))	
end if
if length(getText(EditText3)) > 0  then
	b = w32TextToNumber(getText(EditText3))	
end if

c = a + b

setText(EditText5, sprintf("%f", {c}) )


Caveat : make sure EditText2, 3, and 5 correspond to the text boxes you have
created.

Press the little clock to run the app.

Play

Chris

(PS sorry for previous post, pressed send by accident.)



http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

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

8. Re: Getting started with IDE

Chris Burch wrote:
> 
> JAYBEEDEE wrote:
> > 
> > don cole wrote:
> > > 
> > > JAYBEEDEE wrote:
> > > > 
> > > > I'm investigating use of Euphoria, but just cannot get started with IDE.
> > > > 
> > > > Could someone talk me through a simple program such as adding two
> > > > numbers.
> > > > \
> > > 
> > > atom first_num,second_num
> > > first_num=1
> > > sec_num=2
> > > ?first_num + second_num
> > > 
> > > 
> > > > I cannot get the widgets (buttons for example) to link to any code.
> > > 
> > > this is an wxWindows issue not an IDE issue.
> 
> Not really, a widget is a device on a window, wxWidgets is the name of the
> program
> that puts widgets on the window.
> 
> > > 
> > > > Perhaps Charles Newbold could write another chapter to his excellent
> > > > Intro to
> > > > Euphoria Programming covering basic use of the IDE
> > > > 
> > > > Any help greatly appreciated!
> > > 
> > > 
> > > Don Cole
> > 
> > Thanks, Don,
> > 
> > Fine, but if I put that code into an IDE button procedure it will only
> > revert
> > to the DOS window to run.
> > 
> > How does one set up the equivalent of Visual Basic's Input or Output Boxes,
> > and get the output shown in a window window?
> 
> A _very_ quick tutorial on adding two numbers
> 
> 1. Open the IDE
> 2. Click the input tab from the controls at the bottom
> 3. Click an input box (hold your mouse over the controls - it will say Edit
> text)
> 4. Click somewhere on Window 1
> 5. Click the input box on the contriols section again
> 6. Click under the previously created input box
> 7. Click the controls tab of the controls
> 8. Click a button
> 9. Click somehwere else on Window 1
> 10. Add another input box
> 11. By clicking on each of the controls on the window, you can reposition and
> resize them ubntil you have what you like
> 12. Click an input, select caption in the property list, and delete the
> caption
> (not the name). Repeat for the other input boxes.
> 13. Click the button, change the caption to 'Add'
> 14. Double click the Add button
> 15. copy and paste the following code into the new window that has popped up.
> 
> }}}
<eucode>
> object a, b, c
> 
> a = 0
> b = 0
> 
> if length(getText(EditText2)) > 0  then
> 	a = w32TextToNumber(getText(EditText2))	
> end if
> if length(getText(EditText3)) > 0  then
> 	b = w32TextToNumber(getText(EditText3))	
> end if
> 
> c = a + b
> 
> setText(EditText5, sprintf("%f", {c}) )
> 
> </eucode>
{{{

> 
> Caveat : make sure EditText2, 3, and 5 correspond to the text boxes you have
> created.
> 
> Press the little clock to run the app.
> 
> Play
> 
> Chris
> 
> (PS sorry for previous post, pressed send by accident.)
> 
> 
> <a
> href="http://members.aol.com/chriscrylex/euphoria.htm">http://members.aol.com/chriscrylex/euphoria.htm</a>
> <a href="http://uboard.proboards32.com/">http://uboard.proboards32.com/</a>
> <a
> href="http://members.aol.com/chriscrylex/EUSQLite/eusql.html">http://members.aol.com/chriscrylex/EUSQLite/eusql.html</a>

Many thanks to Chris Burch and Derek Powell - I've got the hang of it now!

Incidentally is there aa annotated list of IDE command words anywhere? Can't
find one with the IDE download, or in the Archives.

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

9. Re: Getting started with IDE

Hi

<snip>
Incidentally is there aa annotated list of IDE command words anywhere? Can't
find one with the IDE download, or in the Archives.
</snip>

Do you mean win32lib command words, the excellent Mr Parnell's (D Cuny, et al)
windows interface library. Look in the win32lib documentation. Lots to read -
enjoy!

Chris
 
http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

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

Search



Quick Links

User menu

Not signed in.

Misc Menu