Finding a prototype with an agent

I have very irritating copies of prototypes lost in my tbx project. They are cluttering up my list so I want to find them and get rid of them.


I watched Steve Zeroli’s excellent video and I have a better idea of how the agent works, but something is missing in my understanding.

^^^

What happened

This is a question that I asked Mark. He does not understand that I have multiple listings of the prototype name “Water” and “Phlegmatic” I want to erase them and get rid of them. I can’t find them.

Here is what happens again.

The agent seems to work once. Then when I change the name, it no longer works.

Was $IsPrototype & $Name==“Water” That worked.

Now is
$IsPrototype & $Name==“Phlegmatic” That does not work in map view.


That is nothing appears in the map view inside the agent box. One difference between my first successful attempt and the second unsuccessful attempt is there are many boxes name “Phlegmatic” that I want to get rid of. There is only one box named “Water”. Undecided

Hi, welcome to the new forum. You should now be able to upload screen grabs (button #7 in those above the editing box for posts).

Make an agent with the query $IsPrototype==true. That will make an alias for all current prototype in your doc. That should bowl out if you’re looking for an actual or presumed prototype. I think it best to answer this question before trying anything else,

$IsPrototype==true got me some files that I put up as image files. I don’t suppose there helpful, but I unchecked all the prototype check boxes on those files. I ran the agent again and it brought up the same files without the prototype being checked. This did nothing to change the list of prototypes.

I only want two of those prototypes in that list. I am figuring out that too many prototypes are not helpful. But that’s another topic that I want to discuss with you. For now, how do I get rid of these unwanted prototypes on the list. Maybe they are not true prototypes.

I’d guess that in experimenting you’ve made copies of some of your prototype without realising. Fear not.

The reason un-ticking the ‘Prototype’ setting’ on alias in the agent doesn’t work is that it turns out the setting is ‘intrinsic’ (i.e. an alias and the original can have their own discrete values for the same attribute). Thus changing the alias’s $IsPrototype had no effect on the original and it is the latter that the query is matching. So that’s why the seeming failure occurs. But we can work around this.

First, use Outline view for the rest of this task (i.e. not Map). Forget why, it’s just easier to see what’s where. To change view type, use the main menu-bar’s ‘View’ menu. Now, using your earlier agent querying $IsPrototype (or re-make it if deleted), select the first of the ‘Phlegmatic’ items, and right-click (Ctrl+click if old-school Mac user, 2-finger-click for track-pad users)). In the pop-up menu, which will be something like:

Select ‘Show Original in New Tab’. It’s greyed out above but won’t be in your case. That opens a new tab in your document showing the location (also in Outline view) of the alias in the agent. If it’s not supposed to be prototype or not even a note at all (e.g. unintentional copy) you can either use the Properties Inspector’s Prototype tab to un-tick an unintended prototype or simply delete the note if not wanted. Make a mental note of where in the doc you are why/how you might have made the mistake which caused this.

Close this new tab and switch back to the original tab with your agent. Use menu File → Update Agents Now. If it hasn’t already, you should have one less alias. Repeat the task above until you have only the prototypes you require.

Thank you Mark. Your instructions were crystal clear, especially the photographs were helpful. The query $IsPrototype==true brought up notes that I was able to correct at the source using your instructions.

The problem that remains is the notes named Plegmatic are not being brought up by the above query. So, I am getting multiple listings of Phlegmatic.

How can I get rid of those at the source?

Best,
Ellen

I think the problem is you’ve multiple copies of the same prototype and with the same name (not illegal but not recommended for reasons now apparent) and this is confusing the agent query as it tends to de-dupe it’s matches. So although you’ve 5 prototypes named “Phlegmatic”, the query only lists 1 match (as the other 4 as regarded as duplicates). We need a different tack. (Again use Outline so you can see children, descendants, etc., as map view only shows you a single container). Here’s one prototype copied 3 times:

All are prototypes - but separate prototypes as changing the colour of one doesn’t affect the others. So the same name for each really is confusing agents. I can see all 4 if I try to apply prototypes:

Our saviour here is Find. Click in the view (left) pane of your document window and press Cmd+F, a search bar like below appears. Click on the ‘Text’ button (leftmost in the search bar) and it deselects. this tell Find we only want to match note names. We type ‘Phlegmatic’ in the box as shown:

