set summary

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

set summary

Will
Please take a look at ai.js.luan

I was able to access the summary by resume id in server, but when I try to update it, it doesn't change.
Reply | Threaded
Open this post in threaded view
|

Re: set summary

fschmidt
Administrator
fixed

Your "s" is just a local variable and setting it doesn't change the data.
Reply | Threaded
Open this post in threaded view
|

Re: set summary

Will
So, the "local data = resume.getJasonData()" is a pointer, but my local is a value?

Also, is these two lines required to set the value?

        resume.setJsonFromData()
        resume.update()

Reply | Threaded
Open this post in threaded view
|

Re: set summary

fschmidt
Administrator
Will wrote
So, the "local data = resume.getJasonData()" is a pointer, but my local is a value?
You can think of everything as a pointer.  After
	local data = resume.getJsonData()
You have resume.data -> jason_data and local data -> jason_data.  And jason_data -> blocks -> html.  If you do
	local s = data.blocks[1].html
Then s -> html meaning the string in "html".  If you now do
	s = "xyz"
Then s -> "xyz" and the data is unaffected.

Also, is these two lines required to set the value?

        resume.setJsonFromData()
        resume.update()
Yes but this may change later.  Resume is still a java class so the interface isn't perfectly clean.