The create method only creates the external queue, it does not create a
RexxQueue instance. The return value is just the string name of the queue
you just created, so the variable testQ is just a string object, which does
not support a linein method. Try adding this:
testQ = .rexxqueue~new('testQ')
Rick
On Fri, Feb 14, 2014 at 6:17 PM, J. Leslie Turriff <
[email protected]> wrote:
> I'm trying to use the RexxQueue utility class as documented in
> "5.4.17 The
> RexxQueue Class" of "ooRexx Documentation 4.2 | Open Object Rexx(tm)|
> Reference", but I obviously don't understand what the manual is telling me.
> Here's a testcase program:
>
> #!/usr/bin/rexx
> trace ?rnormal
> signal on syntax
>
> if .rexxQueue ~ exists('testQ') then
> .rexxQueue ~ delete('testQ')
>
> testQ = .rexxQueue ~ create('testQ')
> "/usr/bin/tree -pugshD -L 3 --noreport",
> "|/usr/bin/rxqueue testQ"
> anchor = testQ ~ linein -- <=== fails here.
> lines = testQ ~ queued
> line = .array ~ new(lines)
>
> do l = 1 to lines
> line[l] = testQ ~ linein
> end
>
> syntax:
> say errortext(rc)
>
> if .rexxQueue ~ exists('testQ') then
> .rexxQueue ~ delete('testQ')
> exit
>
> And here's what happens when I run it:
>
> 17:08:29,leslie@pinto
> ~/bin/rexx
> $testcase
> +++ "LINUX COMMAND /home/leslie/bin/rexx/testcase"
> 3 *-* signal on syntax
> +++ Interactive trace. "Trace Off" to end debug, ENTER to Continue. +++
>
> 5 *-* if .rexxQueue ~ exists('testQ')
> >>> "1"
>
> 5 *-* then
> 6 *-* .rexxQueue ~ delete('testQ')
> >>> "0"
>
> 8 *-* testQ = .rexxQueue ~ create('testQ')
> >>> "testQ"
>
> 9 *-* "/usr/bin/tree -pugshD -L 3 --noreport","|/usr/bin/rxqueue
> testQ"
> >>> "/usr/bin/tree -pugshD -L 3 --noreport |/usr/bin/rxqueue
> testQ"
>
> 11 *-* anchor = testQ ~ linein -- <=== fails here.
> 19 *-* syntax:
>
> 20 *-* say errortext(rc)
> >>> "Object method not found"
> Object method not found
>
> 22 *-* if .rexxQueue ~ exists('testQ')
> >>> "1"
>
> 22 *-* then
> 23 *-* .rexxQueue ~ delete('testQ')
> >>> "0"
>
> 24 *-* exit
>
> Leslie
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience. Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Oorexx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users