On Mar 4, 9:50 am, David Pollak <[email protected]> wrote:
> On Thu, Mar 4, 2010 at 9:27 AM, aw <[email protected]> wrote:
> > On Mar 4, 6:56 am, Naftoli Gugenheim <[email protected]> wrote:
> > > How about
> > > LiftRules.stripComments.default.set( () => !Req.isIE)
> > > etc.?
>
> This is where Lift's FactoryMaker shines.  You can modify the behavior of
> stripComments on a request-by-request basis.  You can have a snippet called
> from your default template that tests the request and does:
>
> LiftRules.stripComments.request.set(S.request.map(!_.isIE) openOr false)
>
> But, as you point out, that means that CometActors will not get the right
> settings... so you can set the rule on a session-by-session basis:
>
> LiftRules.stripComments.request.set(S.request.map(!_.isIE) openOr false)

I don't see the difference.  I presume that you meant to say:

LiftRules.stripComments.session.set(S.request.map(!_.isIE) openOr
false)

?  Alas, neither version works.  I get a syntax error:

[ERROR] ...\snippet\Hack.scala:31: error: value set is not a member of
net.liftweb.util.Maker[Boolean]
[INFO]     LiftRules.stripComments.request.set(S.request.map(!_.isIE)
openOr false)
[INFO]                                     ^
[ERROR] one error found

Seeing that request is really a RequestVar, I figure the mod is simple
(lose the .set), but:

[ERROR] ...\snippet\Hack.scala:31: error: value apply is not a member
of net.liftweb.util.Maker[Boolean]
[INFO]     LiftRules.stripComments.request(S.request.map(!_.isIE)
openOr false)
[INFO]                             ^
[ERROR] one error found

Now I am puzzled because I actually do see a valid apply method for
Maker[Boolean] (see line 66 of Maker.scala).

So, what am I missing?  I think I really want:

    LiftRules.stripComments.session(S.request.map(!_.isIE) openOr
false)

I feel close, but no compile...

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to