Re: Can't remove 0 index in ArrayList

2010-02-01 Thread Christian Goudreau
You're right, I'm gonna redo all my views with UiBinder, it'll be a good
time to take a deeper look into this.

Thanks again for your comments

Christian

On Mon, Feb 1, 2010 at 8:34 AM, Martin Trummer wrote:

> I think you should take some time to find out what the problem is/was.
>
> it's quite unlikely that something in the GWT code changed, so that
> such a simple thing would stop working.
> Maybe you just had different data before.
> Thus it may be an indication that you got something wrong in your
> code - difficult to say what when you can't reproduce it.
>
> maybe you got some of your hashCode/equals functions wrong which
> could lead to strange behaviour like this.
>
> however, if it's a project that's not critical or if you
> just feel fine with this, don't waste your time :)
>
> On 1 Feb., 13:11, Christian Goudreau 
> wrote:
> > Yeah, but the thing is that code was working fine prior to gwt 2.0, so I
> > just don't understand why lol
> >
> > Anyway I also tried a simple example like yours and it was working fine,
> so
> > I just gave up finding a solution to a problem that I alreay resolved by
> > doing the alternative way.
> >
> > Thanks
> >
> > Christian
> >
> > On Mon, Feb 1, 2010 at 5:03 AM, Martin Trummer  >wrote:
> >
> > > seems to work for me - here's a little test:
> >
> > >  List list = new ArrayList();
> > >  list.add(6);
> > >  list.add(7);
> >
> > >  list.remove(0);
> > >  list.remove(0);
> >
> > > after that the list is empty again.
> > > tested in development mode with gwt 2.0.0
> >
> > > just a guess: make sure, you call the right function
> > > remove is overloaded.
> >
> > > so if you would call:
> > >  list.remove(new Integer(0));
> > > then nothing would be removed, because there's no integer
> > > object 0 in the list.
> >
> > > On 29 Jan., 20:04, Christian Goudreau 
> > > wrote:
> > > >  protected void removeFacultySucceeded() {
> > > >
> display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> > > > faculties.remove(faculty);
> > > >  if (!faculties.isEmpty()) {
> > > > faculty = faculties.get(display.getFacultyListSelectedIndex());
> > > > refreshDisplay();}
> >
> > > >  modification = true;
> >
> > > > }
> >
> > > > I was using the selected index instead of object faculty. While
> debugging
> > > I
> > > > confirmed that the first position was 0 ans was an integer... Every
> other
> > > > position was working fine.
> >
> > > > I don't understand that bug either, I've worked around by using an
> > > object.
> >
> > > > Anyway it's not that important, but I wanna know it's just me or it's
> > > > something that should be corrected.
> >
> > > > Christian
> >
> > > > On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer <
> martin.trum...@24act.at
> > > >wrote:
> >
> > > > > show some code or a small test case
> >
> > > > > On 28 Jan., 18:16, Christian Goudreau <
> goudreau.christ...@gmail.com>
> > > > > wrote:
> > > > > > Does anyone had that same problem ? Everything works fine when it
> > > comes
> > > > > to
> > > > > > other indexes, but when I do ArrayList.remove(0), the object is
> still
> > > in
> > > > > > here ! But When I try : ArrayList.remove(object), it work again.
> >
> > > > > > Everything was working well prior to GWT 2.0.
> >
> > > > > --
> > > > > 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-tool...@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-tool...@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-tool...@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-tool...@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: Can't remove 0 index in ArrayList

2010-02-01 Thread Martin Trummer
I think you should take some time to find out what the problem is/was.

it's quite unlikely that something in the GWT code changed, so that
such a simple thing would stop working.
Maybe you just had different data before.
Thus it may be an indication that you got something wrong in your
code - difficult to say what when you can't reproduce it.

maybe you got some of your hashCode/equals functions wrong which
could lead to strange behaviour like this.

however, if it's a project that's not critical or if you
just feel fine with this, don't waste your time :)

