Hi Yeni,
I think that is something related to IDL's search path. I would suggest adding the directory that stores the code to IDL's search path through the IDL Workbench (Preferences->IDL->Paths) or you can try placing the following in your extensions code:
;find the directory that this code/save file is being run from
thisdir = FILE_DIRNAME(((SCOPE_TRACEBACK(/STRUCT))[-1]).FILENAME)
;if not in the path, then append to IDL's search path
if ~(!path.contains(thisdir)) then pref_set, 'IDL_PATH', !PATH + ';' + thisdir, /commit
That code looks to see if the directory you want to add is in !PATH already, and if it is not, then it is added to the end. You could also try adding the contents for myObj__define before your extension code. IDL will compile the entire file for your extension before running which means that your object should be compiled and ready to use.
|