jumping among Mainstack and substacks isn't easy
Mark Rauterkus
mark.rauterkus at gmail.com
Mon Jun 18 14:12:01 EDT 2012
Hi,
My database for camper kids is progressing, but some newbie head
scratching is in full force.
Cards in a mainstack keep contact info and attendance details, one
card per person. This seems to be working fine, except when I jump to
different substacks. Then an error occurs. Case in point: I am
building a "FIND" sub-stack, with one card. But I want to make a list
of all the cards in the stack and take to the other stack and load it
into a custom property in a field. Got it working, sorta.
But on the way between stacks, I get weird errors. This is one.
...
on openCard
get field boy
if it = 1 then set the hilite of button male to true else set the
hilight of button male to false
end openCard
...
...
Debugger says: Stack "Kids": execution error at line 3 (Chunk: no such
object) near "boy", char 4
Perhaps I should do on preOpenCard?
= =
Q2: I could not figure out how to call a custom property of a field of
the mainstack while working in a substack. So, my workaround was to
make a hidden field in the substack that also had the same field
custom property. I set it once and then went to the other stack and
set it again.
on mouseUp
put "" into index1
get the number of cards in this stack
put it into tRepeats
Repeat for tRepeats
global index1
go to next card
put (the short name of this card) & return after index1
end repeat
-- Generates first name sorting
sort index1
set the cNewmanList2 of field NewmanResults to index1
Open Stack Quickie_Finder
set the cNewmanList2 of field NewmanResults to index1
end mouseUp
Notice above that the last line is called twice, once for each stack.
The debugger error in Q1 also comes when this scrip is called. It is a
button to go to a FIND substack of one card.
Thanks for any clarification.
--
Ta.
Mark Rauterkus Mark.Rauterkus at gmail.com
PPS Summer Dreamers' Swim and Water Polo Camp Head Coach with
Neighborhood Learning Alliance
http://NeighborhoodLearning.org
More information about the use-livecode
mailing list