-
Content Count
151 -
Joined
-
Last visited
Everything posted by softtouch
-
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.
-
Thanks, yes, looks like I have to use a timer or gettickcount or something else then.
-
That does not do anything, no timeout or exception or whatever is triggered. Setting the httpcli.timeout works, if I use Get and not GetASynch. Using GetASynch is not triggering anything for me. If I do a Get to this example site: https://www.cars.com I get a timeout which I can catch with try/except/end, using GetASynch, nothing happen, I can wait hours without anything happen. How do I catch the timeout using GetASynch?
-
@damos: Just create the .ini in the homepath, not inside the mac app bundle. I believe there is no write access, only read access.
-
I need to prevent that user can add a duplicate key in the valuelisteditor. For that, I set the property keyUnique in KeyOptions. Unfortunately, it trigger an exception, and I cant find a way to catch this exception. There is no event for when a key exist or the exception is triggered. Howe can I catch this so that the program wont terminate due to that exception?
-
TValueListEditor how to catch exception when key exist?
softtouch replied to softtouch's topic in VCL
@Remy LebeauIndeed, it does not kill the exe, when madexcept is turned off. So that was the problem, because madexcept terminate the exe after showing its exception dialog. I now turned it off and it will just show an error that the value already exist. Thanks for the help! -
TValueListEditor how to catch exception when key exist?
softtouch replied to softtouch's topic in VCL
Thanks for that. But the user edit the key in the valuelisteditor grid, Ido not add the key with insertrow or such. There are existing entries, the user select the entry to edit and change it, and when the user leaves the cell (with mouse or keyword/arrow keys for example), the exception is triggered. -
When adding a todo text in the source, or in the todo window, it does not appear in the todo window. With 10.x is no problem, just with 11.3. Is it only me or can it be reproduced?
-
It works now for me too, after e restart of the ide.
-
Is there a way to convert a svg (its in a tmemorystream) to png (to another tmemorystream)?
-
Where to turn off 'Whole words' searching?
softtouch replied to Ian Branch's topic in Delphi IDE and APIs
Same annoying issue here. Every time I do a search, after starting the IDE, its checked again, even in the registry its false. -
I am trying to debug a small Delphi 11.2 code with Linux target. I can compile, deploy and run just fine, but when I try to debug, or run with F9, I get: I have no clue what to do about this. Does anybody has a hint?
-
Great, thanks, that was it I was looking for. Another short question: Why cant it encode bmp format and gif?
-
How can I get the image forma (jpg, png etc.) of an image stored in a memorystream with skia4delphi?
-
I cant find a way (or a demo) about how to resample an image with Skia. Does Skia support resampling of images, using various resample filter? What I need to do is loading various image formats, like jpg, tiff, gif, webp, png and so on, resample them to a specific size and save them in a user given target image format. Skia can do all of that, except the resample part so it seems. I cant use any other image library because it need to work also crossplatform.
-
Best Practice Question: Bidirectional EXE-to-EXE communication
softtouch replied to Alexander Halser's topic in RTL and Delphi Object Pascal
Correct, I use it since years also in many programs and never had any issue. -
Indy with macOS crash with socket error #53 and #61, unable to catch
softtouch posted a topic in Network, Cloud and Web
I use TIdHTTP to read some websites. The TIdHTTP.get is within a try/except block. I am not able to catch the 2 exceptions: Socket error # 53, Software cause connection abort and Socket error # 61, Connection refused. It does not happen on my machine, but on some client computer. It also does not happen when compiling the program for Windows. All I have is this in the stack trace: Idstack::TIdStack::RaiseLastSocketError() + 62 Idstack::TIdStack::CheckForSocketError(int) + 33 Idstackvclposix::TIdStackVCLPosix::Connect(int, System::UnicodeString, unsigned short, Idglobal::TIdIPVersion) + 233 Idsockethandle::TIdSocketHandle::Connect() + 44 Idiohandlerstack::TIdConnectThread::Execute() + 28 The exception is ok, but why cant I catch this so that the program can show an error and continue running instead of just crashing? The call to TIdHTTP.get is in try/except similar this: id:=TIdHttp.create(nil); try val:=id.get(url); except on e: Exception do begin end; end; id.free; -
Thats it! It works now! Thanks.
-
Should the 11.3 be compatible to macos sdk 13.1? I at least cant use that sdk, I get [dccosx64 Error] E2597 ld: file not found: /System/Library/PrivateFrameworks/AVFCapture.framework/Versions/A/AVFCapture for architecture x86_64 but it compiles and links fine with the 11.1 sdk
-
Thanks, so I am not alone with that.
-
With Windows 11 and Delphi dpi aware? I can reproduce that every time I want.