I didn't shoot anything this morning until I got to this bench. I've shot this before, not long after we moved here, in color and I liked it. I brought the E-PL7 out of my pocket and turned it on and saw that it was still set up for black and white. This is the second of two shots. This isn't a "filter" it's just the grain of an ISO 3200 16MP PEN CMOS sensor with the noise filter turned off.
Anyway, it's something.
Shot the arches too.
During yesterday's Tinderbox Meetup, I got some help with Captain's Log. I'd been wanting to figure out how to turn off an edict once it's run.
Specifically, it's the edict embedded in the Midwatch entry, which runs an Automator application using the runCommand action code. Every edict in a file will run about once an hour, and for the most part it's lightweight code that isn't going to take much processor time and you should never notice it, unless you're interacting with another app. In my case, it was interacting with Automator/Calendar/AppleScript, and all the edicts were turned on. As time went on, and more Midwatch entries were added, the amount of time consumed began to grow, such that I'd be writing something here in the marmot and Tinderbox would beep and seem to go away for a second, and then return.
I'd added some code to test for the presence of text in the Midwatch entry, and if present, do nothing. But I wasn't sure it was working, because, well, "do nothing." So Mark Bernstein showed me how to add a little diagnostic action code using the "speak" command, and this allowed me to see that the code indeed worked as desired.
We then looked at how to disable the edict once it had run, and there are two ways to do that. Essentially, using the "else" clause, assign the $EdictDisabled attribute a value of true, $EdictDisabled=true, (Never quote your booleans.), or just assign the $Edict attribute an empty string, $Edict="", (a pair of double (straight) quotes).
We did all this on my 14" M3 MBP, because I can share my screen in Zoom on that machine, and something is fouled up on the iMac that remains unresolved and I can't share my screen.
So this morning, I had to remember to open the MBP and quit Tinderbox so I didn't have the files open on two different machines. Looked at the work we did yesterday and refreshed my memory of what we'd done and why. Then I spent a few minutes at aTbRef to learn about Quickstamps. A Quickstamp is an easy way to set the value of only one attribute for a number of selected notes. I selected all the previous days and disabled all their edicts, as all these edicts are intended to run only once.
Normally, for an action that you want to run only once, you'd include it in the OnAdd action, so that when that note is added to a container the OnAdd action is triggered and the code is executed. I can't include an OnAdd action in a Day prototype to perform the runCommand and populate the $Text of the Midwatch entry, because it'd run every time I created any entry in a given day.
What Mark pointed out yesterday was that I could add the runCommand action to the fMakeMidwatch function, which is called as an edict in a Day prototype.
As it is now, fMakeMidwatch just creates the Midwatch note in a new Day. The Day prototype contains the edict to run the function and nothing else. The Midwatch prototype contains the edict with the runCommand to create the $Text of the Midwatch entry. All that could be wrapped up in the function, thus eliminating the need for an edict in the Midwatch note.
Thinking about this some more, I could move the execution of the function from a Day edict, to an OnAdd action in the Month container, since each Day will create a Midwatch entry and when a new Day is created by the Month container, the OnAdd action would run the fMakeMidwatch entry for that day, and the function would execute the runCommand to populate the $Text, thereby eliminating two edicts and the necessity for disabling them.
So, that's what I'm going to do in a minute and we'll see how that works out tomorrow.
It's a pretty nice feeling when you think you're beginning to understand how something works. But I've been wrong about that before too. So no high-fives until tomorrow.
✍️ Reply by email
Originally posted at Nice Marmot 07:49 Monday, 15 April 2024