DataListModel model = new DataListModel() {
       public void setRecords(List records) {
           System.out.println("I see this line after model() executes
completely");
           int i = 0;
           records = new LinkedList(records);
       }
   }

This is simply instantiating a subclass of DataListModel which overrides the
setRecords method. Per se, it don't imply that the overriden method will get
executed. In order to execute the setRecords method, there should be an
explicit call for it somewhere.

On Fri, May 20, 2011 at 5:40 AM, ankit <ankitsaxena0...@gmail.com> wrote:

> thanks Juan for ur reply.............i have one thread only as GWT is
> single threaded. but i need to run the anonymous class method when the
> called method runs........ heres my sample code of the problem
>
> public void model(){
>    System.out.println("This line is executing");
>
>   DataListModel model = new DataListModel() {
>        public void setRecords(List records) {
>            System.out.println("I see this line after model() executes
> completely");
>            int i = 0;
>            records = new LinkedList(records);
>        }
>    }
>    System.out.println("this line is executed without executing
> DataListModel.setRecords()");
> }
>
> i get setRecords() output after model() executes completely. but in my
> project, i have to run anonymous class SetRecords() while model()
> executes..............hope u understand my problem Juan.....plss reply
> me as soon as possible Juan
> On May 17, 5:16 am, Juan Pablo Gardella <gardellajuanpa...@gmail.com>
> wrote:
> > In gwt app you only have 1 thread. In swing you queue this "actions" in
> EDT
> > thread. How do you manage this?
> >
> > 2011/5/16 ankit <ankitsaxena0...@gmail.com>
> >
> >
> >
> >
> >
> >
> >
> > > i am making a GWT framework similar to Swing framework. in GWT, i have
> > > one method in which i am making a anonymous class in method. but
> > > problem is when this method executes, execution control does not go to
> > > anonymous class instead it skips over it. after this method executes
> > > completely, control transfers to anonymous class. and this thing is
> > > working perfectly fine in Swing. hope u guys understand my problem.
> > > thnk you for have a look at this..
> > > Ankit
> >
> > > --
> > > 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.
>
>


-- 
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

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

Reply via email to