Now use the Return key and a Find result pop-over opens. Click onto the frame of the pop-over and drag it so it becomes a stand-alone window:

Double click on each item in the find list in turn and the outline should expand to show and highlight that item. If your outline is not at root level (i.e shows a breadcrumb bar in the view pane), clicking on find results will show the selected item and alter the scope of the view - you will see the contents of the breadcrumb bar change. Either way, you can review the different matching items. I would:

  • Review each one once. Decide which is the ‘real’ prototype and make a note of where that lives.
  • Re-visit the un-wanted prototypes and use the Inspector to un-tick them as prototypes and—importantly—give each a new unique name (and not something like “Phlegmatic copy 1” or you’ll soon be back in the same confusion).
  • Close the Find result window and click the ‘done’ button on the Find bar to close it.

You should now have only one copy of the “Phlegmatic” prototype.

Without implying any censure, the above is a good example of why it’s a very good idea to try out new features you don’t yet understand in a new document and only add them to your real work once you’re confident. That way, if you mess up, you can just trash the test file and start over. If you need to use ‘real’ data, make a copy of you work file and name it something different; do this before you start working in it so you don’t experiment in your main work file. As with a new file if you mess up you can delete the file and start over without affecting your actual work and the hours of effort is represents.

So I have two best practices designed to avoid this sort of prototype duplication (which I’ve committed many times myself):

  • I keep all prototypes in a container near the end of outlines
  • I tend to name prototypes in plural form as a naming convention
1 Like

I’d commend those observations and have expanded on them in this new thread.

Today was probably the fifth time I went through the procedure that you suggested. I found all of the duplicates of the prototype. This took about 1/4 an hour because I have hundred and eight instances to look at. Each time I find a duplicate, I have to start the process over again because when I unchecked the prototype box, I am returned to the top of my list and I have no idea where I started in this list since visually I can only see a part of it.

More important, I need to figure out how not to repeat this mistake.

This is what I think is causing me to create duplicates. I discovered that if you put ornaments in the box of a prototype, that ornament will appear each time you create a duplicate of that prototype. This is fine, but I’m probably copying the ornaments from the duplicate prototype.

To avoid this problem I hope?? I made a separate box where I’m storing these ornaments.

I really liked my previous set up because instead of starting with a blank page, I started with a basic structure that I’m using for my entire analysis. Maybe I can do this with something like stamps instead. I really hope stamps are less dangerous.

I’ll try doing experiments on trial copies of the project. I tend to do more work on the trial than I should and then later I don’t know how to transfer it. I guess I just have to set up some ground rules.

108 duplicates - how did you get from 4 to 108 without noticing? This method of duplication has to be called by the user, it’s not an automated process. It certainly took me much more than 15 minutes of my personal spare time to try any figure out the cause of and fix to your previous instances of this problem (duplicate prototypes). However, I only have limited free time for my volunteer role here.

My honest advice is to throw away your - or at least not use - that file for further work as you’ll be building on sand; you need to start over on proper foundation. Make a new file and add in the bits from the old file that aren’t broken. Then, throw away or archive the file to stop yourself wanting to look at it again (as the latter is time wasted). The experience does reinforce my point about not experimenting massively in your real work files. Also if you do something that has an unexpected result, use undo rather then let the detritus of failed experiments build up as after a while one tends to forget what’s rubbish and what isn’y

Don’t overlook Time Machine. If you’ve suddenly realised that in the last few hours you managed to make lots of stuff you know can’t fix, consider rolling back a few hours in Time Machine and using that older version to replace the messy current one. In you case, I’d suggest replacing the current file with the old rather than the option of keeping both so you don’t have lots of broken stuff sitting around and potentially being re-used by mistake.

I discovered that if you put ornaments in the box

I have no idea what an ‘ornament’ is. In order that we help you, please can you explain in terms of Tinderbox features, or post a picture illustrating what an ‘ornament’ is. There are lots of things an ‘ornament’ might be. An adornment? A picture adornment? The viewport of a container? A badge? … It’s just not clear.

I tend to do more work on the trial than I should and then later I don’t know how to transfer it.

This is a useful observation as you’ve identified one unforced error that’s holding you up. So, in tests try to remember what you need to achieve: to understand a technique so you can use it over elsewhere, not just to fix your next task with no understanding of the underlying process.