firemonkey

Firemonkey: can we update targetSdkVersion in AndroidManifest.template.xml?

允我心安 提交于 2019-12-04 02:31:11
问题 I read that berlin is compatible with marshmallow, but i see that by default in the AndroidManifest.template.xml we have : <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" /> i don't know where delphi took the variable to update %targetSdkVersion% but it's seam to be all the time 14 and i don't see any way to configure it i would like to replace %targetSdkVersion% by 23 (marshmallow api level, to support the app permissions), but is it safe to do

Delphi FireMonkey TListBox AddObject exception on Android

为君一笑 提交于 2019-12-04 02:01:43
问题 I'm having a problem adding a TObject value to a FireMonkey TListBox in Delphi 10.0 Seattle. An exeception is raised when casting an Integer variable to a TObject pointer. I tried the cast to TFmxObject with no success. On Windows, the cast works like a charm, but on Android it raises the exception. Here is my code: var jValue:TJSONValue; i,total,id: integer; date: string; begin while (i < total) do begin date := converteDate(jValue.GetValue('date' + IntToStr(i), '')); id := StrToInt(jValue

Why the exception is not caught by the try… except end;?

隐身守侯 提交于 2019-12-03 23:28:33
I have this code (that runs under iOS with Delphi Tokyo): procedure TMainForm.Button1Click(Sender: TObject); var aData: NSData; begin try try aData := nil; finally // this line triggers an exception aData.release; end; except on E: Exception do begin exit; end; end; end; Normally the exception should be caught in the except end block, but in this case it is not caught by the handler and it is propagated to the Application.OnException handler. Access violation at address 0000000100EE9A8C, accessing address 0000000000000000 Did I miss something? This is a bug (actually, a feature ) on iOS and

Firemonkey (FMX) bitmap and colours

倾然丶 夕夏残阳落幕 提交于 2019-12-03 23:27:12
Assume I have a small bitmap in Firemonkey (say 32x24 pixels). So I put a TImage onto a form and in the constructor there is this code: Image1.Bitmap.Create(32, 24); if Image1.Bitmap.Canvas.BeginScene then try Image1.Bitmap.Canvas.Fill.Color := claBlack; Image1.Bitmap.Canvas.Stroke.Color := claYellow; Image1.Bitmap.Canvas.FillRect(RectF(0,0,32,24), 0, 0, AllCorners, $FF); Image1.Bitmap.Canvas.DrawLine(PointF(1,1), PointF(10,10), $FF); finally Image1.Bitmap.Canvas.EndScene; Image1.Bitmap.BitmapChanged; end; This draws a nice diagonal line on blackground. What I want to do is now parse the

FireMonkey iOS RAD Studio XE2 - Display Image on form loaded from URL

扶醉桌前 提交于 2019-12-03 22:44:06
Is it possible to place a TImage on an FMX form for iOS and load image (jpg) from an URL into this TImage to be displayed in the iOS app? I have tried with no success. Any hints or point in the right direction is appreciated. Drop a TButton, TImageControl and TIdHttp onto a Firemonkey form and this code will pull down an image from the web: procedure TForm1.btnReadWebImgClick(Sender: TObject); begin ReadWebImage('http://www.gravatar.com/avatar/5af5f8c5f88c6c237745e9472a31410f?s=32&d=identicon&r=PG'); end; procedure TForm1.ReadWebImage(imgAddress: string); var memStream: TMemoryStream; begin

How to setup OpenGL1.4 environment in Firemonkey App?

混江龙づ霸主 提交于 2019-12-03 13:25:47
In older days I would create a TForm, place a TMyPanel on it (with overriden WM_PAINT message) and pass its Handle to a bunch of WGL functions that find a compatible pixelformat and create rendering context. Just like NeHe tutorials did it. Now there comes FireMonkey application. How to get OpenGL 1.4 rendering context there that is working on Win and iOS? EDIT: Been trying to make it to work by passing TForm.Handle (which is NativeUInt). Good news - no errors from OpenGL end, but bad news - no output on TForm either.. I'm obviously missing some critical piece here, does anyone has a working

Details of what features FireMonkey (FMX) inside the NEW Delphi Rad Studio XE2 contains?

橙三吉。 提交于 2019-12-03 11:26:53
I've heard that Delphi's NEW Rad Studio XE2 has something called FireMonkey that will allow the same code to build Windows 32, Windows 64 and MacOS applications. If this is true, this is huge. Where can I get the technical documentation that talks about FireMonkey? EDIT: I'm interested in the MacOS. Several people have asked me when I'm releasing a Mac version of my software and I keep telling them I'm not. I asked this question back in March (4 months ago) and no one said anything about FireMonkey. What version of Delphi will let me create software that runs on a Mac? MODERATOR QUESTION:

How to open an URL with the default browser with FireMonkey cross-platform applications?

此生再无相见时 提交于 2019-12-03 07:34:26
问题 Usually, I use: ShellExecute(0, 'OPEN', PChar(edtURL.Text), '', '', SW_SHOWNORMAL); How can I have the same behaviour (opening a link in the default browser), on all platforms (Windows and OSX)? 回答1: In the FireMonkey discussion forum I found this code for a question about NSWorkspace.URLForApplicationToOpenURL: uses Posix.Stdlib; .... _system(PAnsiChar('open ' + ACommand)); (not tested by me) Update : Posix is not available on Windows so it is not possible to write a solution which uses the

Firemonkey version of VirtualTreeView

瘦欲@ 提交于 2019-12-03 05:49:25
问题 Does anyone happen to know if there is a Firemonkey version of the popular VirtualTreeView in preparation? Also, has anybody collected some experiences with porting custom controls to Firemonkey and can estimate how much work it would be to port the virtual tree view to Firemonkey? We need this control and switching to Firemonkey is only an option if we can get this control to work. Thanks! 回答1: As far as I understand the FireMonkey is so different from the VCL that it would require major

Correctly using TAniIndicator in firemonkey mobile dev for wait for processing

社会主义新天地 提交于 2019-12-03 04:41:00
问题 I am using Delphi XE-5 (Firemonkey Mobile Application) I am trying to get the TAniIndicator to work, by displaying during my long processing. I have a TAniIndicator (AniIndi) on my main form, but it does not spin. It displays correctly, but does not spin. begin Loading:= True; AniIndi.Visible:= True; AniIndi.Enabled:= True; UpdateAll; Application.ProcessMessages; //do my processsing here Loading:= False; AniIndi.Enabled:= False; AniIndi.Visible:= False; UpdateAll; Application.ProcessMessages;