Re: [flexcoders] Problem using getDefinitionByName in a ClassFactory

2007-05-05 Thread Manish Jethani
On 5/4/07, Tom Chiverton [EMAIL PROTECTED] wrote:
 I have a componet I want to pass a dynamic renderer into:
 coreView:MonthCalendar date={ thisMonth } dataProvider={foo}
 dayRenderer=com.halliwells.flex.bma.view.HearingDay/

 It's a TileList type control, so at some stage in the component I do:
 var c:ClassFactory=new ClassFactory( Class (
 flash.utils.getDefinitionByName(dayRenderer) ) );
 tileListName.itemRenderer=c;

Your dayRenderer property would be of type IFactory, right? In that
case you just assign the value to tileListName.itemRenderer as it is.

See the code for itemRenderer in ListBase.as


[flexcoders] Problem using getDefinitionByName in a ClassFactory

2007-05-04 Thread Tom Chiverton
I have a componet I want to pass a dynamic renderer into:
coreView:MonthCalendar date={ thisMonth } dataProvider={foo} 
dayRenderer=com.halliwells.flex.bma.view.HearingDay/

It's a TileList type control, so at some stage in the component I do:
var c:ClassFactory=new ClassFactory( Class ( 
flash.utils.getDefinitionByName(dayRenderer) ) );
tileListName.itemRenderer=c;

Unfortunately this fails inside flash.utils.getDefinitionByName , saying the 
variable HearingDay is undefined !

I can fix this by calling like:
coreView:MonthCalendar date={ thisMonth } dataProvider={foo} 
dayRenderer=com.halliwells.flex.bma.view.HearingDay/
and doing:
var c:ClassFactory=new ClassFactory( dayRenderer );
tileList.itemRenderer=c;
instead.

I'm sure the first way should work though, any ideas ?
-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



Re: [flexcoders] Problem using getDefinitionByName in a ClassFactory

2007-05-04 Thread Daniel Freiman

It looks like dayRenderer is of type Class, not String.  Is this true?  If
so, then you obviously can't pass it to getDefinitionByName (nor would you
need to).

- Dan Freiman
nondocs http://nondocs.blogspot.com

On 5/4/07, Tom Chiverton [EMAIL PROTECTED] wrote:


  I have a componet I want to pass a dynamic renderer into:
coreView:MonthCalendar date={ thisMonth } dataProvider={foo}
dayRenderer=com.halliwells.flex.bma.view.HearingDay/

It's a TileList type control, so at some stage in the component I do:
var c:ClassFactory=new ClassFactory( Class (
flash.utils.getDefinitionByName(dayRenderer) ) );
tileListName.itemRenderer=c;

Unfortunately this fails inside flash.utils.getDefinitionByName , saying
the
variable HearingDay is undefined !

I can fix this by calling like:
coreView:MonthCalendar date={ thisMonth } dataProvider={foo}
dayRenderer=com.halliwells.flex.bma.view.HearingDay/
and doing:
var c:ClassFactory=new ClassFactory( dayRenderer );
tileList.itemRenderer=c;
instead.

I'm sure the first way should work though, any ideas ?
--
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office address
is at St James's Court Brown Street Manchester M2 2JF. A list of members is
available for inspection at the registered office. Any reference to a
partner in relation to Halliwells LLP means a member of Halliwells LLP.
Regulated by the Law Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and
may be confidential or legally privileged. If you are not the addressee you
must not read it and must not use any information contained in nor copy it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents. If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.