Class Files are .vcp files containing class definitions. If you import a Visual FoxPro .vcx class file, the imported source is saved as a .vcp file.



Q:
When I run the page in web app view it is blank. I have also created a page with a custom section using the code from http://www.lianja.com/doc/index.php/..._Visual_FoxPro and that does not display in the browser either. I have tried to view in tablet app view and that is also blank. Does vfp code only work for desktop ?
A:
Visual FoxPro Custom Sections are supported in the desktop client only.
Non-UI Lianja/VFP code can be used in server-side prgs and rsps




Q:
1. This question is about a conversion of an existing VFP application without rewriting into the Lianja vision.
2. No pages or sections are created; a form is placed on the screen and is filled by processing metadata.
3. The business rules or validation methods for each form are accessed by determining what object is being processed.

The problem i am trying to conquer is that I so far have found no crash proof way of identifying the current object.
I have a set of code I have attached to the form in the keypress method as follows:
When I find the right event i add code to it to tell the prog what the current object is.

I suspect if the grid weren't present then the query to active row would also crash.

Code:
debugout 'CONSO'
debugout grid1.activerow
DEBUGOUT grid1.ActiveColumn
*DEBUGOUT tabindex
*DEBUGOUT this.activecontrol
GROW=grid1.activerow
GCOL= grid1.activeCOLUMN
debugout mcurobj
IF GROW=0 Or GCOL=0
DEBUGOUT 'EXIT CONSO NULL GRID'
*debugout this.baseclass
RETURN
ENDI
NFLD=grid1.column(gcol).controlsource
*DEBUGOUT oldval(grid1.ActiveColumn.controlsource)
DEBUGOUT THIS.NAME
retur
Tabindex, name, activecontrol, baseclass all crash Lianja when they are null or its equivalent. If I could tell that no valid object was in focus,
A:
Look at the is_object() function in the doc
The solution turns out to be simple as many are the correct command is
This.activeccontrol.name



Q:
What happen when I import a DBC from Visual Foxpro? I will have lianja data tables or dbf tables in the app?
Am planing to program for Desktop, Web and Mobile. Which database is the best option for that? Can I use the Lianja regular files or it is best to use the Lianja SQL database?
A:
You will have a lianja Database. after the import. This is the best choice for your apps.
You will be using the data in Lianja.



Q:
Are delegates like the VFP properties or methods?
A:
Delegates are similar to VFP event handling procs but they are scripting language independent.



VT's are like remote views in VFP, but without the hassle.



Q:
if a VFP executable can be run from within Lianja
A:
if you compile your vfp exe as a COM server, you can instantiate it in a desktop application, and in the cloud server. That can allow you to make function/method calls, etc. from your existing exe.



​All topics in [Answers] alphabetically:http://www.lianja.com/community/showthread.php?2717-Answers