Code Monkey home page Code Monkey logo

Comments (8)

joshtynjala avatar joshtynjala commented on May 23, 2024

Both classes use starling.events.Event. They're both Starling display objects, so it would be impossible to dispatch flash.events.Events from either one of them.

from feathersui-starling-sdk.

izzmeifter avatar izzmeifter commented on May 23, 2024

Perhaps I didn't explain it correctly (apologies)

Here's 2 screenshots showing the problem. Note the highlighted error. in both cases i haven't imported any Event classes, so you can see how the 2 screens expect different Event types (starling vs flash)

If I import starling.events.Event the error will reverse.

screen shot 2015-08-25 at 10 01 19 am
screen shot 2015-08-25 at 10 01 29 am

Does that make sense?

from feathersui-starling-sdk.

teotidev avatar teotidev commented on May 23, 2024

Ah yes, you need to explicitly write;

dispatchEvent(new starling.events.Event( starling.events.Event.COMPLETE))

I think this is a limitation of the compiler trying to automatically say its a Flash event.

from feathersui-starling-sdk.

joshtynjala avatar joshtynjala commented on May 23, 2024

This is most likely a false error from your IDE. The Flex SDK automatically imports flash.events.Event in any MXML file (even if you don't import this class in your fx:Script element), so IDEs expect that behavior. The Feathers SDK does not import flash.events.Event automatically in MXML files. Instead it imports starling.events.Event. IDEs don't expect that, so their internal model of what has been imported in an MXML file can be wrong.

The compiler should be able to compile the code without error, even if your IDE thinks its wrong. To make the IDE happy, you can use the fully qualified class name. It's not required, though.

from feathersui-starling-sdk.

joshtynjala avatar joshtynjala commented on May 23, 2024

A good basic rule to keep in mind when using the Feathers SDK with a Flex IDE is that you shouldn't always trust the errors shown in the editor. Double-check that the compiler gives you the same error.

from feathersui-starling-sdk.

izzmeifter avatar izzmeifter commented on May 23, 2024

You're correct, it does compile properly even though fully-qualified still shows error. - I'll make a mental note moving forward ;) - Thanks guys :)

BTW. IDE is Intelli-J

from feathersui-starling-sdk.

teotidev avatar teotidev commented on May 23, 2024

I only said fully qualified because I can't stand red in the IDE. :) But yeah I forgot it compiles fine without out it.

from feathersui-starling-sdk.

flexsurfer avatar flexsurfer commented on May 23, 2024

Oh that's why Intellij highlight starling event in gray like unused

from feathersui-starling-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.