[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] SetTmp and selected blocks



Gavin Wraith <gavin@xxxxxxxxxxxxxxx> wrote:

> I guess one could save the StrongED$Tmp_xxx variables to other temporary
> variables before issuing the SetTmp command. That would only mean amending
> the BaseMode file. But it is a bit kludgy because you have to be sure that
> no intermediate actions overwrite the new variables. Has anybody any ideas
> on this?

How about adding one new variable (eg StrongED$Tmp_WinHan) to the pool of
vars saved by SetTmp(), which stores the window handle of the window from
which those vars were saved?

Then implement a new function SetTmpWH() which saves the whole set of vars,
but instead of creating eg 

    StrongED$Tmp_xxx

creates

    StrongED$Tmp_wh_xxx

so where needed one could first call SetTmpWH() to save all the
window-specific info, then call SetTmp() which stores the WH value that
anything subsequently called will need so it can access the first lot of
vars.

Then in another window, it too can call SetTmpWH() and then SetTmp() and
then run some external logic.  

External apps would still need to save (using their own logic) the
most-recently set value of StrongED$Tmp_WinHan.


Or, as well as having SetTmpWH() update a set of window-specific values,
have it maintain a stack/queue of most recently saved WH values, perhaps
along with the timestamps they were saved.  At any point an external caller
could look at this list of recently-saved WH values and eg check that there
are at least two of them, check that their timestamps are recently and
slightly before that (up to you to decide how recently), and if so pop the
two values off the stack (or not, depending if that makes sense) and use
them as required.






-- 
Jeremy C B Nicoll - my opinions are my own.

--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx
List archives at http://www.Torrens.org.uk/RO/StrongED/index.html