A fix will be up in the next few days. On Mon, Dec 21, 2009 at 2:03 PM, Vesa <brut...@gmail.com> wrote:
> Hi, > > I noticed logged in user still can't see messages by other users they > follow. There were couple of messages still missing parameters. Patch > shows the parts that need to be modified to get it working again. > > - Vesa > > diff --git a/lift-examples/skittr/src/main/scala/com/skittr/actor/ > UserActor.scala b/lift-examples/skittr/src/main/scala/com/skittr/actor/ > UserActor.scala > index cb51f45..a057192 100644 > --- a/lift-examples/skittr/src/main/scala/com/skittr/actor/ > UserActor.scala > +++ b/lift-examples/skittr/src/main/scala/com/skittr/actor/ > UserActor.scala > @@ -101,7 +101,7 @@ class UserActor extends LiftActor { > > // tell all our friends that we follow them > case ConfigFollowers => > - friends.flatMap(f => UserList.find(f).toList).foreach(_ ! > AddFollower) > + friends.flatMap(f => UserList.find(f).toList).foreach(_ ! > AddFollower(this)) > // if the "autogen" property is set, then have each of the > actors > // randomly generate a message > if (User.shouldAutogen_? || System.getProperty("autogen") != > null) autoGen > @@ -110,11 +110,12 @@ class UserActor extends LiftActor { > > // if we add a friend, > case AddFriend(name) => > + > friends = (name :: friends).sort(_ < _) > // find the user > UserList.find(name).foreach{ > ua => > - ua ! AddFollower // tell him we're a follower > + ua ! AddFollower(this) // tell him we're a follower > (ua !? GetUserIdAndName) match { // get the user info > case UserIdInfo(id, _,_, _) => Friend.create.owner > (userId).friend(id).save // and persist a friend connection in the DB > case _ => > @@ -127,7 +128,7 @@ class UserActor extends LiftActor { > // find the user > UserList.find(name).foreach{ > ua => > - ua ! RemoveFollower // tell them we're no longer following > + ua ! RemoveFollower(this) // tell them we're no longer > following > (ua !? GetUserIdAndName) match { // delete from database > case UserIdInfo(id, _,_,_) => Friend.findAll(By > (Friend.owner, userId), By(Friend.friend, id)).foreach(_.delete_!) > case _ => > > > > > On 17 joulu, 16:35, David Pollak <feeder.of.the.be...@gmail.com> > wrote: > > On Thu, Dec 17, 2009 at 4:35 AM, Vesa <brut...@gmail.com> wrote: > > > Hi, > > > > > I was trying to run the skittr example from the lift-examples and it > > > doesn't seem to work. It's demonstrating usage of comet but it doesn't > > > get that far as the comet actor never receives any messages due to a > > > bug. Also the indentation is a mix of spaces and tabs of different > > > width and looks quite messed up. How should I deliver a fix when I'm > > > done? > > > > There's a single simple bug. When we moved from Scala Actors to Lift > > Actors, we moved from a case object AddTimelineViewer to case class > > AddTimelineViewer(who: SimpleActor[Any]) Unfortunately, the compiler > didn't > > flag the actor ! AddTimelineViewer line as a bug... it converted the line > to > > actor ! (who => AddTimelineViewer.apply) and passed a function as a > > message. I've fixed the code locally (WatchUser.scala lines 49-52 > become): > > > > override def localSetup { > > userActor = name.flatMap(name => UserList.find(name)) > > userActor.foreach{ua => ua ! AddTimelineViewer(this) ; messages = > (ua > > !? GetTimeline) match {case Timeline(m) => m; case _ => Nil}} > > } > > > > I'll get a patch onto review board by end of day today. > > > > > > > > > > > > > > > > > - Vesa > > > > > -- > > > > > You received this message because you are subscribed to the Google > Groups > > > "Lift" group. > > > To post to this group, send email to lift...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > <liftweb%2bunsubscr...@googlegroups.com<liftweb%252bunsubscr...@googlegroups.com>> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/liftweb?hl=en. > > > > -- > > Lift, the simply functional web frameworkhttp://liftweb.net > > Beginning Scalahttp://www.apress.com/book/view/1430219890 > > Follow me:http://twitter.com/dpp > > Surf the harmonics > > -- > > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.