yes u are right Magno............and DataListModel setRecords() is getting call thats why i can see output on my console "i see this line after model() executes completely" but problem is this executes after model() execution. but i want it to be execute while model() is executing.... hope u understand what i said..as my english is not good
On May 20, 3:33 pm, Magno Machado <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> > > 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 <[email protected]> > > > > > 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 > > [email protected]. > > > > 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. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to [email protected]. > > 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. > > -- > Magno Machado > Paulohttp://blog.magnomachado.com.brhttp://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 [email protected]. 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.
