HI,

I believe some people had posted about attaching event handlers using C++
instead of JS. I'd like to pass on information I have found out in
integrating all this:

   Used IE( not tried others)
   Have a parent HTML document and embed an ActiveX control which contains
   your event handler
   Embed your SVG document also in this HTML file
   In your event handler, just reference the method in the event handler:

For ex:.
<rect id="MySquare" x='5' y='5' width="30" height="40" fill='yellow'
stroke='green' stroke-width='3' onclick='parent.mediatorID.IHMIUIEvent(evt,
1);'/>

In the above 'evt' is your event which will be passed in as a VARIANT i.e.
IDispatch pointer which you may use to do anything on the Event.
IHMIUIEvent is your COM method.

I also have figured out that the IDispatch *   that needs to be processed
in C++( for manipulating the SVG document) is the SVG object reference
itself and not getSVGDocument!.
One more thing is to write into the SVG document i.e. change
attributes/nodes - you have to use the corresponding 'set...' routines.
Adobe mentions it briefly with reference to the Netscape browser - but it
is applicable to IE too. For example: to set the attribute, you would use:
attribList.setValue("foo") and not setAttribute("foo") since the latter
does not work i.e. does not write to the host SVG document.

All of the above could be used in C# too.
Hope this helps.

Shreesh





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to