I would like to search for all occurrences of a string in all scripts of a stack.
My first idea was to loop over all cards in the stack, and then loop over all controls of that card. But the problem is that if some cards contain "behave like a background" groups, the controls of those groups will appear on all those cards - that's the principle of a background - and therefore my loop will contain repetitions in the occurrences found.
I don't know if I'm very clear, so here's a diagram of a stack as it appears in the Project Browser:
Code: Select all
MyStack
	Card_1
		Background_Group_A 	// Behave like a background
			Btn_A_1
			Btn_A_2
		Background_Group_B 	// Behave like a background
			Btn_B_1
		Card_1_Group		// card group
			Fld_1
	Card_2
		Background_Group_A
			Btn_A_1
			Btn_A_2
		Background_Group_B
			Btn_B_1Of course, I could list the controls as I loop, and then test if the current control is already listed, but that seems a bit slow and crude. Is there a more elegant and faster way?



