1. wxEditor v0.2 released
- Posted by Greg Haberek Jul 01, 2008
- 843 views
- Last edited Jul 02, 2008
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
2. Re: wxEditor v0.2 released
- Posted by Judith Evans Jul 01, 2008
- 827 views
- Last edited Jul 02, 2008
Greg, the link doesn't work.
3. Re: wxEditor v0.2 released
- Posted by Jeremy Cowgar Jul 01, 2008
- 798 views
- Last edited Jul 02, 2008
Greg, the link doesn't work.
Hm, came right up for me. Reading now.
Jeremy
4. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 01, 2008
- 794 views
- Last edited Jul 02, 2008
Greg, the link doesn't work.
Sorry about that! The installer is an exe, not a zip. I've corrected it now.
-Greg
5. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 01, 2008
- 786 views
- Last edited Jul 02, 2008
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
6. Re: wxEditor v0.2 released
- Posted by Jeremy Cowgar Jul 01, 2008
- 797 views
- Last edited Jul 02, 2008
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
7. Re: wxEditor v0.2 released
- Posted by Greg Jul 01, 2008
- 792 views
- Last edited Jul 02, 2008
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
8. Re: wxEditor v0.2 released
- Posted by Jeremy Cowgar Jul 01, 2008
- 792 views
- Last edited Jul 02, 2008
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
9. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 01, 2008
- 796 views
- Last edited Jul 02, 2008
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
10. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 01, 2008
- 794 views
- Last edited Jul 02, 2008
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... :/
11. Re: wxEditor v0.2 released
- Posted by Jeremy Cowgar Jul 01, 2008
- 804 views
- Last edited Jul 02, 2008
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
12. Re: wxEditor v0.2 released
- Posted by Matt Lewis Jul 02, 2008
- 790 views
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
13. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 02, 2008
- 785 views
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
14. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 02, 2008
- 793 views
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
15. Re: wxEditor v0.2 released
- Posted by Matt Lewis Jul 02, 2008
- 780 views
- Last edited Jul 03, 2008
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
16. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 02, 2008
- 794 views
- Last edited Jul 03, 2008
> 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:
- a better way of loading the text file into memory
- 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
17. Re: wxEditor v0.2 released
- Posted by Matt Lewis Jul 02, 2008
- 775 views
- Last edited Jul 03, 2008
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:
- a better way of loading the text file into memory
- wxClientDC wrapped in wxEuphoria, so I can draw without repainting
wxClientDC is in there. You use it just like any other DC.
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
18. Re: wxEditor v0.2 released
- Posted by Matt Lewis Jul 03, 2008
- 811 views
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
19. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 03, 2008
- 802 views
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
20. Re: wxEditor v0.2 released
- Posted by Matt Lewis Jul 03, 2008
- 788 views
[quote Greg Haberek]
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
21. Re: wxEditor v0.2 released
- Posted by Greg Haberek Jul 03, 2008
- 814 views
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