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
Sorting notes in map view (Read 6823 times)
Fionnbar Lenihan
Full Member
*
Offline



Posts: 18

Sorting notes in map view
Dec 10th, 2007, 6:38pm
 
Easy-peasy in Outline and Explorer view I know but could one arrange things so that the notes in a container are sorted left to right across the screen according to a date attribute?

Thanks

Fionnbar
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Sorting notes in map view
Reply #1 - Dec 11th, 2007, 11:53am
 
Let's sort them by date in their parent container.  Now, the earliest note has $SiblingOrder of 1, the next note has $SiblingOrder of 2, and so forth.  So:

Quote:
Xpos=4*$SiblingOrder;Ypos=0;


might do what you want.  Notice that you don't need to be limited to a line or a list. For example, you could arrange the notes in a circle, using sin() and cos().
Back to top
 
 
WWW   IP Logged
Fionnbar Lenihan
Full Member
*
Offline



Posts: 18

Re: Sorting notes in map view
Reply #2 - Dec 12th, 2007, 12:40pm
 
Thanks for the rapid response Mark.  I fear you have overestimated my intelligence again!

Smiley

I want to sort in map view left --> right (with earlier stuff on the right) by a user defined time attribute called timelinedate

I choose "rename" for the container which holds the notes I want to sort in map view and I put the following in the "rule" box in the ensuing dialog

Xpos=4*$timelinedate;Ypos=0;

Nothing happens.  I update agents manually.  Still no joy.

What did I not get?

Cheers

Fionnbar

Back to top
 
 
  IP Logged
Fionnbar Lenihan
Full Member
*
Offline



Posts: 18

Re: Sorting notes in map view
Reply #3 - Dec 12th, 2007, 1:43pm
 
I meant earlier stuff on the LEFT as is conventional (at least in Western writing systems)

I need more sleep
Smiley

Fionnbar

Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Sorting notes in map view
Reply #4 - Dec 12th, 2007, 3:35pm
 
Rules are self-referring. By putting your equation in the container rule you're setting the location of the container in the map level above your notes of interest.

You could use the container's OnAdd Action instead but then the positioning action only occurs when (new) notes are added.

Instead, make an agent with the query #inside(Container Name). That will match all immediate children of your container - i.e. the map in which you're interested.  Now apply your code Xpos=4*$timelinedate;Ypos=0; as the agent's action.  Thus whenever the agent is run the notes will be (re-)arranged.
Back to top
 
 

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



Posts: 18

Re: Sorting notes in map view
Reply #5 - Dec 13th, 2007, 6:52pm
 
Worked a treat, thank you

Fionnbar
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print