|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Editor in FireFox 3Hi All
Is it just me or are the dijit.Editor(etc.) tests known to be broken in Firefox 3 on a Mac? dijit/tests/_editor/test_RichText.html and dijit/tests/test_Editor.html The div samples do not edit. The textarea samples just show tiny textareas. Thanks regards Jeremy _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Editor in FireFox 3Hi All
Sorry to reply to my own email, but I have some more details ..... I restarted this machine and the problem still persists. I also find that it is not only the editor tests that break, the validator tests are not working properly either. However the nightly tests online, do seem to work, so I wonder what the differences are ..... file:// versus http:// ??? Anyway, loading the Rich Text Test results in these errors shown in the firebug console : failed loading ../../../dojo/./_firebug/firebug.js with error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "file:///Users/Shared/Development/Checkouts/Apache/Cocoon/Cocoon_2_1_X/src/blocks/dojotoolkit/dojo/dojo.js Line: 20"]test_Ric...Text.html (line 34) Could not load 'dojo._firebug.firebug'; last tried './_firebug/ firebug.js' [Break on this error] (function(){var _1=null;if((_1|| (typeof ...tTimeout(dojo._fakeLoadInit,1000);}})(); dojo.js (line 20) failed loading ../../../dojo/../dijit/_Widget.js with error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "file:///Users/Shared/Development/Checkouts/Apache/Cocoon/Cocoon_2_1_X/src/blocks/dojotoolkit/dojo/dojo.js Line: 20"]test_Ric...Text.html (line 34) Could not load 'dijit._Widget'; last tried '../dijit/_Widget.js' [Break on this error] (function(){var _1=null;if((_1|| (typeof ...tTimeout(dojo._fakeLoadInit,1000);}})(); dojo.js (line 20) failed loading ../../../dojo/./parser.js with error: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "file:///Users/Shared/Development/Checkouts/Apache/Cocoon/Cocoon_2_1_X/src/blocks/dojotoolkit/dojo/dojo.js Line: 20"]test_Ric...Text.html (line 34) Could not load 'dojo.parser'; last tried './parser.js' [Break on this error] (function(){var _1=null;if((_1|| (typeof ...tTimeout(dojo._fakeLoadInit,1000);}})(); dojo.js (line 20) d.body is not a function [Break on this error] if(!d.hasClass(d.body(),theme)) { d.addClass(d.body(),theme); } "Access to restricted URI denied", huh? any suggestions anyone? thanks regards Jeremy On 9 Jul 2008, at 17:57, Jeremy Quinn wrote: > Hi All > > Is it just me or are the dijit.Editor(etc.) tests known to be broken > in Firefox 3 on a Mac? > > dijit/tests/_editor/test_RichText.html > and > dijit/tests/test_Editor.html > > The div samples do not edit. > The textarea samples just show tiny textareas. > > Thanks > > regards Jeremy > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://dojotoolkit.org/docs/book > Forums: http://dojotoolkit.org/forum > Dojo-interest@... > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Editor in FireFox 3With firefox 3 you must have a web server to use ajax.
Regards, Nicola On Thu, Jul 10, 2008 at 1:16 PM, Jeremy Quinn <jeremy@...> wrote: > Hi All > > Sorry to reply to my own email, but I have some more details ..... _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Editor in FireFox 3On 10 Jul 2008, at 13:10, Nicola Rizzo wrote: > With firefox 3 you must have a web server to use ajax. Eeek! Many thanks for the explanation : ) regards Jeremy > > Regards, > Nicola > > On Thu, Jul 10, 2008 at 1:16 PM, Jeremy Quinn <jeremy@...> > wrote: >> Hi All >> >> Sorry to reply to my own email, but I have some more details ..... > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://dojotoolkit.org/docs/book > Forums: http://dojotoolkit.org/forum > Dojo-interest@... > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Update children in dojo.data.ItemFileWriteStoreHi,
Following the dojobook I can create new item in the ItemFileWriteStore. But I don't know how to update the parent node of that new item so that the newly aded item will be included there. Can anyone give me some example? Thanks. Bin _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Update children in dojo.data.ItemFileWriteStoreDid you read the newItem APIdocs?
newItem: function(/* Object? */ keywordArgs, /*Object?*/ parentInfo){ // summary: // Returns a newly created item. Sets the attributes of the new // item based on the *keywordArgs* provided. In general, the attribute // names in the keywords become the attributes in the new item and as for // the attribute values in keywordArgs, they become the values of the attributes // in the new item. In addition, for stores that support hierarchical item // creation, an optional second parameter is accepted that defines what item is the parent // of the new item and what attribute of that item should the new item be assigned to. // In general, this will assume that the attribute targetted is multi-valued and a new item // is appended onto the list of values for that attribute. // // keywordArgs: // A javascript object defining the initial content of the item as a set of JavaScript 'property name: value' pairs. // parentInfo: // An optional javascript object defining what item is the parent of this item (in a hierarchical store. Not all stores do hierarchical items), // and what attribute of that parent to assign the new item to. If this is present, and the attribute specified // is a multi-valued attribute, it will append this item into the array of values for that attribute. The structure // of the object is as follows: // { // parent: someItem, // attribute: "attribute-name-string" // } // // exceptions: // Throws an exception if *keywordArgs* is a string or a number or // anything other than a simple anonymous object. // Throws an exception if the item in parentInfo is not an item from the store // or if the attribute isn't an attribute name string. // example: // | var kermit = store.newItem({name: "Kermit", color:[blue, green]}); You can, when creating a new item, specify another item and the attribute on that item to inert it as a child of. Alternatively, you can create a parentless item (no parentInfo), then using the handle of the item you want as its parent: store.setValue(parentItem, "some-attribute", theNewItem); There are also examples in the testcases: function testWriteAPI_newItem_withParent(){ // summary: // Simple test of the newItem API with a parent assignment // description: // Simple test of the newItem API with a parent assignment var store = new dojo.data.ItemFileWriteStore(tests.data.readOnlyItemFileTestTemplates.getTestData("countries")); var deferred = new doh.Deferred(); doh.assertTrue(!store.isDirty()); var onError = function(error, request){ deferred.errback(error); }; var onComplete = function(items, request){ doh.assertEqual(1, items.length); var item = items[0]; doh.assertTrue(store.containsValue(item, "name", "Egypt")); //Attach an onNew to validate we get expected values. var onNewInvoked = false; store.onNew = function(newItem, parentInfo){ doh.assertEqual(item, parentInfo.item); doh.assertEqual("cities", parentInfo.attribute); doh.assertTrue(parentInfo.oldValue === undefined); doh.assertTrue(parentInfo.newValue === newItem); onNewInvoked = true; }; //Attach an onSet and verify onSet is NOT called in this case. store.onSet = function(item, attribute, oldValue, newValue){ doh.assertTrue(false); }; //See if we can add in a new item representing the city of Cairo. //This should also call the onNew set above.... var newItem = store.newItem({name: "Cairo", abbr: "Cairo"}, {parent: item, attribute: "cities"}); doh.assertTrue(onNewInvoked); function onCompleteNewItemShallow(items, request){ doh.assertEqual(0, items.length); function onCompleteNewItemDeep(items, request){ doh.assertEqual(1, items.length); var item = items[0]; doh.assertEqual("Cairo", store.getValue(item, "name")); deferred.callback(true); } //Do a deep search now, should find the new item of the city with name attribute Cairo. store.fetch({query:{name:"Cairo"}, onComplete: onCompleteNewItemDeep, onError: onError, queryOptions: {deep:true}}); } //Do a shallow search first, should find nothing. store.fetch({query:{name:"Cairo"}, onComplete: onCompleteNewItemShallow, onError: onError}); }; store.fetch({query:{name:"Egypt"}, onComplete: onComplete, onError: onError}); return deferred; //Object }, -- Jared On Wed, Jul 16, 2008 at 8:23 PM, Bin Hu <bhu@...> wrote: > Hi, > > Following the dojobook I can create new item in the > ItemFileWriteStore. But I don't know how to update the parent node of > that new item so that the newly aded item will be included there. Can > anyone give me some example? Thanks. > > Bin > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://dojotoolkit.org/docs/book > Forums: http://dojotoolkit.org/forum > Dojo-interest@... > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest > FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
|
|
Re: Update children in dojo.data.ItemFileWriteStoreThanks! Your reply saved my day. I will read the APIdocs from now on.
Regards, Bin On Jul 17, 2008, at 6:47 AM, Jared Jurkiewicz wrote: > Did you read the newItem APIdocs? > newItem: function(/* Object? */ keywordArgs, /*Object?*/ parentInfo){ > // summary: > // Returns a newly created item. Sets the attributes of the new > // item based on the *keywordArgs* provided. In general, the > attribute > // names in the keywords become the attributes in the new item > and as for > // the attribute values in keywordArgs, they become the values of > the attributes > // in the new item. In addition, for stores that support > hierarchical item > // creation, an optional second parameter is accepted that defines > what item is the parent > // of the new item and what attribute of that item should the new > item be assigned to. > // In general, this will assume that the attribute targetted is > multi-valued and a new item > // is appended onto the list of values for that attribute. > // > // keywordArgs: > // A javascript object defining the initial content of the item as > a set of JavaScript 'property name: value' pairs. > // parentInfo: > // An optional javascript object defining what item is the parent > of this item (in a hierarchical store. Not all stores do hierarchical > items), > // and what attribute of that parent to assign the new item to. If > this is present, and the attribute specified > // is a multi-valued attribute, it will append this item into the > array of values for that attribute. The structure > // of the object is as follows: > // { > // parent: someItem, > // attribute: "attribute-name-string" > // } > // > // exceptions: > // Throws an exception if *keywordArgs* is a string or a number or > // anything other than a simple anonymous object. > // Throws an exception if the item in parentInfo is not an item > from the store > // or if the attribute isn't an attribute name string. > // example: > // | var kermit = store.newItem({name: "Kermit", color:[blue, > green]}); > > > You can, when creating a new item, specify another item and the > attribute on that item to inert it as a child of. > > Alternatively, you can create a parentless item (no parentInfo), then > using the handle of the item you want as its parent: > > store.setValue(parentItem, "some-attribute", theNewItem); > > There are also examples in the testcases: > > function testWriteAPI_newItem_withParent(){ > // summary: > // Simple test of the newItem API with a parent assignment > // description: > // Simple test of the newItem API with a parent assignment > var store = new > dojo > .data > .ItemFileWriteStore > (tests.data.readOnlyItemFileTestTemplates.getTestData("countries")); > > var deferred = new doh.Deferred(); > doh.assertTrue(!store.isDirty()); > > var onError = function(error, request){ > deferred.errback(error); > }; > > var onComplete = function(items, request){ > doh.assertEqual(1, items.length); > var item = items[0]; > doh.assertTrue(store.containsValue(item, "name", "Egypt")); > > //Attach an onNew to validate we get expected values. > var onNewInvoked = false; > store.onNew = function(newItem, parentInfo){ > doh.assertEqual(item, parentInfo.item); > doh.assertEqual("cities", parentInfo.attribute); > doh.assertTrue(parentInfo.oldValue === undefined); > doh.assertTrue(parentInfo.newValue === newItem); > onNewInvoked = true; > }; > > //Attach an onSet and verify onSet is NOT called in this case. > store.onSet = function(item, attribute, oldValue, newValue){ > doh.assertTrue(false); > }; > > > > //See if we can add in a new item representing the city of Cairo. > //This should also call the onNew set above.... > var newItem = store.newItem({name: "Cairo", abbr: "Cairo"}, > {parent: item, attribute: "cities"}); > doh.assertTrue(onNewInvoked); > > function onCompleteNewItemShallow(items, request){ > doh.assertEqual(0, items.length); > function onCompleteNewItemDeep(items, request){ > doh.assertEqual(1, items.length); > var item = items[0]; > doh.assertEqual("Cairo", store.getValue(item, "name")); > deferred.callback(true); > } > //Do a deep search now, should find the new item of the city with > name attribute Cairo. > store.fetch({query:{name:"Cairo"}, onComplete: > onCompleteNewItemDeep, onError: onError, queryOptions: {deep:true}}); > } > //Do a shallow search first, should find nothing. > store.fetch({query:{name:"Cairo"}, onComplete: > onCompleteNewItemShallow, onError: onError}); > }; > store.fetch({query:{name:"Egypt"}, onComplete: onComplete, onError: > onError}); > return deferred; //Object > }, > > > > -- Jared > > > > On Wed, Jul 16, 2008 at 8:23 PM, Bin Hu <bhu@...> wrote: >> Hi, >> >> Following the dojobook I can create new item in the >> ItemFileWriteStore. But I don't know how to update the parent node of >> that new item so that the newly aded item will be included there. Can >> anyone give me some example? Thanks. >> >> Bin >> _______________________________________________ >> FAQ: http://dojotoolkit.org/support/faq >> Book: http://dojotoolkit.org/docs/book >> Forums: http://dojotoolkit.org/forum >> Dojo-interest@... >> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest >> > _______________________________________________ > FAQ: http://dojotoolkit.org/support/faq > Book: http://dojotoolkit.org/docs/book > Forums: http://dojotoolkit.org/forum > Dojo-interest@... > http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest@... http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest |
| Free Forum Powered by Nabble | Forum Help |