Created
July 2, 2013 01:43
-
-
Save gmanfunky/5906207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this .observers is a scala.collection.immutable.$colon$colon according to IntelliJ reflection | |
Observable.localState(state).observers.foreach(o => { | |
//insert accountName into each record. | |
println(o) //works | |
val accountName = o.accountName // produces compile error | |
val newRecordsWithAccountName = ArrayBuffer.empty[Record] | |
newRecords.foreach(aRecord => { | |
//where i will make a new Record object which includes accountName value | |
//stuff | |
newRecordsWithAccountName += aRecord | |
}) | |
//val msg = Crawler.CrawlResult(this, newRecords) | |
val msg = Crawler.CrawlResult(this, newRecordsWithAccountName) | |
logger.debug(this + " sending: " + msg + " -> " + o) | |
o ! msg | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment