Jump to content

Ruslan

Members
  • Content Count

    46
  • Joined

  • Last visited

Posts posted by Ruslan


  1. Maybe a stupid question but not for me at the moment.

    Need a way to draw rectangles on a canvas and then to make it possible to resize, move, delete or clone. That is needed to automate some process of segmentation objects (same kind of objects by rectangles with same aspect ratio) on a bunch of images (>100K).

    For now I can draw rectagles on a TImage canvas wthout any questions. But can't figure out how to select that rectangle with mouse, resize it, scale it and move.

    Or maybe should I look at shapes?


  2. On 2/10/2020 at 7:22 AM, Larry Hengen said:

    Well I have been using FlameRobin which is cross platform, but has some issues and is apparently no longer under active development.  I thought I would try out this utility, but I downloaded the Win64 Zip package, expanded it into a folder and launched it.....BOOM...AV before the main GUI appeared. 

    Same thing for me, AV on start


  3. If the question is about of language choice, than I would recommend (as I do for my projects):

    • first of all I would prefer python for scientific calculations and operations, but I don't like it because of its script language and I couldn't compile it in a lib/dll/exe, even if I do use it in some projects
    • than, if the choice for scientific calculations and operations was not in favor of python, I would chose C++, it could be used to build DLLs for later use
    • and last but not least, I prefer Delphi for visual/database/networking applications programming, here I can use my DLLs created in C++

    What I wanted to say is that you should not stop looking in one direction, there is no just one solution for developing a project, its up to you what to chose, but need to think before and model your project before all.

    • Like 1

  4. 19 hours ago, David Heffernan said:

    You said that the objects were instantiated by calling the constructor. You later say that they are loop variables used when iterating over a collection.

    These are just 2 ways of usage (in a constructor "OR" as iterator) as was written

    22 hours ago, Ruslan said:

    (e.g. aItem := TItem.Create;  or as iterations in Dictionary or ObjectLists)

    that is the answer I was expected for iterators

    19 hours ago, David Heffernan said:

    you never need to set the loop variable to nil

    so I guess if a pointer is declared in a method that is used to fill a Dictionary, List or ObjectList than it is not needed to set it to nil at the end


  5. 2 hours ago, ByteJuggler said:

    This means if you merely assign "nil" to an object reference, the memory pointed to originally by that reference is still allocated in the heap somewhere, but now "lost" -- you've caused a memory leak(!).  

    I do not need to free the object, I use the variable as a iterator in a Dictionary or ObjectList, so the items in them do not need to be freed.

    I don't have problems o memory leaks, all the objects a freed where should be, I have just some messages in building the project.

     

    Please read again my question.


  6. I use a lot of class/pointer variables (e.g. aItem := TItem.Create;  or as iterations in Dictionary or ObjectLists) inside methods as local and temporary variables, at the end of each method I used to write "aItem := nil;" if no longer need that.

    In building the application I see a lot of "H2077 Value assigned to 'aItem' never used".

    Also in some functions I used to write the default Boolean Result value at the beginning as "False", and the builder show in messages "H2077 Value assigned to <function> never used".

     

    What is the right way of freeing the local class variables (without loosing the data) and default function result values?

     


  7. 3 minutes ago, Ruslan said:

    I use TFrameStand, on a frame there are buttons with actions, on destroying the frame a AV error shows up from FMX.Controls TControl.CLick (line 4314)

    
    if LAction <> nil then
      LAction.Target := nil;

    LAction is not nil but all its members are.

    Is it a bug or am I doing something wrong?

    Solved that by adding folowing code into buttons' actions

    TDelayedAction.Execute(50
    , procedure
    	begin
    		// action code
    	end
    );

     


  8. I use TFrameStand (using Wizard demo), on a frame there are buttons with actions, on destroying the frame a AV error shows up from FMX.Controls TControl.CLick (line 4314)

    if LAction <> nil then
      LAction.Target := nil;

    LAction is not nil but all its members are.

    Is it a bug or am I doing something wrong?

×