The MASM Forum

Projects => Rarely Used Projects => RadAsm IDE Support => Topic started by: Villuy on October 15, 2024, 11:33:18 PM

Title: Sources
Post by: Villuy on October 15, 2024, 11:33:18 PM
Hello, Ketil!

Thank you for posting the editor's source code. But it is hard to understand these source codes. Here is a package:

https://sourceforge.net/projects/radasm30/files/Release/ (https://sourceforge.net/projects/radasm30/files/Release/)

But as I can understand, this is very far from everything. You wrote RadASM based on FbEdit FreeBASIC and all the deep modules are located here, as I understand:

https://sourceforge.net/p/fbedit/code/HEAD/tree/RadASM30/ (https://sourceforge.net/p/fbedit/code/HEAD/tree/RadASM30/)

Where is the beginning, where is the end, what grows from where — it is not clear. Could you post in one place a complete and up-to-date package of sources with all the nested modules and the program itself of the corresponding version?

Thanks a lot!
Title: Re: Sources
Post by: KetilO on October 17, 2024, 11:52:42 PM
Hi Villuy,

The most recent souurces for RadASM30 is at:

https://sourceforge.net/projects/radasm30/files/Release/ (https://sourceforge.net/projects/radasm30/files/Release/)

It contains sources for RadASM30 and the library files for the custom controls.
Unfortunatly some custom controls are written in RadASM20, so the sources for these are not included.

Give me some time and i will convert them to RadASM30

KetilO
Title: Re: Sources
Post by: Villuy on October 18, 2024, 12:39:58 AM
Aha! There is version 3.0.0.9, there is version 3.0.1.0. They are indistinguishable externally, but code is different. Many modules are not in package at all. In general, I will wait for full authentic package 3.0.1.0. And if you leave text file there with description of what is what and for what — that will be cherry on top! )
Title: Re: Sources
Post by: NoCforMe on October 18, 2024, 08:21:42 AM
KetilO strikes me as a great programmer.
They also seem to me to be what I call a "write-only" one, where their code is almost indecipherable to anyone else looking at it. No comments. None. And cryptic variable names. (I know: some years ago I stole some stuff from your resource editor for one of my own, a totally private project. It took me a very long time to figure out what your code was actually doing.)
Title: Re: Sources
Post by: Villuy on October 18, 2024, 12:55:20 PM
Quote from: NoCforMe on October 18, 2024, 08:21:42 AMKetilO strikes me as a great programmer.
They also seem to me to be what I call a "write-only" one, where their code is almost indecipherable to anyone else looking at it. No comments. None. And cryptic variable names. (I know: some years ago I stole some stuff from your resource editor for one of my own, a totally private project. It took me a very long time to figure out what your code was actually doing.)

I think Ketil simply didn't set goal to himself that his code would be understandable to anyone else.
Title: Re: Sources
Post by: NoCforMe on October 18, 2024, 12:58:53 PM
Obviously not.
Title: Re: Sources
Post by: Villuy on October 19, 2024, 03:39:20 PM
Hi, Ketil!

My old faithful mouse has double click error. Because of this tabs in program close when I not want. And even program "Mouse Fix" not rescues. How to shut off closing tabs on double click?
Title: Re: Sources
Post by: zedd151 on October 19, 2024, 04:36:36 PM
Quote from: Villuy on October 19, 2024, 03:39:20 PMHi, Ketil!

My old faithful mouse has double click error. Because of this tabs in program close when I not want. And even program "Mouse Fix" not rescues. How to shut off closing tabs on double click?
It sounds like you need a new mouse. Eventually the left button will cease to work at all. Right now it appears the contacts inside the switch (internally in the mouse) are dirty, causing multiple 'clicks', even though you only clicked once.
While the "work around" you suggest might work, it is better to get a new mouse. Even if you have to buy a cheap mouse, it is better to have a mouse that works reliably than a mouse that works erratically.
Title: Re: Sources
Post by: Villuy on October 19, 2024, 05:01:33 PM
Quote from: zedd151 on October 19, 2024, 04:36:36 PMIt sounds like you need a new mouse. Eventually the left button will cease to work at all. Right now it appears the contacts inside the switch (internally in the mouse) are dirty, causing multiple 'clicks', even though you only clicked once.
While the "work around" you suggest might work, it is better to get a new mouse. Even if you have to buy a cheap mouse, it is better to have a mouse that works reliably than a mouse that works erratically.

