[flexcoders] setStyle, preinitialize and initialize

2012-04-11 Thread flexwdw
So, I've run into this before but I don't recall it being the headscratcher it 
has become today

I'm using Flex 3.5 in an app.  I have an MXML class with a bunch of UI in it.  
I have been asked to add a switch that causes the positions of some of the 
different child components to change.  The components use constraint-based 
layouts, so this is going to amount to modifying their left, right, top, and 
bottom styles.  This only needs to happen once per object creation.  

In the docs:
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_08.html

"Some applications must call the setStyle() method during the application or 
object instantiation. If this is the case, call the setStyle() method early in 
the instantiation phase. Early in the instantiation phase means setting styles 
from the component or application's preinitialize event, instead of the 
creationComplete or other event. By setting the styles as early as possible 
during initialization, you avoid unnecessary style notification and lookup. For 
more information about the component startup life cycle, see Improving Startup 
Performance."

Putting these style sets in preinitialize is impossible because the children 
have not been setup and are null.  At this point, I am making the calls in the 
handler for the initialize event.  Is there an acceptable way to do this 
without having to create two versions of the class subclass the children?  



RE: [flexcoders] Fonts and localization

2012-04-11 Thread michael_regert
Can you clarify something then?  I’m learning all of this.  For Korean, 
Simplified Chinese, and Japanese, I’m being told the font (or rendering) of 
characters in MX is cleaner and more readable then the Spark components.  Why 
the change?  Using MX only would be a serious step backwards…

Michael J. Regert

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Wednesday, April 11, 2012 3:11 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Fonts and localization



You would have to use MX components everywhere (and not need right-to-left 
language support)


On 4/11/12 9:43 AM, "michael_reg...@dell.com"  wrote:





Thanks.? I’m being told by our Korean QA that the default font that is used in 
the MS Advanced Data Grid is much cleaner than what is used in the Spark 
controls.? How do I change this to use the same font as the grid across my 
whole app?


Michael J. Regert

Please consider the environment before printing this email.

Confidentiality Notice | This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential or 
proprietary information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, immediately 
contact the sender by reply e-mail and destroy all copies of the original 
message.



From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Wednesday, April 11, 2012 11:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Fonts and localization



MX uses TextField, Spark defaults to TextLine which will render a bit 
differently.


On 4/11/12 8:26 AM, "michael_reg...@dell.com"  wrote:






I’m trying to understand what Adobe Flex is doing for Korean (and other 
languages) fonts.  I’m seeing that the font used for a Spark label is different 
than what is used in an MX Advanced Data Grid.  I’m using Adobe Flex 4.0 and 
4.6.

I have the following sample app.  The font used to display the label when run 
is different than the grid, even though I am not defining a font or setting 
anything in a css.  Why?  Screenshot attached (if it comes through in the post).



http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
 

 


   

   
 


  
 
 
   

   







[cid:image001.png@01CD17F8.E3EAB330]




Michael




--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

<>

Re: [flexcoders] Fonts and localization

2012-04-11 Thread Alex Harui
You would have to use MX components everywhere (and not need right-to-left 
language support)


On 4/11/12 9:43 AM, "michael_reg...@dell.com"  wrote:






Thanks.? I’m being told by our Korean QA that the default font that is used in 
the MS Advanced Data Grid is much cleaner than what is used in the Spark 
controls.? How do I change this to use the same font as the grid across my 
whole app?


Michael J. Regert

Please consider the environment before printing this email.

Confidentiality Notice | This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential or 
proprietary information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, immediately 
contact the sender by reply e-mail and destroy all copies of the original 
message.



From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Wednesday, April 11, 2012 11:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Fonts and localization



MX uses TextField, Spark defaults to TextLine which will render a bit 
differently.


On 4/11/12 8:26 AM, "michael_reg...@dell.com"  wrote:






I’m trying to understand what Adobe Flex is doing for Korean (and other 
languages) fonts.  I’m seeing that the font used for a Spark label is different 
than what is used in an MX Advanced Data Grid.  I’m using Adobe Flex 4.0 and 
4.6.

I have the following sample app.  The font used to display the label when run 
is different than the grid, even though I am not defining a font or setting 
anything in a css.  Why?  Screenshot attached (if it comes through in the post).



http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
 

 


   

   
 


  
 
 
   

   







[cid:3416994655_104048946]




Michael





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
<>

RE: [flexcoders] Fonts and localization

