Create Table as adornment?

Is there a way to quickly create a table as adornment ? Currently as I understand rows and columns Lines have to be created manually one by one .

A table of what? Tables are currently content based on descendant contents, which adornments don’t have.

The adornment grid is designed to help segment items placed atop the adornment.

If you need visible tables in a map, it seems allowing a normal non-container note to populate a table might be a way forward. How to define the content is an issue.

1 Like

Hi Mark,

I do would like to have table visible in the map view .

  • Currently the plan is to manually drag and drop the content
  • I’m trying to create a meal planner for myself , so the table here would be the month calendar .

If I understand correctly you’ll have an adornment big enough to have 28-31 notes on it and a visible table as well. If you want the notes on the current map, this is much more easily done with an agent that finds those daily notes and constructs a table from its child aliases. You only need to run the agent once a month.

It might be useful to see a screen-grab or specimen file of what you are doing. the starting idea has the fell of something already achievable.

(Note, I’m simply trying to clarify the issue, it is for anyone who wants such a feature to make an actual feature request. :smiley: )

  • PART I of running agents to find the meals to be cooked is done. I’ve created a prototype with tocook(boolean) which I will simply check for the month.
  • Please find my (manual) mockup below. Although currently the process of table creation and note updation is all manual
  • Also how do I put the date here?
  • I will definitely make this a feature request.

@pmaheshwari this is an interesting thought experiment.

TBX - L Build Calendar.tbx (473.1 KB)

Using adornments and stamps, I was able to build a 2021 calendar in about 30 minutes. I could see the application of on adds and container action code to move notes around and put them into their respective months.

It would be fun to play around with this idea with you to see what we can come up with.

Take a look at my date stamp. I believe a combination of what you’ve done with your prototype and my calendar modeling we should be able to figure some thing out that is really cool!

Food + tech, what’s not to like :smiley:

