Menu List Problem

Other discussions about CSPro
Romij Chowdhury
Posts: 33
Joined: August 19th, 2023, 6:06 am

Re: Menu List Problem

Post 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
Romij Chowdhury
Posts: 33
Joined: August 19th, 2023, 6:06 am

Re: Menu List Problem

Post 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
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: Menu List Problem

Post 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.
Romij Chowdhury
Posts: 33
Joined: August 19th, 2023, 6:06 am

Re: Menu List Problem

Post 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"?
Attachments
Menu4.jpg
Menu4.jpg (55.13 KiB) Viewed 224305 times
Menu5.jpg
Menu5.jpg (309.17 KiB) Viewed 224305 times
Romij Chowdhury
Posts: 33
Joined: August 19th, 2023, 6:06 am

Re: Menu List Problem

Post by Romij Chowdhury »

it should take me to this page after i choose from the menu list
Attachments
Menu6.jpg
Menu6.jpg (68.61 KiB) Viewed 224301 times
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: Menu List Problem

Post 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.
Romij Chowdhury
Posts: 33
Joined: August 19th, 2023, 6:06 am

Re: Menu List Problem

Post by Romij Chowdhury »

Please help me with that....
Attachments
Bt.Brinjal_Menu.rar
(49.72 KiB) Downloaded 184 times
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: Menu List Problem

Post 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
Romij Chowdhury
Posts: 33
Joined: August 19th, 2023, 6:06 am

Re: Menu List Problem

Post 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?
Attachments
Bt.Brinjal Sample.rar
(53.26 KiB) Downloaded 158 times
Bt Brinjal.rar
(215.7 KiB) Downloaded 191 times
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: Menu List Problem

Post 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
Attachments
Brinjal7.zip
(385.18 KiB) Downloaded 188 times
Post Reply