PDA

View Full Version : [FIXED-180] DataStore ArrayStore data saving as string, not array



Artistan
12 Jul 2010, 9:48 AM
Designer 1.0.2.2
Windows 7 Pro.

Problem:
Create an ArrayStore.
Add to "data" this string... [[0,'a'],[1,'b]]
I would assume 2 records but it is saving as a string, not an array.
So when I "Load Data" it says "16 records loaded"

jarrednicholls
12 Jul 2010, 9:58 AM
Hi Artistan,

When the object or array editors cannot evaluate an entry for any reason (syntax error, object undefined, etc.) then it will translate it into a string automatically verbatim. I believe the data is storing as a string because you are missing a single-quote after "b". So when that is evaluated, it fails because of a syntax error and then instead stores it as a string. Just add a single-quote after the "b" and it will be good to go.

Artistan
12 Jul 2010, 10:02 AM
I added the quote after that, and still no good, "17 records loaded"
I just did that quick test because it is not working in another project I am working on. to large to post.

jarrednicholls
12 Jul 2010, 10:12 AM
It works for me: http://clip2net.com/clip/m50071/1278958312-clipi31510-95kb.png

But with that said, the # of records loaded is showing an incorrect number. However, the data is actually loaded as 2 records. So I will open a ticket to solve the incorrect number that shows after the data is loaded.

Thanks for reporting this!

Artistan
12 Jul 2010, 10:24 AM
Thank You.

jarrednicholls
12 Jul 2010, 10:30 AM
This is fixed for the next release.

Artistan
12 Jul 2010, 10:31 AM
Sweet, thanks.

Artistan
12 Jul 2010, 10:39 AM
Attached updated test.
When trying to preview a combo box with the ArrayStore data, preview does not work.

ldonofrio
14 Jul 2010, 8:24 AM
Yes, it's true.
Also, why we can't set the data [array] directly in the 'store' config of the combobox? It will be very usefull, no need for arraystore definition.

Thanks


Attached updated test.
When trying to preview a combo box with the ArrayStore data, preview does not work.

Artistan
14 Jul 2010, 8:30 AM
The ArrayStore is VERY useful for me. Allows reuse in multiple areas of the same store.

ldonofrio
14 Jul 2010, 8:32 AM
yes if this is the case but will be usefull to have the other way too

jarrednicholls
14 Jul 2010, 9:06 AM
We don't/can't support hybrid configurations at the moment, although we could make the store config an "object" type, and you could either supply a string or an object/array of static data. So while we could make it work for this particular case, in general, a lot of "Mixed" configuration types are hard to do.

I encourage making this a feature request of course. I think it would be good.

ldonofrio
14 Jul 2010, 11:04 AM
ok jarred, i understand