Re: Any plans for a 100% wm syntax compatibility?

Tim Diggins <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
On 3 Apr 2008, at 20:23, Jonathan Revusky wrote:
> I patched it to translate VTL->FTL and it works. The problem now is
> that it only works in an appletviewer locally. If I try to load it in
> a browser (safari) it has all the security exception things because
> the Velocity runtime is trying to read properties files and so on. I
> have to figure out how to get around that and it would work.
>

Don't think I can help much there. An alternative is to have a signed  
applet, but that's a hassle for you & for users.

One small change I'd recommend to your patch:

if you want to see the stack trace rather than the Exception message  
in the text box, then just allow the Exception to be thrown from the  
translate method  and change the exception handling in the Action to:

				} catch (Throwable ex) {
					StringWriter sw = new StringWriter();
					ex.printStackTrace(new PrintWriter(sw));
					translatedTextArea.setText(sw.toString());
					translatedTextArea.setForeground(Color.RED);
				}

cause that way it prints the stack trace in red.


Another thought - you could include a link near the applet to the  
source of the translation code - people may want to run the code  
locally.
>
> Also, this has me thinking that we could have a similar applet to
> convert from older FTL syntax to the newer 2.4. And I can put up one
> pretty much immediately that changes angle bracket syntax to square
> brackets, for example.
>

I'd welcome this (still on old syntax myself)
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.