I haven't tried it yet, I'll let you know how I get on.

--- In [email protected], "Peter Hall" <[EMAIL PROTECTED]> wrote:
>
> Looks like it should work. Did you try it and have problems?
> 
> Peter
> 
> 
> On Nov 22, 2007 12:54 AM, simonjpalmer <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> >
> > I thought about the bindable route and in fact the Wrapper class is
> >  [Managed] so I believe the properties are all bindable and therefore
> >  getters and setter will exist.
> >
> >  As a matter of interest if I did this...
> >
> >  [Managed]
> >  [RemoteClass(alias="com.simon.Wrapper")]
> >  class Wrapper implements IWrapper
> >  {
> >  public var a:IA;
> >  public var b:IB;
> >  }
> >
> >  and on the Java server
> >
> >  package com.simon;
> >  class Wrapper
> >  {
> >  public A a;
> >  public B b;
> >  }
> >
> >  and presuming A and B were also managed objects, what would happen to
> >  Wrapper.a and Wrapper.b when I retrieve Wrapper via a RemoteObject?
> >
> >  Would it find and populate a and b?
> >
> >  Simon
> >
> >
> >  --- In [email protected], "Peter Hall" <peterjoel@> wrote:
> >  >
> >  > Alternatively, you can make those properties bindable. This
will cause
> >  > the compiler to automatically generate the corresponding getter and
> >  > setter and the interface will be implemented.
> >  >
> >  > However, your example will never work as it is. AS3 currently
does not
> >  > allow implementation signatures to differ at all from the
interface,
> >  > even if they are compatible. I'm hoping that will be "fixed" in a
> >  > future release.
> >  >
> >  > Peter
> >  >
> >
> >  > On Nov 21, 2007 5:25 PM, Gordon Smith <gosmith@> wrote:
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > > You can't use a var to implement a getter... you have to write a
> >  getter. And
> >  > > it has to have exactly the same signature.
> >  > >
> >  > > - Gordon
> >  > >
> >  > > ________________________________
> >  > > From: [email protected]
> >  [mailto:[EMAIL PROTECTED] On
> >  > > Behalf Of simonjpalmer
> >  > > Sent: Wednesday, November 21, 2007 2:21 PM
> >  > > To: [email protected]
> >  > > Subject: [flexcoders] Interfaces and Implements
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > > Hi, I am having a problem with defining and using interfaces
on my AS3
> >  > > classes. Here's my scenario...
> >  > >
> >  > > class A implements IA{}
> >  > > class B implements IB{}
> >  > >
> >  > > class Wrapper implements IWrapper
> >  > > {
> >  > > public var a:A;
> >  > > public var b:B;
> >  > > }
> >  > >
> >  > > interface IWrapper
> >  > > {
> >  > > function get a():IA;
> >  > > function get b():IB;
> >  > > }
> >  > >
> >  > > When I compile this I get an error:
> >  > >
> >  > > "Interface method get a in namespace IWrapper is implemented
with an
> >  > > incompatible signature in class Wrapper"
> >  > >
> >  > > A implements IA and get a() returns an instance of class A,
so why the
> >  > > error?
> >  > >
> >  > > This is making it a bit hard to code against interfaces
rather than
> >  > > concrete classes.
> >  > >
> >  > > Any ideas?
> >  > >
> >  > >
> >  >
> >
> >
> >
> >
>


Reply via email to