Not sure who to address this to, but I have a few suggestions about how the MTASC compile works in the ActionScript bundle. The new MTASC addition is really great, way better than the one I built for myself, but I do have a few suggestions to make.
The mtasc.yaml support file should allow for a tad bit more flexibility:
- The option to not use XTrace, a lot of Mac Flash developers use Console and the debug Flash player for this. Right now it seems if no trace is defined it uses XTrace; so there is no way to fall back on the Flash default. Also removing the XTrace class paths if not using them.
- The option to easily add additional MTASC arguments in the yaml; for example '- strict'.
- The option to NOT include the 'std' and the 'std8' classes.
- '- keep' should not be called by default if a SWF is present. This could cause some classes to be present two times if also compiled with MTASC. I would suggest allowing the user to add this command in the additional MTASC arguments variable I mentioned above.
My apologizes if there is currently a way to do any of the above without editing the 'build_with_mtasc.rb'. I would be glad to make the changes myself...
Thanks for your time.
best, Aaron Clinger http://casaframework.org/
On 3/13/07, Aaron Clinger aaron@aaronclinger.com wrote:
Not sure who to address this to, but I have a few suggestions about how the MTASC compile works in the ActionScript bundle. The new MTASC addition is really great, way better than the one I built for myself, but I do have a few suggestions to make.
Hi there,
I'm the current maintainer of the ActionScript bundle. Suggestions are really welcome :)
- The option to not use XTrace, a lot of Mac Flash developers use
Console and the debug Flash player for this. Right now it seems if no trace is defined it uses XTrace; so there is no way to fall back on the Flash default. Also removing the XTrace class paths if not using them.
The current system for setting up tracers is quite crappy. Thus, it is being re-written from scratch. I plan on adding support for the most common tracers, and also make it easy to add your custom tracer.
In the meantime, you can use a (simple) custom tracer by editing the mtasc.yaml file and adding this line:
trace: com.namespace.for.your.trace.function
- The option to easily add additional MTASC arguments in the yaml; for
example '- strict'.
This is a common suggestion. I'll try to add it right now (as in "I have the script open in another TextMate window as I write this" timeframe :)
- The option to NOT include the 'std' and the 'std8' classes.
Could you please elaborate on this?
- '- keep' should not be called by default if a SWF is present. This
could cause some classes to be present two times if also compiled with MTASC. I would suggest allowing the user to add this command in the additional MTASC arguments variable I mentioned above.
I remember having problems with SWF files exported from the Adobe IDE if I didn't -keep them, that's why it's there. If your experience is different and you can shed some light on this, I'll remove it right away.
My apologizes if there is currently a way to do any of the above without editing the 'build_with_mtasc.rb'. I would be glad to make the changes myself...
The only way to add your changes is editing the 'build_with_mtasc.rb'
If you ever make a modification of it you want to share, I will happily apply the patch if you send it to me or to the list.
Thanks for your suggestions!
Thanks for the quick reply. I have made my comments below:
On 3/13/07, Ale Muñoz bomberstudios@gmail.com wrote:
On 3/13/07, Aaron Clinger aaron@aaronclinger.com wrote:
Not sure who to address this to, but I have a few suggestions about how the MTASC compile works in the ActionScript bundle. The new MTASC addition is really great, way better than the one I built for myself, but I do have a few suggestions to make.
Hi there,
I'm the current maintainer of the ActionScript bundle. Suggestions are really welcome :)
- The option to not use XTrace, a lot of Mac Flash developers use
Console and the debug Flash player for this. Right now it seems if no trace is defined it uses XTrace; so there is no way to fall back on the Flash default. Also removing the XTrace class paths if not using them.
The current system for setting up tracers is quite crappy. Thus, it is being re-written from scratch. I plan on adding support for the most common tracers, and also make it easy to add your custom tracer.
In the meantime, you can use a (simple) custom tracer by editing the mtasc.yaml file and adding this line:
trace: com.namespace.for.your.trace.function
The problem is currently there is no way to NOT use a custom trace function without editing the '.rb' file. It defaults to XTrace by default. A lot of Flash developers don't use a custom trace function at all and instead install the debug Flash player from Adobe. When the debug flash player is configured correctly it spits out all trace outputs to a text file on the users system. You can then use Console or 'tail' in Terminal to watch these messages in real time. This is a cross platform option that doesn't require and additional classes or tools and you can debug the same way off a server or locally. So it would be nice to have an option not to remap the trace functions.
Here is a link to the debug players: http://tinyurl.com/lzqp4 A link to an old article: http://tinyurl.com/2delt9 This will create a flashlog.txt at: /Users/YOUR_NAME/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
- The option to easily add additional MTASC arguments in the yaml; for
example '- strict'.
This is a common suggestion. I'll try to add it right now (as in "I have the script open in another TextMate window as I write this" timeframe :)
- The option to NOT include the 'std' and the 'std8' classes.
Could you please elaborate on this?
Sure. The 'std' and 'std8' are just intrinsic classes that MTASC uses for generating compile-time code errors. If you are publishing for Flash 7 you wouldn't want to use the 'std8' classes. That way MTASC would show a warning if you are trying to use Flash 8 features while publishing for 7. The other problem is if you are using a custom version of MTASC or a custom version of the intrinsic classes. Currently the '.rb' file is explicitly pointing to the 'std' and 'std8' folders in the TextMate app; this will create issues if you try to add a -cp to those folders elsewhere.
The simplest way to solve is is by not breaking the MTASC folder structure like it is currently. MTASC by default looks at the directory it lives in for the 'std' and 'std8' folders. So if you move them from the 'lib' directory to the 'bin' directory where MTASC is, the classes will be included as needed. If a user specifies a different location for MTASC it will look there for them there or a user can point MTASC to where they live without causing conflicts.
- '- keep' should not be called by default if a SWF is present. This
could cause some classes to be present two times if also compiled with MTASC. I would suggest allowing the user to add this command in the additional MTASC arguments variable I mentioned above.
I remember having problems with SWF files exported from the Adobe IDE if I didn't -keep them, that's why it's there. If your experience is different and you can shed some light on this, I'll remove it right away.
That could be the case sometimes, like when you are using components etc... Most of the time I only publish from the IDE when I create assets, but I am wanting MTASC to recompile ALL the code. Like stated before if classes are compiled in both MTASC and MMC you might have multiple occurrences of the same class and some of the MTASC error checking wont work etc...
There are cases where you might need to use it, and some where you wouldn't want to. I think it should just be made as an option.
My apologizes if there is currently a way to do any of the above without editing the 'build_with_mtasc.rb'. I would be glad to make the changes myself...
The only way to add your changes is editing the 'build_with_mtasc.rb'
If you ever make a modification of it you want to share, I will happily apply the patch if you send it to me or to the list.
I have made most of these changes already for myself. I would be glad to refine and send them to you if you would like...
Thanks for your suggestions!
Thank you for your response and maintaining the bundle.
best, Aaron Clinger
-- Ale Muñoz http://sofanaranja.com http://bomberstudios.com
On Mar 13, 2007, at 9:28 PM, Aaron Clinger wrote:
The problem is currently there is no way to NOT use a custom trace function without editing the '.rb' file. It defaults to XTrace by default. A lot of Flash developers don't use a custom trace function at all and instead install the debug Flash player from Adobe.
I concur. I have yet to get XTrace to work at all, whereas the debug Flash plugin (once setup properly, but that is another story) and Console worked first time.
This is a cross platform option that doesn't require and additional classes or tools and you can debug the same way off a server or locally. So it would be nice to have an option not to remap the trace functions.
Again, yes, please. Pretty please :)
Here is a link to the debug players: http://tinyurl.com/lzqp4 A link to an old article: http://tinyurl.com/2delt9 This will create a flashlog.txt at: /Users/YOUR_NAME/Library/Preferences/Macromedia/Flash Player/Logs/ flashlog.txt
I just went through the pain of figuring this out myself (talk about bad timing, reading this e-mail would have saved me an hour or so).
This is a common suggestion. I'll try to add it right now (as in "I have the script open in another TextMate window as I write this" timeframe :)
Hmmm. Any updates coming up? Where can we get them? :)
Sure. The 'std' and 'std8' are just intrinsic classes that MTASC uses for generating compile-time code errors. If you are publishing for Flash 7 you wouldn't want to use the 'std8' classes.
Which also happens to be my case at the moment. I'd love to see this, since I _don't_ want to unwittingly use 8 or 9 features in the stuff I'm doing.
Regards,
Rui Carmo http://the.taoofmac.com
On 3/14/07, Rui Carmo rui.carmo@gmail.com wrote:
This is a common suggestion. I'll try to add it right now (as in "I have the script open in another TextMate window as I write this" timeframe :)
Hmmm. Any updates coming up? Where can we get them? :)
The following changes have been made to revision 6798 of the repository:
* Now you can set extra MTASC parameters in mtasc.yaml
* Removed -keep option in MTASC command line (it can be added as an extra parameter)
* Made XTrace optional. To use it, set trace: xtrace
Please test and let me know how it goes.
Sure. The 'std' and 'std8' are just intrinsic classes that MTASC uses for generating compile-time code errors. If you are publishing for Flash 7 you wouldn't want to use the 'std8' classes.
Which also happens to be my case at the moment. I'd love to see this, since I _don't_ want to unwittingly use 8 or 9 features in the stuff I'm doing.
Cool... I'll play with it and hopefully get something working Really Soon Now™. My first tests do not work (mtasc complains about not being able to find the classes if you don't include them in the classpath... )
I'll let you know how it goes...
Again, thanks for the feedback and knowledge :)
Aaron, Rui,
I have added some information about debugging with Console.app and TextMate to my blog:
http://bomberstudios.com/2007/03/14/how-to-use-consoleapp-for-flash-debugging/
Also, a new 'trace: console' option has been added to mtasc.yaml.
Feel free to add your comments, and let me know if it works for you.
Again, thanks for your feedback and suggestions :)
Hi Ale,
thanks for working on this so fast :)
Do we even need to have "trace: console", since not specifying a trace property would have the same effect?
- juan
On Mar 14, 2007, at 12:52 AM, Ale Muñoz wrote:
Aaron, Rui,
I have added some information about debugging with Console.app and TextMate to my blog:
<http://bomberstudios.com/2007/03/14/how-to-use-consoleapp-for- flash-debugging/>
Also, a new 'trace: console' option has been added to mtasc.yaml.
Feel free to add your comments, and let me know if it works for you.
Again, thanks for your feedback and suggestions :)
-- Ale Muñoz http://sofanaranja.com http://bomberstudios.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 3/14/07, Juan Carlos Anorga juananorga@gmail.com wrote:
Hi Ale,
thanks for working on this so fast :)
Thanks to all of you for the ideas :)
Do we even need to have "trace: console", since not specifying a trace property would have the same effect?
If you specify trace: console, Console.app will open the log file when you test the movie.
This may not be what you want to do (i.e: you may like to use tail -f), thus the option of not specifying anything :)
BTW... I have just commited the change that Aaron asked for (moving the std and std8 libraries to Support/bin). Please let me know if it breaks anything...
And last (but not least)...
I'm in need of a test project for the ActionScript bundle. If anybody could contribute a *real* MTASC project, that would be just great. It will never ever touch the repository, if privacy is a concern.
I'll start working on the "workflow" for compiling full projects one of these days, and having a real project with real problems would really help me nail it. As you can see from this thread, the best results come when *real* users ask for *real* solutions.
Again, thanks to everybody for your suggestions :)
Great, that makes sense. Thanks for explaining.
One more thing. I think '-main' should be optional instead of the default or at least have an option to ommit '-main'. What do you think?
- juan
On 3/14/07, Ale Muñoz bomberstudios@gmail.com wrote:
If you specify trace: console, Console.app will open the log file when you test the movie.
This may not be what you want to do (i.e: you may like to use tail -f), thus the option of not specifying anything :)
Ale, just tested out the new bundle -- it seems great.
I think Juan has a good point about making '- main' optional.
I could provide MTASC projects if you would like, feel free to email me (off the list) about them.
Thanks for your work!
best, Aaron
On 3/14/07, Juan Anorga juananorga@gmail.com wrote:
Great, that makes sense. Thanks for explaining.
One more thing. I think '-main' should be optional instead of the default or at least have an option to ommit '-main'. What do you think?
- juan
On 3/14/07, Ale Muñoz bomberstudios@gmail.com wrote:
If you specify trace: console, Console.app will open the log file when you test the movie.
This may not be what you want to do (i.e: you may like to use tail -f), thus the option of not specifying anything :)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Mar 14, 2007, at 7:39 PM, Ale Muñoz wrote:
If you specify trace: console, Console.app will open the log file when you test the movie.
Brilliant. Just what the doctor ordered - although I like to do tail - f with a few greps, the console filter does mostly the same... real nice.
BTW... I have just commited the change that Aaron asked for (moving the std and std8 libraries to Support/bin). Please let me know if it breaks anything...
Not here, or at least not yet.
I'm in need of a test project for the ActionScript bundle. If anybody could contribute a *real* MTASC project, that would be just great. It will never ever touch the repository, if privacy is a concern.
I'm redoing the image slideshow atop my website (which I built in Flash MX ages ago) in "pure" AS/MTASC. If I get it working soon, I'll toss it over.
Anyway, preview options in a browser might be nice. I'll think about it for a while.
R.
On 3/13/07, Ale Muñoz bomberstudios@gmail.com wrote:
On 3/14/07, Rui Carmo rui.carmo@gmail.com wrote:
Sure. The 'std' and 'std8' are just intrinsic classes that MTASC uses for generating compile-time code errors. If you are publishing for Flash 7 you wouldn't want to use the 'std8' classes.
Which also happens to be my case at the moment. I'd love to see this, since I _don't_ want to unwittingly use 8 or 9 features in the stuff I'm doing.
Cool... I'll play with it and hopefully get something working Really Soon Now™. My first tests do not work (mtasc complains about not being able to find the classes if you don't include them in the classpath... )
I'll let you know how it goes...
It's works here for me:
1) Move the 'std' and 'std8' folders into the same folder as mtasc. So from 'lib' into 'bin'. 2) Update the 'build_with_mtasc.rb' to NOT look for those folders. So comment out/remove the lines like so: # Standard Adobe Classes # cmd += " -cp "#{ENV['TM_BUNDLE_SUPPORT']}/lib/std/" " # cmd += " -cp "#{ENV['TM_BUNDLE_SUPPORT']}/lib/std8/" "
That should be it, let me know. I am going to check out the new ActionScript bundle shortly and test it out. Can I update the ActionScript bundle as well? I would love to become a contributor, or should all changes go through you? Thanks.
-Aaron Clinger http://casaframework.org/
Again, thanks for the feedback and knowledge :)
-- Ale Muñoz http://sofanaranja.com http://bomberstudios.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate