To the adobe developers,

I have found that I can extend the simpler display classes without much issue, 
I have really only had issues with sub-classing the Form based components. For 
our project (and probably many Flex projects) the form concept is a strong one 
and the ability for designers to layout input screens very quickly with Form,  
FormItem and FormHeader is fantastic. I want to extend these classes primarily 
to preserve the integration with Flex Builder. Maybe trying to make these 
classes infinitely extensible is the incorrect approach. Maybe a tool that 
would allow me to integrate my components more tightly in Flex Builder would be 
a better solution. 

Specifically when someone drags an NForm on the page I want flex builder to 
automatically wrap other components in an NFormItem etc. 

--Sean

----- Original Message ----
From: Michael Schmalle <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, March 13, 2007 6:42:00 AM
Subject: Re: [flexcoders] Re: Are other developers hesitant to extend existing 
classes in Flex?









  


    
            > However, the indicator is added as a child to rawChildren, which 
is public. This means you could reach it without problems.

No, that is not true. You know why? They didn't name it! That should be a 
requirement of all composites Aodbe people.


You need to name every instance, this way if us devs do want access to it we 
can get it.

EECOLOR, as far as the indicator, you would have to call getStyle(), create the 
class instance, loop through all the rawChildren and do an is comparison. This 
is just to get a reference, it sucks.


But, Is possible through that hack, I haven't tried it though.

Peace, Mike


On 13 Mar 2007 03:10:38 -0700, EECOLOR <
[EMAIL PROTECTED] com> wrote:












  


    
            
I ran into the same problem when i wanted to align the label to the left. 
However, i found that there is a reference to the label in the mx_internal 
namespace.

 

  override protected function updateDisplayList( unscaledWidth: Number, 
unscaledHeight: Number):void
  {
   super.updateDisplay List(unscaledWid th, unscaledHeight) ;
   var labelAlign_str: String = getStyle("labelAlign");

   
   if (labelAlign_ str == "left" && label.length)
   {
    var vm:EdgeMetrics = viewMetricsAndPaddi ng;
    var labelObject: UIComponent = mx_internal: :labelObject as UIComponent;
    
labelObject. move(vm.left, labelObject. y);
   };
  };

 

This however does not work for you, since there is no equivalant for the 
indicator. However, the indicator is added as a child to rawChildren, which is 
public. This means you could reach it without problems.

 

 

Greetz Erik



 

On 3/12/07, Sean Sell <rough68fish@ yahoo.com
> wrote:








Alex,

I understand exactly what you mean about testing requirements for public method 
and I can really only speak to the FormItem class, but here's my experience.. .


The first thing I wanted to do was change where the required field asterisk is 
displayed; and put it in front of the label. No big deal right. To do it all I 
need to do is override updateDisplayList
and move:



// Position the "required" indicator.
            displayIndicator( left, y);
            left += indicatorGap;

above 

// Position our label.
            if (labelObj)
            {...


But there are calls to about 16 private methods or values within this function 
which I would have to re-write to make this work. Ironically I think all of 
those would work as written if I could just call them.



--Sean
 







Recent Activity



 130



New Members


Visit Your Group 

SPONSORED LINKS





Software development tool


Software development


Software development services


Home design software


Software development company



Cool Websites



Know a good site?

Share and vote

on Bix.com!



Y! Toolbar



Get it Free!

easy 1-click access

to your groups.



Yahoo! Groups



Start a group

in 3 easy steps.

Connect with others.




.

 
 





    
  

    
    
















-- 
Teoti Graphix
http://www.teotigra phix.com

Blog - Flex2Components
http://www.flex2com ponents.com


You can find more by solving the problem then by 'asking the question'.

    
  

    
    




<!--

#ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;
}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;
}
#ygrp-vitnav{
padding-top:10px;
font-family:Verdana;
font-size:77%;
margin:0;
}
#ygrp-vitnav a{
padding:0 1px;
}
#ygrp-actbar{
clear:both;
margin:25px 0;
white-space:nowrap;
color:#666;
text-align:right;
}
#ygrp-actbar .left{
float:left;
white-space:nowrap;
}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;
font-size:77%;
padding:15px 0;
}
#ygrp-ft{
font-family:verdana;
font-size:77%;
border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;
}

#ygrp-vital{
background-color:#e0ecee;
margin-bottom:20px;
padding:2px 0 8px 8px;
}
#ygrp-vital #vithd{
font-size:77%;
font-family:Verdana;
font-weight:bold;
color:#333;
text-transform:uppercase;
}
#ygrp-vital ul{
padding:0;
margin:2px 0;
}
#ygrp-vital ul li{
list-style-type:none;
clear:both;
border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;
color:#ff7900;
float:right;
width:2em;
text-align:right;
padding-right:.5em;
}
#ygrp-vital ul li .cat{
font-weight:bold;
}
#ygrp-vital a {
text-decoration:none;
}

#ygrp-vital a:hover{
text-decoration:underline;
}

#ygrp-sponsor #hd{
color:#999;
font-size:77%;
}
#ygrp-sponsor #ov{
padding:6px 13px;
background-color:#e0ecee;
margin-bottom:20px;
}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;
margin:0;
}
#ygrp-sponsor #ov li{
list-style-type:square;
padding:6px 0;
font-size:77%;
}
#ygrp-sponsor #ov li a{
text-decoration:none;
font-size:130%;
}
#ygrp-sponsor #nc {
background-color:#eee;
margin-bottom:20px;
padding:0 8px;
}
#ygrp-sponsor .ad{
padding:8px 0;
}
#ygrp-sponsor .ad #hd1{
font-family:Arial;
font-weight:bold;
color:#628c2a;
font-size:100%;
line-height:122%;
}
#ygrp-sponsor .ad a{
text-decoration:none;
}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;
}
#ygrp-sponsor .ad p{
margin:0;
}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;
}
#ygrp-text tt{
font-size:120%;
}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
-->








 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

Reply via email to