Marten Feldtmann
unread,Nov 10, 2011, 8:46:43 AM11/10/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to va-sma...@googlegroups.com
1) In the documentation ("Initializing an IC") it can be read, that ICs - being loaded as a result of an explizit binding (e.g. via System loadComponent:) are the following methods send: #loaded and #startUp.
This is not quite right. If it is a leaf ic, the startUp method is sent - otherwise not. The method #loaded is the way to initialize the IC itself.
2) ICs and configuration values (stanza) is another topic:
You could get the idea to store configuration values into the ini-files and the loaded ICs get their configuration values from that ini file. I've mentioned in another posting, that the first question you must answer: which ini-file is going to be read.
If you have a command line like:
..\server\bin\esvio -imskxdseasidestarter.ic
you could guess, that you may store the stanza chapter for the application included in this ic in a file named "mskxdseasidestarter.ini". Well this is wrong. You have to put it into "esvio.ini". This is in contrast to the documentation.
Now if you load additional ICs within that application via #loadComponent: you will be surprised to see, that the system will NEVER give you the values from an ini file - it will work on the default values defined by the class method #currentSettings of your application class.
The reason: VASmalltalk only reads the stanza values from already loaded applications sometimes near the startUp time of your working image - and at startUp time the application was NOT loaded.
To get rid of this behaviour you must manually execute a "System inizializeSettings" in the #loaded method of your application class side.
If you have fixed this the only question remains: which ini-file ? Yes right: you have to put it into the "esvio.ini" file
You may ask, why I go all this different way. Well, I have now a standard Seaside server, being able to execute/offer several programs. Which application is registered is now defined in the configuration values within the ini file.