Page 9 of 28
Re: Knoware.no
Posted: Tue Oct 12, 2021 8:02 pm
by pjw
tofro wrote:QPAC2's "Files" is such a candidate that updates the stuffer buffer, even if you only <CTRL>-C through it. But yes, you have that other method, which is perfectly fine.
Im not sure what you mean about Files updating the stuffer buffer by Ctrl+C-ing. Try as I might I cant get the stuffer buffer to change without my deliberately selecting a different file myself - which is exactly what FSEL does too. What's Sauce For The Goose Is Sauce For The Gander. If FSEL is wrong on this, then so is QPAC Files.
Now, if you can point me to some program, working in the background, without user intervention, that could at any moment change the stuffer buffer contents, that would worry me. In fact I would get rid of that program immediately and write to all my QLing friends recommending they do the same! I rest my case.
Re: Knoware.no
Posted: Tue Oct 12, 2021 11:08 pm
by mk79
pjw wrote:Now, if you can point me to some program, working in the background, without user intervention, that could at any moment change the stuffer buffer contents, that would worry me. In fact I would get rid of that program immediately and write to all my QLing friends recommending they do the same! I rest my case.
Well, on my system I sync the stuffer buffer with the scrap and the scrap with the Windows clipboard, so even any Windows program could intervene

But, without kidding, I do see where Tofro is coming from, from a software architect perspective this is a big no-no, but then you do have the alternative. AND at the same time you're completely right, stuffer/clipboard changes are user driven and as the user will not do two things at the same time the method is 100% good enough for the intended purpose. It just leaves a professional uneasy feeling because it's only 99,99% perfect

Re: Knoware.no
Posted: Tue Oct 12, 2021 11:48 pm
by pjw
mk79 wrote:<>
Well, on my system I sync the stuffer buffer with the scrap and the scrap with the Windows clipboard, so even any Windows program could intervene

Thats news to me. On MY system QPC_SYNCSCRAP only updates the Scrap Thing. The stuffer buffer is not involved. I dont see any reason to have it any other way. There are better ways to stuff the Scrap contents into the keyboard queue. (I use a separate hot_keyed program to do that.) If thats an intended future "upgrade" I hope it will be optional as the confusion it could cause could be catastrophic.
mk79 wrote:But, without kidding, I do see where Tofro is coming from, from a software architect perspective this is a big no-no, but then you do have the alternative. AND at the same time you're completely right, stuffer/clipboard changes are user driven and as the user will not do two things at the same time the method is 100% good enough for the intended purpose. It just leaves a professional uneasy feeling because it's only 99,99% perfect

"100% good enough for the intended purpose" is all a programmer hopes for and expects (99.99% of the time), so I'll take that

Re: Knoware.no
Posted: Wed Oct 13, 2021 4:47 pm
by mk79
pjw wrote:mk79 wrote:<>
Well, on my system I sync the stuffer buffer with the scrap and the scrap with the Windows clipboard, so even any Windows program could intervene

Thats news to me. On MY system QPC_SYNCSCRAP only updates the Scrap Thing. The stuffer buffer is not involved. I dont see any reason to have it any other way.
Yes, that is not a general feature but a simple Basic program I execute at boot. This way I can copy something in Windows or QD and just hit Alt+Space to paste it into any application. I like it.
If thats an intended future "upgrade" I hope it will be optional as the confusion it could cause could be catastrophic.
Yeah yeah, calm down. I*ve been using it for 20 years and the world still exists, but this is not a general feature, so don't worry.
Re: Knoware.no
Posted: Wed Oct 13, 2021 6:21 pm
by dilwyn
mk79 wrote:pjw wrote:mk79 wrote:<>
Well, on my system I sync the stuffer buffer with the scrap and the scrap with the Windows clipboard, so even any Windows program could intervene

Thats news to me. On MY system QPC_SYNCSCRAP only updates the Scrap Thing. The stuffer buffer is not involved. I dont see any reason to have it any other way.
Yes, that is not a general feature but a simple Basic program I execute at boot. This way I can copy something in Windows or QD and just hit Alt+Space to paste it into any application. I like it.
I use something similar, a little SBASIC job running which looks at SCRAP_CNT to see if QPC_SYNCSCRAP has modified the scrap, then if it has, HOT_STUFF the scrap into the stuffer buffer, so that I can ALT-SPACE it into a program which does not know how to use the scrap. Makes it dead easy to copy text from Windoze into QL programs.
Re: Knoware.no
Posted: Wed Oct 13, 2021 7:55 pm
by pjw
mk79 wrote:<>
pjw wrote:If thats an intended future "upgrade" I hope it will be optional as the confusion it could cause could be catastrophic.
Yeah yeah, calm down. I*ve been using it for 20 years and the world still exists, but this is not a general feature, so don't worry.
Whew!

Re: Knoware.no
Posted: Wed Oct 13, 2021 8:09 pm
by pjw
dilwyn wrote:<>
I use something similar, a little SBASIC job running which looks at SCRAP_CNT to see if QPC_SYNCSCRAP has modified the scrap, then if it has, HOT_STUFF the scrap into the stuffer buffer, so that I can ALT-SPACE it into a program which does not know how to use the scrap. Makes it dead easy to copy text from Windoze into QL programs.
I dont understand why you need to monitor the scrap. Surely you know when youve used it and when you need it? This is mine:
Code: Select all
10 REMark $$asmb=dev4_Q_stf_STUFF_BIN,0,10
11 REMark $$chan=1
12 REMark $$stak=4096
13 :
14 EXT_PROC 'JVA_SGET'
15 :
16 IF MACHINE = 20: JVA_SGET
17 STUFF -5, SCRAP_GET$
18 QUIT
I put in on ALT+v to stuff up to 4k of text from scrap (either COPIED/CUT from Windows, or from some "QL" job that knows about the Scrap Thing) into the current keyboard queue (SBASIC, an editor, some program, etc)
STUFF is a command to stuff a string into the keyboard queue. No stuffer buffer involvement at all! Possibly something like
Code: Select all
17 SUSJB -1, 5: TYPE_IN SCRAP_GET$
could be used instead. I dont know. Otherwise the whole thing is, of course, available as a compiled job from Knoware.no. Works in QPC2 and SMSQmulator provided Scrap is properly set up.
Re: Knoware.no
Posted: Wed Oct 13, 2021 9:47 pm
by mk79
pjw wrote:I dont understand why you need to monitor the scrap. Surely you know when youve used it and when you need it? This is mine:
You know what, that's cool, too. I might try it sometime, thanks.
Cheers, Marcel
Re: Knoware.no
Posted: Wed Oct 13, 2021 10:41 pm
by pjw
mk79 wrote:pjw wrote:I dont understand why you need to monitor the scrap. Surely you know when youve used it and when you need it? This is mine:
You know what, that's cool, too. I might try it sometime, thanks.<>
Thanks
Everyone with a QL (except for the most hardened masochists, of course!) should have QPC2 (or SMSQmulator) - if for no other reason than to easily communicate between their Queer Lump and the modern world. And everyone with one of those emulators should have something like
Stuff_obj to make that communication as hassle free as possible. Therefore:
Re: Knoware.no
Posted: Wed Oct 13, 2021 11:43 pm
by dilwyn
pjw wrote:dilwyn wrote:<>
I use something similar, a little SBASIC job running which looks at SCRAP_CNT to see if QPC_SYNCSCRAP has modified the scrap, then if it has, HOT_STUFF the scrap into the stuffer buffer, so that I can ALT-SPACE it into a program which does not know how to use the scrap. Makes it dead easy to copy text from Windoze into QL programs.
I dont understand why you need to monitor the scrap. Surely you know when youve used it and when you need it? This is mine:
Code: Select all
10 REMark $$asmb=dev4_Q_stf_STUFF_BIN,0,10
11 REMark $$chan=1
12 REMark $$stak=4096
13 :
14 EXT_PROC 'JVA_SGET'
15 :
16 IF MACHINE = 20: JVA_SGET
17 STUFF -5, SCRAP_GET$
18 QUIT
I put in on ALT+v to stuff up to 4k of text from scrap (either COPIED/CUT from Windows, or from some "QL" job that knows about the Scrap Thing) into the current keyboard queue (SBASIC, an editor, some program, etc)
STUFF is a command to stuff a string into the keyboard queue. No stuffer buffer involvement at all! Possibly something like
Code: Select all
17 SUSJB -1, 5: TYPE_IN SCRAP_GET$
could be used instead. I dont know. Otherwise the whole thing is, of course, available as a compiled job from Knoware.no. Works in QPC2 and SMSQmulator provided Scrap is properly set up.
Neat, although what is JVA_SGET? Is it a SMSQmulator specific Java command?