You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Alex Harui (JIRA)" <ji...@apache.org> on 2016/11/16 17:09:58 UTC

[jira] [Resolved] (FLEX-35116) private setter not accessible from class using this

     [ https://issues.apache.org/jira/browse/FLEX-35116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Harui resolved FLEX-35116.
-------------------------------
       Resolution: Fixed
         Assignee: Alex Harui
    Fix Version/s: Apache FalconJX 0.8.0

1d760a48472ff7543f5fec4ab208e07b2e15337f

> private setter not accessible from class using this
> ---------------------------------------------------
>
>                 Key: FLEX-35116
>                 URL: https://issues.apache.org/jira/browse/FLEX-35116
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FalconJX
>    Affects Versions: Apache FalconJX 0.6.0
>            Reporter: Yishay Weiss
>            Assignee: Alex Harui
>             Fix For: Apache FalconJX 0.8.0
>
>
> try this (see class A below)
> var a:A = new A();
> a.test()
> Expected result: No run time error
> Actual result: 
> ReferenceError: Error #1074: Illegal write to read-only property hello on A.
> package
> {
>     public class A
>     {
>         private var _hello:String;
>         public function A()
>         {
>         }
>         
>         public function get hello():String
>         {
>             return _hello;
>         }
>         private function set hello(value:String):void
>         {
>             _hello = value;
>             // do something
>         }
>         public function test():void
>         {
>             this.hello = "bye";
>         }
>     }
> }
> ----
> BTW, changing test() to do hello = "bye" works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)