Giter Site home page Giter Site logo

@:uiComp metadata behavior about domkit HOT 7 CLOSED

heapsio avatar heapsio commented on August 15, 2024
@:uiComp metadata behavior

from domkit.

Comments (7)

ncannasse avatar ncannasse commented on August 15, 2024

If you do this you need to import BlinkComp in your SRC first.

from domkit.

rcstuber avatar rcstuber commented on August 15, 2024

Can you give an example please, as I don't understand how it will properly resolve the class if the tag name (<blink>) is different from the class name (BlinkingComp) from looking at the code here:

var uname = MetaComponent.componentNameToClass(name);

from domkit.

ncannasse avatar ncannasse commented on August 15, 2024

from domkit.

rcstuber avatar rcstuber commented on August 15, 2024

Thanks!

from domkit.

tobil4sk avatar tobil4sk commented on August 15, 2024

If you do this you need to import BlinkComp in your SRC first.

@ncannasse Could you clarify what you meant here? I also found this issue confusing and I would like to make a PR to make the documentation clearer.

from domkit.

ncannasse avatar ncannasse commented on August 15, 2024

Components are resolved using packages registered with --init MyMacro.init() that will call for example the following :

domkit.Macros.registerComponentsPath("$");
domkit.Macros.registerComponentsPath("ui.comp.$");

Alternatively, instead of using automatic component resolution you can simply import BlinkingComp so it's part of the scope and accessible.

from domkit.

tobil4sk avatar tobil4sk commented on August 15, 2024

Ah, yes, importing seems to make components in other packages accessible.

However, it still does not work if the component class is called BlinkingComp and the given component name is blink instead of blinking, like in the example from above:

@:uiComp("blink")
class BlinkingComp extends h2d.Object implements h2d.domkit.Object {}

from domkit.

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.