Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Create on-remove event (Read 11625 times)
Scott Fullerton
Full Member
*
Offline



Posts: 11

Create on-remove event
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.
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Create on-remove event
Reply #1 - May 31st, 2011, 2:40pm
 
What sort of attribute cleanup are you doing?
Back to top
 
 
WWW   IP Logged
Scott Fullerton
Full Member
*
Offline



Posts: 11

Re: Create on-remove event
Reply #2 - 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.
Back to top
 
 
  IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: Create on-remove event
Reply #3 - 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.
Back to top
 
 
  IP Logged
Johnnie Wilcox - mistersquid
Full Member
*
Offline



Posts: 84
San Francisco, CA
Re: Create on-remove event
Reply #4 - Jun 2nd, 2011, 10:55am
 
Thirded.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Create on-remove event
Reply #5 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: Create on-remove event
Reply #6 - 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?
Back to top
 
« Last Edit: Jun 2nd, 2011, 12:19pm by Paul Walters »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Create on-remove event
Reply #7 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Scott Fullerton
Full Member
*
Offline



Posts: 11

Re: Create on-remove event
Reply #8 - 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.
Back to top
 
« Last Edit: Jun 2nd, 2011, 2:52pm by Scott Fullerton »  
  IP Logged
Scott Fullerton
Full Member
*
Offline



Posts: 11

Re: Create on-remove event
Reply #9 - 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?
Back to top
 
 
  IP Logged
Johnnie Wilcox - mistersquid
Full Member
*
Offline



Posts: 84
San Francisco, CA
Re: Create on-remove event
Reply #10 - 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.
Back to top
 
 
  IP Logged
minty
Full Member
*
Offline



Posts: 3

Attributes in Aliases (related to OnRemove)
Reply #11 - 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.
Back to top
 
« Last Edit: Mar 12th, 2013, 6:35pm by minty »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Create on-remove event
Reply #12 - 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.  Smiley
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print