Strange behavior with frame

Posted:
09 Jun 2014 09:34
by assapan
Hi,
I have a strange behavior of the Gmap3 in case of container is a TIWCGJQFrame.
Let me explain :
I had a Gmap form with different management and i have moved the code into a TIWCGJQFrame .
a) the size of the frame is not kept , i can modify it , save it but when i reopen the source the frame size come back to width: 451 , height 304.
b) the frame is aligned to alclient but the map itself doesn't draw in full size
c) if after reopening the frame source i resize it , it displays correctly but if the mouse pass over a marker the map is redrawn and do not fit in the frame.
i kept the same source in a form and with a form no such problems
it is difficult to explain what is actually hapenning , best is to have a remote control cession.
thanks for your help
P.S. I am using IW14.0.31 with CGDevTools 2.1.0.3666
Re: Strange behavior with frame

Posted:
09 Jun 2014 11:07
by Alexander Bulei
Hi assapan,
How do you creates that frame?
Best Regards.
Re: Strange behavior with frame

Posted:
09 Jun 2014 11:36
by assapan
I have copied the code from the demo
- Code: Select all
function TFrm_Meteo.CreateNewFrame(AFrameClass: TIWCGFrameClass): TIWCGJQFrame;
var
NewName: string;
begin
if Assigned(FrameCourante) then
FrameCourante.Free;
NewName := CGFindUniqueComponentName(Self, 'Frame');
if CGIsCallBackProcessing then
begin
// SINCE THE FRAME IS GOING TO BE RENDERED BY AJAX, DON'T NEED TO GENERATE AJAX RESPONSE.
CGCallBackDisableAjaxResponse;
end;
Result := AFrameClass.create(Self);
Result.Name := NewName;
Result.Parent := RegionFrame;
Result.Align := alClient;
FrameCourante:=Result;
end;
procedure TFrm_Meteo.ShowFrame(AFrameClass: TIWCGFrameClass; ACaption: string; AParams: TStringList = nil);
begin
if not Assigned(AFrameClass) then
Exit;
CreateNewFrame(AFrameClass).ProcessCommand(0, AParams);
if WebApplication.CallBackProcessing then
CGCallBackEnableAjaxResponse;
// RenderRegionAsync(RegionFrame,False,True);
end;
Re: Strange behavior with frame

Posted:
09 Jun 2014 11:44
by assapan
Frame creation is called by a IWCGJQMenu item linked to an action from an actionlist
- Code: Select all
procedure TFrm_Meteo.ActionMetarFrameExecute(Sender: TObject);
begin
ShowFrame(TFrame_Metar, 'Metar');
end;
Re: Strange behavior with frame

Posted:
09 Jun 2014 11:49
by Jorge Sousa
Hi
So why do you think that works in jQueryDemo_V2
http://www.cgdevtools.com/demo/JQueryDemoIW14_V2_ISAPI_64.dll/?Frame=GMap3And not in your project? Can you please check? t.i.a.
Re: Strange behavior with frame

Posted:
09 Jun 2014 11:54
by assapan
I don't know ( if i knew i wouldnt have asked the question ) , i have checked and rechecked and i could'nt figure why !
it is working when i use it in a form not in a frame that's all i can say

Re: Strange behavior with frame

Posted:
09 Jun 2014 12:15
by Jorge Sousa
Hi assapan
If you want we do a remote session. Ping us on skype.
Re: Strange behavior with frame

Posted:
09 Jun 2014 13:17
by assapan
hi,
i sent you a request to accept me on skype on
support@cgdevtools.com
Re: Strange behavior with frame

Posted:
09 Jun 2014 13:50
by assapan
i have added the JQGMAP3Frame.pas to my project and the result is the same !
so there is something wrong in my apl
Re: Strange behavior with frame

Posted:
09 Jun 2014 15:38
by assapan
I found the origin of the problem , if i call the frame creation with a button it works !! if i do it with a menu it fails !
any idea ?