I have a datawindow control in one window, that is ShareData'd to a datastore in another window
Under some set of circumstances that I have not been able to reproduce in a tiny environment, a call to setfilter corrupts the current filter on the datastore. eventually, I try to use what was the current filter, and get a datawindow expression not valid error.
The sequence is something like this ...
PowerBuilder 12.6, build 4035
classic
(IDE or runtime)
window a:
has a datawindow control
with a dataobject
setTrans
retrieve
window b:
datastore (as an instance variable)
datastore is created, dataObject is set to the same one as window A's datawindow
Sharedata
One can look at the current filter for a datawindow/datastore by using describe("datawindow.table.filter")
after a call to setFilter in window B... the data from describe("datawindow.table.filter") is a string of unprintable characters.
Eventually, when I try to restore the previous filter, this causes a Datawindow expression not valid error.
I happened to notice that in this case, the filter string I was passing to SetFilter happened to be the current filter string.
If I test for such things, (and do not perform the setFilter when there is no change being made) the error is (so far) avoided.
But I don't feel I should have to do this test.
I've looked (and looked) for anyone else discussing something like this, but the closest matches had to do with bad syntax in the filter expression. In my case the expression is just fine (well, the one I pass to the setFilter). The expression reported by Describe is bad (and certainly NOT what I just set the filter to be.)
For what it's worth, the expression I am setting in this case is:
record_status = 'ACTIVE'
I put the datawindow in a tiny simple window, used the same data object, retrieved with the same arguments, used the same filter. Unfortunately ... no errors. It only errors in the midst of a lot of other code. My attempts at reproducing the gist of that code in condensed form have not been successful in reproducing the error in the small space.
I've tried intercepting the datastore just before the offending setfilter, using getFullState/setFullState to copy things to the debugging window. But .. in the debugging window, the setFilter still does not cause a problem. sigh.
Any ideas?
And/or, tips on how this post should have been done? (first post I've made)
And/or ... how does one report an issue for 12.6? (Assuming someone does not recognize this as a known issue.)
Mike