1. Windows, memstructs, win32lib, IDE

As you may recall, I've been working on adding better C-like memory structure capabilities to euphoria. This effort will be critical, I think, for getting Win32Lib working with 64-bit euphoria, and I've put in a lot of effort converting win32lib from its internal struct library to using memstructs.

I tried adapting the existing code to be portable between 32 and 64-bits, but that wasn't really worth it, so I've been working on converting all of Win32Lib (not completely done). Also, to help test that conversion, I've been working on updating the old Win32Lib IDE. This has included some 4.x code cleanup, plus converting legacy Win32Lib struct handling. Currently, it seems to run, though I haven't done much testing.

I have posted new windows eubins:

These are just a zip of the basic euphoria source tree with the binaries put into the bin dir. You'll need to set up appropriate eu.cfg files.

I have also posted downloads of my updates to Win32Lib and the IDE on sourceforge.

It would be great if some adventurous people tried this stuff out. Note that your existing Win32lib programs may not run as-is, especially if they directly use the legacy Win32Lib structs code. I'd really appreciate feedback about things that aren't working.

Matt

new topic     » topic index » view message » categorize

2. Re: Windows, memstructs, win32lib, IDE

Matt,
Not sure if I have done this right but I downloaded your eubins and installed in c:\euphoria4, added the win32lib (renamed from the dated-name you used) and the ide (similarly renamed). The IDE started with the usual long delay, put up its startup window then crashed:

C:\Euphoria4\ide\Includes\IDE_code.ew:2363 in procedure Resize_CodeWin()  
variable Code_R1 has not been assigned a value  
Have I done something weird or is ithis an actual "error"!

I'd like to get working with IDE & Win32Lib with Eu4 now that my work on old Eu3 has diminished to the point where I can forget it. So I want to get on with the most advanced offering rather than a basic old ide.

Andy

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

3. Re: Windows, memstructs, win32lib, IDE

AndyDrummond said...

Matt,
Not sure if I have done this right but I downloaded your eubins and installed in c:\euphoria4, added the win32lib (renamed from the dated-name you used) and the ide (similarly renamed). The IDE started with the usual long delay, put up its startup window then crashed:

C:\Euphoria4\ide\Includes\IDE_code.ew:2363 in procedure Resize_CodeWin()  
variable Code_R1 has not been assigned a value  
Have I done something weird or is ithis an actual "error"!

I've changed the initialization code a bit, and I've also been testing in WINE. It sounds like some event is firing before something critical has been initialized. It's a bit more dynamic, with different sections identifying their dependencies (rather than relying on the order in which files are included). Ultimately, this simplified a lot of things, but it's obviously not quite there yet.

Could you please post the stack trace into a pastey? All of the variable data probably isn't necessary, but the call stack should help me identify what isn't getting initialized properly.

Matt

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

4. Re: Windows, memstructs, win32lib, IDE

Matt
Not used pastey before but I have done what seems right. Let me know if I have missed the right mechanism, but it seemed very simple. That's what worries me. I'm too used to Microsoft.....
Andy

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

5. Re: Windows, memstructs, win32lib, IDE

AndyDrummond said...

Matt
Not used pastey before but I have done what seems right. Let me know if I have missed the right mechanism, but it seemed very simple. That's what worries me. I'm too used to Microsoft.....

That was very useful. Please see if this fix to Includes/IDE_window.ew helps:

procedure initialize_property_sheet() 
--prop.ew define the controls 
	ensure( "config" ) 
	ensure( "code" ) 
        ... 

Basically, you're adding that ensure( "config" ) line, which should initialize the bit that you're having problems with. Unfortunately, I suspect there may be other, similar things that will need to be added.

To expand on what I've done there, you can take a look at the file Includes/IDE_init.ew. This has some stuff that allows modules to register their initialization functions and identify their dependencies, so that things are initialized in the correct order.

Then, all of the modules have a call to register() to register their initialization. When the initialization routine is called, it can call ensure(), which checks to see if the dependency has been called yet. If not, then it is called, otherwise it simply returns.

This way, I can easily reorganize the code without breaking a dependency on include order to ensure that things get initialized in the right order.

Matt

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

6. Re: Windows, memstructs, win32lib, IDE

That fixes it, Matt, and it runs a vestigial program OK. Now I have to see what I can do with it all!

I can see what you're doing with a common initialization routine. One thing I wanted to ask for in Eu4 but didn't dare ask for was for the object() type to return False if the object has not been initialised, True in all other cases. Then a routine could initialise any parameters which were undefined by using that. It would save having to have explicit initialisation routines being called at the program startup:

if !object(fred) then  
fred = ""  
endif 

Andy

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

7. Re: Windows, memstructs, win32lib, IDE

Another thing - I tried to eubind the ide.exw because I like to work by associating my ide files (I use extension ide rather that prj to avoid conflicts) and then I can simply double click on the ide file and key presto! I can get around that but ide.exw takes a long time to wind up by which time I forget what I am about to do! Well, not quite, but you follow my drift? Anyway, I couldn't eubind it as it claimed that int was being redefined...

I mention it merely for information, as my friend Marvin would say in H2G2...

Andy

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

8. Re: Windows, memstructs, win32lib, IDE

AndyDrummond said...

That fixes it, Matt, and it runs a vestigial program OK. Now I have to see what I can do with it all!

I can see what you're doing with a common initialization routine. One thing I wanted to ask for in Eu4 but didn't dare ask for was for the object() type to return False if the object has not been initialised, True in all other cases. Then a routine could initialise any parameters which were undefined by using that. It would save having to have explicit initialisation routines being called at the program startup:

if !object(fred) then  
fred = ""  
endif 

You're late! Please take a look at the object() documentation. smile

Matt

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

9. Re: Windows, memstructs, win32lib, IDE

AndyDrummond said...

Another thing - I tried to eubind the ide.exw because I like to work by associating my ide files (I use extension ide rather that prj to avoid conflicts) and then I can simply double click on the ide file and key presto! I can get around that but ide.exw takes a long time to wind up by which time I forget what I am about to do! Well, not quite, but you follow my drift? Anyway, I couldn't eubind it as it claimed that int was being redefined...

I mention it merely for information, as my friend Marvin would say in H2G2...

Ultimately, I would distribute a translated version. This will start up and run faster. Since you've confirmed that what I did fixed it, I may upload a translated version with that fix included. But remember, this is an admittedly incomplete update, so be careful using it for now.

Thanks for the testing!

Oh, what version of Windows are you using?

Matt

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

10. Re: Windows, memstructs, win32lib, IDE

mattlewis said...

Ultimately, I would distribute a translated version. This will start up and run faster. Since you've confirmed that what I did fixed it, I may upload a translated version with that fix included. But remember, this is an admittedly incomplete update, so be careful using it for now.

Thanks for the testing!

Oh, what version of Windows are you using?

Matt

Ah! Object() does more than just return True! I should have realised that you pundits were ahead of an old experienced hand like me! I did start my programming using MAC - Mercury AutoCode - on a Ferranti Mercury computer! With valves, you heard of those?

I'm on Windows 7 SP1. I set myself to be administrator and set my UAC to zero because (initially anyway) if it wasn't I got all sorts of failures with Eu - Eu3 - and it made life tricky.

No worries about beta versions of IDE - I worked with Judith - God bless her - for years using ber Bleeding Edge IDE. Personally i love working that way, rather than just moaning that the compiler/interpreter is not doing what I think it ought.

Thanks ...
Andy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu