![](https://en.delphipraxis.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://en.delphipraxis.net/uploads/monthly_2023_08/M_member_12120.png)
Michael Taylor
-
Content Count
6 -
Joined
-
Last visited
Posts posted by Michael Taylor
-
-
Do you have a current installation with a SLIP file? It would be in C:\ProgramData\Embarcadero. If so, you can upload that SLIP file to my.embarcadero.com under My Licenses and it will update your registered products.
This might only work for networked licenses, though.
-
On 9/27/2023 at 9:08 AM, Pat Foley said:I thinking to 'upgrade' to Enterprise I been able to debug over one screen vs two screens, 11.3 is as lithe and cat quick like D3.
Is the upgrade from Pro to Enterprise worth it? I think it might be nice for Linux development if it worked on Raspberry Pis. Can I ask what you want to upgrade to Enterprise for?
-
21 hours ago, David Heffernan said:This isn't true. Your class function calls the default constructor and that performs memory allocation. Free must be called. Instances of classes are heap allocated.
Doh, of course. That makes sense. Thank you, @David Heffernan!
-
Ahh, so that was it! I prefixed the parameters with 'A' and retried the constructor style, and it worked!
Thank you so much, @Anders Melander!
-
I have a fairly simple class where the only members are an enumerated type and an object whose members are two integers and a string. Nothing that needs memory management, so I wanted to call my constructor "From" instead of "Create" to signify that no memory allocation takes place, and Free won't be necessary. However, this doesn't seem to work. I created an ObjectDictionary<ItemType, Span> and populated it with Span.From(...) and none of the objects seemed to be properly created (they were just junk data). When I replaced the From constructor with a From class function, it worked properly.
Can someone tell me what is happening in the class function that isn't happening in the constructor that is making it work?
Thank you!
{ Some things left out for brevity } type Color = class public property Red: Integer; property Green: Integer; property Blue: Integer; constructor From(r, g, b: Integer); overload; constructor From(hexVal: String); overload; end; type ItemType = (A, B, C); type Span = class public property Color: Color; property item: ItemType; constructor From(item: ItemType, color: Color); end; implementation constructor Span.From(item: ItemType, color: Color); begin Color := color; Item := item; end; { The class function I replaced the constructor with. This works. } class function Span.From(item: ItemType, color: Color): Span; begin result := Span.Create; result.Color := color; result.Item := item; end;
Any Cyber Monday/Holiday Plugin Sales?
in Delphi Third-Party
Posted
Do any of the popular Delphi plugin libraries (TMS or anybody else) normally have sales around this time of year?