Re: math error: modulo
on redhat perl -e'print STDOUT (-1 % 12), \n;' yeilds 11 I thought php gave 11 but i tried it again and it is giving me -1. php -r'echo (-1 % 12),\n;' Nuts. Well, a math friend tells me that modulo operators are flakey and that he always writes his own to make sure he knows what he will get. sigh On Fri, Jul 15, 2011 at 5:25 PM, Alan Chaney a...@mechnicality.com wrote: What other languages? In Java '%' in this case means the remainder of the remainder of dividing -1 by 12 is -1, as is -13 %12 or -25 % 12. I'd be interested to know which other language does what you say. HTH Alan On 7/15/2011 3:07 PM, seven.reeds wrote: int x = 0; int y = -1; x = y % 12; -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: debug freeze
Good question, I will try to resurrect the broken code. It may be a few days though. I am trying to meet a deadline. It was really very trivial as I recall. I had defined a widget (a TextBox I think) but had not instantiated it, something like: public class foo extends Composite implements ClickListener, ChangeListener, TableListener { ... TextBox myInput; ... public foo() { ... do something with foo ... } I am not a java coder. I am a C/perl/script coder who has picked up enough java to sort of make GWT go. I am probably doing everything contrary to the Java Way. So when I send the code I apologize up front. For me, this is a fairly large project. I assume that you will want all of the code? It is GWT 1.5.3 by the way Dean...K... On Mon, Apr 13, 2009 at 4:05 PM, Sumit Chandel sumitchan...@google.com wrote: Hi Seven Reeds, Any chance we could get a repro code snippet? It would suck if there is an existing hosted mode issue that would crash on a null object without any useful message as to what's gone wrong. This is the first time I've seen this kind of error though, so it might have been a fluke incident or it could have something to do with the recent switch to Jetty in hosted mode. Thanks, -Sumit Chandel On Wed, Apr 8, 2009 at 8:20 AM, Seven Reeds seven.re...@gmail.com wrote: Correct, the hosted mode log showed the creation of various widgets but there was no null pointer messages. I had sprinkled Window.alert() messages all over the place to narrow down the issue and eventually found the line. Starring at the line made no sense because it was a rational statement... except that I had not initialized the object. On a whim I stuck a try/catch block around the line and it shouted out that the object was null. go figure. On Wed, Apr 8, 2009 at 4:08 AM, Vitali Lovich vlov...@gmail.com wrote: And the hosted mode log didn't print any exceptions? Weird. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: debug freeze
Correct, the hosted mode log showed the creation of various widgets but there was no null pointer messages. I had sprinkled Window.alert() messages all over the place to narrow down the issue and eventually found the line. Starring at the line made no sense because it was a rational statement... except that I had not initialized the object. On a whim I stuck a try/catch block around the line and it shouted out that the object was null. go figure. On Wed, Apr 8, 2009 at 4:08 AM, Vitali Lovich vlov...@gmail.com wrote: And the hosted mode log didn't print any exceptions? Weird. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: JSONNumber getValue() and ints
Oh! feh, I had googled gwt JSONNumber. The class ref that came back was the 1.4 doc version. 1.5 is very different it seems. thanks for everyone's help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---