I've corrected the code according to your suggestion. Thanks!
Laurel
Justin Obara wrote:
Hi Laurel,
Interesting find.
From what you have written it looks like the outline view isn't
working because all of the code is inside of the $(doucment).ready
function.
As a slight modification to what you have shown, to keep from adding a
global function, is to keep the function tester() { test code } inside
of the closure but just out of the $(doucment).ready function.
- Justin
On 22-Jul-09, at 9:58 AM, Laurel A. Williams wrote:
Hi all,
Yesterday Justin un-officially handed over the bulk of the
customBuild code over to me for further work, while he continues with
other tasks. I was a little daunted but started by looking at the
unit tests, where there are some more tasks to accomplish. That was
when I discovered that the "outline view" in Aptana doesn't really
work for the js unit tests as they have been written in FLUID. I find
the "outline view" to be really helpful in getting oriented with code
that I am unfamiliar with and was really disappointed not having that
available to me.
I think I found a way around it which causes minimal disruption to
the tests but also allows you to use the "outline view" if you want.
Code originally looks like this -
(function ($) {
$(document).ready(function () {
test code here
});
}) (jQuery);
Modified code -
(function tester() {
test code here
}
(function ($) {
$(document).ready(function () {
tester();
});
})(jQuery);
The modified code is now viewable in Aptana's outline view.
I made this modification to the tests for the customBuild Javascript.
Let me know what you think.
https://source.fluidproject.org/svn/incubator/custom-build/trunk/tests/js/customBuild-tests.js
Laurel
--
Laurel A. Williams
Adaptive Technology Resource Centre
University of Toronto
_______________________________________________________
fluid-work mailing list - [email protected]
To unsubscribe, change settings or access archives,
see http://fluidproject.org/mailman/listinfo/fluid-work
--
Laurel A. Williams
Adaptive Technology Resource Centre
University of Toronto
_______________________________________________________
fluid-work mailing list - [email protected]
To unsubscribe, change settings or access archives,
see http://fluidproject.org/mailman/listinfo/fluid-work