Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/19/23 in Posts

  1. dummzeuch

    Does ChatAI make StackOverflow obsolete ?

    Sorry, I couldn't resist letting ChatGPT write a reply to this: (I'll try to resist in the future though because I don't want this to escalate into a thread that consists of ChatGPT generated stuff only.)
  2. Anders Melander

    ANN: Better Translation Manager released

    Good idea. Optimally I'd like to have a dialog that shows exactly (in a grid that can be sorted grouped and searched) what changed. There are several cases where it would be much better to use a custom form instead of a standard message dialog, but it's just so much faster (in terms of implementing it) to just display a message dialog. Yes 🙂 Not very intuitive. I'll see if I can differentiate between the three cases: Added, Unused and Re-added.
  3. programmerdelphi2k

    Animating rectangle position in code using fmx

    Rectangle2 into Rectangle1 or any other.... Rectangle2.Align = BOTTOM! LStart = Height or any other value! {$R *.fmx} var LStart : single; LStop : single; LImInUp: boolean = false; // note: moving the mouse very fast, you will get a kind of "flicker" procedure TForm1.FormCreate(Sender: TObject); begin FloatAnimation1.PropertyName := 'Height'; FloatAnimation1.Duration := 0.3; FloatAnimation1.AutoReverse := false; // LStart := Rectangle2.Height; LStop := LStart + 100; // Rectangle2.ClipChildren := true; end; procedure TForm1.Rectangle2MouseEnter(Sender: TObject); begin if not LImInUp then begin FloatAnimation1.Stop; FloatAnimation1.StartValue := LStart; FloatAnimation1.StopValue := LStop; FloatAnimation1.Start; LImInUp := true; end; end; procedure TForm1.Rectangle2MouseLeave(Sender: TObject); begin if LImInUp then begin FloatAnimation1.Stop; FloatAnimation1.StartValue := LStop; FloatAnimation1.StopValue := LStart; FloatAnimation1.Start; LImInUp := false; caption := 'leavin...' + timetostr(now) end; end;
  4. David Heffernan

    Does ChatAI make StackOverflow obsolete ?

    deleted (why can't we delete posts)
  5. Stefan Glienke

    How to free object compiled to Linux

    TJsonTextReader calls Close during Destroy on its FReader and that as Dalija explained might still work on Windows because even though the object and its memory is not valid anymore it has not been reused yet. You can test this quite easily with this code: uses FastMM5, System.Classes, System.JSON.Readers; begin FastMM_EnterDebugMode; var LStringReader := TStringReader.Create(''); var LJsonTextReader := TJsonTextReader.Create(LStringReader); LStringReader.Free; LJsonTextReader.Free; end. And you get a nice "A virtual method was called on a freed object" exception resulting from the FReader.Close call in TJsonTextReader.Close
  6. Lajos Juhász

    Animating rectangle position in code using fmx

    When the user moves outside the rect you want to move the rectangle to the first position thus the AnimateFloat should be corrected: procedure TForm2.Rectangle2MouseLeave(Sender: TObject); begin Rectangle2.AnimateFloat('Position.y', 222.0, 5, TAnimationType.InOut, TInterpolationType.Linear); // Rectangle2.Position.y := (Rectangle1.Position.Y + 200); end; Now you can easily see the real problem. As the rectangle is moved the mouse will get outside the rectangle and that will trigger the mouse leave event. To solve this you can change the height of the rectangle to 300.
  7. David Schwartz

    Delete substring from a string

    assuming you have a string that's just a comma-separated list of numbers like: var nums := '100, 101, 110, 1000, 1010, 1100, 200, 210'; just do something like this: var slist := TStringlist.Create; slist.CommaText := nums; if slist.IndexOf( '101' ) > 0 then // it's there else // it's not
  8. programmerdelphi2k

    Animating rectangle position in code using fmx

    implementation {$R *.fmx} var LImComingOrGoing: boolean = true; procedure TForm1.FormCreate(Sender: TObject); begin FloatAnimation1.StartValue := Rectangle2.Position.Y; FloatAnimation1.StopValue := (Rectangle2.Position.Y - 100); // FloatAnimation1.Trigger := 'IsMouseOver=True'; FloatAnimation1.TriggerInverse := 'IsMouseOver=False'; FloatAnimation1.PropertyName := 'Position.Y'; // FloatAnimation1.Duration := 0.5; FloatAnimation1.AutoReverse := false; // FloatAnimation1.StartValue := Rectangle2.Position.Y; FloatAnimation1.StopValue := (FloatAnimation1.StartValue - 100); end; procedure TForm1.FloatAnimation1Finish(Sender: TObject); begin FloatAnimation1.Stop; // if LImComingOrGoing then begin FloatAnimation1.StartValue := Rectangle2.Position.Y; FloatAnimation1.StopValue := (FloatAnimation1.StartValue - 100); end else begin FloatAnimation1.StartValue := Rectangle2.Position.Y; FloatAnimation1.StopValue := (FloatAnimation1.StartValue + 100); end; // LImComingOrGoing := not LImComingOrGoing; end;
  9. David Heffernan

    Does ChatAI make StackOverflow obsolete ?

    I think the answer to the original question is no
  10. programmerdelphi2k

    Select multiples lines at once

    "PUT a cursor n wich line selected" --> not "edit all lines" try o CnPack or GExpert plugins!
Ă—