dojo

How do I debug my asynchronous, promise based code if the library is swallowing all the exceptions?

被刻印的时光 ゝ 提交于 2019-12-18 12:16:54
问题 The Problem JSFiddle : http://jsfiddle.net/missingno/Gz8Pe/2/ I have some code that looks like this: var d = new Deferred(); d.resolve(17); return d.then(function(){ //do some stuff... }) .then(function(){ var obj = a_funtion_that_returns_null_on_IE(); var x = obj.some_property; //BOOM! }); The problem is that when I am on IE all I can see are 'obj' is null or not an object errors, without any reference to the corresponding line number and without the debugger halting at the offending line

IBM Worklight 6.0 - scriptError in dojo.js:21

和自甴很熟 提交于 2019-12-18 09:49:41
问题 I have created a simple application using the bundled Dojo v1.9 and upon running it device or emulator, I am getting the following error: 07-08 05:38:17.429: E/Web Console(530): Error: scriptError at file:///data/data/com.WorklightApp/files/www/default/dojo/dojo.js:21 These are the steps that I took: Create a Worklight project and application (with Dojo) Add a simple dojo tag on the main page Add the Android environment Build All and Deploy Run on device and/or emulator The dojo components

Dojo Enhanced grid with pagination need to access number of rows in the page

二次信任 提交于 2019-12-18 09:39:13
问题 I am implementing Dojo EnhancedGrid with pagination and there is something called items per page . 10 | 20 | 30 | 40 | 50| all. Suppose I select here 20 in the EnhancedGrid pagination. How to access the value 20 from the program? I want to get this value and store it in a variable say Page-size . I am using Dojo version 1.6.1 回答1: You can access the page size in dojo 1.6 using this: yourGrid.pagination.plugin.pageSize; Here is a working jsfiddle using dojo 1.6: http://jsfiddle.net/SM8GS/1/ It

dojox DataGrid onStyleRow works first time, then not again

倖福魔咒の 提交于 2019-12-18 09:34:53
问题 I am trying to make a legend using a DataGrid . My problem is, I want the text in the Datagrid to be colored. I use the onStyleRow function as outlined here: (http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html) and it works the first time after deploying. The text in the DataGrid comes up red, but if i refresh or open try it on a different browser, the DataGrid text does not come up red, just the standard black. I was wondering, what I was doing wrong, Thanks, Here is my code: if

localStorage Size Limits… What are the options?

走远了吗. 提交于 2019-12-18 08:26:20
问题 I plan to use persistant localStorage in one of my projects and i have found out that the size limitation is 5 MB (chrome). I searched other frameworks which implmented the same thing, like Mootools, Dojo, Lawnchair but i couldnt find out what are their size limitations. Does anyone know what are the size limitation is in these. And what other options are there which i can use if not the one already stated above. 回答1: localstorage limits are not tied to the javascript framework, but to the

Fast, lightweight XML parser [closed]

瘦欲@ 提交于 2019-12-18 05:45:11
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I have a specific format XML document that I will get pushed. This document will always be the same type so it's very strict. I need to parse this so that I can convert it into JSON (well, a slightly bastardized version so someone else can use it with DOJO). My question is,

How to retrieve XHR response code (+timestamp) of AMD'ized Dojo?

ε祈祈猫儿з 提交于 2019-12-18 03:37:06
问题 With the "old" Dojo one could pass a second argument ioargs to the load function of a Xhr request (see Example 6 here). This ioargs provided (among other things) the timestamp and status code of the request. But how can I achieve this with the new and "cleaner" (and forward compatible) Dojo? Unfortunately, I could not find any hints in the current documentation. The following should be a port of above referenced example to the "new" Dojo. But, ioargs will be undefined: require( "dojo/request

Warning : The page index.html ran insecure content

冷暖自知 提交于 2019-12-17 23:24:22
问题 I deployed my application on google appe engine. My web site use Dojo with the template claro. When I run "google chrome inspection", I see a lot of warning when I navigate throught my site. Here is the type of warnings : The page index.html ran insecure content from http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css. The page index.html ran insecure content from http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js. Do I need to configurate something in the

Dojo validation of a textarea

早过忘川 提交于 2019-12-17 20:35:50
问题 I'm attempting to use dojo for the first time, so this may be be obvious. I have a very simple form with one textarea in it that needs to be filled in. <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.10.3/dojo/dojo.js"></script> <form id='form1' action="" method="" dojoType="dijit.form.Form"> <label for="dob">desc:</label> <textarea class='multilinecontrol' dojoType="dijit.form.Textarea" selected='true' required='true'></textarea> <button type='submit' id="next" name="next" dojoType=

How to workaround autoomitting fiiles/folders starting with “_” (underscore) in assets folder

此生再无相见时 提交于 2019-12-17 19:46:12
问题 I want to deploy PhoneGap app on the Android simulator provided with eclipse. I decided to use Dojo Toolkit which heavily relies on the " _ " convention (starting a file/folder with " _ " means this is a private/internal module). Basically the problem is that while deploying the app, every file/folder starting with "_" is omitted. This completely messes things up, Dojo toolkit as exptected fails to work. Is there a way to fix this? 回答1: First go star this issue so Google will fix the bug