>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




General

Author Thread: Missing Values (empty cells)
Nicolai.Ohm
Missing Values (empty cells)
Posted: Friday, July 15, 2005 6:53 AM (EST)

What I find a bit cumbersome with the APL Grid is the asymmetry of handling Missing Values. When I retrieve data from cells, that contains nothing, than the contents will be displayed in APL as ConversionErrorValue (i.e. -2147352572). When I write the array back to the grid, the cell contents (which previously contained nothing) is displayed as -2147352572

 

Here is an example illustrating the problem:
1) open the Grid example (fmDemoGrid_Hnd, fmDemoGrid_Make) of the REL50.w3 Workspace distributed with APL+Win
2) delete a cell in the Annual Sales Page using the <DELETE> key
3) move the selection to the next cell
4) than the contents of the "empty cell" will be displayed as -2147352572

(this will not apply if you delete the cell contents using the backspace key,  because the code in  fmDemoGrid_Hnd 'onXEditComplete' will reset an empty cell to Zero)


Actually, I'm looking for a way to tell the grid that a specific numeric value (i.e. the ConversionErrorValue or -2147352572) is a Missing Value and should not be displayed.

 

I have an APL Array where certain cells contain Missing Values, which I encoded with -2147352572. How can I set this array into the grid so that the cells with -2147352572 contain nothing and still are numeric (xValueType=2)?

 

In our current code, I set the APL array right into the grid and then 'xDeleteCells' all cells containing a missing value (-2147352572) but this is not very convenient when the missing values are scattered around in the grid.


Comments:

Author Thread:
Support
Missing Values (empty cells)
Posted: Friday, July 15, 2005 10:20 AM (EST)

Are you aware that you can assign a value of your choice to the xConversionErrorValue property?  Well, you can.

APL2000 Support

     

Nicolai.Ohm
Missing Values (empty cells)
Posted: Friday, July 22, 2005 5:44 AM (EST)

Yes, I was aware of the xConversionErrorValue property. But this is not the issue. What strucks me is that the xConversionErrorValue is asymmetric. When I read empty cells from the grid, they are assigned with the xConversionErrorValue (i.e. -2147352572). When I write this value from APL to the grid, it’s not an empty cell, but now the xConversionErrorValue is displayed in the cell. I my view it should be symmetric:


1) I read empty cells from the grid
2) They are assigned the xConversionErrorValue
3) I write these cells back to the grid
4) The xConversionErrorValue should be not displayed, but the cells should remain empty


In our application, after writing an array with empty cells to the grid (which contain the xConversionErrorValue), I need to xDelete all cells where the xConversionErrorValue is displayed. This is no problem, I have a statement like the following


ŒWI¨(››'xDeleteCells'),¨"indices all empty cells"

 

but it complicates the code.

     

Support
Missing Values (empty cells)
Posted: Friday, September 22, 2006 4:03 PM (EST)
FYI, this matter is addressed in the second version 6.4 beta that is being released today.  Refer to the new xMissingValue and xMissing properties for the APL Grid control in the release notes (readme.txt) for further information.

     



APL2000 Official Web Site

To err is human, but when the eraser wears out ahead of the pencil, you're overdoing it.
- Josh Jenkins

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |