Re: [Help-smalltalk] Code update and class variables

2010-09-07 Thread Paolo Bonzini
On 09/07/2010 10:53 AM, Holger Hans Peter Freyther wrote: On 09/07/2010 04:23 PM, Paolo Bonzini wrote: LogTarget class methods can be used to set a default logging target and, as you mentioned, you could have also a per-process LogTarget. You can add a LogMultiplexer class to emulate log_add_

Re: [Help-smalltalk] Code update and class variables

2010-09-07 Thread Holger Hans Peter Freyther
On 09/07/2010 04:23 PM, Paolo Bonzini wrote: > LogTarget class methods can be used to set a default logging target > and, as you mentioned, you could have also a per-process LogTarget. > > You can add a LogMultiplexer class to emulate > log_add_target/log_del_target. It can be just an internal

Re: [Help-smalltalk] Code update and class variables

2010-09-07 Thread Paolo Bonzini
On Tue, Sep 7, 2010 at 03:45, Holger Hans Peter Freyther wrote: > Header File: > http://git.osmocom.org/gitweb?p=libosmocore.git;a=blob;f=include/osmocore/logging.h;h=7f33155a8330d5bc59d0262140ed3e8fea34050a;hb=HEAD Ok, so... 73 struct log_target { 74 struct llist_head entry; 75

Re: [Help-smalltalk] Code update and class variables

2010-09-06 Thread Holger Hans Peter Freyther
On 09/06/2010 07:09 PM, Paolo Bonzini wrote: > > Do you have a pointer to the API you're taking inspiration from? Header File: http://git.osmocom.org/gitweb?p=libosmocore.git;a=blob;f=include/osmocore/logging.h;h=7f33155a8330d5bc59d0262140ed3e8fea34050a;hb=HEAD Implementation: http://git.osmo

Re: [Help-smalltalk] Code update and class variables

2010-09-06 Thread Paolo Bonzini
On Mon, Sep 6, 2010 at 12:53, Holger Hans Peter Freyther wrote: >>> 2.) #doesNotUnderstand will not work from what I see as the Logging Module >>> does not know who is going to add areas to it, unless I do something like >>> LogConfig allSubClassesDo: []... is that appropriate? >> >> I don't under

Re: [Help-smalltalk] Code update and class variables

2010-09-06 Thread Holger Hans Peter Freyther
On 09/06/2010 06:24 PM, Paolo Bonzini wrote: > However, it's broken and only works if "instance class" has no instance > variables at all. I'll shortly push a fix. awesome! GNU Smalltalk is getting better and better, does anyone think a windows version will help us to get more devs? > >> 2.)

Re: [Help-smalltalk] Code update and class variables

2010-09-06 Thread Paolo Bonzini
On 09/06/2010 11:46 AM, Holger Hans Peter Freyther wrote: On 09/06/2010 04:30 PM, Paolo Bonzini wrote: It's a bit ugly, but not strictly a bug. I suggest you use a dictionary, and #doesNotUnderstand: instead of a getter, especially because you're adding the instance variables to _all_ instances

Re: [Help-smalltalk] Code update and class variables

2010-09-06 Thread Holger Hans Peter Freyther
On 09/06/2010 04:30 PM, Paolo Bonzini wrote: > > It's a bit ugly, but not strictly a bug. I suggest you use a > dictionary, and #doesNotUnderstand: instead of a getter, especially > because you're adding the instance variables to _all_ instances of > LogConfig rather than just one. Two more que

Re: [Help-smalltalk] Code update and class variables

2010-09-06 Thread Paolo Bonzini
On Mon, Sep 6, 2010 at 09:11, Holger Hans Peter Freyther wrote: > 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 (

[Help-smalltalk] Code update and class variables

2010-09-06 Thread Holger Hans Peter Freyther
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 area