There should be a UIComponentDescriptor in a .descriptor property on any
UIComponent instantiated by MXML.

 

I would probably subclass ComboBox, and have it assign itself to the
dropdownFactory.

 

However, if you don't want to do that and know what properties you want
to steal, I would subclass DG and steal it in commitProperties from its
.owner property and not bother with the UIComponentDescriptor  Some
things like labelField are passed down for you.

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of reflexactions
Sent: Tuesday, December 04, 2007 9:40 PM
To: [email protected]
Subject: [flexcomponents] Re: ComboBox with a dropdown DataGrid

 

Ah yes, I can create a custom ClassFactory.
I "could" pass a reference to the Combo into the custom ClassFactory 
so it could read custom properties off the Combo at run time, and 
also fire an event to allow the devs to customise the Grid before it 
is passed in to the Combo in getDropDown.

In theory I would think (though I dont know how) it is possible to 
have it read a descriptor from the Combo and instantiate a grid based 
on the descriptor. The descriptor being some tags set in the mxml?

--- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> 
wrote:
>
> You would use a custom factory or the properties bag in 
ClassFactory to
> customize the grid. The combo's dropdown can get destroyed and
> re-created in certain situations which is why we use a factory and 
you
> shouldn't count on mucking with the dropdown property always 
working.
> 
> 
> 
> ________________________________
> 
> From: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> [mailto:[email protected]
<mailto:flexcomponents%40yahoogroups.com> ] On Behalf Of reflexactions
> Sent: Tuesday, December 04, 2007 9:12 PM
> To: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> Subject: [flexcomponents] Re: ComboBox with a dropdown DataGrid
> 
> 
> 
> Thanks Alex good to know, 
> Actually thinking about it at least for the simple case you are 
> right, I saw I could set the factory property but then discounted 
> that as there didnt seem to be anyway to configure the dropDown 
once 
> the instance is created becuase getDropDown is private. However at 
> least for a simple grid it can be built directly from the 
> DataProvider without any extra configuration
> I sort of feel however that this probably wont be enough because I 
> know that in this application/system the grids generally have a lot 
> of custom formats, so I am gussing that there would need to be away 
> to specify the grid structure.
> 
> --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> , "Alex Harui" <aharui@> 
> wrote:
> >
> > All you should need to do is change dropdownFactory. I wouldn't 
> have
> > said I did it if I had to monkey-patch anything.
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> 
> > [mailto:[email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> ] On Behalf Of 
reflexactions
> > Sent: Tuesday, December 04, 2007 8:58 PM
> > To: [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> 
> > Subject: [flexcomponents] Re: ComboBox with a dropdown DataGrid
> > 
> > 
> > 
> > Hmm well..
> > 
> > Basically as Shannon says... 
> > They want more than just a fancy label format can handle, plus.. 
> > plus...
> > Also to some extent "mines not to reason why", I just build it..
> > 
> > Actually it doesnt seem that difficult to do barring the usual 
> issue 
> > in extending Adobe components that just about every property you 
> need 
> > to access has been declared private.
> > CombBox by and large deals in ListBase and Grid derives from 
> > ListBase, just _dropdown and getDropdown are private so I will go 
> the 
> > AbjectOrientated approach and cut and paste ComboBox into a new 
> class 
> > and then modify those bits.
> > Probably will make the dropDown a public property so the grid 
> > definition can be nested in combo tag or allow it to be built 
> > externally and then set.
> > Anyway those are just my thoughts of the top of my head...
> > 
> > 
> > --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> 
> > <mailto:flexcomponents%40yahoogroups.com> , "ben.clinkinbeard" 
> > <ben.clinkinbeard@> wrote:
> > >
> > > Not that I know of but I have to ask- why would you want to do 
> that?
> > > 
> > > 
> > > --- In [email protected]
<mailto:flexcomponents%40yahoogroups.com> 
> <mailto:flexcomponents%40yahoogroups.com> 
> > <mailto:flexcomponents%40yahoogroups.com> , "reflexactions"
> > > <reflexactions@> wrote:
> > > >
> > > > Before I reinvent the wheel has anyone tried this?
> > > > 
> > > > tks...
> > > >
> > >
> >
>

 

Reply via email to