comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Whither Object
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Whither Object [message #34768 is a reply to message #34630] Thu, 10 April 2003 10:23 Go to previous message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
Thanks, David.

Based on David's suggestion, I have this new funtion

function obj_new2, class
filename = StrLowCase(class) + "__define.pro"
return, (File_Which(filename, /Include_Current_Dir) EQ "") ? $
obj_new() : obj_new(class)
end

Note: there was a slight keyword error in David's post (heaven forfend!).
/Include_Current_Directory should be /Include_Current_Dir
and the former actually caused an error (IDL 5.6, Mac OS X).

My only concern is that this may not work in an IDL runtime distribution
which I am preparing. If everything is pre-compiled and nicely packaged,
then there won't be a directory to look through, true?

I'm thinking that we need a new IDL feature to handle this. Something
within OBJ_NEW() itself. Ok, who has connections on the inside...

Perhaps something more elegant than this
a = obj_new(class, /ReturnNullObjectIfNotFound, error=error)

M. Katz
[Message index]
 
Read Message
Read Message
Previous Topic: Re: porting IDL code to OS X
Next Topic: Compound Widget and Event Handlers

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:52:23 PDT 2025

Total time taken to generate the page: 0.93844 seconds