Should it start with "create"? I'm not too familiar with Loc, but is it 
building something or calculating/returning something?

-------------------------------------
Kris Nuttycombe<[email protected]> wrote:


Okay. I might add a createPath method that returns List[String] or
Box[List[String]].

Kris

On Tue, Oct 27, 2009 at 9:14 PM, David Pollak
<[email protected]> wrote:
> createLink returns an Option[NodeSeq].
> The reason for it is that the Scala XML literals do very well with
> Option[NodeSeq]:
> <a href={Some(Text("/foo/bar"))}/> // <a href="/foo/bar"/>
> <a href={None}/> // <a/>
> I'm cool with a helper method that returns a Box[String] or something that
> would otherwise be more flexible elsewhere.
>
> On Tue, Oct 27, 2009 at 4:43 PM, Kris Nuttycombe <[email protected]>
> wrote:
>>
>> I'm somewhat puzzled by the signature of Loc.Link.createLink -
>> principally by the fact that it returns Box[NodeSeq] instead of some
>> more path-like object. Due to having this signature, you can't simply
>> override createLink to create an actual link (the way it's used by
>> SiteMap inhibits this). Instead, it returns a path-like string wrapped
>> in a Text in its default implementation. This seems like a
>> not-very-useful thing to return; you can't use it in an SHtml.a or
>> SHtml.link call without unwrapping it and the type system doesn't help
>> you at all (Box[NodeSeq] is definitely *not* the meaning of those
>> bytes).
>>
>> Is there any better path-like construct that a Link could be
>> constructed around? Do people have their own Link implementations, or
>> is the Link class mostly used internally (such that its api could be
>> change to represent something path-link instead of xml-like?)
>>
>> Kris
>>
>>
>
>
>
> --
> 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 [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