QuicksearchArchives |
Thursday, February 21. 2008Thursday, February 14. 2008Friday, February 8. 2008AIR Prerelease Tour I attended a presentation on Flex and AIR yesterday. Mike Potter was unable to come and was replaced by LordAlex Leon. The presentation began with a long description of Adobe applications and their integration, but an hour later finally reached AIR. The part about AIR was quite short and did not teach me anything new.For those of you who don't know, AIR is coming out soon. It stands for Adobe Integrated Runtime (or RIA backwards). It allows you to run Flash/Flex apps on the desktop, read and write local files, query SQLite databases... all this cross-platform. I did learn something interesting from one of the slides though. BlazeDS has just been released under an LGPL licence. This technology allows real-time data pushing. For me, it means developing multiplayer games! Thursday, February 7. 2008Sending headers
There are many reasons to send headers in the middle of you PHP script. Sometimes you want to redirect the user based on some computed information or display different content types (mime-type). Have you ever had a problem with PHP complaining about "output already sent"?
To solve this problem, there is a workaround with ob_start/ob_flush. As pointed out in a past comment, you can put ob_start in the beginning of the script and ob_flush at the end, thus preventing any output before the script finishes executing. A more neat solution (in my opinion) is to review your output approach. You should not send any output before you are absolutely sure about it (why would you sent kilobytes of HTML if you're going to redirect anyway?). My approach is to store output in a variable or a class and then send it when ready. I also try to limit html generation until after I processed my GET/POST requests. Tuesday, February 5. 2008FlexNativeMenu Tutorial & Issues
So you want to have cool menus when you right-click an object in your flex app.
First, create the FlexNativeMenu: The popupMenuDataProvider refers to an Arraycollection: [Bindable] private var popupMenuDataProvider:ArrayCollection = The menu will be displayed within a listener such as rightClick on a component of your choice: private function onRightClick(e:MouseEvent) {Now we need to handle the click in the menu: private function popupMenuClick(e:FlexNativeMenuEvent):void {I ran into a bit of trouble when I tried to modify the dataProvider for the FlexNativeMenu component. It seems that the NativeMenu that it wraps does not receive the dataProvider updates. A solution was to reassign the dataProvider after a change: popupMenuDataProvider.addItem({text:"Edit something", action: "edit"});
|
CategoriesSyndicate This BlogBlog Administration |
Powered by s9y - Design by Anna Filina