Hello! Could someone explain the details of using the Table dialog for RTF text? Is there a possibility to add/delete a row/column above the existing row/column? Currently, I can only increase/decrease the number of rows/columns that are added to the end of the table.
In continuation of my previous message, I noticed that the similar Table dialog is used in Scrivener. However, the latter also provides for a right-button mouse sub-menu āTableā that allows perfroming operations with table rows/columns. Is there any similar functionality availiable for Tinderbox?
The palette on the left is accessible from the Format ⸠Text ⸠Table⦠menu (see menu and palette).
In terms of expectation, TextEdit is a better reference asāIIRCāTinderbox builds off the Apple text frameworks as seen in TextEdit. The features you describe in Scrivener are likely custom built code upon that (or replacing the Apple frameworks entirely.
An unintentional error in assumption is that Tinderbox note text is a word processor. It isnāt, notes have some rich texture (RTF) affordances mainly to support things like highlighting. Simple tables come along for free but arenāt a focus for what are mainly intended as textual notes. Tinderbox works best with small notes not long articles of prose with embedded structures. Thus trying to use Tinderbox as if it were MS Word or Scrivener, Mellel, Ulysses, etc., is bound to cause confusion.
The Tinderbox way to make a table would be to put the data in other notes or attributes and assembled a table via a template (or a poster): by basic design Tinderbox looks to work with lots of small notes. In stating this Iām explicitly not suggesting youāor the appāare āwrongā. Iām simply explaining that these features arenāt āmissingā as they would not have been expected/needed in the first place.
However, if you really need new table features in Tinderbox, please make a feature request by email (tinderbox@eastgate.com), not here, explaining to the developer: what is needed, what problem the new feature solvesāi.e. why the feature is needed by the general Tinderbox user, and any reference examples to help explain what you need. An email puts with all in one place for the developerāwho may not have time/resource now to action the request: the email means a neat package of info that can be returned to later as needed.
HTH
Thank you, Mark. Now I understand. Apple Text frameworks (which are probably used by Tinderbox to represent tables as $Text content) do not provide the ability to insert rows/columns between existing ones.
I suspect the design logic for TextEdit is you can make a basic table if needed. If you need a richer more spreadsheet-like experience Apple youād either use a spreadsheet (Numbers, Excel, etc.), or and office suite (iWork, MSOffice where the word processor can leverage spreadsheet features). As a user, we donāt know that.
FWIW, Scrivener is essentially a Word Processor (WP), but it foundation story is the developer was trying to write a book and found WPs poor for the task so built his own. Scrivener is intended for the writer, not the office worker. That explains the many features an office worker wouldnāt need.
In digging deeper on this Iāve found the same issue raised for TextEdit and DEVONthink. Reorder-able table rows are āextraā code not something in the basic Apple code framework for text, though Iām happy to be wrong.
For now, i.e. in v10.2.0, the best approach is to consider the number of rows before starting and if in doubt add a few extra. Then when done, delete the unused rows at the end. Or, if the issue is getting the order wrong, first write out the column which indicates the correct order and use that to remind you the order to fill in the table rows, then delete that list. Not as easy as the built-in feature in Scrivener but do-ableātoday.
One questions is: what is the purpose of this table? Is it for presentation? Are you analyzing some data that might be interesting to view in a tabular format?
A more idiomatic approach in Tinderbox might be to represent each line of the table as a note, and each column as an attribute. That gives you more flexibility in searching and linking and gives agents more traction.
One brake on āinsert rowsā mid-table is that itās not very hard, in small tables, to achieve the same effect in two operations:
- add rows at the end
- cut from the current row to the last populated row, then paste
Thanks again for your comments and explanations! The question arose when I was trying to create a table in a note with a list of user attributes that I use and explanations for them. It was a quick task that did not require creating separate notes for each attribute. Accordingly, it turned out to be inconvenient that I couldnāt add new rows between rows while trying to complete the list according to the logic of the presentation. I realise that this task can be accomplished very easily by copying the table to Word, restructuring it, and pasting it back in. But, given that I have been trying more and more to use Tinderbox for personal notes lately, this limitation came as a surprise, especially considering my experience with Scrivener. I understand that this is not a big problem and that the main purpose of Tinderbox is not to work with rtf text, but the need to work with tables in text notes arises quite often for me.
A good place to store those explanations is in the user attributeās Description, ā+1 to open the Inspector. Then youāve also easy access to attribute & description via action code, for instance to insert the info into a table via a template you view preview. If youāre not happy reading the preview you could copy the table from the preview and paste into $Text.
A sense here is an assumption a table is needed, because that is how one would do this in a word processor. However, we donāt nee that here. Thatās why the user attribute Inspector has a space for a description.
Why use a table for this at all"
- Price: the net price, qty 1
- Serial: the serial number of the unit
- Mfg: the original manufacturer
Thank you for the explanation. Indeed, in my case, there is a much simpler (and not just one) way to achieve the desired result!
Thank you for pointing that out ā I did indeed miss that feature. At the same time, is it possible to access the description of a specific user attribute using the export code (for example, ^value($UserAttribute)^)? The explanations for atbref state that āthe value is stored in TBX, but it can only be accessed through this inspector.ā
Naughty aTbRef (me!). That used to be true, but as of c. version 9, the attribute() operator exposes the attributeās description. I new baseline is imminent so Iāll update the article User tab for that (as Iām busy migrating content and donāt want to break anything. In the meantimeā¦
Note that system attributes also have (short) descriptions accessible the same way as for user attributes, for example, I just made this quick demo:
and here is that description in the Inspector:
I used a system attribute for speed as Iām busy ATM. Also you can see this label as a tooltip for user/system attributes when you hover the cursor over an attributeās name (left column) in a Displayed Attributes table, like so:
(sorry my screen grab lost the cursor).
The same works in the attributes tab of Get Info. (Iām reminded Iāve yet more aTbref articles to update. Oh dearā¦)
Lastly, to answer the opening question re export code, to insert the description of $MyUserAttribute into export code, use:
^value(attribute("MyUserAttribute")["description"])^
I hope that fills the gap.
Iām abashed that had the note on the User Attribute Inspector been up to date re accessing descriptions this whole thread might have not been necessary.
Wow! This is very unexpected for me, and itās great to learn about this opportunity. I didnāt think that by raising a question that seemed simple at first glance, I would get a completely different solution, which is much more elegant and flexible! Thank you very much!
Thanks, itās why I find it useful to try and bottom out questions from users that seem to have an underlying cause. Glad it was helpful.
Continuing with this topic, I began to explore the capabilities of the attribute() operator in more depth and found this explanation for attribute(attributeNameStr).keys extremely helpful.
After that, I modified the suggested code slightly to suit my needs, applied it to the stamp, and now I have exactly the table I wanted, which I can apply to the $Text attribute of a new note and preview (this is probably close to what @eastgate was talking about). Thanks again!
var:list vKeys;
var:string vOutput;
var:list vAttributes = document["user-attributes"];
// The beginning of the table
vOutput = '<table class="tbx-attrs" border="1" cellspacing="0" cellpadding="4">';
vOutput += '<caption>TBX filename ' + document[name] +
' ⢠Number of user attributes: ' + vAttributes.count + '</caption>';
// Header with fixed columns
vOutput += '<thead><tr><th>Attribute</th><th>lines</th><th>type</th><th>description</th><th>default</th></tr></thead><tbody>';
vAttributes.each(anAttribute){
// Default value ā empty
var:string vLines = "";
var:string vType = "";
var:string vDesc = "";
var:string vDef = "";
// Get all the keys
vKeys = attribute(anAttribute).keys;
vKeys.each(aKey){
if(attribute(anAttribute)[aKey] != "" & aKey != "category"){
if(aKey == "lines"){ vLines = attribute(anAttribute)[aKey]; };
if(aKey == "type"){ vType = attribute(anAttribute)[aKey]; };
if(aKey == "description"){ vDesc = attribute(anAttribute)[aKey]; };
if(aKey == "default"){ vDef = attribute(anAttribute)[aKey]; };
};
};
// Forming a row
vOutput += '<tr>';
vOutput += '<td>' + anAttribute + '</td>';
vOutput += '<td>' + vLines + '</td>';
vOutput += '<td>' + vType + '</td>';
vOutput += '<td>' + vDesc + '</td>';
vOutput += '<td>' + vDef + '</td>';
vOutput += '</tr>';
};
vOutput += '</tbody></table>';
$Text = vOutput;