Servoy 6.0 release candidate 5

Release notes for Servoy betas

Servoy 6.0 release candidate 5

Postby Jan Blok » Fri Jul 22, 2011 11:39 am

We are pleased to announce the immediate availability of Servoy 6.0 release candidate 5.

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

For all the highlights read the wiki.

Client Changes
[fix] application startup hangs when having multicolumn pk's on some databases
[fix] 401650 onRightClick problems with JSEvent in WC and SC

Developer Changes
[fix] 402229 Dropping media do not render when gif file type
[fix] 401127 Search for References on a method doesn't find locations where the method is used as a bgrowcolorCalc

Plugin Changes
[fix] 302282 spellchecker plugin issue
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 6.0 release candidate 5

Postby rossent » Fri Jul 22, 2011 5:36 pm

Hi Servoy,

The issue with warnings of overridden functions ("Function X hides another function" - case ID: 362968) which was fixed in 6.0 b2 appears again in RC5.

Do we need to mark now the overridden functions with a special JSDoc tag or is this a regression bug?
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 release candidate 5

Postby jcompagner » Fri Jul 22, 2011 5:47 pm

that is already fixed, it was a regression.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7971
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 release candidate 5

Postby hsummerhays » Fri Jul 22, 2011 6:34 pm

When calling a prototype method, Servoy warns "The method xxxx in type xxx is not applicable for the arguments (xxx)" even if you use the object["method"]() notation instead of object.method().

Example using date_modjs module from servoyforge (two of these warnings are shown for the last line):
Code: Select all
// Note: start and end are Date objects defined earlier.

/** @type {String} */
var dateFormat = "yyyy-MM-dd HH:mm:ss";
/** @type {String} */
var searchDate = start["toString"](dateFormat) + "..." + end["toString"](dateFormat) + "|" + dateFormat;
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: Servoy 6.0 release candidate 5

Postby jcompagner » Mon Jul 25, 2011 4:53 pm

so you did do an override of the toString method and now it must take a extra format param?

This kind of prototyping is currently not supported, even if you use the 'array' notation. Because that static notation still maps on a real thing so it will still try to match it for you
you can do it by using a variable so that it becomes completely dynamic:

Code: Select all
var start = new Date();
   var end = new Date();
   var method = "toString";
   /** @type {String} */
   var dateFormat = "yyyy-MM-dd HH:mm:ss";
   /** @type {String} */
   var searchDate = start[method](dateFormat) + "..." + end[method](dateFormat) + "|" + dateFormat;



but why "toString" why not just add a "format" function?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7971
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 release candidate 5

Postby hsummerhays » Tue Jul 26, 2011 5:30 pm

Thanks for the solution Johan. The toString method for formatting dates is part of the Date.js open source code.
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: Servoy 6.0 release candidate 5

Postby rossent » Tue Jul 26, 2011 7:45 pm

Hi Servoy,

After the update to RC4 or RC5 (not sure when exactly), we started to see the following errors in the server log:

