Whoops. Should've checked this before I responded to the previous email. 
Glad you figured it out.

Chas.

glenn wrote:
> I found the problem. AjaxCall method returns a tuple, (String, JsExp).
> 
> So, I just needed to change onclick function to
>   onclick={SHtml.ajaxCall(Str("Button1"),ajaxFunc _)._2}
> 
> and all works as it should. I'm learning scala as I go along.
> 
> 
> 
> 
> On Apr 20, 3:40 pm, "Charles F. Munat" <[email protected]> wrote:
>> There are three constructors for UnprefixedAttribute (used to add
>> unprefixed attributes to XML elements).
>>
>> All three return an instance of scala.xml.MetaData (attributes are a
>> subclass of MetaData).
>>
>> The first takes:
>>
>> a String,
>> an Option containing a Seq of scala.xml.Nodes,
>> and another piece of MetaData (you can string them together)
>>
>> The second constructor takes:
>>
>> a String,
>> another String,
>> and the MetaData
>>
>> The final option takes:
>>
>> A string,
>> a Seq of scala.xml.Nodes,
>> and the MetaData.
>>
>> What you are providing is:
>>
>> a java.lang.String,
>> a tuple: (String, net.liftweb.http.js.JsExp),
>> and the MetaData
>>
>> So you need to look at the ajaxCall method and figure out what you are
>> doing wrong.
>>
>> Does this help?
>>
>> Chas.
>>
>> glenn wrote:
>>> When I try to compile the following code:
>>> bind("ex", xhtml, "button1" -> <button onclick={SHtml.ajaxCall(Str
>>> ("Button1"),ajaxFunc _)}>Press me</button>
>>>     )
>>>  I get this error message:
>>> overloaded method constructor UnprefixedAttribute with alternatives
>>> (String,Option[Seq[scala.xml.Node]],scala.xml.MetaData)
>>> scala.xml.UnprefixedAttribute <and>
>>>  (String,String,scala.xml.MetaData)scala.xml.UnprefixedAttribute <and>
>>> (String,Seq[scala.xml.Node],scala.xml.MetaData)
>>> scala.xml.UnprefixedAttribute cannot be applied to (java.lang.String,
>>> (String,
>>>  net.liftweb.http.js.JsExp),scala.xml.MetaData)
>>> Can anyone decipher for me?
> 
> > 

--~--~---------~--~----~------------~-------~--~----~
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