SAV file call external function problem? [message #63776] |
Thu, 20 November 2008 02:10  |
Rongchang Chen
Messages: 12 Registered: August 2008
|
Junior Member |
|
|
Hi everyone,
My SAV file use 'call_function' command.
The 'function_name.pro' which called by 'call_function' command is to
load image, but every experiment we will create new
'function_name.pro' for the new images,it is impossible to compile and
enclose all 'function_name.pro' in SAV file in advance.
Is it possible for SAV file to call external function which doesn't
enclose in SAV file?? Thank you very much!!
With best wishes,
Rongchang
|
|
|
|
|
Re: SAV file call external function problem? [message #63896 is a reply to message #63776] |
Fri, 21 November 2008 07:22  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
Rongchang Chen wrote:
> Thank David and Remimar for your helpful discussion,unfortunately I
> can't share the source because the software is not only developed by
> myself,I'm really sorry about this.
> Thank you again!
>
> Best wishes,
> Rongchang
I guess both David and Reimar are correct... VM does not allow to run
un-compiled code (otherwise nobody would be buying IDL anymore!!!).
However, you might have similarities in your images that you can
exploit. For example, if the only differences are only the size of the
header or the data type, you could have a GUI or a PROMPT that ask for
those info, and act, in your pre-compiled code, accordingly...
Jean
|
|
|
|
Re: SAV file call external function problem? [message #63908 is a reply to message #63776] |
Fri, 21 November 2008 03:39  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Rongchang Chen schrieb:
>>> Reimar
>> a) one could implement a service which sends thefunctionto a server
>> which returns the compiledsavfile.
>>
>> b) if thefunctionis for only defining vars there are other
>> possibilities. For further discussions please show the code. e.g.
>> use a pastebin (http://paste.pocoo.org)
>
> Thank you for discussion.
> I would like the SAVE file which run on Virtual Machine works
> following way:
> 1. One can enter the image open function name in the 'widget_text';
> 2. GUI get the function name and call the function to open images.
> OK,if the function name is pre-compile then it work well,but if i need
> to use new function name which doesn't pre-compile in SAVE file,then
> it doesn't work.Because the function name is change time by time,it's
> not convenient to recompile again,also not good for source code
> protect in my opinion.
> Can this problem be improve?Thank you!
>
> Best wishes,
> Rongchang
If you can share an example source of the function you enter
we can discuss how to solve this issue differently.
Reimar
|
|
|
Re: SAV file call external function problem? [message #63909 is a reply to message #63776] |
Fri, 21 November 2008 03:41  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Reimar Bauer writes:
> The question is how that on the fly created function looks like. If he
> shares an example we can discuss how that issue could be solved.
> I assume that most of the code used in that function is already compiled.
I think at this stage making *any* kind of assumption will
only result in increased newsgroup volume. I'm already up
at 4AM to deal with the onslaught, but I think in the end
the answer won't change. I'm 99 percent sure the answer
is "no". :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: SAV file call external function problem? [message #63911 is a reply to message #63776] |
Fri, 21 November 2008 03:31  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
David Fanning schrieb:
> Rongchang Chen writes:
>
>> Yes I want to run SAVE file on Virtual Machine.CALL_FUNCTION need pre-
>> compile all routines,can other commands or methods support to call idl
>> routines which doesn't pre-compile in SAVE file?
>
> Not to my knowledge, no.
>
> Cheers,
>
> David
>
The question is how that on the fly created function looks like. If he
shares an example we can discuss how that issue could be solved.
I assume that most of the code used in that function is already compiled.
Reimar
|
|
|
Re: SAV file call external function problem? [message #63913 is a reply to message #63776] |
Fri, 21 November 2008 03:06  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rongchang Chen writes:
> Yes I want to run SAVE file on Virtual Machine.CALL_FUNCTION need pre-
> compile all routines,can other commands or methods support to call idl
> routines which doesn't pre-compile in SAVE file?
Not to my knowledge, no.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: SAV file call external function problem? [message #63915 is a reply to message #63860] |
Fri, 21 November 2008 02:07  |
Rongchang Chen
Messages: 12 Registered: August 2008
|
Junior Member |
|
|
>> Reimar
>
> a) one could implement a service which sends thefunctionto a server
> which returns the compiledsavfile.
>
> b) if thefunctionis for only defining vars there are other
> possibilities. For further discussions please show the code. e.g.
> use a pastebin (http://paste.pocoo.org)
Thank you for discussion.
I would like the SAVE file which run on Virtual Machine works
following way:
1. One can enter the image open function name in the 'widget_text';
2. GUI get the function name and call the function to open images.
OK,if the function name is pre-compile then it work well,but if i need
to use new function name which doesn't pre-compile in SAVE file,then
it doesn't work.Because the function name is change time by time,it's
not convenient to recompile again,also not good for source code
protect in my opinion.
Can this problem be improve?Thank you!
Best wishes,
Rongchang
|
|
|
Re: SAV file call external function problem? [message #63916 is a reply to message #63776] |
Fri, 21 November 2008 02:00  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Rongchang Chen schrieb:
>> I presume you mean you are running your SAVE file
>> on either a runtime license or the Virtual Machine.
>> In either of those cases, there can be no *compiling*
>> of routines. So, you will have had to pre-compile all
>> the functions you intend to call with CALL_FUNCTION
>> and include those in the SAVE file.
>
>
> Yes I want to run SAVE file on Virtual Machine.CALL_FUNCTION need pre-
> compile all routines,can other commands or methods support to call idl
> routines which doesn't pre-compile in SAVE file? Thank you!
where is the example function you create on the fly?
Reimar
|
|
|
Re: SAV file call external function problem? [message #63918 is a reply to message #63866] |
Fri, 21 November 2008 01:49  |
Rongchang Chen
Messages: 12 Registered: August 2008
|
Junior Member |
|
|
> I presume you mean you are running your SAVE file
> on either a runtime license or the Virtual Machine.
> In either of those cases, there can be no *compiling*
> of routines. So, you will have had to pre-compile all
> the functions you intend to call with CALL_FUNCTION
> and include those in the SAVE file.
Yes I want to run SAVE file on Virtual Machine.CALL_FUNCTION need pre-
compile all routines,can other commands or methods support to call idl
routines which doesn't pre-compile in SAVE file? Thank you!
|
|
|