Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 10/30/18 in all areas

  1. Uwe Raabe

    ImageName vs. ImageIndex

    Who hasn't seen this before: A bunch of controls and actions are linked to an ImageList with an ImageIndex, but as soon as you sort this ImageList to give it a sensible order all controls immediately start to show the wrong images. Wouldn't it be cool if instead a cryptic number as ImageIndex you could specify a descriptive name at the control? Thus the order of images inside the ImageList wouldn't matter at all. Of course, the ImageList has to support names in the first place. TPngImageList from PngComponents does that right from the beginning. So what about implementing that feature based on TPngImageList? Can't be that hard, can it? Well, it turned out to be a bit more complex than I anticipated, but that's probably because I had set my goals pretty high. So I expected to have a selection from image names for the ImageIndex properties of the control and thus a display of the image name instead of just a number. Also this scheme should be extendable to other controls and especially to other ImageLists supporting names. From this the ImageIndexMapper was born. A non-visual component to be placed on a form or datamodule, that when activated takes care of the image names. You just have to call one method to resolve those names to the actual corresponding number values. The attached ZIP file contains all the sources and files for the component and design time support as well as a sample project (currently for Delphi 10.2 Tokyo only). As a prerequisite you have to use PngComponents from the above source. I suggest to use the recent version V1.5.0 with direct ImageIndexMapper support. Older versions require the contained PNG Support Package to be installed and add the corresponding unit to your uses clause somewhere in your project. Version 1.5.0 makes this obsolete, Presumably there is much room for improvement. Whoever finds some time to test this component - please forward any encountered bug to me. Here is a short GIF showing the switch from TPngImageList to TImageList (without name support) in the Object Inspector: https://www.screencast.com/t/4MbJkygjFR ImageIndexMapper.zip Cross Post: https://www.delphipraxis.net/198212-imagename-statt-imageindex.html#post1415709
  2. Alexander Elagin

    Date / time format

    Is there any setting to make this forum display date and time in user-selected format? I could not find such setting, but I would prefer European or ISO 8601 format instead of "Sunday 12.24 PM" I currently see.
  3. Yes, yes ... you are right. Or at least not completely wrong. Seriously - the German forum is highly optimized. This forum here is still quite close to a default installation. There is room for improvement.
  4. Google+ used to be a great place for the international Delphi-community. But it will be shut down next year, so there was a need for a new home. The German speaking community “Delphi-PRAXiS” exists since 2002 and became one of the most important Delphi-communities in Germany, Austria and Switzerland. Now we want to make the next step: We created an English community parallel to our existing German community. We all wish that this community will experience a similar success as our German community. If you already are a German speaking Delphi-PRAXiS user, you can use your existing account, but you have to reset your password. Please visit the following page and follow the instructions: https://www.delphipraxis.net/pages/clone_account.html
  5. Hi, I think it would be fantastic to have a delphi language server. https://langserver.org This would open delphi to many editor and IDE (present and future). What do you think about ? Renaud
  6. Stefan Glienke

    Directions for ARC Memory Management

    Record creation does not take time because they are value types and live on the stack. If the ctor, dtor and assignment operators are called directly by the compiler and can possibly even be inlined this will have very little overhead which is negectable.
  7. Primož Gabrijelčič

    Directions for ARC Memory Management

    uses Spring; var ms := Shared.New(TStringList.Create); ...
  8. Cristian Peța

    Directions for ARC Memory Management

    What if we would have [safe] attribute? It would be very useful for local instances. We have [unsafe] attribute but not [safe]. In ARC all instances are implicitly [safe] and we need to explicitly mark with [unsafe] if we don't want ARC. I call this implicit ARC. But with [safe] we can have explicit ARC where all instances are implicit [unsafe].
  9. Lars Fosdal

    VCL/WinAPI programming/consultations

    Adding a few words about yourself is always useful.
  10. bernau

    Bookmarks in the forum?

    Maybe it's time for a donation button.
  11. I want to say a big Thank You to Daniel for providing a dedicated place for the MMX Code Explorer Community. This is much more that I would have been able to create by myself. Besides the website https://www.mmx-delphi.de/ this will be the most prominent place to announce new versions, answer questions and discuss new features.
  12. Marco Cantu

    Directions for ARC Memory Management

    That is part of the plan... we have some experimental demos, could evolve into a full feature
  13. Thanks Daniel and Lars. Very good move for the Delphi community. I'll be around.
  14. Dmitry Arefiev

    Directions for ARC Memory Management

    But if at least 1 managed field ...
×