this.continue_to is missing in v2? Causes issue with this.class

1 view
Skip to first unread message

Mark

unread,
Dec 20, 2009, 12:54:52 PM12/20/09
to JavaScriptMVC
Hi there,

I am still migrating :-) ... basically i have a jquery $.get that
gets an xml and then calls this.continue_to ... but appears not to be
working... has it been removed? searched the forums nothing..

All code worked in 1.5

If i just call the method then this.Class is UNDEFINED and i use
this.Class to save my vars when in a controller

Basically if on the callback i don't use this.continue_to then when it
arrives in processFaq the this.Class is undefined...

Here is the simple code

// Load in faq's
//$.get("content/xml/faq.xml", this.continue_to('processFaq'));
// Load in faq's
this.Class.test = ""; // this.Class is "VALID" here
$.get("content/xml/faq.xml", this.processFaq); // callback to
processFaq without this.continue_to
},
processFaq: function(data) {
// MORE CODE HERE - Removed..
this.Class.faqs = faqs; // this.Class is undefined

Mark

unread,
Dec 20, 2009, 12:59:07 PM12/20/09
to JavaScriptMVC
To be a bit more specific...

in my processFaq i need to store the faq which is an array that i
built from the XML file INTO a class variable

as i need access to it in the click event in the same controller ..

i.e.

var faqs = new Array();

// CODE TO BUILD FAQS variable.

this.Class.faqs = faqs; // STORE IN class level var so i can
access anywhere in controller

Alexandre Gomes

unread,
Dec 20, 2009, 1:00:01 PM12/20/09
to javascriptmvc
You have to use 

   this.callback('processFaq')

Alex


--

You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.



Alexandre Gomes

unread,
Dec 20, 2009, 1:01:18 PM12/20/09
to javascriptmvc
See


Alex

On Sun, Dec 20, 2009 at 5:54 PM, Mark <smi...@live.com> wrote:

Mark

unread,
Dec 20, 2009, 1:04:09 PM12/20/09
to JavaScriptMVC
Thanks Alex!! I didn't know that... Thats great, it works a treat!!

Thanks for the prompt reply.

On Dec 20, 7:01 pm, Alexandre Gomes <alexandre.r...@gmail.com> wrote:
> See
>
> http://javascriptmvc.com/#&who=jQuery.Model
>
> <http://javascriptmvc.com/#&who=jQuery.Model>Alex

> > javascriptmv...@googlegroups.com<javascriptmvc%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages