Archive

Author Archive

Configuring the IntelliJ IDEA JVM on OS X

June 16th, 2009 Tom Cornilliac 2 comments

Out of the box the JVM arguments for IntelliJ IDEA need a bit of tweaking if you plan on doing any serious development. Lately, in addition to Flex 4,  I’ve been cutting my teeth on Groovy and Grails and I’ve found IDEA’s 256mb default heap size to be barely adequate for the task. Bringing the heap maximum up to 512mb (-Xmx512m) makes a huge difference in how the IDE and framework perform.

When I went Googling for information on how to set the IDEA JVM on OS X I assumed I would find a wealth of information for said task. Turns out I was both right and wrong. There is a wealth of information but it’s all for Windows and since the IDEA config under Windows is different than OS X I was left wanting. In the end I was able to Google one lonely site with the correct information for OS X but the site was offline and I ended up having to use Google cache to get the information. Hopefully this post will help the next poor soul who goes looking for how to set the IDEA JVM heap maximum under OS X.

  1. Locate the App. If you have a standard installation it will be under /Applications
    Using Finder select the App file
    .
    .
  2. Open the App package
    idea_jvm_edit2
    .
    .

  3. Using your text editor of choice open the info.plist file under “contents”
    Idea_jvm_edit3
    .
    .

  4. Edit the “VMOptions” key. I have my heap maximum set at 512mb and my minimum at 64mb
    idea_jvm_edit4

That’s it. Restart IDEA if it’s running and you should see your heap changes in right corner of the application status bar.

By the way, if you’re doing any Groovy or Grails development, IntelliJ IDEA is a fantastic IDE with undoubtedly the best Grails support around.

Categories: IDE, Java, Tutorials Tags: , , ,

Using SwizConfig with Flex 4

June 15th, 2009 Tom Cornilliac No comments

I recently started my first Flex 4 project using the Swiz framework. After setting up my main application class to use SwizConfig and compiling I was greeted with this error.

“In initializer for ‘mxmlContentFactory’, type org.swizframework.SwizConfig is not assignable to target type Array or target element type mx.core.IVisualElement”

The solution: Flex 4 introduced a new method of grouping non-visual elements together <fx:Declarations>. In Flex 4 non-visual elements such as formatters, validators, effects etc. need to be grouped within a <fx:Declarations> section. So if you’re using Flex 4 (Gumbo) your SwizConfig would look something like this:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication
	xmlns:swiz="http://swiz.swizframework.org"
	xmlns:fx="http://ns.adobe.com/mxml/2009"
	xmlns:s="library://ns.adobe.com/flex/spark"
	xmlns:mx="library://ns.adobe.com/flex/halo">
 
	<fx:Declarations>
		<swiz:SwizConfig 
			viewPackages="com.myapp.views"
			eventPackages="com.myapp.events"
			strict="true"
			beanLoaders="{[Beans]}" />
	</fx:Declarations>
 
</s:WindowedApplication>
Categories: Flex Tags: , ,

Fix for Eclipse 3.3 Crashing under OS X Leopard

February 29th, 2008 Tom Cornilliac 1 comment

Earlier this week I discovered a keyboard shortcut that will crash Eclipse on Mac OS X Leopard. There’s a fix for the problem so I wanted to blog the solution for any and all that might stumble across this issue in the future.

To be clear, as far as I can tell the bug only affects Eclipse 3.3 running on Leopard, although you may want to test your Mac environment just to be sure.

The bug shows itself when you use the Open Resource shortcut (CMD+SHIFT+R) or the Open Class (CMD+SHIFT+T) shortcut, once you’ve selected your file or class Eclipse will crash. At first I thought that this was a Flex Builder bug, Adobe even has a bug filed for this exact problem but after more research it turns out that the bug is an SWT issue in Eclipse.

Thankfully Eclipse has already resolved this issue in the 3.3.2 stream build so if this is an issue for you then download the 3.3.2 stream build and update your existing Eclipse installation. I’ve tested Flex Builder 3.0 plugin final on 3.3.2 and it appears to run without issue. If you’re running Flex Builder 3.0 standalone then you’re out of luck, download the plugin.

Categories: Eclipse, Flex Builder Tags:

Adobe’s Flex 3.0 and AIR 1.0 released!

February 24th, 2008 Tom Cornilliac No comments

The title says it all. Here’s some links to the bits.

