Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: global variables

Yes, that global variable list at the top of code is probably my oldest lesson learned. So often, routines intended to return values did not work in my early efforts, and I discovered that writing to a global solved most such problems.

In this case--and almost certainly due to the peculiarities of asynchronous processing, the global variable trick did not work. I still have not figured out what the pattern is--why the values show up at some points of the processing but not in others, but as stated earlier I found a workaround. The essential nature of my problem is that processing my library items (=email) as a batch elicits different behavior from when the items have already been processed and are now resident in the list. If I check an item in the list--where that list was written in a previous batch, then all is well. When I write to the list as part of the current batch, then the logic that asks "is that item already in the list?" always fails. It has in fact been written to the list but is not visible as such _within the batch processing_. I therefore developed a technique that handles batch processing within arrays. Seems to work fine, so I'm satisfied.


Viewing all articles
Browse latest Browse all 6517

Trending Articles