spartacus
27th September 2011, 18:17
Hello,
I just try to readout the "DsNstringArray" of an "DsCgrid" object.
The code is:
string myx(100)
get.object(kommi.grid,DsNstringArray,myx)
but passing this lines brings up a "resource DsNstringArray for object 3684 of type DsCgrid in process 243 not allowed"
Where "kommi.grid" is my DsCgrid object and "myx" the string I try to fill.
Anybody knowes an example or the right syntax?
Kind regards
Richard
zardoz
27th September 2011, 21:43
IMHO, I think the problem is the way you build the array myx instead of the syntax, that's correct.
spartacus
28th September 2011, 10:17
IMHO, I think the problem is the way you build the array myx instead of the syntax, that's correct.
Do you have any suggestions how to build the array? I will appreciate any idea.
Thx
Richard
zardoz
28th September 2011, 12:04
I've only informations taken from the manual, never tried by myself:
DsNstringArray
A one-dimensional array that holds data values for selected cell(s). When filling multiple cells, separate the data values with null characters. The data is filled from left to right and from top to bottom.
From the example:
listitems = "article -1-printers-2-graph -3-books -4-logo-5"
store.byte(0, listitems(9))
store.byte(0, listitems(11))
store.byte(0, listitems(20))
store.byte(0, listitems(22))
store.byte(0, listitems(31))
store.byte(0, listitems(33))
store.byte(0, listitems(42))
store.byte(0, listitems(44))
store.byte(0, listitems(49))
Hope this can be helpful.
spartacus
28th September 2011, 13:18
Maybe I unterstand wrong. But as far as I see, you fill a string, which you can put to DsNstringArray. All dashes (-) are replaced by zero bytes.
But how to read the whole string or even single fields back to another string?
Thx for your support
Richard
zardoz
28th September 2011, 13:39
Search in the manual for evt.grid.-----() functions.
Those functions could (I think) solve tour problem.
spartacus
28th September 2011, 17:21
I got it :)
I can't use "get.object()" for an "DsNstringArray" attribute. It's written in the f... manual! I have to use "query.object()".
Now I tried:
long length
string myx(100)
query.object(kommi.grid,DsNrow, 2, DsNcolumn, 1, DsNstringArray,myx,length)
and I get the value of row2/column1 of the grid ... that is what I want!!
Thx and kind regards
Richard