You can make the property writeable in 2.0 - just add setter method in the inherited class. The issue is that most of the times you access the property, explicit typecasting is made by compiler - causing exception if you are using "unrelated" datatype. 
 
One approach to solve this issue would be to have another compiler keyword that bypasses type checking with dynamic resolution on the variable level like
    override dynamic var dropdown;
That would obviously cause serious update to the typecasting statements making them "quiet" - basically 1.5 behavior that is not advertised, but available for hackers - probably would be banned by archtects and remain unused by corporate developers.
 
Other well-defined approach is to seriously reevaluate extensibility of the product and extend it with tons of interfaces. Has been tried number of times with Java, never (to my best knowledge) commercially successfully with front-end large scale tool. In the end/maintenance stage, I always had to do "fine tuning" by using Java scripting products like beanshell.
 
That leaves the third approach I like most. I am glad you (presumably unconsciously due to similar problem) remembered PowerBuilder scripting language. PB also had single inheritance and no decorations. At a certain maturity level they decided to do strong type checking and optimization at the expense of "scripting power tricks". The problem was that they had significant user base at the time of the change and could not afford to loose early adopters.
 
However, they solved this problem with simplicity and pragmatism that always win the users appreciation. They allowed method call modifier "dynamic". For simplicity I will switch PowerBuilder type ANY to Object :
class a { function test(x:int){ return "a"}}
class b { function test(y:string){ return "b"}}
//example of usage
var o:Object = new a(); o.dynamic test(5);o.invoke("test", 5);
var o:Object = new b(); o.dynamic test("abc");o.invoke("test", "abc");
They also made sure that events (seldom called as response to user interaction/internal changes) are staying dynamic - no strong type checking there - no need for endless switch/case statement typecasting the event type and missing the new ones as the controls base is extended.
 
The "legacy" code was saved by trivial replace of non-compiling statements with dynamic calls, the "core" run-time code base by using similar trick retained higher percentage of the previous versions tested code that continued to work. Main objective - giving application developers more "strict" intellisense environment eliminating typos while allowing for more dynamic coding when needed worked very well.
 
Hope it can be integrated in the current version of the compiler.
 
Thank you,
Anatole Tartakovsky
 
P.S.
It would be interesting to get feedback from the current Flex developers who have production applications in 1.5 on the chances/effort of the conversion from 1.5 to 2.0. That very well might give an indication of importance of the language changes - it very well might be just my imagination. That of course is only important if those applications have to be upgraded to 2.0.
 
Some other scripting languages are also subject for review as the integrationsimplicity and power of those keep driving the users trends - PHP and Phython is a good example what integration model can do to the environment by enabling 3rd parties.
 
 
----- Original Message -----
From: bhaq1972
Sent: Monday, February 20, 2006 4:52 AM
Subject: [flexcoders] Re: problem with cell renderer in ComboBox

i would also like to see the dropdown property made into
a 'Read/Write'.

i had to override the getDropdown() method which gave me problems
when going from flex1 to 1.5 (i know this method is not in the api)

other technologies such as PowerBuilder is not an issue.



--- In flexcoders@yahoogroups.com, "Anatole Tartakovsky"
<[EMAIL PROTECTED]> wrote:
>
> Matt,
>     Is it possible to downgrade ComboBox::dropdown property in the
next beta/final release to ListBase so the subclassing/ability to
show more complex dropdowns is possible? Also, what are the chances
of relaxing base types of the internal properties of the controls a
bit (when it does not affect performance) from strongly typed to
lower levels/split them to interfaces.
>     Without code decoration/polymorphism in the base objects the
current architecture is much more code and time consuming for
control development and can be showstopper for 3rd party controls.
>
> Sincerely,
> Anatole
>
> ----- Original Message -----
>   From: Matt Chotin
>   To: flexcoders@yahoogroups.com
>   Sent: Sunday, February 19, 2006 1:16 AM
>   Subject: RE: [flexcoders] Re: problem with cell renderer in
ComboBox
>
>
>   labelField isn't necessary if you have a cell renderer.  Any
chance you
>   can just use labelFunction if all you're doing is
concatenation?  I'm
>   almost positive variableRowHeight also isn't going to work.
>
>   -----Original Message-----
>   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
>   Behalf Of george_lui
>   Sent: Friday, February 17, 2006 11:10 AM
>   To: flexcoders@yahoogroups.com
>   Subject: [flexcoders] Re: problem with cell renderer in ComboBox
>
>   good call, but it didn't work.  Really weird. Do you think I
still
>   need the labelField attribute?
>
>   TIA,
>   George
>
>
>   --- In flexcoders@yahoogroups.com, "Matt Chotin" <mchotin@>
wrote:
>   >
>   > What if you take out the quotes around the renderer?
>   >
>   > -----Original Message-----
>   > From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED]
>   On
>   > Behalf Of george_lui
>   > Sent: Thursday, February 16, 2006 3:50 PM
>   > To: flexcoders@yahoogroups.com
>   > Subject: [flexcoders] problem with cell renderer in ComboBox
>   >
>   > Hi,
>   >
>   > I had a cellrenderer that was originally used in  datagrid
cell.  I've
>   > since replaced the datagrid with a comboBox. I'm trying to
reuse the
>   > same cellrenderer in the combo using the code below.
>   >
>   > <mx:ComboBox id="employeeComboBox"                           
>   >              creationComplete=
>   > 
>   >
>   "event.target.getDropdown
().cellRenderer='com.sf.sfv4.view.sharkfin.Full
>   > NameRenderer';
>   > event.target.getDropdown().variableRowHeight=true"
rowCount="10">
>   >   <mx:dataProvider> { ModelLocator.employees }
</mx:dataProvider>
>   > </mx:ComboBox>
>   >
>   > The FullNameRenderer cellrenderer I have just takes the first
and last
>   > name of a user vo and concatenates it.
>   >
>   > However this isn't working for the combobox.  I get and set the
>   > cellrenderer of the combobox's dropdown property as stated in
this
>   > group by another member, but it doesn't work.  Instead I get
the user
>   > vo object displayed.
>   >
>   > I'm confused, I'm using the same dataProvider and cellrenderer
in the
>   > combobox as I did in the datagrid.  I think there's a
difference
>   > between the two widgets, but I just don't know what it is.
>   >
>   > Please advise...
>   >
>   > TIA,
>   > George
>   >
>   >
>   >
>   >
>   >
>   > --
>   > 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
>   >
>
>
>
>
>
>
>   --
>   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
>
>
>
>
>
>
>
>
>   --
>   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 Web site design development  Computer software
development  Software design and development 
>         Macromedia flex  Software development best practice 
>
>
> -------------------------------------------------------------------
-----------
>   YAHOO! GROUPS LINKS
>
>     a..  Visit your group "flexcoders" on the web.
>      
>     b..  To unsubscribe from this group, send an email to:
>      [EMAIL PROTECTED]
>      
>     c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.
>
>
> -------------------------------------------------------------------
-----------
>







--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to