[mtasc] Single Main Entry Point
Alistair McLeod
amcleod at iterationtwo.com
Wed Jun 1 11:19:21 CEST 2005
Hi Scott,
The reason i'd want it this way as I see a time where I right click on a
test file in eclipse and "Run Test" in the same manner as we can with JUnit
tests. Without a main() in each file, this would not be possible.
Now that it been clarified to me what -main is doing, and I can see why the
error is being produced. So, the solution for me would be to allow multiple
main() functions and for -main to accept a parameter telling it which one to
run? What are the chances of that?
Cheers,
Alistair
--
Alistair McLeod
Development Director
iteration::two
<mailto:amcleod at iterationtwo.com> amcleod at iterationtwo.com
Office: +44 (0)131 338 6108
This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.
Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.
_____
From: mtasc-bounces at lists.motion-twin.com
[mailto:mtasc-bounces at lists.motion-twin.com] On Behalf Of Scott Hyndman
Sent: 31 May 2005 19:57
To: Dan Shryock; MotionTwin ActionScript2 Compiler List
Subject: RE: [mtasc] Single Main Entry Point
Why?
How does it make any difference? Have a single main class that reroutes to a
static run() function on another class.
In either case, you have to change the name of a class to run something
else.but in one it's inside an AS file, and in the other it's in a batch
file.
Personally, I'd RATHER deal with the AS file.
/Scott
_____
From: mtasc-bounces at lists.motion-twin.com
[mailto:mtasc-bounces at lists.motion-twin.com] On Behalf Of Dan Shryock
Sent: Tuesday, May 31, 2005 2:30 PM
To: MotionTwin ActionScript2 Compiler List
Subject: Re: [mtasc] Single Main Entry Point
Hi Ali,
Just a quick mention, the -main parameter doesn't actually take a value
after it, mtasc just assumes that you want to compile the .as file, not that
it is where it should look for it's main method. Now that this has been
straightened out, I have to say that I wholeheartedly agree with you. Many
projects would be much simpler to organize if there was an option to specify
the class to use for the main entry point.
Dan
On 5/31/05, Alistair McLeod <amcleod at iterationtwo.com> wrote:
Hi All,
I'm new to both MTASC and to this list today, so first thing, congrats and
thanks to the developers, it really is a wonderful tool.
Now, onto the question...
Is there a reason why the compiler allows only a single entry point within a
single compile unit?
I'm ensuring that the Flex Unit Testing Framework, FlexUnit, runs under
MTASC, in order to better the developer workflow (testing within Eclipse).
When an application gets larger, and is split into packages, we often find
its good to be able to let developers add entry point to each individual
test class, or to a package level test suites, and to run tests at that
level of granularity.
However, when i try to add the main() function to more than one class in my
compile unit, I get the "Duplicate main entry point" error. Because we tell
MTASC which main() should run, via the -main parameter, is that error really
needed? Alternatively, could it be reduced to a warning, or overriden by a,
eg, -allowMultipleMain parameters?
Your thoughts would be welcome.
Best regards,
Ali
--
Alistair McLeod
Development Director
iteration::two
amcleod at iterationtwo.com
Office: +44 (0)131 338 6108
This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.
Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.
--
MTASC : no more coffee break while compiling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/mtasc/attachments/20050601/a28ab44c/attachment-0006.htm
More information about the mtasc
mailing list