where to store my own application attributes?
Chris Muller <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Message-ID | <CANzdToGj0VMNaappmo=ejC0YG4hd1wbZNRG9G1iMi_BM2jbmBA@mail.gmail.com> |
Where do people store their own application-level attributes? #myDbLocation, for example? This is such a basic question for every web app, I'm surprised tto find he answer so elusive.. I was looking at WAApplication>>#preferenceAt: and #preferenceAt:put:. Even though DB Location is a property, not "preference" I thought it would at least work.. Nope. #preferenceAt: goes through its WAUserConfiguration's specific set of "attributes", which I have not yet figured out how to extend.. .. and I'm not sure I would want to because access to those attributes is very inefficient -- creating a temporary IdentityDictionary and IdentitySet, enumerating all "ancestors" and each ancestor enumerating its "localAttributes" while adding and checking the IdentitySet in an inefficient way too.. Maybe I don't need efficient access, not sure yet, but I was really just looking for a properties Dictionary I could use; simple, fast and unrestricted... That's what I thought the #preferenceAt: was. Now I see besides #attributeAt:, WAConfiguration also has #at:,.... but its not obvious what it is doing. Do I need to define my own subclass of WAConfiguration to do this? Any advice is appreciated..