Different behavior of Application.FindForm() under v1.4??

Class library usage, coding and language questions.
timm
Posts: 6
Joined: Wed Mar 12, 2008 11:10 pm
Location: Seattle, WA USA

Different behavior of Application.FindForm() under v1.4??

Post by timm » Mon Mar 24, 2008 8:52 pm

Hello,

I had an application that was working fine under 1.3.1. I liked the new features in 1.4, including the ability to find a Form by title only, logging, etc., so I upgraded. The exact same code with the exception of Application.Start() converted to System.Diagnostics.Process.Start(), now doesn't find the main form of my application. Is this due to the Application class no longer doing the application start. Help would be much appreciated.

Thanks,
Tim

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Tue Mar 25, 2008 10:55 am

The Application.FindForm methods did not change except for the code that activates the found form (i.e. brings it to the front). However, this should not have influences on the behavior of the corresponding methods.

Could you please post the code snippet that fails?

Using System.Diagnostics.Process.Start() might have an effect. Please, try to insert an Application.Sleep between the Start and the FindForm methods!

Regards,
Alex
Ranorex Support Team

timm
Posts: 6
Joined: Wed Mar 12, 2008 11:10 pm
Location: Seattle, WA USA

Re:Different behavior of Application.FindForm() under v1.4??

Post by timm » Tue Mar 25, 2008 9:16 pm

Hello,

Alex: thank you for your feedback.

The good news is that I had forgotten that Ranorex.Core.dll, which isn't delivered by VS along with the rest of the dependent assemblies, was still 1.3.1. When replaced with the proper version, I got past the form issue.

But then the _same code_ that I had running with 1.3.1, was failing searches for controls/elements -- specifically children of things like groupings of buttons or tabs. Was the Form.FindControlName(), etc. functionality changed significantly?

Thanks,
Tim

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Mar 26, 2008 2:35 pm

The FindControl... and FindChild... methods have not changed since 1.3.1 except for some small performance issues that should really have no influence.

The only thing I can think of is the change in the element caching algorithm. However, this should not have an effect on the FindControl... methods.

Could you please post the code that fails or even mail a sample application and the corresponding test application to support[at]ranorex.com!

Regards,
Alex
Ranorex Support Team