[Plugin] Table (2D Dictionary)

Post your completed addons to share with the community

Post » Fri Feb 27, 2015 10:37 pm

This is a simple 2 dimensional associative array (values access by "name" instead of integer "0" index). It functions just like the official "Dictionary" plugin but it has 2 dimensions instead of 1. :)

It supports loading raw JSON data directly to it which can be useful if you do a lot with AJAX.

It supports minification and I believe all bugs have been found but if you find any please let me know. I use this in all my projects so I will actively maintain it to ensure it works correctly.

Plugin
TRBLSM_table.zip

Example capx that demonstrates all functions supported.
TableExample.capx

Image

If you have any questions or need help using it Ill do my best to answer in a timely manor.

Thank you :)

P.S I also created a 3D version so you if you need a larger object you can try out the "Storage" plugin instead.

[Plugin] - Storage (3D Dictionary)
https://www.scirra.com/forum/plugin-storage-3d-dictionary_t125861
Last edited by troublesum on Sat May 09, 2015 11:02 pm, edited 5 times in total.
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Thu Mar 05, 2015 2:09 pm

Hi,

Thanks for this plugin, that's help me a lot. But I need you're help.

Currently I get two server response type:
first have this form : "{"USER":"CAN'T_CONNECT"}" and i have no probleme to get the user parameter.
second have this form "{"USER":{"somekey":"somevalue"}} and when I try to get USER value with Table.Get("Query","USER") but i get "0" and not my json object.

Any tips to fix that?
B
5
Posts: 3
Reputation: 242

Post » Thu Mar 05, 2015 5:48 pm

@AGCompany - No problem let me see if I can help :) .. So if I understand you correctly your trying to load this into the table object and and then get the "somekey" value out of out it?
Code: Select all
{
"USER": {
   "somekey": "somevalue"
    }
}


A 2D JSON object is considered a Table and each row in it is a List and each List has fields with Values.

Table=> [List] => [Field] = Value
Table=> USER => somekey = somevalue

You need to use the "Merge JSON to Table action to load your JSON object and then use the Table.Get([list],[field]) expression to retrieve the value
test.png


The screen shot above will print "somevalue" to the text object

Here is a capx demonstrating how to get the value
test.capx


Hopefully this helps :)
You do not have the required permissions to view the files attached to this post.
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Wed Mar 11, 2015 2:07 pm

That's it, thank's for the help :)
B
5
Posts: 3
Reputation: 242

Post » Sun Mar 29, 2015 11:50 am

where is the download link?
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
55
S
13
G
2
Posts: 282
Reputation: 6,241

Post » Sun Mar 29, 2015 12:14 pm

he forgot it :p :p
B
26
S
7
G
4
Posts: 237
Reputation: 4,204

Post » Sun Mar 29, 2015 11:56 pm

Yah.. the forum doesnt support files any more.. i need to upload it to drop box and create a link.. ill gget the links up tomorrow
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Tue Mar 31, 2015 3:21 am

thanks
B
26
S
7
G
4
Posts: 237
Reputation: 4,204

Post » Wed Apr 01, 2015 7:59 pm

Moved files to drop box and updated the links... they can be downloaded again.
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Sat May 09, 2015 10:07 pm

Hi, very cool plugin, saved me a lot of messing around with arrays and dictionaries, great work!
I am having problems getting "Sort List" to work on my table, is this action not fully working yet?
I am asking because I noticed it is not documented in the example capx.
Image
B
64
S
26
G
12
Posts: 503
Reputation: 11,883

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests