- Finished up the focusing / unfocusing of tooltips
- Combined the window dock and tooltipping so now docked windows will present a preview image in the tooltip much like Mac and Windows taskbars
- Need to work on remaking DynamicPanel for Flex 4
Category Archives: Mike
Mike 12.7.2010
- Created ‘Card’s which are a collection of Apps
- Worked on classes CardManager and Card and CardViewer
- CardManager handles the creation, deletion, and caching of cards
- CardViewer is a ViewStack that displays the cards
- Card handles displaying apps that are assigned to it
- All of these classes listen to a central DataModel that alert when any new display object is configured. For example, when a menu or something creates a new app it passes a configuration object to DataModel. CardManager picks up the event, creates the card, caches it and send a NEW_CARD event. CardViewer gets the NEW_CARD event and adds the card to the stack. A similar process happens for apps.
- Moved the fancy layout from yesterday in to Card and have apps displaying
Mike 12.6.2010
- Created a ResizableTitleWindow. A TitleWindow is Flex 4’s version of a panel. Not implementing the panel drag for the time being since i believe is should be implemented in the Layout.
- Created a FlowLayout for TitleWindow which allows for drag-and-drop repositioning and also has a maximize effect.
- Added animation effects to the FlowLayout for moving and resizing.
- The above was all done in a test application so I’m now moving that stuff from a standalone flex app in to the SWFManager app taking in to consideration saving / loading.
Mike 12.2.2010
- Started learning about creating custom preloaders using Flex Builder and Flash Professional
- Spoke with Brian about what the forecasting demo should look like
Mike 11.29.10
Time to start blogging again…
What I’ve done since being back:
- Moved most of my workspace from my old laptop to the shiny new one and finagled admin on it
- Spoke with Phil and Brian about the new project and broke it down in to several smaller but still huge pieces:
- Some kind of dynamic swf loader which will manage “apps” and communication between them
- A data manager responsible for handling all data requests and syncing data changes with the server
- An interface for writing and executing scripts on the server
- Worked on a prototype swf loader
- It’s currently capable of loading a swf which is not actually a stand-alone swf that is simply display in a container but treated more as a bundle of classes. Each class in the bundle is loaded in to memory and a new instance of whatever is needed can be spawned
- Classes are registered with a static ModuleManager and when events are thrown requesting a new app by name (full class-path name), a new instance is created and added to the main stage
- Created several samples “apps” which contains chart / text / datagrids and static data.
- Created a “Debug” app containing the logger datagrid but having some difficulty with it. It’s throwing weird errors complaining that the datagrid columns have zero width. Need to walk through the debugger more.
- Created a generic transition for switching between apps and added it to the swf loader
- Spent some time thinking about the data model and how it should work, have a few ideas about both the flex and java side for a very generic data model
Stuff on the immediate to do list:
- Get a configuration file read in by the SWF loader containg connection info and swf module URLs
- Get a data model started
- Try loading some data from XML files directly in to the flex data model (before trying to connect to a java server for data)
Mike 9.16.2010
- Added special cases to the python autocomplete so it includes the methods listed in the drop-down
- declaring any variable as “mySF = ScriptFascades()” will successfully bring up auto complete options for mySF later in the script
- same deal for “myTable = mySF.dbQuery(…”, myTable will be recognized as a dbTable object
- Left the dropDown in the GUI because there’s a few options I can’t reproduce like identifying an alertInfoObject and constructors
Mike 9.13.2010
- Combined all the flex classes which make up the scripting text area: PrettyPrintTextArea extends CodingTextArea extends AutoCompleteTextArea
- added a language selector to the scripting editor screen, currently only python with my test language turned off
- Worked through bugs and oddities which appeared from combining all the text functionality (example, the auto indent spaces were still appearing after an auto complete insert even though a newline wasn’t started)
- The autocomplete stuff is incorporated, checked in, and turned on, not the most robust but it does work for the basic cases and reports errors when it gets confused (as opposed to the crash and burn method)
Mike 9.1.2010
This blog is much more active than the old viz-n blog…
Moved on to new svn and got everything building.
Continuing work on the python introspection stuff. Making tangible progress now:
- Using the info script defined here: http://diveintopython.org/power_of_introspection/getattr.html to get introspection information for python objects and classes
- Parsing the result of a hard-coded example and displaying it in the AutoCompleteTextArea component.
- The hard-coded example is working very well and behaves a lot like the eclipse autocomplete save that it can only be initiated by pressing ctrl+space.
- It is also very fast however i am running everything locally so who knows how responsive a remote server will be.
- Now working on splicing the user script up to run info on dynamic parts of it…
Mike 8.19.2010
- Continuing to work on a python code completion engine. Phil helped me with some ideas and pointed out a few built in introspection methods in Python.
- Built something basically using the existing visibility script engine to run “info” on the variable in question and a problem arose:
- For example, say your cursor is at the end of this script:
- def solrXmlFromListList(doc, root, headers, table):
for row in table:
rowNode = doc.createElement(‘doc’)
root.appendChild(rowNode)
for i in xrange(len(headers)):
fieldNode = doc.createElement(‘field’)
fieldNode.setAttribute(‘name’, headers[i])
textNode = doc.createTextNode(str(row[i]))
fieldNode. - I can’t run info on ‘fieldNode’ without appending info(fieldNode) to the end of the script and executing the entire script which is obviously not an option
- So basically I need to find a way to run introspection on a script without running any of the script
Mike 8.13.2010
- Played around with PyDev for a very long time and I was right, there is a standard API in Eclipse for providing language support. Unfortunately, the PyDev plugin spreads it over 20 java projects. I’ve found methods for generating completion proposals for local variables, local functions, imported packages (through python introspection!) but not a one stop shop for everything. The environment variables also make it difficult to pull out snippets of code and run them. I haven’t given up yet though.
- I took a short break from reading through poorly commented code to connect the AutoCompleteTextArea to a back end java service that will call the appropriate language assistant. So far so good with a dummy language assistant that provides crayola colors.
Mike 8.5.10
- The AutoComplete TextArea is pretty much done. It could use a few small tweaks but those can wait.
- After a fruitless search of “python autocomplete library”, “python code completion library”, etc. I’ve decided to go straight to some source code so I’m currently digging in to the PyDev plug-in for eclipse to see how they do code completion. Perhaps each language implementation in eclipse uses a similar enough of an API that I can make some backend service for analyzing code and providing autocomplete suggestions. I’ll just have to add one language at a time.
Mike 8.3.2010
- Still working on the autocomplete text area with a number of headaches arising
- Created a function for grabbing the compare string out of the text which can then be passed to the filterFunction, unfortunately there is apparently a decent delay between when a user types in a character and when it is actually added to the textField so I was constantly one character behind for awhile until I learned about the “callLater(function)”. Ah event based programming…
- Keys a user would usually use for navigating the and selecting from the drop-down list also move the text cursor around and add carriage returns so I put in functions to undo the adverse effects after they’ve completed. Unfortunately I believe these will only work with word-wrap off which is fine for a code/script editor.
- After that was done everything seems to be working fine except for the positioning of the pop-up is still in the top right corner and not near the cursor
Mike 7.30.2010
- Still working on autocomplete text area
- Have a popup list with options popping up correctly when I press ctrl+space, may add smarter logic for this later but this seems fine for now
- Popup currently always appears in the top right corner of the text area. Finding the x-y position based on the caret index in the text field may prove complicated so I’m saving it for once the proof of concept is working
Mike 7.27.2010
Working on AutoComplete TextArea:
- There doesn’t appear to be any open source (or even publicly visible closed source) text areas with an auto complete popup
- There are at least 4 auto complete text input components that function a great deal like ComboBoxes
- The best of which seems to be: http://web.me.com/hillelcoren/Site/Demo.html
- I’ve started using this example to create a custom TextArea that will have similar behavior
- I estimate this component will be around 1500 lines and take at least a week (433 lines so far)
After that’s done there are 2 parts left I can think of:
- Figure out when to open the autocomplete popup (may depend on language). For example, the Flex one opens after a period, colon, typing “override public function”, hitting ctrl-space, and probably other special occasions.
- Figure out what to use as the dataprovider (auto complete insert options) which will definitely be language and possibly context specific
Mike 7.23.2010
- The VisibilityScripting project now has syntax coloring for most script and c-like languages
- Next is autocomplete

You must be logged in to post a comment.