hi, i programming a j2me game, and i using compile directives...

<midlet.java>

//#define usesound

.....

//#ifdef usesound

loadsound();

//#endif

....

this are in the main MIDlet class, i defined the directive "usesound", and i write instructions on this condition, if usesound is declared. in other classe, i want to use the same define, only asking if this is defined:


<myobject.java>

.......

//#ifdef usesound

this.load_my_bject_sound();

//#endif


But is no run correctaly, if the "usesound" is defined in midlet.java, it appear only in midlet.java. in myobject.java it is no defined... i must define on each class!, but i working with a lot of class, more or minus 20 classes, how can i put and erase 20 directives for each simple multiplataform test?

if you know how to define a global directive, tell me please

thank

Fred

Obs: i using NetBeans IDE 5.0 and programming for nokia UI with midp 1.0.. and my english is a trash hehe, sorry