On 1 Feb., 13:11, Christian Goudreau 
wrote:
> Yeah, but the thing is that code was working fine prior to gwt 2.0, so I
> just don't understand why lol
>
> Anyway I also tried a simple example like yours and it was working fine, so
> I just gave up finding a solution to a problem that I alreay resolved by
> doing the alternative way.
>
> Thanks
>
> Christian
>
> On Mon, Feb 1, 2010 at 5:03 AM, Martin Trummer wrote:
>
> > seems to work for me - here's a little test:
>
> >  List list = new ArrayList();
> >  list.add(6);
> >  list.add(7);
>
> >  list.remove(0);
> >  list.remove(0);
>
> > after that the list is empty again.
> > tested in development mode with gwt 2.0.0
>
> > just a guess: make sure, you call the right function
> > remove is overloaded.
>
> > so if you would call:
> >  list.remove(new Integer(0));
> > then nothing would be removed, because there's no integer
> > object 0 in the list.
>
> > On 29 Jan., 20:04, Christian Goudreau 
> > wrote:
> > >  protected void removeFacultySucceeded() {
> > > display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> > > faculties.remove(faculty);
> > >  if (!faculties.isEmpty()) {
> > > faculty = faculties.get(display.getFacultyListSelectedIndex());
> > > refreshDisplay();}
>
> > >  modification = true;
>
> > > }
>
> > > I was using the selected index instead of object faculty. While debugging
> > I
> > > confirmed that the first position was 0 ans was an integer... Every other
> > > position was working fine.
>
> > > I don't understand that bug either, I've worked around by using an
> > object.
>
> > > Anyway it's not that important, but I wanna know it's just me or it's
> > > something that should be corrected.
>
> > > Christian
>
> > > On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer  > >wrote:
>
> > > > show some code or a small test case
>
> > > > On 28 Jan., 18:16, Christian Goudreau 
> > > > wrote:
> > > > > Does anyone had that same problem ? Everything works fine when it
> > comes
> > > > to
> > > > > other indexes, but when I do ArrayList.remove(0), the object is still
> > in
> > > > > here ! But When I try : ArrayList.remove(object), it work again.
>
> > > > > Everything was working well prior to GWT 2.0.
>
> > > > --
> > > > 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-tool...@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-tool...@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-tool...@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: Can't remove 0 index in ArrayList

2010-02-01 Thread Christian Goudreau
Yeah, but the thing is that code was working fine prior to gwt 2.0, so I
just don't understand why lol

Anyway I also tried a simple example like yours and it was working fine, so
I just gave up finding a solution to a problem that I alreay resolved by
doing the alternative way.

Thanks

Christian

On Mon, Feb 1, 2010 at 5:03 AM, Martin Trummer wrote:

> seems to work for me - here's a little test:
>
>  List list = new ArrayList();
>  list.add(6);
>  list.add(7);
>
>  list.remove(0);
>  list.remove(0);
>
> after that the list is empty again.
> tested in development mode with gwt 2.0.0
>
> just a guess: make sure, you call the right function
> remove is overloaded.
>
> so if you would call:
>  list.remove(new Integer(0));
> then nothing would be removed, because there's no integer
> object 0 in the list.
>
> On 29 Jan., 20:04, Christian Goudreau 
> wrote:
> >  protected void removeFacultySucceeded() {
> > display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> > faculties.remove(faculty);
> >  if (!faculties.isEmpty()) {
> > faculty = faculties.get(display.getFacultyListSelectedIndex());
> > refreshDisplay();}
> >
> >  modification = true;
> >
> > }
> >
> > I was using the selected index instead of object faculty. While debugging
> I
> > confirmed that the first position was 0 ans was an integer... Every other
> > position was working fine.
> >
> > I don't understand that bug either, I've worked around by using an
> object.
> >
> > Anyway it's not that important, but I wanna know it's just me or it's
> > something that should be corrected.
> >
> > Christian
> >
> > On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer  >wrote:
> >
> > > show some code or a small test case
> >
> > > On 28 Jan., 18:16, Christian Goudreau 
> > > wrote:
> > > > Does anyone had that same problem ? Everything works fine when it
> comes
> > > to
> > > > other indexes, but when I do ArrayList.remove(0), the object is still
> in
> > > > here ! But When I try : ArrayList.remove(object), it work again.
> >
> > > > Everything was working well prior to GWT 2.0.
> >
> > > --
> > > 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-tool...@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-tool...@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-tool...@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: Can't remove 0 index in ArrayList

2010-02-01 Thread Martin Trummer
seems to work for me - here's a little test:

  List list = new ArrayList();
  list.add(6);
  list.add(7);

  list.remove(0);
  list.remove(0);

after that the list is empty again.
tested in development mode with gwt 2.0.0

just a guess: make sure, you call the right function
remove is overloaded.

so if you would call:
  list.remove(new Integer(0));
then nothing would be removed, because there's no integer
object 0 in the list.

On 29 Jan., 20:04, Christian Goudreau 
wrote:
>  protected void removeFacultySucceeded() {
> display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> faculties.remove(faculty);
>  if (!faculties.isEmpty()) {
> faculty = faculties.get(display.getFacultyListSelectedIndex());
> refreshDisplay();}
>
>  modification = true;
>
> }
>
> I was using the selected index instead of object faculty. While debugging I
> confirmed that the first position was 0 ans was an integer... Every other
> position was working fine.
>
> I don't understand that bug either, I've worked around by using an object.
>
> Anyway it's not that important, but I wanna know it's just me or it's
> something that should be corrected.
>
> Christian
>
> On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer 
> wrote:
>
> > show some code or a small test case
>
> > On 28 Jan., 18:16, Christian Goudreau 
> > wrote:
> > > Does anyone had that same problem ? Everything works fine when it comes
> > to
> > > other indexes, but when I do ArrayList.remove(0), the object is still in
> > > here ! But When I try : ArrayList.remove(object), it work again.
>
> > > Everything was working well prior to GWT 2.0.
>
> > --
> > 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-tool...@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-tool...@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: Can't remove 0 index in ArrayList

2010-01-29 Thread Christian Goudreau
 protected void removeFacultySucceeded() {
display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
faculties.remove(faculty);
 if (!faculties.isEmpty()) {
faculty = faculties.get(display.getFacultyListSelectedIndex());
refreshDisplay();
}
 modification = true;
}

I was using the selected index instead of object faculty. While debugging I
confirmed that the first position was 0 ans was an integer... Every other
position was working fine.

I don't understand that bug either, I've worked around by using an object.

Anyway it's not that important, but I wanna know it's just me or it's
something that should be corrected.

Christian

On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer wrote:

> show some code or a small test case
>
> On 28 Jan., 18:16, Christian Goudreau 
> wrote:
> > Does anyone had that same problem ? Everything works fine when it comes
> to
> > other indexes, but when I do ArrayList.remove(0), the object is still in
> > here ! But When I try : ArrayList.remove(object), it work again.
> >
> > Everything was working well prior to GWT 2.0.
>
> --
> 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-tool...@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-tool...@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: Can't remove 0 index in ArrayList

2010-01-29 Thread Martin Trummer
show some code or a small test case

On 28 Jan., 18:16, Christian Goudreau 
wrote:
> Does anyone had that same problem ? Everything works fine when it comes to
> other indexes, but when I do ArrayList.remove(0), the object is still in
> here ! But When I try : ArrayList.remove(object), it work again.
>
> Everything was working well prior to GWT 2.0.

-- 
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-tool...@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: Can't remove 0 index in ArrayList

2010-01-28 Thread George Georgovassilis
Hello Christian,

I looked at the code of ArrayList, but couldn't find anything
suspicious. Are you sure your object is at 0? Maybe a null squeezed in
at 0, and your object is somewhere later in the list? On which
browsers does this happen?

On Jan 28, 6:16 pm, Christian Goudreau 
wrote:
> Does anyone had that same problem ? Everything works fine when it comes to
> other indexes, but when I do ArrayList.remove(0), the object is still in
> here ! But When I try : ArrayList.remove(object), it work again.
>
> Everything was working well prior to GWT 2.0.

-- 
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-tool...@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.



Can't remove 0 index in ArrayList

2010-01-28 Thread Christian Goudreau
Does anyone had that same problem ? Everything works fine when it comes to
other indexes, but when I do ArrayList.remove(0), the object is still in
here ! But When I try : ArrayList.remove(object), it work again.

Everything was working well prior to GWT 2.0.

-- 
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-tool...@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.