In order to facilitate the help I hope to find here I will quote my preliminary scripts to the 5 involved objects:
PTStack script
on openCard
put name of this card into field "PictureName"
put empty into char 1 to 4 of field "PictureName"
end openCard
PTCreate new button script
on mouseUp
go to last card of this stack
new card
ask "Give a name to this picture"
select this card
set the name of this card to it
put it into field "PictureName"
end mouseUp
PTBaptize button script
on mouseup
ask "Give a name to this picture"
select this card
set the name of this card to it
put it into field "PictureName"
end mouseup
I imagine that the "Baptize card" button should include a new handler to send the cardname to the pop-up menu, thus adding it as a selectable option, which, when clicked, will open the indicated card.
The "delete card" button should then include a handler, which would remove the corresponding option in the pop-up menu
PT Delete button script
on mouseup
delete this card
end mouseup
A complication is, that user has the option to re-baptize a card. This should of course result in the old cardname being replaced by the new cardname in the pop-up menu. I guess this should be handled through an addition to the script of the Baptize card button script.
PopUp menu script
on menuPick pItemName
switch pItemName
case 1
open card 2 of this stack
case 2
open card 1
card 3
end switch
end menuPick
So this is where I am stranded
