Page 3 of 4

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 14:09
by admin
Does PF "delete+" exist already as file before this code runs?

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 14:19
by eil
yeap, it was created long ago.

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 14:41
by admin
Confirmed.

OK, looks like the whole thing is harder than I thought. The current PF architecture is not built on this throw-away idea. Sorry, ATM I have no time to further dive into this. It needs far deeper thinking.

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 14:49
by eil
sad to hear, but oh well, will wait for better times.
btw, [named] wouldn't work with current architecture too?

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 15:16
by admin
So, that means the "Explicit Save Only" is worthless now and can be removed, right?

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 15:26
by eil
let me do some experiments till end of day to check everything.

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 18:03
by eil
soo, results are quite interesting, feels like PF interface button and scripting paperfolder() are working "separately".

"Explicit Save Only" ticked(On) in both situiations.
Exp1.
- I open new tab,
- open empty pre-created paperfolder,
- drop items from other tab or even paste from clipboard,
- they appear( but only till i switch to other tab).
= main observation - paperfolder file is not modified, no saved data to file or changed dates.

Exp2.
- I try to open same pre-created empty paperfolder via scripting,
- specifically use [mode=r] that stands for "Return current contents of Paper Folder."(as i understand it's pure read, no modification meant),

Code: Select all

  paperfolder("delete+", , "r"); copyto , "$checkTags"; 
- then i "emulate copy" to paste items from variable to opened paperfolder,
- they appear same only till i switch to other tab,
= but what's more - paperfolder file stays empty, but gets modified(changes dates).

Apparently paperfolder() Always modifies file, even if it ought to only read it with "r" mode(feels like a bug). Plus "Explicit Save Only" does work as expected when used via interface button - paperfolder Open doesn't modify file and even if smth new added it is not saved.

So please keep "Explicit Save Only", it's useful at least to have no-autosave when using paperolders via interface.
Paperfolder() will definitely need your attention when you'll have time, smth works wrong there for sure. And when you'll have time, maybe Paper Folders architecture could be modified for them to become smth More :roll: , but sadly no "Temporary Parer Folders" for now.

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 18:28
by jupe
Your example use of paperfolder() has the params in the wrong order, therefore it would be understandable you get unexpected results.

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 18:55
by eil
jupe wrote: 09 Mar 2021 18:28 Your example use of paperfolder() has the params in the wrong order, therefore it would be understandable you get unexpected results.
you're right, comma was missing. yet now i know that there is no way to simply open paper folder with paperfolder() and not modify file in some way = with proper commas it just erased my important paperfolder that had list of items, though i truly expected "r" to be for only reading, no adding or erasing. :mrgreen:

Code: Select all

  paperfolder("delete+", , ,"r");

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 19:07
by jupe
I think you are misunderstanding how to use paperfolder(), with the "r" param you need to assign it to a variable to be useful (or embed it in another cmd), eg. $paper = paperfolder("delete+", , ,"r"); if you just want to open a paperfolder with no editing you can do it like this: paperfolder("delete+", , , "l");

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 19:13
by admin
It was a rainy, nasty day so I played with it a bit. Might have found a way to reduce disk access even more. Check out next beta...

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 22:18
by eil
admin wrote: 09 Mar 2021 19:13 Might have found a way to reduce disk access even more.
can't really check if it's less access but nterface part of "Explicit" still works fine.
while scripting part behaves strange, but already closer to desired way(!). wanted to add video but forum doesn't allow i don't know easy uploader../
here's code i used for experiments:

Code: Select all

  //paperfolder(, , , "oe1");
  $a = <selitems |>;
  tab("new");
  paperfolder("Sel", "$a", "|", "al");
"Explicit Copy Only" ticked/On. pre-created empty paperfolders Sel, Sel2.
- select 2 items, run script
- it works! tab appears with selected items, paperfolder file is not modified(and of course when tab is switched tab gets empty, expected)
- run script again
- doesn't work, simply opens similar tab, no paperfolders present
- changed in script Sel > Sel2 just to check if it do anything
- same nothing, only creates similar tab
- changed in script Sel2 > Sel3(which doesn't exist)
- run script, it asks for creation of new paperfolder and creates tab
- tab is blank, no selected items there, yet what's more interesting no new Sel3.txt created(kinda cool, close to what "temporary PF" could be!)
- changed Sel3 > Sel, again checking if it matters, nope
- selected one more item along with 2 selected during all these experiments
- it works! tab created, items there, paperfolder not modified
- run again, doesn't work, similar tab created
- selected one more additional item, run script
- works again!!
BUT
- if i select other items(not those to be selected before), it works, same once, but it Adds them(!) = shows those that worked once before, and these "newly selected" together. if "autosave" would be working, it's logical that mode "al" would lead to collecting/adding, but as nothing ought to be saved and files aren't changed.

Results:
= it works each time new items are selected/added to selection, and doesn't work if same items
= if XY gets closed and started again, same selected items will work but only once

Don, may it happen there is some variable in this process that malfunctions? it feels like there is some, that collects items for such "no save situations", but it's bugged and it doesn't allow "old selected", plus doesn't clear itself after operation.

Re: "Virtual" Paper Folder.

Posted: 09 Mar 2021 22:22
by eil
jupe wrote: 09 Mar 2021 19:07 I think you are misunderstanding how to use paperfolder(), with the "r" param you need to assign it to a variable to be useful (or embed it in another cmd), eg. $paper = paperfolder("delete+", , ,"r"); if you just want to open a paperfolder with no editing you can do it like this: paperfolder("delete+", , , "l");
thanks for corrections, that helped me in further experiments.

Re: "Virtual" Paper Folder.

Posted: 10 Mar 2021 10:59
by admin
eil wrote: 09 Mar 2021 22:18 Don, may it happen there is some variable in this process that malfunctions? it feels like there is some, that collects items for such "no save situations", but it's bugged and it doesn't allow "old selected", plus doesn't clear itself after operation.
Yes, that was part of the problem. It's more tricky than I thought, but I cannot let loose now... check next beta... :twisted:

Re: "Virtual" Paper Folder.

Posted: 10 Mar 2021 15:17
by eil
Damn, not at home right now but promise to check and test everything today.