Knoware.no

Anything QL Software or Programming Related.
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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.


Per
dont be happy. worry
- ?
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Knoware.no

Post 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 :-P 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 :D


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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 :-P
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 :D
"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 ;)


Per
dont be happy. worry
- ?
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Knoware.no

Post 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 :-P
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.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Knoware.no

Post 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 :-P
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.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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! ;)


Per
dont be happy. worry
- ?
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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.


Per
dont be happy. worry
- ?
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Knoware.no

Post 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


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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:
StuffScrap06.zip
Stuff Scrap
(2.78 KiB) Downloaded 60 times


Per
dont be happy. worry
- ?
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Knoware.no

Post 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?


Post Reply