Finding default parameters for built-in methods

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

Finding default parameters for built-in methods

Postby Gary R. Schaecher » Mon Oct 06, 2008 9:34 pm

Where does one find the documentation or list of default parameters or arguments passed to the build-in events in Servoy such as onDataChange?

I've looked in the documentation but haven't been able to find these. For example onDataChange argument 1 and 2 is the old value and new value of a field.

Thanks!
Gary R. Schaecher
TMA Systems, LLC
www.tmasystems.com
Gary R. Schaecher
 
Posts: 72
Joined: Sat Jan 06, 2007 11:01 pm

Re: Finding default parameters for built-in methods

Postby Gabi Boros » Tue Nov 18, 2008 3:41 pm

here are the arguments :

form commands
=============

- onSearchCmd
arguments[0] <boolean> : is clear
arguments[1] <boolean> : is reduced

form events
===========

- onRecordEditStop
arguments[0] <record> : edited record

- onShow
arguments[0] <boolean> : is first time show

form
====

- rowBGColorCalculation
(function arguments)
arguments[0] <int> : row number
arguments[1] <boolean> : is selected
arguments[2] <string> : cell element type
arguments[3] <string> : cell data provider
arguments[4] <string> : form name
arguments[5] <record> : state
arguments[6] <boolean> : is edited

(calculation arguments)
arguments[0] <int> : row number
arguments[1] <boolean> : is selected
arguments[2] <string> : cell element type
arguments[3] <string> : cell data provider
arguments[4] <boolean> : is edited

field events
============

- onDataChange
arguments[0] <object> : old value
arguments[1] <object> : new value
Gabi Boros
Servoy
Gabi Boros
 
Posts: 399
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: Finding default parameters for built-in methods

Postby Yeroc » Fri Dec 12, 2008 2:14 am

How about the Solution events: onClose, onError & onOpen?

Thanks,
Corey
Yeroc
 
Posts: 109
Joined: Tue Aug 12, 2008 1:12 am
Location: Calgary, AB, Canada

Re: Finding default parameters for built-in methods

Postby rgansevles » Mon Feb 16, 2009 10:17 am

Some more events:

== table
- onDelete
arguments[0] <Record> : record that will be deleted

- onInsert
arguments[0] <Record> : record that will be inserted

- onUpdate
arguments[0] <Record> : record that will be updated


== tabpanel
- onTabChangeMethodID
arguments[0] <Number> : index of tab shown before the change

== form
- onSortCmd
arguments[0] <String> : element data provider
arguments[1] <Boolean> : sort acscending [true] or descending [false]

== solution
- onError
arguments[0] <Exception> : exception to handle

- onClose
arguments[0] <Boolean> : force flag


In Servoy 4.2 the properties view will be extended with arguments to the events.
All the servoy-generated arguments (like the ones above) will be listed when a method is attached to an event.
Additionally it will be possible to add custom values.
For instance, you can attach a method with 2 arguments to the onshow event of form x, the first argument is defined by servoy (a boolean indicating it is the first time), the value of the second argument can be configured for form x.


Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to How To

Who is online

Users browsing this forum: No registered users and 5 guests