Brevity Mac update

So, as mentioned, my poor Toshiba is in the hospital. So for the last 6 days, 22 hours and 47 minutes, I’ve been confined to my Mac Mini. It could be another week or more, so I’ve settled down and tried to make the most of it.

I had some initial Python problems but finally got a good 2.4 install going, and got wxPython in there just fine.

I removed the ActiveX stuff from the Brevity IDE and it fired right up on the Python. That in itself is pretty amazing: that you can make a full featured, native UI application on Windows and run the same code on a Mac and get a native UI Mac application.

Now, getting the IDE to coordinate the other parts of Brevity: the parser, the compiler, and the player, was another story.

I spent hours trying to get the IDE to call the parser as an external Python program. I made it executable and chmod’ed it and everything. No go. Finally got it down to, print “hello world” and it still wouldn’t run. Yet a brand new Python program with the same code worked. So I copied and pasted the parser code into a brand new file and it worked fine. Arrrrrggghhhhh…. Some stray Windows bit must have copied over and Mac was choking on it. No idea.

Happily, the compiler had no major problems. Just changed the path and got that working pretty quickly.

Then onto the player. On Windows you can basically say:

SAPlayer.exe myfile.swf

So of cource I tried the same thing on the Mac, but it kept telling me it couldn’t execute the binary file. Finally after some searching I found out you’re supposed to do something like:

open -a SAPlayer myfile.swf

So now I can write Brevity code, press a button and have it save, parse, compile and launch. Not bad for a weekend’s work. Other than the open thing, all the code should continue to work on the pc side too. I’ll probably do a platform check in the launch method just so I don’t have to deal with multiple code bases.

Still some things here and there to clean up, but it’s functional enough so that I can go back to developing the AS3 classes and test them on the Mac.

Anyone know a good Mac AS3 editor? 😉

Looking for a public release some time in mid June.

Oh, also, if anyone has experience with py2app, drop me a line.

This entry was posted in Brevity. Bookmark the permalink.

3 Responses to Brevity Mac update

  1. Steve says:

    I’m growing increasingly fond of TextMate as a general purpose editor for Macintosh:
    http://www.macromates.com/
    download a 30 day free trial but be sure to watch some of the screencasts because TextMate can do some stuff I’ve never know text editors to do. It is enormously extensible with snippits and tab triggers and a bundle editor that lets you script all sorts of things and assign key shortcuts. And it can let you open a whole project – all files in their nested hierarchy in its side panel.

    Doesn’t do code hinting for AS3 obviously and the syntax coloring is sort of odd for AS3 but – it’s a very good tool to know about if you are going to have to be enduring a Mac for a while.
    😉

  2. mel says:

    I second that. TextMate is a fantastic editor. It is one of the few third-party software purchases that I’ve made where I can say it has been well worth it. After using it for so long, I now wish there was a PC equivalent for when I’m coding at work. =]

    Cheers.

  3. Rob Lively says:

    You can use Xcode to do AS3 editing with code completion: http://www.joshbuhler.com/2006/05/09/flex-sdk-3-xcode/

    This outlines how to get the whole thing working. The code completion files for AS3 are at: http://opencode.forabettertoday.org/?cat=2


    Best regards,

    Rob

    P.S. I was reading an old post of yours regarding Macromedia Central. I’ve been trying to find an elegant way to use flash to create a desktop app but I am missing the ability to write out to files. I have looked at Zinc for OS X, SWF Kit and SWF Studio but I don’t really like the idea of having to 1) compile to a platform specific exe 2) Having to use a Windows environment to be able to create a Win compatible desktop app. Have you had any luck in this area?

Leave a Reply