How do I generate a list of objects used in a stack?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How do I generate a list of objects used in a stack?
Hello all!
I would like to get a list of objects used in a stack. What would be the script?...
Thanks in advance...
I would like to get a list of objects used in a stack. What would be the script?...
Thanks in advance...
André Rombauts, Liège (Belgium).
Retired teacher ( French language, History, English language and Computer science).
LC 9.6.6 (Business / HTML5 edition), testing LC 10 DP1.
Mac OS 11.6.2 Big Sur, MacBook Pro 16" 2019 (and other computers...).
Retired teacher ( French language, History, English language and Computer science).
LC 9.6.6 (Business / HTML5 edition), testing LC 10 DP1.
Mac OS 11.6.2 Big Sur, MacBook Pro 16" 2019 (and other computers...).
Re: How do I generate a list of objects used in a stack?
Hi arombauts,
look at control
regards
Bernd
look at control
Code: Select all
put the number of controls
Code: Select all
put the name of control 1
Code: Select all
put the number of controls of card 1
Bernd
Re: How do I generate a list of objects used in a stack?
Thanks a lot!
André Rombauts, Liège (Belgium).
Retired teacher ( French language, History, English language and Computer science).
LC 9.6.6 (Business / HTML5 edition), testing LC 10 DP1.
Mac OS 11.6.2 Big Sur, MacBook Pro 16" 2019 (and other computers...).
Retired teacher ( French language, History, English language and Computer science).
LC 9.6.6 (Business / HTML5 edition), testing LC 10 DP1.
Mac OS 11.6.2 Big Sur, MacBook Pro 16" 2019 (and other computers...).
Re: How do I generate a list of objects used in a stack?
You can write something like:
Code: Select all
on mouseup
repeat with y = 1 to the number of controls
put the number of control y && the name of control y into line y of temp
end repeat
answer temp
end mouseup
Re: How do I generate a list of objects used in a stack?
You can also download the "wizard" stack from revOnLine
Re: How do I generate a list of objects used in a stack?
Thanks all. Very easy indeed, as everything in RunRev...
Code: Select all
put "Crd" & tab & "Ctrl ID" & tab & "Type" & tab & "Name" & return into field Display
repeat with crd = 1 to the number of cards of this stack
repeat with ctrl = 1 to the number of controls of card crd
set the itemdelimiter to " "
put crd & tab & the ID of control ctrl & tab & item 1 of the name of control ctrl & tab & item 2 of the name of control ctrl & return after field D
end repeat
end repeat
André Rombauts, Liège (Belgium).
Retired teacher ( French language, History, English language and Computer science).
LC 9.6.6 (Business / HTML5 edition), testing LC 10 DP1.
Mac OS 11.6.2 Big Sur, MacBook Pro 16" 2019 (and other computers...).
Retired teacher ( French language, History, English language and Computer science).
LC 9.6.6 (Business / HTML5 edition), testing LC 10 DP1.
Mac OS 11.6.2 Big Sur, MacBook Pro 16" 2019 (and other computers...).
Re: How do I generate a list of objects used in a stack?
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: How do I generate a list of objects used in a stack?
Here is a correction to arombats code to make it run:
It also works nicely if field "Display" is a table field rather than a regular field.
Just trying to learn.
Larry
Code: Select all
on mouseUp
put "Crd" & tab & "Ctrl ID" & tab & "Type" & tab & "Name" & return into field "Display"
repeat with crd = 1 to the number of cards of this stack
repeat with ctrl = 1 to the number of controls of card crd
set the itemdelimiter to " "
put crd & tab & the ID of control ctrl of card crd & tab & item 1 of the name of control ctrl of card crd & \
tab & item 2 of the name of control ctrl of card crd & return after field "Display"
end repeat
end repeat
end mouseUp
Just trying to learn.
Larry