-
Content Count
170 -
Joined
-
Last visited
Everything posted by softtouch
-
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.
-
Unfortunately, it does not work with dropdown menus, it seems to work only with popup menus.
-
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?
-
No, I did not. I gave up with it. I will use something else.
-
The sdk does not appear there, so there is nothing to configure.
-
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.
-
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.
-
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.
-
BPL creation failed when adding 3rd. party components
softtouch replied to softtouch's topic in General Help
Thanks. I use sharemem, and I played around a little, and it seems to work fine as of now. -
BPL creation failed when adding 3rd. party components
softtouch replied to softtouch's topic in General Help
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. -
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.
-
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.
-
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.
-
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.
-
No, it wont show Android platform. And compiling is useless because it will compile for the selected platform, which is either Win or macOS.
-
Yes, I checked all of them. No Android Platform in the context menu to add. Yes, Delphi 11.0 Alexandria Professional with Mobile
-
Is there way to change the default options for a new project?
softtouch posted a topic in Delphi IDE and APIs
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? -
Is there way to change the default options for a new project?
softtouch replied to softtouch's topic in Delphi IDE and APIs
I did that repository thing, but its not optimal. From where does the IDE get the projects options when a new project is created? -
Is there way to change the default options for a new project?
softtouch replied to softtouch's topic in Delphi IDE and APIs
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. -
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.
-
How to get image dimension from images in TImageCollection?
softtouch replied to softtouch's topic in VCL
I already got what I need with the simple code: idx:=ImageCollection1.GetIndexByName(imagename); if idx<>-1 then begin var img:=ImageCollection1.Images[idx].SourceImages[0].Image; var x:=img.Width; var y:=img.Height; end; -
I use virtualstringtree in report mode (like a grid). I need to have a column where no text is in the cells, but instead an image. That image need to be centered in the cell. Setting the image index in the onGetImageIndex will display the image, but always left aligned. Does anybody know how to center align that image or is that not possible with the virtualtreeview?
-
Alright, so it will be a custom draw solution. I thought it will, but wanted to be sure. Could be that there are some properties I could not find.
-
I need to set a connect- and read timeout, but cant find any property in THttpCli (Tsslhttpcli) for that. The provides timeout property seems not to do anything. I know, I could use a timer and reset it every time data is received, but I am running 500 threads and that would mean having 500 timer, makes no sense. So why is there no connect timeout and receive timeout like in other http clients?
-
Yes, I did, and it did not do anything, no timeout triggered.