Servoy 6.0 alpha 5

Release notes for Servoy betas

Servoy 6.0 alpha 5

Postby Jan Blok » Thu Mar 10, 2011 1:05 pm

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

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 Servoy 6.x eclipse open "Check for updates" via help menu.

For all the highlights read the wiki

Changes
[fix] 356267 application.getActiveClientCount(true) useless in login solution
[fix] 360109 Calculation blocks application
[fix] 359819 Date/time has some issues considering day-saving times
[fix] 360401 Problems with field selectOnEnter property
[fix] 360872 Selected record not shown in FormInDialogs
[fix] 360866 persistent value lists onscreen

Webclient changes
[fix] 360228 webclient tableviews with scrollbar always enabled show 2 scrollbars
[fix] 356224 Form Inheritance and WebClient behaviour issue
[fix] 357645 WC html area editor and anchoring does not work
[fix] 357763 HTML editor in firefox does not work correct
[fix] 360536 Stream File to Application server service fails in webclient

Developer changes
[enh] 347681 small interactive console enhances
[fix] 353439 Serclipse Builder: type interference not working for var x = y||z when y and z are typed
[fix] 360541 DLTK: builder marker on calling function with String[] param while passing a String[] containing nulls
[fix] 360543 DLTK: no warning generated for functions that don't return what the JSDoc specifies or vise versa
[fix] 360503 DLTK: support missing for "optional" on object property params
[fix] 342804 The builder should generate warnings if the typing info in JSDoc uses unknown types
[fix] 360576 checking for stale forms should not be done by a background calculation also should be reported as a JSError (a developer only error)

Application server changes
[fix] 360898 DB2/400 - problems with IN operator in JOIN clause
[fix] 360899 DB2/400 - Problems with TEMP tables
[fix] 352201 Different Column Type Creation between Developer and Server
[fix] 359901 Case-insensitive operator in relation is not being supported by the app server
[fix] 356344 Large text is imported as text in stead of ntext

Plugin changes
[chg] 361728 Update all plugin jars to latest stable versions (jar version info will be published in wiki docs of 6.0)
[fix] 352507 Spellcheck plugin does not replace wrong words
[fix] 361509 webservice post data: array elements cannot be accessed in scripting
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 6.0 alpha 5

Postby rossent » Thu Mar 10, 2011 2:01 pm

Hi all,

I noticed that the method databaseManager.getFoundSetDataProviderAsArray is now deprecated - what is its replacement?

As a side note, can the warning messages for the deprecated methods be extended to include some reference for the replacement method which should be used.
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 5

Postby Jan Blok » Thu Mar 10, 2011 2:25 pm

databaseManager.convertToDataSet(Object[]) is the replacement
I think this is not possible in eclipse to include reference in warning, we do have a reference in the wiki reference guide.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 6.0 alpha 5

Postby jbader » Thu Mar 10, 2011 2:35 pm

Hello and congratulations on the release!

Regarding...
[fix] 360543 DLTK: no warning generated for functions that don't return what the JSDoc specifies or vise versa


Some datatypes (primitives for example) in JS are lowercase, however I have noticed that often Servoy uses title case versions of them in their auto-generated doc blocks. For example, I have seen "Number," "String," and "Object" (object not primitive, but you get the point).

All of my doc blocks use lowercase datatypes "number," string," "object" etc. (for true JS datatypes anyway, not something like JSRecord), and so I am wondering if @return {object} will warn, when @return {Object} will not?

I think the warning should ignore case b/c in reality...
Code: Select all
var x = {a: 'b'};
typeof(x) === 'Object'

... will return false.

Whereas...
Code: Select all
var x = {a: 'b'};
typeof(x) === 'object'

... will return true.
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Re: Servoy 6.0 alpha 5

Postby rossent » Thu Mar 10, 2011 3:08 pm

Jan Blok wrote:databaseManager.convertToDataSet(Object[]) is the replacement
I think this is not possible in eclipse to include reference in warning, we do have a reference in the wiki reference guide.


Jan,

Thanks for the quick response!

By "reference" I mean the name of the replacement method to be include in the description of the @deprecated tag so it shows up in the warning message and in the method code completion tooltip
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

arguments.callee question

Postby rossent » Thu Mar 10, 2011 3:15 pm

Hi all,

When using arguments.callee in a function we are getting the warning: "The property callee is undefined in arguments"

Is this now supported or not? According to JavaScript documentation, when using Strict Mode the arguments.callee and arguments.caller are not available. Is this the case with Servoy? In 5.2.6 and earlier the callee was available.
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 5

Postby jcompagner » Thu Mar 10, 2011 4:26 pm

arguments.callee is deprecated and shouldn't be used anymore in javascript.
What i can do is make it a deprecated warning, it is of course also still available at runtime, but not really something we should keep supporting in code completion.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 alpha 5

Postby rossent » Thu Mar 10, 2011 4:48 pm

jcompagner wrote:arguments.callee is deprecated and shouldn't be used anymore in javascript.
What i can do is make it a deprecated warning, it is of course also still available at runtime, but not really something we should keep supporting in code completion.


Johan,

Thanks for the update. We will take it out of our code.

A separate question:
In 6a5 we are still getting warnings like "Function funcName declares forms.sys_config_Types.ProgramScreenInfo
as type but returns forms.sys_config_Types.ProgramScreenInfo" (ProgramScreenInfo being a "custom type" - function, marked with @constructor which is used as "var a = new forms.sys_config_Types.ProgarmScreenInfo(...)"

In one of your previous posts you indicated that you were able to find a way to support the "custom types" - did this make it into the last release or will it come out in a future one? If it is included in the current release, do we need to do anything special to make this work?
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 5

Postby jcompagner » Thu Mar 10, 2011 4:57 pm

Jeff:

in doc you can use lowercase just fine

it doesnt matter if you say

return {object} or return {Object}

we have aliases for that.

you really only should use it in doc and not in your code because in js it is Object or Number and not object or number ...
Because yes in your example it prints 'object' but anything else it will not work:
you can't do

new object()
or
variable instanceof object

you have to do

new Object()
or
variable instanceof Object
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 alpha 5

Postby jcompagner » Thu Mar 10, 2011 5:03 pm

rossen:

i just tried it in my code base and this works:

Code: Select all
/**
* @return {forms.other.MyObject}
*/
function test() {
   var x = new forms.other.MyObject();
   return x;
}


and that works fine for me currently.

Not everything completely works in that area like:

Code: Select all
/**
* @return {forms.other.MyObject}
*/
function test() {
   var x = new forms.other.getFunctionReturningMyObjectOfItSelf();
   return x;
}


that doesn't really work yet and we are looking into that how that can work.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 alpha 5

Postby rossent » Thu Mar 10, 2011 5:19 pm

Hi Johan,

Thanks for the update. The example below is one of the usages which we have that are still not working correctly.


Code: Select all
/**
* @return {forms.other.MyObject}
*/
function test() {
        //the getFunctionReturningMyObjectOfItSelf function internally uses: " var a = new forms.other.MyObject();" which is returned
        /** @type {forms.other.MyObject} */
        var x = forms.other.getFunctionReturningMyObjectOfItSelf();
       
        //the properties of the custom type are not supported by the code completion here and in this scenario they produce warnings
        x.someProperty = 2;       

   return x;
}
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 5

Postby jbader » Thu Mar 10, 2011 6:10 pm

it doesnt matter if you say

return {object} or return {Object}

we have aliases for that.


That's good to know. Thanks Johan.

Regarding Object/object. That was perhaps a poor example because of the instanceof syntax, which BTW I think is unfortunate because there is in fact no Object datatype in JS (right?). instanceof actually checks for the class object/constructor function name, which for object is Object. But sticking to the primitives then how about the default docblock for onShow...

Code: Select all
/**
* Callback method for when form is shown.
*
* @param {Boolean} first_show form is shown first time after load
* @param {JSEvent} event the event that triggered the action
*
* @properties={typeid:24,uuid:"93DBBD5A-CC24-486B-9A45-1210F2EF7039"}
*/


I don't believe there is a Boolean object (@edit datatype) in JS. Boolean only exists in its primitive form "boolean" as does number and string. All of Servoy's default doc blocks however use Number, String and Boolean (@edit which are objects with constructors of the same name), not number, string and boolean. Does that seem right to you/is there a reason for it? Really just more curious at this point - meaning I'm not asking for any changes or suggesting anything isn't implemented properly.
Last edited by jbader on Thu Mar 10, 2011 7:03 pm, edited 1 time in total.
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Re: Servoy 6.0 alpha 5

Postby rossent » Thu Mar 10, 2011 6:35 pm

In my opinion, using Boolean, String, Number, Date is better. It follows the naming convention of using Xxxxx for class/type names.
And since there is such a thing in JavaScript as Date.parse(), String.fromCharCode(), Number.MAX_VALUE , new Boolean(), new Array, etc., you can think of those as types or classes and it makes perfect sense to use the same in the JSDoc. Besides, this makes it consistent with the rest of the Servoy built-in types (JSFoundset, Form, Label, etc.)
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 5

Postby jbader » Thu Mar 10, 2011 7:02 pm

rossent wrote:In my opinion, using Boolean, String, Number, Date is better. It follows the naming convention of using Xxxxx for class/type names.
And since there is such a thing in JavaScript as Date.parse(), String.fromCharCode(), Number.MAX_VALUE , new Boolean(), new Array, etc., you can think of those as types or classes and it makes perfect sense to use the same in the JSDoc. Besides, this makes it consistent with the rest of the Servoy built-in types (JSFoundset, Form, Label, etc.)


Well ultimately I suppose it is up to the developer, but there is no Date datatype in JS FYI. Date is the constructor function name for the Date class, which in itself will return an object. But that is not to say you can't type check it to be Date, you can, but you have to use instanceof and not typeof.

Perhaps it's all semantics, but I think it pays to be explicit. Meaning that if you are going to do:

Code: Select all
var n = new Number();

Then your docblock could read
Code: Select all
@param {object} n

or...
Code: Select all
@param {Number} n

but in my opinion not...
Code: Select all
@param {number} n

and definitely not...
Code: Select all
@param {Object} n



So with all of that being said it really depends on what precisely you are passing around, but note there is a difference.
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Re: Servoy 6.0 alpha 5

Postby jbader » Thu Mar 10, 2011 7:28 pm

Although Johan!

I see that if I do firstShow instanceof Boolean (for a default Servoy onShow method) I get true, and if I do typeof(firstShow) I get boolean. I honestly don't know how you did that because they are not synonymous in JavaScript and that can't be replicated in scripting. I'm not sure how I can have instanceof Boolean be true and get typeof boolean??

If I try to replicate that I can't...

Code: Select all
function test() {
   var x = new Boolean(1);
   application.output(typeof(x));
   application.output(x instanceof Boolean);
}

I get object from typeof
and I get true from instanceof
(which is what I would expect)

Somehow your firstShow parameter is both Boolean and boolean!
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Next

Return to Latest Releases

Who is online

Users browsing this forum: rafig and 13 guests