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.
]]>That is, rewrite code to avoid platform-specific issues.
Any input is welcome!
]]>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
]]>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!
]]>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.
]]>