Servoy 5.2.1

Servoy announcements

Re: Servoy 5.2.1

Postby jmcneely » Wed Sep 01, 2010 4:48 pm

On a Mac, I have a variable on a form which is set to run a function triggered by OnDataChange. In the smart client, a return or enter keystroke to triggered the action in 5.1.4, as long as the field was set to be a TEXT_FIELD, but it no longer does in 5.2.1. In the web client it works as expected.

As a side note, I notice that if you backspace delete in a TEXT_FIELD now, it correctly deletes only one character, not two as before. I wonder if the fix for the delete broke the return keystroke behavior?
jmcneely
 
Posts: 45
Joined: Thu May 06, 2010 7:22 pm

Re: Servoy 5.2.1

Postby david » Fri Sep 03, 2010 3:33 pm

jmcneely wrote:On a Mac, I have a variable on a form which is set to run a function triggered by OnDataChange. In the smart client, a return or enter keystroke to triggered the action in 5.1.4, as long as the field was set to be a TEXT_FIELD, but it no longer does in 5.2.1.


Any confirmation/news/more info on this? We're trying to figure out our move to the 5.2 branch from 5.1.4 and this issue might cause some problems.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Servoy 5.2.1

Postby DeianM » Fri Sep 03, 2010 4:41 pm

Explicitly tested again and onAction/onDataChange works as expected.
DeianM
 
Posts: 2
Joined: Mon Aug 31, 2009 4:56 pm

Re: Servoy 5.2.1

Postby david » Fri Sep 03, 2010 8:47 pm

DeianM wrote:Explicitly tested again and onAction/onDataChange works as expected.


What OS and Java version(s) you test with?
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Servoy 5.2.1

Postby jmcneely » Sat Sep 04, 2010 12:29 am

I explicitly tested a very simple solution and verified that it is true for my environment. Nothing but a single field on a form with no table, and a method that did application.output('hello'). OnDataChange ran the script if you exited the field by clicking away with the mouse, but not with a return or enter keystroke.

OS X 10.6.4, java version "1.6.0_20", servoy 5.2.1, smart client (web client works as hoped for).
jmcneely
 
Posts: 45
Joined: Thu May 06, 2010 7:22 pm

Re: Servoy 5.2.1

Postby david » Sat Sep 04, 2010 12:58 am

Replicated issue here using 5.1.4 and older version of Java/OSX. Restarting smart client or Servoy entirely doesn't fix issue.

However, temporarily assigning the onDataChange() method to the onAction() event (assign method, save form, un-assign method, save form), the onDataChange() method starts working as expected with return/enter key.

I don't have 5.2.1 loaded up yet if you want to try this on your end.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1724
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Servoy 5.2.1

Postby Jan Blok » Mon Sep 06, 2010 9:09 am

jmcneely wrote:I explicitly tested a very simple solution and verified that it is true for my environment. Nothing but a single field on a form with no table, and a method that did application.output('hello'). OnDataChange ran the script if you exited the field by clicking away with the mouse, but not with a return or enter keystroke.
OS X 10.6.4, java version "1.6.0_20", servoy 5.2.1, smart client (web client works as hoped for).

Please file a support issue then, so we can investigate.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 5.2.1

Postby jmcneely » Tue Sep 07, 2010 10:42 pm

I did file a report now, thanks.
jmcneely
 
Posts: 45
Joined: Thu May 06, 2010 7:22 pm

Re: Servoy 5.2.1

Postby Marco R. » Mon Sep 27, 2010 3:19 pm

With the new security I saw that all the global variables modification done by authentication solution are not kept.
For example if I have a global variable "user_age" and I fill it during the authentication loop(in wich I can retrive the user info from db to evaluate the login),so after
the command "security.login()" ,when the main solution was been loaded,if I try to check the content of my global variable so I'll find it equal to null.

flow:
globals variable named 'UserInfo'


solution with type login:
Code: Select all
.
.
security.authenticate('authSolution","authMethod",[user,pwd])
.
..


solution with type authentication:
Code: Select all
globals.UserInfo = new Object()
globals.UserInfo.age = dataset.getValue(x,y)
globals.UserInfo.address  = dataset.getValue(x,y)
if(pwd == dataset.getValue(x,y))
security.login(user,user,['users'])
.
.

Main Solution:
Code: Select all
application.output(globals.UserInfo.age)

//the result into the console is
null

offcourse if I try to inspect the variable 'UserInfo' into the authenticator solution with a break point the variable is filled correctly.


Is this normal? And if yes: does exist a way to don't lose the informations kept into the authenticator solution (in this way I haven't to retrive the info twice,one for the authentication and one for save the user information).
Marco Rossi
Freelance

Main development environment: Servoy 6.1.6 - 7.4.3, Java 1.6u45,7u71 Windows 7/CentOS
Marco R.
 
Posts: 203
Joined: Thu Mar 19, 2009 12:37 pm

Re: Servoy 5.2.1

Postby ptalbot » Mon Sep 27, 2010 3:33 pm

Hi Marco,

I would think that's normal because the authenticator solution is launched in a separate client (as stated in another thread).

So the best way to communicate with your main solution is from you login module (which shares globals with you main solution), you can setup objects and methods in your authenticator solution and your login module can access these methods and retrieve a result using:

Code: Select all
var resultObject = security.authenticate('authenticator_module', 'any_authenticator_method', [param1, param2, etc]);


Then using your resultObject, you can populate your globals the way you want.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
http://www.servoy-stuff.net
https://www.servoyforge.net
--------------------------------------------
Servoy 5.2.16 / 6.0.9 / 6.1.6 / 7.3.1
All OSes / Java 5 & 6 & 7
User avatar
ptalbot
 
Posts: 1612
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Previous

Return to Announcements

Who is online

Users browsing this forum: No registered users and 6 guests