Hi,

while working with dojox/dtl to fix some doc/amd issues, I noticed the
use of the dojo._getText function, and was wondering if such statement
was still valid in these amd times.
This function is defined in dojo/_base/xhr.js, but contrary to other
functions defined in this file on the dojo object, the _getText()
function is not mixin in dojo.xhr :
lang.mixin(dojo.xhr, {
_xhrObj: dojo._xhrObj,
fieldToObject: domForm.fieldToObject,
formToObject: domForm.toObject,
objectToQuery: ioq.objectToQuery,
formToQuery: domForm.toQuery,
formToJson: domForm.toJson,
queryToObject: ioq.queryToObject,
contentHandlers: handlers,
_ioSetArgs: dojo._ioSetArgs,
_ioCancelAll: dojo._ioCancelAll,
_ioNotifyStart: dojo._ioNotifyStart,
_ioWatch: dojo._ioWatch,
_ioAddQueryToUrl: dojo._ioAddQueryToUrl,
_isDocumentOk: dojo._isDocumentOk,
get: dojo.xhrGet,
post: dojo.xhrPost,
put: dojo.xhrPut,
del: dojo.xhrDelete // because "delete" is a reserved word
});

Is this omission done on purpose ? If yes, is it safe to still
reference it as dojo._getText in dtl ?

Thanks for your insight

--
Patrick

Search Discussions

  • Bryan Forbes at Aug 18, 2011 at 9:18 am

    Patrick Ruzand wrote:
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.

    - --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D
  • Patrick Ruzand at Aug 18, 2011 at 9:34 am
    Hi Bryan,
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.
    quick fix, thx :-) But it seems it was too fast ;-) the '.' is
    missing between dojo and _getText :
    l.822: _getText: dojo_getText,

    should be : _getText: dojo._getText

    Thanks
    Patrick
  • Ben hockey at Aug 18, 2011 at 9:54 am
    i took the liberty to fix it.

    ben...
    On 8/18/2011 9:34 AM, Patrick Ruzand wrote:
    Hi Bryan,
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.
    quick fix, thx :-) But it seems it was too fast ;-) the '.' is
    missing between dojo and _getText :
    l.822: _getText: dojo_getText,

    should be : _getText: dojo._getText

    Thanks
    Patrick
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Bryan Forbes at Aug 18, 2011 at 9:57 am
    /me hangs head in shame

    Thanks, Ben.

    - -Bryan

    ben hockey wrote:
    i took the liberty to fix it.

    ben...
    On 8/18/2011 9:34 AM, Patrick Ruzand wrote:
    Hi Bryan,
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved
    into dojo/_base/xhr. Good catch! I've added it to the return
    value of the module and committed it.
    quick fix, thx :-) But it seems it was too fast ;-) the '.' is
    missing between dojo and _getText : l.822: _getText:
    dojo_getText,

    should be : _getText: dojo._getText

    Thanks Patrick _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________ dojo-contributors
    mailing list dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Bill Keese at Aug 18, 2011 at 10:16 am
    See http://permalink.gmane.org/gmane.comp.web.dojo.devel/15424. You
    shouldn't assume that it was accidentally left out of the return
    value, it's likely that Rawld didn't add it to the module return value
    on-purpose, because people shouldn't be using it (although it needs to
    exist as the global dojo._getText() for backwards compatibility).

    On Thu, Aug 18, 2011 at 10:18 PM, Bryan Forbes wrote:
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Patrick Ruzand wrote:
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.

    - --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 ?5B61 3888 17E0 70CA 0F3D
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAk5NERsACgkQOIgX4HDKDz0MLgCeMkrt4GY6Up5jffE65zkDbuIo
    XH4AoMrwdwNjCL673iNndKD+2OS75Oi2
    =ofh2
    -----END PGP SIGNATURE-----
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Bill Keese at Aug 18, 2011 at 10:17 am
    PS: oops, try this link instead, to see the whole thread:
    http://thread.gmane.org/gmane.comp.web.dojo.devel/15424/focus431
    On Thu, Aug 18, 2011 at 11:16 PM, Bill Keese wrote:
    See http://permalink.gmane.org/gmane.comp.web.dojo.devel/15424. ? ?You
    shouldn't assume that it was accidentally left out of the return
    value, it's likely that Rawld didn't add it to the module return value
    on-purpose, because people shouldn't be using it (although it needs to
    exist as the global dojo._getText() for backwards compatibility).

    On Thu, Aug 18, 2011 at 10:18 PM, Bryan Forbes wrote:
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Patrick Ruzand wrote:
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.

    - --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 ?5B61 3888 17E0 70CA 0F3D
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAk5NERsACgkQOIgX4HDKDz0MLgCeMkrt4GY6Up5jffE65zkDbuIo
    XH4AoMrwdwNjCL673iNndKD+2OS75Oi2
    =ofh2
    -----END PGP SIGNATURE-----
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Ben hockey at Aug 18, 2011 at 10:20 am
    :)
    On 8/18/2011 10:17 AM, Bill Keese wrote:
    PS: oops, try this link instead, to see the whole thread:
    http://thread.gmane.org/gmane.comp.web.dojo.devel/15424/focus431

    On Thu, Aug 18, 2011 at 11:16 PM, Bill Keesewrote:
    See http://permalink.gmane.org/gmane.comp.web.dojo.devel/15424. You
    shouldn't assume that it was accidentally left out of the return
    value, it's likely that Rawld didn't add it to the module return value
    on-purpose, because people shouldn't be using it (although it needs to
    exist as the global dojo._getText() for backwards compatibility).


    On Thu, Aug 18, 2011 at 10:18 PM, Bryan Forbeswrote:
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Patrick Ruzand wrote:
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.

    - --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAk5NERsACgkQOIgX4HDKDz0MLgCeMkrt4GY6Up5jffE65zkDbuIo
    XH4AoMrwdwNjCL673iNndKD+2OS75Oi2
    =ofh2
    -----END PGP SIGNATURE-----
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Ben hockey at Aug 18, 2011 at 10:19 am
    i saw that thread and concluded that it was an accident to have left it
    out (see
    http://thread.gmane.org/gmane.comp.web.dojo.devel/15424/focus431).
    rawld asked bryan to look at it when doing xhr and during the thread
    there were objections to moving it to be public but nothing to indicate
    to completely remove it at this point.

    ben...
    On 8/18/2011 10:16 AM, Bill Keese wrote:
    See http://permalink.gmane.org/gmane.comp.web.dojo.devel/15424. You
    shouldn't assume that it was accidentally left out of the return
    value, it's likely that Rawld didn't add it to the module return value
    on-purpose, because people shouldn't be using it (although it needs to
    exist as the global dojo._getText() for backwards compatibility).


    On Thu, Aug 18, 2011 at 10:18 PM, Bryan Forbeswrote:
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Patrick Ruzand wrote:
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.

    - --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 5B61 3888 17E0 70CA 0F3D
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAk5NERsACgkQOIgX4HDKDz0MLgCeMkrt4GY6Up5jffE65zkDbuIo
    XH4AoMrwdwNjCL673iNndKD+2OS75Oi2
    =ofh2
    -----END PGP SIGNATURE-----
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Bill Keese at Aug 18, 2011 at 6:40 pm
    OK, well I guess it doesn't matter much since eventually that whole
    file will be deleted.

    To respond to Patrick's original question, ideally you should use async IO:

    xhr.get({url: ...}).then(...)

    or the text! plugin in your dependency list:

    "dojo/text!./templates/Dialog.html"

    but it may be hard to convert DTL to do that.
    On Thu, Aug 18, 2011 at 11:19 PM, ben hockey wrote:
    i saw that thread and concluded that it was an accident to have left it
    out (see
    http://thread.gmane.org/gmane.comp.web.dojo.devel/15424/focus431).
    rawld asked bryan to look at it when doing xhr and during the thread
    there were objections to moving it to be public but nothing to indicate
    to completely remove it at this point.

    ben...
    On 8/18/2011 10:16 AM, Bill Keese wrote:
    See http://permalink.gmane.org/gmane.comp.web.dojo.devel/15424. ? ?You
    shouldn't assume that it was accidentally left out of the return
    value, it's likely that Rawld didn't add it to the module return value
    on-purpose, because people shouldn't be using it (although it needs to
    exist as the global dojo._getText() for backwards compatibility).


    On Thu, Aug 18, 2011 at 10:18 PM, Bryan Forbes<bryan at reigndropsfall.net> ?wrote:
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Patrick Ruzand wrote:
    Is this omission done on purpose ? If yes, is it safe to still
    reference it as dojo._getText in dtl ?
    I'm assuming this was an omission when `dojo._getText` was moved into
    dojo/_base/xhr. Good catch! I've added it to the return value of the
    module and committed it.

    - --
    Bryan Forbes
    http://www.reigndropsfall.net

    GPG Fingerprint
    3D7D B728 713A BB7B B8B1 ?5B61 3888 17E0 70CA 0F3D
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.11 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAk5NERsACgkQOIgX4HDKDz0MLgCeMkrt4GY6Up5jffE65zkDbuIo
    XH4AoMrwdwNjCL673iNndKD+2OS75Oi2
    =ofh2
    -----END PGP SIGNATURE-----
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Patrick Ruzand at Aug 19, 2011 at 5:07 am
    Hi Bill,
    To respond to Patrick's original question, ideally you should use async IO:

    ? ?xhr.get({url: ...}).then(...)

    or the text! plugin in your dependency list:

    ? ?"dojo/text!./templates/Dialog.html"

    but it may be hard to convert DTL to do that.
    indeed, as it is today, DTL is all sync, and from what I see, moving
    the dtl code to async would be quite hard (if it is even possible).
    Thanks
    Patrick
  • Ben hockey at Aug 19, 2011 at 9:21 am
    i agree with patrick. i've looked into it and imo to make dtl async
    would almost necessitate going all the way back up the chain to
    dijit/_WidgetBase and re-architecting the widget lifecycle to allow
    buildRendering to be async. alternatively, you would just have to drop
    the features in dtl that need to be sync. either option didn't seem
    palatable or worth the effort due to limited maintenance support of
    dtl. my hope is for an alternative templating system sometime in the
    future. perhaps mark wubben's eyebrow (no link available) is an option
    and i suspect that some of kris zyp's recent work with xstyle
    (https://github.com/kriszyp/xstyle) and put-selector
    (https://github.com/kriszyp/put-selector) might lead nicely into a
    templating system (any plans kris?) but we'll have to wait and see.

    ben...
    On 8/19/2011 5:07 AM, Patrick Ruzand wrote:
    Hi Bill,
    To respond to Patrick's original question, ideally you should use async IO:

    xhr.get({url: ...}).then(...)

    or the text! plugin in your dependency list:

    "dojo/text!./templates/Dialog.html"

    but it may be hard to convert DTL to do that.
    indeed, as it is today, DTL is all sync, and from what I see, moving
    the dtl code to async would be quite hard (if it is even possible).
    Thanks
    Patrick
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors at mail.dojotoolkit.org
    http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Adam L. Peller at Aug 18, 2011 at 10:23 am

    On Thu, Aug 18, 2011 at 10:16 AM, Bill Keese wrote:

    (although it needs to
    exist as the global dojo._getText() for backwards compatibility).

    Well, it is a private, so it's not strictly part of our compatibility
    promise. No doubt, some users depend on it.

    -Adam
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20110818/9d247ee4/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedAug 18, '11 at 8:55a
activeAug 19, '11 at 9:21a
posts13
users5
websitedojotoolkit.org

People

Translate

site design / logo © 2022 Grokbase