1. wxEditor v0.2 released

I've made some significant progress on wxEditor, so I decided to push out a release. It works for the most part, and it's a good example of where the project is heading.

http://wxeditor.sourceforge.net/

Any and all feedback is welcome!

-Greg

new topic     » topic index » view message » categorize

2. Re: wxEditor v0.2 released

Greg, the link doesn't work.

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

3. Re: wxEditor v0.2 released

Judith Evans said...

Greg, the link doesn't work.

Hm, came right up for me. Reading now.

Jeremy

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

4. Re: wxEditor v0.2 released

Judith Evans said...

Greg, the link doesn't work.

Sorry about that! The installer is an exe, not a zip. I've corrected it now.

-Greg

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

5. Re: wxEditor v0.2 released

Jeremy Cowgar said...
Judith Evans said...

Greg, the link doesn't work.

Hm, came right up for me. Reading now.

Jeremy

She meant the download link... go ahead, try it... :)

-Greg

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

6. Re: wxEditor v0.2 released

Greg Haberek said...

I've made some significant progress on wxEditor, so I decided to push out a release. It works for the most part, and it's a good example of where the project is heading.

Greg, what is the control? Is it a wrapping of Scintilla or your own creation? It's looking good! I did not try it yet as I do not even have wxEuphoria installed, but I will give it a try in a little while.

Jeremy

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

7. Re: wxEditor v0.2 released

Jeremy Cowgar said...

Greg, what is the control? Is it a wrapping of Scintilla or your own creation? It's looking good! I did not try it yet as I do not even have wxEuphoria installed, but I will give it a try in a little while.

Jeremy

This is my very own control written from the ground-up in wxEuphoria. If you download the Win32 installer, it comes with the proper wxEuphoria dlls, so it should run straight out-of-the-box.

-Greg

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

8. Re: wxEditor v0.2 released

Greg said...

This is my very own control written from the ground-up in wxEuphoria. If you download the Win32 installer, it comes with the proper wxEuphoria dlls, so it should run straight out-of-the-box.

I spend 95% of my life in Linux, 3% in OS X and 2% Windows. I'm hardly there, but this will work on Linux fine too, right?

Jeremy

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

9. Re: wxEditor v0.2 released

Jeremy Cowgar said...

I spend 95% of my life in Linux, 3% in OS X and 2% Windows. I'm hardly there, but this will work on Linux fine too, right?

Jeremy

I too, spend 99% of my time in Linux. I only run Windows XP on VirtualBox when I absolutely need it. I've been developing this on my Windows box at work during my breaks and lunch hours, so development has been slower that I'd like.

wxEditor v0.1 works on Linux (no syntax highlighting) and v0.2 will work in Linux. I've done some modifying to the wxEuphoria C source code to get this to work properly, and I fear there may be even more. I've hit an issue where my wxSyntax control runs dog-ass-slow in Linux, but just fine in Windows. It must have something to do with how often I'm repainting the screen. I'll get that worked out in the next few days, hopefully. I just need to wrap a few more classes in wxEuphoria.

-Greg

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

10. Re: wxEditor v0.2 released

Greg Haberek said...

I too, spend 99% of my time in Linux. I only run Windows XP on VirtualBox when I absolutely need it. I've been developing this on my Windows box at work during my breaks and lunch hours, so development has been slower that I'd like.

wxEditor v0.1 works on Linux (no syntax highlighting) and v0.2 will work in Linux. I've done some modifying to the wxEuphoria C source code to get this to work properly, and I fear there may be even more. I've hit an issue where my wxSyntax control runs dog-ass-slow in Linux, but just fine in Windows. It must have something to do with how often I'm repainting the screen. I'll get that worked out in the next few days, hopefully. I just need to wrap a few more classes in wxEuphoria.

-Greg

Well that looks interesting... :/

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

11. Re: wxEditor v0.2 released

Greg Haberek said...

Well that looks interesting... :/

I think I may need to disable more Creole formatting. ++ means added text while -- means removed text. We probably do not need that type of formatting in a forum application. For document markup, it's great.

Jeremy

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

12. Re: wxEditor v0.2 released

Greg Haberek said...

I too, spend 99% of my time in Linux. I only run Windows XP on VirtualBox when I absolutely need it. I've been developing this on my Windows box at work during my breaks and lunch hours, so development has been slower that I'd like.

wxEditor v0.1 works on Linux (no syntax highlighting) and v0.2 will work in Linux. I've done some modifying to the wxEuphoria C source code to get this to work properly, and I fear there may be even more. I've hit an issue where my wxSyntax control runs dog-ass-slow in Linux, but just fine in Windows. It must have something to do with how often I'm repainting the screen. I'll get that worked out in the next few days, hopefully. I just need to wrap a few more classes in wxEuphoria.

Greg, are you using a modified version of wxEuphoria? I see some notes about having changed add_create_func, but it doesn't look like the actual changes have been checked in.

Matt

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

13. Re: wxEditor v0.2 released

Matt Lewis said...

Greg, are you using a modified version of wxEuphoria? I see some notes about having changed add_create_func, but it doesn't look like the actual changes have been checked in.

Matt

Yes, and no. I am using a modified version of wxEuphoria, but I have yet to commit my changes. I don't have SVN on my work computer. I'll get it setup and the changes committed asap. My modified add_create_func() and create() functions allow for Euphoria functions to be used for user-created controls. Essentially, you can pass a Euphoria routine_id() to add_create_func() via a sequence (instead of an atom) then create() makes a check for this and uses call_func() instead. It's pretty slick.

function new_wxSyntax( object params ) 
    return new_control_id 
end function 
 
global constant wxSyntax = add_create_func({ routine_id("new_wxSyntax") }) 

-Greg

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

14. Re: wxEditor v0.2 released

Greg Haberek said...

Yes, and no. I am using a modified version of wxEuphoria, but I have yet to commit my changes. I don't have SVN on my work computer. I'll get it setup and the changes committed asap. My modified add_create_func() and create() functions allow for Euphoria functions to be used for user-created controls. Essentially, you can pass a Euphoria routine_id() to add_create_func() via a sequence (instead of an atom) then create() makes a check for this and uses call_func() instead. It's pretty slick.

Matt, I've committed these changes to the wxEuphoria SVN.

-Greg

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

15. Re: wxEditor v0.2 released

Greg Haberek said...

wxEditor v0.1 works on Linux (no syntax highlighting) and v0.2 will work in Linux. I've done some modifying to the wxEuphoria Cpp source code to get this to work properly, and I fear there may be even more. I've hit an issue where my wxSyntax control runs dog-ass-slow in Linux, but just fine in Windows. It must have something to do with how often I'm repainting the screen. I'll get that worked out in the next few days, hopefully. I just need to wrap a few more classes in wxEuphoria.

Interestingly, I had an opposite experience. On a ~3GHz, 4GB machine running XP, it was painfully slow (presumably, this was translated?). On my 1.6GHz Dual Core 1GB machine running Kubuntu, it seems fineinterpreted with eu4.0.

Matt

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

16. Re: wxEditor v0.2 released

> Interestingly, I had an opposite experience. On a ~3GHz, 4GB machine running XP, it was painfully slow (presumably, this was translated?). On my 1.6GHz Dual Core 1GB machine running Kubuntu, it seems fineinterpreted with eu4.0. > > Matt

Weird. :/ On my 2.8Ghz w/HT, 2GB Windows XP Pro box computer at work, it runs flawlessly, with no flicker whatsoever both translated and interpreted. On my 2.4Ghz w/HT 1.5 GB Ubuntu 8.04 box at home, it runs like crap. I think it has to do with two factors: how big the file is (I load it as one sequence per line), and that I refresh the entire screen on each action. Therefore, I need at least two things to get it to work a lot faster:

  1. a better way of loading the text file into memory
  2. wxClientDC wrapped in wxEuphoria, so I can draw without repainting

I'm also exploring a better way to buffer the text files. Currently, I'm loading each line of the file into a sequence, which is held in one large "text" sequence. I'm thinking of some compromise between a disk buffer (edb file?) and a memory buffer (sequences?). I've also got to write my own in-memory string routines, so I don't have to waste four bytes per character in memory. OR I can just hold out for a native Euphoria string type.

-Greg

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

17. Re: wxEditor v0.2 released

Greg Haberek said...

Weird. :/ On my 2.8Ghz w/HT, 2GB Windows XP Pro box computer at work, it runs flawlessly, with no flicker whatsoever both translated and interpreted. On my 2.4Ghz w/HT 1.5 GB Ubuntu 8.04 box at home, it runs like crap. I think it has to do with two factors: how big the file is (I load it as one sequence per line), and that I refresh the entire screen on each action. Therefore, I need at least two things to get it to work a lot faster:

  1. a better way of loading the text file into memory
  2. wxClientDC wrapped in wxEuphoria, so I can draw without repainting

wxClientDC is in there. You use it just like any other DC.

Greg Haberek said...

I'm also exploring a better way to buffer the text files. Currently, I'm loading each line of the file into a sequence, which is held in one large "text" sequence. I'm thinking of some compromise between a disk buffer (edb file?) and a memory buffer (sequences?). I've also got to write my own in-memory string routines, so I don't have to waste four bytes per character in memory. OR I can just hold out for a native Euphoria string type.

I haven't looked at the code in much detail, but I suspect that the buffering isn't the issue. I basically copied the editor from Judith and ported it to wxeu, and it just stores everything in sequences. Memory usage can be high, and if there are many files loaded, there's a noticeable pause as memory swaps out, but it doesn't seem to affect the responsiveness otherwise.

It actually redraws the entire screen each keystroke, and blits everything to the window.

Matt

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

18. Re: wxEditor v0.2 released

Greg Haberek said...

Weird. :/ On my 2.8Ghz w/HT, 2GB Windows XP Pro box computer at work, it runs flawlessly, with no flicker whatsoever both translated and interpreted. On my 2.4Ghz w/HT 1.5 GB Ubuntu 8.04 box at home, it runs like crap. I think it has to do with two factors: how big the file is (I load it as one sequence per line), and that I refresh the entire screen on each action. Therefore, I need at least two things to get it to work a lot faster:

Ok, loaded a big file, and then it was pretty slow. Actually, the easiest way to speed it up is to not redraw all the lines. In wxSyntax.e:redraw_line() I just did a naive cutoff of 100 lines (so it's drawing too many, but I figure it's unlikely to be showing more than that), and it performs much better:

    -- redraw lines 
    bottom = length( text ) 
    if bottom - top > 100 then 
    	bottom = top + 100 
    end if 
    for line = top to bottom do 
        redraw_line( this, line ) 
    end for 

Matt

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

19. Re: wxEditor v0.2 released

Matt Lewis said...

Ok, loaded a big file, and then it was pretty slow. Actually, the easiest way to speed it up is to not redraw all the lines. In wxSyntax.e:redraw_line() I just did a naive cutoff of 100 lines (so it's drawing too many, but I figure it's unlikely to be showing more than that), and it performs much better:

    -- redraw lines 
    bottom = length( text ) 
    if bottom - top > 100 then 
    	bottom = top + 100 
    end if 
    for line = top to bottom do 
        redraw_line( this, line ) 
    end for 

Matt

Okay, yeah... I think found it. In redraw_buffer() I have this:

    -- redraw lines 
 
    for line = top to length( text ) do 
 
        redraw_line( this, line ) 
 
    end for 
 

But I think it should be something like this:

    -- calculate number of lines to drawn 
    bottom = top + maxlines 
    if bottom > length( text ) then 
        bottom = length( text ) 
    end if 
 
    -- redraw lines 
 
    for line = top to bottom do 
 
        redraw_line( this, line ) 
 
    end for 
 

I haven't tried it, but I suspect that's it. I never really noticed because I was always loading small-ish files.

-Greg

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

20. Re: wxEditor v0.2 released

[quote Greg Haberek]

Matt Lewis said...

Okay, yeah... I think found it. In redraw_buffer() I have this:

[snip]

But I think it should be something like this:

[snip]

I haven't tried it, but I suspect that's it. I never really noticed because I was always loading small-ish files.

The other thing that will probably help a lot is if you cache the file data locally, rather than going back to the list each line. Best strategy would probably be to swap that in and out only when the user switches to a different file, or saves, etc.

Matt

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

21. Re: wxEditor v0.2 released

Matt Lewis said...

The other thing that will probably help a lot is if you cache the file data locally, rather than going back to the list each line. Best strategy would probably be to swap that in and out only when the user switches to a different file, or saves, etc.

Matt

Good idea. I think I did that with some of my other attempts at text editors, because they used real controls to hold the text.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu