Uncategorized

RTF output from Flex

I created a new project, http://code.google.com/p/rtflex/. I got the idea from AlivePDF. Basically it exports RTF binary to a file. Nice tool for saving documents that need to be opened by Word.

I hate my website

I hate my website. I've never been satisfied with it. I'm going to completely rewrite the whole thing. I might use Drupal. Blogger sucks.

Pagination with Flex 2 (tilelist example)

So I you want to paginate a tilelist? Piece of cake. The best way to accomplish this is with an ArrayCollection as a dataprovider. But we won't actually use it as a dataprovider, instead we'll use a dummy arrayCollection as the dataprovider which will only be populated with the current page.

Yahoo Flex Skin problems with DataGrid

I'm using the Yahoo! Flex skin on one of my projects and the datagrid column resizing is totally busted. It works once or twice and then breaks down. The cursor is not centered properly, and the column separator is displayed wrong by one pixel. The fix was simple enough, just comment out the headerSeperatorSkin and stretchCursor lines of the CSS file. Just thought you should know in case someone ever runs into this.

Flex 2 Object Translation problem

So perhaps someone can shed some light on this problem. I've got an XML file Test.xml
<test>
    <myString>72157600686915164</myString>
</test>
When I use an HTTPService call to grab that XML data, the object that result event returns has the value test.myString equal 72157600686915168 no matter what I do.

XMLListCollection, Descendants function is very important!

I've been struggling today with a minor issue of making all of the children in a complex XML structure go through a repeater. The first step is to create an XMLListCollection which can then be used as a dataprovider for a repeater object. But if you simple do this:
menuCollection:XMLListCollection = new XMLListCollection(menu.children());
You're only going to see the elements at the top of the list.

Data to Objects

Here's my presentation from last night: link removed because I lost this file in one of my many website iterations, sorry!. .

Presentation next week

Next Wednesday I'll be giving a presentation that covers
  • Installing Drupal
  • Configuring Drupal Services for AMFPHP
  • Configuring Flex for AMFPHP
  • Never having to code a backend ever again
  • Building a Flex app with a Drupal backend
All this in under an hour. It's that easy. See dc-flex.org for more info on the meeting. If no one else volunteers to speak we might make it into an all-night presentation where we build an entire web app.

Animation with MXML App

So I had a program where I needed to move an image around based on keyboard hits or button clicks. I figured "that'll be easy!", I'll just use the mousedown event and have it call a function that says targetObject.x-- to move it left. Unfortunatly, life is not so easy. It will only fire one event when the mouse goes down and another when it comes back up (Mouse.MOUSE_DOWN and Mouse.MOUSE_UP respectively).

The Same LabelFunction for DataGrid and ComboBox

In Flex, some label functions accept two arguments, i.e. item and column in a datagrid, and some accept one, i.e. item in a combobox. If you're not using the data from the column, which is typically just the dataField anyway, then you don't need two labelFunctions. The easiest way to fix the problem is by making the column field optional.

private function fullName(item:Object,dgc:DataGridColumn=null):String{
 return item.FIRST_NAME+" "+item.LAST_NAME;
}

Just add "=null" and you're done!

Syndicate content

Social


profile for Jonathan Rowny at Stack Overflow, Q&A for professional and enthusiast programmers