Account: (login)

More Channels


Are you the publisher? Claim this channel

Search in 126,168,389 RSS articles:

Channel Description:

Flex 4 examples and musings

Page 1 | 2 | newer | newest

Latest Articles in this Channel:

  • 10/14/09--09:47: Application global access (chan 2130442)
  • In flex 4, accessing your application globally has changed from Application.application in flex 3, to FlexGlobals.topLevelApplication. Flex 3: import mx.core.Application; var myApp:MyApp = Application.application as MyApp; Flex 4: import mx.core.FlexGlobals; var myApp:MyApp = FlexGlobals.topLevelApplication as MyApp;

    roustalskiroustalski

  • 11/05/09--05:31: Passing the rest parameter (chan 2130442)
  • As you probably know, you can create a function where the last parameter is a “…rest” variable. You probably also know that when inside the function, the comma delimited variables from the caller show up as an array. This is unfortunate when you want to pass the set of values through to another function. Enter [...]

    roustalskiroustalski

  • 01/04/10--09:45: assertEquals using != and the difference between != and !== (chan 2130442)
  • When using the assertEquals method in Flexunit 4, it is important to understand how the != operator works. I was under the assumption that != checked the values of the items on either side of the operand, while the !== checked the reference, but != checking values is only partially true. The full details can [...]

    roustalskiroustalski

  • 01/15/10--08:54: Unknown error generating output application.xml files (chan 2130442)
  • I’ve been implementing a new project using the TDD methodology using some of the new flash builder tools – specifically the “Execute FlexUnit Tests” method when you right click on a test case class. When the project matured enough to check into SVN, I noticed a weird error: Unknown error generating output application.xml files. The [...]

    roustalskiroustalski

  • 01/22/10--10:42: Data Binding Series (chan 2130442)
  • Ever {wonder} how data binding works? The magic of data binding is a combination of code generation by the flex pre-compiler and the Flex event model, which is an implementation of the observer pattern. Lets start with a short description and overview of the observer pattern and events: The observer pattern has two actors: the [...]

    roustalskiroustalski

  • 02/03/10--05:32: Conditional Compilation (chan 2130442)
  • There is a cool compiler flag that allows you to conditionally compile code into your binaries called -define. This really cool feature has an annoying side effect though: private function doSomething():void { if ( whatever == true ) { //Do something } KEY::debug { else { trace("Some debug information here"); } } } This throws [...]

    roustalskiroustalski

  • 02/09/10--06:46: Using Spark skins to style Halo components (chan 2130442)
  • Most of the halo components in the flex framework have a skin style. Sometimes it is labeled skin, others with border-skin, and if no general one skin style for the component exists, there are typically skin styles for individual pieces. Lets use the halo vertical scroll bar as an example (svn) (zip) (swf): 1. Create [...]

    roustalskiroustalski

    Creating a custom skin part using MXML auto complete.Creating a custom skin part using MXML auto complete.

    Creating a custom skin for part of the VScrollbar skinCreating a custom skin for part of the VScrollbar skin

    Overlapping trackOverlapping track

    The halo grid vertical scroll bar skinned.The halo grid vertical scroll bar skinned.

  • 03/07/10--18:25: Object/Dictionary Reference counting and Memory Management (chan 2130442)
  • Since it is such an important topic and such a problem for the community, I thought I would make another post pertaining to optimizing for the garbage collector. I was looking for information in the object/dictionary docs completely unrelated to memory management, but ran across this statement: As long as any reference to the object [...]

    roustalskiroustalski

  • 06/18/10--05:36: Flex 4 List remembering verticalScrollPosition (chan 2130442)
  • A simple requirement, but ~6 hours of frustration. All I wanted to do was to remember the scroll position that the user was at after an update of the dataprovider items on a list occurred. I had a solution in flex 3 for the (Advanced)DataGrid control that listened for a scroll event and remembered the [...]

    roustalskiroustalski

  • 07/01/10--19:23: Flash cookies (chan 2130442)
  • I wanted more than to just be able to delete their cookies, but to be able to view what information websites were storing about my surfing habits. I know where the cookies live, I know how to open them up, and I want to be able to view them all at once. If you don’t [...]

    roustalskiroustalski

  • 12/30/10--07:27: Making sure your air application exits (?:when using ApplicationUpdater(?:UI)?)? (chan 2130442)
  • One of our desktop applications had the requirement of providing an auto-update feature. We turned to the built in framework of ApplicationUpdaterUI to fill that requirement, but interestingly enough the form would sometimes not show at all after calling initialize and then our application wouldn’t actually exit when the main window was closed by the [...]

    roustalskiroustalski

  • 02/22/11--07:36: DropdownList labelDisplay tooltip (chan 2130442)
  • If you would like to have the DropdownList display a tooltip for the selected item on the labelDisplay component, you have to override the spark DropDownList and set the tooltip on the DropDownList itself rather than the label display.

    roustalskiroustalski

  • 05/05/11--12:25: SkinnableTextBase focusManager runtime error popup (chan 2130442)
  • When you show a popup in Flex in a mobile environment, defined as the style “interactionMode” being set to InteractionMode.TOUCH in this context, that is based on a component that does not implement the mx.managers.IFocusManagerContainer interface, you will receive a runtime error when the user taps the control that is to receive focus. Lets pretend [...]

    roustalskiroustalski

  • 05/18/11--11:40: Flex 4 Vertical Scroll Speed (chan 2130442)
  • By default, scrolling content when using the Scroller component occurs very slowly – Even down to 1px per event. Try running the following example: In order to bring scrollable content using a Scroller up to normal web standards (say 50px or 100px per event) with a setup like the above, you have to override the [...]

    roustalskiroustalski

  • 05/27/11--11:58: Simple TLF Text Editor (chan 2130442)
  • I found a great TLF editor that is simple and to the point, it is under the MIT license, and is of course open source. I don’t remember the combination of search terms to find it, but I’ve looked for something like this before and was unable to find it despite it being written in [...]

    roustalskiroustalski

  • 06/08/11--06:30: Flex 4 height limit of 10,000? (chan 2130442)
  • In my post about vertical scroll speed I show a code example of a scroller with several nested groups. A typical design of websites these days is to have a content area in the middle with an ever-expanding height and some sort of repeating background or colors on the sides – Just look at the [...]

    roustalskiroustalski

  • 06/14/11--05:39: mx Vertical Scroll Position (chan 2130442)
  • In regards to my post about maintaining vertical scroll position, James asked how the same would be done for mx based components. Here is an example using an mx:DataGrid. Here is an example of the problem: This is one way to solve the lost scroll position.

    roustalskiroustalski

  • 08/04/11--21:19: Active again (chan 2130442)
  • Update: I’m back to full time Flex / GWT / HTML5 & JS work. You can find GWT tutorials and examples at http://gwtpen.wordpress.com/

    roustalskiroustalski

  • 09/23/11--06:22: Workspace in use or Cannot be Created (chan 2130442)
  • If you close FlashBuilder and it doesn’t shut down correctly, sometimes a .lock file will be left in the .metadata directory of your workspace. If you try and restart FB with the .lock file present, you will get an error message about the workspace being in use. Either make sure the java program is killed [...]

    roustalskiroustalski

  • 09/30/11--13:04: ButtonBar radio logic hack (chan 2130442)
  • Update: Set the requireSelection property to true. When the button bar is used as a navigation tool for a set of tabs, it doesn’t make sense for the selected button to be unselected if the user clicks on it. It is also fairly typical for a result handler of the IndexChangeEvent.CHANGED to utilize the button [...]

    roustalskiroustalski

Page 1 | 2 | newer | newest