Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Alex Harui


On 12/8/16, 11:29 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>No Alex,
>
>the createElement only generates a  tag (the container)

I was trying to ask if the js:Span's constructor and/or createElement get
called.

In an app I'm working on, the following is working for me:

http://ns.adobe.com/mxml/2009;
xmlns:js="library://ns.apache.org/flexjs/basic"
width="100%">









I'm done for today.   I guess if you are still stuck, just check it in and
I'll look in the morning.

Later,
-Alex



Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Carlos Rovira
No Alex,

the createElement only generates a  tag (the container)

I want the custom renderer to add inside the custom things
(span,...icons,...img,...)


http://ns.adobe.com/mxml/2009;
 xmlns:js="library://ns.apache.org/flexjs/basic"
 xmlns:mdl="library://ns.apache.org/flexjs/mdl"
 xmlns="http://www.w3.org/1999/xhtml;> <-- that's
the li with conditional compilation in MDL swc

<--- all this block is bypassed,
this is in MDLExample and is created by user






I get :

Widgets

but not

Widgetshello

or

hello

I expect the later and use a binding with data in MXML (i.e: {data.var1})

i.e:







2016-12-09 0:29 GMT+01:00 Alex Harui :

> Is the Span's createElement getting called?  I would recommend using the
> debugger watch the Span get instantiated and added to the renderer.
>
> HTH,
> -Alex
>
> On 12/8/16, 2:41 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> 
> wrote:
>
> >No, I'm saying that I put a  in the custom item
> >renderer and is ignored (not hello in html output )
> >
> >I only get the  generated from createElement in the ListItemRenderer.
> >
> >So the problem is how to get the components declared in customitemrenderer
> >outputs in html inside the  tag created in createelement() method
> >
> >2016-12-08 23:14 GMT+01:00 Alex Harui :
> >
> >>
> >>
> >> On 12/8/16, 2:08 PM, "carlos.rov...@gmail.com on behalf of Carlos
> >>Rovira"
> >> 
> >> wrote:
> >>
> >> >Hi Alex,
> >> >
> >> >I changed ListItemRenderer to extend MXMLItemRenderer, but nothing
> >>changed
> >> >output is still:
> >> >
> >> >
> >> >WidgetsThingys<
> li
> >> >class=" mdl-list__item">SprocketsDoohickies
> >> >
> >> >I don't have any issue with sizes and layouts. My problem is that I
> >>want
> >> >to
> >> >nest custom HTML things, for example a , and I don't get any
> >>output
> >> >but the current  container and it's text...
> >> >
> >> >Also, MXMLItemRenderer extends as well UIBase and not a "container"
> >>class
> >> >like Container or ContainerBase
> >>
> >> I don't think Container should really make a difference other than
> >> Container and MXMLItemRenderer know about layout so it should size and
> >> position children.
> >>
> >> But it sounds like you are saying that the js:Span is just placing text
> >>in
> >> the li and not creating a span?  I don't know of any code that would do
> >> that, so I think you'll just have to debug into it.
> >>
> >> -Alex
> >>
> >>
> >>
> >
> >
> >--
> >
> >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.
>
>


-- 

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.


Re: Slow performance > 1000 objects

2016-12-08 Thread Alex Harui


On 12/8/16, 3:10 PM, "gmanupnorth"  wrote:

>Thanks for all of the suggestions thus far. I removed the call to
>setstylebut the performance is still poor.
>
>The profiler so far has not been that useful, but I will keep digging
>tomorrow.

Feel free to post a link to a screenshot of the profiler output.

-Alex



Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Alex Harui
Is the Span's createElement getting called?  I would recommend using the
debugger watch the Span get instantiated and added to the renderer.

HTH,
-Alex

