Hi Om, just did what you propose and still shows the same:
1.- copy the class org.apache.flexjs.mdl to my test project 2.- removed old code 3.- instantiate using: xmlns:mdl="org.apache.flex.mdl.*" and <mdl:Button/> but again the result is better using the js:Button with className than my low level MDL button that shows as a standard button. It's like the .className is doing nothing... 2016-10-14 19:39 GMT+02:00 OmPrakash Muppirala <bigosma...@gmail.com>: > On Fri, Oct 14, 2016 at 10:25 AM, Carlos Rovira <carlosrov...@apache.org> > wrote: > > > Hi, > > > > I'm trying to setup a MDL library to start making some components with > that > > look and feel. > > I'm following the Flat library project indications, and right now I'm > > building it ok with maven (didn't test Ant, but as a copy/paste from > Flat, > > I think it should work as well). > > > > Then I tried in a sample project. Again, new dependencies set and mdl > > declarations are working, but result is not looking as I expect, maybe > due > > to some low level constructions that I still doesn't dominate (mainly the > > internals in the "createElement():WrappedHTMLElement" overload, that I > > want > > to try to give some love today as I get a bit more time. > > > > Ok, from here,...I'm still trying to understand more things... for > example: > > > > 1.- MDL requires some CSS files to be linked. I'm using it with > > -html-template tag in the example project, but, maybe this should be > > provided by the MDL.swc ? if so, why could we do this? > > > > 2.- To start implementing components, maybe it'd be better that someone > > review what I'm doing (to avoid work in things that not conform to > > standards setup here). Maybe I should upload the branch for people (Maybe > > Alex, Peter,...) to take a look? > > > > 3.- I started trying to make a simple Colored Fab MDL button... (as > > described here https://getmdl.io/components/index.html#buttons-section) > > > > and find that using a simple mxml declaration almost worked (it's not > > right, only an approximation, since I can't write "low level" HTML in > MXML > > like an <I> with HTMLElement). So, this: > > > > <js:Button className="mdl-button mdl-js-button mdl-button--fab > > mdl-button--colored"> > > </js:Button> > > > > Shows a pink circle button, without icon. > > > > Sounds like a fantastic first step :-)) > > > > > > My MDL button has the following createElement code: > > > > /** > > * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement > > * @flexjsignorecoercion HTMLButtonElement > > */ > > override protected function createElement():WrappedHTMLElement > > { > > element = button = document.createElement('button') as > > HTMLButtonElement; > > button.className = 'mdl-button mdl-js-button mdl-button--fab > > mdl-button--colored'; > > > > positioner = element; > > positioner.style.position = 'relative'; > > (button as WrappedHTMLElement).flexjs_wrapper = this; > > element.flexjs_wrapper = this; > > > > return element; > > } > > > > and I'm using at my example project : <mdl:Button/> > > > > But instead to throw the pink empty circle button as the MXML example, it > > shows a normal button as if my declaration was <js:Button/> (the same > > indeed) > > > > someone knows where I could be failing ? > > > > Sounds like some manifest.xml file has not been updated. > > I don't know the exact errors, but if I may suggest another option - just > create these new buttons, etc. as custom components in your FlexJS > project. We can worry about making it a proper FlexJS library project > later. > > > > > > > Thanks > > > > PD: I saw Justin posting about MDL license, I don't want to integrate MDL > > in the project, instead, I want to declare external links to use them, if > > this is not right I think there should be other methods to be license > > compliant... > > > > I think you should be fine with this approach. > > Thanks for taking this initiative. Very exciting :-) > > Regards, > Om > > > > > > -- > > Carlos Rovira > > http://about.me/carlosrovira > > > -- Carlos Rovira Director General M: +34 607 22 60 05 http://www.codeoscopic.com http://www.avant2.es Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC S.A. La finalidad de dicho tratamiento es facilitar la prestación del servicio o información solicitados, teniendo usted derecho de acceso, rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación necesaria.