From Text to Checklist?

All flavors welcome.
Forum rules
Be kind.
Post Reply
tergolap
Posts: 26
Joined: Thu Feb 24, 2022 9:28 am
Location: Noricum
Contact:

From Text to Checklist?

Post by tergolap »

Hi,

I do have a “real world” itch, that I'd like to scratch with OXT.

Use Case:
As a moderator in an online-meeting, I'd like to shuffle the list of participants and have the option to check/uncheck each name.

In detail, it's like this:
Once our meeting starts, I can extract the list of participants. It's plain text, one line in the string is one person.
I thought, I could paste the data into a text-area and hit a button.
Once the button was clicked, the names should be put into an array (or list?). That array/list should be shuffled/randomized.
Once shuffled, the items should be put into a list-view, where each entry should have a check-box.
The checkbox is necessary for me to track a progress in the meeting.
Screenshot 2024-05-07 193507.png
Screenshot 2024-05-07 193507.png (29.31 KiB) Viewed 421 times
I'm sure this is possible, no doubt. But it's me, who doesn't know, where to start. Is there a widget for that? Is it a property of something? Do I have to combine multiple widgets (checkbox + list) and do the logic (scrolling etc.) on my own?

I'd appreciate any tips from you. Thank you!
Cheers,

T.

I'm not a native speaker, but I try my best.
micmac
Posts: 126
Joined: Mon Sep 13, 2021 9:46 pm
Contact:

Re: From Text to Checklist?

Post by micmac »

The checkboxes could simply be an OTF letter

Mic
User avatar
tperry2x
Posts: 1841
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: From Text to Checklist?

Post by tperry2x »

There is a section on this in the guides. I hope that helps.
If you go to the Help menu > Guides, it's under the "Checkboxes and Datagrids" section:

checkboxes-datagrids.png
checkboxes-datagrids.png (104.16 KiB) Viewed 404 times
User avatar
OpenXTalkPaul
Posts: 1835
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: From Text to Checklist?

Post by OpenXTalkPaul »

You can modify a data grid's template stack infinitely. Not just check boxes. You can get really complicated/intricate.
At one point I modified it so much that I had a 'drum-machine' like grid of buttons which responded to mouseMove / dragMoves.

Also, I think there's a demos around somewhere that shows how to allow for drag rearranging of the data grid list ordering, which could be helpful to your goal. Here's a lesson on reordering grid rows: https://lessons.livecode.com/m/datagrid ... -data-grid

I do like that idea of using a simple OTF font's char chunk, style set to 'link' and then using LinkClicked message to use the char in place of a checkbox control object. That's the way the Unicode Font glyph browser I'm building currently works. K.I.S.S. In Fact you could even use a Unicode color OTF font with the code point for this ("infantile") 'emoji' icon :
✅ White Heavy Check Mark - Unicode CodePoint=9989
Maybe used in conjunction with a 'blank' square like:
🔲 Black Square Button - Unicode CodePoint=128306
User avatar
richmond62
Posts: 3091
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: From Text to Checklist?

Post by richmond62 »

As those datagrids are, essentially, highly complicated groups, you should be able to make any type of 'datagrid' you like:
-
legoBricks.jpg
legoBricks.jpg (6.94 KiB) Viewed 382 times
-
This IS worth a read:

https://lessons.livecode.com/m/4068/l/4 ... n-a-column

HOWEVER:
This Lesson presents how to create a column containing a checkbox button in a data grid, using the Data Grid Helper Plugin.
Made me feel a bit odd as I could NOT locate a Data Grid Helper Plugin in the Plugins menu of LC 963.

This may be because LC 963 features the much-vaunted second type of datagrid, and that 'class' may refer to the first type of datagrid (the class has probably been preserved there without thinking about possible consequences).

In fact it may be "up a gum tree": https://forums.livecode.com/viewtopic.php?t=5884

Aha: you could, at one time BUY the DGH for about 50 bucks.

AAAAAAAAAH: this seems more like 'it'. 8-)

https://livecode-lessons-copy.screenste ... -data-grid
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1835
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: From Text to Checklist?

Post by OpenXTalkPaul »

richmond62 wrote: Wed May 08, 2024 3:48 pm As those datagrids are, essentially, highly complicated groups, you should be able to make any type of 'datagrid' you like:
-
legoBricks.jpg
-
This IS worth a read:

https://lessons.livecode.com/m/4068/l/4 ... n-a-column
..and this could be helpful for reordering the grid's list:
https://lessons.livecode.com/m/datagrid ... -data-grid

Yes the data grid library and template stack essentially form a script/group (non-extension builder) version of what Widgets are, but in a less encapsulated, less isolated way from Widgets that run in their own module's 'context'.

There's a commercial Widget extension out there from the Ferris Logic guys (one of whom once suggested that they would put it out as open-source) that is essentially like a data grid replacement.
User avatar
richmond62
Posts: 3091
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: From Text to Checklist?

Post by richmond62 »

When I was 6 (1968) I was given my first box of LEGO: and the bricks came in 3 colours: White, Red and Dark Blue . . .

Seeing all those wonderful colours makes me feel deprived. :D

This: https://livecode-lessons-copy.screenste ... -data-grid

is "multi-coloured".

A little bird suggested that these lessons could be remade in someone else's own image . . .
https://richmondmathewson.owlstown.net/
tergolap
Posts: 26
Joined: Thu Feb 24, 2022 9:28 am
Location: Noricum
Contact:

Re: From Text to Checklist?

Post by tergolap »

micmac wrote: Wed May 08, 2024 7:07 am The checkboxes could simply be an OTF letter

Mic
Haven't thought of that. Thank you. Maybe in other situations I'd consider this. At the moment, I want to learn more about OXT, so I'll go the long way.
tperry2x wrote: Wed May 08, 2024 8:57 am There is a section on this in the guides. I hope that helps.
If you go to the Help menu > Guides, it's under the "Checkboxes and Datagrids" section:
Thank you. I have to look more into the Guides. I followed the tutorial and could get it to work.
Two thoughts:
OXT is considered to be programming for the rest of us. But for a beginner this task was quite complicated. Nevertheless, the DataGrid seems to be a very powerful tool, once you know how to handle it.
OpenXTalkPaul wrote: Wed May 08, 2024 3:36 pm You can modify a data grid's template stack infinitely. Not just check boxes. You can get really complicated/intricate.
At one point I modified it so much that I had a 'drum-machine' like grid of buttons which responded to mouseMove / dragMoves.

Also, I think there's a demos around somewhere that shows how to allow for drag rearranging of the data grid list ordering, which could be helpful to your goal. Here's a lesson on reordering grid rows: https://lessons.livecode.com/m/datagrid ... -data-grid

...
Thanks. I already see how capable the DataGrid is or can be.
richmond62 wrote: Wed May 08, 2024 3:48 pm As those datagrids are, essentially, highly complicated groups, you should be able to make any type of 'datagrid' you like:
Thank you.

Case solved. I learned something and it's working (at the moment ;) ).
Cheers,

T.

I'm not a native speaker, but I try my best.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests