Ha! Point, Brandon.
This is indeed what is happening. I was just returning to this thread to
ask how / when OIDs change. My re-get of the row oids solved the first part
of my problem. The second, the one I'm now working, is, I think, a
different variation on OIDs changing out from under me.
My tab allows an author to open an individual element up for editing in a
"pop-up" Edit Window. Before I open this window, I write any other changes
the author may have made in the XUI tab. So far (and I have three or four
panels that work like this), I have not had to add/delete elements, simply
remove, insert, or overwrite their contents. This new tab works with a XML
where I am replacing a child element. This, I think, is tipping over my
OIDs.
So, for a slightly less simplified example, I am manipulating:
<item1><value>string content</value></item1>
Sometimes there is no <value> tag (either before or after I write,
depending).
So, my current problem is that I pass an OID to a function that calls a
writeall() function before opening the pop-up window for the element
represented by my OID. Depending on the type of writing the writeall()
function does, my OID may be invalid by the time I try to open it.
Waaa.
Any fancy tips for saving document locations (OIDs) when OIDs don't persist?
On Tue, Jan 24, 2012 at 9:47 AM, Brandon Ibach <
brandon.ibach@single-sourcing.com> wrote:
> Try throwing some debugging statements to dump out the OID values
> after each "refresh". The actual OIDs in the document may be changing
> due to changes made by your ACL code as you process each one. The
> OIDs in the array therefore become "stale" and invalid, necessitating
> the call to fetch the new values. Not that this will change how you
> address the problem, but at least you'd know for sure why you have to
> do it that way.
>
> -Brandon 🙂
>
>
>