Groups
Groups
Sign in
Groups
Groups
Lift
Conversations
About
Send feedback
Help
Calling a method from other snippet
4 views
Skip to first unread message
sunanda
unread,
Oct 21, 2009, 7:06:44 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lift
Hi,
I have a method updateColumn() in ColumnInfo.scala snippet.
I need to call this method form another snippet GridInfo.scala
How can I do this.
Sunanda
Ross Mellgren
unread,
Oct 21, 2009, 9:43:04 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
Just call it:
class FirstSnippet {
def render(ns: NodeSeq): NodeSeq = {
bind("foobar", ns,
"otherSnippet" -> new SecondSnippet.render _)
}
}
class SecondSnippet {
def render(ns: NodeSeq): NodeSeq = <div>hello!</div>
}
-Ross
Naftoli Gugenheim
unread,
Oct 21, 2009, 9:50:38 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
That needs to be new SecondSnippet().render or (new SecondSnippet).render
-------------------------------------
Ross Mellgren
unread,
Oct 21, 2009, 9:54:54 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
So true. I need a REPL built in to my email client ;-)
-Ross
Naftoli Gugenheim
unread,
Oct 21, 2009, 10:03:37 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
How about building an email client into your REPL? ;)
Ross Mellgren
unread,
Oct 21, 2009, 10:18:29 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
Screw it, I'll just do all three in emacs. GUIs are for wimps anyway,
right?
-Ross
Jim Barrows
unread,
Oct 21, 2009, 10:20:46 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
Doesn't emacs already do all three?
Sent on the Now Network™ from my Sprint® BlackBerry
Ross Mellgren
unread,
Oct 21, 2009, 10:25:44 PM
10/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lif...@googlegroups.com
It sure does, but I'm a wimp and use Mail.app for mail, Terminal.app
for REPL and terminal, and Emacs for editing, mostly.
-Ross
Reply all
Reply to author
Forward
0 new messages