|
I'm doing my first subfile with SFLFOLD/SFLDROP since probably ten years ago. I remember the SFLFOLD/SFLDROP a real PITA back then, and it hasn't gotten any better now. The problem that I can't seem to easily get past is that I can't get the FOLD or the DROP to "stick". I've got a 2-line subfile record. The default is to show just the first line ("dropped"). The user presses F7 to switch between DROP and FOLD. As long as I'm scrolling within the subfile, I'm fine. But as soon as I hit a function key, or scroll past the top or bottom of the subfile (i.e., control returns to program and program EXFMTs the control record), it reverts back to DROP. The workaround I've devised seems to be a real kludge: Display file: A 24 SFLFOLD(CF24) A N24 SFLDROP(CF24) RPG controls Fold/Drop: c When FunctionKey = F07 c If *in24 c Eval *in24 = *Off c Else c Eval *in24 = *On c EndIf Basically, F7 is strictly used to switch the value of *IN24, which controls SFLFOLD/SFLDROP. F24 isn't described to the user, although there's nothing that keeps him or her from using it. But if they do, the subfile reverts back to DROP upon the next EXFMT. I'm fairly sure it has to do with the fact that all defined function keys are set off (except the one pressed by the user) upon the EXFMT input. SFLFOLD/SFLDROP requires a valid CAnn or CFnn key, so there's no way to prevent a user from inadvertantly using it. I tried to no-op it, but it didn't work: A 24N24 CF24 Is it supposed to be this hard? Please advise. TIA, GA __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.