Project in Drag (1 Viewer)

Status
Not open for further replies.

ChrisO

Registered User.
Local time
Today, 20:26
Joined
Apr 30, 2003
Messages
3,202
A Project in Drag.

This is a demonstration of how to drag and drop a floor layout at runtime.
The demonstration has a maximum of 500 objects to use; it could be pushed to around 700.
This particular demo uses approx. 438 objects.
Right click an object for its configuration, delete or copy.


The demo is in Access 2003 (2000 file format).

Tested with:-
Version..............: Access 2003.
Regional settings.: English, French, German and Portuguese.
Error handling…...: None.
References……..…: None.


Version Info:

V4.0: 2012-07-07

Functional additions:
The ability to toggle snap to grid has been added to each object. This allows for more precise placement if so desired. Only important for labels in this project but who knows what might be required in other projects?

Global error handling has been added:
It has two Global constants…
1. conHandleErrors determines if global error handling is turned on. (As posted, defaulted to off.) Best to write and test most code with error handling turned off.

2. conCloseOnError determines if a global error should cause a close of the project. (As posted, defaulted to off.) Seldom is this discussed but, by nature, global errors are unpredictable else they would have been fixed. So the programmer is faced with the problem of how they intend to handle something they could not predict. Since the data in the database is almost always the most expensive part it would seem appropriate to cause a closure if the error was unpredictable. So the conCloseOnError flag has been added for runtime but defaults to off for development.

Abstraction:
Table names, primary keys, foreign keys, collection keys and some table field names are now set as public constants. The aim is to abstract those names and refer to them via the constant names.

So, for example:
Within the application, ‘tblProjects’ is referred to as conParentTableName and,
similarly, ‘tblObjects’ is referred to as conChildTableName.
If you wish to change the name of the table ‘tblProjects’or the name of the table ‘tblObjects’ then do so and also change the ‘value’ of the public constant conParentTableName or conChildTableName to match the change. No other changes should need be made in the application.

As written, bound and unbound Forms, and Field names in those Forms, will comply.
The Report is not concerned with changes made because it is passed a valid collection through OpenArgs where that collection has already been checked by the calling Form. That is a somewhat complex way of saying; the Report will not be called from an invalid Form. Queries are handled in VBA and so also comply.

More comments, on just what has and has not been abstracted, are available in module mdlPublic.

V3.0: 2012-06-21
A Report has been added.

V2.0: 2012-06-18
A default project if all projects are deleted.
A facility to copy an entire displayed project to use as a template.
And sundry other adjustments.

V1.0: 2012-06-13
ObjectName, in tblObjects, has been changed to type Long.
(The object name is now derived from Const conObjectPrefix & ObjectName.)

Object 'Bring to Front' has been added to frmObjectProperties.
(Mainly to bring labels above all else.)



If you have any questions, please ask them in the appropriate forum.

Regards,
Chris.
 

Attachments

  • Image.PNG
    Image.PNG
    55.1 KB · Views: 3,746
  • DragFloorPlan_V4.zip
    179.9 KB · Views: 1,786
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom