More specific question on @SK

Jeff Harrison jeffaharrison at yahoo.com
Sat Aug 13 20:57:12 PDT 2011



----- Original Message -----
> From: Jay Ashworth <jra at baylink.com>
> To: filepro-list at lists.celestial.com
> Cc: 
> Sent: Saturday, August 13, 2011 10:43 PM
> Subject: Re: More specific question on @SK
> 
> ----- Original Message -----
>>  From: "Jeff Harrison" <jeffaharrison at yahoo.com>
> 
>>  > Well, if the doco is correct, and @SK *is set by the WLF processing 
> code*
>>  > (as the doco seems to indicate), then line 1 would be false, and 
> you'd only
>>  > get it once, but from the WLF, not from SAVE itself, no?
>> 
>>  Sorry, I came to this thread late - I don't know what you mean by 
> "@sk
>>  is set by the wlf processing code", but yes, line 1 would be false
>>  because of the user would typically press enter at the first message
>>  box.
> 
> What I mean is what it *says* here:
> 
> https://www.fptech.com/Products/Docs/fpmanhtm/references/system_maintained_fields/_sk.htm
> 
> """
> "@sk" is used with when-processing. When-processing fills this field 
> with the 
> special key-label of the key last pressed.
> 
> Browse lookups will also pass SAVE, BRKY and ENTR to @sk if users press any of 
> these 3 keys while the highlighted bar is visible.
> """
> 
> You seem to be suggesting, Jeff, that the McGuffin is that *mesgbox* itself
> sets @SK, in the middle of the execution of line 1.  If so, that's a)
> undocumented, and b) really, really dumb: the spec for MSGBOX says that
> the key you hit to exit it goes into @BK, so unless that's a typo, I would
> not expect it to set @SK as well, and nothing documents it to.
> 
> And c) what happens while line 1 is executing shouldn't affect whether it 
> runs anyway, right?
> 
> Cheers,
> -- jra

Yes, msgbox seems to set the @sk.  Undocumented?  Perhaps.  I'll take your word for that.  Dumb?  I don't think it is so dumb.  I would expect that @sk would have the last special key that was pressed during data input commands.  That seems intuitive to me.  Logically, if a value goes into @bk it does not exclude the possibility that it also goes into @sk.  

I agree that the help documentation leaves much unsaid regarding @sk

Regarding your c),  Yes and No.  Remember that line 1 gets reached twice.  What happens on line 1 the first time will effect what happens the second time.

Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport


More information about the Filepro-list mailing list