View Single Post
Aargh. What am I doing wrong???

I have nested groups in an OmniGraffle document. The following code (and many variations thereof):

tell application "OmniGraffle Professional 5"
tell front document
tell canvas 1
set group_list to every group --gets top-level groups only?

repeat with a_group in group_list
set subgroup_list to {}
tell a_group to set subgroup_list to its every group
display dialog subgroup_list as text
end repeat

end tell
end tell
end tell

tells me that the variable subgroup_list is not defined.
At the very least, shouldn't it be defined as an empty list? (The "set subgroup_list to {}" line was a desperation measure that shouldn't be needed.)

More importantly, why is it not finding the subgroups in my groups?