Getting Intellisense to work in the Web Control Framework

The Web Control Framework is fairly big and there are a lot of properties and methods to keep track of. Using it means making liberal use of the Help File until you remember common members that you frequently access.

Web Connection provides through it autogenerated Page header basic support for Intellisense in most situations. Generated pages include the following definition:

#INCLUDE WCONNECT.H

*** Small Stub Code to execute the generated page
PRIVATE __WEBPAGE
__WEBPAGE = CREATEOBJECT("Test_Page_WCSX")
__WEBPAGE.Run()
RELEASE __WEBPAGE
RETURN

************************************************************************
DEFINE CLASS Test_Page as WWC_WEBPAGE OF WWC_WEBPAGE_FILE
************************************************************************

#IF .F.
   *** This line provides Intellisense: Ensure your path includes this page's location
   LOCAL this as Test_Page_WCSX of test_page.prg
#ENDIF

FUNCTION OnLoad()

this.   && Gets intellisense on the Page class

LOCAL loGrid as wwWebDataGrid
loGrid = this.dgCustomers  
loGrid.  && Gets Intellisense on a control

ENDFUNC

ENDDEFINE

The above works to provide Intellisense in your code as long as the following criteria are met:

  • All classes involved must be in the FoxPro path

This means WebControl.prg (the base class), any possible subclasses you have created and the actual page class must be in in the FoxPro path.

If you're using the Web Connection Add-in and Show FoxPro Code, the Add-in will automatically add paths in the VFP IDE launched to the classes directory and the path of the page that is displayed which means you should get Intellisense automatically.


© West Wind Technologies, 1996-2018 • Updated: 01/27/14
Comment or report problem with topic