Importing Visual FoxPro Files

From Lianjapedia
Jump to: navigation, search

See Also

Getting Started, HOWTO integrate Lianja and VFP with concurrent data access, Imported Visual FoxPro Files, Importing Visual FoxPro Databases and Tables

Overview

This article explains how to import Visual FoxPro Project, Class and Form files for reuse in your Lianja Apps. Note: the import functionality is available on Windows only. Once imported, the files can also be used in Lianja on Mac and Linux.

NOTE: If you are running Lianja v4.2, please do the following before importing your VFP project or files:

Edit the Library Script File 'vfp_import_xcx.prg' and comment out lines 341 and 342, then save:

//Lianja.showMessage("Beautifying code", 175)
//vfp_beautify(m.cOutputFile)

Importing Visual FoxPro Project Files

Visual FoxPro project files (.pjx files) can be quickly and easily imported to produce source code versions of your project's *.scx (converted to *.scp), *.vcx (converted to *.vcp), *.prg and *.txt files for reuse within a Lianja App.

To import a Visual FoxPro project file, select the Apps Workspace and make sure you have a new App open. You then have two ways to import your project: drag and drop import or the Import VFP project (.pjx)... command.

Drag and Drop Import

Drag and Drop Project



To use drag and drop import:

  • Open the .pjx file location in Windows Explorer
  • Click on the .pjx file and drag it into the Files Explorer in the Sidebar


Import VFP project command

Import Project



To use the Import VFP project (.pjx)... command:

  • Click Additional commands at the bottom of the Files Explorer then Import VFP project (.pjx)....
  • The Select a Visual FoxPro Project dialog will pop up allowing you to search for and select your .pjx file.


Project Import Information

Importing Project



As the project is being imported, informational messages are displayed in the top right of the Apps Workspace.


Console: Project Import Information



Once the import is complete, fuller logging information can be viewed in the Console Workspace.


Importing Individual Visual FoxPro Files

Individual *.scx, *.vcx, *.prg, *.txt and image files can also be dragged and dropped into the File Explorer of an open App and forms and class libraries can be imported using the Import VFP form (.scx)... and Import VFP library (.vcx)... commands. Files are converted to their source code equivalents where required.

Drag and Drop Individual Files

Drag and Drop Individual Files



To use drag and drop import:

  • Open the file location in Windows Explorer
  • Click on the file and drag it into the Files Explorer in the Sidebar. In the case of forms, drag the .scx file; for class libraries, drag the .vcx file.


Import VFP form and library files

Import Individual Files



To use the Import VFP form (.scx)... and Import VFP library (.vcx)... commands:

  • Click Additional commands at the bottom of the Files Explorer then the Import VFP form (.scx)... or Import VFP library (.vcx)... command. The Select a Visual FoxPro Form/Library dialog will pop up allowing you to search for and select your file.


File Import Information

Console: File Import Information



As the file is being imported, informational messages are displayed in the top right of the Apps Workspace and once the import is complete, fuller logging information can be viewed in the Console Workspace.


After Import

After Import



After import, the files will be added into the relevant file type sections of the Files Explorer and can be edited by double-clicking on the filename.


See Imported Visual FoxPro Files for information on using your imported files.