T.R | Title | User | Personal Name | Date | Lines |
---|
837.1 | /PRE="SCRIPT script" | HYTIDE::CREAMER | EARS to you, mate!! | Tue Jun 09 1992 18:33 | 12 |
|
Kevin,
What if the /PRE called a script-script which would be executed
as soon as the cursor landed on the field (after OA$FIELD_NAME
is set) and before the user has the chance to enter data?
It may not be elegant, but it should get the job done... ;')
HTH,
Jack
|
837.2 | Or am I missing something here? | SCOTTC::MARSHALL | Pearl-white, but slightly shop-soiled | Tue Jun 09 1992 18:47 | 19 |
| Hi,
This may seem a bit obvious, but:
;;fieldx;;
/pre="GET 'Field name is: fieldx'"
;;fieldy;;
/pre="GET 'Field name is: fieldy'"
ie: you always know by the physical context of the /PRE what the field name is,
so can't you just use the name literally?
(If the /PRE calls a XOP to do the work, you could always load a symbol with the
field name prior to doing the XOP, etc...)
Scott
|
837.3 | A V3.0 possibility... | CESARE::EIJS | All in 1 Piece | Tue Jun 09 1992 18:54 | 51 |
|
Kevin,
Some 'stupid' questions:
- ALL-IN-1 V2.* or V3.0?
- The field will be accessed by arrow keys only?
- You know the name of the field in front and after?
If in V3.0, the OA$FORM_INFO data set gives you some help in deciding
what the name of the field is:
;;PREV_FIELD;;
/PRE="GET #PREV_FIELD = #POST_FIELD = ''"
/POST="GET #PREV_FIELD = OA$FIELD_NAME"
;;FIELD;;
/PRE='GET #FIELD = #DONE = "" \
GET OA$FUNCTION="FOR OA$FORM_INFO:" OA$FORM_NAME " DO
IFEXIT \\
GET #FIELD_SAV = #FIELD \\
GET #FIELD = .FIELD_NAME \\
.IF #DONE THEN OA$FLD_EXIT \\
IFEXIT \\
.IF #PREV_FIELD NES "" THEN
GET #DONE = 1 \\
.IF #POST_FIELD NES "" THEN
GET #FIELD = #FIELD_SAV \\\\
OA$FLD_EXIT \
OA$FLD_STAY \
.
and then #FIELD contains the name of the field...
;;POST_FIELD;;
/PRE="GET #PREV_FIELD = #POST_FIELD = ''"
/POST="GET #POST_FIELD = OA$FIELD_NAME"
etc.
Now this is a V3.0 hack. I'm sure a simpler solution must be around.
HTH,
Simon
PS You see Andrew, now that we've won the UEFA cup (Ajax Amsterdam) and
a Dutch guy made sure BArcelona won the Europe Cup, I'm getting more
creative all the time ;-) ;-)
|
837.4 | Colisions all the time... | CESARE::EIJS | All in 1 Piece | Tue Jun 09 1992 18:58 | 10 |
|
Happens when your writing notes interactively. Takes some time and
other beat you.
.2 Is the whack on the side of my head. Makes even thinking of a
solution like in .3 superfluous.
Ciao,
Simon
|
837.5 | Little syntax problem | CESARE::EIJS | All in 1 Piece | Tue Jun 09 1992 19:03 | 13 |
|
...and then even forgetting a '"':
> .IF #POST_FIELD NES "" THEN
> GET #FIELD = #FIELD_SAV \\\\
> OA$FLD_EXIT" \
Ciao,
Simon
PS No, no one-man note here, although it might look like
|
837.6 | So there is a problem with OA$FIELD_NAME and /pre? | FAILTE::LAAHS | An accumulation of Celts | Thu Jun 11 1992 11:58 | 11 |
| Thanks for the replies.
They indicate that there is indeed a problem in using OA$FIELD_NAME in
a /PRE.
All the replies are workarounds to my particular problem but it's
unfortunate that I cannot use OA$FIELD_NAME since this would be the
most elegant solution to my particular problem.
Thanks,
Kevin
|