Jump to content

havrlisan

Members
  • Content Count

    83
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by havrlisan

  1. havrlisan

    creating a frame at runtime

    Or to an empty string. It's the safest and easiest way, in my opinion.
  2. If you're unable to go fullscreen (try various ways, such as Windows shortcut keys), check if some other program on your PC might be restricting the window from resizing. If there is no such program, try uninstalling IDE plugins. Finally, if nothing helped, reinstall RAD Studio.
  3. I wondered if there is an equivalent option to the Complete Class at Cursor, whose default shortcut is Ctrl+Shift+C. I'm asking because if you use that shortcut, the MMX gets out of sync and seems to parse the entire unit again, which takes around a second. During that period, you cannot use MMX's other tools, or you'll get this message: The closest option I found was invoking Edit Entity... (Ctrl+E), clicking OK, and the method implementation gets created; the MMX doesn't get out of sync that way. I get that it's a pretty specific scenario, but I find myself getting the above message quite often as I invoke the shortcuts during coding. Thanks for your time!
  4. I agree with the duplicate functionality, I don't like that approach either but thought it might make sense due to MMX parsing the code. I didn't realize that option was available. That did the trick, thanks!
  5. havrlisan

    Delphi 12.2 TMEMO - indexoutofbounds

    Reported on QP: https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1840
  6. havrlisan

    Delphi 12.2 TMEMO - indexoutofbounds

    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.
  7. havrlisan

    Delphi 12.2 TMEMO - indexoutofbounds

    Exception occurs on my A52s as well. To reproduce, write a character and press the Return key. Pressing the Return key on an empty line doesn't trigger the exception.
  8. havrlisan

    Getit Package Manager working?

    Works fine for me. The getit server also had no incident reports, you can check it here: https://stats.uptimerobot.com/zJjvZI8vEZ
  9. havrlisan

    Using new QP - how ?..

    Go to https://qp.embarcadero.com/ - it will redirect to attlasian.net login Log in or sign up. Once logged in, you'll be taken to the main portal. Go to the Requests page: In the Requests page, set these filter types: If there are still no reports, it is most likely that you haven't been automatically added to the Embarcadero Customers organization. It should be available in one of the filter dropdowns: In that case, contact @Ian Barker and he'll help you out.
  10. havrlisan

    Gexperts forgets its window sizes

    This seems to be fixed in the latest version, 1.3.25 build 4298.
  11. Question for iOS platform. Why would System.SysUtils.ForceDirectories return false for the following path: The path is a combination of TPath.GetHomePath and custom folders starting from the "DEBUG (LOCALHOST)" folder. It's a folder within the app sandbox so it shouldn't be a problem unless I'm missing something.
  12. havrlisan

    Cannot create directories on iOS

    Switching to Documents path fixed the issue. Thanks!
  13. havrlisan

    iOS 17

    They're just lagging behind because Apple made some major changes to debugging apps through Xcode (see this discussion on Apple forums). Hopefully, they'll announce a fix for it in their upcoming webinar for the 12.2 update.
  14. Correct. If you register your component that has the attribute I mentioned, it will display all the platforms in that hint you screenshotted.
  15. You need to add an attribute to your class: [ComponentPlatformsAttribute(pidAllPlatforms)] TZxButton = class(TZxCustomButton) end; You also need to add System.Classes to your uses unit.
  16. I can confirm this. You should report it on QP.
  17. havrlisan

    Does FMX designer support frame inheritance?

    1. Correct, and RAD Studio correctly created the fmx file. However, you changed your class inheritance from TFrame to TBaseInTabFrame, and because of that the correct keyword becomes inherited, not object. RAD Studio cannot know what your intentions are, so you must change it manually. 2. Your TBaseInTabFrame should have an fmx file; that's how I've always done it. I suppose you just created a blank unit and declared it, but you should create the unit as a new FireMonkey Frame (that's an actual option in the Add New tab menu). That way frame inheritance will work properly. 3. Read the previous two statements, they explain why that's a wrong approach.
  18. havrlisan

    Does FMX designer support frame inheritance?

    Your fmx file is wrong: In the first line, it should be inherited instead of object. If it's inherited, it draws all the properties from the parent classes, but if it's an object, it won't inherit anything. I never investigated why it saves those properties, which are properties from TForm and not TFrame ones. Edit: to properly inherit an existing frame in the same project, right click the project in the Projects view, Add new > Other > Delphi (drop down in new window) > Inheritable Items. There you'll see your frames, and you'll only be able to Inherit them (other options Copy and Use will be disabled).
  19. havrlisan

    3rd party library not showing in a Form.

    Great to hear that solved your problem. To clarify, changing the ClassGroup property changes that line of code you edited:
  20. havrlisan

    3rd party library not showing in a Form.

    The TDataModule has a published property ClassGroup, check if that's set to VCL (because TSVGIconImageCollection is VCL only).
  21. I think this wouldn't scale well, because as soon as you have more types and classes, keeping track of all the aliased (or as you say, redefined) types will become a burden, let alone a refactoring. Another consideration is that some types will have helpers (eg. enumerations or records), which cannot make an alias, so you'd end up including the unit anyway, I find it clean enough to have a MyTypes unit that contains the scope-related types and then include that unit wherever I need a type from it. It's easier to track it, and the LSP will be thankful.
  22. Hi all. When you open up an FMX form or a frame, its controls will have their style applied if the style is loaded, eg. you have the data module opened which contains the TStyleBook that contains the styles. There are two possible scenarios with loading styles: load the styles first, then open the form/frame, or open the form/frame, and then load the styles. The second scenario doesn't apply to all controls though. It applies to all the standard FMX controls such as TLabel, TEdit, TPanel, etc., but not to custom controls. A good example is the recently added TSkLabel: style will not get applied until you reopen the frame or reload the form designer (by viewing it as text, then changing back the view to form). Has anyone successfully solved this problem?
  23. havrlisan

    Tool to sort units used in project by dependency

    I'm genuinely curious about how hard it is to implement. I remember seeing it in the Android Studio, which seemed like an awesome feature. I agree; it is the same thing I do on rare occasions. I wonder how much of an impact the unused units have on compilation time, and whether it is even noticeable on medium-sized projects (~500.000 lines of code).
  24. havrlisan

    Tool to sort units used in project by dependency

    This would be a whole lot easier if Delphi had such a feature. Is it that hard to implement that?
  25. havrlisan

    Problems closing IDE

    It's a shame Parnassus Debugger gets so little attention from Embarcadero. Such a plugin should (IMO) be integrated into the IDE, it's an insanely helpful tool for debugging multi-threading applications. Unfortunately as mentioned above, having it installed brings in unbearable errors and slows down your entire workflow. The least they could do right now is add an option inside the plugin to disable it so it doesn't load until one needs it. Installing it every time (and then uninstalling it after use) is a pain in the ass.
×