Code: Select all
AWT-EventQueue-0    ERROR    com.servoy.j2db.util.Debug    No selection set on foundset with size 1 fs: FoundSet[Table:id_approver,Size: 1,CachedRecords: 1,SELECTED INDEX: -1]
java.lang.RuntimeException
     at com.servoy.j2db.scripting.SelectedRecordScope.getSelectedRecord(SelectedRecordScope.java:47)
     at com.servoy.j2db.scripting.SelectedRecordScope.get(SelectedRecordScope.java:105)
     at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
     at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1739)
     at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1678)
     at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3752)
     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
     at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:518)
     at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:379)
     at com.servoy.j2db.FormController.executeFunction(FormController.java:4050)
     at com.servoy.j2db.FormController.executeFunction(FormController.java:3929)
     at com.servoy.j2db.FormController.executeFunction(FormController.java:3851)
     at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3706)
     at com.servoy.j2db.ui.RenderEventExecutor.fireOnRender(RenderEventExecutor.java:88)
     at com.servoy.j2db.smart.dataui.DataRenderer.fireDataRendererOnRender(DataRenderer.java:843)
     at com.servoy.j2db.smart.dataui.DataRenderer.getListCellRendererComponent(DataRenderer.java:540)
     at com.servoy.j2db.smart.RecordView.syncSliderAndRefresh(RecordView.java:224)
     at com.servoy.j2db.smart.RecordView.valueChanged(RecordView.java:333)
     at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
     at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
     at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
     at javax.swing.DefaultListSelectionModel.insertIndexInterval(Unknown Source)
     at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.insertIndexInterval(AlwaysRowSelectedSelectionModel.java:92)
     at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.intervalAdded(AlwaysRowSelectedSelectionModel.java:238)
     at com.servoy.j2db.dataprocessing.TableAndListEventDelegate.fireIntervalAdded(TableAndListEventDelegate.java:120)
     at com.servoy.j2db.dataprocessing.TableAndListEventDelegate$1.run(TableAndListEventDelegate.java:147)
     at com.servoy.j2db.dataprocessing.TableAndListEventDelegate.fireTableAndListEvent(TableAndListEventDelegate.java:175)
     at com.servoy.j2db.dataprocessing.SwingFoundSet.fireFoundSetEvent(SwingFoundSet.java:147)
     at com.servoy.j2db.dataprocessing.FoundSet.addRecord(FoundSet.java:3693)
     at com.servoy.j2db.dataprocessing.FoundSet.newRecord(FoundSet.java:3643)
     at com.servoy.j2db.dataprocessing.FoundSet.newRecord(FoundSet.java:3606)
     at com.servoy.j2db.FormController.newRecordImpl(FormController.java:2680)
     at com.servoy.j2db.FormController.access$7(FormController.java:2664)
     at com.servoy.j2db.FormController$JSForm.js_newRecord(FormController.java:1015)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
     at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:361)
     at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
     at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
     at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
     at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
     at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134)
     at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:179)
     at org.mozilla.javascript.Context.evaluateString(Context.java:1233)
     at com.servoy.j2db.scripting.ScriptEngine.eval(ScriptEngine.java:573)
     at com.servoy.j2db.FormController.eval(FormController.java:3832)
     at com.servoy.j2db.smart.dataui.DataTextEditor$LinkListener.hyperlinkUpdate(DataTextEditor.java:875)
     at javax.swing.JEditorPane.fireHyperlinkUpdate(Unknown Source)
     at com.servoy.j2db.util.gui.FixedHTMLEditorKit$LinkController.activateLink(FixedHTMLEditorKit.java:683)
     at com.servoy.j2db.util.gui.FixedHTMLEditorKit$LinkController.mouseClicked(FixedHTMLEditorKit.java:488)
     at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
     at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at javax.swing.JComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
     at java.awt.EventQueue.access$000(Unknown Source)
     at java.awt.EventQueue$1.run(Unknown Source)
     at java.awt.EventQueue$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
     at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
     at java.awt.EventQueue$2.run(Unknown Source)
     at java.awt.EventQueue$2.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)


A while ago, there was an issue related to the foundset to having a current record selected after loading or modifying data. Looking at the error message, it appears that this issue is something similar. We are not seeing an error in the application so not sure what causes the error to show up in the server log. I suspect that in our code we are using something like:

Code: Select all
    var _record = foundset.getSelectedRecord();

    if(_record)
    {
        ...
    }


The code will not "break" in this case since it checks if the foundset.getSelectedRecord() returns a result, but obviously the end result will not be correct. In my opinion, if a foundset contains any records, it should always have at least 1 record selected.
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 release candidate 5

Postby jcompagner » Wed Jul 27, 2011 10:18 am

rossen,

this is some kind of state that shouldn't really happen yes, it would be nice to know how you get that foundset in that state.
The good thing is that it won't affect you at all, and the record will not be null..

Code: Select all
      if (selectedIndex == -1 && fc.getFormModel().getSize() > 0)
      {
         Debug.error("No selection set on foundset with size " + fc.getFormModel().getSize() + " fs: " + fc.getFormModel(), new RuntimeException());
         fc.getFormModel().setSelectedIndex(0);
      }


as you can see if we detect this state, we log it so we know that it did happen, and then we set the selection to the first record.
(which will be returned then)

So from your code, the flow is normal, but yes somehow the foundset is in a wrong state, how that happens we would like to know.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7971
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 release candidate 5

Postby Jan Blok » Thu Jul 28, 2011 10:58 am

rossent wrote:java.lang.RuntimeException
at com.servoy.j2db.scripting.SelectedRecordScope.getSelectedRecord(SelectedRecordScope.java:47)

The problem is found and addressed, but we missed the Servoy 6.0 release window.
Its an internal warning for unexpected selection state, it will not affect the working of your solution.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam


Return to Latest Releases

Who is online

Users browsing this forum: No registered users and 1 guest