Showing posts with label dataFunction. Show all posts
Showing posts with label dataFunction. Show all posts

Wednesday, April 13, 2011

Use QuickAssist in FlashBuilder 4.5 to create labelFunction,iconFunction,dataFunction etc..

One of the cool features of FlashBuilder 4.5 is support for creating labelFunction, sortFunction, dataFunction, iconFunction (basically any Function property of Flex SDK MXML components) using Quick Assist.

Steps :

1. Go to the component tag and use content assist to enter the *Function attribute.

Ex: <s:List labelFunction=""

2. Type the function name.

Ex: <s:List labelFunction="myLabelFunc"

3. With the cursor still between the quotes hit Ctrl+1 (or Cmd+1 on Mac).

4. You should something similar to the following

5. Select it and hit enter. FB should create the function with proper signature and go into linked mode.

For adventurous developers:

If you find the "Create function ..." option missing any particular Function property for any component you can edit the componentDescriptor.xml file (which can be found under the Adobe Flash Builder 4.5\eclipse\plugins\com.adobe.flexbuilder.mxml.editor_4.5.0.xxxxx directory) and add the entry yourself and fix it !

Caution : Save the original xml file in case you end up spoiling it.