I’m not sure this is a table display, so much as an adornment grid. That’s not a counter-argument but a nuance for your feature request. Really what you are asking for is a calendrical adornment grid creator (the scope might vary, e.g. day-of-week cols and day-date row, or months/years, etc.

I say this because it is more of a grid of adornments than a table and perhaps that is the approach. IOW, define the row and column number (i.e derived from scope, e.g. weekdays, day-dates, months, etc.) and whether rows or columns are on top—i.e. the front-to-back ‘z’ axis order.

Viewed in this wider context, an adornment-grid configurator might be a neat tool as I can see it might help those doing course/syllabus panning, as well as more satisfying meal planning. :slight_smile:

Where to you want the date to show? If in the cell created by the grid-of-adornments [sic] then that could currently only be done with a note which is transparent except for the $Name and placed in each ‘cell’. But returning to my wider point above, it might be something a configurator could do and maybe also ‘lock’ so as to essentially be part of the view background.

$DisplayExpression and $DisplayName aren’t intrinsic, but an if($IsAlias==false){… wrapper to a Display Expression might let you add the data to the meal items based on their underlying adornment(s).

Anyway, food for thought—so to speak. :slight_smile:

Yes precisely where I thought the date should be. I’ve created a feature request for @eastgate to consider in his long list of things to do.

Thanks for this. It’s a different way of looking at the calendars idea. I will definitely need help understanding this.

  • I’ve understood your stamps formulae, they are used for the naming of the smart adornments , but how?
  • How were you able to create so many adornment like this for each month ?
  • Is the grid calendar like structure something you did manually or aligned ?

This was my plan for V2 once I figure the grid, and use it for few weeks. Ideally i should be able to export in text format, so I can plan the ingredient shopping accordingly.

AND YES NOTHING BETTER THAN TECH AND FOOD

1 Like

Correct, I’m using them for naming the adornments. This would easily work in your week view as well. Probably easier to explain live tomorrow.

I did it manually, but once I figure out the flow and the stamp it was simple. Built out the entire year in about 20 mins. There is most certainly a repeatable process here. The balance of leveraging what Tinderbox does well with manual intervention where automation is really not needed and simply unnecessary overhead. I see where you’re going with the week view, makes total sense. I almost did that too, but I wanted to see if the date stamp strategy could easily scale, and it does. :slight_smile:

1 Like

HI,
@satikusala, I figured using your example and some tweaking how to create custom size adornment and apply stamps to have everything of perfect size.

  • Is there a way to automate the distance between two adornments consistently ? I did try using sibling order as a formula but that didn’t hold.

You can regulate the gap (G) between adornments (or notes) A and B with

$Xpos("B") = $Xpos("A") + $Width("A") + G

and of course the same for vertical gaps with $Ypos.

HTH.

1 Like

Thanks for the reply David. If I may extend my question , I’ve series of adornment , say 8 in a row, how do I put the gap formula between them ?

Ps: I checked Previous sibling , seems to be Boolean only.

Ok, the way I’d do it is this assuming that each has the same $width = 8 and $Gap = 2. Therefore the Xpos of each new adornment is a multiple of 10 (e.g. A = 0, B = 10, C = 20 etc).

So, give each adornment a consecutive number from 0 to the number of adornments - 1 ($MyNumber("A") = 0, $MyNumber("B") = 1 etc) and you can place each with the rule:

$Xpos = $Xpos("A") + ($MyNumber * ($Width + $Gap))

Obviously, plug your dimensions in (in the screenshot I’ve not bothered with an attribute for $Gap, and I’ve used a stamp instead of a $Rule, but it’s the same principle).

Note – there are probably more elegant ways of doing, but this it the way I’d do it.

I’m not sure where you checked, but this is incorrect. There is no Previous sibling as such but there is a prevSibling designator (previousSibling also works) that references the previous item by $SiblingOrder). It can be used either as a reference:

$MyNumber = $MyNumber(prevSibling);

or as a boolean test:

if(prevSibling){...

BTW, for this particular purpose, I’m not sure I’d use SiblingOrder, because it changes when you change the outline, which may have odd consequences if you’re calculating position, wouldn’t it?

Next, you need to understand $OutlineOrder & $SiblingOrder as they relate to maps. Adornments can’r bee seen in any other view, so you will need to use Get Info or the adornment’s Displayed Attributes to find out their sibling order. Once you have that use bring forward/sent back controls so your row of adornments are in ascending sibling order.

Then your action code can use a method like:

if($IsAdornment(previousSibling)==true){
   $Xpos = $Xpos(previousSibling) + $Width(previousSibling) + $Gap("map-config");
};

As you will see form the previous suggested reading, all adornments list after all notes in a give map. thus the first adornment is not the first sibling. But for the first adornment its previous sibling will not be an adornment; thus the ‘if’ text above.

Why $Gap("map-config")? By storing the gap value in a single note (here a note ‘map-config’) you don’t need to hard-code the gap everywhere. Change it one in $Gap for ‘map-config’ and all your adornments will use it.

Waring, this method will work for one row of adornments. If you have >1 row, the first item of row #2 will have a previous adornment sibling and go to the wrong place. So for each adornment you will need to set a row number. Here I’ll call it $AdornmentRow. Now:

if($IsAdornment(previousSibling)==true){
   if ($AdornmentRow == $AdornmentRow(previousSibling)){
      $Xpos = $Xpos(previousSibling) + $Width(previousSibling) + $Gap("map-config");
   }else{
      ...add code to use the $Xpos for first column, etc...
   }
};

Now you’ll need to figure the same for the $Ypos, but you have all the necessary above.

I strongly suggest you do this in a stamp. You don’t want this code running all the time. Use the code to lay out the grid than lock the adornments to the map ($Lock) and possibly $ReadOnly so you don’t accidentally move the adornments by mistake. Obviously undo the latter ‘locks’ if you want to revise the grid.

Not in the way you imply unless you’re hard-coding a precise $SiblingOrder value. When you’ve read up on order in maps (notes and adornments order separately) you’ll see that adding/removing note items will change the $SiblingOrder value of any given adornment but it wont affect the relative sibling order within the maps adornments.

Fair enough… I wasn’t sure about siblingorder, hence the question. You solution is more elegant than my quick and dirty effort, and probably worth it you’re going to do this sort of thing a lot.

Thanks.