Flex Chronicles 4: createClassObject, Floaters, & Caching

As I remove the arrows from my back and lay back in a bed of salt, I continue to record my trials for your benefit. Cool program, but she still has her learning curve which hurts all the more if you just skim the docs (which they got right with this product) and dive right in like me.

createClassObject

I swear, createClassObject is more trouble than it’s worth in Flex components. Your better off just doing all the GUI + configuring the controls in Flex, and then just listen for events in code. I’m converting a plethora of Flash controls, and all the resizing within containers, etc. is all jacked… until I just lay everything out by hand, and pretty much remove my createChildren function. It’s cool, it’s just an extra step I wasn’t planning on doing, but at least I’m not reinventing the wheel, and the benefit is I get to delete my size functions since Flex handles that beautifully.

*** Update: Ok, don’t use Window with PopUpManager. Instead, just define your classes as TitleWindow’s, and then load your class in PopUpManager. I can’t find a “contentPath” property equivalent in TitleWindow, but I’m tired, so fuggit.

Dreamweaver Floaters

Trying to create a Floater in Dreamweaver/FlexBuilder. Basically, Flash MX/MX 2004 has this SWF in the WindowsSWF folder you get when you install the Flashcom components. It is called the Communication App Inspector, and it allows you to load app instances, and reload them, and see statistics + trace information from your server side scripts for Flashcom.

Dreamweaver/FlexBuilder don’t have a WindowSWF folder, and if you wrap the SWF in HTML and drop in a Commands folder, it becomes modal… not a nice panel. SO, I ended up copying the floater code from the sames in creating Dreamweaver extensions, and with some tweaking of the menus.xml file, I can now access the panel and dock it in FlexBuilder. It’s only enabled, though, on as/asc files… when I select an MXML file, regardless of mode (Code/Splite/Design/Run/Debug), it’s disabled. I followed the docs and set enabled to true in the menus.xml file, and put the isAvailable or whatever function to return true, but no dice. It’s all good; sometimes it screws up, and remains enabled so I can still debug my Flashcom apps. So far, so good.

Caching

BTW, if you get bit by the caching bug where you edit code but nothing changes, check this location at the LiveDocs.

2 Replies to “Flex Chronicles 4: createClassObject, Floaters, & Caching”

  1. Cool, I am glad you have got your license and are starting to play with Flex.
    As yet I am unconvinced with Flex and kinda see it as a ‘coders’ equivalent to Flash.
    I look forward to seeing some cool stuff!

Comments are closed.