Extends field properties

Hello,
is there any possibility to extend filed properties with other personal?

Hi, I don’t know if your still looking for an answer but it took a while to decipher ‘filed properties’ (field properties) :D

To use custom properties for text fields:

  1. In the form designer select the field you want to extend
  2. In the property sheet look for the deisgnTimeProperties property
  3. Fill in the name of your custom property (ie personal) in the textbox and press the add button
  4. Give the new property a default value

At runtime you can get it’s value like this:

elements.myTextField.getDesignTimeProperty('personal');

In the same way you can use putDesignTimeProperty for setting values at runtime and removeDesignTimeProperty for removing them.

Hi! Thanks for your answer :)

i tried with Servoy 6.0.6 but i don’t find this properties…i need to download the 6.1?

Sorry, yes indeed. The final version will probably come out today or tomorrow.

Ok thanks a lot! =)

omar:
Sorry, yes indeed. The final version will probably come out today or tomorrow.

They tagged the 6.1.0 final yesterday (https://www.servoyforge.net/projects/se … sions/7257) in SVN so I think it will be released somewhere this week.
Probably friday or saterday.

thanks for your answer…i don’t understand how can i use this function…

if i want to create a new property called for example “test” and i want that this property contains a method can i do it?

No, that’s not the way to go. In a property you can store values or strings. If you want to add a method on the fly at runtime use the solutionMode like this:

var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var method = form.newMethod('function aMethod(event){application.output("Hello world!");}');
var button = myListViewForm.newButton('Show message!',50,50,100,30,method);
forms['newForm1'].controller.show();

It works! Thanks! :D