Page 2 of 3

Re: Menu List Problem

Posted: October 3rd, 2023, 2:18 am
by Romij Chowdhury
actually i want to execute survey files from the menu list whether it is .pen file or .pff file........just want the solution

Re: Menu List Problem

Posted: October 3rd, 2023, 2:20 am
by Romij Chowdhury
actually i want to execute survey files from the menu list whether it is .pen file or .pff file........just want the solution

Re: Menu List Problem

Posted: October 3rd, 2023, 11:17 am
by justinlakier
execPff() or pff.exec() are how to execute a CSPro survey file from the menu. The path to your .pff file needs to be correct. The menu in the examples folder and the help documentation for pff.exec/execPff (https://www.csprousers.org/help/CSPro/e ... ction.html) provide examples.

Re: Menu List Problem

Posted: October 4th, 2023, 4:05 am
by Romij Chowdhury
thank you very much it help me a little but when i use "stop" it take me to the this page so what will i use instead of "stop"?

Re: Menu List Problem

Posted: October 4th, 2023, 5:36 am
by Romij Chowdhury
it should take me to this page after i choose from the menu list

Re: Menu List Problem

Posted: October 6th, 2023, 1:35 pm
by justinlakier
It's possible that the pff file path you listed is not accurate. Is Bt.Brinjal_Sample.pff in the same folder as Bt.Brinjal_Menu.pff, or sitting in a parent folder 1 level above it? I just tested this with my own pff files which were all in the same folder, and when looking to the parent folder the execpff would return 0 (failure to find and execute the pff) but still successfully execute the optional "stop" portion of the command. I had to remove the pff path's "../" or change it to "./" to have it working. If after changing the path to reflect your own file arrangement, execpff still cannot execute the file, you can post your zipped application here, or on the mailing list if it has sensitive information, so we can test it further.

Re: Menu List Problem

Posted: October 7th, 2023, 9:33 am
by Romij Chowdhury
Please help me with that....

Re: Menu List Problem

Posted: October 8th, 2023, 4:03 pm
by justinlakier
Hi Romij,

The zip file you attached only includes Bt.Brinjal_Menu. If you want us to test the application and the menu's ability to open Bt.Brinjal_Sample and Bt.Brinjal Cencus, then please zip the full application, including the Bt.Brinjal_Sample and Bt.Brinjal Cencus folders.

Thank you,
Justin La Kier

Re: Menu List Problem

Posted: October 9th, 2023, 1:20 am
by Romij Chowdhury
Please give the correct path location of Bt.Brinjal_Sample and Bt.brinjal Cencus on my code and make a solution of it....advance thank you!!
my Cspro version is 7.7.3 and What about your?

Re: Menu List Problem

Posted: October 10th, 2023, 1:24 am
by justinlakier
Hi Romij,

I've edited your app and attached a fixed version working in 7.7. I made changes to Bt.Brinjal_Menu to make the paths correct for this relative structure, and to fix two other issues that prevented opening other files. Firstly, you used the name "Cencus" in your code but "Census" in the file name, so I corrected the typo in the code. Secondly, you had been calling pff.exec() only where manual_choice=5, so it was not executing after any other options. I moved the execution to take place right after a pff is loaded. You could also move the exec() to the very end after endif, however that can cause errors if you choose options which do not load a pff. You can check the return values of pff.load and pff.exec, and give an errmsg if they return 0(failure). I also recommend removing the options ".........." since you do not have any handling for them. If you change the pff's relative locations as compared to this zip file, make sure to also change the relative path in Menu's logic to match.

Hope this helps,
Justin La Kier