Gast: JSON Javascript Scopes

Beitrag lesen

Cool danke für die Antwort. Das war der Fehler.
Jetzt habe ich ein anderes Problem:

$(document).ready(function(){  
	new Start();  
});  
  
var Start = function(){  
	var that = this;  
	var text ="test";  
	  
	 jQuery.getJSON("json/objects.json", function(data){  
		that.draw(text, data);  
	});  
};  
  
Start.prototype.draw = function(text, data){  
  
	alert(text);  
};

Anscheinend kann ich text nur in der prototype funktion aufrufen, wenn ich es als parameter in der callback funktion mit übergebe. Gibt es einen besseren Weg mit einem prototype auf die variable der Klasse Start text zuzugreifen?