A while back I posted a message about a popup 'breaking' out early. Here's what I'm trying to do:
- Button click triggers event handler
- Record keys are passed to a popup
- Popup is displayed
- If keys are returned, a new window is displayed with selected record(s)
The problem is, when I sort on a numeric column, control passes back to the event handler (with no selected keys) - but the popup remains displayed. So if I sort on the numeric column, and then select records - there is no resulting window displayed.
I think I've isolated the problem a little better at this point - if the numeric column in the popup contains any non-numeric values (ie. null), this condition presents itself. If 'all' the rows have some numeric data (zero instead of null) things seem to work OK.
The obvious workaround - make sure there are no null values.
I'm guessing it has something to do with setting the SORTEDCOL property (line 543 of Popup):
PS_Set_Property(@window: ET_POPUP$, "SORTEDCOL", Col: @fm: Sort)
although the popup does display the sorted data before it breaks.
Is there any chance of fixing this so that null values are ignored (considered to be zero)?
Thanks,
Jeff
After further testing - it seems the null value may not be doing it. If I sort on the numeric column before all the records load into the popup it works, if I wait until all records are loaded it breaks. Only on the numeric column. I can wait or not for any of the other columns, and it works fine - just sorting on the numeric column creates the problem. On the one hand I wonder if the size of the sort has anything to do with it - but why would the other columns sort without a problem? Is the sort routine different for numeric/non numeric columns?
Thanks,
Jeff
Jeff (Cameron)
I have just created a new popup for a SIC table (2k entries). This popup displays only the SIC code which is numeric. Dict says it is integer.
In UI I test the POPUP. I Shift-DClick the column and if I do this before the data is completly loaded all is okay. If I do this after the data is loaded .. it sorts then I get the "no value return" message.
I am using 3.6.1
dsig
David Tod Sigafoos ~ SigSOlutions
[email protected] cis:70302,77 voice:503-639-8080
David,
It's nice to know the problem is reproducable on someone else's system. The thing that seems strange to me is that the popup remains visible and functional (kind of) instead of closing. This would definitely cause problems with the users.
I don't think the fix will actually be in the Popup code either - something strange happens after the sortedcol property is set under these conditions.
Jeff
Jeff,
We just need to see if cameron or gene reply to these notes and if they can reproduce ..
dsig
David Tod Sigafoos ~ SigSOlutions
[email protected] cis:70302,77 voice:503-639-8080