silence readonly messages

Craig Tooker craig at cwtsoftware.com
Thu Aug 25 07:40:04 PDT 2011


Top Post Rant

Please issue reply emails only to the list and not back to the 
individual.  No one needs multiple copies in their mailbox.

End rant, see reply below.



On 8/25/2011 10:12, Joe Chasan wrote:
> On Thu, Aug 25, 2011 at 10:01:59AM -0400, Craig Tooker wrote:
>> On 8/25/2011 09:48, Joe Chasan wrote:
>>> when calling clerk on a file with -ro (read-only) flag set,
>>> i have processing @key 1/2/3 etc, which determines which version
>>> of screen 1/2/3 etc, can be viewed based on a user's security setting.
>>> a quick check, then a "switchto" either "1a" or "1b" for example.
>>>
>>> problem is get the read-only message just from the @key - even though
>>> no update or real field setting is done.
>> The @entsel runs unlocked, any @key runs in locked (update) mode.  The
>> trick is to use "goto @key1" from @entsel and at the end of that routine
>> use a "goto @entsel.  That avoids locking the record (going into update
>> mode).
> you mean have @key1 execute stuff in @entsel, instead of @key when
> record is not locked.  i already tried that anyway.
I mean what I said.  In the @entsel processing you must use waitkey to 
manage *all* keyboard interaction.  When one one of the keys is entered 
that you do not want to run with locking, issue a "goto @key(x)" instead 
of a "pushkey (x);end".  The first method avoids locking the record 
during the @key(x) routine (in fact it's not been triggered at all, it's 
just running in @entsel because you used the "goto").  The second method 
gives the keystroke back to filePro and then lets fP trigger the @key(x) 
routine (and normal locking of the record).  You must end a non-locked 
routine (one you used "goto" to enter) with a matching "goto @entsel" 
instead of "end".
>
> in this case that does not help, in debugging one can see that
> @key immediately triggers the message before any processing is executed.
>
> even something like @key1::end: will trigger the message when using -ro
>
> --
> -Joe Chasan-                           Magnatech Business Systems, Inc.
> joe - at - magnatechonline -dot- com   Hicksville, NY - USA
> http://www.MagnatechOnline.com         Tel.(516) 931-4444/Fax.(516) 931-1264


More information about the Filepro-list mailing list