Jump to content

Attila Kovacs

Members
  • Content Count

    2023
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    Prevent Delphi IDE Multiple Instance

    check your Delphi shortcuts for an assigned key-combo, it makes no sense what you are telling us
  2. If you have such a strong reference, you don't need the whole hocus-pocus. It will be the point where the object should be released regardless of whether it's an interface or not. I mean, the idea using FreeAndNil instead of locking.
  3. What interface references and automatic memory managed instances allow you to do is to have multiple, unshared, references to a shared object instance. And as long as some of those references is alive, that object instance will be alive and valid, too. But this is a different program as freeing randomly shared objects (Beginning of the story). You can do the same with a shared counter and atomic inc/dec without interfaces. Not to mention, that re-referencing that interface (creating new unshared references) has to be made in a tricky way, creating first a new, temporary reference to be sure its refcnt won't reach 0 at the same time. I'm also not sure, what this has to do with FreeAndNil(). Looks like somebody wanted to take a shortcut but did not work out and culprit is the language?
  4. Attila Kovacs

    MMX and (Parnassus) BookMarks

    This is so beautiful, I'll take it for my signature.
  5. The thumbnail suggests that you have owner-drawing on, the bug must be in your code.
  6. Well, it is. Explicit.
  7. I can't see any valid reason not to use FreeAndNil() yet, just complaints about not being able to read others code by ppl. who are well known for being ARC advocates.
  8. Thought so. GC warriors. Why not Java? Anyway, if they were interfaces that would be a different program. I don't think you are familiar with pointers at all.
  9. :DDDDDDD It's the same as x1.fee; in your ecample. Are you sure you understand pointers? Maybe Java would be a better choice?
  10. poor freeandnil(), it has nothing to do with it, it's a low-level design pattern you don't like
  11. At night in the cemetery, a dwarf bounces in front of the humpy and asks: - What's on your back? - A hump. - Do you need it? - No. - Then I'll take it. The humpy suddenly straightens, happily seeing that he is no longer crippled. He hurries home and meets the lame and tells what happened to him. The lame immediately rushes to the cemetery, searching for the dwarf. The dwarf jumps in front of him and asks: - What's on your back, lame? - Nothing... - Then get it, here's a hump!
  12. that would be wasting resources
  13. @Brian Evans cool, thx. It's time to forget this 30yo limitation and fixing FD.
  14. This is ridiculous. I can even free the dataset (TUniQuery), recreate it and use the bookmark again on it. Are you sure you have key-fields in your table? Maybe keyfields property should be set for firedac? procedure Run; var a: TQAdresse; bm: TBookmark; begin a := TQAdresse.Create; try a.Open; a.ID.Locate(105); WriteLn(a.ID.AsString); bm := a.Bookmark; a.Free; a := TQAdresse.Create; a.Open; if a.BookmarkValid(bm) then a.Bookmark := bm; WriteLn(a.ID.AsString); a.Next; WriteLn(a.ID.AsString); finally a.Free; end; end; Prints: 105 105 106 Done.
  15. I don't believe you. There was no bookmark in Delphi 1. Just tested with Devart's UniQuery, I can close the dataset and open it again, the bookmark is still valid. Maybe you are referring to some old BDE component or some other 3rd party which is for some reason saves an instance pointer/memory address too, instead of just key-field values. But I have never seen that before.
  16. @ChrisChuah Interesting, I suspect some extra unusual code what we can't see. Furthermore always use BookmarkValid() and do not use FreeBookmark. By the way, you have 2 indicators on the first pic, I never used Indicators but I don't think it's normal, do you have multiselect or similar turned on?
  17. No, it's pension and usually given before the elections.
  18. Is there anything which works like ctrl-H but for all Visible=False controls?
  19. Attila Kovacs

    IDE Hide / Show Non-Visible controls

    Correct
  20. Attila Kovacs

    IDE start randomly stops with error message

    @PeterPanettone that's why I suggest madExcept: http://help.madshi.net/madExceptConfiguration.htm , give it a try
  21. Attila Kovacs

    IDE start randomly stops with error message

    madExcept should catch it in the IDE too, you could install it temporarily
  22. Attila Kovacs

    Delphi 11.1 - High DPI

    wth?
  23. Attila Kovacs

    Freeing Show v ShowModal??

    If you are just asking about "'Action := caFree;", yes it's fine. Otherwise what David said. Non-modal needs different logic.
×