Re: Pete Lomax M Editor vs Edita

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
> 
> On Sun, 04 Jun 2006 18:36:06 -0700, Serge Lavigne
> <guest at RapidEuphoria.com> wrote:
> 
> >Thanks Pete for the elaborate answer.
> Have another blink)
> >
> >I was looking for debugging facilities like in the good old Ed (with trace). 
> >My question is probably naive but is this something potentially
> >feasible with Edita? 
> OK, first off the trace() window and Ed look very similar. What
> happens when you run a program from Ed is that Ed stops dead until the
> program finishes. ex.exe 'inherits' the console so if it does go into
> trace() it re-uses the same window that Ed was using. So it appears
> that Ed is displaying trace(), but in fact Ed itself is fast asleep.
> One quick proof of this is that ed.ex does not contain the string
> "main", so it cannot be displaying "F1=main F2=trace". cmiiw.
> 
> In contrast, exw.exe does not inherit the console - try running a
> *.exw program from Ed to see what I mean. In this case Ed does not go
> to sleep, which I might struggle to explain:
> 
> One thing to note here is that
> }}}
<eucode>
> atom t0,t1
>     t0 = time()
>     system("exw.exe",1)
>     t1 = time()
>     ?{t0,t1}
>     if getc(0) then end if
> </eucode>
{{{

> behaves rather differently to:
> }}}
<eucode>
> atom t0,t1
>     t0 = time()
>     system("ex.exe",1)
>     t1 = time()
>     ?{t0,t1}
>     if getc(0) then end if
> </eucode>
{{{

> In the first case (exw) control returns almost immediately, in the
> second(ex) it waits until the program has terminated, so you'll get
> something like {0.01,0.25} for the exw case and {0.01,7.58} for the
> ex case (depending on how long you leave it). A complete explanation
> of the difference would probably involve the subsystem setting in the
> PE header of the windows executable, which I only vaguely grasp.
> Maybe someone else can step in.
> 
> OK, back to the topic.
> Attempting to do something with Edita when running "exw.exe test.exw"
> or "ex.exe  test.ex" is an absolute non-starter. The official PD
> executables simply don't have any kind of API to do this. There is
> however at least one alternative: eu.ex. Unfortunately this contains
> no code whatsoever for the debug/trace window, but Matt Lewis has
> managed to add a trace window for his OOEU on wxWindows project. It
> would be possible to send messages back and forth between a modified
> eu.ex and Edita, to make the latter behave like it is trace(), but
> this is a big complex project. Using eu.ex, performance is a worry,
> but someone (else) could one day buy the source and repackage up
> replacement ex.exe/exw.exe, once it is all working in the pd source,
> unless Rob vetoes that.
> 
> If you take a look at eama.e and the corresponding routine CD_message
> in edita.exw, it should show you how a second app might communicate
> with Edita to allow it to behave as a debugger. Of course you'd need a
> modified eama.e that uses other, new, messages besides CD_CONS etc.
> 
> Regards,
> Pete
> 
> 
Woa Nelly. Do I have until dinner to digest all that blink.
Thanks again Pete. One day, I'l be able to throw someting like that at you,
then, watch out.

Regards

Serge 

When all you have is a hammer, everything starts to look like a nail.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu