Login Register

deferred

Deferred Call in Constructor Fails to Initialize Properties

I have a real show-stopper using a remote procedure call. In fact the problem arises using a deferred call of any kind, as evidenced in this example. Here is a class that initializes its properties using a deferred call:

dojo.declare("Foo", null {

   bar: null,

   constructor: function () { 
      var deferred = new dojo.Deferred();
      deferred.addCallback(gitterdun);
      deferred.callback("Hello World!");
   },

   gitterdun: function(baz) { this.bar = baz; return baz; }
}
...

Now, I can require that class, and new one in page head as follows:

Xhr deferred multiple responses

I have a app that queries if the value in a textbox is valid. Validation is done on each keyup. Problem is in this:

0) Valid input is "dojofile.data"
1) User types one letter at a time and writes "dojofile.data".
2) The data sent is "d", then "do" then "doj", then "dojo" etc.
3) At some point, the last two are sent, "dojofile.dat" and "dojofile.data".

[Solved] Tables in Widgets = problems?

Hello, world:

I'm working on a composite widget. It consists of dijit.form.ValidationTextBox and some divs that get populated with dijit.form.TextBoxes or their innerHTML gets set, depending on user input and some dojo.xhrGet action.

I've been working with this widget for awhile now with no errors, but today I'm getting an unexpected and frustrating error.

Two changes to my working code:
1. put everything in the template in a table for visual reasons.
2. added a new div to let the user know why they're getting form fields instead of innerHTML updates.

Here's my template:

Syndicate content