getting the group-ID or longID?

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

Post Reply
Tomka
Posts: 59
Joined: Mon Apr 18, 2011 7:30 pm

getting the group-ID or longID?

Post by Tomka » Mon May 16, 2011 3:46 pm

Hello,

maybe its a stupid question but i cant find any solution in the dictonary or forum.

How can I get the ID or long ID of a group where I click the mousebutton on?

Code: Select all

on mouseUp
   put long ID of target into fld 1
end mouseUp
This returns:
button id 1016 of group id 1014 of card id 1002 of stack
It contains the group-ID but how can I seperate it? I need this cause there are 2 objects in every group and I want to be able to modify each of these obejects later.
Theres the second question:

Is following example possible?

Code: Select all

global group_name
set <any_property> of image "blabla" in group group_name of this stack to <any_value>

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: getting the group-ID or longID?

Post by BvG » Mon May 16, 2011 4:05 pm

the owner property
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Tomka
Posts: 59
Joined: Mon Apr 18, 2011 7:30 pm

Re: getting the group-ID or longID?

Post by Tomka » Mon May 16, 2011 4:06 pm

Ah I see, thanks alot... :)

Regulae
Posts: 136
Joined: Tue Oct 20, 2009 6:05 am

Re: getting the group-ID or longID?

Post by Regulae » Mon May 16, 2011 5:32 pm

Hi there,

Just a small point on your second question:

Code: Select all

global group_name
set <any_property> of image "blabla" in group group_name of this stack to <any_value>
... should work, with the following changes:

Code: Select all

global group_name
set the <any_property> of image "blabla" of group group_name of this stack to <any_value>
... the changes being the words "the" and "of", as in "set the..." and "of group group_name".

Regards,
Michael

Tomka
Posts: 59
Joined: Mon Apr 18, 2011 7:30 pm

Re: getting the group-ID or longID?

Post by Tomka » Mon May 16, 2011 6:38 pm

Thanks alot. It works fine.

Post Reply