send to program debuging

Mike McManus mcmanusm at kramergraphics.com
Fri Dec 13 11:05:00 EST 2002


Looks like that is exactly what I need. A very simple solution and 
elegant actually. Should be able to use it  throughout this 
application...many thanks.


On Friday, December 13, 2002, at 08:04  AM, Jan Schenkel wrote:

> --- Mike McManus <mcmanusm at kramergraphics.com> wrote:
>> Oh boy..this is not fun sounding. Yes the send
>> command will not work.
>> Need to use "send to program" Being a Mac guy I just
>> understood that.
>> Now The two runrevs, don't like that idea either,
>> but it may come to
>> that. Thinking about this option while I was driving
>> today. I might be
>> able to build a standalone. That simply accepts the
>> send to program
>> command. Puts it into a field, then sends an
>> acknoledgement back to the
>> development stack.
>>
>> This way I should get what you were talking about.
>> Get a clear
>> understanding of what I need to parse and how the
>> variables get
>> passed(yes there will be variables, filenames,
>> process codes, paths).
>> Once I have those mastered in the main stack and the
>> standalone, I will
>> be able to code it properly and compile? Mostly what
>> will be sent out
>> is a command along with the parameters. The response
>> should be a "yes I
>> am done with process 10001" kinda thing or an error.
>>
>> Does that sound reasonable to anybody other than me?
>>
>
> The easiest way to use the 'send in program' command
> is touse your own class and type, that way you only
> have to worry about how to structure the extra data.
>
> Example:
> - class "MIKE" -- short for your own class
> - id    "PRST" -- just a 'process status' candidate
> - extra data "10001"
> would translate into:
>  send "10001" to program tOtherProgram with "MINEPRST"
>
> In the other program, the card (and then up to the
> stack, mainstack, etc.) will receive an AppleEvent
> message:
>
> on appleEvent pClass, pID, pSender
>   switch pClass & pID
>   case "MIKEPRST"
>     -- this is an event of class "MIKE" and id "PRST"
>     request appleEvent data
>     -- this will put the actual message data in 'it'
>     reply the uStatus[it] of me
>     break
>   default
>     pass appleEvent
>     break
>   end switch
> end appleEvent
>
> There you have it: you just used your own AppleEvent
> Class and ID to send a question to the other program,
> and it replied the content of a custom property.
>
> Hope this helped,
>
> Jan Schenkel.
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same 
> time."  (La Rochefoucauld)
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list