After unsuccessfully trying to use the Spark List component in combination with a TileLayout I decided to try it in combination with the DataGroup component. This worked fine apart from the fact that the DataGroup didn't auto-size correctly.
The following trick solved the problem:
<s:DataGroup
id="lst"
width="{lst.contentWidth}"
height="{lst.contentHeight}">
Tuesday, March 29, 2011
Wednesday, April 21, 2010
Prevent changing the cursur position in TextInput fields
Ever tried to prevent the user from changing the cursor position using the arrow keys (or other keys that normally change the cursor position)? In that case you probably already know that event.preventDefault() and event.stopImmediatePropagation() won't help you out. The code below seems to solve the problem:
private function keyDownHandler(event: KeyboardEvent): void
{
switch (event.keyCode)
{
case Keyboard.LEFT:
case Keyboard.RIGHT:
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
case Keyboard.HOME:
case Keyboard.END:
if (_orgSelectionBegin==-1) _orgSelectionBegin = selectionBeginIndex;
if (_orgSelectionEnd==-1) _orgSelectionEnd = selectionEndIndex;
setSelection(_orgSelectionBegin, _orgSelectionEnd);
break;
}
}
private function keyUpHandler(event: KeyboardEvent): void
{
_orgSelectionBegin = -1;
_orgSelectionEnd = -1;
}
private var _orgSelectionBegin: int = -1;
private var _orgSelectionEnd: int = -1;
Do you also think this is way too much code for doing something simple?
In that case vote for https://bugs.adobe.com/jira/browse/SDK-26279
private function keyDownHandler(event: KeyboardEvent): void
{
switch (event.keyCode)
{
case Keyboard.LEFT:
case Keyboard.RIGHT:
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
case Keyboard.HOME:
case Keyboard.END:
if (_orgSelectionBegin==-1) _orgSelectionBegin = selectionBeginIndex;
if (_orgSelectionEnd==-1) _orgSelectionEnd = selectionEndIndex;
setSelection(_orgSelectionBegin, _orgSelectionEnd);
break;
}
}
private function keyUpHandler(event: KeyboardEvent): void
{
_orgSelectionBegin = -1;
_orgSelectionEnd = -1;
}
private var _orgSelectionBegin: int = -1;
private var _orgSelectionEnd: int = -1;
Do you also think this is way too much code for doing something simple?
In that case vote for https://bugs.adobe.com/jira/browse/SDK-26279
Friday, February 26, 2010
Trouble accessing data from another server?
Of course you know about crossdomain.xml and you made sure that it's accessible. But you still get an error when you try to access data when doing an http request? If you're setting http headers through your Actionscript code then that is most probably the reason. Try specifying the "allow-http-request-from" attribute in your crossdomain.xml file.
Monday, October 26, 2009
Adobe Flex and commercial component libraries
Do you also think that Adobe Flex lacks a component library update? Yes, I know Spark is around the corner but after more than 2 years I'm not looking for less, I really need more. New components, new functionality within the existing components.
As far as I'm concerned Adobe doesn't have to come up with these components itself. Third party components with a decent licensing scheme (comparable to the 3rd party components available for Silverlight) would be perfect. Apart from ILOG Elixir (that comes with problematic licensing options) there's hardly anything out there. Even Dough Mcune with his fantastic Flexlib library seems to have given up.
But @ Adobe nobody seems to care, at least not in a positive way. Otherwise they wouldn't attack Flashden, probably the biggest Flash marketplace out there.
So Adobians, please tell me today instead of tomorrow if you're not serious about your own development products anymore! I start wondering whether you are being paid by Microsoft to let Flex die silently...
As far as I'm concerned Adobe doesn't have to come up with these components itself. Third party components with a decent licensing scheme (comparable to the 3rd party components available for Silverlight) would be perfect. Apart from ILOG Elixir (that comes with problematic licensing options) there's hardly anything out there. Even Dough Mcune with his fantastic Flexlib library seems to have given up.
But @ Adobe nobody seems to care, at least not in a positive way. Otherwise they wouldn't attack Flashden, probably the biggest Flash marketplace out there.
So Adobians, please tell me today instead of tomorrow if you're not serious about your own development products anymore! I start wondering whether you are being paid by Microsoft to let Flex die silently...
Wednesday, August 26, 2009
FP-444 and other neglected Adobe Flex jira bug/feature posts
Did you also read the recent blog post by Ted Patrick that resulted in lots of comments on the fact that nothing seems to happen with most of the Adobe Flex related bug/feature posts? The most notable throughout all the comments was FP-444 (possibility to catch global exceptions - let alone that the Flash Player starts ignoring events after such an exception...). It's open for years and a lot of Adobe Flexers really want this functionality. Do you think in the mean time someone at Adobe took 10 minutes to add a comment to this bug to explain the status of it? No. Does this leave a good impression with prospects? No. Do you think big customers trust such a supplier? No. Will Adobe eventually do something about the near stand still of these bug postings? I hope an Adobian finds 10 minutes to write a positive comment on this blog post in order to give confidence to the community that they choose the right RIA platform...
Monday, June 8, 2009
Launch of Geniográfico.com
I've been pretty busy lately. Last weekend we released the result of all this hard work: www.geniografico.com. I'd love to get your feedback and I hope you want to help me spread the news!
Monday, February 23, 2009
Auto-sizing the height of a TileList
Would you like the TileList component to auto-size to its content? If you have a fixed width OR height you could use the following hack (the example is based on a fixed width of 4 columns):
<mx:TileList
id="tl"
columnWidth="160"
rowHeight="160"
columnCount="4"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
updateComplete="upd()"
dataProvider="{xx}">
private function upd(): void
{
var rc: int = Math.ceil(xx.length / tl.columnCount);
if (tl.rowCount!=rc) tl.rowCount = rc;
}
It's important to turn of the scroll policy to prevent the vertical scrollbar from appearing and disappearing.
<mx:TileList
id="tl"
columnWidth="160"
rowHeight="160"
columnCount="4"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
updateComplete="upd()"
dataProvider="{xx}">
private function upd(): void
{
var rc: int = Math.ceil(xx.length / tl.columnCount);
if (tl.rowCount!=rc) tl.rowCount = rc;
}
It's important to turn of the scroll policy to prevent the vertical scrollbar from appearing and disappearing.
Subscribe to:
Posts (Atom)