You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Dirk Eismann <bo...@googlemail.com> on 2012/01/30 09:36:56 UTC

Stubbing playerglobal.swc API

Just wondered if we could circumvent the issues with hosting and
downloading playerglobal.swc by just stubbing the needed classes by
using native function declarations. This way we could link against the
stubbed as files and would not need to link against the swcs.

E.g. for the playerglobal flash.display.DisplayObject class we'd need
to stub the API in a handmade flash.display.DisplayObject class with
all properties / methods marked "native"

  public native function get accessibilityProperties():AccessibilityProperties
  public native function set
accessibilityProperties(value:AccessibilityProperties):void

  public native function
getBounds(targetCoordinateSpace:DisplayObject):Rectangle;

and so on.

I'm sure this should work technically. Not sure about license issues, though.

Dirk.

RE: Stubbing playerglobal.swc API

Posted by Alex Harui <ah...@adobe.com>.
> -----Original Message-----
> From: David Arno [mailto:david@davidarno.org]
> Sent: Monday, January 30, 2012 7:29 AM
> To: flex-dev@incubator.apache.org
> Subject: RE: Stubbing playerglobal.swc API
> 
> > From: Doug Arthur [mailto:dougarthur@gmail.com]
> > Sent: 30 January 2012 15:20
> > Not sure we want to do that with a moving target.
> > Since we don't own playerglobal.swc, we should not try to replicate
> it.
> 
> I'd argue quite the opposite. Because playerglobal.swc is a moving
> target,
> stubbing it for testing purposes is actually a really good idea.
> 
> There are plenty of tools and frameworks around that we could use as
> the
> basis for generating such a stub SWC too, rather than generating it by
> hand.
> 
> David.
What problem are we trying to solve?  Surely a JAVA project wouldn't check in stubs for a third-party JAR just to save on a download?

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui



RE: Stubbing playerglobal.swc API

Posted by David Arno <da...@davidarno.org>.
> From: Doug Arthur [mailto:dougarthur@gmail.com] 
> Sent: 30 January 2012 15:20
> Not sure we want to do that with a moving target. 
> Since we don't own playerglobal.swc, we should not try to replicate it.

I'd argue quite the opposite. Because playerglobal.swc is a moving target,
stubbing it for testing purposes is actually a really good idea.

There are plenty of tools and frameworks around that we could use as the
basis for generating such a stub SWC too, rather than generating it by hand.

David.


Re: Stubbing playerglobal.swc API

Posted by Doug Arthur <do...@gmail.com>.
On Mon, Jan 30, 2012 at 1:36 AM, Dirk Eismann <bo...@googlemail.com> wrote:
> Just wondered if we could circumvent the issues with hosting and
> downloading playerglobal.swc by just stubbing the needed classes by
> using native function declarations. This way we could link against the
> stubbed as files and would not need to link against the swcs.
>
> E.g. for the playerglobal flash.display.DisplayObject class we'd need
> to stub the API in a handmade flash.display.DisplayObject class with
> all properties / methods marked "native"
>
>  public native function get accessibilityProperties():AccessibilityProperties
>  public native function set
> accessibilityProperties(value:AccessibilityProperties):void
>
>  public native function
> getBounds(targetCoordinateSpace:DisplayObject):Rectangle;
>
> and so on.
>
> I'm sure this should work technically. Not sure about license issues, though.
>
> Dirk.

Not sure we want to do that with a moving target. Since we don't own
playerglobal.swc, we should not try to replicate it.

My 2 cents.
- Doug