Hi The Svin

Let's consentrate on the collapse addin first.
Here you can get a version with some debug info:
http://radasm.visualassembler.com/Upload/Collapse.zip

KetilO
Posted on 2005-05-09 06:15:53 by KetilO
Hi denise_amiga

Still cant make it fail.
Could you show me an example that fails?

KetilO
Posted on 2005-05-09 06:17:55 by KetilO
ok, a empty project sample from templates, with message loop changed from (if/else/endif) to (switch/case/endsw)

sample.asm


.586
.model flat, stdcall? ;32 bit memory model
option casemap :none? ;case sensitive

include sample.inc

.code

start:

invoke GetModuleHandle, NULL
mov hInstance, eax

invoke GetCommandLine
mov CommandLine, eax

invoke InitCommonControls
invoke DialogBoxParam, hInstance, IDD_DIALOG1, NULL, addr DlgProc, NULL
invoke ExitProcess, 0

;#########################################################################

DlgProc proc hWin:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
LOCAL hDC :HDC
LOCAL ps :PAINTSTRUCT
LOCAL rct :RECT

switch uMsg
case WM_INITDIALOG
;
case WM_CLOSE
invoke EndDialog, hWin, 0
case WM_COMMAND
mov eax, wParam
mov ecx, eax
shr ecx, 16
and eax, 0FFFFh
; .if ecx == BN_CLICKED
; .if eax == IDC_CANCEL
; invoke SendMessage, hWin, WM_CLOSE, 0,0
; .endif
; .endif
case WM_PAINT
invoke BeginPaint, hWin, ADDR ps
mov hDC, eax
invoke GetClientRect, hWin, ADDR rct
invoke DrawEdge, hDC, ADDR rct, EDGE_ETCHED, BF_RECT
invoke EndPaint, hWin, ADDR ps
default
mov eax, FALSE
ret
endsw
mov eax, TRUE
ret

DlgProc endp

end start


sample.inc


include windows.inc
include macros.asm

include kernel32.inc
include user32.inc
include shell32.inc
include comdlg32.inc
include comctl32.inc
include masm32.inc

includelib kernel32.lib
includelib user32.lib
includelib shell32.lib
includelib comdlg32.lib
includelib comctl32.lib
includelib masm32.lib

DlgProc PROTO :HWND, :UINT, :WPARAM, :LPARAM

.const
IDD_DIALOG1 equ 101

;#########################################################################

.data?
hInstance HINSTANCE ?
CommandLine LPSTR ?

;#########################################################################



when collapse the block switch, no longer I can expand it, and I let see the block paint for example,
the other blocks work well, (.code, .data, dlgproc)
it is veryyyyyyyyy rare
if I copy the collapsed block and I pasted it, it does correctly, with the expanded lines
Posted on 2005-05-09 09:00:10 by denise_amiga
Hi denise_amiga

Finaly found the problem.

This will fail

switch eax
case 1
? mov edx,11
case 2
? mov edx,22
endsw

This will work

switch eax

case 1
? mov edx,11
case 2
? mov edx,22
endsw

As a temporary fix, leave a blank line after the switch macro.

KetilO
Posted on 2005-05-09 09:38:03 by KetilO
ok.
thanks for that fast fix, truely not since it beams, follow of that way, you are great, a genius
Posted on 2005-05-10 04:16:21 by denise_amiga
Hi denise_amiga

RadASM 2.2.0.1b has been uploaded with a fix that takes care of the problem

KetilO
Posted on 2005-05-10 05:14:40 by KetilO
Hi KetilO

I've got a problem with the expand/collapse feature. (I am using the latest RadASM version 2.2.0.1b).
When I expand my procedure the last lines where visually cut / not display til the end of the proc.
They are still there - I checked the asm file - but I can't see them in RadASM after expanding.
When I mark the collapsed proc and cut/paste it on another position it expands well, too. But then,
collapsing & expanding it, the last lines where not displayed again...

Is this a known bug and you know a work around?

Regards, BoostMan
Posted on 2005-05-11 04:23:13 by BoostMan
Thanks BoostMan

RadASM 2.2.0.1c is uploaded.

KetilO
Posted on 2005-05-11 15:24:30 by KetilO
Ketil,

Tiny little highlighting error over here:

.ELSEIF .NMDATETIMECHANGE.nmhdr.code == DTN_DATETIMECHANGE

The .code in that highlights the same as the code segment directive highligthing color.
Posted on 2005-05-11 22:00:35 by JimmyClif
Hi JimmyClif

Yes I know. You can fix it by defining a dot as a character in masm.ini


2=0251222522222212;20-2F
3=1111111111242221;30-3F

Things like mov eax,(NMHDR ptr ).code would still fail.

KetilO
Posted on 2005-05-12 02:09:20 by KetilO
On a second thought, don't modify the character table.
It has serious side effects.

KetilO
Posted on 2005-05-12 06:29:14 by KetilO
No worries - not a big deal - just wanted to let you know about it. First time I ever realized it.

Cheers,
JimmyClif
Posted on 2005-05-12 11:28:13 by JimmyClif
Hi KetilO,

I found another collapse problem (you might already know of. I looked around in the
forum but maybe not good enough  ;) ):
The last procedure won't collapse when there's no carriage return after ENDP (in other
words: endp {EOF} - nothing follows after ENDP). The minus appears but clicking on it
has no effect...
Again, a more "cosmetic problem" (but it drove me mad  :) ).

All the best, BoostMan

ps: using v2.2.0.1c (from 5.11.2005)
Posted on 2005-05-19 14:38:30 by BoostMan
Thanks BoostMan

I will fix it in the next release.

KetilO
Posted on 2005-05-19 14:57:06 by KetilO