Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing files in <script/> tags lead to broken scope #579

Open
sjbarag opened this issue Nov 16, 2020 · 0 comments
Open

Missing files in <script/> tags lead to broken scope #579

sjbarag opened this issue Nov 16, 2020 · 0 comments
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser scenegraph Affects this project's implementation of the SceneGraph framework

Comments

@sjbarag
Copy link
Owner

sjbarag commented Nov 16, 2020

An XML component definition with a missing file (including an incorrectly-cased filename on case-sensitive filesystems) results in a component scope that's basically empty — even if the missing file appears after ones that do exist.

<component name="Foo">
    <interface>
        <field id="bar" onChange="onBarChanged"/>
    </interface>
    <script type="text/brightscript uri="pkg:/source/Utils.brs"/>
    <script type="text/brightscript" uri="./Foo.brs"/>
</component>

Even if source/Utils.brs exists, the absense of Foo.brs will lead to the following error message:

WARNING: "onBarChanged" was not found in scope

That error message isn't very helpful, so let's fix that while we're in the neighborhood 😃

@sjbarag sjbarag added bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser scenegraph Affects this project's implementation of the SceneGraph framework labels Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior parser Affects this project's token parser scenegraph Affects this project's implementation of the SceneGraph framework
Projects
None yet
Development

No branches or pull requests

1 participant