Print Page | Close Window

Blank{GUID} error in FMX Win32

Printed From: TMS Software
Category: FMX Components
Forum Name: FMX WebGMaps / WebOSMaps
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=7938
Printed Date: 22 Nov 2019 at 12:29am


Topic: Blank{GUID} error in FMX Win32
Posted By: Helge Lange
Subject: Blank{GUID} error in FMX Win32
Date Posted: 20 Jun 2017 at 2:58pm
I ran across a strange error I didn't have before or I didn't notice.
When I use the FMX webgmaps in Win32 and I move it to another control (changing parent), it just is blank with the blank{guid} message.

I made an easy demo where I used a header/footer project, places a TLayout in the upper half and the map in the lower half and a speedbutton in the header. The speed button event has the following code (which works fine on Android)

procedure THeaderFooterForm.SpeedButton1Click(Sender: TObject);
begin
  WebGMap.Visible := False;
  WebGMap.Parent := Layout1;
  WebGMap.Align := TAlignLayout.Client;
  WebGMap.Visible := True;
end;

Any ideas how to make it work in Win32 ?
Helge



Replies:
Posted By: Bart Holvoet
Date Posted: 20 Jun 2017 at 3:32pm
Hi,

Can you try using the following code instead?

var
  WebGMap: TTMSFMXWebGMaps;
begin
  WebGMap := TTMSFMXWebGMaps.Create(Layout1);
  WebGMap.Parent := Layout1;
  WebGMap.Align := TAlignLayout.Client;


Posted By: Helge Lange
Date Posted: 20 Jun 2017 at 3:42pm
As I understand the webgmap must be created on the mainform, right ?
The reason why I'm moving it around with the button is that in my "real" project that layout is on a TFrame, that is dynamically created.
So when I switch pages I just place TFrames inside a TLayout  on the mainform. At some frames I use the WebGMap, which is created on the mainform and then made invisible. If the frame is created that uses the map, I change the parent, the alignment and make it visible. In Android that works fine, but win32 gives me that error.

I'll try your solution, but I think it was made clear that i can't use webgmap that way directly on another form that is not the mainform


Posted By: Helge Lange
Date Posted: 20 Jun 2017 at 3:47pm
But strangely that works. I have to try that in Android, too :)


Posted By: Helge Lange
Date Posted: 29 Jun 2017 at 3:41am
I still have some problem with it.
While the map is displayed perfectly in Android (FMX Win32 works fine) when I release the TFrame, i get problems in 

TTMSFMXAndroidWebGMapsWebBrowser.UpdateBounds;

Segmentation Fault.

Before I free the frame I call a frame proc call CloseView, it looks like this :

procedure TfMapView_Sucursal.CloseView;
begin
  WebGMap.Markers.BeginUpdate;
  WebGMap.Markers.Clear;
  WebGMap.Markers.EndUpdate;
  WebGMap.Visible := False;
  inherited;
end;

I clear the marker because this also causes problems when they're still there.
I also tried to dispose the map, but nothing, it still crashes at the same UpdateBounds...

Any Ideas ? Because in android this causes the app to close completely

Helge


Posted By: Bart Holvoet
Date Posted: 29 Jun 2017 at 8:48am
Can you please provide a ready to run sample project so I can further investigate this issue?
Please also provide the version of Delphi and Android you are using.

Sample projects can be emailed to:  mailto:help@tmssoftware.com - mailto:help@tmssoftware.com


Posted By: Helge Lange
Date Posted: 29 Jun 2017 at 3:57pm
Sent, my friend.


Posted By: Helge Lange
Date Posted: 29 Jun 2017 at 4:02pm
Sorry, I forgot, I use android 6.0.1 (Galaxy S7 Edge) and Delphi 10.1 Berlin Upd 2. The map components are 2.8.0.2


Posted By: Helge Lange
Date Posted: 11 Jul 2017 at 3:35pm
Hello TMS... did anything come out from that investigation with the sample app I sent you guys ?


Posted By: Bart Holvoet
Date Posted: 11 Jul 2017 at 3:40pm
A reply was sent via email on Tuesday 04/07.

We have been able to trace and fix this issue.
The update will be available with the next release of the TMS FMX WebGMaps.


Posted By: Helge Lange
Date Posted: 11 Jul 2017 at 5:31pm
you're absolutely right, I found your mail in spam for some reason :)

Thanks



Print Page | Close Window