2012-04-11 Thread michael_regert
Typo Correction: … in the MX Advanced Data Grid…

Michael J. Regert

Please consider the environment before printing this email.

Confidentiality Notice | This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential or 
proprietary information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, immediately 
contact the sender by reply e-mail and destroy all copies of the original 
message.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Regert, Michael
Sent: Wednesday, April 11, 2012 11:43 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Fonts and localization


Thanks.  I’m being told by our Korean QA that the default font that is used in 
the MS Advanced Data Grid is much cleaner than what is used in the Spark 
controls.  How do I change this to use the same font as the grid across my 
whole app?

Michael J. Regert

Please consider the environment before printing this email.

Confidentiality Notice | This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential or 
proprietary information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, immediately 
contact the sender by reply e-mail and destroy all copies of the original 
message.


From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Alex Harui
Sent: Wednesday, April 11, 2012 11:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Fonts and localization



MX uses TextField, Spark defaults to TextLine which will render a bit 
differently.


On 4/11/12 8:26 AM, "michael_reg...@dell.com"  wrote:





I’m trying to understand what Adobe Flex is doing for Korean (and other 
languages) fonts.  I’m seeing that the font used for a Spark label is different 
than what is used in an MX Advanced Data Grid.  I’m using Adobe Flex 4.0 and 
4.6.

I have the following sample app.  The font used to display the label when run 
is different than the grid, even though I am not defining a font or setting 
anything in a css.  Why?  Screenshot attached (if it comes through in the post).



http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
  
 
  


   
 
   
  
 

  
 
  

 
   







[cid:image001.png@01CD17D8.6D366AB0]




Michael





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

<>

RE: [flexcoders] Fonts and localization

2012-04-11 Thread michael_regert
Thanks.  I’m being told by our Korean QA that the default font that is used in 
the MS Advanced Data Grid is much cleaner than what is used in the Spark 
controls.  How do I change this to use the same font as the grid across my 
whole app?

Michael J. Regert

Please consider the environment before printing this email.

Confidentiality Notice | This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential or 
proprietary information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, immediately 
contact the sender by reply e-mail and destroy all copies of the original 
message.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Wednesday, April 11, 2012 11:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Fonts and localization



MX uses TextField, Spark defaults to TextLine which will render a bit 
differently.


On 4/11/12 8:26 AM, "michael_reg...@dell.com"  wrote:





I’m trying to understand what Adobe Flex is doing for Korean (and other 
languages) fonts.  I’m seeing that the font used for a Spark label is different 
than what is used in an MX Advanced Data Grid.  I’m using Adobe Flex 4.0 and 
4.6.

I have the following sample app.  The font used to display the label when run 
is different than the grid, even though I am not defining a font or setting 
anything in a css.  Why?  Screenshot attached (if it comes through in the post).



http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
  
 
  


   
 
   
  
 

  
 
  

 
   







[cid:image001.png@01CD17D8.49B69650]




Michael




--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

<>

Re: [flexcoders] Fonts and localization

2012-04-11 Thread Alex Harui
MX uses TextField, Spark defaults to TextLine which will render a bit 
differently.


On 4/11/12 8:26 AM, "michael_reg...@dell.com"  wrote:






I’m trying to understand what Adobe Flex is doing for Korean (and other 
languages) fonts.  I’m seeing that the font used for a Spark label is different 
than what is used in an MX Advanced Data Grid.  I’m using Adobe Flex 4.0 and 
4.6.

I have the following sample app.  The font used to display the label when run 
is different than the grid, even though I am not defining a font or setting 
anything in a css.  Why?  Screenshot attached (if it comes through in the post).



http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
  
 
  


   
 
   
  
 

  
 
  

 
   







[cid:3416981889_103590120]




Michael





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
<>

[flexcoders] Fonts and localization

2012-04-11 Thread michael_regert
I’m trying to understand what Adobe Flex is doing for Korean (and other 
languages) fonts.  I’m seeing that the font used for a Spark label is different 
than what is used in an MX Advanced Data Grid.  I’m using Adobe Flex 4.0 and 
4.6.

I have the following sample app.  The font used to display the label when run 
is different than the grid, even though I am not defining a font or setting 
anything in a css.  Why?  Screenshot attached (if it comes through in the post).



http://ns.adobe.com/mxml/2009";
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
   
  
   


   
  
   
   
  

  
 
   
 
  
   







[cid:image001.png@01CD17CD.95207800]



Michael
<>