Hi all OF lovers,
so i am making some classes (or addons) and i get a very strange behaviour:
if a class has an image member, i want to load an image from the directory where the file defining the class is.
But i can not do that.
so say we have the class “TestClass” with the file TestClass.h in the directory “Dir”.
How do i do to load an image from say, “Dir/data/image1.jpg” ???
I want to use that load in the initialization of the class:
tclass = TestClass();
and
TestClass(){
img.loadImage( imPath);
}
but i can not get the image to be loaded, can not find the correct imPath…
But very Strange ::::::
when i put that image in the bin/data/ folder of the source code o the app (NOT the class definition), i can not load them … but i can load the fonts… etc…
More strange ::: in some classes it works ! in others not… !!!..
Any idea?
so in summary: how to load data in the class definition method from folders in the class definition files???
thank you !