1. Editor
- Posted by tbohon Dec 03, 2014
- 6746 views
I've been using the WEE Editor by Pete Eberlein and much prefer it to ed and others I've tried in the past.
My only 'wants' to improve my editing process would be for the editor to remember position and size between executions and to have a 'recent files' list. Other than that it seems to be a solid editor and I really enjoy using it.
FWIW ... your mileage may vary.
Tom
2. Re: Editor
- Posted by PeteE Dec 03, 2014
- 6706 views
Wow, I'm astonished that someone actually still uses that. I'll see if I can implement your requests. What do you think is better for storing persistent information: a file or the Windows registry?
3. Re: Editor
- Posted by tbohon Dec 03, 2014
- 6689 views
I'm not a fan of futzing with the Windows registry so I'd vote elsewise.
One more favor ... line number (column numbers would be nice but finding an error without know what line number I'm on is a bit of a pain). Don't need a left margin column of line numbers, the current line number displayed somewhere on the screen would be sufficient.
I use Visual Studio 12 a lot at work and, although not a Micro$oft die-hard fan, their interface does have some nice features.
And NO RUSH! At your convenience :)
4. Re: Editor
- Posted by PeteE Dec 04, 2014
- 6669 views
- Last edited Dec 06, 2014
I've uploaded the updated editor to the RDS site, until it is approved, you can get it a beta version from my dropbox here
I'd forgotten what a pain the RichEdit control is, but the online MSDN documentation has improved considerably since I last dealt with it, so some things are working now like pressing F3 to search, F5 to run, etc.
5. Re: Editor
- Posted by bugmagnet Dec 04, 2014
- 6604 views
Hmmm ... I think we could come up with a better name for the editor. Wee??
Ok, so you mean 'little', so why not lee (little euphoria editor)?
Something else for down the track: scriptability of the editor using Euphoria.
Kind regards,
bugmagnet
6. Re: Editor
- Posted by bugmagnet Dec 04, 2014
- 6592 views
- Last edited Dec 05, 2014
By the way, wee compiles nicely with
Euphoria to C Translator v4.1.0 development 32-bit Windows, Using System Memory Revision Date: 2014-01-16 02:53:44, Id: 5783:d41527402a7aand
gcc version 4.8.1 (tdm-2)and
Ultimate Packer for eXecutables Copyright (C) 1996 - 2013 UPX 3.09w Markus Oberhumer, Laszlo Molnar & John Reiser Feb 18th 2013 File size Ratio Format Name -------------------- ------ ----------- ----------- 446734 -> 241422 54.04% win32/pe wee.exe
It loads really fast now and edits all manner of things nicely.
Good job!
Thanks,
bugmagnet
7. Re: Editor
- Posted by bugmagnet Dec 05, 2014
- 6567 views
BTW, I'm now getting wee_conf.txt files everywhere where I've edited a file. Is that deliberate or should the conf file hang with the binary or in some subfolder of %USERROFILE%\AppData ?
bugmagnet
8. Re: Editor
- Posted by PeteE Dec 05, 2014
- 6570 views
BTW, I'm now getting wee_conf.txt files everywhere where I've edited a file. Is that deliberate or should the conf file hang with the binary or in some subfolder of %USERROFILE%\AppData ?
I guess it is putting it in the current directory, since I didn't use a specific path. I'll look into putting it into the AppData folder.
9. Re: Editor
- Posted by bugmagnet Dec 05, 2014
- 6573 views
Another BTW: if you edit a non-eu file and then F5 it, not only does the file not run, but it kills wee as well.
bugmagnet
10. Re: Editor
- Posted by bugmagnet Dec 05, 2014
- 6560 views
And ... I just got a "Edit Control: EN_MAXTEXT received". Is that settable somewhere?
Kind regards,
bugmagnet
11. Re: Editor
- Posted by PeteE Dec 05, 2014
- 6594 views
And ... I just got a "Edit Control: EN_MAXTEXT received". Is that settable somewhere?
Not really, it seems to be an internal limitation to the richedit control. It sends the message when the richedit buffer needs to be enlarged, but the text you were trying to paste or type still gets truncated. Not sure how to fix it yet.
I made some fixes to the ShellExecute, it should work better for any document type, as long as the file associations exist.
Appdata is used for the wee_conf.txt now.
Get it here
I also noticed that Jean-Marc DURO posted an update to WEE last week, with some useful new features. I should have started with that as the base, but I could try merging it with his permission.
13. Re: Editor
- Posted by bugmagnet Dec 05, 2014
- 6536 views
VERY nice work. I just associated the mLite interpreter with .m scripts (as below in an admin shell), edited a script, pressed F5 and got the right response from the mLite interpreter. Now all we need to do is detect a crash and parse the error, and be able to pass parameters to the script.
ftype mlite=c:\bin\mlite.exe -i - -f "%1" %* assoc .m=mlite
Suitably impressed,
bugmagnet
14. Re: Editor
- Posted by jmduro Dec 05, 2014
- 6516 views
Hi Pete,
I sent you my last improvements by mail: status bar and routines list. I would be honored if you used some of them in your WEE!
Regards
Jean-Marc
Nota: I used Jason Mirwald's Rich Editor as a base for those changes.
15. Re: Editor
- Posted by PeteE Dec 06, 2014
- 6507 views
Hi Jean-Marc,
I got your updated editor in my email, thanks. I see you put the subroutines in a list on the left side of the editor window. I had intended for the View Subs F2 option to pop up a list dialog and selecting an item moves the cursor to that subroutine. If you've ever used old QuickBasic, it works similar to that.
You can try it out here.
16. Re: Editor
- Posted by jmduro Dec 06, 2014
- 6452 views
Hi Pete,
I'm 54 so yes I used Quick Basic many ears ago and I still have a copy of it. I built one and only program in Quick Basic to drive an acquisition board.
According to subroutines, it is a work in progress. I didn't have time to make it permanent and remove the menu option as I first intended to do. I needed also to make it react on click to point to the correponding line in hedit.
Then I thought of a hidable list which could either display line numbers or subroutines while adapting its width and background color to both cases.
Regards
Jean-Marc
17. Re: Editor
- Posted by jmduro Dec 06, 2014
- 6446 views
After changing includes to get it running on OpenEuphoria 4.0.5, I get errors when run:
'SystemParametersInfo' (WEE.EXW:663) has not been declared. 'SPI_GETNONCLIENTMETRICS' (WEE.EXW:664) has not been declared. 'CreateFontIndirect' (WEE.EXW:669) has not been declared.
I will have to find correponding declarations to try it out.
Regards
Jean-Marc
18. Re: Editor
- Posted by jmduro Dec 06, 2014
- 6404 views
I got it working after adding following lines to Window.ew:
CreateFontIndirect = define_c_func( gdi32, "CreateFontIndirectA", {C_LONG}, C_LONG ), SystemParametersInfo = define_c_func( user32, "SystemParametersInfoA", {C_INT, C_INT, C_POINTER, C_INT}, C_LONG ),
global constant SPI_GETNONCLIENTMETRICS = 41
A click on a routine should send to the following line in hedit, and I thnk the best way would be to store the corresponding line number with the routine name. Jason Mirwald did it another way and he pointed sometimes on wrong lines.
Regards
Jean-Marc
19. Re: Editor
- Posted by jmduro Dec 06, 2014
- 6397 views
I didn't realize that wiew_subroutines pointed to the right line in hedit.
I took your last version with minor modifications for my needs:
- status bar Microsoft way
- run_start from the previous release because .ex and .exw are associated with the editor and not with ex or exw
- fixedsys font (I'm getting old)
- includes and syntax coloring for OpenEuphoria 4
Thoses changes are in the release I sent you yesterday.
Yet I have my new Euphoria editor in replacement of Mike's editor (Medit) which is not adapted to OpenEuphoria 4.
For Linux, I use wxEditor.
Best Regards
Jean-Marc
20. Re: Editor
- Posted by bugmagnet Dec 06, 2014
- 6374 views
Do we have a new version of wee? I just downloaded a recent one (wee.exe 06/12/2014 12:22 AM) from this thread and tried to compile it with 4.1.0. I got
C:\Users\BruceAxtens\Downloads\wee>euc -gcc WEE.EXW Build directory: build-216646\ C:\Users\BruceAxtens\Downloads\wee\WEE.EXW:665 <0074>:: Errors resolving the following references: 'SystemParametersInfo' (WEE.EXW:655) has not been declared. 'SPI_GETNONCLIENTMETRICS' (WEE.EXW:656) has not been declared. 'CreateFontIndirect' (WEE.EXW:661) has not been declared. 'CreateFontIndirect' (WEE.EXW:662) has not been declared. 'CreateFontIndirect' (WEE.EXW:663) has not been declared. 'CreateFontIndirect' (WEE.EXW:664) has not been declared. 'CreateFontIndirect' (WEE.EXW:665) has not been declared. messageFont = c_func(CreateFontIndirect, {ncm+lfMessageFont}) ^
Looking forward to the next stable version.
Bugmagnet
21. Re: Editor
- Posted by PeteE Dec 06, 2014
- 6426 views
Sorry about the missing functions, I forgot to drag window.ew to the zip file. Jean-Marc, you have the correct fixes. I was trying to make use anti-aliased fonts for the dialog buttons and cursor position.
I updated the wee.zip in my dropbox.
There's a few things I would still like to add:
- select editor font and put it in conf file
- autoindent new lines
- multiple file open (tab control?)
- syntax highlighting on the fly
22. Re: Editor
- Posted by PeteE Dec 06, 2014
- 6394 views
New version here
Multiple open in tabs seems to be working ok. It creates a new richedit control for each tab and shows only the one for the currently selected tab. Tabs can be selected by pressing Alt+1..9 like in QB/EE.
The font can be selected, and it gets saved in the configuration file.
23. Re: Editor
- Posted by dr_can Dec 07, 2014
- 6248 views
As issued "Start" on the "Run" menu calls ex or exw for Euphoria code, picking up the links from "run_extensions". I have added to my copy a submenu of "Run" to enable the user to select OE4 options instead, thus widening the scope of the editor and making it more likely that a new user will adopt it. There is, indeed, a case for changing to OE4 only, if that is the main purpose of the updating.
24. Re: Editor
- Posted by dcuny Dec 07, 2014
- 6243 views
Very nice!
That means I've got a wish list for it.
- Highlight the line with an error in some way.
- Automatically load/reload ex.err in one of the tabs after running.
- An API for an intellisense list
- An API for hints
Line numbers are good for lots of things, including highlighting errors. You might be able to do this by adjusting the size of the editable portion to make room for a line number column. You'd have to manually draw the line numbers, but you could then support other stuff, like special symbols indicating lines with errors and so forth.
If you're interested, I've got the beginnings of a parser that can get all sorts of useful information from a file - all the functions and procedures, the parameter lists, the declarations, and so on. It doesn't support the full syntax for variable declarations (comma delimited declarations are incomplete), but it's a start. It doesn't handle any of the new namespace stuff, either. I think it could work well as the backend to intellisense or an auto-complete.
- David
25. Re: Editor
- Posted by PeteE Dec 07, 2014
- 6208 views
Very nice!
That means I've got a wish list for it.
- Highlight the line with an error in some way.
- Automatically load/reload ex.err in one of the tabs after running.
I feel this is already handled well enough by the View->Goto Error F4 option - it shows a MessageBox with the error message and moves the cursor to the line with the error.
- An API for an intellisense list
- An API for hints
Line numbers are good for lots of things, including highlighting errors. You might be able to do this by adjusting the size of the editable portion to make room for a line number column. You'd have to manually draw the line numbers, but you could then support other stuff, like special symbols indicating lines with errors and so forth.
I dislike having line numbers on the side, and other visual noise, but if you can strongly persuade me and suggest an easy way to do so, I'll consider it.
If you're interested, I've got the beginnings of a parser that can get all sorts of useful information from a file - all the functions and procedures, the parameter lists, the declarations, and so on. It doesn't support the full syntax for variable declarations (comma delimited declarations are incomplete), but it's a start. It doesn't handle any of the new namespace stuff, either. I think it could work well as the backend to intellisense or an auto-complete.
I would very much like to have a look, please email it to my gmail address, if you don't mind. I have my own ideas on how to handle the parsing and symbol table, but it would be nice to have a starting point. I'll have to investigate the namespace and forward references in 4.0 as well, since my mind is still set in the 3.1 ways.
26. Re: Editor
- Posted by dcuny Dec 07, 2014
- 6247 views
- Last edited Dec 08, 2014
I feel this is already handled well enough by the View->Goto Error F4 option - it shows a MessageBox with the error message and moves the cursor to the line with the error.
If it automatically did this when returning from running a program, that would be great. But I don't currently see that when I tried it out.
I dislike having line numbers on the side, and other visual noise, but if you can strongly persuade me and suggest an easy way to do so, I'll consider it.
I find them a nice crutch. Sometimes I feel I'm in the middle of a bunch of lines of code that all look alike. Not a compelling argument, I know.
There should be a nice way to flag errors, and putting a marker to the side is my current favorite.
I also like how editors like TypeScript, Eclipse and Visual Studio put lines inside of the scrollbar to mark where error lines are. It makes it a lot faster to find them. I'm not sure if the win32 allows overriding this in a nice way.
I would very much like to have a look, please email it to my gmail address, if you don't mind. I have my own ideas on how to handle the parsing and symbol table, but it would be nice to have a starting point. I'll have to investigate the namespace and forward references in 4.0 as well, since my mind is still set in the 3.1 ways.
That's all it was intended as - a starting point. I don't have your gmail address.
Edit: Got your email! Thanks!
- David
27. Re: Editor
- Posted by bugmagnet Dec 08, 2014
- 6169 views
Something else nice to have: detection of the file being changed while the editor is running. I just had a file opened which I edited in wee on my machine and then via RDP on a server. As it was, no big deal that I saved over my changes. But it could have been a big deal.
Kind regards,
bugmagnet
28. Re: Editor
- Posted by PeteE Dec 08, 2014
- 6167 views
Agreed, I've stomped my own changes outside the editor once already too. I looked into using FindFirstChangeNotification, but it seems like it would require a separate thread, since it you have to wait for an event using WaitForSingleObject. Another option would be to check for file changes when the main window gains focus and pop up a messagebox with an option to reload it. Now that I think about it, it could also check for modifications to ex.err in the directory of the last run program, and pop up the error message automatically.
29. Re: Editor
- Posted by jimcbrown (admin) Dec 08, 2014
- 6120 views
I looked into using FindFirstChangeNotification, but it seems like it would require a separate thread, since it you have to wait for an event using WaitForSingleObject.
Looking at the example your link provides, http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx , it seems that using a helper child process (a helper program that simply runs, waits on a single file passed on its command line, then somehow asychonously signals the parent process when the wait is over) should work too. The IPC part would be a pain, but it's not like you have to share memory addresses between two different threads of execution in this case...
30. Re: Editor
- Posted by dcuny Dec 08, 2014
- 6090 views
Another option would be to check for file changes when the main window gains focus and pop up a messagebox with an option to reload it. Now that I think about it, it could also check for modifications to ex.err in the directory of the last run program, and pop up the error message automatically.
I like this. Notepad++ also checks (on return of focus) if the files even still exist.
- David
31. Re: Editor
- Posted by PeteE Dec 09, 2014
- 6098 views
Checking the files on window focus is what I went with. Not perfect, as it gains focus when its own dialog windows are closed, oh well. It also watches for ex.err too in the same directory as the most recent file run.
Download here
There's a weird bug with saving the recent files positions, it's driving me nuts. Please ignore the new non-functional View menu items for now, not implemented yet, but I'm working on it.
32. Re: Editor
- Posted by bugmagnet Dec 10, 2014
- 6129 views
If I give it the name of file that doesn't exist, could it create it for me? Currently I have to create the file before I can edit it with wee.
Bugmagnet
33. Re: Editor
- Posted by PeteE Dec 11, 2014
- 5941 views
If I give it the name of file that doesn't exist, could it create it for me? Currently I have to create the file before I can edit it with wee.
Okay, I have that and a few new things, so I figured an update was in order. I took the parser from the interpreter I was working on back in May and made it handle most of Euphoria syntax, producing a full AST with symbol location and scope information. With this I have implemented Goto Declaration (Ctrl+F2) and Code Completion (Ctrl+Space). It only works for the current file, and it doesn't handle includes or namespaces yet. I haven't tested it too much, and it may crash the editor, so I made a crash routine for saving your files. :)
Download 0.08 here
34. Re: Editor
- Posted by bugmagnet Dec 11, 2014
- 5811 views
I would like to cast my vote that WEE be included in the standard OpenEuphoria distro, either in addition to ed.ex or, preferred, replacing ed.ex
Bugmagnet
35. Re: Editor
- Posted by K_D_R Dec 12, 2014
- 5659 views
Under Ubuntu 14.1/wine
Syntax coloring worked under wee 05 - lost in subsequent versions.
Good luck with your project!.
Ken
36. Re: Editor
- Posted by dcuny Dec 17, 2014
- 5488 views
Cutting and pasting between Eclipse and wee, I notice that the font and color coding are retained. Not a big deal - closing and reloading takes care of it. But perhaps it's something to keep in mind.
This is a repeat, but the biggest thing I'm missing in wee is help with common routines that I haven't yet included.
For example, I wrote:
atom baz = sin(frq * 2 * PI)
And wee color-coded sin (as above), indicating that it knew that sin was a common routine... But the compiler complains that I haven't declared it yet.
Here's a feature suggestion for wee:
- Scan my file for includes to see which files I'm including
- Scan my file for routines that are part of the OpenEuphoria core
- Present me with a list of missing includes, and what routines are associated with them
- Allow me to select which include files I want, or just Include All
37. Re: Editor
- Posted by PeteE Dec 17, 2014
- 5428 views
Cutting and pasting between Eclipse and wee, I notice that the font and color coding are retained. Not a big deal - closing and reloading takes care of it. But perhaps it's something to keep in mind.
I agree, there should be a way of stripping the formatting of code that is pasted into a RichEdit control. I tried doing EM_SETTEXTMODE, TM_PLAINTEXT but that didn't help, and it caused the problem Ken found running it in Wine. I then failed to find way to get notified when the text is modified, and the character range of the modified text. I keep getting the impression (over and over) that the RichEdit control is a poor choice for an IDE. Is the wxWindows edit control any better?
Here's a feature suggestion for wee:
- Scan my file for includes to see which files I'm including
- Scan my file for routines that are part of the OpenEuphoria core
- Present me with a list of missing includes, and what routines are associated with them
- Allow me to select which include files I want, or just Include All
I've made some progress on include files and namespaces, and I think I've got them figured out now, I'll post the code once I have done more testing. This covers the first item, and the editor now shows all declarations in visible scope for autocompletion, and can detect undefined symbols.
For the second item, the editor should, on startup, parse all the includes in the default include directory and make a list of the library routines for highlighting (this is why I've not updated them for 4.0 yet). I just realized that I'll need to add support for "ifdef", "elsedef" and "end ifdef" to parse OE4 std includes. Is there a way at runtime to dynamically know what keywords are defined? I don't see how, maybe I'll just hardcode a list.
For the third item, when do you want to be presented with the list of includes? On autocompleting symbols, view declaration or a third new option "view undefined references"? Or even as you type? (would need the change notification working for this)
I really should put this project on github so that you can file tickets, forks, and pull requests. :)
38. Re: Editor
- Posted by dcuny Dec 17, 2014
- 5459 views
For the third item, when do you want to be presented with the list of includes? On autocompleting symbols, view declaration or a third new option "view undefined references"? Or even as you type? (would need the change notification working for this)
Well, I'm used to how Eclipse does it, which is to underline symbols with issues. Right clicking brings up a helpful context menu, which offers options functionally equivalent to:
- include method foo() from bazz.e
- include method foo() from frotz.e
- create method foo()
and so on.
Because Java has lots of potential conflicts (i.e., the routine foo() may exist in multiple "core" classes), Eclipse needs to list the potential include files and have the user select. I think it's less an issue in Euphoria. This usually takes a couple of clicks to take care of all the instances, but it's mostly painless, and Eclipse underlines errors on the fly, so you can actually take care of them right away.
But a simpler method would be to have a menu option (or hotkey) that would just perform the behavior when triggered.
The first would be much cooler, but the second would be easier to implements Real Soon, because you'd only need a list of default routines and the includes the are associated with. The first requires adding dynamic underlining, and popup help - all which I'd eventually love to have... And once you start adding those, my wish list is going to get even longer!
But right now, it's just an irritation to have to constantly go to the web to figure what libraries cos() and rnd() live in.
39. Re: Editor
- Posted by bugmagnet Dec 18, 2014
- 5244 views
You may want to crash more gracefully than this:
Fatal run-time error: Your program has run out of memory. One moment please...Okay, I asked for that ... tried to edit a 370,465,262 byte file.
bugmagnet
40. Re: Editor
- Posted by PeteE Dec 19, 2014
- 5213 views
You may want to crash more gracefully than this:
Fatal run-time error: Your program has run out of memory. One moment please...Okay, I asked for that ... tried to edit a 370,465,262 byte file.
bugmagnet
Yeah you asked for it! Euphoria just goes "NOPE" when it tries to make a sequence that large.
In other news, I'm ditching the RichEdit control and moving to Scintilla. I'm excited to see if it will work on Linux and OS X too.
41. Re: Editor
- Posted by bugmagnet Dec 19, 2014
- 5262 views
Okay, I asked for that ... tried to edit a 370,465,262 byte file.
Yeah you asked for it! Euphoria just goes "NOPE" when it tries to make a sequence that large. ... I'm ditching the RichEdit control and moving to Scintilla.
Makes me wonder what will happen to my BOLE B4J project if I read in a huge file. Shall have to check ...
java.lang.OutOfMemoryError: Java heap space
Erk!
bugmagnet
42. Re: Editor
- Posted by ghaberek (admin) Dec 19, 2014
- 5237 views
Is the wxWindows wxWidgets edit control any better?
It hasn't been "wxWindows" in ten years.
And yes, it is. The wxRichTextCtrl is "a generic, ground-up implementation of a text control capable of showing multiple styles and images" and the wxStyledTextCtrl is based on Scintilla. wxStyledTextCtrl is not, however, yet wrapped in wxEuphoria. Its API is quite, well... bloated, to say the least (then again, so is wxRichTextCtrl). But we're working on that.
-Greg
43. Re: Editor
- Posted by PeteE Dec 24, 2014
- 4803 views
- Last edited Dec 30, 2014
Sorry it's been so long since the last update. I have finished switching over to the Scintilla edit control, and finally got things working as well as before with the RichEdit control. Thanks to the Scintilla lexer, the syntax highlighting now updates automatically, though I cheated and used the Lua lexer instead of writing a custom one for Euphoria. The View Declaration (Ctrl-F2) and Auto-completion (Ctrl-Space) now work in include files, and auto-complete will suggest routines from the standard library includes. The first auto-complete will have a slight delay while the include directory is parsed, but are cached from then on. The autocomplete uses the Scintilla list popup, which is niftier than a modal dialog. Also pressing Shift-F2 on a subroutine call should popup a CallTip with argument types and names, with default arguments in square brackets; eventually I'd like it to pop up automatically and highlight the argument position of the cursor. I apologize for any bugs or crashes, there's still a lot of polishing to do.
Download Version 0.09 here.
44. Re: Editor
- Posted by dcuny Dec 24, 2014
- 4729 views
Cool!
And I managed to lock it up within a minute of mashing the keys! Now when I launch it, it appears in the task bar, but no editor shows up. Interesting. I'll see if logging out fixes it.
One nice feature would be auto arg list display. That is, when you type a open parenthesis, have wee check to see if the prior token is a function or procedure call - basically act like you pressed F2 or Ctrl+F2 (I can't remember which key combination it was).
- David
45. Re: Editor
- Posted by PeteE Dec 24, 2014
- 4653 views
David, thanks for testing, and I'm sorry you had a problem with it locking up. If it happens again, please get a screenshot so I can see what was typed that got it stuck. To try to fix the problem with the window not appearing, try deleting the file /Users/Username/AppData/Local/wee_conf.txt. Maybe the window size was saved to zeros?
46. Re: Editor
- Posted by dcuny Dec 24, 2014
- 4640 views
If it happens again, please get a screenshot so I can see what was typed that got it stuck.
No worries; I expect the code to crash and burn at this point.
I think it was something like:
baz( -- include bazzz.e
The insert worked, but I was probably pushing some permutation of Meta+F2 at the time it lockedup.
I'll look in the config file to see what's there before deleting it.
Thanks for the early Christmas present!
47. Re: Editor
- Posted by dcuny Dec 26, 2014
- 4436 views
Anything in the config file strike you as odd here?
x_pos=4294935296 y_pos=4294935296 x_size=160 y_size=38You might want to add some sanity checks in.
- David
48. Re: Editor
- Posted by ryanj Dec 26, 2014
- 4452 views
Anything in the config file strike you as odd here?
x_pos=4294935296 y_pos=4294935296 x_size=160 y_size=38You might want to add some sanity checks in.
- David
I don't if this is helpful, but i use this to get the display size:
xGetSystemMetrics = link_c_func(user32, "GetSystemMetrics", {C_INT}, C_INT) constant SM_CXSCREEN = 0, SM_CYSCREEN = 1 public function getPrimaryDisplaySize() --get size of primary display atom cx, cy cx = c_func( xGetSystemMetrics, { SM_CXSCREEN } ) cy = c_func( xGetSystemMetrics, { SM_CYSCREEN } ) return {cx, cy} end function
49. Re: Editor
- Posted by SunPsych08 Dec 29, 2014
- 4164 views
Hello,
I'd like to ask a question about how to open and run wee in Windows.
I've got Eu4.0.5 in c:\euphoria
I've unzipped wee to c:\euphoria\wee (Is that the best place to put it, BTW?)
I see wee.exw and two include files (syncolor.e and window.ew)
I open wee.exw and can enter some code, but I don't see any syntax highlighting or autocompletion.
Can someone please tell me what to do next?
Thank you,
Alex
50. Re: Editor
- Posted by PeteE Dec 30, 2014
- 4074 views
Hi Alex,
The version with the Scintilla control, syntax highlighting, code completion (Ctrl-Space) is Version 0.09 in post 43 above. I'm hoping to have time to work on it again later this week after I'm done traveling with my family.
51. Re: Editor
- Posted by evanmars Dec 30, 2014
- 4049 views
- Last edited Dec 31, 2014
If I press Ctrl+F2 Declarations when the cursor is in white space, Wee crashes on me. I get a message box stating: "Internal editor error occurred."
Wee 0.09, OE 4.0.5
C:\Euphoria\wee\ui_win.e:587 in procedure view_declaration() subscript value 2 is out of bounds, reading from a sequence of length 1 ... called from C:\Euphoria\wee\ui_win.e:1128 in function WndProc() ^^^ call-back from Windows ... called from C:\Euphoria\wee\ui_win.e:1409 in procedure WinMain() ... called from C:\Euphoria\wee\ui_win.e:1417 --> See ex.err
52. Re: Editor
- Posted by SunPsych08 Dec 30, 2014
- 4009 views
Hi Alex,
The version with the Scintilla control, syntax highlighting, code completion (Ctrl-Space) is Version 0.09 in post 43 above. I'm hoping to have time to work on it again later this week after I'm done traveling with my family.
Thank you Pete. I've got it now. Just BTW, i tried to change the font to Verdana regular 10, but was unable to make the change persist; it kept reverting to Verdana regular 8. It isn't a big issue, but i'm wondering if the problem is me, the system, or something inherent in ee. Many thanks for making ee available
Alex
53. Re: Editor
- Posted by PeteE Jan 04, 2015
- 3729 views
Alex, I wasn't able to figure out what the problem with the font size was. I did made it update the editor windows after a change, so hopefully that was the issue. If not, look at the contents of \Users\yourname\AppData\Local\wee_conf.txt after changing the font and closing the editor.
Evan, this version fixes the crash with Ctrl-Space on whitespace, among other things.
Download version 0.10 here
55. Re: Editor
- Posted by Ekhnat0n Jan 12, 2015
- 3113 views
Why not choose some available advanced editors for each platform?
Like eg Kate under Linux.
and EditPlus under Windows
The only thing we would have to do
is write a table of commands/functions/constants etc. for it to make it work perfectly.
56. Re: Editor
- Posted by SunPsych08 Jan 13, 2015
- 3098 views
Alex, I wasn't able to figure out what the problem with the font size was. I did made it update the editor windows after a change, so hopefully that was the issue. If not, look at the contents of \Users\yourname\AppData\Local\wee_conf.txt after changing the font and closing the editor.
Evan, this version fixes the crash with Ctrl-Space on whitespace, among other things.
Download version 0.10 here
Thanks Pete
All good - no problem with font size now.
Regards,
Alex
57. Re: Editor
- Posted by ghaberek (admin) Jan 13, 2015
- 2990 views
The only thing we would have to do
is write a table of commands/functions/constants etc. for it to make it work perfectly.
You can get a function list in Notepad++.
http://openeuphoria.org/forum/125935.wc
-Greg
58. Re: Editor
- Posted by dcuny Jan 19, 2015
- 2709 views
I just updated to the latest version of Euphoria (x64) by copying the files to the bin directory, and grabbed the 0.1 version of wee.
failed to open scintilla DLL C:\Users\[REDACTED]\Desktop\wee-0.10(2)\wee\scintilla.e:33 attempt to divide by 0 --> See ex.err Press Enter...I'm not sure if this is a dll issue, a Euphoria 4.1.x issue, a 64 bit issue, or what...
Hrm... ed appears to be broken as well:
C:\Users\[REDACTED]\Desktop\[MY_PROJECT]>ed C:\euphoria\bin\ed.ex:547 <0158>:: Wrong number of arguments supplied for forward reference C:\euphoria\bin\ed.ex (547): function SyntaxColor. Expected 2, but found 4. color_line = SyntaxColor(this_line, ,get_multiline( bline - 1 ))
EDIT: I reinstalled the prior version of Euphoria from scratch, and wee and ed now work. So it's something with the new version.
- David
59. Re: Editor
- Posted by PeteE Jan 19, 2015
- 2687 views
I just updated to the latest version of Euphoria (x64) by copying the files to the bin directory <snip>
The scintilla DLL is 32-bit, so that's why it can't load in x64 Euphoria. The code WEE is based on makes many assumptions about running on 32-bit, so it won't run on 64-bit without modification. There is also a bug in the 64-bit Euphoria releases before Nov 2014, where pointer arguments to a callback get truncated, I'm not aware of any fixed releases yet. In short, please use 32-bit Euphoria.
60. Re: Editor
- Posted by dcuny Jan 19, 2015
- 2680 views
The scintilla DLL is 32-bit, so that's why it can't load in x64 Euphoria. The code WEE is based on makes many assumptions about running on 32-bit, so it won't run on 64-bit without modification. There is also a bug in the 64-bit Euphoria releases before Nov 2014, where pointer arguments to a callback get truncated, I'm not aware of any fixed releases yet. In short, please use 32-bit Euphoria.
Great information! That way I can use the de-sequence operation and wee.
- David
61. Re: Editor
- Posted by dcuny Jan 19, 2015
- 2631 views
wee crashes fairly regularly after running and reloading ex.err:
[SNIP]\ui_win.e:292 in function open_file() can't open -- too many open files open_file = "MY FILE NAME" reload = 1 result = <no value> text_buffer = <no value> fn = <no value> tab = 4 temp = <no value> s = <no value> text = {} ... called from [PATH]\ui_win.e:433 in procedure check_externally_modified_tabs() ... called from [PATH]\ui_win.e:1024 in function WndProc() ^^^ call-back from Windows ... called from [PATH]\ui_win.e:1118 in function WndProc() ^^^ call-back from Windows ... called from [PATH]\ui_win.e:748 in procedure view_error() ... called from [PATH]\ui_win.e:771 in procedure check_ex_err() ... called from [PATH]\ui_win.e:1023 in function WndProc() ^^^ call-back from Windows ... called from [PATH]\ui_win.e:1118 in function WndProc() ^^^ call-back from Windows ... called from [PATH]\ui_win.e:1355 in procedure WinMain() ... called from [PATH]\ui_win.e:1370Not a big deal, since I can just reload and start up again.
- David
62. Re: Editor
- Posted by mattlewis (admin) Jan 20, 2015
- 2577 views
I just updated to the latest version of Euphoria (x64) by copying the files to the bin directory, and grabbed the 0.1 version of wee.
...
Hrm... ed appears to be broken as well:
The standard library had some significant changes between 4.0 and 4.1. Simply copying the binaries isn't going to work (at least not for the 64-bit version).
There is also a bug in the 64-bit Euphoria releases before Nov 2014, where pointer arguments to a callback get truncated, I'm not aware of any fixed releases yet.
Is there a ticket? I don't see anything obvious in there already. Do you have a minimal reproduction of the bug?
Matt
63. Re: Editor
- Posted by PeteE Jan 20, 2015
- 2516 views
There is also a bug in the 64-bit Euphoria releases before Nov 2014, where pointer arguments to a callback get truncated, I'm not aware of any fixed releases yet.
Is there a ticket? I don't see anything obvious in there already. Do you have a minimal reproduction of the bug?
Matt
You fixed it here
64. Re: Editor
- Posted by mattlewis (admin) Jan 20, 2015
- 2514 views
There is also a bug in the 64-bit Euphoria releases before Nov 2014, where pointer arguments to a callback get truncated, I'm not aware of any fixed releases yet.
Is there a ticket? I don't see anything obvious in there already. Do you have a minimal reproduction of the bug?
Matt
You fixed it here
D'oh! I get it now. Eubins are down, so if you want the fix you have to build your own.
Matt