Tools plugin 1.5

The very first plugin for Servoy now reached it’s 5th revision. Slightly improved the examples and added encryption and decryption classes

Have fun with it

The tools plugin now holds the following FOURTEEN functions:

ENCRYPTION

  1. encrypt
    Java DES encrypt a string with an optional user key

  2. decrypt
    Decrypt a string previously encrypted with the above function

CALCULATION

  1. getMaxDay
    returns the last day of the given month.

  2. getIT2Be
    returns my name, email and GSM

(STRING) FORMATTING

  1. dateFormat
    very much like the Java dateFormat class to convert a date to a string and the other way around with (or without) a formatting string.

  2. numberFormat
    formats the (localized) number to the formatString.

  3. secondsFormat
    to make a number of seconds a string and the other way around. formatting like HH:mm:ss.

VALIDATION

  1. isEmail
    based on a method I posted earlier on this forum now available in this plugin. It takes a string with one or more email adresses and checks if the format is correct.

  2. isExpired
    takes a year, month and (optional) day and returns a boolean when expired. Can be used to check the expiration date of a credit card.

  3. isInteger
    returns a boolean value, checks a string.

  4. isInRange
    takes dates, numbers/integers and strings and returns true or false.

  • dates: dates need to be set with new Date() not a db timestamp
  • string: there is an option to be set to true if you want to ignore cases
  1. isModulus10
    takes a string, filters all numbers and tells you the result of a modulus10 check. Can be used to check a credit card number.

  2. isNumber
    returns a boolean value after checking a string.

  • localized but will return false when you input thousand seperators.
  1. isTextOnly
    takes a string and returns false if it finds numbers.

The result is attached. Just drop it in your plugins folder and restart Servoy.

REMARK: When you missed version 4 please read the remarks about the old version.

Feel free to use it and distribute it but give me credit for it.
The plugin is free, provided M-^Qas isM-^R and I can not take any responsibility for the way it behaves or works

Any suggestions? Please let me know!
Any bugs? Please tell me!
Any new features needed? Please ask me?
Any questions? I don’t know if we are allowed to use this forum for it but for now: Ask me!
Happpy? Don’t hesitate to share it with me…

Cheers

Hi Marcel,

Still cool stuff…

I was wondering what your experience has been, writing your own plugin? Much work, difficult etc?

Also, if you got any pointer as where to start if one wants to write their own plugin, I’d appreciate them. I’ve got some functions I use regularly Now they are in method, but to have them as plugins would be great.

Paul

Well, to start with, Java is something completely different than JavaScript.

What works in JavaScript won’t always work in Java and the other way round. This means I really stumble into new experiences all the time.

Difficult? Not really. Much work, Yes… It is more that I like to play and learn that I do this.

Johan is working on a manual for this and I think it is best to wait for it. It will get you going.

As for your function. If you are willing to share them I can also put them in my plugin. Just mail it to me…

BTW I am working now on a splash window, and zip/unzip…

Tnx for the info.. Think I’ll wait for the manual then :-)

As for the function: As soon as it’s 100% finished, I’ll email it.

Paul

Any suggestions for improvement or more functions?

I cannot seem to locate this plugin on the servoy site. Can someone please post a link to the plugin download?

v1.5 has gone. v1.7 has come:

http://forum.servoy.com/viewtopic.php?t=1674