On 12/8/16, 2:41 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>No, I'm saying that I put a  in the custom item
>renderer and is ignored (not hello in html output )
>
>I only get the  generated from createElement in the ListItemRenderer.
>
>So the problem is how to get the components declared in customitemrenderer
>outputs in html inside the  tag created in createelement() method
>
>2016-12-08 23:14 GMT+01:00 Alex Harui :
>
>>
>>
>> On 12/8/16, 2:08 PM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>> 
>> wrote:
>>
>> >Hi Alex,
>> >
>> >I changed ListItemRenderer to extend MXMLItemRenderer, but nothing
>>changed
>> >output is still:
>> >
>> >
>> >WidgetsThingys> >class=" mdl-list__item">SprocketsDoohickies
>> >
>> >I don't have any issue with sizes and layouts. My problem is that I
>>want
>> >to
>> >nest custom HTML things, for example a , and I don't get any
>>output
>> >but the current  container and it's text...
>> >
>> >Also, MXMLItemRenderer extends as well UIBase and not a "container"
>>class
>> >like Container or ContainerBase
>>
>> I don't think Container should really make a difference other than
>> Container and MXMLItemRenderer know about layout so it should size and
>> position children.
>>
>> But it sounds like you are saying that the js:Span is just placing text
>>in
>> the li and not creating a span?  I don't know of any code that would do
>> that, so I think you'll just have to debug into it.
>>
>> -Alex
>>
>>
>>
>
>
>-- 
>
>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.



Re: Slow performance > 1000 objects

2016-12-08 Thread gmanupnorth
Thanks for all of the suggestions thus far. I removed the call to
setstylebut the performance is still poor.

The profiler so far has not been that useful, but I will keep digging
tomorrow.


Forgot to mention this project is locked on AS 3. The SDK is 3.6 I believe.

Thanks,

Gordon



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/Slow-performance-1000-objects-tp57076p57090.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Carlos Rovira
No, I'm saying that I put a  in the custom item
renderer and is ignored (not hello in html output )

I only get the  generated from createElement in the ListItemRenderer.

So the problem is how to get the components declared in customitemrenderer
outputs in html inside the  tag created in createelement() method

2016-12-08 23:14 GMT+01:00 Alex Harui :

>
>
> On 12/8/16, 2:08 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> 
> wrote:
>
> >Hi Alex,
> >
> >I changed ListItemRenderer to extend MXMLItemRenderer, but nothing changed
> >output is still:
> >
> >
> >WidgetsThingys >class=" mdl-list__item">SprocketsDoohickies
> >
> >I don't have any issue with sizes and layouts. My problem is that I want
> >to
> >nest custom HTML things, for example a , and I don't get any output
> >but the current  container and it's text...
> >
> >Also, MXMLItemRenderer extends as well UIBase and not a "container" class
> >like Container or ContainerBase
>
> I don't think Container should really make a difference other than
> Container and MXMLItemRenderer know about layout so it should size and
> position children.
>
> But it sounds like you are saying that the js:Span is just placing text in
> the li and not creating a span?  I don't know of any code that would do
> that, so I think you'll just have to debug into it.
>
> -Alex
>
>
>


-- 

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.


Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Alex Harui


On 12/8/16, 2:08 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Hi Alex,
>
>I changed ListItemRenderer to extend MXMLItemRenderer, but nothing changed
>output is still:
>
>
>WidgetsThingysclass=" mdl-list__item">SprocketsDoohickies
>
>I don't have any issue with sizes and layouts. My problem is that I want
>to
>nest custom HTML things, for example a , and I don't get any output
>but the current  container and it's text...
>
>Also, MXMLItemRenderer extends as well UIBase and not a "container" class
>like Container or ContainerBase

I don't think Container should really make a difference other than
Container and MXMLItemRenderer know about layout so it should size and
position children.

But it sounds like you are saying that the js:Span is just placing text in
the li and not creating a span?  I don't know of any code that would do
that, so I think you'll just have to debug into it.

-Alex




Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Carlos Rovira
Hi Alex,

I changed ListItemRenderer to extend MXMLItemRenderer, but nothing changed
output is still:


WidgetsThingysSprocketsDoohickies

