RE: [flexcoders] specifying measuredWidth/measuredHeight in a skin

2006-11-05 Thread Brian Deitte





Hmm, so everything else I've sent recently has been posted, 
so I'll try to resend this. I know that flexcoders can have a slow posting 
time for some people (which now seems to include me), but it's been a day. 
If that's now normal, someone just let me know. Thanks, 
Brian


From: Brian Deitte Sent: Friday, 
November 03, 2006 4:25 PMTo: 
'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] specifying 
measuredWidth/measuredHeight in a skin

Hi Mike, thanks for the response. I do have a 
solution now, based on Dirk's example (http://www.richinternet.de/blog/index.cfm?mode=entryentry=ADD4FDD1-9B48-BFBC-2A70F3C57EBC6892), 
but I would be interested in knowing what I was doing wrong. I was doing 
something I saw in the framework for Application, and subclassing 
ProgrammaticSkin and using it in CSS as a background-image. The skin would 
have to have the measuredWidth/measuredHeight, as previously mentioned, and 
here's the a simplified version of the updateDisplayList() 
method:

 override protected function 
updateDisplayList(w:Number, h:Number):void
 { super.updateDisplayList(w, 
h);
 // FIXME: override Application to add 
styles for all values below, then getStyle() for each // 
one and set in CSS
 var g:Graphics = graphics; 
g.clear();
 // set width and height to dimensions we want for this 
gradient
 w = 916; h = 
16; var fillColors:Array = [0xF7F7F7, 
0xD5D5D5]; var fillAlphas:Array = [1, 
1]; 
drawRoundRect(x, y, w, h, null, fillColors, fillAlphas, 
verticalGradientMatrix(x, y, w, h)); 
 
}

And 
this works fine, but again only if the measuredWidth/measuredHeight is 
set. So after seeing Dirk's code, I tried changingone skin over to 
extend HaloBorder, not set the measuredWidth/measuredHeight, and then use the 
skin in CSS as a border-skin. This works, I'm happy to say. It does 
feel a little strange to me, that I'm using something called "border-skin" but 
I'm doing things in the middle of a canvas. Is this part normal or should 
I be using a background-image?

This 
turned into a longer message than I thought! I'm starting to get into this 
whole building-a-Flex-app thing. :) -Brian



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Michael 
SchmalleSent: Thursday, November 02, 2006 5:07 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] specifying 
measuredWidth/measuredHeight in a skin


Hi Brian,This dosn't make sense...What are you subclassing 
for the skin class?I use ProgrammaticSkin and RectangularBorder all the 
time and have never specified measuredWidth or measuredHeight in a skin. I get 
none of the things you are talking about. Are you using an image or 
drawing API in the skin?If it is a borderSkin style are you subclassing 
RectangularBorder? For the borderMetrics. Can you give an example, I am sure I 
could nail this one.Peace, Mike
On 11/2/06, Brian 
Deitte [EMAIL PROTECTED]com 
wrote: 

  
  
  
  
  Ah, my first flexcoders post as a Flex developer. I feel like I 
  shouldbe getting my cloak and learning a secret handshake right 
  now.Is there a way to not specify the measuredWidth and measuredHeight 
  in askin? I don't like having to hardcode a width and height there, as 
  Icurrently have to do.For more details, this is an application 
  that is using absolutepositioning, and the skins are on Canvases. If I 
  don't specify themeasured width and height in the skin, then the 
  drawRoundRect() doesn'tdraw from the correct position, and the 
  passed-in width and height fromupdateDisplayList() doesn't seem to 
  help with this fact. Am I missingsomething here?Thanks for any 
  pointers, Brian-- 
What goes up, does come down. 

__._,_.___





--
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 
   
 

  




__,_._,___



RE: [flexcoders] specifying measuredWidth/measuredHeight in a skin

2006-11-05 Thread Brian Deitte





Hi Mike, thanks for the response. I do have a 
solution now, based on Dirk's example (http://www.richinternet.de/blog/index.cfm?mode=entryentry=ADD4FDD1-9B48-BFBC-2A70F3C57EBC6892), 
but I would be interested in knowing what I was doing wrong. I was doing 
something I saw in the framework for Application, and subclassing 
ProgrammaticSkin and using it in CSS as a background-image. The skin would 
have to have the measuredWidth/measuredHeight, as previously mentioned, and 
here's the a simplified version of the updateDisplayList() 
method:

 override protected function 
