flat assembler
Message board for the users of flat assembler.

Index > IDE Development > FASMW with the new AsmEdit

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 15:51
Here's the first pre-release of the new FASMW, with almost completely rewritten AsmEdit control (it will become AsmEdit 2.0 when it's finished, but I even haven't decided for the final set of features for that version). All operations on text were rewritten from scratch, and now they need testing.

I have already tested it with 25 MB dump of this board's SQL database (318098 lines, 31041 characters in the longest line) and it worked fine.

Attachment removed - not it's official release


Last edited by Tomasz Grysztar on 30 Jul 2004, 16:04; edited 7 times in total
Post 26 Jul 2004, 15:51
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 26 Jul 2004, 18:29
Hi Tomasz.
Good work.
At first sight, one little misbehaviour: The right mouse click, opening popup menu, have to move the caret also to the place of the click. This is important in case you choose from the menu some functions that modifies the text - like paste for example.

Regards.
Post 26 Jul 2004, 18:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 18:37
But this way you would cancel the selection, while you would want to select "Cut" or "Delete" from that menu.
Post 26 Jul 2004, 18:37
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 26 Jul 2004, 18:54
Privalov wrote:
But this way you would cancel the selection, while you would want to select "Cut" or "Delete" from that menu.


Yea, I know, but AFAIR, I fixed this problem somehow in Fresh modified version of AsmEdit. You can check the sources - the main idea was, that it moves caret, only if there is no selected text.
Post 26 Jul 2004, 18:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 18:58
Isn't it too confusing? When caret/selection is somewhere out of window, the result of such click would be unpredictable.
Post 26 Jul 2004, 18:58
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 26 Jul 2004, 19:14
Privalov wrote:
Isn't it too confusing? When caret/selection is somewhere out of window, the result of such click would be unpredictable.


Well, 'paste', where the text apears somewhere else is confusing too. There should be proper behaviour that to satisfy all problems. btw: IMO, if the selection is out of the screem, it will be absolutely OK if right click cancels the selection, because in the other case, there may be massive, obscured, lost of text.
Post 26 Jul 2004, 19:14
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 26 Jul 2004, 19:35
Privalov, would it be difficult to implement bookmark support in FASMW? I see you are using constants for segment length, and header length, etc. So it should be possible to stick a bookmarked flag in the header?
Support for bookmarks would be greatly appreciated.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 26 Jul 2004, 19:35
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 26 Jul 2004, 19:36
IMHO,
When there is a selection and:
- right-click on editor:
- asmedit context menu pops up.
- selection holds unless cut/delete is selected.
- caret remains at position before click.

- right-click outside editor:
- other-object context menu pops up.
- selection holds as has nothing to do with menu popped-up.
- caret remains at position before click.
Post 26 Jul 2004, 19:36
View user's profile Send private message Yahoo Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 19:55
comrade: yes, this was the reason for defining those constants, it's just that I want to reimplement all the previous AsmEdit's functionality before adding really new features.

Please test the stability of the editor, it's the most important thing right now.
Post 26 Jul 2004, 19:55
View user's profile Send private message Visit poster's website Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 26 Jul 2004, 20:48
I think that it may be done in this way (like it's done AFAIK everywhere):
then user right-clicks on editor window, you must check if it clicked inside the selection or outside it. If inside then selection must remain, otherwise it disappears. Anyway cursor moves to the click location.
Post 26 Jul 2004, 20:48
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 26 Jul 2004, 21:01
Errors I get:
1. "No enough memory to comlete operation" - then I run it and type 1st character. Clicking OK and further writing without problems.
2. Selectiong some text (MORE THEN ONE LINE), pressing some character, text replaces, selection stays visible. Do nothing with this, just pressing another key results in "Instruction ... "0x0040c503" ... "0x00000000" . ... "written".". Line 3852, asmedit.inc:
Code:
    remove_middle_lines:
        cmp     esi,[selection_line]
        je      middle_lines_removed
        call    store_segment_for_undo
        or      ebx,-1
        xchg    [esi],ebx               ; error here
        inc     [released_segments]
        call    cancel_line
        mov     esi,ebx
        btr     esi,0
        jnc     remove_middle_lines    
Post 26 Jul 2004, 21:01
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 26 Jul 2004, 21:14
After some though, I think the proper behaviour is that suggested by mike.dld with one little difference:

On WM_RBUTTONDOWN:
1. Secure selection OFF
1.1. If the mouse cursor is inside current selection: Opens popup menu without moving the caret from its current position (end of selection).
1.2. If the mouse cursor is outside the current selection: Moves the caret at mouse cursor position (thus removing selection) and then opens the popup menu.

2. Secure selection ON - At first in this case, IMHO, the caret have to have ability to be moved without canceling selection - i.e. the begin and end position of the selection have to be independent from the caret position.
2.1. in this case every right click have to move the caret at the position of the mouse cursor, the curent selection (if any) should remain unchanged.

Note: maybe it worths to not keep fixed popup menu handle, but to obtain the handle through notification message - if the user want to have context dependent popup menues for different cases.

Bug report: Maybe this is some relicts from the old version, but search function gives "Not enough memory" error window (without crashing fasmw).

Regards.
Post 26 Jul 2004, 21:14
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 21:14
mike.dld: Thanks, I have fixed the second issue, but I don't understand how did you come with the first one. The "not enough memory" message is issued when you try to do search operation, as it is not implemented yet (see the first post) and I have made it issue "out of memory" notification instead. Was it something else?
Post 26 Jul 2004, 21:14
View user's profile Send private message Visit poster's website Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 26 Jul 2004, 21:19
No, I just ran fasmw and pressed 'a' (or some other char) in the editor. The message appeared. I've choosen OK and after that no such things were occured.
Post 26 Jul 2004, 21:19
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 21:22
Are you able to reproduce it? What system are you using?
Post 26 Jul 2004, 21:22
View user's profile Send private message Visit poster's website Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 26 Jul 2004, 21:25
Yes, message appears every time I run fasm and typing first char. I'm using Windows XP.
Post 26 Jul 2004, 21:25
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 21:28
JohnFound wrote:
Secure selection ON - At first in this case, IMHO, the caret have to have ability to be moved without canceling selection - i.e. the begin and end position of the selection have to be independent from the caret position.

This would be "Persistent blocks" (as in DN), not "Secure selection" option. Might get implemented if I have time.
As for the right click, I prefer to stay with the pellailo's (in fact current) option.
Post 26 Jul 2004, 21:28
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 26 Jul 2004, 22:25
OK, thank to Mike's cooperation I have fixed that "not enough memory" issue.
Post 26 Jul 2004, 22:25
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 26 Jul 2004, 22:37
Privalov wrote:
As for the right click, I prefer to stay with the pellailo's (in fact current) option.


Your choice. Good it will be open source. Wink

Several issues from asmedit.txt file:

1. AEM_SETPOS description still mentions position 257 as maximum (have to be -1).
2. AEM_GETWORDATCARET - now the maximal size of the word is not 256 characters, so we need AEM_GETWORDLENGTH of something.
Note, that for Fresh I needed a little bit different behaviour:
Quote:
Version 1.4.4 [10.01.2004] John Found
[-] Changed behaviour of the message AEM_GETWORDATCARET.
byte [wparam+2] - if =0 the "." will be included in the word
<>0 the "." will be not included in the word
Returns: lo word of eax - position of the left edge of the word
hi word of eax - position of the right edge of the word

I needed this behaviour, because of code completition function that have to replace current word. Of course it is possible to make this through different message: AEM_GETWORDPOS for example.

3. Syntax highlighter: I though, whether it will be better not to keep tables with colors, but to make lpColors to be array of dwords and to leave syntax procedure to put inside colors instead of indexes to the palette.
At least this will make possible to have one common color handling for all ASMEdIT windows in the program without need to set the color table for every window separately.

4. AEM_SETLINE - we have AEM_GETLINE, why not to have AEM_SETLINE also? Also AEM_INSERTLINE, AEM_DELETELINE can be useful, although this functions can be emulated using EM_REPLACESEL

Some wishes, some of them are implemented in Fresh version of ASMEDIT and are absolutely necessary for using ASMEDIT with Fresh:

5. Handling of modify status. AFAIK, now modified status in FASMW is handled during EM_CANUNDO - isn't it better to make AEM_SETMODIFIED/AEM_GETMODIFIED thus making possible to have undo after save. Also, if the user want to modify the text without saving the undo information it still should be able to set text as "modified".

5. What about ES_READONLY handling?

6. Also word wrap can be very usefull

7. AEM_SETUSERDATA/AEM_GETUSERDATA (linenumber, 0) is my dream. Wink
8. AEM_GETCARETXY - returns pixel position of the caret relative to the client area of the asmedit - needed for opening code completition window on the position of the caret.

Regards.
Post 26 Jul 2004, 22:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 26 Jul 2004, 22:52
JohnFound wrote:
7. AEM_SETUSERDATA/AEM_GETUSERDATA (linenumber, 0) is my dream. Wink


Couldn't it be done by just using SetWindowLong / GetWindowLong ?
Post 26 Jul 2004, 22:52
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.