You are not logged in.
Pages: 1
I am using Delphi XE5 and FireMonkey, this error had always occured but it never stopped me from debugging, until now.
In the SynCommons.pas:
function WndProcMethod(Hwnd: HWND; Msg,wParam,lParam: integer): integer; stdcall;
var obj: TObject;
dsp: TMessage;
begin
{$ifdef CPU64}
obj := pointer(GetWindowLongPtr(HWnd,GWLP_USERDATA));
{$else}
obj := pointer(GetWindowLong(HWnd,GWL_USERDATA)); // faster than GetProp()
{$endif}
if not Assigned(obj) then
result := DefWindowProc(HWnd,Msg,wParam,lParam) else begin
dsp.msg := Msg;
dsp.wParam := WParam;
dsp.lParam := lParam;
dsp.result := 0;
obj.Dispatch(dsp);
result := dsp.result;
end;
end;
I get the errors:
[dcc32 Error] SynCommons.pas(21453): E2003 Undeclared identifier: 'msg'
[dcc32 Error] SynCommons.pas(21454): E2003 Undeclared identifier: 'wParam'
[dcc32 Error] SynCommons.pas(21455): E2003 Undeclared identifier: 'lParam'
[dcc32 Error] SynCommons.pas(21456): E2003 Undeclared identifier: 'result'
[dcc32 Error] SynCommons.pas(21458): E2003 Undeclared identifier: 'result'
[dcc32 Error] SynCommons.pas(21617): E2003 Undeclared identifier: 'WM_QUIT'
When I go to the definition of dsp : TMessage , the TMessage comes from FMX.Messages.pas.
Is this supposed to happen?
Please help, I cannot debug anymore.
Offline
Our units expects the Windows Messages.pas unit, and won't work with FireMonkey.
It is not planned for the moment at all.
Perhaps when it may be stabilized, but we won't need it internally - we rather focus on HTML5 apps for cross-platform clients (via SmartMobileStudio).
If you want to contribute, you are welcome!
Offline
Ha Ab, X
Combining FMX with mormot is no problem. (Out app LCS runs server and client currently with FMX and Mormot), but you do lose the multiplatform functionality.
FTM I would be helpful to split Mormot into parts (packages,units) that are platform dependent and independent(Like the parts contaning windows messaging). (Currently there is no big need for this from our side).
The compiler error here is probably caused by fmx being in the "unit scope names" list of the delphi compiler settings. Just kick "fmx" out of there, and add "Winapi" amnd "System.Win" si the correct "messages.pas" is linked instead of the fmx.messages unit. Otherwise replace the "messages" in the units list with "winapi.messages", that may help too.
Regards - Hans
Last edited by h.hasenack (2014-02-24 09:35:57)
Offline
I've added http://synopse.info/fossil/info/b07ceddab6
That is, rewrite code to avoid platform-specific issues.
Any input is welcome!
Offline
As a first step would it make sense to extract the string and JSON handling routines out of SynCommons to a separate unit? I've found this set of routines seem to compile fine under Lazarus on OSX and I guess are fairly platform agnostic. It then shouldn't be too much work to get a basic OSX client up and running.
This may be a half-baked idea but could these string and JSON routines be put in a .inc file. This could then be included in SynCommons.pas but also in a new unit called, eg, SynSrings.pas so it wouldn't be a breaking change and people could migrate gradually to new unit names.
Offline
Pages: 1