updateDisplayList(w:Number, h:Number):void
 { super.updateDisplayList(w, 
h);
 // FIXME: override Application to add 
styles for all values below, then getStyle() for each // 
one and set in CSS
 var g:Graphics = graphics; 
g.clear();
 // set width and height to dimensions we want for this 
gradient
 w = 916; h = 
16; var fillColors:Array = [0xF7F7F7, 
0xD5D5D5]; var fillAlphas:Array = [1, 
1]; 
drawRoundRect(x, y, w, h, null, fillColors, fillAlphas, 
verticalGradientMatrix(x, y, w, h)); 
 
}

And 
this works fine, but again only if the measuredWidth/measuredHeight is 
set. So after seeing Dirk's code, I tried changingone skin over to 
extend HaloBorder, not set the measuredWidth/measuredHeight, and then use the 
skin in CSS as a border-skin. This works, I'm happy to say. It does 
feel a little strange to me, that I'm using something called "border-skin" but 
I'm doing things in the middle of a canvas. Is this part normal or should 
I be using a background-image?

This 
turned into a longer message than I thought! I'm starting to get into this 
whole building-a-Flex-app thing. :) -Brian



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Michael 
SchmalleSent: Thursday, November 02, 2006 5:07 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] specifying 
measuredWidth/measuredHeight in a skin


Hi Brian,This dosn't make sense...What are you subclassing 
for the skin class?I use ProgrammaticSkin and RectangularBorder all the 
time and have never specified measuredWidth or measuredHeight in a skin. I get 
none of the things you are talking about. Are you using an image or 
drawing API in the skin?If it is a borderSkin style are you subclassing 
RectangularBorder? For the borderMetrics. Can you give an example, I am sure I 
could nail this one.Peace, Mike
On 11/2/06, Brian 
Deitte [EMAIL PROTECTED]com 
wrote: 

  
  
  
  
  Ah, my first flexcoders post as a Flex developer. I feel like I 
  shouldbe getting my cloak and learning a secret handshake right 
  now.Is there a way to not specify the measuredWidth and measuredHeight 
  in askin? I don't like having to hardcode a width and height there, as 
  Icurrently have to do.For more details, this is an application 
  that is using absolutepositioning, and the skins are on Canvases. If I 
  don't specify themeasured width and height in the skin, then the 
  drawRoundRect() doesn'tdraw from the correct position, and the 
  passed-in width and height fromupdateDisplayList() doesn't seem to 
  help with this fact. Am I missingsomething here?Thanks for any 
  pointers, Brian-- 
What goes up, does come down. 

__._,_.___





--
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 
   
 

  




__,_._,___



Re: [flexcoders] specifying measuredWidth/measuredHeight in a skin

2006-11-03 Thread Michael Schmalle



Hi Brian,This dosn't make sense...What are you subclassing for the skin class?I use ProgrammaticSkin and RectangularBorder all the time and have never specified measuredWidth or measuredHeight in a skin. I get none of the things you are talking about.
Are you using an image or drawing API in the skin?If it is a borderSkin style are you subclassing RectangularBorder? For the borderMetrics. Can you give an example, I am sure I could nail this one.
Peace, MikeOn 11/2/06, Brian Deitte [EMAIL PROTECTED] wrote:













  



Ah, my first flexcoders post as a Flex developer.  I feel like I should
be getting my cloak and learning a secret handshake right now.

Is there a way to not specify the measuredWidth and measuredHeight in a
skin?  I don't like having to hardcode a width and height there, as I
currently have to do.

For more details, this is an application that is using absolute
positioning, and the skins are on Canvases.  If I don't specify the
measured width and height in the skin, then the drawRoundRect() doesn't
draw from the correct position, and the passed-in width and height from
updateDisplayList() doesn't seem to help with this fact.  Am I missing
something here?

Thanks for any pointers, Brian

  













-- What goes up, does come down.

__._,_.___





--
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 
   
 

  




__,_._,___