I don't have any issue with sizes and layouts. My problem is that I want to
nest custom HTML things, for example a , and I don't get any output
but the current  container and it's text...

Also, MXMLItemRenderer extends as well UIBase and not a "container" class
like Container or ContainerBase


2016-12-08 20:25 GMT+01:00 Alex Harui :

> See MXMLItemRenderer.  You either want to have a default layout or assign
> one.  A parent sizes its children and if no layout is specified the
> children do not get size.  Check the DOM to make sure all of the elements
> got created.
>
> It could also be that the renderer itself doesn't have a good size.
>
> -Alex
>
> On 12/8/16, 11:14 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> 
> wrote:
>
> >Ok, I follow your indications and created a ListItemRenderer ni MDL swc,
> >this will be the basic IR and outputs LI with appropriate MDL class.
> >
> >Now, I want this renderer to be able to be customized on user project
> >(MDLExample), so to test I did:
> >
> >http://ns.adobe.com/mxml/2009;
> > xmlns:js="library://ns.apache.org/flexjs/basic"
> > xmlns:mdl="library://ns.apache.org/flexjs/mdl"
> > xmlns="http://www.w3.org/1999/xhtml;>
> >
> >
> >
> >
> >
> >
> >
> >
> >This is not working and I think is because the basic DataItemRenderer
> >comes
> >from UIBase.
> >I tried in local to redo the inheritance and do this:
> >
> >public class ListItemRenderer extends ContainerBase implements
> >ISelectableItemRenderer
> >
> >(following what I see in Yishay AccordionItemRenderer (difference is that
> >one is extending from Panel)
> >
> >But I can't get this to show:
> >
> >
> >
> >
> >
> >
> >How I can get that output?
> >
> >Thanks
> >
> >
> >
> >2016-12-05 17:21 GMT+01:00 Alex Harui :
> >
> >>
> >>
> >> On 12/5/16, 3:39 AM, "carlos.rov...@gmail.com on behalf of Carlos
> >>Rovira"
> >>  wrote:
> >>
> >> >Hi Alex,
> >> >
> >> >to introduce the problem:
> >> >
> >> >I took a look and saw that your ListItemRenderer is in the application
> >> >> project, not a library project, but it contains conditional compile
> >> >>code.
> >> >> I'm not sure we've ironed out that workflow.  The main idea was that
> >> >> application developers wouldn't need conditional compilation.  All
> >>APIs
> >> >> they would need would be cross-platform and all the platform-specific
> >> >> stuff would be encapsulated into the library SWCs.
> >> >>
> >> >>
> >> >mmm...I was thinking on that decision and I think it should be hard to
> >> >make
> >> >devs understand that they
> >> >can't do that in their projects.
> >> >
> >> >I think use case like custom item renderers are very common. We should
> >> >expect FlexJS users writing
> >> >custom IR a lot in their apps. If they are writing a complex
> >>app...should
> >> >be normal to has one or more swc libs
> >> >created by them, but we all now that one of the powers of flex is make
> >>a
> >> >fast app in one single project and even
> >> >in few files (classes). So I think, although I understand the decision
> >>and
> >> >intention, I think that is not practical.
> >>
> >> As Yishay says, custom item renderers should be possible without
> >> platform-specific code.  If you had a base class in the framework that
> >> wrapped LI then you probably wouldn't have any conditional compile in
> >>your
> >> renderer.  Still, we should allow for it at some point.
> >>
> >> >
> >> >btw, you pointed me to change COMPILE::JS to true, but how I can do
> >>this?
> >> >I see that in some build.xml but no in pom.xml. So although I search, I
> >> >don't know how to do this right now.
> >> >Some clue or where to dig?
> >>
> >> Well for Ant and FB integration, it is as simple as adding the compiler
> >> flags.  I think for Maven this sort of thing is buried in the Mojo, but
> >>I
> >> would think you could use the additional compiler options to set it for
> >> now.
> >>
> >> -Alex
> >>
> >>
> >
> >
> >--
> >
> >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,
> 

Re: Slow performance > 1000 objects

2016-12-08 Thread Alex Harui


On 12/8/16, 12:17 PM, "João Fernandes"
 wrote:

>Alex, didn't tell me once about the order of the actions (setStyle,
>addChild) would also impact? Cant' remember what was the order but styling
>and adding it as a child would also force additional invalidations.

Hi João,

Yes, this is true.  IMO, the call to setStyle should happen immediately
after addChild.  Calling it before addChild sets up a temporary object to
hold the styles.  Calling it after validation causes additional
invalidations.

The profiler will show any impact like that.

-Alex



Re: Slow performance > 1000 objects

2016-12-08 Thread João Fernandes
Alex, didn't tell me once about the order of the actions (setStyle,
addChild) would also impact? Cant' remember what was the order but styling
and adding it as a child would also force additional invalidations.

Regarding virtual layout, do the items need to be all visible at the same
time?
I would recomend to use as the most lightweight component as possible, does
your container need to be a mx:VBox? Couldn't he simply be a s:VBox
(doesn't have any styling)?

Even to optimize it further, instead of creating all those nested
containers, you could use a s:List with a custom layout do place your
lightweight items.

On 8 December 2016 at 19:19, Alex Harui  wrote:

> Run a profiler to see what is taking so much time.  It could be just
> adding that many children, or it could be something each child does when
> being added that could be optimized or deferred for later.
>
> If it is just adding that many children, you could create an array of them
> and add them in bunches over several frames.
>
> -Alex
>
> On 12/8/16, 9:54 AM, "gmanupnorth"  wrote:
>
> >This piece of code is causing significant lag in our UI and was looking
> >for
> >suggestions on how to improve it. This builds up a list of approx 1400
> >items
> >and takes 35-50 seconds to finish.
> >
> >
> >AssetTreeChild is a custom component based on the VBOX AssetTreeChild.mxml
> > com/file/n57076/AssetTre
> >eChild.mxml>
> >
> >
> >public function setAgentItem(value:SmartAgentVO):void
> >   {
> >   this.agentItem = value;
> >   if ( value.Children!=null &&
> value.Children.length>0 )
> >   {
> >   var assetComp:AssetTreeChild;
> >   for each ( var item:SmartAgentVO
> in value.Children )
> >   {
> >   assetComp = new
> AssetTreeChild();
> >   list.addChild(assetComp);
> >
>  assetComp.setAgentItem(item);
> >   assetComp.setStyle("
> textIndent",7);
> >   }
> >   }
> >   }
> >
> >
> >
> >--
> >View this message in context:
> >http://apache-flex-development.247.n4.nabble.
> com/Slow-performance-1000
> >-objects-tp57076.html
> >Sent from the Apache Flex Development mailing list archive at Nabble.com.
>
>


-- 

João Fernandes


Re: Slow performance > 1000 objects

2016-12-08 Thread Justin Mclean
Hi,

> Probably not the main issue but this line were chocolate length every time 
> through the list

chocolate == calculate 

Damn autocorrect! But chocolate is nice as well.

Justin

Re: Slow performance > 1000 objects

2016-12-08 Thread Justin Mclean
Hi.

Probably not the main issue but this line were chocolate length every time 
through the list

> for each ( var item:SmartAgentVO in value.Children )

It usually faster to use the more verbose:
var length:int = value.children.length
for (var i:int =0; i < length; i++)

My guess would be this line slows things down:
assetComp.setStyle("textIndent",7);

But it better to run it through the profiler to see what is actually happening 
as it's often where you don’t expect.

Thanks,
Justin



Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Alex Harui
See MXMLItemRenderer.  You either want to have a default layout or assign
one.  A parent sizes its children and if no layout is specified the
children do not get size.  Check the DOM to make sure all of the elements
got created.

It could also be that the renderer itself doesn't have a good size.

-Alex

On 12/8/16, 11:14 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
 wrote:

>Ok, I follow your indications and created a ListItemRenderer ni MDL swc,
>this will be the basic IR and outputs LI with appropriate MDL class.
>
>Now, I want this renderer to be able to be customized on user project
>(MDLExample), so to test I did:
>
>http://ns.adobe.com/mxml/2009;
> xmlns:js="library://ns.apache.org/flexjs/basic"
> xmlns:mdl="library://ns.apache.org/flexjs/mdl"
> xmlns="http://www.w3.org/1999/xhtml;>
>
>
>
>
>
>
>
>
>This is not working and I think is because the basic DataItemRenderer
>comes
>from UIBase.
>I tried in local to redo the inheritance and do this:
>
>public class ListItemRenderer extends ContainerBase implements
>ISelectableItemRenderer
>
>(following what I see in Yishay AccordionItemRenderer (difference is that
>one is extending from Panel)
>
>But I can't get this to show:
>
>
>
>
>
>
>How I can get that output?
>
>Thanks
>
>
>
>2016-12-05 17:21 GMT+01:00 Alex Harui :
>
>>
>>
>> On 12/5/16, 3:39 AM, "carlos.rov...@gmail.com on behalf of Carlos
>>Rovira"
>>  wrote:
>>
>> >Hi Alex,
>> >
>> >to introduce the problem:
>> >
>> >I took a look and saw that your ListItemRenderer is in the application
>> >> project, not a library project, but it contains conditional compile
>> >>code.
>> >> I'm not sure we've ironed out that workflow.  The main idea was that
>> >> application developers wouldn't need conditional compilation.  All
>>APIs
>> >> they would need would be cross-platform and all the platform-specific
>> >> stuff would be encapsulated into the library SWCs.
>> >>
>> >>
>> >mmm...I was thinking on that decision and I think it should be hard to
>> >make
>> >devs understand that they
>> >can't do that in their projects.
>> >
>> >I think use case like custom item renderers are very common. We should
>> >expect FlexJS users writing
>> >custom IR a lot in their apps. If they are writing a complex
>>app...should
>> >be normal to has one or more swc libs
>> >created by them, but we all now that one of the powers of flex is make
>>a
>> >fast app in one single project and even
>> >in few files (classes). So I think, although I understand the decision
>>and
>> >intention, I think that is not practical.
>>
>> As Yishay says, custom item renderers should be possible without
>> platform-specific code.  If you had a base class in the framework that
>> wrapped LI then you probably wouldn't have any conditional compile in
>>your
>> renderer.  Still, we should allow for it at some point.
>>
>> >
>> >btw, you pointed me to change COMPILE::JS to true, but how I can do
>>this?
>> >I see that in some build.xml but no in pom.xml. So although I search, I
>> >don't know how to do this right now.
>> >Some clue or where to dig?
>>
>> Well for Ant and FB integration, it is as simple as adding the compiler
>> flags.  I think for Maven this sort of thing is buried in the Mojo, but
>>I
>> would think you could use the additional compiler options to set it for
>> now.
>>
>> -Alex
>>
>>
>
>
>-- 
>
>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.



Re: Slow performance > 1000 objects

2016-12-08 Thread Clint M
instead of list.addChild you might want to have a look at using an mx:List
or s:List with useVirtualLayout for that many items

On Thu, Dec 8, 2016 at 9:54 AM, gmanupnorth  wrote:

> This piece of code is causing significant lag in our UI and was looking for
> suggestions on how to improve it. This builds up a list of approx 1400
> items
> and takes 35-50 seconds to finish.
>
>
> AssetTreeChild is a custom component based on the VBOX AssetTreeChild.mxml
>  AssetTreeChild.mxml>
>
>
> public function setAgentItem(value:SmartAgentVO):void
> {
> this.agentItem = value;
> if ( value.Children!=null &&
> value.Children.length>0 )
> {
> var assetComp:AssetTreeChild;
> for each ( var item:SmartAgentVO
> in value.Children )
> {
> assetComp = new
> AssetTreeChild();
> list.addChild(assetComp);
>
> assetComp.setAgentItem(item);
> assetComp.setStyle("
> textIndent",7);
> }
> }
> }
>
>
>
> --
> View this message in context: http://apache-flex-
> development.247.n4.nabble.com/Slow-performance-1000-
> objects-tp57076.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>


Re: Slow performance > 1000 objects

2016-12-08 Thread Alex Harui
Run a profiler to see what is taking so much time.  It could be just
adding that many children, or it could be something each child does when
being added that could be optimized or deferred for later.

If it is just adding that many children, you could create an array of them
and add them in bunches over several frames.

-Alex

On 12/8/16, 9:54 AM, "gmanupnorth"  wrote:

>This piece of code is causing significant lag in our UI and was looking
>for
>suggestions on how to improve it. This builds up a list of approx 1400
>items
>and takes 35-50 seconds to finish.
>
>
>AssetTreeChild is a custom component based on the VBOX AssetTreeChild.mxml
>eChild.mxml>  
>
>
>public function setAgentItem(value:SmartAgentVO):void
>   {
>   this.agentItem = value;
>   if ( value.Children!=null && value.Children.length>0 )
>   {
>   var assetComp:AssetTreeChild;   
> 
>   for each ( var item:SmartAgentVO in 
> value.Children )
>   {
>   assetComp = new 
> AssetTreeChild();
>   list.addChild(assetComp);
>   assetComp.setAgentItem(item);
>   
> assetComp.setStyle("textIndent",7);
>   }
>   }
>   }
>
>
>
>--
>View this message in context:
>http://apache-flex-development.247.n4.nabble.com/Slow-performance-1000
>-objects-tp57076.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS] Conditional compilation in user projects

2016-12-08 Thread Carlos Rovira
Ok, I follow your indications and created a ListItemRenderer ni MDL swc,
this will be the basic IR and outputs LI with appropriate MDL class.

Now, I want this renderer to be able to be customized on user project
(MDLExample), so to test I did:

http://ns.adobe.com/mxml/2009;
 xmlns:js="library://ns.apache.org/flexjs/basic"
 xmlns:mdl="library://ns.apache.org/flexjs/mdl"
 xmlns="http://www.w3.org/1999/xhtml;>








This is not working and I think is because the basic DataItemRenderer comes
from UIBase.
I tried in local to redo the inheritance and do this:

public class ListItemRenderer extends ContainerBase implements
ISelectableItemRenderer

(following what I see in Yishay AccordionItemRenderer (difference is that
one is extending from Panel)

But I can't get this to show:






How I can get that output?

Thanks



2016-12-05 17:21 GMT+01:00 Alex Harui :

>
>
> On 12/5/16, 3:39 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
>  wrote:
>
> >Hi Alex,
> >
> >to introduce the problem:
> >
> >I took a look and saw that your ListItemRenderer is in the application
> >> project, not a library project, but it contains conditional compile
> >>code.
> >> I'm not sure we've ironed out that workflow.  The main idea was that
> >> application developers wouldn't need conditional compilation.  All APIs
> >> they would need would be cross-platform and all the platform-specific
> >> stuff would be encapsulated into the library SWCs.
> >>
> >>
> >mmm...I was thinking on that decision and I think it should be hard to
> >make
> >devs understand that they
> >can't do that in their projects.
> >
> >I think use case like custom item renderers are very common. We should
> >expect FlexJS users writing
> >custom IR a lot in their apps. If they are writing a complex app...should
> >be normal to has one or more swc libs
> >created by them, but we all now that one of the powers of flex is make a
> >fast app in one single project and even
> >in few files (classes). So I think, although I understand the decision and
> >intention, I think that is not practical.
>
> As Yishay says, custom item renderers should be possible without
> platform-specific code.  If you had a base class in the framework that
> wrapped LI then you probably wouldn't have any conditional compile in your
> renderer.  Still, we should allow for it at some point.
>
> >
> >btw, you pointed me to change COMPILE::JS to true, but how I can do this?
> >I see that in some build.xml but no in pom.xml. So although I search, I
> >don't know how to do this right now.
> >Some clue or where to dig?
>
> Well for Ant and FB integration, it is as simple as adding the compiler
> flags.  I think for Maven this sort of thing is buried in the Mojo, but I
> would think you could use the additional compiler options to set it for
> now.
>
> -Alex
>
>


-- 

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.


Slow performance > 1000 objects

2016-12-08 Thread gmanupnorth
This piece of code is causing significant lag in our UI and was looking for
suggestions on how to improve it. This builds up a list of approx 1400 items
and takes 35-50 seconds to finish.


AssetTreeChild is a custom component based on the VBOX AssetTreeChild.mxml

  


public function setAgentItem(value:SmartAgentVO):void
{
this.agentItem = value;
if ( value.Children!=null && value.Children.length>0 )
{
var assetComp:AssetTreeChild;   

for each ( var item:SmartAgentVO in 
value.Children )
{
assetComp = new 
AssetTreeChild();
list.addChild(assetComp);
assetComp.setAgentItem(item);

assetComp.setStyle("textIndent",7);
}
}
}



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/Slow-performance-1000-objects-tp57076.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: Why there are same files exists in multiple places?

2016-12-08 Thread Carlos Rovira
2016-12-05 17:17 GMT+01:00 Alex Harui :

> We could just fill HTML and HTML5 with the direct wrappers of elements.
> Currently we are using more Flex-familiar names like Container and Label.
> If we can think of a better SWC name for those things that's fine.  The
> point of HTML and Basic was that Harbs was finding it easier to work on
> his app with a library that wrapped all Sprites.  I want to make sure we
> don't have to wrap all Sprites on the SWF side and am making compiler
> changes to allow for that.  Hopefully then we can remove the wrapped
> Sprites, but it is a good exercise to have both just to make sure we don't
> have too many assumptions in the other SWCs.  You never know when there
> might be a third platform besides SWF and JS that we want to target.
>
>
If this project is successful, we should expect many additional platforms.
If you see what happen to other projects out there like haxe, it's normal
that people coming would want maybe iOS or Android or whatever and that
people comes to implement this addition.



-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Why there are same files exists in multiple places?

2016-12-08 Thread Carlos Rovira
2016-12-05 16:41 GMT+01:00 Peter Ent :

> Maybe we should have HTML just be the , , etc. components
> that were recently introduced. Have HTML5 product be additional
> HTML5-specific components, and leave Basic to be the original set.
>
> This way you would layer as needed: if you wanted a static-ish HTML page
> that had dynamics created with ActionScript, then you would use the HTML
> project. You could then add in jQuery or whatever to that.
>
> If you wanted to introduce layouts and more complex UI elements, you would
> add in Basic. If you didn't need DIV and H1 at all, then you'd just use
> Basic. I think sorting these into more useful functional groups would help.
>
> ‹
> Peter Ent
> Adobe Systems/Apache Flex Project
>
>
That sounds good to me


-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Flex as an operating system

2016-12-08 Thread Alex Harui
The Marshall Plan still generally expects a one-to-one association of a
SystemManager with an Application.  Lots of Flex apps have a central main
Application that loads sub-Applications.  By default, the main and
sub-apps all have to be compiled with the same version of Flex otherwise
changes to API signature could cause a verify error.

The Marshall Plan provided ways for a main app and sub-apps to be built on
different versions of Flex (as long as the main app was on the newer
version than the sub-apps).

I don't recall any discussions about creating new instances of Application
and adding it to a single SystemManager.  The API allows for it, although
I'm not sure the lifecycle would.  IOW, if you do
"systemManager.addChild(new Application()), you might get an exception
from some code somewhere.

Could Flex be an operating system?  I suppose so, but it wouldn't be a
very modern one.  It would at best be more like Windows 2.  A single UI
thread, no serious multi-tasking, etc.  Flex can certainly be the "world"
that everything else appears to live in.  I think there are kiosks and
other "embedded" apps where the only thing you see on the screen is a Flex
app and you can't switch way to other things running on the underlying OS.
 I think folks call those "immersive experiences".  One person even wrote
a dashboard for a very expensive luxury yacht in Flex.  It caused serious
hand-wringing on our team as we worried there might be a GC bug that would
cause the app to die.

-Alex

On 12/8/16, 7:29 AM, "Josh Tynjala"  wrote:

>Some historical context for this behavior:
>
>https://sourceforge.net/adobe/flexsdk/wiki/Marshall%20Plan/
>
>- Josh
>
>On Dec 8, 2016 7:17 AM, "flex capacitor"  wrote:
>
>> Was Flex going to be an operating system at some point? The way it's
>>setup
>> allows you to load multiple applications into a system manager. Each of
>> those applications can be moved and sized. Pop ups appear over all of
>>them
>> and they each have their own invalidation cycle. Was there ever a plan
>>for
>> FlexOS?
>>



Re: Flex as an operating system

2016-12-08 Thread Clint M
RIM used it as a front end on top of QNX for the Playbook. (AIR Based)

http://www.adobe.com/devnet/devices/articles/blackberry-difference.html

On Thu, Dec 8, 2016 at 7:16 AM, flex capacitor 
wrote:

> Was Flex going to be an operating system at some point? The way it's setup
> allows you to load multiple applications into a system manager. Each of
> those applications can be moved and sized. Pop ups appear over all of them
> and they each have their own invalidation cycle. Was there ever a plan for
> FlexOS?
>


Re: Flex as an operating system

2016-12-08 Thread Josh Tynjala
Some historical context for this behavior:

https://sourceforge.net/adobe/flexsdk/wiki/Marshall%20Plan/

- Josh

On Dec 8, 2016 7:17 AM, "flex capacitor"  wrote:

> Was Flex going to be an operating system at some point? The way it's setup
> allows you to load multiple applications into a system manager. Each of
> those applications can be moved and sized. Pop ups appear over all of them
> and they each have their own invalidation cycle. Was there ever a plan for
> FlexOS?
>


Re: Click event issues in Android build

2016-12-08 Thread Josh Tynjala
It might help if you could provide some example code that demonstrates the
issue on Android. If others can't easily run the code to reproduce on their
own devices, we can only guess what might be wrong.

By the way, have you tried connecting the debugger to the app while it's
running on Android? There might be a runtime error on Android only, and the
debugger can show you exactly where it's thrown.

- Josh

On Dec 8, 2016 5:26 AM, "griffo"  wrote:

Hi new to this forum.

Flex mobile app iOS build is working well but when compiled for Android
there are many issues which seem to be caused by events that don't complete.
Some code runs while other code doesn't and this is for a MouseEvent.CLICK
event, animation or other custom events.

I've tried to build with the Flex SDK 4.14.1 & 4.15.0 with Air 19-23 and
have similar issues with every build so far.

If anyone has any ideas that could help here it would be much appreciated.



--
View this message in context: http://apache-flex-
development.247.n4.nabble.com/Click-event-issues-in-
Android-build-tp57070.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Flex as an operating system

2016-12-08 Thread flex capacitor
Was Flex going to be an operating system at some point? The way it's setup
allows you to load multiple applications into a system manager. Each of
those applications can be moved and sized. Pop ups appear over all of them
and they each have their own invalidation cycle. Was there ever a plan for
FlexOS?


Click event issues in Android build

2016-12-08 Thread griffo
Hi new to this forum. 

Flex mobile app iOS build is working well but when compiled for Android
there are many issues which seem to be caused by events that don't complete.
Some code runs while other code doesn't and this is for a MouseEvent.CLICK
event, animation or other custom events.

I've tried to build with the Flex SDK 4.14.1 & 4.15.0 with Air 19-23 and
have similar issues with every build so far.

If anyone has any ideas that could help here it would be much appreciated.



--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/Click-event-issues-in-Android-build-tp57070.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.