You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Harbs <ha...@gmail.com> on 2020/01/13 22:21:43 UTC
Private vars in MXML
I just noticed that there’s no compiler error while specifying private var values in MXML.
It looks like it’s compiled “correctly” too.
I assume this is a bug?
Harbs
Re: Private vars in MXML
Posted by Carlos Rovira <ca...@apache.org>.
Interesting, never tried. I think that's clearly a bug. Only public members
should be allowed.
private or protected should throw error
El mar., 14 ene. 2020 a las 0:04, Harbs (<ha...@gmail.com>) escribió:
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:js="library://ns.apache.org/royale/basic" >
> <js:valuesImpl>
> <js:SimpleCSSValuesImpl lastIndex="10"/>
> </js:valuesImpl>
> <js:initialView>
> <js:View>
> <js:Label text="Hello World!" _width="10" />
> </js:View>
> </js:initialView>
> </js:Application>
>
> There’s two private vars there: “lastIndex", and “_width".
>
> This compiles with no warnings or errors.
>
> > On Jan 14, 2020, at 12:56 AM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >
> > Do you have some example code?
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
> >
> > On Mon, Jan 13, 2020 at 2:21 PM Harbs <ha...@gmail.com> wrote:
> >
> >> I just noticed that there’s no compiler error while specifying private
> var
> >> values in MXML.
> >>
> >> It looks like it’s compiled “correctly” too.
> >>
> >> I assume this is a bug?
> >>
> >> Harbs
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Private vars in MXML
Posted by Harbs <ha...@gmail.com>.
Cool
> On Jan 14, 2020, at 10:30 PM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
>
> Looks like specifying a property as a child tag also fails to report an
> error:
>
> <js:Label text="Hello World!">
> <js:_width>10</js:_width>
> </js:Label>
>
> I'll take a look at both of these.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Tue, Jan 14, 2020 at 12:02 PM Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
>
>> I can reproduce this issue. I determined that the Flex SDK reports this
>> error, so the Royale compiler should do the same:
>>
>> RoyalePrivateMXML.mxml(-1): Error: Attempted access of inaccessible
>> property _privateVar through a reference with static type
>> com.example:MyClass.
>>
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev>
>>
>>
>> On Mon, Jan 13, 2020 at 3:04 PM Harbs <ha...@gmail.com> wrote:
>>
>>> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>> xmlns:js="library://ns.apache.org/royale/basic" >
>>> <js:valuesImpl>
>>> <js:SimpleCSSValuesImpl lastIndex="10"/>
>>> </js:valuesImpl>
>>> <js:initialView>
>>> <js:View>
>>> <js:Label text="Hello World!" _width="10" />
>>> </js:View>
>>> </js:initialView>
>>> </js:Application>
>>>
>>> There’s two private vars there: “lastIndex", and “_width".
>>>
>>> This compiles with no warnings or errors.
>>>
>>>> On Jan 14, 2020, at 12:56 AM, Josh Tynjala <jo...@bowlerhat.dev>
>>> wrote:
>>>>
>>>> Do you have some example code?
>>>>
>>>> --
>>>> Josh Tynjala
>>>> Bowler Hat LLC <https://bowlerhat.dev>
>>>>
>>>>
>>>> On Mon, Jan 13, 2020 at 2:21 PM Harbs <ha...@gmail.com> wrote:
>>>>
>>>>> I just noticed that there’s no compiler error while specifying private
>>> var
>>>>> values in MXML.
>>>>>
>>>>> It looks like it’s compiled “correctly” too.
>>>>>
>>>>> I assume this is a bug?
>>>>>
>>>>> Harbs
>>>
>>>
Re: Private vars in MXML
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Looks like specifying a property as a child tag also fails to report an
error:
<js:Label text="Hello World!">
<js:_width>10</js:_width>
</js:Label>
I'll take a look at both of these.
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Tue, Jan 14, 2020 at 12:02 PM Josh Tynjala <jo...@bowlerhat.dev>
wrote:
> I can reproduce this issue. I determined that the Flex SDK reports this
> error, so the Royale compiler should do the same:
>
> RoyalePrivateMXML.mxml(-1): Error: Attempted access of inaccessible
> property _privateVar through a reference with static type
> com.example:MyClass.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Mon, Jan 13, 2020 at 3:04 PM Harbs <ha...@gmail.com> wrote:
>
>> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>> xmlns:js="library://ns.apache.org/royale/basic" >
>> <js:valuesImpl>
>> <js:SimpleCSSValuesImpl lastIndex="10"/>
>> </js:valuesImpl>
>> <js:initialView>
>> <js:View>
>> <js:Label text="Hello World!" _width="10" />
>> </js:View>
>> </js:initialView>
>> </js:Application>
>>
>> There’s two private vars there: “lastIndex", and “_width".
>>
>> This compiles with no warnings or errors.
>>
>> > On Jan 14, 2020, at 12:56 AM, Josh Tynjala <jo...@bowlerhat.dev>
>> wrote:
>> >
>> > Do you have some example code?
>> >
>> > --
>> > Josh Tynjala
>> > Bowler Hat LLC <https://bowlerhat.dev>
>> >
>> >
>> > On Mon, Jan 13, 2020 at 2:21 PM Harbs <ha...@gmail.com> wrote:
>> >
>> >> I just noticed that there’s no compiler error while specifying private
>> var
>> >> values in MXML.
>> >>
>> >> It looks like it’s compiled “correctly” too.
>> >>
>> >> I assume this is a bug?
>> >>
>> >> Harbs
>>
>>
Re: Private vars in MXML
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
I can reproduce this issue. I determined that the Flex SDK reports this
error, so the Royale compiler should do the same:
RoyalePrivateMXML.mxml(-1): Error: Attempted access of inaccessible
property _privateVar through a reference with static type
com.example:MyClass.
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Mon, Jan 13, 2020 at 3:04 PM Harbs <ha...@gmail.com> wrote:
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:js="library://ns.apache.org/royale/basic" >
> <js:valuesImpl>
> <js:SimpleCSSValuesImpl lastIndex="10"/>
> </js:valuesImpl>
> <js:initialView>
> <js:View>
> <js:Label text="Hello World!" _width="10" />
> </js:View>
> </js:initialView>
> </js:Application>
>
> There’s two private vars there: “lastIndex", and “_width".
>
> This compiles with no warnings or errors.
>
> > On Jan 14, 2020, at 12:56 AM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >
> > Do you have some example code?
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
> >
> > On Mon, Jan 13, 2020 at 2:21 PM Harbs <ha...@gmail.com> wrote:
> >
> >> I just noticed that there’s no compiler error while specifying private
> var
> >> values in MXML.
> >>
> >> It looks like it’s compiled “correctly” too.
> >>
> >> I assume this is a bug?
> >>
> >> Harbs
>
>
Re: Private vars in MXML
Posted by Harbs <ha...@gmail.com>.
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/royale/basic" >
<js:valuesImpl>
<js:SimpleCSSValuesImpl lastIndex="10"/>
</js:valuesImpl>
<js:initialView>
<js:View>
<js:Label text="Hello World!" _width="10" />
</js:View>
</js:initialView>
</js:Application>
There’s two private vars there: “lastIndex", and “_width".
This compiles with no warnings or errors.
> On Jan 14, 2020, at 12:56 AM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
>
> Do you have some example code?
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Mon, Jan 13, 2020 at 2:21 PM Harbs <ha...@gmail.com> wrote:
>
>> I just noticed that there’s no compiler error while specifying private var
>> values in MXML.
>>
>> It looks like it’s compiled “correctly” too.
>>
>> I assume this is a bug?
>>
>> Harbs
Re: Private vars in MXML
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Do you have some example code?
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Mon, Jan 13, 2020 at 2:21 PM Harbs <ha...@gmail.com> wrote:
> I just noticed that there’s no compiler error while specifying private var
> values in MXML.
>
> It looks like it’s compiled “correctly” too.
>
> I assume this is a bug?
>
> Harbs