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

Updated Wiki: Thor TWEeT 18

$
0
0

Thor TWEeT #18: IntellisenseX for Nested Objects

IntellisenseX provides dropdown lists for nested objects, as shown in this example:

image

The key to making this work is to define a property that can used by IntellisenseX to determine the dropdown list. 

The name of the property is the name of the nested property (“oParts” in the example above) with “_Def” added as a suffix.

The value of the property is basically the same as used for Local Aliases (seeUsing Local Aliases in IntellisenseX) or for Global Aliases (seethe Alias Dictionary). It can be any one of a number of things, referring to either tables or objects.

  • A table, cursor, or view name
  • The full or relative path name to a table
  • The name of an SQL table
  • A reference to class from a class library; thus,  “{class, classlibrary}“ See note below for Forms and VCX classes.
  • A reference to an object; thus,  “Thisform.oParts
  • An executable expression that returns an object or the name of an table, cursor, or view. This executable must start with an “=”; thus, something like “= MyGetObject(‘Parts’)“. See note below for Forms and VCX classes.

An unexpected problem arises when when using the Property Sheet or PEM Editor to set the values for the two items notes above – values inside curly braces are converted to dates, and values beginning with an = sign are saved as expressions. To avoid these issues, prefix the values with && – thus:

  • “&& {class, classlibrary}
  • “&& = MyGetObject(‘Parts’)
<!--EndFragment-->

Nested objects may take any of a number of forms, including:

  • ThisForm.oBusObj
  • This.oData
  • This.oPartsList.oData
  • This.oBusObj.oPartsList.oData

Nested objects may appear in forms, VCX-based classes, and PRG-based classes and there can be multiple levels of nesting.

This TWEeT has addressed Aliases that apply to an entire form or class (both VCX and PRG-based).  Earlier TWEeTs have addressedLocal Aliases andthe Alias Dictionary addressed global aliases

An upcoming TWEet will describe plug-ins that be used to handle cases that these features do not.

See also History of all Thor TWEeTs andthe Thor Forum.


Viewing all articles
Browse latest Browse all 3798

Trending Articles



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