Quantcast
Channel: VFPX
Viewing all articles
Browse latest Browse all 3798

Updated Wiki: Thor News

$
0
0
SNAGHTML95c8f99d
 

image

 

Tool manager for FoxPro

Thor Forum

Thor Videos

Thor TWEeTs


TWEeT #21: Advanced Features: Plug-Ins for IntellisenseX

#33, 2014-06-04

 

Thor TWEeT #21: Advanced Features: Plug-Ins for IntellisenseX

There are five Plug-Ins that provide the last type of customization available for IntellisenseX.  Even though they may seem quite obscure at first, they can each provide quite powerful enhancements, far beyond what you might first expect.  Some personal examples are provided to illustrate how they can be used (although these examples are certainly not the only way they can be used).

To access them, follow these steps:

  1. Open Tool Launcher
  2. Enter “IntellisenseX” in the filter box
  3. Click on the tool “IntellisenseX – by Dot” in the TreeView on the left.
  4. Click on the Plug-Ins link to open the Plug-Ins Form.

SNAGHTML19201eca_thumb1

 

The Plug-Ins form (when accessed this way) shows only those Plug-Ins that apply to IntellisenseX:

SNAGHTML2451ef0

There is no natural order to these Plug-Ins (there really is no relationship between them), so they are explored in the order in which they appear in the form, which is alphabetical. Note, however, that for some of them their usage has changed over time, so the names are not necessarily clear explanations of what they do.

Each of the plug-ins contain comments that explain (or, at least, should explain) the parameters that are passed in and the form of the result. Thus, the explanations here address the general concepts of their usage.

It can be very helpful to think of these plug-ins as event handlers.  Until you are quite familiar with the use of IntellisenseX, their relevance may be hard to see, just as the relevance of many event handlers for a FoxPro object may be hard to see at first.  Eventually, though, you may come across a situation where IntellisenseX does not provide a dropdown, but you can imagine it would be possible to do so. At that time, search through the list of plug-ins to see which might apply, open it up and dig through the sample code.

You need not be concerned about when a plug-in is called, just as you are not concerned about when an event handler fires. The plug-in will be called when it is appropriate.

“Data Objects” Plug-In

This plug-in allows you to identify an object (or table) referenced in some form of nested usage, such as:

  • This.oCustomers
  • ThisForm.oBusObj
  • ThisForm.oBusObj.oData
  • Thisform.oJob.oCustomers.oData
  • loJob.oData

The plug-in is called when IntellisenseX has been able to resolve part of the name (“Thisform” or “Thisform.oBusObj” e.g.,) into a real object but not the member name (“oData” or “oParts”, e.g.) and is called with the object (in a unique structure – see the comments) and the member name as parameters.  The Plug-In can return the appropriate object or table reference, if appropriate.

Expanding on the previous bullet points:

  • This.oCustomers – if a consistent naming conventions is used for objects (such as “oCustomers” here), the plug-in could take the characters after the “o” and see if there is a business object to handle that name, returning that object.
  • ThisForm.oBusObj – similar to the previous item, but the plug-in could look for an property (“cAlias”, e.g.,) that identifies the table for the business object being referenced.
  • ThisForm.oBusObj.oData – similar to the previous item, but instead of returning the business object being referenced, returns the alias referred to in the property (“cAlias”), causing the drop down to show the fields from that table.
  • Thisform.oJob.oCustomers.oData – the plug-in may be called multiple times to obtain a single dropdown list; in this case, first to resolve “Thisform.oJob”, then “Thisform.oJob.oCustomers”, and finally “Thisform.oJob.oCustomers.oData”. This is transparent to you, however.
  • loJob.oData – can provide the dropdown list of fields from the loJob table – if loJob can already have been resolved into an object. That can be done by the next Plug-In, “IntellisenseX”.

“IntellisenseX” Plug-In

This plug-in allows you to identify an object (or table) based on the entire text that precedes the dot that you entered. That entire text is passed in as a parameter. 

This plug-in is closely related to the “Data Objects” plug-in, and is called in all cases where the “Data Objects” plug-in was unable to return a usable result. The difference between the two is the parameters that are passed in.

But it can also handle getting “loJob” as a parameter (in this case, the “Data Objects” plug-in is not called).  If “loJob” can be resolved into an object by this plug-in, there will be a dropdown list for loJob.

This plug-in is also called by PEM Editor when you are setting the values of properties, allowing you to get dropdown lists for tables of data objects when setting a ControlSource.

“New Object” Plug-In

Use this plug-in when you use a UDF to create objects, instead of NEWOBJECT() or CREATEOBJECT().  In the example below, my personal use of the plug-in allows Intellisense to recognize my use of a UDF named NewSessionObject (which happens to use the same parameters as NEWOBJECT, but this is not necessary).

image

“Open Table” Plug-In

When IntellisenseX encounters a single (non-nested) name before the dot, it checks whether the name corresponds to an existing alias, or (optionally) the name a of table in your SQL Server database, or the name of a file in the path, in the Data Environment or an open DBC, or (optionally) in the MRU list. All of this is handled by the default version of this plug-in.

The plug-in is called with the potential table name as its parameter. In my universe, all table names and the folders they are found in are themselves stored in a table, where the alias is used as a key to the table. These tables are only opened by a single UDF which takes the alias as a parameter. My personal version of this plug-in calls this UDF to open the table.

There are examples of other uses in the comments in the code.

“Spell Field Names” Plug-In

This plug-in has been essentially superseded by the Custom Keyword List, but can be used in cases where the Custom Keyword List is not used, is insufficient, or there are other rules for field names (such as project or customer specific rules).

 

Other IntellisenseX tools

There are a number of other IntellisenseX-related tools that show up in the Tool Launcher when you filter by “IntellisenseX”.  These tools use the same framework developed to give the dropdown lists when you press a dot, but provide other features that are activated differently.  They will be described in the next TWEeT.

 

See also History of all Thor TWEeTs andthe Thor Forum.


Previous headlines

#32, 2014-05-29 TWEeT #20: Quick Start Guide to IntellisenseX

#31, 2014-05-21 TWEeT #19: Deficiencies in IntellisenseX (and how to avoid them) … The Custom Keyword List

#30, 2014-05-10 TWEeT #18: IntellisenseX for Nested Objects

#29, 2014-04-29 TWEeT #17: Using Local Aliases in IntellisenseX

#28, 2014-03-03 TWEeT #16: Custom Keyword List for Field Names

#27, 2014-02-24 TWEeT #15: IntellisenseX and the Alias Dictionary

#26, 2014-02-17 TWEeT #14: IntellisenseX for Objects

#25, 2014-02-10 TWEeT #13: New (hidden) IntellisenseX Feature

#24, 2014-02-03 TWEeT #12: IntellisenseX by Dot or by Hot Key?

#23, 2014-01-27 TWEeT #11: IntellisenseX: Aliases for VFP Tables

#22, 2014-01-20 TWEeT #10: IntellisenseX: Field Names from SQL Server Tables

#21, 2014-01-13 TWEeT #9: Extract to Variable and Extract to Constant

#20, 2014-01-05 TWEeT #8: Creating Properties and Methods (#3)

#19, 2013-12-18 TWEeT #7: Creating Properties and Methods (#2)

#18, 2013-08-26 Thor Version 1.40 released: Thor ToolBar

#17, 2013-06-23 New VFPX Project: Finder

#16, 2013-03-31 New Video: 50 Ways to Run a Thor Tool

#15, 2012-03-05 New Thor Tool: AutoComplete

#14, 2012-01-16 Thor videos available from Thor menu

#13, 2012-01-05 Thor's Tool Launcher: The one tool youmust use

#12, 2012-11-16 Thor menus provide access to Discussion Forums and Change Logs

#11, 2012-11-10 Online FoxPro Users Group (OFUG) created

#10, 2012-10-14 New VFPX Project: FoxcodePlus

#9, 2012-10-06 Easy access to all VFPX home pages

#8, 2012-09-30 IntellisenseX released as a VFPX project

#7, 2012-09-19 All VFPX projects can be downloaded from Thor

#6, 2012-09-16 Use the Thor discussion group

#5, 2012-09-10 IntellisenseX released

#4, 2012-09-09 Data Explorer is now a Thor tool

#3, 2012-09-04 New VFPX Projects: Dynamic Forms & Data Explorer

#2, 2012-08-30 Join the Thor Beta discussion group

#1, 2012-08-25: Introducing Thor News


Thor Version 1.40 released: Thor ToolBar

#18, 2013-08-26

 

Added the Thor ToolBar.  Tools may be added to the Toolbar may using the checkbox shown in the Thor Configuration form,  below (and also available in theTool Launcher.)

SNAGHTMLf389404_thumb8

When you add a tool to the Thor Toolbar, you can select a caption for the tool or select an image to represent it.  In the sample below, abbreviated captions are used.

SNAGHTMLf3b4e2e_thumb1

The toolbar’s size, positioning, and docking, persist from one session to the next. (Truth be told, persisting the docking has been problematic.)


New VFPX Project: Finder

#17, 2013-06-23

 

The new VFPX project Finder is a powerful search tool to find forms and classes. It searches either a project or folder (with sub-folders) for names of files or classes.

Files or classes can be opened by double-clicking and there are numerous other options available from the context menu for rows in the grid.

When Class Search is used, the classes found can be dragged/dropped onto forms or classes being edited.

See the Finder Home Page and watch theFinder introductory video (11:25).

SNAGHTML3cdc777

 


Thor videos available from Thor menu

#14, 2013-01-16

 

There are already a number of videos explaining features of Thor and there are more to come. Follow the link from the Thor menu to the list of all Thor videos.

image


Thor's Tool Launcher: The one tool you must use

#13, 2013-01-05

 

Thor’s Tool Launcher uses a simple screen that allows you to browse through all the Thor tools by keyword, to read their descriptions or visit their home pages, to set their options, and, most importantly, to run them. It also helps you to organize the tools that you use most to make them easily accessible.

Thor suffers from an over-abundance of tools – there are so many that it may seem impossible to find which tools are of interest to you. The Tool Launcher simplifies that search.

Watch  this short video (7:57) to learn all about it.


Thor menus provide access to Discussion Forums and Change Logs

#12, 2012-11-16

 

The Thor menu has been changed to provide access to a number of related Discussion Forums.

These forums are the preferred form of communication about these tools, rather than private emails, or using the Universal Thread, Foxite, or any other on-line forums.

image

 

Change logs for the various tools and components of Thor are now available, as well as a link to the never ending list of Thor ERs.

image


Online FoxPro Users Group (OFUG) created

#11, 2012-11-10

 

A new Online Foxpro User Group is starting up. For more information, join the Google group athttps://groups.google.com/forum/?fromgroups#!forum/ofug.

Meetings will be held the 3rd Tuesday of each month at 8:30 Eastern Standard Time via GotoMeeting.com or equivalent.

Details about how to join the meeting will be published on the group forum (see link above) immediately before the meeting is to start.

We intend to record the meeting and make it available on-line for those unable to attend.

Next Meeting: Tuesday, November 20th, 8:30 PM Eastern Time (0130 UTC Wednesday, November 21)

Presenters:

  • Matt Slay - Dynamic Forms
  • Jim Nelson - PEM Editor and related tools

New VFPX Project: FoxcodePlus

#10, 2012-10-14

 

The new VFPX project FoxcodePlus (Beta 1) is available from Check For Updates.

This project is not related to IntellisenseX, another VFPX project, although both provide Intellisense enhancements. FoxCodePlus provides a wider range of features and includes some of the features provided by IntellisenseX. Although not yet tested, it appears that the two may be used concurrently.

After downloading (which includes both the code and documentation), you can use the Thor menu pad in the system menu to open the folder in which these components are installed:

image


Easy access to all VFPX home pages

#9, 2012-10-06

 

Thor now provides ready access to the home pages for all VFPX projects, available from the Thor menu pad.

image


IntellisenseX released as a VFPX project

#8, 2012-09-30

IntellisenseX has been released as a VFPX project.

IntellisenseX refers to a suite of Thor Tools that provide functionality similar to native Intellisense. These tools display lists of available variable names, field names, or members (properties, events, methods, and objects) while you type code, just like Intellisense. However, they cover those areas that Intellisense forgot (such as the list of field names in a table when editing in a code window) and provide new capabilities, available through customization, such as displaying the list of field names in an SQL table.

Visit the IntellisenseX home page and also watch the Intellisense training videos.

IntellisenseX is available from Check For Updates.


All VFPX projects can be downloaded from Thor

#7, 2012-09-19

The current version of all VFPX projects can now be downloaded directly from Check For Updates.

The projects listed in Check For Updates are listed alphabetically within these five groups:

  1. Projects that you have already downloaded for which there is a more current version. (see #4)
  2. Projects that you have not downloaded which have had updates in the last three months
  3. All other projects that you have not downloaded
  4. Projects that you have already downloaded and which are current
  5. All projects marked as “never update”.  This takes precedence over any of the categories above.

Use the Thor discussion group for comments,
suggestions, bug reports, etc.

#6, 2012-09-16

Use the “Community / Discussions” menu item in the Thor menu pad to send comments, suggestions, bug reports, and so on to the Thor Discussion Group. You are invited to become a member of the group so that you can see what is going on in the land of Thor.

image

Two things of note:

  • You can email discussion questions (with screenshots) directly to:

    foxproThor@googlegroups.com

  • When reporting bugs, please provide as much information as possible, including screenshots. Any information you can provide (such as an image of the debugger, etc.) will be greatly appreciated.

IntellisenseX released

#5, 2012-09-10

IntellisenseX refers to a suite of Thor Tools that provide functionality similar to native Intellisense. These tools display lists of available variable names, field names, or members (properties, events, methods, and objects) while you type code, just like Intellisense. However, they cover those areas that Intellisense forgot (such as the list of field names in a table when editing in a code window) and provide new capabilities, available through customization, such as displaying the list of field names in an SQL table, as shown below. For a full description, see the  IntellisenseX Home Page.

SNAGHTMLf871ea8_thumb1_thumb


Data Explorer is now a Thor tool

#4, 2012-09-09

Data Explorer 3 is now available as a Thor Tool. This means that you can choose to access it by hot key by assigning the hot key in the Thor configuration form.

SNAGHTML1f93281e


New VFPX Projects: Dynamic Forms & Data Explorer

#3, 2012-09-04

Two new VFPX projects have been created in the last few days and are available from Check For Updates:

After downloading, you can use the Thor menu pad in the system menu to open the folder in which these components are installed:

image


Join the Thor Beta discussion group.

#2, 2012-08-30

The Thor Beta discussion group is intended for discussions of features currently under development for Beta versions of Thor, the Thor Repository, and PEM Editor.

All other Thor issues should be directed to the Thor discussion group.

To use the Beta version for Thor, download Thor Repository Beta Updater.Zip and unzip it into this sub-folder of the folder where you have installed Thor:Thor\Tools\Updates\My Updates

Thereafter, you will see a record for "Thor Repository Beta" when you run "Check For Updates".


Introducing Thor News.

#1, 2012-08-25

This is the first installment of the Thor News, which will notify you of changes and updates to Thor. It will also, from time to time, explore some of the more interesting tools found in Thor.

The latest news will be brought to you:

  • each time that you run Check For Updates
  • once a week when you execute RunThor.

You can change these settings in the Thor Configuration form:

SNAGHTML43d568



Viewing all articles
Browse latest Browse all 3798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>