You can check to see if the pool dictionary was properly created by typing Smalltalk in the System Transcript window, selecting it, and then selecting Inspect from the System Transcript's pop-up menu. This opens a browser on the Smalltalk dictionary. Use the browser to inspect the pool dictionary and confirm that the proper values have been added.Note that the entire body of the method is a single comment. The application's loaded method can still be used to set the non-constant entries in MyPoolDictionary.With a pragma declaration in toBeLoadedCode, the image builder recognizes the declarations and removes them automatically when the application is unloaded.If you created pool dictionaries for your parts, you can initialize the pool dictionary values in your loaded method.The following is an alternative buildPoolDictionaries method which initializes a single value in the pool dictionary at load time.Updating pool dictionaries in your loaded method can be handy when you need to reference classes and methods that you could not reference in your pragma code because they were not yet loaded.In this example, it's very important that you reference the pool dictionary entry by its name, rather than by an expression like MyConstants at:'COMMAND'. Using MyConstants at:'COMMAND' will defeat VA Smalltalk packaging optimizations by including the entire pool dictionary in the application instead of including only the required values.
![]() |