controller.find() results in set property error

Questions, tips and tricks and techniques for scripting in Servoy

Re: controller.find() results in set property error

Postby Foobrother » Tue Jul 14, 2009 11:44 am

Foobrother wrote:Another funny one :?

When I call the method "application.getMethodTriggerFormName();" from a form which has "_copy" at the end it returns the name of the without "_copy".
I double-checked: I don't have any form in developer called like what is output by the solution! Only "formNameReturned+_copy".

In fact I'm wrong! The forms are there. They are build by the application itself using the database and solutionModel. My colleague just implemented it in this last version and I totally forgot about it!

So in fact everything is ok in the code for the moment. I'm still searching why this find() goes to false on the server.
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: controller.find() results in set property error

Postby Foobrother » Tue Jul 14, 2009 12:13 pm

You were right! It because of another search() done while the first one is running.
I found another function which runs the search(). I've made prints to check what happens and it's clear. The 2 functions running a search are FilterList and InitSplit
On Developer:
Code: Select all
frm_assets                  //in InitSplit
Start Search InitSplit         //in InitSplit
End Search InitSplit          //in InitSplit
Start Search FilterList      //in FilterList
TRUE                  //in FilterList
TRUE                   //in FilterList
TRUE                  //in FilterList
TRUE                  //in FilterList
TRUE                  //in FilterList
TRUE                  //in FilterList
End Search FilterList         //in FilterList

On the Server:
Code: Select all
frm_assets                //in InitSplit
Start Search InitSplit          //in InitSplit
End Search InitSplit          //in InitSplit
Start Search FilterList          //in FilterList
TRUE                //in FilterList
frm_assets             //in InitSplit
Start Search InitSplit          //in InitSplit
End Search InitSplit          //in InitSplit
FALSE                //in FilterList
FALSE                //in FilterList
FALSE                //in FilterList
FALSE                //in FilterList
FALSE                //in FilterList
ERROR - Debug                      - Throwable
...


So why are the search done in sequence on Developer and not on Server? I'll look at the code.
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: controller.find() results in set property error

Postby Foobrother » Tue Jul 14, 2009 12:45 pm

So in fact you were right.
v_filter_form from
Code: Select all
forms[v_filter_form]['v_f_' + forms[v_rf_form].fld_field_name]

is calling the onLoad event which runs InitSplit.

Why is loaded another time when I do "forms[v_filter_form]['v_f_' + forms[v_rf_form].fld_field_name]"? Apparently it's linked to solutionModel as I think this code was used before using using solutionModel.
How can I avoid it?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: controller.find() results in set property error

Postby Foobrother » Tue Jul 14, 2009 2:08 pm

Ok I've found the answer there: viewtopic.php?f=22&t=11724&start=0&st=0&sk=t&sd=a

So now I just have the issue to understand the application to make the change without changing the behaviour :?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Previous

Return to Methods

Who is online

Users browsing this forum: No registered users and 35 guests