Servoy 6.0 alpha 6

Release notes for Servoy betas

Re: Servoy 6.0 alpha 6

Postby rossent » Mon Mar 28, 2011 3:11 pm

Hi Servoy,

The following case still produces warning similar to "The function Xxxxx is undefined in this script" and the code completion does not work:

Code: Select all
       
      var _s = 'some_form_name';
      ...
      /** @type forms.base */
      var _frm = forms[_s];
      //this produces the warning mentioned above
      _frm.someBaseMathod();


Is this supposed to be fixed in alpha 6 or is it still a pending one?
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 6 - onRender event Question

Postby rossent » Mon Mar 28, 2011 3:19 pm

jasantana wrote:Hi, could you please some sample about onRender event?

When used in a TableView form how to know if it´s the selected item, how to change the style for that record, etc.

Thanks.



Here is a sample code which you can use. In this particular case, we also have a calculation field defined (named selection_calc) which we use to display checkboxes on the grid and allow users to select multiple rows:

Code: Select all
/**
* Called before the form component is rendered.
*
* @param {JSRenderEvent} event the render event
*
* @private
*
* @properties={typeid:24,uuid:"D98BD47A-5513-4763-BCDC-BB4217EA5F26"}
*/
function onRenderGrid(event)

   
    var _renderable = event.getElement();
    var _elemName = _renderable.getName();
   
    var _rec = event.getRecord();
    var _isCurrentRecord = event.isRecordSelected();

    //selection checkbox
    var _isSelected = (_rec.selection_calc == 1);
   
    if(_isCurrentRecord)
    {
        _renderable.bgcolor = '#ffaa00';
    }
   
    if(_isSelected)
    {
        //the font styling currently does not work correctly but should be fixed in the Servoy 6.0 alpha 7 build
        _renderable.font = solutionModel.createFont('Arial', SM_FONTSTYLE.BOLD, 11);
        if(!_isCurrentRecord)
        {
            _renderable.bgcolor = '#ffc277';
        }
    }
   
    if(!_isCurrentRecord && !_isSelected)
    {
        if(_rec.status &&  (_rec.status == 'On Hold'))
        {
            //rows with special "on hold" status
            _renderable.bgcolor = '#bfbfbf';
        }
        else if((event.getRecordIndex() % 2) == 0)
        {
            //even rows
            _renderable.bgcolor = '#D2DBF5';   
        }
        else
        {
            //odd rows
            _renderable.bgcolor = '#ffffff';
        }
    }
   
    _renderable.fgcolor = '#000000';
}
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 6

Postby hsummerhays » Mon Mar 28, 2011 5:20 pm

pbakker wrote:I do not see the link between the question and the simplified samplecode. The simplified samplecode raises no warnings for me.


Strange...

3-28-2011 9-08-41 AM.gif
3-28-2011 9-08-41 AM.gif (11.74 KiB) Viewed 2500 times
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: Servoy 6.0 alpha 6 - Continuations

Postby rossent » Tue Mar 29, 2011 10:08 am

rossent wrote:Hi all,

We use Continuations on the Web Client to simulate blocking modal dialogs. This approach works great when actual form elements are used to invoke the method which eventually shows the modal dialog (for example, clicking a button or label, dataChange events, etc.)

However, when the dialog showing methods are invoked from a "link" rendered in an HTML_AREA using the method:

Code: Select all
<a href="javascript:showDialog();">The Link Text</a>


we are getting errors java.lang.NullPointerException when the continuation call is made.
In addition, using continuations in code which is executed using eval() does not work.

Are continuations supported by Servoy in the scenarios described above?


Hi Servoy,

Any update on this? Will we be able to use Continuations on the web clients in calls which are invoked from <a> anchor tags in HTML_AREA fields?
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Servoy 6.0 alpha 6

Postby pbakker » Tue Mar 29, 2011 10:16 am

pbakker
 
Posts: 2817
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: Servoy 6.0 alpha 6

Postby jcompagner » Tue Mar 29, 2011 11:47 am

hsummerhays wrote:The method getScriptStackTrace() is undefined for the type ServoyException
The method getSQL() is undefined for the type Exception
The method getSQLState() is undefined for the type Exception
The method getVendorErrorCode() is undefined for the type Exception
The property fileName is undefined for the type ServoyException
The property fileName is undefined in ex2
The property lineNumber is undefined for the type ServoyException
The property lineNumber is undefined in ex2
The property message is undefined for the type ServoyException


i updated the default onErrorCode() stuff so that most of those are gone (the example now uses casting of the 2 Exception types)

1 is still there and that is the getScriptStackTrace() that needs to be resolved in another way.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 alpha 6

Postby jcompagner » Tue Mar 29, 2011 2:55 pm

hsummerhays wrote:
    Cannot make a static reference to the non-static property enabled from the type null


this will be fixed in alpha 7
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 alpha 6

Postby jcompagner » Tue Mar 29, 2011 5:20 pm

rossent wrote:
Code: Select all
       
      var _s = 'some_form_name';
      ...
      /** @type forms.base */
      var _frm = forms[_s];
      //this produces the warning mentioned above
      _frm.someBaseMathod();



the above is a bit wrong:

/** @type Form<base> */
var _frm = forms[_s];

But that still doesn't work completely because of that assignment that happens on that same line, that will overwrite the form typing info again
this will be fixed in a7
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Servoy 6.0 alpha 6

Postby hsummerhays » Fri Apr 01, 2011 10:39 pm

The form editor scrolls automatically if you are selecting objects with the mouse and you drag to near the edge of the form editor. That is probably sufficient, but it would probably be more intuitive if it also did it when you drag past the edge of the form editor. Better still, it would be great if it scrolled faster as you drag further past the edge.

Another thing I noticed was that when you select items when scrolling in this manner, then when you are done selecting, Servoy will scroll you all the way back to your first few object. It would be nicer if it just left you where you were.

Lastly, I noticed that if I add an object, such as a button, and I get close to the top or left edge of the form editor and hold it for a second, the form scrolls up and/or left. This is not desirable.

If you think I am being too picky, just say so - I can get used to it like it is. Sometimes though, it is simple usability items like this that make people like a product that much more :D .
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Re: Servoy 6.0 alpha 6

Postby tysonj » Wed Jul 20, 2011 12:44 pm

jcompagner wrote:
hsummerhays wrote:The method getScriptStackTrace() is undefined for the type ServoyException
The method getSQL() is undefined for the type Exception
The method getSQLState() is undefined for the type Exception
The method getVendorErrorCode() is undefined for the type Exception
The property fileName is undefined for the type ServoyException
The property fileName is undefined in ex2
The property lineNumber is undefined for the type ServoyException
The property lineNumber is undefined in ex2
The property message is undefined for the type ServoyException


i updated the default onErrorCode() stuff so that most of those are gone (the example now uses casting of the 2 Exception types)

1 is still there and that is the getScriptStackTrace() that needs to be resolved in another way.



how do I updated the default onErrorCode() ??? :?: to get rid of those warnings :!:
User avatar
tysonj
 
Posts: 47
Joined: Tue Sep 28, 2010 2:07 pm
Location: Paris, France.

Re: Servoy 6.0 alpha 6

Postby jcompagner » Wed Jul 20, 2011 12:55 pm

just look what is generated now when you let the latest servoy 6 release generate the onError method
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Previous

Return to Latest Releases

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron