Servoy 6.0 alpha 3

We are pleased to announce the immediate availability of Servoy 6.0 a3

This version is available through the download option on the Servoy website and auto update.
Always make a backup of your current Servoy installation (directory and database) before installing/upgrading.
To update a previous Servoy 6.0 eclipse open “Check for updates” via help menu.

For all the highlights read the wiki

Changes:
[enh] Several javascript editor/DTLK improves
[enh] 355409 Call Global Method for Primary Key Auto-Enter in column lookup attribute
[enh] 355289 javascript libs are updated (jquery/yui)
[enh] 344935 Input Mask for numeric Fields
[enh] 355239 Expand databaseManager.getEditedRecords function to use foundset as parameter
[fix] 129561 javascript code folding expanding when writing the editor contents
[fix] 353211 developer: persist Profiler view column width settings done by user
[fix] 355341 onDragOver fired in SC for elements under the other layered elements
[fix] 355343 New enabled/visible properties are not available on groups
[fix] 356687 webclient selection is gone + image align is off in 6.0a2
[fix] 356735 make the iServoy (or equivalent) page optional when license present
[fix] 357031 Sample code missing for mimeType stuff in DND area

The update from 6.0a2 to 6.0a3 was quite slow. Actually, I was able to update on the second try - (on the first attempt the update process got “stuck” and even after waiting for over 20 minutest there was no progress). I am not sure if this is an isolated case or something more generic.

As a side note, the post for the “Servoy 6.0 alpha 3” release appears under the “Topics” section and not under “Announcements” (like 6.0 alpha 2, etc.) - shouldn’t it be moved up the list to appear in chronological order next to the 6.0a2 release announcement?

rossent:
As a side note, the post for the “Servoy 6.0 alpha 3” release appears under the “Topics” section and not under “Announcements” (like 6.0 alpha 2, etc.) - shouldn’t it be moved up the list to appear in chronological order next to the 6.0a2 release announcement?

Is announce type now

Can the Servoy 6.0 wiki page include a reference for all supported JSDoc tags and syntax along with sample usage for them? Trying to handle all the numerous warnings which show-up will be simplified if we get the correct JSDoc tags in place on the first pass.

We are working on extended release notes, which will include such info.

Paul

One case we I found that the new code inspection does not handle correctly is throw statements. For example:

/**
 * @return {String} some result info
 * @throws {String} some error info
 * @properties={typeid:24,uuid:"298cb5fb-e96b-49eb-acdd-92c63a14e7e3"}
 */
function someFunction()
{
   ...
   if(condition_1)
   {
      return result_1;
   }
   ...
   if(condition_2)
   {
      return result_2;
   }

   throw 'Some error message';
}

The function above will get a warning stating that: “Function X does not always return result”

Since the update from alpha 2 to alpha 3, I get warnings on:

 * @param	{Integer}	year

Is this because Integer is not a valid type and this is now being showed, or is this an issue?

Second, since the update from alpha 2 to alpha 3, I get the following warning:

Function myFunction declares JSField as type but returns JSField

/**
 * @properties={typeid:24,uuid:"c5617a2b-3497-4ce4-ad53-da4705cdedea"}
 * 
 * @name	myFunction
 * 
 * @description	This method will copy a JSField from a source into a destination
 * 
 * @param	{JSField}	_srcField	Sourcefield
 * @param	{JSField}	_destField	Destinationfield
 * 
 * @returns	{JSField}
 */

Doesn’t this message look strange?

In Servoy 6.0 alpha 3 the shortcut Ctrl+Shift+A does not open the form in the Form Design Editor

In Servoy 5.2.6 we could use form variables of type TEXT to assign values from Foundset columns of type UUID (TEXT columns with the UUID flag checked) using COMBOBOX or TYPE_AHEAD fields

In Servoy 6.0 alpha 3 this breaks - the value assigned to the form variable is not a valid UUID string but some garbage

Consider the scenario:

  • a form contains a variable of type TEXT
  • a COMBOBOX field, associated with the form variable is placed on the form
  • the COMBOBOX uses a valuelist where the key column is an UUID and the display column is TEXT
  • When the user selects an item in the COMBOBOX, a search operation is performed using the underlying UUID value

Debugging the code reveals that when the user selects an item in the COMBOBOX, the value assigned to the form variable is not a valid UUID value but some garbage and the following search operation fails with the error: “com.servoy.j2db.dataprocessing.DataException: Conversion failed when converting from a character string to uniqueidentifier”

The same code works fine in 5.2.6. This is a huge issue for us since our primary keys are UUIDs

martin:

