Created
July 2, 2013 01:43
-
-
Save gmanfunky/5906207 to your computer and use it in GitHub Desktop.
Revisions
-
gmanfunky created this gist
Jul 2, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ //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 })