Re: How can I get the value of url passed vars?

Dmitry Skavish <[email protected]> Fri, 06 Dec 2002 10:46:57 -0500
Newsgroups gmane.comp.java.jgenerator.devel
Message-ID <[email protected]>
> That's what I thought. Now how can I get params I do not know the name
> of.
>
> Is there a method or something I can call and get all in a enum or
> something?


There is no such method. Currently the only way without changing the code
is to use GeneratorServletContext, but before you need to enable it via
property com.iv.flash.servletContext in iv.properties file.
Using GeneratorServletContext you can obtain the original HttpServletRequest
and get all the parameters this swt was called with from there.

> And why I am asking do you know any good ways to dynamically determine
> the width of a TextField based on the amount of text?

If the font is available (getFont()) then you can retrieve this info from there.
But to calculate the width exactly you will need to go through all the characters
on each line and add up their advance values with pissible correction from kerning table
if it does exist.

-- 
Dmitry Skavish
-----------------------
Boston, MA, USA
tel. +1 781 370-6909
http://www.jzox.com
http://www.flashgap.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf