-
Content Count
593 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Vandrovnik
-
System.Types error in Delphi 13
Vandrovnik replied to emileverh's topic in RTL and Delphi Object Pascal
Hi, do you have any System.* or VCL.* units copied to your app folder? (I do it so that I can translate texts in System.SysConst.pas and Vcl.Consts.pas, but with new version of Delphi, they must be upgraded, too.) -
Hello, I have tried Delphi Project Upgrade Advisor, then their reFind script C:\Users\karel\OneDrive\Documents\Embarcadero\Studio\37.0\CatalogRepository\DelphiProjectsUpgradeAdvisor\1.0\RenameUnits.txt to rename unqualified unit names to qualified. Expected behavior: change uses Windows, Messages, ... to uses Winapi.Windows, Winapi.Messages, ... What I get: uses inapi.Windows, inapi.Messages, ... So annoying. The idea is good, but the implementation is terrible again. As I have asked many times before, I wonder if any testing is being done at all...
-
Hmm, as a last resort solution, you could create a fake UIAutomationCore.dll for Windows 2000 computers and save it to your application's folder...
-
Hello, When I connect an Android device, it often is not listed in Targets. adb.exe can see it, but Delphi does not, even after "Refresh". What can be the reason? This device was yesterday used with Delphi, so that everything, what is needed for developping, is enabled there.
-
I can see it in Explorer like this:
-
Hello, I have created a new blank FMX application, added one button, set target to Android 64bit, build, run - and get "Project Test125.apk raised exception class Segmentation fault (11)." It works fine when targeted to Anrdoid 32bit. Please do you havy any idea how to find the source of this problem? (Because the same unfortunatelly happens in my real application.) Debugging does not work (already a few versions of Delphi...), or the error occurs too soon to reach the breakpoint on the very first line in .dpr. Kind regards, Karel
-
Delphi 13, Android 13 - Segmentation fault in 64bit app
Vandrovnik replied to Vandrovnik's topic in FMX
Thank you very much! I will have a look at obtaining these logs, never seen them before... It was related to broadcast receiver, which I have used for Android barcode readers (and can be removed from this app, it was there more for testing than for real use case). Please how to get RECEIVER_EXPORTED? I have found it in interfaces JContextClass and Jcontent_ContextCompatClass, but where to get them? -
Delphi 13, Android 13 - Segmentation fault in 64bit app
Vandrovnik replied to Vandrovnik's topic in FMX
I have uploaded it here: https://www.rysovo.cz/Cyklotrek.apk (18.2 MB) From other testing it seems that both applications (test and Cyklotrek) make a Segmentation fault whenever I try to run them directly from Delphi. When started manualy on tablet, empty application works; Cyklotrek works on Android 13, but freezes on launcher icon on Android 15. -
Delphi IDE Moving components undo or similar?
Vandrovnik replied to bresson's topic in Delphi IDE and APIs
It happens to me, too. When possible, I hold down Ctrl and then left mouse button to select the component. Missing Undo is annoying 😕 -
Hello, I tried to define a conditional symbol in .dpr file (before "uses"). Well, I can define it: {$DEFINE Test} but later in units, this symbol seems to be undefined. {$IFDEF Test} xx; // causes compiler error in .dpr, but is ignored in units. {$ENDIF} Is that by design (and why?!), or is that a bug? From help (The symbol is recognized for the remainder of the compilation of the current module in which the symbol is declared), I am not sure what they mean by a module: a unit, or a dll/exe? I defined the symbol in Project, Options, but still would like to know why it is not possible to define it in .dpr.
-
Regression - Delphi 12 - Unable to debug dynamically loaded packages
Vandrovnik replied to @AT's topic in Delphi IDE and APIs
-
What about clients connected directly to central database server through a VPN?
-
You can try running Delphi in DPI-unaware mode. It's blurry, but from what I've tested, it's the least problematic.
-
Hello, I would like to set the resolution of tJPEGImage, such as 300 dpi. Is it possible, or the only way is to save jpg and then directly overwrite corresponding bytes in the file/stream?
-
I have found no official way, but created this, which seems to work (after calling JPEGNeeded): type tJpegImageClassHelper = class helper for tJpegImage public procedure SetResolution(aDpiX, aDpiY: word); end; tJpegDataClassHelper = class helper for tJpegData public procedure SetResolution(aDpiX, aDpiY: word); end; procedure tJpegImageClassHelper.SetResolution(aDpiX, aDpiY: word); begin with self do if fImage<>nil then fImage.SetResolution(aDpiX, aDpiY); end; procedure tJpegDataClassHelper.SetResolution(aDpiX, aDpiY: word); type tJpegApp0Rec = packed record // 18 B including the marker; starts on position 2 in the file APP0Marker: word; // 2, FF E0 Length: word; // 2, Length of segment excluding APP0 marker Identifier: array[1..5] of AnsiChar; // 5, 4A 46 49 46 00 = 'JFIF' in ASCII, terminated by a null byte JFIFVersion: word; // 2, First byte for major version, second byte for minor version (01 02 for 1.02) DensityUnits: byte; // 1, Units for the following pixel density fields; 00 : No units, 01 : Pixels per inch (2.54 cm), 02 : Pixels per centimeter XDensity: word; // 2, Horizontal pixel density. Must not be zero YDensity: word; // 2, Vertical pixel density. Must not be zero XThumbnail: byte; // 1, Horizontal pixel count of the following embedded RGB thumbnail. May be zero YThumbnail: byte; // 1, Vertical pixel count of the following embedded RGB thumbnail. May be zero // ThumbnailData... // 3 × n, Uncompressed 24 bit RGB (8 bits per color channel) raster thumbnail data in the order R0, G0, B0, ... Rn-1, Gn-1, Bn-1; with n = Xthumbnail × Ythumbnail end; pJpegApp0Rec = ^tJpegApp0Rec; var App0: pJpegApp0Rec; function Swap(Value: word): word; begin result := (Value shr 8) or ((Value and $FF) shl 8); end; begin with self do begin if fData = nil then exit; if fData.Size < 20 then exit; App0:=pointer(NativeUInt(fData.Memory) + 2); if App0^.Identifier = 'JFIF'#0 then begin App0^.DensityUnits := 1; App0^.XDensity := Swap(aDpiX); App0^.YDensity := Swap(aDpiY); end; end; end;
-
For me, the only way to handle all HDPI related problems and bugs, is to use Delphi in DPI-unaware mode and keep all designed forms and frames at 96 dpi. On runtime they scale fine. Even then Delphi IDE 12.3 on monitor set to 150 % sometimes shows hint too small and moved to top left corner of the screen...
-
Hello, Please is it possible to have memory manager in Delphi 12.3 to call my routine when it is unable to allocate new block of memory? My routine would release some memory (cache of bitmaps) and memory manager should try again, without raising an exception. Or is there another way of creating a cache as big as possible, but without limiting "normal" operation of the application?
-
You can also use remote lab: https://developer.samsung.com/remote-test-lab
-
Assigning to one string variable from multiple threads at same time is not a good idea...
-
IBX is Crashing Application on Windows XP / Server 2003
Vandrovnik replied to MikeMon's topic in Databases
We had the same problem (Windows XP as virtual machines). Did not succeed finding a solution in Delphi app, so virtual machines upgraded to Windows 7... -
{$IFDEF ANDROID} function SetEnvironmentVariable(Name:string; Value:string): boolean; begin result:=false; //assume failure if Value='' then begin // Assume user wants to remove variable. if unsetenv(MarshaledAstring(UTF8String(Name)))=0 then result:=true; end else begin // Non empty so set the variable if setenv(MarshaledAstring(UTF8String(Name)), MarshaledAstring(UTF8String(Value)), 1)=0 then result:=true; end; end;
-
Hello, I have a DrawGrid, on some columns user can click to switch between values (enable / disable them). Is it possible to allow OnDblClick on some columns, while not allowing OnDblClick on these columns with "switches"? OnDblClick is used to open modal dialog to change some values. Thank you, kind regards, Karel
-
tDrawGrid - how to prevent OnDblClick on certain columns
Vandrovnik replied to Vandrovnik's topic in VCL
Thank you for your reply. I did not write, that in this grid, RowSelet is set, so in OnDblClick I get Col=0. So instead I used: var Cell: TGridCoord; Pt: tPoint; begin fSkipDrag:=true; Pt:=Mouse.CursorPos; Pt:=Grid.ScreenToClient(Pt); Cell:=Grid.MouseCoord(Pt.x, Pt.y); if (Cell.X<1) or (Cell.X>3) then ... It is not perfect - if computer is really busy / slow, mouse may move before OnDblClick is run. -
Samsung offers a remote testing lab: https://developer.samsung.com/remote-test-lab
-
The background is a static image?