Tools plugin 1.7 (improved zip & unzip)

IT2BE:
wow, I thought I had developed a plugin but I was wrong all along… It is a bean :D

VEWY FUNNY

Ehm…yeah…well…what can i say…like I said before…I’m kinda new at beans :shock:

Excellent plugin by the way

When I attempt to use the numberFormat function on a number with a decimal, I get an error. For instance where ‘price’ = 1.1:

return plugins.it2be_tools.numberFormat(price.toString(), '0.00');

I get this error:

java.lang.NumberFormatException: For input string: “1.1”

If the number is a whole number, there is no error.

Any ideas?

Ah, now I see…

Why don’t you do this:```
return plugins.it2be_tools.numberFormat(price, ‘0.00’);

That’s close, but not quite 100%. What confused me was the usage example that reads:

plugins.it2be_tools.numberFormat(String number, String formatString)

Now, I no longer get an error, but when the number is less than 1, the result is not formatted. For example,```
plugins.it2be_tools.numberFormat(1.2, ‘0.00’);

returns $1.20 but ```
plugins.it2be_tools.numberFormat(.12, '0.00');
``` returns 0.12 (no currency symbol) and ```
plugins.it2be_tools.numberFormat(.0001, '0.####');
``` returns 1.0E-4. This is not a theoretical case. My application needs to return thousandths of a dollar.

Strange but you are right. I’ll have to dive into the code to see what I can find. Althought, it’s a straight Java implementation.

I’ll try to find some time in the next few days.

Hi Marcel
I’d love to try your plugin, but how/where can I download? Is this just the settings of my browser or is the link missing?
Thanks,
Reto

Hai SteveInLA,

It took a while before I was able to renew my efforts for the tools plugin but the issue is solved.

When you want I can release it over the weekend with 4 new added functions additionally:

getClientIP()
getClientHostName()
getServerIP()
getServerHostName()

Please let me know…

This sounds very good. Looking forward to it.