Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>@aib is unfortunately incorrect. Assuming strict mode (the default compiler mode) it is not possible to modify the prototype of non-dynamic class types in ActionScript 3. I'm not even sure that it's possible in non-strict mode.</p> <p>Is wrapping an option? Basically you create a class that takes one of the objects you get from the web service and just forwards all method calls to that, but also has methods of its own:</p> <pre><code>public class FooWrapper extends Foo { private var wrappedFoo : Foo; public function FooWrapper( foo : Foo ) { wrappedFoo = foo; } override public function methodFromFoo( ) : void { wrappedFoo.methodFromFoo(); } override public function anotherMethodFromFoo( ) : void { wrappedFoo.anotherMethodFromFoo(); } public function newMethodNotOnFoo( ) : String { return "Hello world!" } } </code></pre> <p>When you want to work with a <code>Foo</code>, but also have the extra method you need you wrap the <code>Foo</code> instance in a <code>FooWrapper</code> and work with that object instead.</p> <p>It's not the most convenient solution, there's a lot of typing and if the generated code changes you have to change the <code>FooWrapper</code> class by hand, but unless you can modify the generated code either to include the method you want or to make the class dynamic I don't see how it can be done.</p> <p>Another solution is to add a step to your build process that modifies the source of the generated classes. I assume that you already have a step that generates the code from a WSDL, so what you could do is to add a step after that that inserts the methods you need.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload