Peter E Higgins | 5 Dec 02:12
Favicon
Gravatar

Re: fetch query docs?

If I'm not mistaken the dojox.data.AndOrReadStore (or WriteStore, I
forget .. Oh, there's both) is designed just for this.

http://docs.dojocampus.org/dojox/data/AndOrReadStore
http://docs.dojocampus.org/dojox/data/AndOrWriteStore

Hope this helps.

Regards,
Peter Higgins

Matthew Shirey wrote:
> Are there so documents for query format used by the DataGrids
> setQuery() method that someone can point me toward?  I would like to
> browse to see what can be done here.  Specifically, can anyone tell me
> if there is a way to perform a "!=" type filter?  Basically, in my
> DataGrid, , instead showing only the items that match the query, I'd
> like to hide everything that matches the query.  Does that make sense?
>  Thank you,
>
> -- Matthew
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest <at> dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>   

(Continue reading)

G. Sharon Yang | 5 Dec 01:08

Re: How to link to a contentpane or linkpane programmatically - a bug in IE

Now I get a weird bug in IE by programmatically linking to a tab from
my home page:

onclick="dijit.byId('tabs').selectChild(dijit.byId('tech'));
dijit.byId('tech').selectChild(dijit.byId('tech_SSD'))"

I get a partially blank screen for that page. So it looks like my page
is cut off some part. The annoying thing is that I am not getting this
all the time, so it's hard to reproduce the bug.
Here's the screen shots for the correct page and error page:
http://www.intrinsyx.com/IE-error/

To check the home page:
http://www.intrinsyx.com/

Any idea how this happens in IE? I doubt it's the bug between
selectChild and IE.  I won't get this error in IE if I just do the
normal tab click.

Thanks,

-S.

On Fri, Nov 7, 2008 at 2:17 PM, G. Sharon Yang <okghyang <at> gmail.com> wrote:
> cool! now it works perfectly without the page loading.
>
> Thanks, Peter!
>
> -S
>
(Continue reading)

Deno Vichas | 4 Dec 21:40

Re: using a dataStore for dojox.grid.cells.Select

I guess I wasn't very clear.

I was to use a dataStore for dojox.grid.cells.Select, and not the grid
itself.

-----Original Message-----
From: dojo-interest-bounces <at> dojotoolkit.org
[mailto:dojo-interest-bounces <at> dojotoolkit.org] On Behalf Of Jared
Jurkiewicz
Sent: Thursday, December 04, 2008 12:24 PM
To: dojo-interest <at> dojotoolkit.org
Subject: Re: [Dojo-interest] using a dataStore for
dojox.grid.cells.Select

In 1.2:  grid.setStore(<some store>);

-- Jared

On Thu, Dec 4, 2008 at 1:39 PM, Deno Vichas <dvichas <at> autoreturn.com>
wrote:
> Is it possible to assign a dataStore to an editable grid using
> dojox.grid.cells.Select after the grid has been created?  If so, how?
>
>
>
> Thanks,
>
> deno
>
> _______________________________________________
(Continue reading)

Peter E Higgins | 4 Dec 18:56
Favicon
Gravatar

Re: dojox.gfx: How to find a circle's current cx and cy?

Shane,

The dojocampus.org docs are just a wiki. You can login with your LDAP
creds same as dtk.org, and with your on-file CLA are free to adjust and
enhance anything you find that isn't clear or otherwise could be
improved upon.

Regards,
Peter Higgins

Shane O'Sullivan wrote:
> Hi Eugene,
>
> Thanks, that worked perfectly.  I looked at the docs, but that single
> large page is quite difficult to follow.  Also, descriptions of many
> functions are a single line, without fuller explanations - it is a
> huge API of course, so I understand that documenting it to cover every
> conceivable use is just not possible.
>
> I think what is needed are many more small examples, such as are put
> into the Dojo explorer at dojocampus.org/explorer.
>
> As I'm working through this little dojox.gfx project of mine I'm
> keeping notes on things I've found, and should find some time to add
> some more examples to the explorer, which will hopefully help others
> too
>
> Thanks
>
> Shane
(Continue reading)

Dylan Tynan | 4 Dec 01:07

Re: JsonQuery withJsonRestStore (orJsonRestQueryStore)

Ok, so the problem was that I was trying to do it directly against the
store without a fetch involved.

Hmm.  I think my question wasn't very good really - I think I should
have been asking about the grid.  I guess really what I was asking was
how to do a subsequent query against the results of a setQuery() in the
grid.  For example, if I did
    mygrid.setQuery("[?status<4]", mgrid.queryOptions);
Then, later, I wanted to jsonquery that result set and get the results
into a variable.  I guess that's really a question about the grid's
capabilities & structure, rather than related to JsonQuery stuff.  Ok,
nevermind, but thanks!

Dylan

>-----Original Message-----
>From: dojo-interest-bounces <at> dojotoolkit.org 
>[mailto:dojo-interest-bounces <at> dojotoolkit.org] On Behalf Of Kris Zyp
>Sent: Wednesday, December 03, 2008 2:44 PM
>To: dojo-interest <at> dojotoolkit.org
>Subject: Re: [Dojo-interest] JsonQuery withJsonRestStore 
>(orJsonRestQueryStore)
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
> 
>JsonQueryRestStore makes it so you can use JSONQuery in the 
>fetch's query:
>
>mystore.fetch({query:"?status=2", onComplete:function(results){
(Continue reading)

Eugene Lazutkin | 3 Dec 22:37
Gravatar

Re: dojox.gfx: How to find a circle's current cx and cy?

var g = dojox.gfx, m = g.matrix;
...
var t = circle.getTransform(),
     s = circle.getShape();
     newCenter = m.multiplyPoint(t, s.cx, s.cy);

Something like that. All these methods are documented in the official 
documentation (http://docs.dojocampus.org/dojox/gfx).

Thanks,

Eugene

Shane O'Sullivan wrote:
> Hi again,
> 
> I'm trying to find the current centre (x,y) cartesian coordinates of a
> circle in dojox.gfx.  This circle has a cx and cy of course, and a
> transform has been applied to the circle as part of an animation,
> which can stop at any time, so I do not have a known point at which it
> will be.
> 
> I cannot figure out how to calculate the current cx and cy based on
> the existing transform.
> 
> circle.getTransform() gives the following values: dx dy xx xy yx yy
> 
> How should these be applied to the cx and cy values to give the new cx
> and cy?  I've tried a number of calculations, including using
> circle.getTransformedBoundingBox(), but cannot get it accurate.
(Continue reading)

Greg Ederer | 3 Dec 21:50

Re: Multiple Chart2Ds in a tabbed pane makes browser unresponsive

I'll look into this.  Thanks!

Shane O'Sullivan wrote:
A side note that may or may not help - I ran into issues with dojox.gfx when I was calling some methods on a Surface object before adding the DOM node to the document. That is, i had created the DOM node, created a Surface in it, and attempted to perform some calculations, which caused an infinite loop in another part of dojox.gfx. Could it be that having charts in different tabs means that the chart is being created in a DIV that is either not inserted into the document yet, or has display:none ? Can you make sure that the chart is only constructer "after" the tab has opened? Shane 2008/12/3 Greg Ederer <greg <at> ergonosis.com>:
I should also add that when I render only one chart, I don't get this problem. It only happens when I render a second chart. Maybe there's a class scoped property whose value is not getting reset between runs. Not sure what's going on here. I'll keep looking. G Greg Ederer wrote: I found the infinite loop in dojox.charting.scaler.linear.buildTicks(). Does anyone see anything that would be causing this behavior? Here is the execution sequence: dojox.charting.Chart2D.constructor() dojox.charting.Chart2D.render() dojox.charting.Chart2D.fullRender() dojox.charting.Chart2D.fullGeometry() dojox.charting.plot2d.Default.calculateAxes() dojox.charting.plot2d.common.collectSimpleStats() dojox.charting.plot2d.Base._calc() dojox.charting.axis2d.Default.calculate() dojox.charting.scaler.linear.buildTicks() buildTicks: function(/*Object*/ scaler, /*Object*/ kwArgs){ var step, next, tick, nextMajor = scaler.major.start, nextMinor = scaler.minor.start, nextMicro = scaler.micro.start; if(kwArgs.microTicks && scaler.micro.tick){ step = scaler.micro.tick, next = nextMicro; }else if(kwArgs.minorTicks && scaler.minor.tick){ step = scaler.minor.tick, next = nextMinor; }else if(scaler.major.tick){ step = scaler.major.tick, next = nextMajor; }else{ // no ticks return null; } // loop over all ticks var majorTicks = [], minorTicks = [], microTicks = []; // Start Infinite Loop while(next <= scaler.bounds.to + 1/scaler.bounds.scale){ if(Math.abs(nextMajor - next) < step / 2){ // major tick tick = {value: nextMajor}; if(kwArgs.majorLabels){ tick.label = getLabel(nextMajor, scaler.major.prec, kwArgs); } majorTicks.push(tick); nextMajor += scaler.major.tick; nextMinor += scaler.minor.tick; nextMicro += scaler.micro.tick; } else if(Math.abs(nextMinor - next) < step / 2){ // minor tick if(kwArgs.minorTicks){ tick = {value: nextMinor}; if(kwArgs.minorLabels && (scaler.minMinorStep <= scaler.minor.tick * scaler.bounds.scale)){ tick.label = getLabel(nextMinor, scaler.minor.prec, kwArgs); } minorTicks.push(tick); } nextMinor += scaler.minor.tick; nextMicro += scaler.micro.tick; }else{ // micro tick if(kwArgs.microTicks){ microTicks.push({value: nextMicro}); } nextMicro += scaler.micro.tick; } next += step; } // End Infinite Loop return {major: majorTicks, minor: minorTicks, micro: microTicks}; // Object } Eugene Lazutkin wrote: It looks like some kind of never-ending loop. My only suggestion is to put tracing code to see what points are hit, and what are not. This way you can pinpoint where it is happening and file a proper bug ticket. Thanks, Eugene Greg Ederer wrote: Hi, I'm placing Chart2D widgets in a TabContainer (one Chart2D per tab/ContentPane). Executing the following code makes the browser unresponsive: <script type="text/javascript"> dojo.require("dojox.charting.Chart2D"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.TabContainer"); makeCharts = function(){ var tabContainer = new dijit.layout.TabContainer({ tabPosition: "top", style : "width: 450px; height: 300px;" }, 'tabcontainer'); var leftChild = new dijit.layout.ContentPane({ title : "RFE", style : 'height: 270px; margin: 0; padding: 0;' }); var rightChild = new dijit.layout.ContentPane({ title : "Accum", style : 'height: 270px; margin: 0; padding: 0;' }); tabContainer.addChild(leftChild); tabContainer.addChild(rightChild); tabContainer.startup(); var chart1 = new dojox.charting.Chart2D(leftChild.domNode); chart1.addPlot("default", {type: "Lines"}); chart1.addAxis("x"); chart1.addAxis("y", {vertical: true}); chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render(); var chart2 = new dojox.charting.Chart2D(rightChild.domNode); chart2.addPlot("default", {type: "Lines"}); chart2.addAxis("x"); chart2.addAxis("y", {vertical: true}); chart2.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]); chart2.render(); }; dojo.addOnLoad(makeCharts); </script> This is the last item on my list for the M1 release of our application. Any advice greatly appreciated! Greg _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest <at> dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest -- | E R G O N O S I S | Greg Ederer | Lead Developer | greg <at> ergonosis.com | 360.774.6848 | ________________________________ _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest <at> dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest -- | E R G O N O S I S | Greg Ederer | Lead Developer | greg <at> ergonosis.com | 360.774.6848 | _______________________________________________ FAQ: http://dojotoolkit.org/support/faq Book: http://dojotoolkit.org/docs/book Forums: http://dojotoolkit.org/forum Dojo-interest <at> dojotoolkit.org 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 <at> dojotoolkit.org http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest


-- | E R G O N O S I S | Greg Ederer | Lead Developer | greg <at> ergonosis.com | 360.774.6848 |
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest <at> dojotoolkit.org
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
Dustin Machi | 3 Dec 19:52

Re: Multiple Chart2Ds in a tabbed pane makes browser unresponsive

I think what you have below is correct from the ContentPane perspective
now and should meet your node requirements.  Unfortunately I'm not all
that familiar with the charting/gfx stuff.  I wasn't really sure that
this was the original problem, I was only pointing out that the widgets
dont' necessarily allow you to just replace their whole domNode
structure like that.

Greg Ederer wrote:
> Hi Dustin,
>
> I tried changing to:
>
>         var leftContentDiv = document.createElement('div');
>         leftChild.attr('content', leftContentDiv);
>
>         var chart1 = new dojox.charting.Chart2D(leftContentDiv);
>         chart1.addPlot("default", {type: "Lines"});
>         chart1.addAxis("x");
>         chart1.addAxis("y", {vertical: true});
>         chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]);
>         chart1.render();
>
>         var rightContentDiv = document.createElement('div');
>         rightChild.attr('content', rightContentDiv);
>
>         var chart2 = new dojox.charting.Chart2D(rightContentDiv);
>         chart2.addPlot("default", {type: "Lines"});
>         chart2.addAxis("x");
>         chart2.addAxis("y", {vertical: true});
>         chart2.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]);
>         chart2.render();
>
> But, I get the same problem.  I am also coping with the requirement
> that the node in which each Chart2D is placed must be in the DOM when
> the Chart2D is instantiated.  This node also cannot be moved to a
> different location within the DOM after creation.  This is due to a
> limitation in VML.
>
> Any other suggestions?  Thanks for looking at this!
>
> Greg
>
> Dustin Machi wrote:
>>   
>>>>>         var chart1 = new dojox.charting.Chart2D(leftChild.domNode);
>>>>>       
>>>>>         
>> This part doesn't seem quite right.  This is replacing the content panes
>> domNode I believe.  I think you probably want to create a node, create
>> the charts against that node, then do setContent() on the leftChild
>> content pane.  Of course the same applies to rightChild.
>>
>> Thanks,
>> Dustin
>>
>>
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest <at> dojotoolkit.org
>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>   
>
>
> -- 
> | E R G O N O S I S
> | Greg Ederer
> | Lead Developer
> | greg <at> ergonosis.com
> | 360.774.6848
> |
> ------------------------------------------------------------------------
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest <at> dojotoolkit.org
> 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 <at> dojotoolkit.org
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

Eugene Lazutkin | 3 Dec 19:07
Gravatar

Re: Multiple Chart2Ds in a tabbed pane makes browser unresponsive

It looks like some kind of never-ending loop. My only suggestion is to 
put tracing code to see what points are hit, and what are not. This way 
you can pinpoint where it is happening and file a proper bug ticket.

Thanks,

Eugene

Greg Ederer wrote:
> Hi,
> 
> I'm placing Chart2D widgets in a TabContainer (one Chart2D per 
> tab/ContentPane).  Executing the following code makes the browser 
> unresponsive:
> 
> <script type="text/javascript">
> 
>       dojo.require("dojox.charting.Chart2D");
>       dojo.require("dijit.layout.ContentPane");
>       dojo.require("dijit.layout.TabContainer");
> 
>       makeCharts = function(){
> 
>         var tabContainer = new dijit.layout.TabContainer({
>           tabPosition: "top",
>           style : "width: 450px; height: 300px;"
>         }, 'tabcontainer');
>         var leftChild = new dijit.layout.ContentPane({
>           title : "RFE",
>           style : 'height: 270px; margin: 0; padding: 0;'
>         });
>         var rightChild = new dijit.layout.ContentPane({
>           title : "Accum",
>           style : 'height: 270px; margin: 0; padding: 0;'
>         });
>         tabContainer.addChild(leftChild);
>         tabContainer.addChild(rightChild);
>         tabContainer.startup();
> 
>         var chart1 = new dojox.charting.Chart2D(leftChild.domNode);
>         chart1.addPlot("default", {type: "Lines"});
>         chart1.addAxis("x");
>         chart1.addAxis("y", {vertical: true});
>         chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]);
>         chart1.render();
> 
>         var chart2 = new dojox.charting.Chart2D(rightChild.domNode);
>         chart2.addPlot("default", {type: "Lines"});
>         chart2.addAxis("x");
>         chart2.addAxis("y", {vertical: true});
>         chart2.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]);
>         chart2.render();
> 
>       };
> 
>       dojo.addOnLoad(makeCharts);
> 
>     </script>
> 
> This is the last item on my list for the M1 release of our application.  
> Any advice greatly appreciated!
> 
> Greg
> 

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest <at> dojotoolkit.org
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