FixMouseLMB mostly solves problem, except RadASM. I need lots of new things but world is what it is.
Title: Re: Sources
Post by: zedd151 on October 20, 2024, 12:47:09 AM
Quote from: Villuy on October 19, 2024, 05:01:33 PMFixMouseLMB mostly solves problem, except RadASM.
Okay, otherwise the mouse works okay, beside RadAsm. I think I understand.

QuoteI need lots of new things but world is what it is.
Yes, unfortunately. If I could, I would send you one of my spare mouse.
Title: Re: Sources
Post by: zedd151 on October 20, 2024, 12:51:15 AM
Whoops... quoted my post above, had meant to edit it.   :toothy:
Title: Re: Sources
Post by: Villuy on October 20, 2024, 01:30:23 AM
Quote from: zedd151 on October 20, 2024, 12:47:09 AMYes, unfortunately. If I could, I would send you one of my spare mouse.

For what? It's like that joke:
Son asks his father programmer:
— Dad, why sun rise in east and set in west every day?
— Really every day? Have you checked? If everything works, don't touch anything, don't change anything.  :azn:
Title: Re: Sources
Post by: Villuy on October 20, 2024, 05:30:46 PM
Yet another problem.

When pasting symbols from clipboard with codes outside of ASCII, question marks are shown instead of symbols — ?????. Yes, and they are saved in file as question marks — 3F 3F 3F 3F 3F. When copypasting backward there are no errors.

UPD: Error appears and disappears in both directions. I can't figure out pattern yet in order to consistently reproduce error.
Title: Re: Sources
Post by: KetilO on October 26, 2024, 06:19:33 AM
Hi

The converted libraries can be found at:
https://sourceforge.net/projects/radasm30/files/Release/RadASMCustomControls.zip/download (https://sourceforge.net/projects/radasm30/files/Release/RadASMCustomControls.zip/download)

KetilO
Title: Re: Sources
Post by: KetilO on October 26, 2024, 06:26:28 AM
Hi

Disable close on double click:

In the RadASM sources file: TabTool.asm comment following code.
.elseif eax==WM_LBUTTONDBLCLK
mov eax,lParam
movzx edx,ax
shr eax,16
mov ht.pt.x,edx
mov ht.pt.y,eax
invoke SendMessage,hWin,TCM_HITTEST,0,addr ht
.if eax==da.tabinx
invoke SendMessage,ha.hWnd,WM_COMMAND,IDM_FILE_CLOSE,0
.endif
mov da.tabinx,-2
xor eax,eax
jmp Ex

KetilO
Title: Re: Sources
Post by: Villuy on October 26, 2024, 09:13:16 PM
Quote from: KetilO on October 26, 2024, 06:19:33 AMHi

The converted libraries can be found at:
https://sourceforge.net/projects/radasm30/files/Release/RadASMCustomControls.zip/download (https://sourceforge.net/projects/radasm30/files/Release/RadASMCustomControls.zip/download)

KetilO

Hi, Ketil!

Thank you, I'll look into it.  :thup:
Title: Re: Sources
Post by: Villuy on October 26, 2024, 09:19:23 PM
Quote from: KetilO on October 26, 2024, 06:26:28 AMHi

Disable close on double click:

In the RadASM sources file: TabTool.asm comment following code.


I can't compile it so that everything is authentic. And what about clipboard bug?
Title: Re: Sources
Post by: KetilO on October 27, 2024, 04:16:35 AM
Hi

I dont think this is a bug.
RasASM does not support unicode or UTF-8, only windows ansi character set. The ???? will be the result if you paste UTF-8
characters not found in the ascii character set.

What is your computers language setting?
Does it match the language you are pasting?

KetilO
Title: Re: Sources
Post by: Villuy on October 27, 2024, 06:36:45 AM
Quote from: KetilO on October 27, 2024, 04:16:35 AMHi

I dont think this is a bug.
RasASM does not support unicode or UTF-8, only windows ansi character set. The ???? will be the result if you paste UTF-8
characters not found in the ascii character set.

What is your computers language setting?
Does it match the language you are pasting?

KetilO

