[OpenAjaxIDE] Should macro substitution work on <require>JavaScript files?

Lori Hylan-Cho lorihc at adobe.com
Tue Aug 5 10:27:21 PDT 2008

That's my opinion, too. Localizable/substitutable properties can be
extracted into a single group of js variables and included as a
<javascript> block. (In fact, that would make things oh so much easier
for tools in general. :-P) 

> -----Original Message-----
> From: ide-bounces at openajax.org 
> [mailto:ide-bounces at openajax.org] On Behalf Of Jon Ferraiolo
> Sent: Tuesday, August 05, 2008 1:21 PM
> To: ide at openajax.org
> Subject: [OpenAjaxIDE] Should macro substitution work on 
> <require>JavaScript files?
> 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.
> --------------------

More information about the IDE mailing list