your @param {Integer} should be @param {Number}

js doesn’t know Integer only numbers…

your second issue will be fixed in alpha 4

One more thing related to the JSDoc:

If we need to pass to a function an argument which represents one of the Servoy constants (for example: JSColumn.TEXT or JSColumn.DATE), the parameter type needs to be specified as {Number}, however function usages result in a warning that {Number} and {JSColumn.INTEGER} are not compatible:

/**
 * 
 * 
 * @param {Object} value  - the value to format
 * @param {Number} columnType - the type of the data column specified by one of the JSColumn constants (for example: JSColumn.DATE)
 * 
 * @return {String} the formatted value string
 * 
 * @properties={typeid:24,uuid:"DA318F5D-BC00-49DD-B9D3-441BF5F49879"}
 */
function formatValue(value, columnType)
{
   ...
}


function doSomething()
{
     //this gets a warning stating that Number and JSColumn.INTEGER are not compatible
     var _fomattedValue = fomatValue(foundset.some_column, JSColumn.DATE);
     ...
}

rossent:
In Servoy 6.0 alpha 3 the shortcut Ctrl+Shift+A does not open the form in the Form Design Editor

Rossen,

This is fixed in next build.

Thanks,

Rob

Rossen,

var _fomattedValue = fomatValue(foundset.some_column, JSColumn.DATE);

i didn’t get a warning anymore when i just tested it, but i also improved it a little bit more (constants like JSColumn.XXX where not typed correctly) for the next build

rossen,

about your UUID problem, i can’t reproduce this
first i tried this:

var x = "";

function doSomething()
{
	companyname = application.getUUID();
	x = companyname;
	
	application.output(companyname);
	application.output(x);
}

that updates a record and sets a uuid on a column, i also copied the column to a form variable and then output both (and they are all the same)

then i used that data to create a value list (that returns the uuid) and use a combo on that same field x that has that valuelist
after i select a value in the combo from that valuelist i also print x again
and x is still exactly that value above.

this is the output:

99529435-A5DB-459A-A342-B5DFA92FC4F5
99529435-A5DB-459A-A342-B5DFA92FC4F5
5735A05E-F68D-4017-966B-6C2D4A632999
5735A05E-F68D-4017-966B-6C2D4A632999
19D757C0-D793-4FEF-8768-C586A7301C67
19D757C0-D793-4FEF-8768-C586A7301C67
9AB380B7-B4BA-4BC7-BD10-D018CF2CDAD2
9AB380B7-B4BA-4BC7-BD10-D018CF2CDAD2

thats creating of 4 records

then i assign nr 2 to the x and print the x:

5735A05E-F68D-4017-966B-6C2D4A632999

can you create a case with an example?

One feature request for Servoy 6 - currently there is a rolloverCursor and rolloverImageMedia properties for buttons and labels. Can we have a rolloverStyleClass as well?

The feature set for servoy 6.0 is mainly frozen by now, please file a FR via http://servoy.com/s for a future version.

Rossen,

The function above will get a warning stating that: “Function X does not always return result”

this is fixed in the next version.

One minor issue which I believe applies not only to Servoy 6.0 alpha 3:
When using the wizard to create a form, if I choose to place fields as labels, the title label is associated with the data label through its “labelFor” property. However, if I try to set manually the same (trying to select for the labelFor property not a field but a label) the available labels on the form do not show up in the property drop-down list - I need to manually type in the name of the label.

Labels/buttons which have an assigned onAction event callback but have their property showClick set to “false” do not allow the user to invoke the action by using only the keyboard (for example, using the TAB key to focus the element and pressing the ENTER key - users are forced to use the mouse).

In addition, if the property showFocus is set to “true”, the focus rectangle is displayed only in the Smart Client but not in the Web Client (in both cases, regardless the display of the focus rectangle, the action cannot be invoked using the keyboard if the showClick property is set to “false”).

rossent:
Labels/buttons which have an assigned onAction event callback but have their property showClick set to “false” do not allow the user to invoke the action by using only the keyboard (for example, using the TAB key to focus the element and pressing the ENTER key - users are forced to use the mouse).

In addition, if the property showFocus is set to “true”, the focus rectangle is displayed only in the Smart Client but not in the Web Client (in both cases, regardless the display of the focus rectangle, the action cannot be invoked using the keyboard if the showClick property is set to “false”).

currently labels that do have an onaction attached but showclick is false are really just labels, they are not buttons on the os/swing level at all.
So they don’t get the default keyboard bindings and we currently only have an MouseListener attached to it, So please make a case that we also have a KeyListener and also call on action when pressing the enter key.