YAM - Yet Another Mover
This is a mover/selecter class for VFE.
It is 3 parts:
Code part - takes care of moving things around. iMove class, most of the code.
abstract UI - some way to display the list(s), and some buttons to call the methods in the code part. This is broken into a bunch of grids and buttons which are used to build a mover and a multiselector class. a little bit of code here and there.
concreate UI - just drop on a PO and set props - no code needed.
The intersection BO is setup as a ChildBO of the Form's main BO.
To use, drop on a PO and set these 6 props:
Source and Target BO class name/lib:
Forign Key feild names in Target table:
In DBCX-E, blank out the grid caption of lSelected field and the keys. (This keeps VFE from adding it to the grid.)
Checkbox's don't check (read only?)
VFE grid builder doesn't know how to get field list from my BO loader.
Drag And Drop disables Double Click.
Tables and views are left open in an unknown datasession. - may not be destroying BO's correctly.
Split into cMove.vcx and iMove. Buttons are pretty ugly, so they should be easy to override in an iLilb way. (this could get ugly...)
add support for sequence. a numeric field that is used to order the lists, and the ability to move/drag items up/down the list, which will reorder the numbers.
This can also be used to maintain an intersect table with a different UI: list of valid choices, and a check by the selected ones. I am calling this a MultiSelector
One grid bound to the Source BO. The Target is still used to store the data, but the lSelected column of the Source shows what has been selected.
So the lSelected field in the Source is used for the UI, but the intersect table is still used to store the data.
Here is a sample app (source) that demos it: http://dev.personnelware.com/carl/pub/CarColors.zip (300K)
There are 2 intersect tables, both are child of CARS. There is no relation between the 2. (One might think that it was a parent, child, grandchild structure. it isn't.) Here is a picture of the database: http://dev.personnelware.com/carl/temp/CarThings.gif
The idea is: For each model of car, what colors does it come in and what size engine can you get it with.
Contributors: Carl Karsten
Category Visual FoxExpress
( Topic last updated: 2007.03.06 06:40:52 PM )