PDA

View Full Version : Visual Form Builder


David Chua
10-19-2006, 03:09 PM
When using Visual Form Builder to generate code, I notice that a line of code "local(wmId$, wmEvent$);" is always place inside the case structure. As a result, it generates an error when compile or run. The whole generated by the Builder look like this:

func FORM100Proc (hWnd$, Msg$, wParam$, lParam$)
local(ok$);
ok$ = true;

case(Msg$)
WM_COMMAND:
local(wmId$, wmEvent$);
wmId$ = loword(wParam$);
wmEvent$ = HIWORD(wParam$);
case(wmId$)
5001: // Exit
PostMessage(hWnd$, WM_CLOSE, 0, 0);
return(false);
end;
// insert code here
end;

return (ok$);
end;

It works OK if I move the line "local(wmId$, wmEvent$);" above (outside) the case structure. Is this a bug or something that I've done wrong?

Cheers.

llamatrails
10-19-2006, 08:32 PM
I found this happens when switching off the Simplified Event Handling.

Also, switching it off and then back on mangles the code. Yeah, I know, who would do that ??? :D

kornalius
10-19-2006, 10:11 PM
Ok I found the bug can you guys confirm it's working fine in the VFB*on the PocketPC as well?</p>

David Chua
10-20-2006, 01:38 AM
Just tested with the pocketpc side, looks OK so far. The local variables &quot;wmId$, wmEvent$&quot; are combined with the other one &quot;ok$&quot; in one line.

Cheers.

kornalius
10-20-2006, 11:20 AM
Excellent, it was just the PIDE then. It's fixed now.