Here is the single line (in many forms) I cannot get to work in a function call in one stack, when the function is called from a button in another application stack:
Code: Select all
find pBackName in fld "fWords"
find pBackName in fld "fWords" of the name of me
find pBackName in fld "fWords" of me
find pBackName in fld "fWords" of stack "sNames"
find pBackName in fld "fWords" of stack the short name of me
find pBackName in fld "fWords" of this stack
put "fWords of this stack" into tFieldName
find pBackName in fld tFieldName
put "field" && quote & "fWords" & quote && "of me" into tFieldName
find pBackName in tFieldName
I am really trying to avoid having to do this on every function call, because it turned out to be inconsistent since some of my function calls call others, many of the functions have multiple exit points. and it adds a tremendous amount of code. It looks simple here, but in a complex function set it is unusable:
Code: Select all
local tDefaultStackName
put the defaultStack into tDefaultStackName
set the defaultStack to "sNames"
find pBackName in fld "fWords"
if (someTestCondition) then
set the defaultStack to tDefaultStackName
return "Exited because of XXX"
end if
--call some other functions which also need to set defaultStack and also have multiple exit points
set the defaultStack to tDefaultStackName
return "Exited because of YYY"
...
I want to avoid the defaultStack complexities. My only other thought is going async (wait on a return event from the library stack) or brute force (repeat for each card, etc), but that's an entire new set of compexities.
Thoughts? Or are we all stuck with this? Thanks, Walt