Replies: 2 comments
-
For whatever reason (somebody must have wanted it), the original code had an undocumented 4th argument that is passed to the QUITFN functions when they are applied. That argument is the property list for the stream (the result of various TEXTPROP calls and the properties specified when the stream is created). The current code has just carried that over, never changed.
Interlisp is set up so that there can be a mismatch between the number of arguments in a functions definition and the number of parameters that are passed on a specific call. The arguments without parameters get NIL, the extra arguments are ignored (although the LCOM compiler or dwim may issue a warning).
commonlisp is tighter about this. My bet is that your quitfn is a DEFUN, that that triggers the APPLY* to do more precise signature checking, and that accounts for the error.
Since nothing about this has changed since the early 90s, I don’t know why you would get better behavior in any recent loadup.
… On Jun 7, 2024, at 3:54 AM, Paolo Amoroso ***@***.***> wrote:
In the June 5, 2024 external meeting I demonstrated the latest features of Insphex <https://github.com/pamoroso/insphex>, my hex dump program, and mentioned an unexpected behavior of TEdit.
Insphex adds to the TEdit window a hook to be called when the window is closed via various flows such as clicking the Exit menu option. The hook is the function QUIT-HEX-WINDOW <https://github.com/pamoroso/insphex/blob/65acb2b1b1d2ea2cf7b1a2a3c487345a1e0ecb68/INSPHEX#L166>, which Insphex supplies as the QUITFN property when callingTEDIT <https://github.com/pamoroso/insphex/blob/65acb2b1b1d2ea2cf7b1a2a3c487345a1e0ecb68/INSPHEX#L60>.
According to the TEdit manual <https://drive.google.com/file/d/1qhuq5e1O6MduGkqR8ll9dif2sXHs_Q9E/view?usp=sharing> (page 15 of the PDF) a QUITFN takes 3 arguments but QUIT-HEX-WINDOW worked only when called with 4 (I named the fourth DUMMY as I didn't know what it was for). If QUIT-HEX-WINDOW was called with 3 arguments Insphex broke with an error about an incorrect number of arguments.
I could reproduce the error by loading Insphex and evaluating the Exec command HD INSPHEX.DFASL T where the first argument is an input file such as the compiled program. If I clicked Exit I got that error. However, as of the 5-Jun-2024 02-08-08 build of Medley Online, the issue no longer occurs. Insphex works as expected when terminating the program by clicking Exit, executing TEdit's Quit command, and via the window's Close right-click menu option.
A recent change may have fixed the issue. Thanks @fghalasz <https://github.com/fghalasz> for setting up automated online builds.
—
Reply to this email directly, view it on GitHub <#1754>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQSTUJONPKS6DD7JFWSYFG3ZGGGPXAVCNFSM6AAAAABI6N62T6VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWG44DSOBUGU>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, my I managed to reproduce the error with 3 arguments in the current build, here's the break after clicking |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the June 5, 2024 external meeting I demonstrated the latest features of Insphex, my hex dump program, and mentioned an unexpected behavior of TEdit.
Insphex adds to the TEdit window a hook to be called when the window is closed via various flows such as clicking the
Exit
menu option. The hook is the functionQUIT-HEX-WINDOW
, which Insphex supplies as theQUITFN
property when callingTEDIT
.According to the TEdit manual (page 15 of the PDF) a
QUITFN
takes 3 arguments butQUIT-HEX-WINDOW
worked only when called with 4 (I named the fourthDUMMY
as I didn't know what it was for). IfQUIT-HEX-WINDOW
was called with 3 arguments Insphex broke with an error about an incorrect number of arguments.I could reproduce the error by loading Insphex and evaluating the Exec command
HD INSPHEX.DFASL T
where the first argument is an input file such as the compiled program. If I clickedExit
I got that error. However, as of the5-Jun-2024 02-08-08
build of Medley Online, the issue no longer occurs. Insphex works as expected when terminating the program by clickingExit
, executing TEdit'sQuit
command, and via the window'sClose
right-click menu option.A recent change may have fixed the issue. Thanks @fghalasz for setting up automated online builds.
Beta Was this translation helpful? Give feedback.
All reactions