[comp.databases] 4th Dimension!

as2t+@andrew.cmu.edu (Andrew Robert Short) (10/25/90)

Hi, I have a few questions about 4th Dimension.  Any help on
any or all of these would be greatly appreciated!  I will read
the bboard, so you don't have to reply to my account directly!

Here goes:

I am running 4th Dimension 2.1, I have only the 2.0 manuals, and
I do not have the compiler.

(1)
 I have an SSN field (actually, it's a variable which later
gets stored in a table as a 9 char string) in an input layout,
and I would like some type of entry filter that makes the
placeholders mandatory.  In other words, I don't want the system
accepting a 1 or 3 digit code, I want the user to be forced to
type in a 9 digit SSN.  Is there any way of doing this through an
entry filter?  Or do I have to write a slow script that snails
its way through the character array then rehighlights the variable?

(2)
I am starting to think of on-line help for my application.  Is having
a bunch of layouts full of text brought up through scrollable windows
a good alternative?  Has anyone thought of any great ways to implement
on-line help?  I'm thinking of having a help index (a scrollable list)
that the user can click on for help on any topic in the list...What
about storing help text in tables?

(3)
I am trying to trap option-click, since I don't want the user to ever
be able to escape to the user environment while running the application.
I have unsuccessfully used ON ERR CALL and ON EVENT CALL, they both do
the exact same thing -- that is, they both bring up the annoying
[abort,continue,trace,edit] debug box with the comment of my event procedure
highlighted!!  I am following the 2.0 manuals exactly, with the 2.1 version
of the software. Has anyone had such a problem?  I would also like to trap
the Enter key so the user can't save accidently during data entry, and trap
the Command-period event so that the user doesn't abruptly cancel data entry.

(4)
Currently, the password must be typed in twice -- that is, the
CHANGE ACCESS screen comes up twice!  I have the command CHANGE
ACCESS as the first command in the startup procedure. In the password
editor, the name of the startup procedure is left blank.  What am I
doing wrong?  Am I overlooking something totally stupid?

(5)
 For a medium-sized application, just what really is the advantage
of getting the 2.1 compiler?  I do know that now, on a Mac II with tons
of memory, my program can be REALLY slow, and on an SE, the program
is so slow that it is utterly impractical. The compiler example shipped
with the package makes it look like you can't live without it.
Will gettting the compiler require any changes in the existing code?


That's it!  Thank you for any help!!

Andrew Short
(412) 621-5625

alex@eniac.seas.upenn.edu (Edmund Davis) (10/26/90)

In article <kb9YKyG00WB5ABclI8@andrew.cmu.edu> as2t+@andrew.cmu.edu (Andrew Robert Short) writes:
>Hi, I have a few questions about 4th Dimension.  Any help on

>and I would like some type of entry filter that makes the
>placeholders mandatory.  In other words, I don't want the system
>accepting a 1 or 3 digit code, I want the user to be forced to
>type in a 9 digit SSN.  Is there any way of doing this through an

from page 153 of the Design manual, i see that any place-holder other than
the # sign (which generates underscores) will force full entry.  ie characters
not typed over are simply part of the entry.

eg !9&9###-##-####  (note you really only need a 7-char field)

>
>(2)
>I am starting to think of on-line help for my application.  Is having

Although everybody seems to hate subfiles, I have found success with them
in the area of a help-system.  Imagine a file called Help with fields
sort num, Major topic, text, and a subfile called topics.  The topics subfile
has sort num, topic, text, and its own subfile called subtopics.  Similarly,
the subtopics subfile has fields sort num, subtopic and text.
You have therefore a 3-level help system (perhaps you only need two levels).
(if the implementation of this structure isn't obvious, send me mail.)
>
>(3)
>I am trying to trap option-click, since I don't want the user to ever

I'm not sure how to trap that, probably not possible. I'll ask ACIUS.

>of the software. Has anyone had such a problem?  I would also like to trap
>the Enter key so the user can't save accidently during data entry, and trap
>the Command-period event so that the user doesn't abruptly cancel data entry.

If you want to block out these commands, use the utility program 4D customizer
to alter or eliminate any of the standard accept/cancel key equivalents...

>
>(4)
>Currently, the password must be typed in twice -- that is, the
>CHANGE ACCESS screen comes up twice!  I have the command CHANGE
>ACCESS as the first command in the startup procedure. In the password
>editor, the name of the startup procedure is left blank.  What am I
>doing wrong?  Am I overlooking something totally stupid?

I am not sure what you are trying to accomplish.  The password system is
automatic and requires no code.  CHANGE ACCESS is to be used only sometime
during database use when you want to allow a different user to use the db
(possibly with different access priveleges...)

>
>(5)
> For a medium-sized application, just what really is the advantage
>of getting the 2.1 compiler?  I do know that now, on a Mac II with tons
>of memory, my program can be REALLY slow, and on an SE, the program
>is so slow that it is utterly impractical. The compiler example shipped
>with the package makes it look like you can't live without it.
>Will gettting the compiler require any changes in the existing code?
>
What I will say here is not personal experience, but I am told that iterative
procedures (ie loops) are enormously accelerated thru compilation.  If you db
used many small scripts each with only a few lines that are mostly built-in
functions than the speed gain will be minimal.

changes: yes fortunately and unfortunately
You will spend a few days altering your database to make it 'compiler-
compatible' but that also means that you will have eliminated design errors
that otherwise wouldn't show up until much later...

Note: I still feel that 4D can be effectively run on the lower macs.  I 
continue to design decent systems for them.  Speed simply becomes a major
concern.  One often trades space for speed...

Well there's my _three_ cents worth.

----
Edmund A. Davis			      Internet:	alex@eniac.seas.upenn.edu
ACIUS Registered Developer (21913)     US Mail:	233-F So. Melville St.
						Philadelphia, PA 19139
					  	(215) 386-3305