Leaderboard
Popular Content
Showing content with the highest reputation on 09/19/24 in all areas
-
When will we have a 64-bit IDE version ?
Uwe Raabe replied to luciano_f's topic in Delphi IDE and APIs
Nobody claimed it were a 64 bit IDE. Only the compilers and the LSP server are available as 64 bit versions. The IDE still is 32 bit. That is why the 64 bit compilers can only be used with the MSBuild option. -
When will we have a 64-bit IDE version ?
Anders Melander replied to luciano_f's topic in Delphi IDE and APIs
It isn't. I haven't installed it, but I can read. -
Put my hands on a Samsung A12 and can confirm the issue when pressing the return key: Testing on a Redmi Note 11 doesn't cause the exception, but by @havrlisan's comment it does happen when tapping on the memo to move the caret from a non-empty line to an empty one. This change seems to solve the issue on both Samsung and non-Samsung devices.
-
That won't work. SetPairs() expects a list, not a Set or an array. You would need to use this instead: JsonObject.SetPairs(TList<TJSONPair>.Create); This is because SetPairs() takes ownership of the new list, freeing the old list. The list can't be nil or else you risk crashes on future operations on the TJsonObject.
-
bug Delphi (Win32) quiets signaling NaN on function return
David Heffernan replied to Jim McKeeth's topic in RTL and Delphi Object Pascal
Ultimately, if exceptions are masked then there's no behavioural difference between SNaN and QNaN. Seems an odd design choice for x86 to change the NaN type though. Presumably there's a reason I'm not aware of. Normally I think I know my way around floating point, but when exceptions are masked is the great unknown for me. I've never been there. And when I explored moving to 12 I just unmasked them!!! -
You only need to make sure you compile a universal binary. Packing and deployment is unaffected. Ensure the ARM64 platform is enabled and the compiler option set as described here: https://docwiki.embarcadero.com/RADStudio/Athens/en/Delphi_Considerations_for_Multi-Device_Applications#Universal_Binaries
-
Memory access problem when exchanging WideString in OLE object written in Delphi
Anders Melander replied to kihor's topic in Windows API
Not that it matter much but it isn't necessary to use a dispatch property to return the value. Apart from that I agree with your implementation. -
Memory access problem when exchanging WideString in OLE object written in Delphi
DelphiUdIT replied to kihor's topic in Windows API
If you want this is the global project (DLL_COM + APP) with WIDESTRING result use .... It's only a basic skeleton of course. Bye Demo COM.zip -
Thanks for letting us know about this. I have raised it with the PM team to look at and validate ASAP. FWIW my own personal mobile is a Samsung device.
-
bug Delphi (Win32) quiets signaling NaN on function return
DelphiUdIT replied to Jim McKeeth's topic in RTL and Delphi Object Pascal
To summarize: x86 (32-bit): 1) "Quiet NAN" can always be used; 2) UnMasked Invalid Operation : - "Signaling NAN" throws an exception if used with FPU registers (i.e function return value); 3) Masked Invalid Operation: - "Signaling NAN" is switched to "Quiet NAN" if used with FPU registers (i.e function return value); N.B.: if you pass the "Signaling NAN" via function parameter then you can use it 'cause no FPU register is involving. x64 (64-bit): 1) "Quiet NAN" can always be used; 2) "Signaling NAN" can always be used; -
Reported on QP: https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1840
-
Upon closer inspection, it has nothing to do with the Return key, but with the caret position. The bug can be reproduced just by tapping on another line, the only condition is that the current line must have at least one character. Stack trace: System._DbgExcNotify(int, void*, System.SmallString<(unsigned char)255>*, void*, void*) System.NotifyReRaise(System.TObject*, void*)($b40000deac336980,$0000006ef3035c10) System._InternalRaiseAtExcept(System.TObject*, void*, bool)($b40000deac336980,$0000006ef3035c10,false) System._RaiseExcept(System.TObject*)($b40000deac336980) System.Internal.Excutils.DoRaiseJNIExceptionCallBack(System.UnicodeString, System.UnicodeString)(??,??) Androidapi.Jni.HandleJNIException(JNINativeInterface**)($b40000701924bbf0) Androidapi.Jnimarshal.ExecJNI(void*, void*, void*, Androidapi.Jnimarshal.JNIMethodInvokeData*, Androidapi.Jnimarshal.m128*)($0000007fe4a32218,$0000007fe4a321f8,$0000007fe4a322f0,$0000007fe4a32200,$0000007fe4a32210) _DispatchToImport Fmx.Platform.Ui.Android.TTextServiceAndroid.InternalUpdateSelection()($b4000070c92faf10) Fmx.Platform.Ui.Android.TTextServiceAndroid.SetText(System.UnicodeString)($b4000070c92faf10,??) Fmx.Text.Texteditor.TTextEditor.UpdateTextInTextService()($b4000070192bc510) Fmx.Text.Texteditor.TTextEditor.SetCaretPosition(Fmx.Text.TCaretPosition const&)($b4000070192bc510,{Line = 1, Pos = 0}) Fmx.Memo.Style.New.TStyledMemo.MMSetCaretPosition(Fmx.Presentation.Messages.TDispatchMessageWithValue__1<Fmx.Text.TCaretPosition>&)($b4000070e92689d0,{MsgID = 5917, Value = {Line = 1, Pos = 0}}) System.TObject.Dispatch(void*)($b40000dfdc2671e0,$0000007fe4a326d8) void Fmx.Presentation.Messages.TMessageSender.SendMessage<Fmx.Text.TCaretPosition>(unsigned short, Fmx.Text.TCaretPosition)($b4000070192bf450,5917,{Line = 1, Pos = 0}) Fmx.Memo.TCustomMemoModel.SetCaretPosition(Fmx.Text.TCaretPosition const&)($b4000070192bf450,{Line = 1, Pos = 0}) Fmx.Memo.TCustomMemoModel.InsertAfter(Fmx.Text.TCaretPosition const&, System.UnicodeString, System.Set<Fmx.Text.TInsertOption, (Fmx.Text.TInsertOption)0, (Fmx.Text.TInsertOption)4>)(??,{Line = 0, Pos = 1},??,{__data = "\\U00000006", __basetype = ??}) Fmx.Memo.Style.New.TStyledMemo.KeyDown(unsigned short&, char16_t&, System.Set<System.Classes.TShiftStateItem, (System.Classes.TShiftStateItem)0, (System.Classes.TShiftStateItem)10>)(??,$0000007fe4a32fa2,U+2fa4 U+e4a3 U+007f U+0000 u'\\xe2\\xbe\\xa4',{__data = "", __basetype = ??}) Fmx.Presentation.Style.TStyledPresentation.PMKeyDown(Fmx.Presentation.Messages.TDispatchMessageWithValue__1<Fmx.Controls.Presentation.TKeyInfo>&)($b4000070e92689d0,{MsgID = 1056, Value = {Key = 13, KeyChar = U+0000 u'\\\\0', Shift = {__data = "", __basetype = ??}}}) System.TObject.Dispatch(void*)($b40000dfdc2671e0,$0000007fe4a32fa0) void Fmx.Presentation.Messages.TMessageSender.SendMessageWithResult<Fmx.Controls.Presentation.TKeyInfo>(unsigned short, Fmx.Controls.Presentation.TKeyInfo&)($b400006fb92f9d80,1056,{Key = 13, KeyChar = U+0000 u'\\\\0', Shift = {__data = "", __basetype = ??}}) Fmx.Controls.Presentation.TPresentedControl.KeyDown(unsigned short&, char16_t&, System.Set<System.Classes.TShiftStateItem, (System.Classes.TShiftStateItem)0, (System.Classes.TShiftStateItem)10>)($b400006f99280520,$0000007fe4a3330a,U+3302 U+e4a3 U+007f U+0000 u'\\xe3\\x8c\\x82',{__data = "", __basetype = ??}) Fmx.Forms.TCommonCustomForm.KeyDown(unsigned short&, char16_t&, System.Set<System.Classes.TShiftStateItem, (System.Classes.TShiftStateItem)0, (System.Classes.TShiftStateItem)10>)($b400006f9927be50,$0000007fe4a3330a,U+3302 U+e4a3 U+007f U+0000 u'\\xe3\\x8c\\x82',{__data = "", __basetype = ??}) Fmx.Platform.Ui.Android.TAndroidTextInputManager.KeyDown(unsigned short&, char16_t&, System.Set<System.Classes.TShiftStateItem, (System.Classes.TShiftStateItem)0, (System.Classes.TShiftStateItem)10>)($b400007009347710,$0000007fe4a3330a,U+3302 U+e4a3 U+007f U+0000 u'\\xe3\\x8c\\x82',{__data = "", __basetype = ??}) Fmx.Platform.Ui.Android.TAndroidTextInputManager.HandleAndroidKeyEvent(AInputEvent*)($b400007009347710,$b40000700939d2a0) Fmx.Platform.Android.TPlatformAndroid.HandleAndroidInputEvent(Androidapi.Appglue.TAndroidApplicationGlue*, AInputEvent*)($b4000070192be490,$b40000700939d2a0) Androidapi.Appglue.TAndroidApplicationGlue.InputEventHandler(int, int, void*) :0000007234A78B74 android::Looper::pollInner(int) :0000007234A7862C android::Looper::pollOnce(int, int*, int*, void**) :00000072278C689C ___lldb_unnamed_symbol9344 :000000009D7B6340 ?? The TTextEditor.FCaretPosition was updated while TTextService.FCaretPosition wasn't, and the TTextEditor.UpdateTextInTextService gets called before the TTextService receives the position update. The UpdateTextInTextService passes the string of the newly selected line to the TTextService.SetText, which, among other code, does this: FTextView.setText(StrToJCharSequence(FText), TJTextView_BufferType.JavaClass.EDITABLE); // In some cases, EditText can reset selection/caret position to 0. So if user removes text via vkBackspace, // the backspace button in Soft Keyboard can be unpressed automatically. InternalUpdateSelection; Judging from the comment, that second line seems like a new addition. Tracing into it, lo and behold: procedure TTextServiceAndroid.InternalUpdateSelection; var SelStart, SelEnd: Integer; begin if FTextView = nil then Exit; CalculateSelectionBounds(SelStart, SelEnd); if SelEnd - SelStart > 0 then FTextView.setSelection(SelStart, SelEnd) else FTextView.setSelection(CaretPosition.X); // this one gets executed end; It uses its non-updated caret position to update the selection.
-
Great, I'll check it and add your repo to the list I've done around this presentation.
-
And in the topic
-
There seems to be a pretty big gap between your knowledge and your ambitions and you shouldn't really be trying to make custom components (or whatever it was you did) if you haven't learned about things like polymorphism and scope. I suggest you start with something more basic.
-
New Warning in 12.2: Overloading a similar index type by declaring an array property 'Items'
pyscripter replied to pyscripter's topic in RTL and Delphi Object Pascal
I ended up with the following, which is backward compatible and future proof: {$IF (CompilerVersion > 36) or Declared(RTLVersion122)}{$WARN OVERLOADING_ARRAY_PROPERTY OFF}{$ENDIF} property Items[Index : TColumnIndex] : TVirtualTreeColumn read GetItem write SetItem; default; property Header: TVTHeader read FHeader; property TrackIndex : TColumnIndex read FTrackIndex write FTrackIndex; property TreeView : TCustomControl read GetTreeView; property UpdateCount; {$IF (CompilerVersion > 36) or Declared(RTLVersion122)}{$WARN OVERLOADING_ARRAY_PROPERTY ON}{$ENDIF} end; Notes: If the $WARN OFF comes immediately after the Items declaration you still get the warning. Delphi 12.2 still defines RTLVersion121. Presumably if there is a Delphi 12.3 etc. RTLVersion122 will be defined. -
New Warning in 12.2: Overloading a similar index type by declaring an array property 'Items'
Kas Ob. replied to pyscripter's topic in RTL and Delphi Object Pascal
This warning/error is here forever, i suggest to do yourself a favor and rewrite the above with future proof parameters. -
Good idea! I just created a feature request for that. Cannot promise when it will be implemented, though.
-
When will we have a 64-bit IDE version ?
DelphiUdIT replied to luciano_f's topic in Delphi IDE and APIs
Sorry, but what are you talking about? You said you don't know Lazarus but you say you want a Delphi like Lazarus, you decline a series of features without knowing them or having tried them. Try using Lazarus with your project, install Lazarus on Linux and work from there and then try to "distribute" your work to other Linux PCs: X11 and Wayland, Linux 4.xx, Linux 5.xx, Linux 6.xx , GTK2, GTK3, GTK3.2 GTK+, GTK4, QT5, QT5Moded, QT6, etc .... I won't continue to mention all the libraries otherwise .... Let's not talk about the distros (Debian, Fedora, Ubuntu just to name a few some common). Are you sure you want a Delphi like this? Fmx runs in a few OS (Linux, Mac, Android and IOS, as well as Windows) but at least the environment is unique. Use third-party libraries and see if they also run in all operating systems supported by Lazarus. FastReport for example on Lazarus only runs on Windows and Linux. Lazarus really doesn't have "skins". And, just to be clear, "skins" also exist in FMX, not just in VCLs. Etc... As others have said, it is better to have the IDE that is there now and most of the engineering resources dedicated to this IDE rather than splitting efforts and finding ourselves with new IDEs with new problems and the old one with old unsolved problems. The time will also come for a Delphi on "Mars", but only when the time is ripe. Bye -
When will we have a 64-bit IDE version ?
luciano_f replied to luciano_f's topic in Delphi IDE and APIs
As I already mentioned, there is no reason not to have a 64-bit IDE since the whole world is moving towards this, let's get to the Facts Lazarus 64 Bit Visual Studio 64 Bit Android 64 Bit only MacOs 64 Bit only Who knows, maybe the day Microsoft says it will end support for Win32 will see Embarcadero in shame. -
When will we have a 64-bit IDE version ?
FreeDelphiPascal replied to luciano_f's topic in Delphi IDE and APIs
Why would you have 30 000 000 loc to compile in one single project? Don't you use packages/libraries?