Leslie,

The stack (queue, if you prefer) provided by ooRexx attempts to mimic 
the behavior of the inherit stack provided by mainframe z/VM, also known 
as CP/CMS, where Rexx was developed by Mike Cowlishaw.

There, the stack is *ahead* of the console input buffer (command line 
input) by the design of CP (which provides virtualization [we'll ignore 
PR/SM for purposes of this discussion]) and CMS (one of many Os's that 
can be used).

I'm a VM dinosaur and don't use Linux or even much of Windows from 
ooRexx, except for exactly what I need to get the job done.

So, with those caveats, here's what I think. Hopefully, real experts 
will refine/correct this as needed.

I've done some exploring with Google for 'yad Linux' and found that yad 
gets it input from STDIN, just as one would expect.

If the stack works as I expect it should, after you've done the Parse 
Pull and modified *all* the lines you can then QUEUE each one before 
invoking yad. You might need some kind of termination marker as the last 
line. Perhaps a null line?

I notice that yad is on SourceForge, so you should be able to find some 
documentation about it. There are *lots* of examples there, but none 
that I could find using ooRexx. :-(

Please keep us updated on your progress.

Les


On 9/12/2016 11:35 PM, J. Leslie Turriff wrote:
>       My original example,
>
> find . -name '*.h' | yad --list --title "Search Results"  --text "Finding all
> header files.." --column "Files"
>
> will work when passed to bash from rexx
>
> #!/usr/bin/rexx
>  'find . -name "*.h"',
> '|yad --list',
>           '--title "Search Results"',
>           '--text "Finding all header files.."',
>           '--column "Files"',
> '|rxqueue'
>
>   do queued()
>     parse pull yad_result
>     say yad_result
>   end
> exit rc
>
> because the entire command is processed by bash.  If  I want to process the
> results of the find command before passing them to yad
>
> #!/usr/bin/rexx
>  'find . -name "*.h"',
> '|rxqueue'
>
>   do l = 1 to queued()
>     parse pull line.l
> --   do something to line.l
> --   somehow (?) stack line. contents for yad
>   end
>
> -- how does bash know that yad should read stacked input?
>  'yad --list',
>          '--title "Search Results" ',
>          '--text "Finding all header files.."',
>          '--column "Files"',
> '|rxqueue'                                   -- get yad results
>
>   do queued()
>     parse pull yad_result
>     say yad_result
>   end
> exit rc
>
> merely SAYing them will just write them to the console, as there appears to be
> no way to tell bash to pipe them to yad.
>
> Leslie
>
> On 2016-09-12 16:24:36 Les Koehler wrote:
>> So Leslie's code would be:
>>
>> say 'some message' | yad
>>
>> and it could be done multiple times to let yad accumulate all  the text
>> and display it?
>>
>> Les
>>
>

------------------------------------------------------------------------------
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to