Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Off The Wall: Feature Ideas >> Create on-remove event
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1306866276

Message started by Scott Fullerton on May 31st, 2011, 2:24pm

Title: Create on-remove event
Post by Scott Fullerton on May 31st, 2011, 2:24pm

This would correspond to the on-add event.  It would trigger an action whenever an item was removed from a container or adornment.  This feature would make attribute clean-up a lot easier.

Title: Re: Create on-remove event
Post by Mark Bernstein on May 31st, 2011, 2:40pm

What sort of attribute cleanup are you doing?

Title: Re: Create on-remove event
Post by Scott Fullerton on May 31st, 2011, 2:55pm

So I'm using a map for team brainstorming, during which the team groups like notes together.  In fact as I showed you during a tech support conversation, the notes are grouped on four overlapping adornments forming a 4-way venn diagram: Community, leadership, service, accountability.   A set attribute is updated when a note is placed over any of the four adornments.  As an example, a note might be placed in an area bounded by three of the adornments thus giving its attribute the value of {Community, Leadership, Service}.   If I slide that note over so that it's still within Community and Leadership adornments but not in Service, the attribute should read {Community, Leadership}.  It occurred to me that an on-remove event would make setting that up falling-off-a-log simple.

Title: Re: Create on-remove event
Post by Paul Walters on May 31st, 2011, 4:15pm

I've sometimes thought that an on-remove event such as Scott's suggestion would be helpful.  

When I do maps with set-making adornments such as what Scott is doing, I usually create a second set of clean-up adornments that do the opposite (e.g., remove something from a set or list) of my primary adornments (those that add something to a set or list).  Having an event handle that task could be useful.  I suspect there's a lot of delicate computation involved, however.

Title: Re: Create on-remove event
Post by Johnnie Wilcox - mistersquid on Jun 2nd, 2011, 10:55am

Thirded.

Title: Re: Create on-remove event
Post by Mark Anderson on Jun 2nd, 2011, 11:02am

I assume this would be an $OnRemove which would act if a note is manually dragged or tab-ed out of a container or moved via a $Container action call.

Begs the question what happens when a item not longer meets an agent query, would it's alias potentially get an 'on remove' action (if configured) before being discarded?

Former seems clear cut. The latter less so.

Title: Re: Create on-remove event
Post by Paul Walters on Jun 2nd, 2011, 12:18pm

Mark Anderson wrote:


Quote:
Begs the question what happens when a item not longer meets an agent query, would it's alias potentially get an 'on remove' action (if configured) before being discarded?


I'm missing something - but aren't aliases already removed automatically from agents (assuming Update Agents Automatically is true, or the agent was manually updated)?  Virtually the same result as on-remove?

Title: Re: Create on-remove event
Post by Mark Anderson on Jun 2nd, 2011, 12:37pm

Yes, but the thread is positing a 'on remove' action. I was musing on the implications such as the edge case of an agent equivalent. Although agents have and $OnAdd attribute (all objects have all attributes), it's not used - though $AgentAction is the logical opposite. Whatever, I don't think an on remove for agent function is simple and as such probably not desirable.

OK, edge case for normal container. I drag in an alias which fires the $OnAdd acting alias/original.  I then delete [sic] the alias; no OnRemove fires. However, I can see some people intuiting that it would (should!). If I delete an original, it's gone so there's nothing to act on. But but deleting an alias, the originals still there and might ned to reflect the alias 'leaving' the other container.

Title: Re: Create on-remove event
Post by Scott Fullerton on Jun 2nd, 2011, 1:11pm

Interesting question: should deleting an alias be construed as removing it? If so, the event fires with respect to the original; if not, it doesn't.
Dang! I knew there was going to be a catch.  My particular sense is that deleting an alias is not the same thing as removing it.   Here's why.  Putting an alias in an adornment is an explicit act. It's symmetrical counterpart is to explicitly take it out of the adornment.  Deleting an alias, on the other hand, is not an explicit reference to the container.  It is is an act that has bearing only on the alias itself and therefore has no bearing on the note for which it stands.   So, it doesn't make sense to me that in it's last fleeting moments of life, the thing should change the state of its namesake.

But you all have thought about these things a lot more than I have.

Title: Re: Create on-remove event
Post by Scott Fullerton on Jun 4th, 2011, 9:41am

Here's another edge case having to do only with primary notes -- no agents.  Notes are all at the same outline level.  In map view they are given attribute values through an OnAdd event in an adornment.  Then in outline view some of those notes are demoted to become subordinate to one of the others (which may or may not be in the adornment).  

Should that trigger an OnRemove?

Title: Re: Create on-remove event
Post by Johnnie Wilcox - mistersquid on Jun 4th, 2011, 1:16pm

Excuse me in advance (thanks) for not thinking the following proposals completely through. They may even be examples of what won’t work!


  • Deleting an alias does not trigger change to original.
  • $OnRemove inactive for Agents.
  • Agents possess $AgentOnRemove, the agential counterpart of $OnRemove inactive for non-Agent notes.
  • A container’s $OnRemove/$AgentOnRemove triggers only when notes cease to be descendants of that container.
  • $OnRemove/$AgentOnRemove propagate upwards for each parent container to document root.

Title: Attributes in Aliases (related to OnRemove)
Post by minty on Mar 12th, 2013, 6:07pm

I've also wished I had this in my current use case - which uses Adornment 'OnAdd' actions to assign Attributes.

A bit of a kludgey work around has been to create a 'attribute removing stamp' to reset attributes.  Selecting all notes and stamping them, and then giving them a 'nudge' in the map reapplies the attribute data according to the adornments they are touching.  

I was thinking this could be done with a 'rule' instead of an 'on Add' with an agent that could be defined to reset attribute data for all notes not touching an adornment.

Brings me to a second point, and where I'm stuck.  I'm trying to find commonalities within two hieararchial terminologies.  One way to do these was to create aliases of one whole terminology hierarchy, and arrange them within the second hiearchy using the map view to help arrange the concepts (and using the adornments to add the attributes).  Using aliases preserves the original hierarchy.

I've revised the adornments (they represent an evolving content model) a number of times during this process.

I'm having trouble getting rid of old attributes from aliases (either using the stamp, OR manually deleting them), despite the fact that when I look at the 'original' note, the attribute data is cleared (after manually clearing it).

Any ideas as to what would lead to behaviour like this an how to fix it?
_________________
UPDATE: Restarting Tinderbox seems to have resolved alias / attribute thing.  Apologies.  Comments re: On Add / On remove (or even a way of 'reapplying' OnAdd after a stamp resets attributes) would be welcomed!  Thanks.

Title: Re: Create on-remove event
Post by Mark Anderson on Mar 13th, 2013, 7:28am

See this thread for discussion of your reset problem. I've stated a new thread as the follow up is not relevant to this thread. No censure implied - I'm just trying to make it easier for others coming to the subject later on.  :)

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.