SDK encap weird results
[1/6] from: Christophe::Coussement::mil::be at: 7-Jun-2005 10:19
Hi list,
[Working under WinNT4.0 SP6]
Problem:
--------
I have created some utilities in REBOL and encap then with SDK to obtain an exe I can
call from a code editor.
- One of those utilities is a "script launcher" named "launcher.exe".
- when I invoque it from the shell, it works
- when I invoque it from the "External Tools" from EmEditor, it works.
- when I invoque it from a Beanshell script from jEdit, it hangs !
I get then the weird and un-understandable warning:
"PROGRAM ERROR: Invalid encapsulated data."
I tried to use:
exec("encap.exe " + buffer.getPath());
and a thread
run() {
exec("launcher.exe " + buffer.getPath());
}
new Thread(this).start();
without success.
NB: the same problem appears with other encap'ed scripts.
Question:
---------
- It wich case does this warning triggers ?
- which special conditions are created by the use of Beanshell, which does trigger it
?
Although this is almost OT, I hope a kind someone can put me on the right path to the
solution.
TIA :-)
=christophe coussement
[2/6] from: gchiu::compkarori::co::nz at: 7-Jun-2005 21:14
I don't know the answer, but the only time I consistently see this error is when I try
to launch another instance of an encapped application after having either 'call'd a system
function, or use the 'request-file commands.
In this case, Rebol is executing a Rebol encapped script, and maybe the same conditions
are then operative.
Coussement Christophe wrote.. apparently on 7-Jun-2005/10:19:16+2:00
>I get then the weird and un-understandable warning:
>
> "PROGRAM ERROR: Invalid encapsulated data."
--
Graham Chiu
http://www.compkarori.com/cerebrus
http://www.compkarori.com/coyote - file replicator
[3/6] from: gabriele::colellachiara::com at: 7-Jun-2005 12:37
Hi Christophe,
On Tuesday, June 7, 2005, 10:19:16 AM, you wrote:
CC> - It wich case does this warning triggers ?
CC> - which special conditions are created by the use of Beanshell, which CC> does trigger
it ?
This usually happens when REBOL cannot locate its executable file.
It needs to do so to be able to extract out the REBOL code. Maybe
the launcher you are using does not set some information REBOL
uses to determine the location of the .exe file.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/
[4/6] from: Christophe:Coussement:mil:be at: 7-Jun-2005 14:47
Gabriele, Graham,
Thanks a lot for your answers. I'll start to dig in that ...
greetz,
==christophe coussement
[5/6] from: volker::nitsch::gmail::com at: 8-Jun-2005 12:19
exec("encap.exe " + buffer.getPath());
and not finding exe (Gabrieles answer).
Have you tried full path?
exec("c:\whereever\encap.exe " + buffer.getPath());
On 6/7/05, Coussement Christophe <[Christophe--Coussement--mil--be]> wrote:
> Gabriele, Graham,
> Thanks a lot for your answers. I'll start to dig in that ...
<<quoted lines omitted: 38>>
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
--
-Volker
Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem.
David
Wheeler
[6/6] from: Christophe::Coussement::mil::be at: 9-Jun-2005 10:00
Volker,
Thanks for your suggestion. Actually I did and it won't help.
But I did find out it has to do with the exe location. The problem seems to be resolved
if I locate my exe's into the same dir than the bsh (BeanShell macro files).
Somehow, the encap script must be located into the same working dir than the app which
calls it, or you have to find a way to set the dir up(which I cannot do due to my limited
Java knowledge).
Thanks!
==christophe coussement
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted