Re: Groups id #

2024-05-28 Thread Craig Newman via use-livecode
There is an anomaly with the “last” keyword. It is not reliable with groups.

Craig

> On May 25, 2024, at 8:03 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> As I said, the last ID is going to be the stack ID -1. 
> 
> Sent from my iPhone
> 
>> On May 25, 2024, at 16:55, Bob Sneidar  wrote:
>> 
>> sounds logical, but I'm not sure, maybe you could store the ID of the last 
>> group somewhere.
> 
> ___
> 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: Groups id #

2024-05-25 Thread Bob Sneidar via use-livecode
As I said, the last ID is going to be the stack ID -1. 

Sent from my iPhone

> On May 25, 2024, at 16:55, Bob Sneidar  wrote:
> 
> sounds logical, but I'm not sure, maybe you could store the ID of the last 
> group somewhere.

___
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: Groups id #

2024-05-25 Thread Bob Sneidar via use-livecode
IDs are assigned according to the stack ID which increments by 1 every time an 
object is created. So yes, the stack ID is like an auto increment column in 
SQL. It assures that no two objects get the same ID, and the last object 
created is the highest ID in the stack. 

Sent from my iPhone

> On May 25, 2024, at 07:50, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi jbv,
> 
>> Am 25.05.2024 um 16:20 schrieb jbv via use-livecode 
>> :
>> 
>> Hi list,
>> 
>> I have a script that creates groups on the fly
>> with the command "group". These groups contain
>> various flds and imgs.
>> Can I always assume that the group with the highest
>> id # is the last one created ?
> 
> sounds logical, but I'm not sure, maybe you could store the ID of the last 
> group somewhere.
> Use IT right after the groupd command:
> ...
> select this_and_that
> group
> put IT into the_id_of_just_created_group
> ...
> 
>> Thanks,
>> jbv
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: Groups id #

2024-05-25 Thread Klaus major-k via use-livecode
Hi jbv,

> Am 25.05.2024 um 16:20 schrieb jbv via use-livecode 
> :
> 
> Hi list,
> 
> I have a script that creates groups on the fly
> with the command "group". These groups contain
> various flds and imgs.
> Can I always assume that the group with the highest
> id # is the last one created ?

sounds logical, but I'm not sure, maybe you could store the ID of the last 
group somewhere.
Use IT right after the groupd command:
...
select this_and_that
group
put IT into the_id_of_just_created_group
...

> Thanks,
> jbv

Best

Klaus

--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
kl...@major-k.de


___
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: Groups id #

2024-05-25 Thread Peter Bogdanoff via use-livecode
Last. "The last keyword <> can be used to specify any object <> whose number <> 
property <> is equal to the number of objects <> of that type. It can also be 
used to designate the last chunk <> in a chunk expression <>."

> On May 25, 2024, at 10:20 AM, jbv via use-livecode 
>  wrote:
> 
> Hi list,
> 
> I have a script that creates groups on the fly
> with the command "group". These groups contain
> various flds and imgs.
> Can I always assume that the group with the highest
> id # is the last one created ?
> Thanks,
> jbv
> 
> ___
> 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


Groups id #

2024-05-25 Thread jbv via use-livecode

Hi list,

I have a script that creates groups on the fly
with the command "group". These groups contain
various flds and imgs.
Can I always assume that the group with the highest
id # is the last one created ?
Thanks,
jbv

___
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