Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 10/16/23 in all areas

  1. dummzeuch

    Testers needed for GExperts Instant Grep expert

    Hm, yes that could be done. On the other hand, I could move the line number to the left column too, so it occupies the space under the file name which you left empty.
  2. dummzeuch

    Testers needed for GExperts Instant Grep expert

    Fixed in revsion #4067 by putting a panel between form and listbox. (No idea why this works, but I tried that because the Grep Results window also had a panel as parent for the listbox. Maybe that's the reason why that panel exists there too.
  3. You may want to give pyscripter/Ssh-Pascal: Delphi ssh library wrapping libssh2 (github.com) a try. It is a wrapper around libssh2, includes scp, sftp, ssh support. Very fast.
  4. Anders Melander

    Chilkat Delphi DLL API - Experiences

    One of my current clients has been using ChilKat for FTP & SFTP for years and it seems to work fine. The first thing I did in order to work with it was write a set of wrapper classes that hide the ugly DLL API and abstract the FTP and SFTP differences away. I'd have preferred something with source code though, but AFAIK there's nothing for Delphi and the choice had already been made.
  5. Lars Fosdal

    Parallel Resampling of (VCL-) Bitmaps

    For me, the fastest blur is created by taking off my glasses...
  6. Then you have been very lucky. Every single GExperts release for the last few years has been flagged as malware. After trying to correct this once or twice by contacting the antivirus publishers I simply gave up and whitelist it for my computers. I don't sign my executables and installers though, maybe that would help.
  7. Joseph MItzen

    Update issue

    He just got 11.3 running; don't frighten him further.
  8. Remy Lebeau

    Rad 12 Beta - Link to News

    https://delphiworlds.com/2023/09/yukon-is-coming/ https://dalijap.blogspot.com/2023/09/coming-in-delphi-12-disabled-floating.html https://blog.marcocantu.com/blog/2023-09-yukonbeta-stringliterals.html MVPs were given permission to start blogging just a few days ago, but they have to be approved by Embarcadero before they're published. so I'm sure there will be more blog posts coming soon.
  9. Hi All I recently did a presentation to the Australian Delphi User Group (ADUG) over zoom - the presentation was recorded and uploaded to youtube - thought it might be worth sharing here 😉 I talked a bit about devops in general, then Continuous Integration and Automated Builds, before showing Continua CI using MSBuild (and a bit of FinalBuilder), running a build, running unit tests etc.
  10. Remy Lebeau

    FreeAndNil 10.4 vs 10.3.1 and Pointers

    in C++, const is much more flexible than in Delphi, more so than that documentation explains. The semantics of const depend on WHERE the const is placed. In general, const applies to the thing on its left, unless there is nothing there then it applies to the thing on its right instead. So, for instance, if we have these declarations in C++: void FreeAndNil(const TObject* &Obj); or void FreeAndNil(TObject const * &Obj); Then the const applies only to the TObject instance that is being pointed at, so its data members cannot be changed by the function. The const does not apply to the TObject* pointer itself, which is being passed by reference, so that pointer can be freely assigned a new value by the function to point at a different TObject instance or null, and that change is reflected to the caller's variable. Whereas if we have this declaration instead in C++: void FreeAndNil(TObject* const &Obj); Then the const applies only to the TObject* pointer itself, thus it can't be assigned a new value by the function. The const does not apply to the TObject instance, so its data members can be freely modified by the function. The two examples above can be combined to have a const pointer to a const TObject instance: void FreeAndNil(const TObject* const &Obj); or void FreeAndNil(TObject const * const &Obj); It does not make sense to put const after Obj, since by definition a reference cannot be reseated once it has been initialized: void FreeAndNil(... &Obj const); or void FreeAndNil(... &Obj const); Now, given this declaration in Delphi: procedure FreeAndNil(const [ref] Obj: TObject); The semantics of this are roughly equivalent to the above C++ code - a reference to a const pointer to a const TObject instance (I don't have 10.4 installed to look at how FreeAndNil() is actually declared in C++Builder). That is fine and good to get a pointer to a TObject-based instance passed into the function by reference, but normally Delphi would then not allow that pointer to be assigned a new value. So FreeAndNil() employs a workaround for that: TObject(Pointer(@Obj)^) := nil; Applying the @ operator to a reference parameter returns the address of the passed variable. Then all const-ness on that variable is being casted away, thus allowing the function to assign a new value to that variable. That would be something along the lines of the following in C++: ((TObject*&)(*(void**)&ref)) = nullptr; or reinterpret_cast<TObject*&>(const_cast<void*&>(*reinterpret_cast<const void * const *>(&ref))) = nullptr; or const_cast<TObject*&>(const_cast<const TObject * const &>(ref)) = nullptr; Except that if a C++ compiler sees a 'const TObject* const &' function parameter, and is passed anything other than a 'const TObject*' variable, an implicit conversion is performed and an rvalue gets passed to the reference parameter, so the function modifies the rvalue, not the caller's original variable. For example: https://ideone.com/CO4Dac So, there is likely some additional compiler magic in C++Builder to avoid this problem with FreeAndNil() specifically. Unless I'm missing something.
  11. Dalija Prasnikar

    FreeAndNil 10.4 vs 10.3.1 and Pointers

    Everyone please vote for Global Generics https://quality.embarcadero.com/browse/RSP-13724 So we can have type safe FreeAndNil without quirks and lies.
  12. Dalija Prasnikar

    FreeAndNil 10.4 vs 10.3.1 and Pointers

    Maybe you will find some answers here https://dalijap.blogspot.com/2020/06/magic-behind-freeandnil.html
  13. How about myappname := extractfilename(paramstr(0)) Delphi Basics: paramstr
  14. Well, nobody really knows what that is. But your question is how to find the name of a UWP app from a top level window handle. Which is a question asked here https://stackoverflow.com/q/32001621/505088
×