Thanks to Bernd for the simplest solution to my practical problem. If we "go 
to" Stack A "the selectedChunk" will mean "the selectedChunk in stack A". But, 
as he notes, preservation of the prior selection depends on certain conditions 
(more on this below). 




One anomaly is that "the selectedChunk" seems to preserve its value when we are 
NOT in Stack A--but ONLY if it was (let's call it) a "selectedRun" and not just 
an insertion point; and ONLY if we are not in and have not navigated to some 
stack with an unlocked field. (It turns out that whether Stack B is a palette, 
and my "set the default stack to StackA" command, are both irrelevant). 




This anomaly may have no practical importance, given Bernd's approach (and the 
option others have explained to store our own record of the selectedChunk). But 
one other aspect of Bernd's approach is surprising. When we "go to" a stack 
(either by script or by clicking on the title bar), the restoration of its 
prior selection varies as follows: 

1. if it was a selectedRun, and we have not since been to a stack with an 
unlocked field, the selectedChunk remains that run. 

2. If it was a selectedRun and we have been to a stack with an unlocked field, 
the selectedChunk becomes an insertion point just after the selectedRun. (!) 

2. If it was an insertion point, that insertion point seems to be restored as 
the selectedChunk--EVEN IF we have visited a stack with an unlocked field. 




David Epstein 
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to