Olaf,

Comments inline.

[1]
https://github.com/apache/royale-asjs/blob/develop/examples/royale/RoyaleStore/src/main/royale/main.css

Thanks, Piotr

2017-12-26 19:39 GMT+01:00 Olaf Krueger <[email protected]>:

> Hi guys,
> the MXML and also the fx:style way works for me.
>
> Before asking here I've already thought about a missing bead and so I tried
> different ways to find out the name of the bead:
> IDEs CodeCompletion doesn't work cause the bead name doesn't start with
> "State*".
>

If you were using Moonshine it look like there is a room for some
improvements. Cause code completion should show also those items which has
words in the middle of sentence. Let me know.


> Then I searched the asjs repo but the github search isn't very helpful
> here.
> Then I walked through the examples in order to find an example that makes
> use of states.  I found e.g. this [1], but because I didn't found a states
> related bead that 'enables the states feature' I finally thought such a
> bead
> is maybe not needed (against PAYG).
>
So a few questions are left:
> 1)
> Maybe I am blind but could somebody point me to the piece of code in this
> example [1] which 'enables the states feature'. Is it baked-in within other
> beads or components?
>
>
Declaration of css for example [1] is being done in css style. [1] The
difference is that in my example which I have provide you I have put
declaration in the Main application file, in example [1] it is in separate
file.



> 2)
> I don't understand Piotr's code snippet [2]
> Why does it work? And what is the relation between styles and states?
>

There is no relations, it is just the way of adding beads. As Harbs said in
the previous post you could add to your view state bead (SimpleStatesImpl).
Doing that in this way states will be working only for that one view. Doing
it in my way by css "global" you will have it in all views.

<js:beads>
   <js:SimpleStatesImpl />
</js:beads>


>
> 3)
> Are there other ways to find such beads or is a sufficient documentation
> the
> one and only solution?
> In case of the latter: I guess it would be not so hard to automatically put
> all relevant Royale class names with its doc comments into an e.g.
> ElasticSearch index. Something like this would make it very easy to search
> for beads and components by using different full-text search patters... do
> you think this would be helpful?
>

I believe intelligent code completion will resolve that problem in lots of
cases. In Intellij you would find this bead probably easier.


> Thanks for help!
> Olaf
>
>
> [1]
> https://github.com/apache/royale-asjs/blob/develop/
> examples/royale/RoyaleStore/src/main/royale/productsView/
> ProductCatalogPanel.mxml#L540
>
> [2]
> https://paste.apache.org/C6GW
>
>
>
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Reply via email to