Can you email me a sample to try?
Email sent.
ā> Script Debugger 7.0.12 (7A112)
ā> Mac OS 10.11.6 (15G22010)
Modify table | highlighted rows
Can I confirm that row highlights do not change when the table is sorted? Hence it is the row (e.g. row 24) that is highlighted, rather than the contents. When the contents of row 24 change on sorting, row 24 is still highlighted.
If this is the case, is there any way to determine the new position of any sorted rows so highlighting could follow the content to its new location so highlighting is persistent? I am presuming as the table is modal, if possible this would be after the table is closed.
Thanks
If you click on a header to sort, any selection is lost. Itās simple enough to test this yourself.
Thanks for the confirmation, Shane.
Yes, I had first tested before posting. As a first time user of the library, I have a complex table with an accessory view. I was just verifying if my observations were correct behaviour and that I had not, for example, missed some event reporting/technique that facilitated persistent highlighting after sorting.
Cheers,
If it were to maintain the selection, it would be the contents of the row(s), not the indexes. And that raises issues with what to do if, for example, consecutive rows are no longer consecutive.
Understood.
I just wanted to check whether the yellow highlighting was applied to the data (like a marker pen), so the data remained highlighted whatever happened to the dialog view (e.g. column sorted, rows added or deleted). I now understand that this parameter works like tinting, fixed to a particular place (row) in the window.
I was hoping to use highlighting as a way to show relationships between various data rows, according to selection criteria in a choice list. That was working OK, using a dynamically built row numbers variable for the highlighted rows option re-building the dialog. However, in testing it became clear this solution could fail (due to the ātintingā characteristic of the highlighting option).
So Plan B is display the rows which match the specified relationship in a new dialog. I may use a separate stay-open applet with an idle handler to display the results, to give a psuedo-asynchronous window effect allowing both the full data set and the matches to be viewed simultaneously.
Thanks again for the clarification.
Modify table | highlighted rows
[Solved] The desired use of highlighting linked data has been achieved by using a table with non-sorting columns and sorting the tableData separately, before display and between re-displays.
Shane,
Can you suggest a means to have info display in the accessory view when selecting a row in the table? Example rows would have a list of Names of businesses, Accessory view would display the Name, Address etc of the business and more info. Right now I am using an extra button and recreating the window but would prefer the info display in the empty fields I have already created.
Myriad Tables are strictly modal, so thereās no way of doing what you want. Unfortunately AppleScript doesāt generally lend itself to that sort of asynchronous coding.
Hi Shane,
Is there any way to get blank/missing values in date columns to not show a dummy date? My existing applet coerces dates into strings so that a missing value date will become an empty string, but after updating it to use SQLite Lib2 I donāt want to kill the performance gains by looping through the data to convert all dates into strings. When the columns are not editable Iād prefer missing dates to just show as blank/empty.
Iāll add it to the list, but Iām bound to say Iām not enthused. One of the functions of a placeholder is that it gives a value to work with in terms of calculating the width required for a column.
This is very puzzling. I ran into this error when debugging on my new Mac, so I devised a workaround where I would save a MT Handler in a separate app and call that handler when debugging. When not debugging I call the handler in the script.
But sometimes it seems that it works in Debugging mode without using the separate app.
In fact, once I noticed it was working, it seemed to keep working.
ā Script Debugger: 8.0.2 (8A39)
ā Myriad Tables Lib: 1.0.12 (66)
ā Mac OS: 11.6 (20G165)
I have a project where Iād like to build an accessory view that works in dialog tool kit, but use it in Myriad tables.
Is that doable?
In the script below, the variable ātheCheckBoxā doesnāt work as an accessory view, but is there a way to make an accessory view from this command?
set {theCheckbox, theTop, newWidth} to create checkbox ("One side only") Ā¬
left inset 0 Ā¬
bottom (theTop + 8) Ā¬
max width 400 Ā¬
without initial state
To work, you will probably have to write the checkbox code in ASObjC. You should be able to do that by copying the relevant snippets from Dialog Toolkit Plus.
Got it. For now Iāve copied and edited snippets from some of your other posts, and making do with that.
Next time you revise those, maybe consider that a feature request?
@ShaneStanley
Can you think of easy way to show a difference in rows that I am displaying such as making the contents Red? Iām using to list info both good and bad to users.
Best,
Dean
Try this:
set anyTable to modify table anyTable Ā¬
highlighted rows {2,4,6,8}
It defaults to yellow, but @ShaneStanley may know how to change the default color
Any idea why the following is happening please, as I cannot even get going on Myriad Tables.
If I try to run any of the sample scripts bundled with Myriad Tables in Script Editor, I get the message:
error āThe bundle āSMSTableDialogBuilderā couldnāt be loaded.ā number -4960 from framework āSMSTableDialogBuilderā
However, if I save the script as an app, it runs absolutely fine.
I include below the āMenu, combo box samplesā script with the appropriate version changes for my software. I am running it on macOS Catalina.
Thank you
use AppleScript version "2.7"
use script "Myriad Tables Lib" version "1.0.10"
use scripting additions
-- table with column of popup menus
-- same table with column of combo boxes
display table with data {{"One", true, 1, "One"}, {"Two", false, 2, "Two"}, {"Three", true, 3, "Three"}, {"Four", false, 4, "Four"}, {"Five", true, 5, "Five"}} editable columns {1, 2, 3} column headings {"Number", "", "Digit", "Match"} row template {"", true, 1, {combo box, {"One", "Two", "Three"}}} with title "Sample table" with prompt "This table has a column with combo boxes" with row numbering
-- same table with further styling
set myTable to make new table with data {{"One", true, 1, "One"}, {"Two", false, 2, "Two"}, {"Three", true, 3, "Three"}, {"Four", false, 4, "Four"}, {"Five", true, 5, "Five"}} editable columns {1, 2, 3} column headings {"Number", "", "Digit", "Match"} row template {text, boolean, integer, {combo box, {"One", "Two", "Three"}}} with title "Sample table" with prompt "This table has centered entries, and returns an extended table reply" with row numbering
modify columns in table myTable entry alignment align center
display table myTable with extended results