-
Content Count
392 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Cristian Peța
-
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
Project1.dpr.20: s := ReadChar1 + ReadChar2; 0008E605 E8BEFFFFFF call $0008e5c8 0008E60A 8BD0 mov edx,eax 0008E60C 8D45EC lea eax,[ebp-$14] 0008E60F E8289CFEFF call $0007823c 0008E614 8B45EC mov eax,[ebp-$14] 0008E617 50 push eax 0008E618 E897FFFFFF call $0008e5b4 0008E61D 8BD0 mov edx,eax 0008E61F 8D45E8 lea eax,[ebp-$18] 0008E622 E8159CFEFF call $0007823c 0008E627 8B55E8 mov edx,[ebp-$18] 0008E62A 8D45FC lea eax,[ebp-$04] 0008E62D 59 pop ecx 0008E62E E8B59DFEFF call $000783e8 First call to $0008E5C8 is ReadChar2. It is with '5'. Project1.dpr.10: begin 0008E5C8 55 push ebp 0008E5C9 8BEC mov ebp,esp 0008E5CB 51 push ecx Project1.dpr.11: Result := '5'; 0008E5CC 66C745FE3500 mov word ptr [ebp-$02],$0035 Project1.dpr.12: end; 0008E5D2 668B45FE mov ax,[ebp-$02] 0008E5D6 59 pop ecx 0008E5D7 5D pop ebp 0008E5D8 C3 ret 0008E5D9 8D4000 lea eax,[eax+$00] -
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
But ReadChar2 is called first and will read the first char from file -
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
Probably I do not understand something and you code do not compile for me. This is working as expected for me. It will show "OK". PS. Now I understand: ReadChar2 is called first and will read the first char from file. uses System.SysUtils; function ReadChar1: Char; begin Result := 'P'; end; function ReadChar2: Char; begin Result := '5'; end; procedure ReadHeader(out _w, _h, _Depth: Integer); const PGM_Magic_Number = 'P5'; var s: string; begin s := ReadChar1 + ReadChar2; if s <> PGM_Magic_Number then raise Exception.Create('File is not a valid PGM file:') else Writeln('OK'); end; var _w, _h, _Depth: Integer; begin ReadHeader(_w, _h, _Depth); Readln; end. -
There is TUniImage.ClientEvents.ExtEvents.mousemouve where you can write some JavaScript. In this script you can call to execute the TUniImage.OnAjaxEvent event calling ajaxRequest(sender, 'eventname', ['param1=value1']) from JavaScript
-
TParallel Version and TTask Version
Cristian Peța replied to stacker_liew's topic in RTL and Delphi Object Pascal
TParallel.For will not start 1000 threads so fast like a for loop but will use a thread pool and wait for a thread to finish before starting an other. -
Contributing to projects on GitHub with Subversion
Cristian Peța replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I think your last statement here: "We've spent today testing Fork and GitKraken and landed on GitKraken Pro due to the issue tracker integrations and built in GitFlow support - which really simplify doing proper branching for features, fixes and releases. " -
I managed to do it. Some information here:
-
Windows App Store icon sizes - unplated?
Cristian Peța replied to Incus J's topic in Delphi IDE and APIs
We changed the border to be more grey (right image) and it was accepted as transparent (unplated) for MSIX installations. For non MSIX install the left icon is transparent.- 9 replies
-
- appx
- windows store app
-
(and 3 more)
Tagged with:
-
@Keesver I used appinstaller and updates are working well (installing and updates without admin elevation) but I didn't managed to show transparent icon on taskbar. I posted in other thread what I was doing if you have some suggestions:
-
Windows App Store icon sizes - unplated?
Cristian Peța replied to Incus J's topic in Delphi IDE and APIs
Strange... if I change the 44x44 logo to have more black, it will show transparent in taskbar. I discovered this accidentally trying do alter the image to be sure it's the right one. A little black will not suffice. Something more than 1/3.- 9 replies
-
- appx
- windows store app
-
(and 3 more)
Tagged with:
-
Windows App Store icon sizes - unplated?
Cristian Peța replied to Incus J's topic in Delphi IDE and APIs
@Rafael Dipold have you done something different than in that article? It isn't working for me. I didn't used Delphi IDE because it's calling makeappx.exe with /f (mapping file) and I used /d (content directory) I have the same file with two names in Assets: Logo44x44.png and Logo44x44.targetsize-44_altform-unplated.png The Root folder is every time new created and filled with all necessary files then: C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\makepri.exe" createconfig /cf priconfig.xml /dq en-US 'Platform (pv)' not specified. Default is Windows 10. Writing PRI config file to priconfig.xml ... Successfully Completed C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\makepri.exe" new /pr "C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" /cf priconfig.xml Output location of PRI file(s) is detected to be under the project root. If previously generated PRI file(s) are present, these may be re-indexed and lead to unexpected results. Index Pass Completed. AlternateForm Qualifiers: UNPLATED TargetSize Qualifiers: 150,44 Finished building Version: 1.0 Resource Map Name: winarhi.winarhi15s Named Resources: 27 Resource File: resources.pri Version: 1.0 Resource Candidates: 29 AlternateForm Qualifiers: UNPLATED TargetSize Qualifiers: 150,44 Successfully Completed C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86\makeappx.exe" pack /d "C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" /p "C:\Delphi\WA15\WinArhi\!Executabil Showroom\!FINAL\WinArhi_15_Showroom.msix" Microsoft (R) MakeAppx Tool Copyright (C) 2013 Microsoft. All rights reserved. The path (/p) parameter is: "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\!FINAL\WinArhi_15_Showroom.msix" The content directory (/d) parameter is: "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" Enumerating files from directory "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" Packing 30 file(s) in "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root" (content directory) to "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\!FINAL\WinArhi_15_Showroom.msix" (output file name). Memory limit defaulting to 5368131584 bytes. Memory limit defaulting to 4294967296 bytes. Using "\\?\C:\Delphi\WA15\WinArhi\!Executabil Showroom\UWP\Root\AppxManifest.xml" as the manifest for the package. ....... ....... Package creation succeeded.- 9 replies
-
- appx
- windows store app
-
(and 3 more)
Tagged with:
-
Delphi 11.1 compiled under MacOS Ventura
Cristian Peța replied to ChrisChuah's topic in Delphi IDE and APIs
because this i said "Just compiling is not an issue". If you have all the pieces.... He asked about compiling. Producing an app for Mac is an other thing. -
Delphi 11.1 compiled under MacOS Ventura
Cristian Peța replied to ChrisChuah's topic in Delphi IDE and APIs
Just tried on Delphi 10.1 and building for iOS Device works without a Mac. I suppose building for Mac or in newer Delphi versions also works. Deploy does not work because there you need XCode. -
Delphi 11.1 compiled under MacOS Ventura
Cristian Peța replied to ChrisChuah's topic in Delphi IDE and APIs
Just compiling is not an issue because it doesn't need a Mac. Getting SDKs, debugging, signing, running can be but I don't know what from this is not working, -
Delphi 11.1 compiled under MacOS Ventura
Cristian Peța replied to ChrisChuah's topic in Delphi IDE and APIs
From docwiki: "macOS Ventura support require RAD Studio 11.3" https://docwiki.embarcadero.com/PlatformStatus/en/Main_Page#cite_note-11.3-1 -
Which library for "Small" Graphics Application, GR32, GDI+, Skia, ...
Cristian Peța replied to cltom's topic in VCL
Custom Styles? They are so slow now. -
Async/Await with updating visual controls
Cristian Peța replied to omnibrain's topic in OmniThreadLibrary
But all the time you need to have in mind that Queue will execute code later and avoid using in that code some objects or whatever if there is a chance they will not be there when the code executes. -
Is it possible that an exception does not inherits from Exception class?
Cristian Peța replied to Wagner Landgraf's topic in RTL and Delphi Object Pascal
I use this construct and this will go well with any exceptions but there is a weakness if the library will not set InTransaction how it should. try StartTransaction; .... Commit; finally if InTransaction then Rollback; end; -
Windows 11 in VM, scaling 125%, DPI Unaware, but positions are a little other. I have this space marked with yellow.
-
Tried with 125% scaling but can not reproduce either.
-
I can't reproduce but I didn't touched the default positions. Scaling 150%, DPI Unaware, Light theme. PS. Now I see that issues are only with monitor scaling between 124% and 130%.....
-
More than 10% from 12500 installations in last year are Windows 7 and 8
-
But this doesn't work for Windows 7 from what I understand. We used Chrome approach for this and avoided elevation to write in 'Program files'. Elevation is necessary only first time at installation when we create a task in scheduler on the SYSTEM account. Actually two tasks: one with a day trigger and one with a trigger that can be started from our app at demand.
-
Memory leak on TBlobField(FieldByname(field_name)).SavetoStream(Stream);
Cristian Peța replied to alogrep's topic in VCL
TBitmap.LoadFromStream() will call TStream.ReadBuffer(). Maybe TnxBlobStream.ReadBuffer() is leaking. Have you checked it? -
Function with 2 return values ?
Cristian Peța replied to Henry Olive's topic in RTL and Delphi Object Pascal
You can return a record: TTotalCostResult = record TotalCost: Double; TotalCostWıthExp: Double; end; function GetBomCosts(ItemCode:String): TTotalCostResult;