Original date:2015-06-01 09:40:47 Edited by: AndyDrummond Subject: Re: Easy Euphoria a Fairy tale

Spock said...
irv said...

Does it bother anyone that the assembly language example is easier to understand (even if you've never done any before) than higher-level windows programming? Somebody want to post the equivalent using win32lib, just for comparison?

include ARWEN.ew 
MessageBox( "Demo", "Hello" ) 

Can't help with win32lib code, sorry.


I just wrote an instant "Click me!" single button window using Judith's IDE and therefore Win32Lib. It took me, oh, thirty seconds to write, run, compile. The clickme.exw file is 1k long, but the executable clickme.exe is - Woe! - 300k long. But I can write thousands of lines of code and almost never get an executable of larger than a meg.

I do agree, though, that to offer someone Euphoria is a nightmare. We need a simple document saying where to get what, where to install it, how to run it, and then maybe they can run with it. I only use Windows ( don't tell me I'm a masochist ) but with Win32Lib (and EuVIDE) I find it very simple. Never need to look up arguments and variable sizes; just setText() or setWindowBackColor() and so on. Unix is too much like going back to MS-DOS in terms of getting too close to the OS and even the hardware to have time to do a proper job designing the actual application requirement. IMHO.

You will disagree, I know, don't bother to tell me I don't know what I'm talking about!

The exw program comes out as:

include Win32lib.ew 
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 214, 161, 0, 0 ) 
constant ClickMe = createEx( PushButton, "Click me!", Window1, 50, 40, 90, 30, 0, 0 ) 
procedure ClickMe_onClick (integer self, integer event, sequence params)--params is () 
end procedure 
setHandler( ClickMe, w32HClick, routine_id("ClickMe_onClick")) 
WinMain( Window1,Normal ) 

A bit verbose compared to Arwen above, but I could have put a message box instead of a pushbutton with much the same result:

include Win32Lib.ew 
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 214, 161, 0, 0 ) 
VOID = message_box("Click me if you dare!", "Test", MB_ICONEXCLAMATION) 
WinMain( Window1,Normal ) 
Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu