already here class notification


    Jun 22 2006 | 8:17 am

    • Jun 22 2006 | 11:01 am
      On 22 Jun 2006, at 09:17, f.e wrote:
      > how do i know a class is already loaded in order to avoid copyright > & infos to be written dozen times ?
      Don't know offhand, but if you want to write a banner message just once, there are various ways of doing it - easiest off the top of my head is to have a static boolean in the MXJ class which you examine, and set, in the constructor. (This assumes that object instantiation is single-threaded.)
      nick rothwell -- composition, systems, performance -- http:// www.cassiel.com
    • Jun 22 2006 | 7:40 pm
      Or maybe just have a static block at the top of your class that does the post... It will be called once when the class is loaded. Topher
      On Jun 22, 2006, at 04:01 AM, Nick Rothwell wrote:
      > > On 22 Jun 2006, at 09:17, f.e wrote: > >> how do i know a class is already loaded in order to avoid >> copyright & infos to be written dozen times ? > > Don't know offhand, but if you want to write a banner message just > once, there are various ways of doing it - easiest off the top of > my head is to have a static boolean in the MXJ class which you > examine, and set, in the constructor. (This assumes that object > instantiation is single-threaded.) > > > nick rothwell -- composition, systems, performance -- http:// > www.cassiel.com > > >
    • Jun 23 2006 | 9:10 am
      On 22 Jun 2006, at 20:42, topher lafata wrote:
      > Or maybe just have a static block at the top of your class that > does the post...
      That's a cleaner solution, but I wasn't sure whether it was safe to do post() while a static block is being executed...
      -- N.
      nick rothwell -- composition, systems, performance -- http:// www.cassiel.com
    • Jun 24 2006 | 6:40 am