Skip to main content
news

Re: spreadsheet ergonomics

Snit
SubjectRe: spreadsheet ergonomics
FromSnit
Date04/03/2017 19:53 (04/03/2017 10:53)
Message-ID<D507DA2D.9C70F%usenet@gallopinginsanity.com>
Client
Newsgroupscomp.os.linux.advocacy
Followsowl
Followupsowl (1h & 44m) > Snit

On 4/2/17, 9:12 PM, in article z9b003gaew.hy@rooftop.invalid, "owl" <owl@rooftop.invalid>wrote:

...

Snit
Can you even go from table to table and modify them without starting and stopping scripts?

owl
Yes. You can click the menu on the xterm and uncheck "Allow SendEvents" when you need to edit the sheet. Then turn them back on when you're done.

Snit
But you do not consider this to be a kludgy work-around?

owl
No, that's setting it back to default mode, which has "Allow SendEvents" turned off.

Snit
I mean turning it on and off just to work with tables.

owl
You don't have to turn it on at all. That's just to have the data in one table update automatically from changes in another table. If you don't need that, the just move your mouse to the target table and type "@" or enter some data into any cell. The external data will then be automatically calculated.

But you cannot have BOTH editing of tables and auto-updating. And to go back and forth you have to change settings. This is what I am talking about when I note it is kludgy.

Snit
I mean, really, tables should just have the data flow. For older spreadsheets, like back in the Apple IIe days, you had to say update -- but now it just happens.

owl
It does update automatically, if you're *in* that sheet.

But only in that table, right?

And remember, this is something that you said is not even possible with Numbers -- updating a sheet with data from a completely separate file.

Well, this whole thing is a work around to try to emulate what Numbers does easily... have multiple tables all on one sheet (hmmm, what if we added doing what Excel and Calc can do, in addition to Numbers, and having different sheets as well?)

This turning on and off is because it's xterm. It is left of by default for security reasons. It cannot be programmatically be turned on. I showed last year hacking the xterm source code to allow for SendEvents to be turned on by default. Not all terminals need this. I just like the flexibility that xterm gives you in other areas so that's what I use. Mate-terminal for instance allows SendEvents by default, so that could be used. I just tried it, and it works fine for updating the sheet.

Cool you can do it ... but you still deny this is a kludgy way of getting what you get for "free" with Numbers, right?

Snit
If you goof and make a circle it tells you immediately (does yours even do that).

owl
Huh? What do you mean by "a circle"?

Shown in the video: circular references. Cell A = Cell B, Cell B = Cell A (or, as I do it in the video, 3 different cells in a circle). In the real world this is often with much more complex formulas, but the idea is the same. And it is often not just on different tables but different sheets (I show it just one on sheet with three different tables).

Snit
<https://youtu.be/wiRBQDhanC0>

Will show other info on other errors. You can see the results of that on the shared copy... no added work from me.

I will say I tried it online and while you can enter formulas you cannot do it with point and click with kinda sucks. That makes it MUCH easier to do.

You also cannot play embedded videos. OK, sure, that is an odd thing to do with a spreadsheet but they do play on the desktop version.

owl
I might be able do that, depending on the video player.

On the desktop it works fine... even allowing you to rotate the video as it is playing.

<https://youtu.be/lJG3p_wqFUo>

Not sure this is of great value for a spreadsheet, but you can set it based on scripts to start and stop and do that based on spreadsheet calculations. Still, I have never seen a real-world example of this being needed. It is included, I suspect, based on the shared code-base with Keynote (the presentation program where such IS of value) and Pages (where it is at least more likely to be of value). Could be someone would want one file with different sheets and each one having a video, so I suppose it could be useful in Numbers... though not really using it for its primary purpose.

Oh, and on the online one things do not work as well with the video. Here:

<http://youtu.be/C-X5arFQv9s> ----- Playing and editing movies is coming soon. -----

So they are getting there... and I can see why this is not a top priority. Still, it works in the desktop program so I am happy to see they are bringing it to the online version.

At the same link in case that has been lost in the thread:

<https://www.icloud.com/numbers/0m6a5IKo-pJFgG8dY32KU-f-A#Owl2> ...

I'll put something together.

Snit
Also, with yours, will I need to give it special permissions?

owl
You will need to make it executable:

chmod 755 thescript

Then run it in a terminal with

./thescript

Kill it with Ctrl-C, which I trap, and it will give you a prompt to save the changes and rebuild the file. Everything will then be cleaned up and you will be left with just the one file, now with the changes remembered .

The code is at the bottom of this post.

It only presents two windows, main and otherin1. Hit ctrl-left-click on the xterm window and check Allow SendEvents. Saving is done with "P".

When you're done, hit "q" on each window, then Ctrl-C in the terminal where it was started, which will now be scrolling with error messages because xdotool cannot find the windows that you destroyed. It will then present you with the option to save the changes you may have made. Hitting "y" will save rebuild the script with a new tarball enclosed that holds the changes. It will then clean up all the files and the directory, leaving you with just the script once again.

Again, cool you can do this... but compare those directions with mine:

Click on the link and you will see it all. Feel free to edit the data or the tables in any way you want... I am sure you can because it is all pretty obvious. All, or at least most, of the options are very easily discoverable. Only exception I can think of off hand is having to hold option (alt) to rotate objects directly.

Snit
If so, well, fine to do in a VM but I would not do it on a system I cared about. Heck, look at your attempt to rename an open file... yes, *I* knew it was going to lead to disaster but most people would have no clue and there are lots of things you could add -- on purpose or not -- which I would not know would lead to disaster.

owl
LOL

Think of it this way, if you were sent a file by someone and did not really know what it did, would YOU be willing to change its permissions and run it?

I suspect not... at least not anywhere other than in a safe environment where if it wiped out the machine (or VM) it would not matter to you.

Snit
...

Right... all sorts of scripting and working with multiple files. That is what I am talking about.

owl
You have a primitive view of what scripting can do.

Snit
Could be... but how do you think that is relevant? Keep in mind I am talking about how these things are done -- focusing on the tool itself (the spreadsheet) or focusing on all sorts of external things such as scripts and working with multiple files, etc.

owl
The user needn't notice that it's multiple files.

Snit
Even the user making it?

owl
Picture this as the application that the user runs to make the file. In this case it's just operating on one that's already built, but the principal is the same.

And if the user wants another table or to edit things? It again goes back to having a computer as a single-device tool or a general-purpose tool.

Do not get me wrong, with what you are doing for folks who are willing to focus a whole lot on the tool they can reasonably easily switch from what single task (or fairly limited set of tasks) the computer is doing to another. But do you see where this is not how most people work? And, again, NOT saying you are wrong to work that way.

Snit
If so that is very different than what I am picturing. Even for the end user I think they likely would if you did not have embedded xterms in other windows and the like. Which, sure, you can do. Maybe we found a reason for it ... to get around limitations of sc. :)

owl
Let me know when Numbers can handle a similar task of linking separate files with automatic updates.

It has the tables in one file... remember, that is what got you started on this... pushing a work around for what one can get for "free" with Numbers.

-------------------- begin thescript -------------------- #!/bin/bash

trap cleanup SIGINT

repackage () { echo "repackaging..." csplit thescript /^################SPLIT###################/1 {*} cp xx00 top cp xx02 bottom rm adir.tar.gz tar cf adir.tar adir gzip adir.tar uuencode adir.tar.gz adir.tar.gz >mid echo "################SPLIT###################" >>mid cp top tmpscript echo "uudecode <<'EOF'" >>tmpscript grep -v SPLIT mid >>tmpscript echo "EOF" >>tmpscript echo "################SPLIT###################" >>tmpscript cat bottom >>tmpscript cp tmpscript thescript }

cleanup () { killall -9 xdotool echo echo echo "**** would be doing repackaging of saved files here ****" echo echo -n "repackage saved data? [y/n]: " read answer if [ "${answer}" = "y" ];then repackage fi echo echo "**** cleaning up ****" echo echo rm top rm mid rm bottom rm update rm -rf adir rm adir.tar.gz rm tmpscript rm xx00 rm xx01 rm xx02 }

################SPLIT################### uudecode <<'EOF'

-- Personal attacks from those who troll show their own insecurity. They cannot use reason to show the message to be wrong so they try to feel somehow superior by attacking the messenger.

They cling to their attacks and ignore the message time and time again.

<https://youtu.be/H4NW-Cqh308>

owl (1h & 44m) > Snit