[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Code update and class variables
From: |
Holger Hans Peter Freyther |
Subject: |
[Help-smalltalk] Code update and class variables |
Date: |
Mon, 06 Sep 2010 15:11:28 +0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2 Thunderbird/3.1.1 |
Hi all,
I am currently 'porting' (redoing) the OpenBSC/Osmocom logging framework in
Smalltalk and while developing I see that I have one question/issue with
updating the code.
I have a LogArea which is a three tuple of (description, enabled, minLevel), I
have a LogConfig that holds a list of areas and gives them local names.
So I have something like:
Object subclass: LogConfig [
Config := LogConfig new.
LogConfig class >> default [
^ Config
]
addArea: anArea name: aName [
addInstanceVariableAndSetIt
GenerateGetMethod...
]
]
and in another Package/Namespace I would do..
log.LogConfig defaut addArea: localArea: #localName..
Now I have two issues:
1.) 1 to 3: [SomeClass class addInstVarName: #boo], will add #boo
three. Is that a bug? That should not be possible, bad things
will happen as a result..
2.) FileStream fileIn: 'Log.st'. will set Config back to a new
instance of LogConfig and all added areas are gone. What are the
workarounds? Put Config into the Smalltalk dict? Use Notifications
so people can add their areas again?
thanks for the help
z.
PS: I looked at Logging on squeaksource but I will need more.. different
areas, min debug level per area, context... e.g. only debug if this process is
handling data for this IMSI
- [Help-smalltalk] Code update and class variables,
Holger Hans Peter Freyther <=
- Re: [Help-smalltalk] Code update and class variables, Paolo Bonzini, 2010/09/06
- Re: [Help-smalltalk] Code update and class variables, Holger Hans Peter Freyther, 2010/09/06
- Re: [Help-smalltalk] Code update and class variables, Paolo Bonzini, 2010/09/06
- Re: [Help-smalltalk] Code update and class variables, Holger Hans Peter Freyther, 2010/09/06
- Re: [Help-smalltalk] Code update and class variables, Paolo Bonzini, 2010/09/06
- Re: [Help-smalltalk] Code update and class variables, Holger Hans Peter Freyther, 2010/09/06
- Re: [Help-smalltalk] Code update and class variables, Paolo Bonzini, 2010/09/07
- Re: [Help-smalltalk] Code update and class variables, Holger Hans Peter Freyther, 2010/09/07
- Re: [Help-smalltalk] Code update and class variables, Paolo Bonzini, 2010/09/07