Thanks Abdul

--- In flexcoders@yahoogroups.com, "Abdul Qabiz" <[EMAIL PROTECTED]> 
wrote:
>
>  > public interface TestInterface {
> > function test(obj:Object):Boolean;
> > }
> 
> From AS3 spec:-
> 
> 1) Interface methods are not public by default, but are added to 
the public
> namespace by the implementing method definition.
> 
> 2) Classes that implement an interface method must use the public 
attribute
> to implement all interface methods that have the same identifier 
name.
> 
> 3) Interface methods are visible when referenced through a property 
of the
> corresponding interface type or through a reference to the 
implementing
> class or subclass.
> 
> Example:-
> 
> interface I
> {
>     function f()
> }
> interface J
> {
>     function g()
> }
> 
> class A implements I
> {
>     public function f() {}
>     public function g() {}
> }
> 
> 
> var a : A = new A
> a.f()     // okay, f is visible through an A as {public}::f
> a.g()     // okay, g is visible through an A as {public}::g
> 
> var i : I = b
> i.f()     // okay, f is still visible through an I as {I}::f
> i.g()     // error, g is not visible through an I as {I}::g
> 
> 
> 
> Does it make sense?
> 
> -abdul
> 
> 
> On 6/10/06, karthikeyanik <[EMAIL PROTECTED]> wrote:
> >
> >   Hi,
> >
> > 1) When compiling an .as interface, we get the following error -
> >
> > Error Code 1157:
> > Interface members may not be
> > declared 'public', 'private', 'protected', or 'internal'
> >
> > Eg: Interface
> >
> > public interface TestInterface {
> > public function test(obj:Object):Boolean;
> > }
> >
> > If the interface definition is changed as follows, the error 1157
> > does not occur.
> >
> > public interface TestInterface {
> > function test(obj:Object):Boolean;
> > }
> >
> > But if the interface function is not defined as public, it wont
> > be visible outside. It would be great, if someone can provide
> > suggestions on how to resolve this error.
> >
> > Thanks,
> > Karthi
> >
> >  
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

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

<*> 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