It has nothing to do with Unicode or UTF-8. RadASM incorrectly works with 8-bit encodings, in particular Windows-1251. I mean exactly clipboard.
Title: Re: Sources
Post by: KetilO on October 28, 2024, 04:50:51 AM
Hi

I have no idea why. The paste function in RAEdit is simple and uses windows api's to get the clipboard data.

invoke OpenClipboard,[ebx].EDIT.hwnd
.if eax
invoke GetClipboardData,CF_TEXT
.if eax
call InsertMem
.endif
invoke CloseClipboard
.endif

If you were able to build RadASN i would suggest trying CF_OEMTEXT instead of CF_TEXT

KetilO
Title: Re: Sources
Post by: Villuy on October 28, 2024, 02:25:31 PM
I'm sure you would have found cause of problem if it annoyed you as me. Well, it is what it is.
Title: Re: Sources
Post by: KetilO on October 28, 2024, 07:30:57 PM
Hi

Not true.
It works as it should with CP-1252 wich is the windows default.
Why it does not work with CP-1251 I dont know.
Probably some windows configuration problem.

"It does not work" is not very helpful identifying the problem.

https://en.wikipedia.org/wiki/Windows-1252 (https://en.wikipedia.org/wiki/Windows-1252)
https://en.wikipedia.org/wiki/Windows-1251 (https://en.wikipedia.org/wiki/Windows-1251)

KetilO
Title: Re: Sources
Post by: Villuy on October 28, 2024, 09:58:57 PM
Hi

I open RadASM and copy string:

Привет, как дела?

I paste it here, and what I have:

Ïðèâåò, êàê äåëà?

But if now I write same string and copypaste, then everything is fine. That means problem arises with file that has just been opened and not yet edited. In the first approximation it looks like this.
Title: Re: Sources
Post by: KetilO on October 29, 2024, 06:17:50 PM
Hi

The clipboard is confused on what codepage to use.

This is 1251: Привет, как дела?
and this is 1252: Ïðèâåò, êàê äåëà?

I will try this winapi and see if it helps:
https://learn.microsoft.com/en-us/windows/win32/api/shobjidl/nf-shobjidl-iquerycodepage-setcodepage (https://learn.microsoft.com/en-us/windows/win32/api/shobjidl/nf-shobjidl-iquerycodepage-setcodepage)

KetilO
Title: Re: Sources
Post by: Villuy on October 29, 2024, 08:25:25 PM
Hi

Yeah, good luck. And not to get up twice, remove double click on tabs. We have tab context menu and we have F4. That's quite enough.
Title: Re: Sources
Post by: KetilO on October 30, 2024, 12:58:28 AM
Hi

It has been a long time since i worked with interfaces so SetCodePage will take a while.

To disable close tab on double click download the zip and replace RadASM.exe

Then edit RadASM.ini and add this at the end.

[Close]
DblClk=0

KetilO
Title: Re: Sources
Post by: Villuy on October 30, 2024, 01:40:18 AM
Yeah, it works. )

Had to transfer from 3.0.0.9 version files Masm.ini and RadASM.ini in order to save my settings and session. But it is not at all fact that it is allowed to do so. Personal settings should be ported from version to version in prescribed order, not by intuition.

Upd: And indeed, [Addins] is different. Yes, I had to check it line by line.
Title: Re: Sources
Post by: Villuy on November 08, 2024, 02:51:54 AM
Hi

When I switch between tabs, I can see for moment that tab first turns into window, and then turns back into tab. This bug also needs to be fixed.
Title: Re: Sources
Post by: KetilO on November 10, 2024, 12:16:20 AM
Hi,

This is only visible when a mdi child is maximized on a slow computer.
It is not a bug.

KetilO
Title: Re: Sources
Post by: Villuy on November 10, 2024, 02:34:34 PM
Hi

Ok, if you not like term "bug", let's call it "feature". Feature which annoys me and which no anywhere else but RadASM on my slow computer. Can you remove this feature?
Title: Re: Sources
Post by: KetilO on November 11, 2024, 06:56:01 PM
Hi,

No, the feature cannot be removed. It is the behaviour of WM_MDIACTIVATE.

If it annoys you that much, here is a trick to minimize the effect of this behaviour.

1. From the Window menu select Cascade.
2. Minimize all mdi children.
3. Maximize the active mdi child.
4. Close the project.
5. Reopen the project.

KetilO