Jette Derriche | 3 Dec 17:08

Dijit and Mac/Safari

Today I experienced an error on the new version of Safari for Mac with
Dojo 1.1.1. The trouble was that the DateTextBox didn't pop up, when the
mouse was placed in the input field.

It turns out that the reason for this was with the document DTD. As soon
as I changed the html version from 4.0 to 4.01, the problem went away.

I have not followed this list for a while, so I'm sorry if this subject
has already been discussed... I just thought it might help someone.

Kind regards,
Jette

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest <at> dojotoolkit.org
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest

tswall | 3 Dec 16:42

Dynamically adding MenuItems question


I am trying to create a control that has a dijit.form.DropDownButton that has
it's text dynamically changed from a list of strings pulled from a database
as follows:

dojo.declare("MyDropDownControl", null, {
  constructor: function( id ) {
    this.dataListId = id;
    this.menu = new dijit.Menu();
    this.myDropDown = new dijit.form.DropDownButton( { label: "Choose...",
dropDown: menu });

    dataElements = pullThisListFromDatabase();

    for(i=0; i<dataElements.length; ++i ) {
      menuItem = new dijit.MenuItem({
        label: dataElements[i].full_name,
        value: dataElements[i].id,
        onClick: function() { this.myDropDown.setLabel(i); }
      });
      this.menu.addChild( menuItem );
    }
  },
 });

So the DropDownButton is created with all the appropriate choices, but the
onClick function always winds up changing the label to the last element of
the list. I'm guessing this is related to the scope of the index variable or
the scope of "dataElements" array, but I've tried many iterations to try and
make these locally scoped or instantiating new objects for the string label
in the loop, but I can't get it to work.

Sorry, but I'm not an experienced javascript developer. I live in a Java
world and the prototype OOP of JavaScript is quite confusing to me.

Regards,
Scott

--

-- 
View this message in context: http://www.nabble.com/Dynamically-adding-MenuItems-question-tp20624120p20624120.html
Sent from the Dojo mailing list archive at Nabble.com.

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest <at> dojotoolkit.org
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest


Gmane