Hello, I want to translate something I fetch from an RPC call:
// ... inside a function of application.Gui ... var self = this; rpc.callAsync(function(result, exc) { for (var i = 0; i < result.length; i++) { var g_type = result[i][5]; switch (g_type) { case "0": result[i][5] = self.tr("EC/MC"); break; } } res_model.setData(result); }, "getXXXXXXX"); But it is strange - instead of "EC/MC" (I don't have translations yet, I only want the app to be i18n-enabled), the table contains an empty cell. If i do an alert(result[i][5]) immediately after result[i][5] = self.tr("EC/MC"), it correctly shows "EC/MC". Also, result[i][5] = "EC/MC" correctly fills the table with "EC/MC". The only problem is that the translated string is replaced by an empty one as soon as the function() returns. I think this may be a scope problem. Is there a possibility to make the translated string survive the return? Or is it something very other? -- Richard Hirner ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel