Hi Maria Jose, Can you provide info about what you're trying to do? Maybe that way I can give you some suggestions.
About your question. I don't know what the library is about, but usually Crux is a microframework used in applications, not libraries to glue different parts and make models and other components accessible globally through all the application's code. A part of an app model is a typical case(i.e: You want to load a user in a module and store in a model and then retrieve info of that user in another module or in the app shell). But a library used to give us components that have its own beads (model, controller, view,...) and the scope is "local" to that component, so Crux usually is not something to be applied at that level. So your library is about "global scoped" or is "local scoped"? Usually use Crux only if it is the first case. El mar., 1 sept. 2020 a las 18:46, Maria Jose Esteve (<[email protected]>) escribió: > Thanks Carlos, > I don't know what to do, I'm lost: P. Since last week I have done nothing > but model "what I had" with crux and now ... > The main problem is that I do not know the actual operation of Crux, nor > what it means ... > I'm going to look at the projects in the crux example sdk again to see if > I see any other alternatives. > I take the liberty of asking you another question, directly ... > In the case of the small library, which I am building, could I implement > the Crux configuration if I don't have any initial mxml? Maybe it's a silly > question, I'm sorry if that's the case. In the library I have a main class, > and I wanted to include all the other components (classes, interfaces, > events, etc ...). Is it feasible? > > Thx. > Hiedra. > > -----Mensaje original----- > De: Carlos Rovira <[email protected]> > Enviado el: martes, 1 de septiembre de 2020 16:55 > Para: Apache Royale Development <[email protected]> > Asunto: Re: Crux - Inject model in Bead > > Hi Maria Jose, > > you can inject views since they are processed by Crux to do so. Remember: > > <crux:CruxConfig viewPackages="jewel.todomvc.views.*" ... > > the same we add eventPackages too. > > But a bead is not a view, so it's not processed. Maybe a "BeadProcessor" > would be handy here ;-) > but still doesn't exist. maybe could be a good addition for Royale Crux > version but we'll need to measure how that should be done. > > I think other ways could be available like maybe implementing "ICruxAware" > interface. > I remember using it in Flex (Swiz) times, but never tried it in Royale > with Crux, so can't say if that was migrated completely and if it is > working. I think that is "unexplored realms" for you to test. > > > > El mar., 1 sept. 2020 a las 14:01, Maria Jose Esteve (<[email protected]>) > escribió: > > > Hi, > > I am implementing crux. I inject the model perfectly into any view and > > / or controller but I can't inject it into a Bead. How should I do it? > > If I inject the model into the main control, and retrieve it from the > > Bead as << (_strand as EChartsComponent) .echartsThemesModel >> I can > use it. > > I imagine that this will have a technical explanation, which escapes > > me, ... > > If someone could help me ... > > > > Thank you > > Hiedra > > > > > -- > Carlos Rovira > http://about.me/carlosrovira > -- Carlos Rovira http://about.me/carlosrovira
