Managing background controls

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

jmk_phd
Posts: 216
Joined: Sat Apr 15, 2017 8:29 pm

Re: Managing background controls

Post by jmk_phd » Wed Oct 26, 2022 12:09 am

Thanks so much for everyone’s input!

I’ve tackled this database project – which is simply for personal use – mainly to expand my understanding of LC beyond what I’d needed to learn in order to develop my previous commercial and freeware apps. Custom props and array variables have been a common feature in all of these, but your comments have enriched my insight into other ways in which these can be used.

So I am much enlightened and will explore all of your suggestions.

Still, as a practical matter, it must be said that all I truly need for now is ready access to my original Panorama dBs without having to boot back into macOS 10.6. Once exported from Panorama as a .csv file, the dB can be imported into Excel and displayed as one row per record. Sorting, inserting, and modifying records is a simple matter, although each cell is just ugly and inconvenient text.

What’s been so great about Panorama – in contrast to the HyperCard “rolodex” model – is that the records are formatted sequentially in a single scrollable window, each with attractive and fully functional editable text fields, checkboxes, and dropdown menus. An Excel spreadsheet does at least displays the entire dB in a single scrollable window, albeit without the convenient controls.

Possibly the Panorama interface can be emulated using a LC datagrid, but I’m at step one of that particular steep learning curve.

jeff k

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: Managing background controls

Post by stam » Wed Oct 26, 2022 12:17 am

jmk_phd wrote:
Wed Oct 26, 2022 12:09 am
Possibly the Panorama interface can be emulated using a LC datagrid, but I’m at step one of that particular steep learning curve.
It's probably a lot simpler than you think ;)
But since i doubt anyone else here knows what the 'panorama interface' is, maybe post some screenshots and many here will offer a variety of suggestions how to implement...

jmk_phd
Posts: 216
Joined: Sat Apr 15, 2017 8:29 pm

Re: Managing background controls

Post by jmk_phd » Wed Oct 26, 2022 1:47 am

stam wrote:
Wed Oct 26, 2022 12:17 am
It's probably a lot simpler than you think ;)
But since i doubt anyone else here knows what the 'panorama interface' is, maybe post some screenshots and many here will offer a variety of suggestions how to implement...
That makes perfect sense. Here's a screenshot of a Panorama window sized to include just three records from a dB of archived DVDs. As indicated in the lower left corner, the dB includes 705 records, all of which can be viewed simply by scrolling down/up through the window (unlike any rolodex-style one-record-per-card model). Each record includes text fields, checkboxes, and dropdown menus that can be set individually for each record. Along the top I've added a row of buttons so I can jump immediately to the first record of the films whose title begins with the corresponding letter. To the left is a menu of icon buttons that invoke various features add/delete/edit the individual records.

This is all really neat -- with no discernable lag time when scrolling through the records, even on an old Mac and old OS. That's why I wouldn't hesitate to recommend Panorama to anyone needing a robust dB program.

I may well be wrong, but to me this screenshot resembles documented illustrations of a LC datagrid. Still, implementing this in LC may be more trouble than it's worth.

Image

jeff k

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: Managing background controls

Post by stam » Wed Oct 26, 2022 2:24 am

Easily done with a data grid form.
Edit the row template so it looks like a row in panorama.
In the DG’s behaviour script you assign the data for the row, meaning that for each data item you assign the data to a field.

To be able to use your data with a form you should convert it to an array which is numerically keyed - and in the fillindata handler each row is assign the content of the numerically keyed element, just set each key of the array to the field/label/button etc as named in the template.

There are lessons from LC on how to construct a form. Given that you example is a more complex row layout, you’d probably want to experiment with a simpler layout to learn the ropes,

Spend some time here: https://lessons.livecode.com/m/datagrid/tags?tag=Form and if something doesn’t make sense just ask.

But what you want to do is very feasible and once experienced with data grid is fairly straightforward.

jmk_phd
Posts: 216
Joined: Sat Apr 15, 2017 8:29 pm

Re: Managing background controls

Post by jmk_phd » Thu Oct 27, 2022 12:05 am

stam wrote:
Wed Oct 26, 2022 2:24 am
Easily done with a data grid form.
Edit the row template so it looks like a row in panorama.
In the DG’s behaviour script you assign the data for the row, meaning that for each data item you assign the data to a field.
<...>
Spend some time here: https://lessons.livecode.com/m/datagrid/tags?tag=Form and if something doesn’t make sense just ask.
But what you want to do is very feasible and once experienced with data grid is fairly straightforward.
Thanks much for the tip about the link to the online lessons. Tried originally to follow the "LiveCode_Data_Grid.pdf" tutorial that I'd downloaded in 2015. Turned later to the data grid section of the LiveCode User Guide when its screenshots seemed more up to date. But the text and screenshots in the online lessons are apparently newer than those even in the most recent 9.6.8 User Guide, with the bonus of comment sections that include some very useful info.

The data grid form is exactly the feature that I was hoping to find and implement via LiveCode. It doesn't look all that daunting, and simple enough to implement with a bit of planning and ordinary trial and error.

jeff k

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: Managing background controls

Post by stam » Thu Oct 27, 2022 2:13 am

Once you posted the picture it immediately became obvious that's what was needed - i wish more people would do that ;)

Looking at your database, i wonder if you wanted to add fancy features - I'm not expert but a quick google revealed a number of APIs - it looks like the IMDb API is not cheap sadly, but there are alternatives.

For example the MovieQuotes API can provide release year, categorisation (eg Crime, Drama) and quotes attribute to a particular actor and role:
https://rapidapi.com/juanroldan1989/api/moviequotes/

Would be a bit more advanced topic but might be a nice project to get your teeth into ;)

Post Reply