Problem with "in-code" Shell

In order to offload some operations from my main webapp, I want to use helper apps to generate pdf reports. The basic concept is that I will launch a console app with arguments, and the helper app will return the file location. Simple.

I am able to do this loop with a shell object placed on the page ahead of time. What I really want to do is create a shell object in code, and use a handler to manage the data available event. I am unable to make this scenario work. I created a desktop demo project that demonstrates my problem, in hope that someone can shed some light on my problem.

The demo project is 32-bit Windows (the console app is compiled for Windows). It is here: . You will notice that the “on page shell” button returns the expected “Hello World” message from the console app, while the “in-code shell” button does nothing at all.

Any insight into my problem is welcome! TIA.

depending on how fancy a PDF file you want to make, you might look at my gPDF module

Thank you Dave. I think that you have a very good product, that I intend to evaluate for another project on a different platform. It so happens however that for this specific project, I am OK with my current PDF solution. I really need this issue with Shell solved however!

Is the shell going out of scope before you get data? Try to make the shell a normal property of the window and don’t declare it in the Action event of the button.

Indeed Beatrix, you are absolutely correct. Many thanks.

I can’t believe that I spent days trying to figure this one out…