[Vala] Help with pub-sub class



With the help of other developers here on the list I managed to get my
logging class setup and working (thanks!). Now, that it's there, though, I
want to continue adding to it. The first big thing I want to do is come up
with default values for incoming messages (e.g. a default log level of
ERROR for new messages).

I've been trying to figure this out on my own and I keep hitting walls.

Here is my class:
https://github.com/steveno/balistica/blob/master/src/Logging.vala

Issues I've encountered:
* The signal "publish" seems unable to take two parameters.
* You apparently can't add a default value to a member of a struct.
* I can't figure out a way to get the method which writes to the log inside
the logging class because I keep needing access to instance members from a
static function. (
https://github.com/steveno/balistica/blob/master/src/BalisticaApplication.vala#L284
)

If anyone has any help or suggestions I'm all ears!

Steven N. Oliver


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]