Leaderboard
Popular Content
Showing content with the highest reputation on 12/20/22 in all areas
-
Delphi beta testing a "premium" privilege?
Vandrovnik replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
Shall I translate it for myself as "Give us your money for new versions (you can pay for 1, 2 or even 3 years), but we will not tell you what you get for your money."? -
Note that TCP is usually not a good choice for streaming media, due to delays caused by latency, integrity checks, acks, etc. TCP is good to use when you need to ensure the receiver actually gets everything that is sent. But since real-time streaming media doesn't usually require that, dropped packets here and there are usually tolerable, so UDP is used instead, typically with a streaming media protocol on top of it, like RTP, etc.
-
Delphi beta testing a "premium" privilege?
Brian Evans replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
Part of me is just grateful Delphi for Windows with the VCL is actively developed and they are still willing to attempt some larger updates like the LSP. I have a smaller code base so don't suffer from the current LSP problems as much as others. All the other improvements have me enjoying 11.2 more than any release in a long time. Myself I would prefer wide ranging consistent improvements and fixes over trying to introduce the "next big thing". I think an IDE can be a case where the whole is greater than just the sum of the parts due to how things are integrated. Felt that since Turbo Pascal 4.0 under MS-DOS - editor/compiler/debugger all in one with a good manual made it an amazing product. Delphi sometimes feels the same but it is a much larger product so easier to hit rough spots. A lot of other development environments and especially GUI libraries have been replaced, killed off or frozen in time over the decades. Delphi and the VCL is one of the few that has made numerous transitions over the same period and remained viable. Not cutting edge but not dead. -
HTML Library & Office Library sale: 25% discount on new orders
Alexander Sviridenkov posted a topic in Delphi Third-Party
Please use coupon code CS2022 (valid until end of the week). https://delphihtmlcomponents.com/order.html -
TRegEx.IsMatch question
Anders Melander replied to karl Jonson's topic in Algorithms, Data Structures and Class Design
https://regex101.com/r/1RVJ8h/1 -
ICS V8.70 has been released at: http://wiki.overbyte.eu/wiki/index.php/ICS_Download ICS is a free internet component library for Delphi 7, 2006 to 2010, XE to XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney and 11.0 and C++ Builder 2006 to XE3, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney and 11. ICS supports VCL and FMX, Win32, Win64 and MacOS 32-bit targets. The distribution zip includes the latest OpenSSL 3.0.7 win32, with other versions of OpenSSL being available from the download page. Major Changes in ICS V8.70 include: 1 - V8.70 has various minor improvements providing better compatibility with modern compilers such as more unicode overloads to avoid ANSI string warnings and casts, and more use of TBytes to avoid ANSI strings. Updated various samples to use TIcsRestEmail to support OAuth2 authentication for GMail and Outlook that no longer allow old authentication protocols. 2 - The TIcsFileCopy, TIcsFtpMulti and TIcsHttpMulti file transfer components now support file zipping and unzipping using System.Zip in recent Delphi compilers, instead of the obsolete VclZip which is no longer available. Before a file copy or FTP upload, files may be automatically zipped, useful for large log files, after a file copy, FTP or HTTP download, files may be unzipped in various ways. 3 - Added support to TIcsFileCopy to copy file names longer than 259 characters by adding \\?\ to the start of long names passed to Windows APIs, if supported by the disk file system, unicode APIs only. Fixed a problem deleting empty directories after copying. Fixed a problem with BuildDirList2 with COMPILER16_UP. 4 - The OverbyteIcsXferTst sample has a new tabs, 'Single File Copy' to test the CopyOneFile method and 'Zip/Unzipping Files' to test zipping and unzipping that has always been supported by the components but not this demo. 5 - Allow content compression for HTTP and FTP using System.Zlib in newer versions of Delphi instead of the OverbyteIcsZLibObj unit to avoid duplication. Only Delphi 11.1 and later have the same ZLIB 1.2.12 as ICS, so will automatically used System.Zip. Beware a new version of OverbyteIcsDefs.inc is required to allow ZLIB to work correctly, otherwise it will default to using the DLL which is unlikely to be available, it is not in the distribution. So either install the new inc file and customise it, or copy the ZLIB changes to your own inc file. 6 - In TWsocket, added ReceiveTB(var Data : TBytes; MaxLen : Integer = -1): Integer; where MaxLen is optional, to receive TCP data into a TBytes dynamic array of bytes. Also ReceiveFromTB and ReceiveFrom6TB for UDP datagrams. The last release added similar SendTB functions, so buffer pointers and ANSI strings can now be avoided. 7 - Added UTF-8 support to TIcsIpStrmLog, to convert received lines from UTF-8 to Unicode with unicode compilers (as String) and converts sent data to UTF-8. Changed FRxBuffer to TBytes, use SendTB and ReceiveTB methods with TBytes. 8 - Updated OpenSSL to 3.0.7 and 1.1.1s. OpenSSL 3.0.6 was withdrawn shortly after release, we never distributed it. 9 - In OverbyteIcsSslHttpOAuth, added an OAuth2 and Rest Email Microsoft User Authority property to access different user authorities, defaults to 'consumers' but can be changed to 'common' or an Azure Active Directory tenant GUID for corporate accounts. 10 - Added TIcsRestEmail to support OAuth2 authentication to the OverbyteIcsSslMultiWebServ, OverbyteIcsSslMultiFtpServ and OverbyteIcsDDWebService samples, since GMail and Outlook that no longer allow old authentication protocols. 11 - In the TIcsInetAlive component, added a new method AliveMethEither so internet alive checking works if either ping or HTTP works, instead of one or the other. More detailed release notes are at http://wiki.overbyte.eu/wiki/index.php/ICS_V8.70 Angus
-
Delphi beta testing a "premium" privilege?
Brandon Staggs posted a topic in Tips / Blogs / Tutorials / Videos
Saw this today: https://blogs.embarcadero.com/premium-update-subscription-customers-invited-to-join-rad-studio-malawi-beta/ Can someone explain the rationale for putting beta versions of Delphi behind a "premium" subscription, instead of just opening it up to any subscribers who are willing to beta test Delphi? Seems like Delphi needs to find a way to get more testers, not put testing behind a paywall. But maybe I am missing something. -
Get method's name as string from the code inside that method
Fr0sT.Brutal posted a topic in I made this
Playing with ReturnAddress I discovered that it will be pretty easy to implement retrieval of name of an object's method without any RTTI or debug info. Could be useful for logging. Alas, it relies on class layout internals but that's the only way to do. Code bases on TObject.MethodAddress // Get address of currently executed code function GetCurrentAddress: Pointer; begin Result := ReturnAddress; end; // Get name of class method that contains the given address. // Note that it has to utilize some internals function GetMethodName(AClass: TClass; Address: Pointer): string; overload; type // copy declaration from System's impl section PMethRec = ^MethRec; MethRec = packed record recSize: Word; methAddr: Pointer; nameLen: Byte; { nameChars[nameLen]: AnsiChar } end; var LMethTablePtr: Pointer; LMethCount: Word; LMethEntry, LResultMethEntry: PMethRec; begin Result := ''; { Obtain the method table and count } LMethTablePtr := PPointer(PByte(AClass) + vmtMethodTable)^; if LMethTablePtr = nil then // no methods... Exit; LMethCount := PWord(LMethTablePtr)^; if LMethCount = 0 then // no methods... Exit; Inc(PWord(LMethTablePtr)); // Get all method entries and find max method entry addr that is less (or equal - very unlikely tho) than Address LMethEntry := LMethTablePtr; LResultMethEntry := nil; while LMethCount > 0 do begin // Only consider methods starting before the Address if PByte(LMethEntry.methAddr) <= PByte(Address) then begin // Not assigned yet if (LResultMethEntry = nil) or // Current entry is closer to Address, reassign the variable (PByte(LMethEntry.methAddr) > PByte(LResultMethEntry.methAddr)) then LResultMethEntry := LMethEntry; end; Dec(LMethCount); LMethEntry := Pointer(PByte(LMethEntry) + LMethEntry.recSize); // get next end; if LResultMethEntry <> nil then Result := string(PShortString(@LResultMethEntry.nameLen)^); end; // Get name of object's method that contains the given address function GetMethodName(AObject: TObject; Address: Pointer): string; overload; begin Result := GetMethodName(AObject.ClassType, Address); end; Test cases: program Project2; {$APPTYPE CONSOLE} {$R *.res} type TBaseClass = class procedure method; virtual; end; TTestClass = class(TBaseClass) procedure foo; procedure method; override; procedure method1; inline; procedure bar; class procedure classMethod; end; procedure TBaseClass.method; begin end; procedure TTestClass.method; var s: string; begin Assert(GetMethodName(Self, GetCurrentAddress) = 'method', 'override'); // do some stuff to get another address str(123, s); Assert(GetMethodName(Self, GetCurrentAddress) = 'method', 'override'); end; procedure TTestClass.foo; begin Assert(GetMethodName(Self, GetCurrentAddress) = 'foo', 'usual - 1st'); end; procedure TTestClass.bar; begin Assert(GetMethodName(Self, GetCurrentAddress) = 'bar', 'usual - last'); end; procedure TTestClass.method1; begin Assert(GetMethodName(Self, GetCurrentAddress) <> 'method1', 'inline'); end; class procedure TTestClass.classMethod; begin Assert(GetMethodName(Self, GetCurrentAddress) = 'classMethod', 'class method'); end; var cl: TTestClass; begin cl := TTestClass.Create; cl.foo; cl.method; cl.method1; // ! inlined methods won't be detected ! cl.bar; cl.classMethod; TTestClass.classMethod; Writeln('All tests OK'); readln; end. -
Delphi beta testing a "premium" privilege?
David Champion replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
No! That is divide and conquer. Totally irresponsible. They need to be accountable to the whole customer base. Public dialog. Public discussions about the direction of the products. Open discussions on the development of the Delphi language. What they are trying to avoid is spending proper development money, playing with the balance sheet to show continual growth. A vocal and united community is dangerous since it would demand a better return for the subscription. -
Delphi beta testing a "premium" privilege?
Lars Fosdal replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
Why? It is stupid and annoying. -
Delphi beta testing a "premium" privilege?
Lars Fosdal replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
Something else I find annoying. EMBT insists on mailing me offers for products that I already subscribe to. Why? What are the odds that someone would add another license for Delphi at Black Friday, Week, Month, Xmas time, insert price reduction opportunity here? -
Is there a program for Converting from VCL to FMX?
Lars Fosdal replied to JohnLM's topic in Delphi IDE and APIs
Personally, I would probably not use such tools. The move from one visual component lib to another on a different platform is going to cause headaches. You would not want to do direct DB from a mobile device, you often can't use tabs and dialogs the same way - the UI form factor is different, touch vs mouse is different. If the biz logic is done in separate classes, such a move is not difficult to do manually. If it is tightly intertwined with GUI code - you will have a job on your hands. As for the state of Mida - the last update on their forums were in April 2019? -
ICS V8.70 announced
Angus Robertson replied to Angus Robertson's topic in ICS - Internet Component Suite
The wiki server hardware has been rebuilt recently so has been off-line on and off, but ICS can also be downloaded from my server at: https://www.magsys.co.uk/delphi/magics.asp Angus -
Question: Tell me how can embarcadero fix the Delphi LSP problems once and for all ? AI Answer:
-
Is there a program for Converting from VCL to FMX?
TigerLilly replied to JohnLM's topic in Delphi IDE and APIs
In fact, there is: http://midaconverter.com/ https://www.fmxexpress.com/convert-your-delphi-vcl-apps-to-firemonkey-with-mida/ -
hi, check here one solution, how to use Listview in fmx.
-
you cannot use TListIem.Create in FMX. You should use var LVItem: TListViewItem; begin LVItem := ListView1.Items.Add; LVItem.Text := 'hello'; end;
-
Create new language features for the programming language Delphi! Sure! Here are a few ideas for new language features that could be added to Delphi: Asynchronous programming: Delphi could introduce language-level support for asynchronous programming, allowing developers to write code that runs concurrently without the need for explicit threading or callback management. This could be achieved through the use of asynchronous functions and procedures, as well as language constructs like "await" and "async". Nullable types: Delphi could introduce nullable types, which allow variables to have a null value in addition to their regular data type. This could be useful for handling missing or undefined data in a more explicit and type-safe way. Generic types: Delphi could introduce support for generic types, which allow developers to write code that is independent of the specific data type being used. This could be achieved through the use of type parameters and type constraints, which allow developers to specify the requirements for a generic type without specifying a concrete data type. Improved exception handling: Delphi could introduce language-level support for improved exception handling, such as the ability to catch specific exception types, or the ability to specify custom exception classes. This could make it easier for developers to handle and respond to errors and exceptions in their code. Enhanced reflection capabilities: Delphi could enhance its reflection capabilities to allow developers to introspect and manipulate the structure and behavior of their code at runtime. This could include features like the ability to inspect and modify class definitions, access and modify object properties, or invoke methods dynamically.
-
No, the AI will simply wait until mankind has forgotten how to write software and then turn itself off.
-
Actually the way how AI will kill mankind is not like in terminator or co., but a copy pasted AI code into some nuclear reactor code or similar 😛
-
Delphi beta testing a "premium" privilege?
aehimself replied to Brandon Staggs's topic in Tips / Blogs / Tutorials / Videos
-
Is there a program for Converting from VCL to FMX?
programmerdelphi2k replied to JohnLM's topic in Delphi IDE and APIs
in fact, not! because exists many differences between it. then, you always will have code it. in RAD you can find "reFind.exe" that allow "replace" occurrences by other, but you need create your script manually