W3C home > Mailing lists > Public > www-svg@w3.org > December 2005

Re: SVG12: DOMObject portability

From: Ola Andersson <Ola.Andersson@ikivo.com>
Date: Fri, 2 Dec 2005 09:48:28 +0100
Message-ID: <586AE9F507AF5E4AA45364333D9E2FA2FB34F4@sesthsrv02.zoomon.local>
To: <www-svg@w3.org>, <bzbarsky@mit.edu>
Hi Boris,
I'm just replying to your last question since I don't know anything
about Gecko. The reason not to return a Node is because you can set
focus on an SVGElementInstance (like a use:d element) which isn't a Node
but an EventTarget.
From: Boris Zbarsky <bzbarsky@mit.edu
u%3E> > 
Date: Tue, 25 Oct 2005 09:50:11 -0500
Message-ID: <435E4623.101@mit.edu> 
To: Andrew Shellshear <Andrew.Shellshear@cisra.canon.com.au
C435E4623.101@mit.edu%3E> > 
CC: www-svg@w3.org
3E> , SVG WG <w3c-svg-wg@w3.org
du%3E> > 
Andrew Shellshear wrote:
> We have added the following explanitary text to the description of 
> getCurrentFocusedObject in
> -
> Returns a reference to the object which has the focus.  This returns a

> DOMObject because the currently focused object may be an object
> the SVG namespace.  If the currently focused object is in the SVG 
> namespace, it should be cast to events::EventTarget.
I'm trying to figure out how this would work in a strongly typed
language (C++, 
say).  Who's doing the casting?
For example, the C++ binding in Gecko for the IDL involved would look
(unrolling some typedefs):
   int GetCurrentFocusedObject(ISupports **);
Now how is the suggested explanatory text supposed to be implemented in
situation, exactly?
Is there a reason not to just return a Node to start with?  Then the
could actually check for the SVG namespace and cast to
events::EventTarget or 
EventTarget or whatever is appropriate as needed.  Or are there cases
when the 
"focused object" is not a Node?  If so, what does it mean for it to be
"in the 
SVG namespace"?

Received on Friday, 2 December 2005 08:48:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:29 UTC