Hey Luke,
Thanks for the info. I'll give it a go when I get 5 min's.
It would be great if a future build could support registering a custom
template without modifying the source. Perhaps an xml config file???
Cheers
Matt
On 11/18/05, Luke Bayes <lb...@gm...> wrote:
> That's a great question Matt.
>
> I was wondering how long it would take for someone to catch that!
>
> Unfortunately, we had to make some tradeoffs in the XUL UI in terms of
> simplicity vs. features. As a result, the templates in the XUL UI are
> definitely *not* as simple as they were in the Flash mxp.
>
> If you're really itching to get in there, you'll have to know quite a bi=
t
> about XUL and certainly JavaScript.
>
> The entities that you'll be touching are as follows:
> build.sh
> AsUnit.xul
> script/CreateClass.js
> script/tokens/TokenFactory.js
> script/tokens/*
>
> Essentially, we have broken up a class definition into it's constituent
> peices and created a JavaScript class to represent each of them. The
> TokenFactory should help make this somewhat more clear.
>
> As far as naming conventions go, we have no prefix for AS2 entities, and
> AS3 prefix any AS3 entities. If you're adding another template, it would
> probably be wise to prefix your new classes with an appropriate name. Che=
ck
> out the AS3 implementations as your custom classes can simply "extend" th=
e
> original AS2 classes.
>
> Once your template files have been created and the TokenFactory has been
> updated, you'll need to:
> 1) Update the AsUnit.xul file (about line 96) to add your new template t=
o
> the Template Combo Box
> 2) Update the CreateClass.js onTemplateChanged method (about line 194) i=
f
> you want certain interface elements to enable/disable based on your
> implementation. You can usually just add the "value" parameter from the
> AsUnit combo box for whichever language you're writing the template for.
> 3) Check the top of the build.sh script for targets that only exist on m=
y
> machine, update them and run it using a bash shell (like cygwin if you're=
on
> windows)
>
> Sorry for how much of a pain this is, but this was a major tradeoff in
> response to more robust choices and features...
>
> I'm sure there is a way to make this more flexible, we just haven't
> invested the time yet. If others feel that a more flexible template syste=
m
> would be a high priority please let us know...
>
>
> Thanks,
>
> Luke Bayes
> www.asunit.org
>
>
|