Page 3 of 3

Re: What's the easiest way to work with tons of text lines?

PostPosted: Tue Apr 08, 2014 3:36 pm
by DUTOIT
Can you attach the capx?
Go full editor - and upload attachment and attach the capx of your test.
That will save us time. I suspect your json isn't formated correctly.

Re: What's the easiest way to work with tons of text lines?

PostPosted: Tue Apr 08, 2014 3:59 pm
by part12studios
sure thing.. here it is https://www.dropbox.com/s/dvfxbtsi4rk7d1j/PunTest.capx

yea i just want the simplest way to call on text information and put that information where it needs to go. :)


Thanks!
Caleb

Re: What's the easiest way to work with tons of text lines?

PostPosted: Tue Apr 08, 2014 4:18 pm
by NEONN64
DUTOIT wrote:Can you attach the capx?
Go full editor - and upload attachment and attach the capx of your test.
That will save us time. I suspect your json isn't formated correctly.


Sorry to butt in, but I'm also trying to learn how to use json files.

I'm trying to populate a dictionary with a json file. But when I try to get the values from the dictionary (after the loading is completed) I only get a 0 on each of them. I guess my json doesn't have the right format.

So I'm trying to manually populate the dictionary and then Download it as json (so I can inspect the file and see the format) but I can't find the resulting json file. So...

When you Download something as a json file where is it stored?

(For example: In the capx you provided, after populating the array you download it as json with the file name "carddata.json". But where can I find "carddata.json" ? I can only see the project file "CData2.json".)


EDIT:
lol, I found my answer. I had node webkit for previews. I changed to Firefox and after running the project now I see it ask you where to store the file as any regular download. So, please omit this post.

Re: What's the easiest way to work with tons of text lines?

PostPosted: Tue Apr 08, 2014 5:21 pm
by part12studios
ah yes i was going to say, the demo that was provided for me was a file.. but watch out to not click always allow.. it freakin' goes on a save frenzy.. had i think bout 80 files generated on my computer before i could end task! :)

Caleb

Re: What's the easiest way to work with tons of text lines?

PostPosted: Tue Apr 08, 2014 6:32 pm
by DUTOIT
@part12studios,

Yip, your formating was wrong.
Attached corrected puns.json it works now.

Sidenote: see my gravatar - that's my son, and his name is Caleb too :lol:

Re: What's the easiest way to work with tons of text lines?

PostPosted: Wed Apr 09, 2014 2:36 am
by part12studios
Ok so yea I went to a weekly event over at the Cambridge Microsoft office and worked with one of their evangelists who works a fair amount in C2 and we managed to figure out how to get what I need (which if course you've been saying, but I wasn't understanding completely).

{
"c2array":true,
"size":[4,2,1],
"data":[
[["Joke1"],["Punchline1"]],
[["Joke2"],["Punchline2"]],
[["Joke3"],["Punchline3"]],
[["Joke4"],["Punchline4"]]
]
}

Once i got those right and understood how to properly made a 3d array call I now have it working as I was hoping for. If anyone finds this and needs some help let me know and i'll explain what i understand (which is the bare minimum, but i think what i can do now with this will still be a substantially useful feature.

Once again the C2 forum community has been amazing. Thank you so much everyone for your help with this! I'm sure I'll want to do more fancy stuff in the future with this, but for now i'll make this work! :)

Sincerely,
Caleb

Re: What's the easiest way to work with tons of text? [Solve

PostPosted: Thu Apr 10, 2014 7:01 pm
by DUTOIT
Glad it works :)

Re: What's the easiest way to work with tons of text? [Solve

PostPosted: Thu Apr 10, 2014 7:05 pm
by part12studios
me too! :) thanks @DUTOIT

Re: What's the easiest way to work with tons of text? [Solve

PostPosted: Thu Apr 10, 2014 8:53 pm
by cjbruce
@DUTOIT and @part12studios

Thanks for all of the hard work here. A few weeks back I made the mistake of doing a big data-loading project like this in XML. Then I realized that I wouldn't be able to export to iOS (my target audience) because neither CocoonJS nor Ejecta allow the XML plugin. I will need to port everything over to JSON instead, and this is just the ticket.