[OpenAjaxIDE] Should macro substitution work on <require> JavaScript files?
Jon Ferraiolo
jferrai at us.ibm.com
Tue Aug 5 10:20:38 PDT 2008
Right now, we have decided that macro substitution:
* property substitution such as @@foo@@
* localization substitution such as %%bar%%
* Gadget-related substitution such as __GID__
applies to the following elements: <content>, <javascript>, <description>,
<title>, <remarks>, <example>, <license>, <author>, <aboutMe> and <quote>
The question for today is question macro substitution should also occur on
<require> content. One significant use case is <require type="javascript">,
where the JavaScript might contain __GID__ strings.
My guess is that we should *NOT* do macro substitution on <require> and
tell developers that if they need to have JavaScript that uses __GID__ or
localized content or whatever, they should use the <javascript> element
instead of the <require> element.
Jon
============ EARLIER EMAIL ================
Javier responds to Jon:
--------------------
I had always assumed that the variable substitution only worked on the
content inside the spec XML file itself. From what I can tell, this is how
Google Gadgets work.
However, I can see how this would be a valuable feature, especially for
localization bundles. Bring this up in the meeting today, and see what
everyone agrees on. Either way, whatever the spec says we'll implement...
--------------------
Jon asks:
--------------------
I noticed that if I use __GID__ within some JavaScript inside of a
<content> element, macro substitution works, but if I take the same
JavaScript and put it into a separate JS file that is loaded via <require
type="javascript" src="..."/>, the macro substitution does not seem to
occur. Does this sound right? I just wanted to see what you thought. There
is always the <javascript src="..."/> option, which (I assume) would
trigger macro substitution. (<javascript src=> is not yet implemented in
the refimpl)
Whatever, the spec needs to be clear on all of this.
--------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20080805/5be9949a/attachment-0001.html
More information about the IDE
mailing list