I think it should all "just work," with your new tag added in an FFI .urs file like that!

On 04/17/2018 08:00 AM, Jonas Mellin wrote:

My bad, sorry. It took me a short while to see the misspelling. Got it working. I will be more careful about that in the future.

I move on to trying multiple objects and then adding “foreignObject” tag:

val foreignObject : svgTag([X = string, Y = string, Width = string, Height = string] ++ typicalAttrs)

an addition to the SVG.urs (cf. original at https://github.com/karsar/urweb-examples/blob/master/SVGTest/SVG.urs) , this require somehow to mix xsvg with xbody. Anything in particular that has to be taken into account when mixing this?

/Jonas Mellin

*From:*Ur [mailto:[email protected]] *On Behalf Of *Adam Chlipala
*Sent:* den 17 april 2018 13:20
*To:* [email protected]
*Subject:* Re: [Ur] UR/Web SVG (ffi) question

For future questions, I think it would be good for you to explain what you understand from error messages, highlighting what additional understanding you need to diagnose the error. Here again the problem is a simple one that would be recognized as a bug in any programming language.

Notice the difference in spellings of field names, between the "Have" and "Need" parts of the error message.

On 04/17/2018 05:53 AM, Jonas Mellin wrote:

    ...

      <body onmousemove={fn ev => set x (ev.ScreenX,ev.SceenY)}>

    ...

    *But I get:*

    Can't unify record constructors

    Have:

    [ScreenX = int, ScreenY = int, ClientX = int, ClientY = int,

      CtrlKey = bool, ShiftKey = bool, AltKey = bool, MetaKey = bool,

      Button = mouseButton]

    Need: <UNIF:U140::{Type}> ++ [ScreenX = int, SceenY = int]



_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to