[Lift] Re: directives versus snippets

2009-06-04 Thread Matt Williams

 There's a dispatcher in Lift and it checks for user-supplied snippets before
 dispatching to the hard-coded snippet names.

Is this actually the case?

I have tried to replace the buiiltin snippet for Msgs in order to
embed a span within the list items, but I needed to use a different
name for the class, as it was still rendering using the builtin.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-06-04 Thread David Pollak
In order to override a built-in snippet, you must do:
LiftRules.snippetDispatch.prepend{
  case Msgs | msgs = 
}

in Boot.  The LiftRules snippet dispatch table is consulted first, before
the by convention reflection-based snippet dispatching is invoked.  This
enhances performance.

On Thu, Jun 4, 2009 at 8:14 AM, Matt Williams m...@makeable.co.uk wrote:


  There's a dispatcher in Lift and it checks for user-supplied snippets
 before
  dispatching to the hard-coded snippet names.

 Is this actually the case?

 I have tried to replace the buiiltin snippet for Msgs in order to
 embed a span within the list items, but I needed to use a different
 name for the class, as it was still rendering using the builtin.

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-06-04 Thread Matt Williams

Thank you David.

Hello by the way, and thank you for such a graceful framework.

Matt

On Jun 4, 5:21 pm, David Pollak feeder.of.the.be...@gmail.com wrote:
 In order to override a built-in snippet, you must do:
 LiftRules.snippetDispatch.prepend{
   case Msgs | msgs = 

 }

 in Boot.  The LiftRules snippet dispatch table is consulted first, before
 the by convention reflection-based snippet dispatching is invoked.  This
 enhances performance.

 On Thu, Jun 4, 2009 at 8:14 AM, Matt Williams m...@makeable.co.uk wrote:

   There's a dispatcher in Lift and it checks for user-supplied snippets
  before
   dispatching to the hard-coded snippet names.

  Is this actually the case?

  I have tried to replace the buiiltin snippet for Msgs in order to
  embed a span within the list items, but I needed to use a different
  name for the class, as it was still rendering using the builtin.

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-04-10 Thread David Pollak
Bob,
They are actually the same thing.  Lift's processing directives are simply
built-in snippets.  You can, if you dare, override their functionality. :-)

Thanks,

David

On Fri, Apr 10, 2009 at 11:23 AM, bob rbpas...@gmail.com wrote:


 if I see lift:/, it could mean one of two things: a directive,
 e.g., lift:bind/ or lift:surround/ or shorthand for a snippet, eg
 lift:myClass represents lift:snippet type=MyClass

 i guess I would like to see these disambiguated a shorthand for
 snippets that doesn't overlap with the directive namespace.

 some possible solutions:

 1. lift:bind/ would be the directive and lift:.bind/ would be the
 snippet. please don't get hung up on my use of dot. it is only an
 example, and not an actual suggestion.

 2. lift:bind/ maps to a real class, not some internal code, much the
 way lift:msgs/ maps to net.liftweb.builtin.snippets.Msgs  (thanks
 Jorge)

 3. lift:bind is the directive, and liftsnippet:bind is the snippet

 comments?

 thanks, bob


 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-04-10 Thread bob

ok, Jorge told me on IRC that bind and surround are hard-coded

11:16 bobinator so,if lift:helloWorld.howdy/ maps to Class
HelloWorld#howdy,i assume lift:bindand lift:msgs map to Class Bind
and Class Msgs, with some special sauce for the method?
11:15 jorgeortiz85 actually, all the directives could be implemented
as snippets
11:16 jorgeortiz85 the fact that they aren't is just legacy cruft
11:16 jorgeortiz85 lift:msgs does
11:16 jorgeortiz85 lift:bind is hard-coded




On Apr 10, 11:26 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 Bob,
 They are actually the same thing.  Lift's processing directives are simply
 built-in snippets.  You can, if you dare, override their functionality. :-)

 Thanks,

 David



 On Fri, Apr 10, 2009 at 11:23 AM, bob rbpas...@gmail.com wrote:

  if I see lift:/, it could mean one of two things: a directive,
  e.g., lift:bind/ or lift:surround/ or shorthand for a snippet, eg
  lift:myClass represents lift:snippet type=MyClass

  i guess I would like to see these disambiguated a shorthand for
  snippets that doesn't overlap with the directive namespace.

  some possible solutions:

  1. lift:bind/ would be the directive and lift:.bind/ would be the
  snippet. please don't get hung up on my use of dot. it is only an
  example, and not an actual suggestion.

  2. lift:bind/ maps to a real class, not some internal code, much the
  way lift:msgs/ maps to net.liftweb.builtin.snippets.Msgs  (thanks
  Jorge)

  3. lift:bind is the directive, and liftsnippet:bind is the snippet

  comments?

  thanks, bob

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-04-10 Thread Jorge Ortiz
Huh?

lift: snippet, surround, embed, ignore, comet, children, a, form, loc, and
with-param are all built-in in liftTagProcessing. Yes, they're overrideable,
but imo it'd be nicer if they were Just A Snippet, like, say, lift:msgs.

lift:bind is just bad naming. it's not actually a directive, it's just what
lift:surround looks for to bind at. should probably be called surround:bind
or something with a different namespace.

--j

On Fri, Apr 10, 2009 at 1:26 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Bob,
 They are actually the same thing.  Lift's processing directives are simply
 built-in snippets.  You can, if you dare, override their functionality. :-)

 Thanks,

 David

 On Fri, Apr 10, 2009 at 11:23 AM, bob rbpas...@gmail.com wrote:


 if I see lift:/, it could mean one of two things: a directive,
 e.g., lift:bind/ or lift:surround/ or shorthand for a snippet, eg
 lift:myClass represents lift:snippet type=MyClass

 i guess I would like to see these disambiguated a shorthand for
 snippets that doesn't overlap with the directive namespace.

 some possible solutions:

 1. lift:bind/ would be the directive and lift:.bind/ would be the
 snippet. please don't get hung up on my use of dot. it is only an
 example, and not an actual suggestion.

 2. lift:bind/ maps to a real class, not some internal code, much the
 way lift:msgs/ maps to net.liftweb.builtin.snippets.Msgs  (thanks
 Jorge)

 3. lift:bind is the directive, and liftsnippet:bind is the snippet

 comments?

 thanks, bob






 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-04-10 Thread David Pollak
Who you gonna believe? :-)

There's a dispatcher in Lift and it checks for user-supplied snippets before
dispatching to the hard-coded snippet names.

You can override the built-in names and there are a bunch of different
snippet dispatch mechanisms (by convention, by partial function, hard-coded)
 This does not change the fact the the lift:xxx/ tag is encountered and
the body of the tag is dispatched someplace for processing.

On Fri, Apr 10, 2009 at 11:29 AM, bob rbpas...@gmail.com wrote:


 ok, Jorge told me on IRC that bind and surround are hard-coded

 11:16 bobinator so,if lift:helloWorld.howdy/ maps to Class
 HelloWorld#howdy,i assume lift:bindand lift:msgs map to Class Bind
 and Class Msgs, with some special sauce for the method?
 11:15 jorgeortiz85 actually, all the directives could be implemented
 as snippets
 11:16 jorgeortiz85 the fact that they aren't is just legacy cruft
 11:16 jorgeortiz85 lift:msgs does
 11:16 jorgeortiz85 lift:bind is hard-coded




 On Apr 10, 11:26 am, David Pollak feeder.of.the.be...@gmail.com
 wrote:
  Bob,
  They are actually the same thing.  Lift's processing directives are
 simply
  built-in snippets.  You can, if you dare, override their functionality.
 :-)
 
  Thanks,
 
  David
 
 
 
  On Fri, Apr 10, 2009 at 11:23 AM, bob rbpas...@gmail.com wrote:
 
   if I see lift:/, it could mean one of two things: a directive,
   e.g., lift:bind/ or lift:surround/ or shorthand for a snippet, eg
   lift:myClass represents lift:snippet type=MyClass
 
   i guess I would like to see these disambiguated a shorthand for
   snippets that doesn't overlap with the directive namespace.
 
   some possible solutions:
 
   1. lift:bind/ would be the directive and lift:.bind/ would be the
   snippet. please don't get hung up on my use of dot. it is only an
   example, and not an actual suggestion.
 
   2. lift:bind/ maps to a real class, not some internal code, much the
   way lift:msgs/ maps to net.liftweb.builtin.snippets.Msgs  (thanks
   Jorge)
 
   3. lift:bind is the directive, and liftsnippet:bind is the snippet
 
   comments?
 
   thanks, bob
 
  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-04-10 Thread David Pollak
On Fri, Apr 10, 2009 at 11:31 AM, Jorge Ortiz jorge.or...@gmail.com wrote:

 Huh?

 lift: snippet, surround, embed, ignore, comet, children, a, form, loc, and
 with-param are all built-in in liftTagProcessing. Yes, they're overrideable,
 but imo it'd be nicer if they were Just A Snippet, like, say, lift:msgs.


It's on my to-do list to do a little house cleaning in this area.




 lift:bind is just bad naming. it's not actually a directive, it's just what
 lift:surround looks for to bind at. should probably be called surround:bind
 or something with a different namespace.


Yeah... we should deprecate lift:bind/ because it's not the same thing.
 Please open a defect on this for me.




 --j

 On Fri, Apr 10, 2009 at 1:26 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Bob,
 They are actually the same thing.  Lift's processing directives are simply
 built-in snippets.  You can, if you dare, override their functionality. :-)

 Thanks,

 David

 On Fri, Apr 10, 2009 at 11:23 AM, bob rbpas...@gmail.com wrote:


 if I see lift:/, it could mean one of two things: a directive,
 e.g., lift:bind/ or lift:surround/ or shorthand for a snippet, eg
 lift:myClass represents lift:snippet type=MyClass

 i guess I would like to see these disambiguated a shorthand for
 snippets that doesn't overlap with the directive namespace.

 some possible solutions:

 1. lift:bind/ would be the directive and lift:.bind/ would be the
 snippet. please don't get hung up on my use of dot. it is only an
 example, and not an actual suggestion.

 2. lift:bind/ maps to a real class, not some internal code, much the
 way lift:msgs/ maps to net.liftweb.builtin.snippets.Msgs  (thanks
 Jorge)

 3. lift:bind is the directive, and liftsnippet:bind is the snippet

 comments?

 thanks, bob






 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp




 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: directives versus snippets

2009-04-10 Thread bob

done. thanks guys

On Apr 10, 11:36 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Fri, Apr 10, 2009 at 11:31 AM, Jorge Ortiz jorge.or...@gmail.com wrote:
  Huh?

  lift: snippet, surround, embed, ignore, comet, children, a, form, loc, and
  with-param are all built-in in liftTagProcessing. Yes, they're overrideable,
  but imo it'd be nicer if they were Just A Snippet, like, say, lift:msgs.

 It's on my to-do list to do a little house cleaning in this area.

http://liftweb.lighthouseapp.com/projects/26102/tickets/34-lift-processing-directives-should-be-implemented-as-snippets

  lift:bind is just bad naming. it's not actually a directive, it's just what
  lift:surround looks for to bind at. should probably be called surround:bind
  or something with a different namespace.

 Yeah... we should deprecate lift:bind/ because it's not the same thing.
  Please open a defect on this for me.

http://liftweb.lighthouseapp.com/projects/26102/tickets/33-deprecate-liftbind








  --j

  On Fri, Apr 10, 2009 at 1:26 PM, David Pollak 
  feeder.of.the.be...@gmail.com wrote:

  Bob,
  They are actually the same thing.  Lift's processing directives are simply
  built-in snippets.  You can, if you dare, override their functionality. :-)

  Thanks,

  David

  On Fri, Apr 10, 2009 at 11:23 AM, bob rbpas...@gmail.com wrote:

  if I see lift:/, it could mean one of two things: a directive,
  e.g., lift:bind/ or lift:surround/ or shorthand for a snippet, eg
  lift:myClass represents lift:snippet type=MyClass

  i guess I would like to see these disambiguated a shorthand for
  snippets that doesn't overlap with the directive namespace.

  some possible solutions:

  1. lift:bind/ would be the directive and lift:.bind/ would be the
  snippet. please don't get hung up on my use of dot. it is only an
  example, and not an actual suggestion.

  2. lift:bind/ maps to a real class, not some internal code, much the
  way lift:msgs/ maps to net.liftweb.builtin.snippets.Msgs  (thanks
  Jorge)

  3. lift:bind is the directive, and liftsnippet:bind is the snippet

  comments?

  thanks, bob

  --
  Lift, the simply functional web frameworkhttp://liftweb.net
  Beginning Scalahttp://www.apress.com/book/view/1430219890
  Follow me:http://twitter.com/dpp
  Git some:http://github.com/dpp

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---