<div dir="ltr">Julian - Thank you for the suggestion and explanation. It works now<div>Sergey - Thank you for answering my follow up question before I had even asked.</div><div><br></div><div>Graham</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Graham Hopper<div>Director</div><div>t: 01789 292618</div><div>f: 0845 86 220 86</div><div>w: <a href="http://forsomethingdifferent.com" target="_blank">forsomethingdifferent.com</a></div><div>fb: <a href="http://facebook.com/forsomethingdifferent" target="_blank">facebook.com/forsomethingdifferent</a></div></div></div></div>
<br><div class="gmail_quote">On Sat, Jul 25, 2015 at 7:31 AM, Sergey Mironov <span dir="ltr"><<a href="mailto:grrwlf@gmail.com" target="_blank">grrwlf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You may check the type signatures by consulting basis.urs from the<br>
Ur/Web's repo. Among other 'built-in' declarations, we may find there<br>
<br>
val ccheckbox : cformTag ([Value = bool, Size = int, Source = source<br>
bool, Onchange = transaction unit] ++ boxAttrs ++ inputAttrs) []<br>
<br>
...  Onchange = transaction unit ...<br>
<br>
That is how Juian may 'know in advance' the correct style :)<br>
<br>
Regards,<br>
Sergey<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
2015-07-24 15:30 GMT+03:00 Julian Squires <<a href="mailto:julian@cipht.net">julian@cipht.net</a>>:<br>
> On Fri, Jul 24, 2015 at 7:49 AM, Graham Hopper<br>
> <<a href="mailto:graham@garden-images.co.uk">graham@garden-images.co.uk</a>> wrote:<br>
>>             <ccheckbox onchange={fn _ => alert "Changed!"}/><br>
><br>
> Try<br>
>   <ccheckbox onchange={alert "Changed!"} /><br>
><br>
>> The error is long winded but I think the important part is:<br>
>><br>
>>    Need:<br>
>> <UNIF:U52::{Type}> ++ [Onchange = <UNIF:U69::Type> -> transaction {}]<br>
>>   Field:  #Onchange<br>
>> Value 1:  transaction {}<br>
>> Value 2:  <UNIF:U69::Type> -> transaction {}<br>
>> Incompatible constructors<br>
>> Have:  transaction {}<br>
>> Need:  <UNIF:U69::Type> -> transaction {}<br>
><br>
> Onchange has the signature transaction unit, where as you might have<br>
> expected it to be like the mouse events (onclick, et cetera) which<br>
> have signature mouseEvent -> transaction unit, which is why they are<br>
> typically written with an anonymous function that discards its<br>
> arguments as you did above.<br>
><br>
> Hope this helps,<br>
><br>
> --<br>
> Julian Squires<br>
><br>
> _______________________________________________<br>
> Ur mailing list<br>
> <a href="mailto:Ur@impredicative.com">Ur@impredicative.com</a><br>
> <a href="http://www.impredicative.com/cgi-bin/mailman/listinfo/ur" rel="noreferrer" target="_blank">http://www.impredicative.com/cgi-bin/mailman/listinfo/ur</a><br>
<br>
_______________________________________________<br>
Ur mailing list<br>
<a href="mailto:Ur@impredicative.com">Ur@impredicative.com</a><br>
<a href="http://www.impredicative.com/cgi-bin/mailman/listinfo/ur" rel="noreferrer" target="_blank">http://www.impredicative.com/cgi-bin/mailman/listinfo/ur</a><br>
</div></div></blockquote></div><br></div>