My stack has become "infected" with Geometry Manager information. Using the "Remove All" button in the Geometry section of the Property Inspector apparently doesn't work, so I'm trying to do it with a script:
local tCount = 0
repeat for each line thisCard in the cardNames of stack "Heimdallr"
repeat with ctrlNumber = 1 to the number of controls on card thisCard
repeat with propLine = 1 to the number of lines in the custompropertysets of control ctrlNumber of card thisCard
if line propLine of the custompropertysets of control ctrlNumber of card thisCard is "cREVGeometry" then
put " " into line propLine of the custompropertysets of control ctrlNumber of card thisCard
add 1 to tCount
end if
end repeat
end repeat
end repeat
put tCount into message
That first "put..." line (about the middle line) is the problem. I get an error saying: Chunk: can't create a variable with that name (explicitVariables?)) near "custompropertysets", char 45
If I change that line from "put..." to "answer line propLine of the custompropertysets of control ctrlNumber of card thisCard", I get no error, but of course that doesn't get the job done.
If I change that line to "delete line propLine of the custompropertysets of control ctrlNumber of card thisCard", I get this error: (Commands: missing ',') near "of", char 28
Can you help me? I'm just trying to delete all the Geometry Manager properties from my stack.
Removing Geometry Manager Properties with a Script
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 107
- Joined: Fri Nov 10, 2006 8:58 pm
- Contact:
Removing Geometry Manager Properties with a Script
Last edited by stephenmcnutt on Fri Dec 07, 2012 4:01 pm, edited 1 time in total.
Deleting a custom property set
Hi,
Try this:
Kind regards,
Mark
Try this:
Code: Select all
on mouseUp
put the customPropertySets of this stack into myProps
filter myProps without "cREVGeometryCacheIDs"
filter myProps without "cREVGeometryCache"
set the customPropertySets of this stack to myProps
repeat with x = 1 to number of cards
put the customPropertySets of cd x into myProps
filter myProps without "cREVGeometryCacheIDs"
filter myProps without "cREVGeometryCache"
set the customPropertySets of cd x to myProps
repeat with y = 1 to number of controls of cd x
put the customPropertySets of control y of cd x into myProps
filter myProps without "cREVGeometryCacheIDs"
filter myProps without "cREVGeometryCache"
filter myProps without "cREVGeometry"
set the customPropertySets of control y of cd x to myProps
end repeat
end repeat
end mouseUp
Mark
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
-
- Livecode Opensource Backer
- Posts: 107
- Joined: Fri Nov 10, 2006 8:58 pm
- Contact:
Re: Please Help Me Spot the Error
Thanks, Mark! That script seems to have done the trick. I've sampled the objects in my stack with Message Box scripts like:
put the custompropertysets of button "GoToCheckIn" of card "Welcome" of stack "Heimdallr"
...and I'm not seeing any geometry-related properties anymore. Super. Thanks again. You LiveCode Forum people are tops.
put the custompropertysets of button "GoToCheckIn" of card "Welcome" of stack "Heimdallr"
...and I'm not seeing any geometry-related properties anymore. Super. Thanks again. You LiveCode Forum people are tops.