I've got an Actor class that manages a list of Actors. When it receives a message of a certain type, it passes it off to each of the Actors it knows about.
var loggers : List[Logger]
def receive = {
...
// log request
case logmessage : LogMessage => {
// send message to each logger (if none, nothing happens)
for (logger <- loggers)
logger ! logmessage
}
...
}
I'm getting a compile error on logger ! logmessage : "value ! is not a member of (package).Logger". The ! makes this very difficult to google. The Logger class compiles, having its own receive method, one line including self ! PoisonPill, meaning the ! operator works there. They're in the same package.