1. Editor

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

new topic     » topic index » view message » categorize

2. Re: Editor

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?

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

3. Re: Editor

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 :)

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

4. Re: Editor

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.

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

5. Re: Editor

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

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

6. Re: Editor

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:d41527402a7a 
and
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

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

7. Re: Editor

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

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

8. Re: Editor

bugmagnet said...

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.

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

9. Re: Editor

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

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

10. Re: Editor

And ... I just got a "Edit Control: EN_MAXTEXT received". Is that settable somewhere?

Kind regards,
bugmagnet

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

11. Re: Editor

bugmagnet said...

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.

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

12. Re: Editor

Nice work. Thanks.

bugmagnet.

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

13. Re: Editor

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

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

14. Re: Editor

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.

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

15. Re: Editor

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.

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

16. Re: Editor

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

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

17. Re: Editor

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

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

18. Re: Editor

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

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

19. Re: Editor

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

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

20. Re: Editor

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

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

21. Re: Editor

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
new topic     » goto parent     » topic index » view message » categorize

22. Re: Editor

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.

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

23. Re: Editor

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.

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

24. Re: Editor

Very nice!

That means I've got a wish list for it. smile

  • 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

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

25. Re: Editor

dcuny said...

Very nice!

That means I've got a wish list for it. smile

  • 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.

said...
  • 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.

said...

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.

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

26. Re: Editor

PeteE said...

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.

PeteE said...

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.

PeteE said...

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. sad

Edit: Got your email! Thanks!

- David

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

27. Re: Editor

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

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

28. Re: Editor

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.

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

29. Re: Editor

PeteE said...

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...

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

30. Re: Editor

PeteE said...

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

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

31. Re: Editor

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.

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

32. Re: Editor

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

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

33. Re: Editor

bugmagnet said...

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

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

34. Re: Editor

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

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

35. Re: Editor

Under Ubuntu 14.1/wine

Syntax coloring worked under wee 05 - lost in subsequent versions.

Good luck with your project!.

Ken

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

36. Re: Editor

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:

  1. Scan my file for includes to see which files I'm including
  2. Scan my file for routines that are part of the OpenEuphoria core
  3. Present me with a list of missing includes, and what routines are associated with them
  4. Allow me to select which include files I want, or just Include All
new topic     » goto parent     » topic index » view message » categorize

37. Re: Editor

dcuny said...

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?

said...

Here's a feature suggestion for wee:

  1. Scan my file for includes to see which files I'm including
  2. Scan my file for routines that are part of the OpenEuphoria core
  3. Present me with a list of missing includes, and what routines are associated with them
  4. 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. :)

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

38. Re: Editor

PeteE said...

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. smile

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

39. Re: Editor

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

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

40. Re: Editor

bugmagnet said...

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.

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

41. Re: Editor

PeteE said...
bugmagnet said...

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

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

42. Re: Editor

PeteE said...

Is the wxWindows wxWidgets edit control any better?

It hasn't been "wxWindows" in ten years. smile

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

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

43. Re: Editor

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.

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

44. Re: Editor

Cool!

And I managed to lock it up within a minute of mashing the keys! blink 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

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

45. Re: Editor

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?

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

46. Re: Editor

PeteE said...

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! smile

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

47. Re: Editor

Anything in the config file strike you as odd here?

x_pos=4294935296 
y_pos=4294935296 
x_size=160 
y_size=38 
You might want to add some sanity checks in. blink

- David

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

48. Re: Editor

dcuny said...

Anything in the config file strike you as odd here?

x_pos=4294935296 
y_pos=4294935296 
x_size=160 
y_size=38 
You might want to add some sanity checks in. blink

- 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 
new topic     » goto parent     » topic index » view message » categorize

49. Re: Editor

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

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

50. Re: Editor

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.

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

51. Re: Editor

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 

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

52. Re: Editor

PeteE said...

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 smile

Alex

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

53. Re: Editor

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

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

54. Re: Editor

Thanks Pete

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

55. Re: Editor

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.

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

56. Re: Editor

PeteE said...

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

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

57. Re: Editor

Ekhnat0n said...

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++. blink

http://openeuphoria.org/forum/125935.wc

-Greg

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

58. Re: Editor

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

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

59. Re: Editor

dcuny said...

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.

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

60. Re: Editor

PeteE said...

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

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

61. Re: Editor

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:1370  
Not a big deal, since I can just reload and start up again.

- David

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

62. Re: Editor

dcuny said...

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).

PeteE said...

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

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

63. Re: Editor

mattlewis said...
PeteE said...

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

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

64. Re: Editor

PeteE said...
mattlewis said...
PeteE said...

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu