FlexForFlash.zip is there for 1.0 compatibility, since we updated the skins in 1.5 to be mostly programmatic the need for exposing much of the source went away.

 

Note that the classConstruct() method you see is static, so you can’t just override it.

 

Thanks for the compliment J

 

Matt

 


From: Simon Fifield [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 26, 2005 12:03 PM
To: [email protected]
Subject: RE: [flexcoders] RowRenderer for Custom List

 

Thanks Matt,

 

I've just been trawling through the thousands of Flexcoders posts and found a reply you sent to someone explaining how you can use FDB to view the code because it is probably different to the classes found in FlexForFash resources.

 

A little dissappointing that these classes are not the final classes used for Flex1.5. I've literally taken days to try and figure out what I'm doing wrong and the source code I'm looking at is not the correct source code at all - FRUSTRATION!!!

 

Anyway, I've literally just this minute copied the code from FDB into FlexBuilder and seen that there is indeed at the bottom of ScrollSelectList a method called classConstruct() which specifically refers to the SelectableRow class.

 

I'll bear in mind next time not to bother looking at the code in FlexForFlash as it seems unreliable - or am I missing the point of why it's there in the first place?

 

Anyway, thanks again for the tip.

 

 

And by the way - I admire just how sharp your skills are - keep up the good work.

 

 

Regards,

Simon

 

 

-----Original Message-----
From: Matt Chotin [mailto:[EMAIL PROTECTED]]
Sent: 26 March 2005 19:49
To: [email protected]
Subject: RE: [flexcoders] RowRenderer for Custom List

In init() you can do rowRenderer = com.mango.controls.ListMenuRow (no quotes).

 

rowRenderer takes either a String or a Class, so pass the class in init() and I think you’ll be fine.

 

Matt

 


From: Simon Fifield [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 26, 2005 3:06 AM
To: [EMAIL PROTECTED] Com
Subject: [flexcoders] RowRenderer for Custom List

 

Hi,

 

I'm trying to extend the List class and the default SelectableRow rowRenderer. I have successfully extended the List class but cannot get it to use my RowRenderer.

 

It works if I use the rowRenderer property in MXML (with the full class & path - com.mango.controls.ListMenuRow) but I want it to use my rowRenderer by default - therefore I need to get the extended List to instantiate my rowRenderer rather than the SelectableRow.

 

I've tried just overriding: 

__rowRenderer : String = "SelectableRow";

and changing it to:

__rowRenderer : String = "ListMenuRow";

and also:

__rowRenderer : String = "ListMenuRow";

Trying something else.....

I just tried copying the complete code for the ScrollSelectList into my extended List and changing the Class name etc, and set the __rowRenderer string to the class name of my new Rowrendere and that worked...so I can conclude that there is something wrong with my extension of the List.

 

Here's the code:

import mx.controls.List;

import com.mango.controls.ListMenuRow;
class com.mango.controls.ListMenu2 extends List {
 var __rowRenderer : String = "com.mango.controls.ListMenuRow";

 

 //Component Class

 static var symbolName : String = "ListMenu2";

 static var symbolOwner : Object = ListMenu2;

 var className : String = "ListMenu2";

 

 // Class Constructor

 function ListMenu() {

 }
 // MXML Component Constructor

 function constructObject2(o:Object) : Void

 {

  super.constructObject2(o);

 }
 // Component Initialiser

 function init() : Void

 {

  super.init();

 }
 function createChildren():Void {

  super.createChildren();

 }
 // all the below catch mouse events from the rows

 function onRowPress(rowIndex : Number) : Void

 {

  if ( rows[rowIndex].item.separator != "true" ) {

   super.onRowPress(rowIndex);

  }

 }

 function onRowRollOver(rowIndex : Number) : Void

 {

  if ( rows[rowIndex].item.separator != "true" ) {

   super.onRowRollOver(rowIndex);

  }

 }

 function onRowDragOver(rowIndex : Number) : Void

 {

  if ( rows[rowIndex].item.separator != "true" ) {

   super.onRowDragOver(rowIndex);

  }

 }

}

Can anyone see what is wrong with this....my eyes are getting blurry!

 

Kind Regards,

 

Simon Fifield

 

 

 




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to