The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,574 other followers

Spring4D: How is the GlobalContainer intended to be used? Are there important don’ts? – Google Groups

Posted by jpluimers on 2014/08/04

Short answer: do not use the GlobalContainer.

Long answers are in this Spring4D thread: How is the GlobalContainer intended to be used? Are there important don’ts? – Google Groups.

Especially read this message by Stefan Glienke that shows you to setup your main program without using GlobalContainer at all.

Note that this doesn’t mean you should avoid a container at all.

Background information:

–jeroen

5 Responses to “Spring4D: How is the GlobalContainer intended to be used? Are there important don’ts? – Google Groups”

  1. IL said

    Thank you for the notice. I’ve learnt about TSortedList in DEHL and uSortCustomers.pas in Spring4d (perhaps older version before TSortedList was introduced), but I couldn’t figure out how to use it to keep the collection TList(Key:Integer,TList(Data:Integer)) sorted with only top 10 numbers in it. In fact I don’t like the idea of filling whole collection before doing the sort instead of doing sorted insert.

  2. IL said

    Here is my 1st little program using generics made intentionally in Delphi XE – GetDocumentsPath, you know :) http://pastebin.com/V7ZH1y8M
    It sorts file names in $HOME/My Documents/123.txt (exported from Everything) to find 10 longest elements.
    Could you have a look at the code and tell me of any basic misuse of generics you can see there.
    Did I missed generic TSortedList have been invented already?
    The code should be documented to be easy to read, sorry, but it is self explanatory enough.
    Thank you.

    • sglienke said

      Spring4D in fact has a TSortedList.

      • IL said

        Thank you for the notice. I knew of TSortedList in DEHL and uSortCustomers.pas in Spring4d, and it still botheres me that I couldn’t figure out how to use it for my task to keep TList<Key:integer,TList collection sorted. In fact I don’t like the idea to fill the collection completely before doing the sort instead of doing sorted insert.

    • jpluimers said

      Sorry: pastebin.com is blocked from where I’m right now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: