You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/11/12 14:26:43 UTC
[GitHub] [royale-compiler] yishayw opened a new issue #164: Skin State Reported Missing
yishayw opened a new issue #164:
URL: https://github.com/apache/royale-compiler/issues/164
The error shouldn't be reported
On this app:
```
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.apache.org/royale/spark"
xmlns:comp="components.*"
>
<comp:CollapsiblePanel/>
</s:Application>
```
With this component
```
<?xml version="1.0" encoding="utf-8"?>
<s:SkinnableContainer
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.apache.org/royale/spark"
skinClass="components.CollapsiblePanelSkin"
focusEnabled="false"
>
<fx:Metadata>
[SkinState("myState")]
</fx:Metadata>
</s:SkinnableContainer>
```
With this skin:
```
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.apache.org/royale/spark"
xmlns:mx="library://ns.apache.org/royale/mx"
>
<fx:Metadata>
[HostComponent("components.CollapsiblePanel")]
</fx:Metadata>
<s:states>
<s:State name="myState"/>
</s:states>
</s:SparkSkin>
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] yishayw commented on issue #164: Skin State Reported Missing
Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #164:
URL: https://github.com/apache/royale-compiler/issues/164#issuecomment-727175077
It looks like the compiler is expecting the states to be of type org.apache.royale.states.State whereas a spark application will have an mx.states.State.
Changing MXMLScopeBuilder.processState() and replacing
if (!qname.equals(project.getStateClass()) || tag.getMXMLDialect() == MXMLDialect.MXML_2006)
with
if (tag.getMXMLDialect() == MXMLDialect.MXML_2006)
Seems to fix it.
@aharui, any thoughts?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] greg-dove edited a comment on issue #164: Skin State Reported Missing
Posted by GitBox <gi...@apache.org>.
greg-dove edited a comment on issue #164:
URL: https://github.com/apache/royale-compiler/issues/164#issuecomment-727268030
Hi Yishay, this jogged my memory, I recalled seeing something in the code from the past that had 'endsWith(".State")' in it, and searched for it just now.
I see Alex added that in MXMLInstanceNode - that private static 'isStateClass' method appears to be the same logic that should be applied to check the qname in the place you see the error.
Perhaps the private static method can be moved to an external utility class and accessed in both locations. @aharui, does that make sense to you?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] yishayw commented on issue #164: Skin State Reported Missing
Posted by GitBox <gi...@apache.org>.
yishayw commented on issue #164:
URL: https://github.com/apache/royale-compiler/issues/164#issuecomment-726123919
Error message is
Error: The required skin state 'myState' is missing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] greg-dove commented on issue #164: Skin State Reported Missing
Posted by GitBox <gi...@apache.org>.
greg-dove commented on issue #164:
URL: https://github.com/apache/royale-compiler/issues/164#issuecomment-727268030
Hi Yishay, I this jogged my memory, I recalled seeing something in the code from the past that had 'endsWith(".State")' in it, and searched for it just now.
I see Alex added that in MXMLInstanceNode - that private static 'isStateClass' method appears to be the same logic that should be applied to check the qname in the place you see the error.
Perhaps the private static method can be moved to an external utility class and accessed in both locations. @aharui, does that make sense to you?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] aharui commented on issue #164: Skin State Reported Missing
Posted by GitBox <gi...@apache.org>.
aharui commented on issue #164:
URL: https://github.com/apache/royale-compiler/issues/164#issuecomment-727506325
Makes sense, although I'd just make the private static public and cheat a bit.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] yishayw closed issue #164: Skin State Reported Missing
Posted by GitBox <gi...@apache.org>.
yishayw closed issue #164:
URL: https://github.com/apache/royale-compiler/issues/164
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org