Re: Loading a LONG list with images

2022-02-23 Thread Richard Gaskin via use-livecode
You seem to have good progress toward a workable solution already, but FWIW here's how I handled a similar case: I was building a bespoke authoring system which included an image library. There were some 2600 images in the collection when we started, and at the rate of new additions we didn't

Re: Loading a LONG list with images

2022-02-22 Thread Dan Friedman via use-livecode
Tom, Ok... I finally figured out the setting of dgNumberOfRecords and adding a GetDataForLine command. So, the data is now loading. And, I am doing the check in FillInData to see if the image is loaded or not. If it's not, I call getAndCachePreview with in turn does the download of the image.

Re: Loading a LONG list with images

2022-02-22 Thread Dan Friedman via use-livecode
Mark, >> i.e. make sure the datagrid is only creating rows on demand, rather than >> up front, and then requesting images and updating them when they arrive How do you do that? What property do I set, or method is used to only load the displayed rows? Tom's code snippet is a WONDERFUL start a

Re: Loading a LONG list with images

2022-02-22 Thread Mark Waddingham via use-livecode
On 2022-02-21 23:47, Tom Glod via use-livecode wrote: This is how i did it . I hope this helps. First to use the "numberofrecords" way of setting the datagrid data. This is key, that way you only ever trigger loading of visible rows. So I've not got much to add to Tom's method i.e. make

Re: Loading a LONG list with images

2022-02-21 Thread Tom Glod via use-livecode
notice the use of send "" in 0 milliseconds... This ensures that the rendering of the grid does not get held up by the download. so the download happens in the background. On Mon, Feb 21, 2022 at 6:47 PM Tom Glod wrote: > This is how i did it . I hope this helps. > > First to use the "nu

Re: Loading a LONG list with images

2022-02-21 Thread Tom Glod via use-livecode
This is how i did it . I hope this helps. First to use the "numberofrecords" way of setting the datagrid data. This is key, that way you only ever trigger loading of visible rows. This is the code from my dg column. global PixabayResults if PixabayResults["cache"]["DL:" & PixabayRes

Re: Loading a LONG list with images

2022-02-21 Thread Dan Friedman via use-livecode
Tom, Yes, assuming that is a DG in your video, that's just what I'm looking to do! -Dan On 2/21/22, 3:22 PM, "use-livecode on behalf of Tom Glod via use-livecode" wrote: Dan can you check this video and the pixabay search example? https://youtu.be/jN2bQbhQ0L8?t=216 Is this wh

Re: Loading a LONG list with images

2022-02-21 Thread Tom Glod via use-livecode
Dan can you check this video and the pixabay search example? https://youtu.be/jN2bQbhQ0L8?t=216 Is this what you have in mind? These images are loaded as the row comes into view. On Mon, Feb 21, 2022 at 6:07 PM Dan Friedman via use-livecode < use-livecode@lists.runrev.com> wrote: > Richard, > > P

Re: Loading a LONG list with images

2022-02-21 Thread Dan Friedman via use-livecode
Richard, Probably not over a couple thousand. The images are square -- they need to be resized to the DG template image size, but not scaled (H vs W). -Dan On 2/21/22, 12:14 PM, "use-livecode on behalf of Richard Gaskin via use-livecode" wrote: How many images? I once made a sol

Re: Loading a LONG list with images

2022-02-21 Thread Richard Gaskin via use-livecode
How many images? I once made a solution for 3,000 images, but it may not scale well above 8,000 or so depending on memory and connection speed. -- Richard Gaskin Fourth World Systems Dan Friedman wrote: > Does anyone have any answers to the issue of loading a long list with > images so