Flex Builder 3.0
http://www.adobe.com/products/flex/

Flex SDK 3.0
http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK
AIR 1.0
http://www.adobe.com/products/air/

Categories: AIR, Flex, Flex Builder Tags: , , , ,

The Flex Builder 3 Professional license should be cross-platform

February 8th, 2008 Tom Cornilliac 10 comments


Edit: In a comment below Ted Patrick confirmed that Adobe has indeed already changed the licensing to allow for a virtualized Win/Mac combination. Fantastic News! One more reason to develop on a Mac! (02/08/08 11:42 PST)

I develop Flex and AIR applications in Flex Builder on my Macbook Pro notebook and I keep a copy of VMWare Fusion and Window XP on standby for testing.

Last week while debugging an AIR application I came across a NativeMenu problem that required me to set breakpoints inside the Windows specific section of the NativeMenu code. No problem, I fired up VMWare Fusion, started Windows XP, installed Flex Builder 3 beta 3 and imported the project from my Mac partition. It all worked very slick and I was able to debug the problem and code a solution from within Windows, all without making a copy of the code base.

It all sounds so good and efficient right?

But later as I was basking in the glory of my victory, I got to thinking…this won’t be possible once Flex Builder 3 is released because I won’t have a Windows license key for Flex Builder 3. Will I need to spend hundreds of dollars for a Windows license key just so I can debug the occasional AIR application? What about when Linux support is a reality? Hundreds more?

The short answer may be “Yes”, pony up the cash and move on ya whiner!

But there’s a larger question at the root of this issue. Does Adobe as the provider of a freely available cross-platform runtime have an obligation to it’s developers to provide an equivalent platform for developing and debugging across all the supported platforms? In my opinion they do, it’s in Adobe’s best interest long term. Being able to debug AIR applications on Windows, Mac and (looking forward) Linux will only improve the quality of AIR applications and that in-turn should promote adoption of the platorm.

Let me be clear, I’m not suggesting that Adobe give away the IDE farm, I am suggesting that Adobe needs to consider the developer faced with challenges of cross-platform debugging in AIR. How does the developer who cannot afford a Windows, Mac & Linux IDE affect the platform as a whole? In my opinion the AIR applications we create (free or not) are public ambassadors for the platform, as such we need them to be stable and performant across every platform the AIR runtime supports. To accomplish this we need reasonable access to tools for each platorm.

So here’s my suggestion Adobe, it’s simple. Make the Flex Builder Professional license cross-platform. Let your developers make a choice for cross-platform debugging.

Artemis is dead, long live Merapi!

February 5th, 2008 Tom Cornilliac 1 comment

Merapi Logo

We knew it was coming but we didn’t know when or in what form. Adam Flater just posted that the Artemis project has officially been reborn as the Merapi project. The list of contributors looks impressive, including both developers and designers.

For those of you not familiar with Artemis Merapi, it’s a framework for connecting Adobe AIR applications to the desktop using Java technology. Merapi picks-up where the AIR 1.0 runtime drops off, in that while AIR can read and write from the native file system it cannot launch native applications or interact with the shell.

Merapi has huge potential and I’m looking forward discovering what’s possible when we can combine the power of Java with the richness and ubiquity of Adobe AIR. These are exciting times indeed!

By the way…looks like the namesake might be a mountain in Java Indonesia

Edit:
Andrew Powell has also posted a few words about Merapi and a few more about why they chose the name. (02/05/08 09:37am PST)

Categories: AIR, Frameworks, Java Tags: , , , ,

Flex on a mobile is closer than we thought!

January 30th, 2008 Tom Cornilliac 4 comments

skyfire logo

I was reviewing Engadget’s coverage of Demo 08 this morning and I nearly fell out of my seat when I saw skyfire. skyfire is a mobile browser that claims to bring a PC browsing experience to the mobile phone for the first time.

Read more…

Categories: Flex, Mobile Tags: , , ,

Handling deferred view component creation within the PureMVC framework

January 25th, 2008 Tom Cornilliac 12 comments

For my last AIR project and my current Flex project I’ve been using the PureMVC ActionScript framework. It’s a solid framework and on the whole I’m enjoying working with it. When using PureMVC for Flex and AIR development one of the questions I see consistently is how to create mediators for deferred components. In other words, if the view of your app uses a view stack how do you handle creating mediators on the children of the viewstack that are not created yet? Read more…