• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

thread and returning a method from object

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have three different classes, one is main one is dataGet and the last one is crawler.

so dataGet extends thread and calls crawler from inside just to make sure main is not halted, but I am kind of clueless how I am going to call a method inside of crawler since it is only instantiated in dataGet class and I am trying to call this method from my main class.

What do you guys say about this situation?
Thank you in advance

ilteris
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simply put, without access to a pointer (or reference) of a crawler class, you can't. If you want, you can make a list of all crawler classes, and store them in a static list of main:



That's sort of a cop out, but it works.
[ February 25, 2006: Message edited by: Jeremy Tartaglia ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic