Re: [flexcoders] Setting a filter for the UITextField inside a button?

2006-10-04 Thread Daniel Freiman



I forget the exact reason why this is happening, but the workaround is to move your code to the createChildren function.- DanOn 10/3/06, joshuajnoble
 [EMAIL PROTECTED] wrote:Hi, I'm trying to add a dropShadow to a button like so:
public class DropShadowButton extends Button{private var ds:DropShadowFilter;public function DropShadowButton():void{super();
ds = new DropShadowFilter();var a:Array = new Array();a.push(ds);this.textField = new UITextField();
this.textField.antiAliasType = flash.text.AntiAliasType.ADVANCED;this.textField.filters = a;this.addChild(textField);}}which works fine until, inside 
UIComponent.as, I throw an error reading:TypeError: Error #2007: Parameter antiAliasType must be non-null.at flash.text::TextField/set antiAliasType()atmx.core::UITextField/validateNow()[C:\dev\GMC\sdk\frameworks\mx\core\UITextField.as:1427]
at mx.core::UITextField/setnestLevel()[C:\dev\GMC\sdk\frameworks\mx\core\UITextField.as:956]out of these lines of code:if (child is ILayoutManagerClient)ILayoutManagerClient(child).nestLevel = nestLevel + 1;
else if (child is UITextField)UITextField(child).nestLevel = nestLevel + 1;Can anyone shed any light on what's going on under the hood?--Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
* Your email settings:Individual Email | Traditional* To change settings online go to:http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)* To change settings via email:mailto:[EMAIL PROTECTED]mailto:
[EMAIL PROTECTED]* To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



[flexcoders] Setting a filter for the UITextField inside a button?

2006-10-03 Thread joshuajnoble
Hi, I'm trying to add a dropShadow to a button like so:

public class DropShadowButton extends Button
{

private var ds:DropShadowFilter;

public function DropShadowButton():void
{
super();
ds = new DropShadowFilter();
var a:Array = new Array();
a.push(ds);
this.textField = new UITextField();
this.textField.antiAliasType = 
flash.text.AntiAliasType.ADVANCED;
this.textField.filters = a;
this.addChild(textField);
}
}

which works fine until, inside UIComponent.as, I throw an error reading:

TypeError: Error #2007: Parameter antiAliasType must be non-null.
at flash.text::TextField/set antiAliasType()
at
mx.core::UITextField/validateNow()[C:\dev\GMC\sdk\frameworks\mx\core\UITextField.as:1427]
at mx.core::UITextField/set
nestLevel()[C:\dev\GMC\sdk\frameworks\mx\core\UITextField.as:956]

out of these lines of code:

if (child is ILayoutManagerClient)
ILayoutManagerClient(child).nestLevel = nestLevel + 1;
else if (child is UITextField)
UITextField(child).nestLevel = nestLevel + 1;

Can anyone shed any light on what's going on under the hood?








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/