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 "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:" & PixabayResults["data"][the
> dgindex of me]["previewURL"]] is empty then
>  send "GetImageTrigger " & the dgindex of me & comma & quote &
> PixabayResults["data"][the dgindex of me]["previewURL"] & quote & comma &
> random(25500) to card "Search Pixabay"
>  put image id 1410033 of card "Resources" into image 1 of me --
> 14110033 image id is the placeholder.
>  set the visible of image 1 of me to true
>  set the MyIndex of me to empty
>  //set the visible of group "Image Tools" of me to false
>   else
>  put PixabayResults["cache"]["DL:" & PixabayResults["data"][the
> dgindex of me]["previewURL"]] into image 1 of me
>  set the visible of image 1 of me to true
>  set the MyIndex of me to the dgIndex of me
>  delete global PixabayResults["downloaded"][the dgIndex of me] --
> delete the flag to update this row because its a visible row with newly
> downloaded file
>  //set the visible of group "Image Tools" of me to false
>   end if
>
>
> on GetImageTrigger ThisIndex,ThisURL,ThisRandom
>send "GetAndCachePreviewImage " & ThisIndex & comma & quote & ThisURL &
> quote & comma & random(25500) to card "Search Pixabay" in 0 milliseconds
> end GetImageTrigger
>
> on GetAndCachePreviewImage ThisIndex,ThisURL,ThisRandomNumber
>Task_Scheduler_Add "Download File To Variable","DL:" &
> ThisURL,ThisURL,"" -- this schedules TSNET request to download image then
> waits for the image to download
>
>wait until AppStarterStackTaskScheduler["finished"]["DL:" & ThisURL] is
> not empty with messages -- wait with messages until its finished
>
>if AppStarterStackTaskScheduler["finished"]["DL:" & ThisURL] is "error"
> then
>   throw "Thumbnail Download Failed:" & ThisURL
>else
>   put AppStarterStackTaskScheduler["data"]["DL:" & ThisURL]["data"]
> into PixabayResults["cache"]["DL:" & ThisURL]
>   put 1 into PixabayResults["downloaded"][ThisIndex]
>   delete variable AppStarterStackTaskScheduler["data"]["DL:" &
> ThisURL]["data"]
>end if
> end GetAndCachePreviewImage
>
>
>
>
>
>
>
>
>
>
> On Mon, Feb 21, 2022 at 6:20 PM Tom Glod  wrote:
>
>> 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,
>>>
>>> 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" >> use-livecode@lists.runrev.com> wrote:
>>>
>>> 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 that it loads images "as needed" like a webpage does.
>>>  >
>>>  > I have a DataGrid with several hundred rows.  Each row has a
>>> specific
>>>  > image that is to be displayed with that row (like a list of
>>> songs).
>>>  > The image is loaded from the web.   Is there a method to load the
>>>  > DataGrid and only load the images for the rows that are shown?
>>>  And,
>>>  > when you scroll the grid, the images for the newly shown rows are
>>> then
>>>  > loaded.  The loading need to happen somehow without halting the
>>>  > scrolling or making it stutter.
>>>  >
>>>  > I hope that makes sense!
>>>  > -Dan
>>>
>>>
>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>

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:" & PixabayResults["data"][the dgindex
of me]["previewURL"]] is empty then
 send "GetImageTrigger " & the dgindex of me & comma & quote &
PixabayResults["data"][the dgindex of me]["previewURL"] & quote & comma &
random(25500) to card "Search Pixabay"
 put image id 1410033 of card "Resources" into image 1 of me --
14110033 image id is the placeholder.
 set the visible of image 1 of me to true
 set the MyIndex of me to empty
 //set the visible of group "Image Tools" of me to false
  else
 put PixabayResults["cache"]["DL:" & PixabayResults["data"][the
dgindex of me]["previewURL"]] into image 1 of me
 set the visible of image 1 of me to true
 set the MyIndex of me to the dgIndex of me
 delete global PixabayResults["downloaded"][the dgIndex of me] --
delete the flag to update this row because its a visible row with newly
downloaded file
 //set the visible of group "Image Tools" of me to false
  end if


on GetImageTrigger ThisIndex,ThisURL,ThisRandom
   send "GetAndCachePreviewImage " & ThisIndex & comma & quote & ThisURL &
quote & comma & random(25500) to card "Search Pixabay" in 0 milliseconds
end GetImageTrigger

on GetAndCachePreviewImage ThisIndex,ThisURL,ThisRandomNumber
   Task_Scheduler_Add "Download File To Variable","DL:" &
ThisURL,ThisURL,"" -- this schedules TSNET request to download image then
waits for the image to download

   wait until AppStarterStackTaskScheduler["finished"]["DL:" & ThisURL] is
not empty with messages -- wait with messages until its finished

   if AppStarterStackTaskScheduler["finished"]["DL:" & ThisURL] is "error"
then
  throw "Thumbnail Download Failed:" & ThisURL
   else
  put AppStarterStackTaskScheduler["data"]["DL:" & ThisURL]["data"]
into PixabayResults["cache"]["DL:" & ThisURL]
  put 1 into PixabayResults["downloaded"][ThisIndex]
  delete variable AppStarterStackTaskScheduler["data"]["DL:" &
ThisURL]["data"]
   end if
end GetAndCachePreviewImage










On Mon, Feb 21, 2022 at 6:20 PM Tom Glod  wrote:

> 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,
>>
>> 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" > use-livecode@lists.runrev.com> wrote:
>>
>> 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 that it loads images "as needed" like a webpage does.
>>  >
>>  > I have a DataGrid with several hundred rows.  Each row has a
>> specific
>>  > image that is to be displayed with that row (like a list of songs).
>>  > The image is loaded from the web.   Is there a method to load the
>>  > DataGrid and only load the images for the rows that are shown?
>>  And,
>>  > when you scroll the grid, the images for the newly shown rows are
>> then
>>  > loaded.  The loading need to happen somehow without halting the
>>  > scrolling or making it stutter.
>>  >
>>  > I hope that makes sense!
>>  > -Dan
>>
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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 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,
>
> 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"  use-livecode@lists.runrev.com> wrote:
>
> 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 that it loads images "as needed" like a webpage does.
>  >
>  > I have a DataGrid with several hundred rows.  Each row has a
> specific
>  > image that is to be displayed with that row (like a list of songs).
>  > The image is loaded from the web.   Is there a method to load the
>  > DataGrid and only load the images for the rows that are shown?
>  And,
>  > when you scroll the grid, the images for the newly shown rows are
> then
>  > loaded.  The loading need to happen somehow without halting the
>  > scrolling or making it stutter.
>  >
>  > I hope that makes sense!
>  > -Dan
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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,
>
> 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"  use-livecode@lists.runrev.com> wrote:
>
> 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 that it loads images "as needed" like a webpage does.
>  >
>  > I have a DataGrid with several hundred rows.  Each row has a
> specific
>  > image that is to be displayed with that row (like a list of songs).
>  > The image is loaded from the web.   Is there a method to load the
>  > DataGrid and only load the images for the rows that are shown?
>  And,
>  > when you scroll the grid, the images for the newly shown rows are
> then
>  > loaded.  The loading need to happen somehow without halting the
>  > scrolling or making it stutter.
>  >
>  > I hope that makes sense!
>  > -Dan
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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 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 that it loads images "as needed" like a webpage does.
 >
 > I have a DataGrid with several hundred rows.  Each row has a specific
 > image that is to be displayed with that row (like a list of songs).
 > The image is loaded from the web.   Is there a method to load the
 > DataGrid and only load the images for the rows that are shown?   And,
 > when you scroll the grid, the images for the newly shown rows are then
 > loaded.  The loading need to happen somehow without halting the
 > scrolling or making it stutter.
 >
 > I hope that makes sense!
 > -Dan



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [ANN] Release 10.0.0 DP-2

2022-02-21 Thread Richard Gaskin via use-livecode

Pi Digital wrote:

> It’s so frustrating because I just spent the last week making my own
> widget to make bar and pi charts. LOL! Now it feels like a futile
> gesture with something far superior ‘just around the corner’. Your
> teams have done a really good job of making them.
>
> I’ll get back to making more futile tools that will likely get
> superseded by more of your work ;)

This problem is as old as platforms themselves. Indeed much of Apple's 
early dev-facing communications (circa Mac v1.0-4.0) centered around 
clarifying their interests and their intentions for keeping the 
third-party opportunity as wide open as practical.


Later on a form of Konfabulator was included as Widgets, a form of 
Delicious Library was included as iBooks, and the boundaries have been 
blurred forever since.


This is understandable, whether we're looking at a vendor whose platform 
is an OS or a dev tool, as it's incumbent on them to provide a strong 
sense of feature-completeness wherever practical.


When evaluating third-party opportunities, consider not only the LC 
world but also JavaScript.  Integration between any GUI toolkit and web 
views is likely only going to increase going forward.


As LC Ltd notes in their blog post, the new charts widget wraps 
chart.js, an open source package under MIT license.


Many key ingredients in LC make use of open source code, and given the 
vast-and-growing range of open source packages for JavaScript we can 
expect more using that language over time.


So next time you're thinking of an add-on for LC, also take a moment to 
see if such a thing is already available in JavaScript. If it is you 
just saved yourself the time otherwise needed to write it from scratch.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: resetall?

2022-02-21 Thread Mark Wieder via use-livecode

On 2/21/22 10:37, Mark Waddingham via use-livecode wrote:

Put another way - if you have done 'close socket i', then it is then it 
should be logically impossible for i to be in the openSockets 
immediately afterwards.


Ah. Sorry - after issuing a closeSocket call the socket does *not* 
appear in the opensockets. But the socket seems not to be responding 
until a reboot. And I'm thinking that I may have a blocking read still 
in play at that point, and the close socket command doesn't affect it.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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 that it loads images "as needed" like a webpage does.
>
> I have a DataGrid with several hundred rows.  Each row has a specific
> image that is to be displayed with that row (like a list of songs).
> The image is loaded from the web.   Is there a method to load the
> DataGrid and only load the images for the rows that are shown?   And,
> when you scroll the grid, the images for the newly shown rows are then
> loaded.  The loading need to happen somehow without halting the
> scrolling or making it stutter.
>
> I hope that makes sense!
> -Dan



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Message box failure in 10.0.0?

2022-02-21 Thread J. Landman Gay via use-livecode

Probably not related, none of my test stacks call out to external files.

I relaunched LC 10.0.0 and everthing works again. The only difference is that I closed the App 
Overview before quitting and then reopened it manually after the new launch. I don't know if 
that made the difference, or if something just got screwy while running the IDE. The same issue 
happened in LC 10.0.0dp1 though and I went back to 9.6.6 rather than deal with it.


I'll see if the problem recurs over time.


On 2/21/22 7:20 AM, Paul Dupuis via use-livecode wrote:
We're tracking down a Big Sur "bug/feature" that I don't have a recipe stack for yet, but I'll 
explains as it *might* be related?


We've found that if a stack is internal to the .app under Big Sur (and presumably Monterey) 
that has a video player, the video in the player plays and pauses normally (i.e the UI is 
responsive to any messages to the player or menus that control the player). i.e it behaves as 
expected - normally.


However, if the player is in a LOCAL stack, but loaded from OUTSIDE the .app package (say from 
the desktop or elsewhere in the Applications folder, but outside the BUNDLE), then when the 
video is played, the UI becomes non-responsive until the video is finished playing.


We have seen other issues relating to file and folder actions that FAIL under Catalina and up 
if performed from a loaded external stack but work if loaded from a substack as part of the 
.app build. (Stacks in the app bundle, but external to the .app standalone may work - we've not 
tested)


We think this is due to Apple's permission scheme under Catalina and above and how it tries to 
detect resource access in real time and perhaps something about the stack being external sets 
the permissions system off.


I mention it in the unlikely case you are loading a external stack prior to your message box 
tests.




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Loading a LONG list with images

2022-02-21 Thread Dan Friedman via use-livecode
Does anyone have any answers to the issue of loading a long list with images so 
that it loads images "as needed" like a webpage does.

I have a DataGrid with several hundred rows.  Each row has a specific image 
that is to be displayed with that row (like a list of songs).  The image is 
loaded from the web.   Is there a method to load the DataGrid and only load the 
images for the rows that are shown?   And, when you scroll the grid, the images 
for the newly shown rows are then loaded.  The loading need to happen somehow 
without halting the scrolling or making it stutter. 

I hope that makes sense!
-Dan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: resetall?

2022-02-21 Thread Mark Waddingham via use-livecode

On 2022-02-21 18:09, Mark Wieder via use-livecode wrote:

On 2/21/22 08:57, Mark Waddingham via use-livecode wrote:


If you want to brute force close all sockets then I suggest:


     repeat for each line i in the openSockets
   close socket i
     end repeat

:)


Yeah, that's what I'm doing now since resetall doesn't do anything
useful. Displaying the opensockets after a resetall still shows the
same sockets as before issuing the command.

And the repeat loop works maybe 50% of the time. It seems that maybe
if I have an active blocking read on a socket it doesn't get closed.
Could that be the case?


So I think there's something else going on in your scripts (or in the 
environment!) as from what I can see...


When `close socket` is performed, the socket is marked as `closing`, and 
`the openSockets` never includes sockets which are marked as `closing`.


The closing flag on a socket is only ever changed in two places - on 
socket creation/open, when it is set to false, and then on `close 
socket` where it is set to true.


Put another way - if you have done 'close socket i', then it is then it 
should be logically impossible for i to be in the openSockets 
immediately afterwards.


i.e. Based on my reading of the engine code:

  get line 1 of the openSockets
  close socket it
  put it is among the line of the openSockets

Will always put false.

Of course, it is possible after closing a socket, and if the event loop 
has run for a handler to have opened the same socket again (bearing in 
mind sockets are named for their address and port; unless an explicit 
tag is provided)...


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: resetall?

2022-02-21 Thread Mark Wieder via use-livecode

On 2/21/22 08:57, Mark Waddingham via use-livecode wrote:


If you want to brute force close all sockets then I suggest:


     repeat for each line i in the openSockets
   close socket i
     end repeat

:)


Yeah, that's what I'm doing now since resetall doesn't do anything 
useful. Displaying the opensockets after a resetall still shows the same 
sockets as before issuing the command.


And the repeat loop works maybe 50% of the time. It seems that maybe if 
I have an active blocking read on a socket it doesn't get closed. Could 
that be the case?


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: resetall?

2022-02-21 Thread Mark Waddingham via use-livecode

On 2022-02-21 16:51, Mark Wieder via use-livecode wrote:

Before I report this one...

I thought resetall was supposed to close open sockets. There's even a
warning in the docs about it being a brute force close. But it doesn't
seem to do anything useful. Am I missing something?


Its a synonym for libUrlResetAll - and was only really intended to reset 
libUrl state I think (so its not clear to me why it didn't only ever 
touch the sockets libUrl was using).


These days if tsNet is loaded then it will just reset tsNet's state:

on libUrlResetAll
  local i

  -- CW-2016-06-11: [[ External driver support ]] Call driver specific 
reset command if external driver is in use.

  if lvExtDriver is not empty then
ulDeleteLocals
ulExtResetDriver
  else
if there is a stack "libUrl" then put empty into fld "log1" of stack 
"libURL"

repeat for each line i in the openSockets
  close socket i
end repeat

ulDeleteLocals
put true into lvJumpOut
send "ulDeleteLocals" to me in 5 milliseconds
  end if
end libUrlResetAll

If you want to brute force close all sockets then I suggest:


repeat for each line i in the openSockets
  close socket i
end repeat

:)

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


resetall?

2022-02-21 Thread Mark Wieder via use-livecode

Before I report this one...

I thought resetall was supposed to close open sockets. There's even a 
warning in the docs about it being a brute force close. But it doesn't 
seem to do anything useful. Am I missing something?


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Message box failure in 10.0.0?

2022-02-21 Thread Paul Dupuis via use-livecode
We're tracking down a Big Sur "bug/feature" that I don't have a recipe 
stack for yet, but I'll explains as it *might* be related?


We've found that if a stack is internal to the .app under Big Sur (and 
presumably Monterey) that has a video player, the video in the player 
plays and pauses normally (i.e the UI is responsive to any messages to 
the player or menus that control the player). i.e it behaves as expected 
- normally.


However, if the player is in a LOCAL stack, but loaded from OUTSIDE the 
.app package (say from the desktop or elsewhere in the Applications 
folder, but outside the BUNDLE), then when the video is played, the UI 
becomes non-responsive until the video is finished playing.


We have seen other issues relating to file and folder actions that FAIL 
under Catalina and up if performed from a loaded external stack but work 
if loaded from a substack as part of the .app build. (Stacks in the app 
bundle, but external to the .app standalone may work - we've not tested)


We think this is due to Apple's permission scheme under Catalina and 
above and how it tries to detect resource access in real time and 
perhaps something about the stack being external sets the permissions 
system off.


I mention it in the unlikely case you are loading a external stack prior 
to your message box tests.



On 2/21/2022 2:16 AM, J. Landman Gay via use-livecode wrote:
Thanks, looks like it's just me. Glad I asked here first, but I have 
no idea what might be causing it. .


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On February 20, 2022 11:13:33 PM Terry Judd via use-livecode 
 wrote:



Just downloaded and tested and it works ok for me on Monterey.

Terry

From: use-livecode  on behalf 
of J. Landman Gay via use-livecode 

Date: Monday, 21 February 2022 at 3:26 pm
To: How to use LiveCode 
Cc: J. Landman Gay 
Subject: Re: Message box failure in 10.0.0?
Thanks for the reply. I should have mentioned I'm on Mac OS X Big Sur.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
On February 20, 2022 6:21:01 PM Paul Dupuis via use-livecode
 wrote:


These are working for me in the message box under LC 10.0.0dp2 (64bit)
under Windows 10

On 2/20/2022 6:48 PM, J. Landman Gay via use-livecode wrote:

I'm trying out LC 10.0.0dp2 and the message box doesn't seem to be
working. I'm just checking here before I report it, in case it's just
me. None of the following work, the message box doesn't error but no
response appears:

put the number of cds
put the number of cds of this stack
put the number of cards of stack "mystack"
the rect of stack "mystack"
edit script of 
etc.

This works sometimes:
set the rect of this stack to 

I'm not positive but it seems that "put" isn't working but "set" does.
Maybe.

Also, keyboard shortcuts do not open the script editor, nor do
contextual menus show when Cmd-Control-Shift clicking. The only way I
can currently get to scripts is via the property inspector button or
the Objects menu. Cmd-opt-click doesn't open scripts of controls, and
since those aren't in the Object menu I need to use the property
inspector since typing "edit script of btn 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode