[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-09 Thread Danko Kozar
Jason, this was an eye-opener! Till now I didn't realize that an event listener can cancel another listeners. But the preventDefault() method of the Event class does exactly that. This is the way I should go with a PagableGrid. Thanks! --- In flexcoders@yahoogroups.com, Jason Hawryluk

RE: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-09 Thread Gordon Smith
Actually, preventDefault() does NOT prevent other listeners from executing; this is what stopPropagation() and stopImmediatePropagation() do. preventDefault() simply sets the flag returned by isDefaultPrevented() to be true. However, some event-dispatching code in the Player or the framework

[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-08 Thread Danko Kozar
Private methods and variables drive me nuts.. For example, I'd like to make a simple DataGrid change: make headers clickable without refreshing the grid (just toggle a sort icon). (I need this behaviour because I'd like to have a paging DataGrid which only propagates the sort column/direction

Re: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-08 Thread Tom Chiverton
On Thursday 08 Mar 2007, Danko Kozar wrote: Private methods and variables drive me nuts.. When I did Java, I always made my private variables 'protected', but the real Java guys tole me that was a bad idea for some reason. -- Tom Chiverton Helping to economically enhance user-centric

[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-08 Thread Danko Kozar
Perhaps in some cases are, but in the example above - there's no need for it. As you have seen, I'm trying to override an user gesture (header click) and I can't neutralize the default behaviour, which is a grid refresh. Flex 2.0.1 is so carved in stone.. I'm waiting to see the next version..

RE: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-08 Thread Jason Hawryluk
Danko, See below extended datagrid and sample application to do what you want. I realize it’s frustrating when you need to do things only to find yourself blocked in the obvious way; but there is definitely more then one way to skin a cat (so to speak). I’m sure future versions of the flex

RE: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-08 Thread Jason Hawryluk
As a follow up to the last response, take note of the event.preventDefault(); in the handler for HEADER_RELEASE, and the fact that I don't do a refresh on the ListCollectionView after adding the sort to it. jason -Message d'origine- De : flexcoders@yahoogroups.com [mailto:[EMAIL

[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-03-08 Thread Danko Kozar
Great!! It works... I noticed a slight delay when loading a real data into the grid (6 cols x 20 rows). Does grid do some processesing? Or this method stops all other method execution? Now, if the similar solution for manipulating the scroller is available.. it would be great. :-) Anyway,

Re: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread Tom Chiverton
On Thursday 22 Feb 2007, Paul DeCoursey wrote: support our REST based Web Services. But also URLRequest is a final class and cannot be extended. So you extend the parent, and cut and paste most of the code. Final isn't the end of the world :-) -- Tom Chiverton Helping to continuously drive

Re: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread Paul J DeCoursey
Tom Chiverton wrote: On Thursday 22 Feb 2007, Paul DeCoursey wrote: support our REST based Web Services. But also URLRequest is a final class and cannot be extended. So you extend the parent, and cut and paste most of the code. Final isn't the end of the world :-) In this

[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread Derrick Grigg
I am currently working on a project where we have had to extend many of the framework controls and containers to add extra functionality or fix little things that were bothersome. While it has been an very difficult task in places is has not been impossible. I certainly would not advocate the 'cut

Re: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread EECOLOR
you need access to a handful of private variables and functions in the parent class I have extended quite some components aswell. What i found out however, was that in the en i most of the time did not need those private variables and methods. At the end of a day full of fiddling i found a

Re: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread Tom Chiverton
On Thursday 22 Feb 2007, Paul J DeCoursey wrote: In this case it is since the source for URLRequest is not available, URLRequest is a flash class not a mx class. To make it work we would need to implement the entire HTTP client stack using sockets. Not a small undertaking. *ahh* :-) --

Re: [flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread Doug McCune
If you want to say that we shouldn't rely on needing access to any private variables, it's only a small difference to say it's OK to rely on mx_internal variables. The internal vars are marked as such because they might change in future releases. So if the objection is that your code might break

[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-21 Thread rd_grimes
Maybe because there seems to be more of a drift toward composition instead of inheritance? R. Grimes

[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-21 Thread Paul DeCoursey
I agree that it can be difficult to modify functionality in the framework classes. I think that much can be done to enhance this process, and perhaps we can help Adobe out with ideas. I have found that many things can be modified by thinking differently. Some of the design patterns that the Flex