An othe idea for Global Agent Method

Share business templates, ideas, experiences, etc with fellow Servoy developers here

An othe idea for Global Agent Method

Postby elmono_acosta » Thu Jan 27, 2005 1:18 pm

Call this method form anywhere, and forget about the size of the ballon.....

globals.callAgent('This is a test for the agent......bla....bla.....');

The method is
Code: Select all;

//Determines correct size of the baloon, depending on the amount of text.

var number_of_letters= arguments[0].length;

var c = 0;
var i = 0;
while ((i=arguments[0].indexOf("\n",i))!=-1) {

var hight = (((number_of_letters / 28)+c) * 16) + 21;


//Servoy will automatically hide the baloon (time not adjustable, servoy handles it automatically. Not very good...)
//But the image of the agent will still be displayed, after the baloon hides.
//To hide the image, do this:
//The number is in seconds * 1000

var startDate = new Date();
plugins.scheduler.addJob('HideAgent'+ startDate.getTime(),startDate,globals.hideAgent);

The method globals.hideAgent is:
Code: Select all

What this is missing is been able to hide BOTH the baloon an Agent at the same time. (of course an adjustable time. !!!!)
Any ideas ???
Maybe this should all be a funtion of servoy ?????
Posts: 41
Joined: Thu Jun 17, 2004 11:52 am

Postby bcusick » Fri Jan 28, 2005 3:46 am

The plug-ins we provide for free are meant as examples. They are FUNCTIONAL examples, but examples nonetheless.

The source of this bean is open. You can change it however you want via Java.
Bob Cusick
Posts: 1190
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 2 guests