Jump to content

Michael Taylor

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria
  1. Do any of the popular Delphi plugin libraries (TMS or anybody else) normally have sales around this time of year?
  2. Michael Taylor

    Activate account content at my.embarcadero.com/

    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.
  3. Michael Taylor

    Is it worth resubscribing now?

    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?
  4. Doh, of course. That makes sense. Thank you, @David Heffernan!
  5. 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!
  6. 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;
×