PDA

View Full Version : Simple start - prg starts form



Jens
2012-10-29, 06:57
Lets start with a very, very simple example.
I created a project with a prg and a form. The only code in the prg is "do form ...". In the modal form there is only a button with "release thisform" in the click methode.
When I import this into a new lianja app and change the path in the code "do form ..." I can run the prg in the console. The form pops up and it can be closed by clicking on the button.
So far so good.

But what do I have to do, to let this run as a lianja app?
Is the VFP-Code only seen as a repository and I have to build a page with a vfp section with a container to copy an paste the vfp-code in there?
Or is there another way available or planed to run that code?

lianjasupport
2012-10-29, 07:02
http://www.lianja.com/community/showthread.php?735-Running-Visual-FoxPro-script-files-from-the-command-line

barrymavin
2012-10-29, 07:24
Jens, If you take a look at the roadmap (http://www.lianja.com/resources/roadmap) you will see that in Beta10 we have added this functionality:



New "Custom UI Library" and "Custom UI Class" section attributes to embed UI classes from imported .scx and .vcx files into a custom section (which can occupy a full page by setting the "Stretch Last Section" page attribute).


So what you would do is remove the form and embed the container that is in the form into a custom section.

Thats how you bring forms over into the Lianja architecture.

Jens
2012-10-29, 09:23
@barraymarvin: I am realy looking forward to the Beta10. I will test it then.
@lianjasupport: I tried that, but I got the following error:
*** Lianja runtime error (11). Filename was expected
do form
Called from prgramm -vfptest_start.dbo at line 2

The code in vfptest_start.prg is:
set default to c:\lianja\apps\a-vfp-prg-scr
do form vfptest.scp

The properties of the desktop shortcut are filled with:
Target: "C:\Program Files\Lianja\bin\lianja.exe" C:\Lianja\apps\a-vfp-prg-scr\vfptest_start.prg
Start in: "C:\Program Files\Lianja\bin"

lazyfox
2012-10-29, 09:48
So what you would do is remove the form and embed the container that is in the form into a custom section.
Thats how you bring forms over into the Lianja architecture.

Currently too much work to look deeper into this issue, but In the OOP version of the vcx/scx transporter a property/switch could be integrated,
which would specify if such a normal port should happen, the form as such should the written out as a importable container -
if there are oodles of controls added to the form directly and not to an an enclosing container.

The OOP version should live on LianjaX, so that further enhancements for each specific can be added faster.

lianjasupport
2012-10-29, 10:05
It may be possible to handle this internally and host a form in a custom section without needing anything like that. We can take a look at that scenario e.g when the command attribute for a custom section is DO FORM myform. It already takes care of this when BROWSE is specified.

lianjasupport
2012-10-29, 10:11
This is the thread discussing how to use BROWSE in a custom section.
http://www.lianja.com/community/showthread.php?180-Custom-sections-can-now-use-VFP-style-BROWSE&p=435#post435

lianjasupport
2012-10-29, 10:13
This is fixed in beta10.

mtocompusas
2012-11-20, 22:15
Buenas noches soy nuevo. En Lianja....Pero quiero aprender todo lo que esta plataforma me puede brindar. Soy programador en Visual foxpro...Por donde me aconsejan empezar....!GRACIAS!. Estoy en Colombia.

lianjasupport
2012-11-20, 23:17
Usted debe comenzar por la ejecución del "lianjademo" de la aplicación y ver cómo todas las páginas y secciones se organizan. Todo el código fuente está ahí para que pueda leerlo. Si usted tiene alguna pregunta, entonces éste es el lugar correcto para preguntar.