Jump to content

softtouch

Members
  • Content Count

    151
  • Joined

  • Last visited

Everything posted by softtouch

  1. softtouch

    Delphi 11 and onClose on macOS is still not called

    The form is displayed with showmodal, not triggering onCloseQuery and onClose. onDestroy is triggeed, so I might move the code in onClose to onDestroy instead until this very old bug is fixed.
  2. softtouch

    Delphi 11 and onClose on macOS is still not called

    It will only work when the form is the main form. When you open a form, and create there another form via buttonclick, that new form does not trigger its onClose event. Example: A main form is displayed and has a button. On the buttonclick, it created another form. That form, when its red close button is clicked, does not trigger its onClose event. procedure TForm1.Button1Click(Sender: TObject); begin myform:=TMyForm.Create(self); myform.ShowModal; myform.Free; end;
  3. When I select an entry from the picklist of the TValueListEditor, the existing cell text will get replaced with the text from the list. Is there any way to insert the text from the picklist at the current cursor position in the cell instead of replacing the whole cell?
  4. softtouch

    TValueListEditor and itemProps.EditStyle

    I have an empty TValueListEditor on the form. user enter the key, and select the value cell to enter the value. How can I show the ellipsis in the value cell at that time (when the user select the cell)? For example, there are some key/value pairs already, and the user add a new row by pressing cursor down key in the last row. The new row appear empty and I can type key and value. But I cand display the ellipsis in that new row so the user could click the ellipsis instead entering a value.
  5. softtouch

    TButtonEdit and left button dropdown menu

    I have some buttonedit controls, each has left and right buttons. The left buttons have all the same popup menu assigned as dropdownmenu. When I now select a menuitem, how can I know which buttonedit control showed the popupmenu?
  6. softtouch

    TButtonEdit and left button dropdown menu

    The menu is a TPopupmenu, but assigned to the dropdownmenu property of the TButtonedit buttons. And with that, it seems not to work and TPopupmenu.popupcomponent return always nil.
  7. softtouch

    TButtonEdit and left button dropdown menu

    Unfortunately, it does not work with dropdown menus, it seems to work only with popup menus.
  8. I just wanted to work again a little with Android, so I installed via Tools->Manage Platforms "Delphi Android Professional" and selected Android SDK and OpenJDK, it installed, done. But when I now create a new Multi-Device project, I only have macOS and Win32/Win64 platforms, no Android. What could cause this?
  9. softtouch

    No Android Platform in Delphi 11.3

    No, I did not. I gave up with it. I will use something else.
  10. softtouch

    No Android Platform in Delphi 11.3

    The sdk does not appear there, so there is nothing to configure.
  11. softtouch

    No Android Platform in Delphi 11.3

    This is so frustrating, still no Andoid platform, whatever I try. I did a clean installation of Windows on another PC, installed D11 from the .iso, mac platforms are there, but still no Andoid, even its checked and it installed a lot of android stuff.
  12. softtouch

    Returning a string from a bpl

    How must be the prototype of a function inside a bpl in order to return a string to the caller? This is the test bpl code: unit test; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) private { Private declarations } public { Public declarations } end; function GetPluginName:string; var Form1: TForm1; implementation {$R *.dfm} function GetPluginName:string; begin result:='test'; end; exports GetPluginName; end. And here is the test caller code: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; GetPluginName:function:string; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); var h:nativeuint; s:string; begin h:=LoadPackage('test.bpl'); @GetPluginName:=GetProcAddress(h, 'GetPluginName'); s:=GetPluginName; UnloadPackage(h); end; end.
  13. I create a new package, add a form, compile and the ide add the needed dcp files like rtl.dcp etc. The bpl gets created just fine. Now I drop the synedit memo on the form, compile, and it popup: Add SynEditDR. SynEditDR contains implicit unit(s) SynEdit, SynEditDragDrop, SynEditDataObject, SynEditExport, SynEditStrConst, SynEditMiscProcs, SynDWrite, SynEditTypes, SynUnicode, SynEditTextBuffer, SynHighlighterMulti, SynEditHighlighter, SynEditMiscClasses, SynEditCodeFolding, SynEditKeyConst, SynExportHTML, SynEditWordWrap, SynEditUndo, SynEditKeyCmds, SynEditScrollBars, SynEditKbdHandler. und when I allow to add them, I get an error: [dcc64 Fatal Error] Package1.dpk(35): E2202 Required package 'SynEditDR' not found Synedit works just fine in a normal vcl app. What am I doing wrong? There are a handful of 3rd. party components doing exactly the same, when added to a form in a bpl project.
  14. softtouch

    BPL creation failed when adding 3rd. party components

    Thanks. I use sharemem, and I played around a little, and it seems to work fine as of now.
  15. softtouch

    BPL creation failed when adding 3rd. party components

    Oh heck, I would have to deploy a lot of bpl then. I think I will just switch to use a dll instead of a bpl. I just tried it with a dll, and no issue at all, the 3rd. party control are displayed just fine.
  16. softtouch

    Returning a string from a bpl

    A workaround would be this I guess: var tmp:=GetPluginName; s:=copy(tmp,1); tmp:=''; "tmp" gets the correct text, so I copy that text to "s", and set "tmp" to nil, and "s" still contains the right text after unloading the bpl. If I dont set "tmp" to nil, it will crash. So its somehow related to the reference count I think.
  17. softtouch

    Returning a string from a bpl

    I tried, but its the same. var s:='Test'; result:=s; UniqueString(result); When I get the string from the caller code with s:=GetPluginName; s contains 'Test', as it should. But when I unload the package, s will be "inaccessible" and I get an AV.
  18. softtouch

    Returning a string from a bpl

    I updated the first post with the complete test code for bpl and caller. I removed the stdcall. The result is the same, an AV as long the bpl return anything. If I remove the line with the result:=..., no AV and its fine.
  19. softtouch

    No Android Platform in Delphi 11.3

    I did that a couple of times, and it did not work. Today, I tried to install Android on the office pc, which has Delphi 11 Enterprise, and its exactly the same, no Android platform to select.
  20. softtouch

    No Android Platform in Delphi 11.3

    No, it wont show Android platform. And compiling is useless because it will compile for the selected platform, which is either Win or macOS.
  21. softtouch

    No Android Platform in Delphi 11.3

    Yes, I checked all of them. No Android Platform in the context menu to add. Yes, Delphi 11.0 Alexandria Professional with Mobile
  22. Every time I start a new project, I have to change many options for that project. Is there any way/hack to change the default options, like default copyright, company, compiler output directories?
  23. I did that repository thing, but its not optimal. From where does the IDE get the projects options when a new project is created?
  24. Thank you, but setting project options without a project open is not possible because the project options are grayed out in that case. I will take a look at the option sets you mentioned.
  25. I have many images in a TImageCollection, all have different dimensions. because of the different dimensions, I cannot use a virtualimagelist with the collection, images would get scaled. I will draw the images manually when needed. Thats no problem, but how can I get the width and height of an image in the imagecollection? All the procedure/functions like GetBitmap etc. are all requesting a width and height and will scale the original image too.
×