Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there an ooRexx utility to show a list of files for mouse selection?

275 views
Skip to first unread message

Maurice Batey

unread,
Mar 13, 2013, 1:50:13 PM3/13/13
to
My Rexx is quite rusty but recently I've been using it to do the odd
small ad hoc job, using ooRexx.

The current program searches in a directory of files looking for files
that have certain characteristics, and compiles a list of those that
satisfy the search criteria.
That all works nicely.

What I then want to do is put on screen a list of those files such that
the user can scroll the list and select nan entry using a mouse (or
positioning a marker line and hitting Enter), so that the program can
then (using a Linux app) display the contents of that file (then repeat
the selection for other iselected files).

Is there a ooRexx utility that will is0play such a selectable list?!

--
/\/\aurice
(Retired in Surrey, UK) Registered Linux User #487649
Using Linux Mandriva 2010.2
(Replace "nomail.afraid" by "bcs" to reply by email)

PeCoNe

unread,
Mar 13, 2013, 1:55:23 PM3/13/13
to
Op 2013-03-13 18:50, Maurice Batey schreef:
> My Rexx is quite rusty but recently I've been using it to do the odd
> small ad hoc job, using ooRexx.
>
> The current program searches in a directory of files looking for files
> that have certain characteristics, and compiles a list of those that
> satisfy the search criteria.
> That all works nicely.
>
> What I then want to do is put on screen a list of those files such that
> the user can scroll the list and select nan entry using a mouse (or
> positioning a marker line and hitting Enter), so that the program can
> then (using a Linux app) display the contents of that file (then repeat
> the selection for other iselected files).
>
> Is there a ooRexx utility that will is0play such a selectable list?!
>

Look for ooDialog.

Gil Barmwater

unread,
Mar 13, 2013, 2:41:34 PM3/13/13
to
Nope. ooDialog is only Windows.

Maurice Batey

unread,
Mar 13, 2013, 4:00:14 PM3/13/13
to
On Wed, 13 Mar 2013 14:41:34 -0400, Gil Barmwater wrote:

> ooDialog is only Windows.

Yes, I saw that. So cannot do under Linux, it seems.

OK, perhaps I can do it another way.

If the ooRrexx program makes successive calls of a Linux function, e.g.

'kmail --view ~/testmail/sample-email'
'kmail --view ~/testmail/huge-base64'

how can that be arranged so that the program halts after each call, and
re-starts (i.e. to do the 2nd call) only when the user exits from the
first call of the Linux function?

--
/\/\aurice

U. Zinngrebe

unread,
Mar 13, 2013, 8:08:32 PM3/13/13
to
Maurice Batey wrote:

> What I then want to do is put on screen a list of those files such that
> the user can scroll the list and select nan entry using a mouse (or
> positioning a marker line and hitting Enter), so that the program can
> then (using a Linux app) display the contents of that file (then repeat
> the selection for other iselected files).

>
> Is there a ooRexx utility that will is0play such a selectable list?!
>

kdialog should be able to do that (I have no practical experience).

It is a command line utility that provides basic GUI components like
combobox, file selector etc.

So if you send kdialog (with parameters) to the environment from within the
script it ought to work.

https://www.bg.bib.de/portale/bes/Scripting/Shell/kdialog/x85.html
(from the first links that google came up with)

cheers, Uli


Rony

unread,
Mar 14, 2013, 8:28:27 AM3/14/13
to
Use BSF4ooRexx (http://sourceforge.net/projects/bsf4oorexx/files/GA/BSF4ooRexx-410.20130107-GA/).

You may want to look into the Rexx program "samples/demo.BSF.dialog.rxj". Look at the example that
starts with "res=.bsf.dialog~inputBox(...)" at the end of it. Please note that you can use any Rexx
collection (e.g. an .array object), not only a .list object as demonstrated in the example.

If that serves your pupose on Linux you should know that then the same Rexx program should be able
to run unchanged on Windows and MacOSX, if BSF4ooRexx is installed there too.

---rony

Maurice Batey

unread,
Mar 14, 2013, 5:16:43 PM3/14/13
to
On Wed, 13 Mar 2013 20:00:14 +0000, Maurice Batey wrote:

> how can that be arranged so that the program halts after each call, and
> re-starts (i.e. to do the 2nd call) only when the user exits from the
> first call of the Linux function?

Not possible?
(But many thanks for other info,. e.g. w.r.t. KDialog.; much appreciated.)

Maurice Batey

unread,
Mar 15, 2013, 8:33:49 AM3/15/13
to
On Thu, 14 Mar 2013 01:08:32 +0100, U. Zinngrebe wrote:

> kdialog should be able to do that

Well, KDialog does look interesting, but it appears to limit its function
to asking a question (or requesting info) and returning the response.

What I need is something that will display a list of character strings,
allow the user to select the n'th line, and return 'n' to the ooRexx
program.

(Rather like 'listfiles' but showing a list of strings rather than assuming
each line is a file name, and simply returning the value 'n' when the user
selects the n'th line.)

--
/\/\aurice

Maurice Batey

unread,
Mar 15, 2013, 3:31:41 PM3/15/13
to
On Thu, 14 Mar 2013 13:28:27 +0100, Rony wrote:

> Use BSF4ooRexx

Is that a replacement for ooRexx?
Is it a superset of ooRexx? (i.e. will it run existing 00rexx programs?)

> You may want to look into the Rexx program "samples/demo.BSF.dialog.rxj"

Is that in the Linux version of BSF4ooRexx?

--
/\/\aurice

LesK

unread,
Mar 15, 2013, 5:23:53 PM3/15/13
to
On 3/15/2013 3:31 PM, Maurice Batey wrote:
> On Thu, 14 Mar 2013 13:28:27 +0100, Rony wrote:
>
>> Use BSF4ooRexx
>
> Is that a replacement for ooRexx?
> Is it a superset of ooRexx? (i.e. will it run existing 00rexx programs?)
>
>> You may want to look into the Rexx program "samples/demo.BSF.dialog.rxj"
>
> Is that in the Linux version of BSF4ooRexx?
>
From the rexxla.org home page:

BSF4ooRexx is a language binding for the easy to learn and powerful
scripting language ooRexx, which allows ooRexx programmers to directly
use the Java Runtime Environment (JRE) installed on practically every
computer. The language binding camouflages Java as a dynamically typed,
caseless language, making it extremely easy to exploit Java by non-Java
programmers. The project is to be found at its SourceForge page.
--

Les (Change Arabic to Roman to email me)

U. Zinngrebe

unread,
Mar 15, 2013, 8:25:05 PM3/15/13
to
Maurice Batey wrote:

> On Thu, 14 Mar 2013 01:08:32 +0100, U. Zinngrebe wrote:
>
> What I need is something that will display a list of character strings,
> allow the user to select the n'th line, and return 'n' to the ooRexx
> program.

I don't understand the kdialog problem, a menu dialog box does it:

#! /usr/bin/rexx
'kdialog --menu "Select a language:" 1 "American English" 2 French 3 "Oz
English" | rxqueue '
pull answer
say 'chosen:' answer

RXQUEUE you can read up in the reference, chapter 18.3.2.

I would also install rlwrap and change the hashbang to
#!/usr/bin/rlwrap /usr/bin/rexx
so that you have cursors and command history while tracing.


Cheers, Uli


********************************************************

http://www.wikilearning.com/articulo/shell_scripting_en_kde-
kdialog_dialog_types/193-5

Menu and selection dialogs

This section covers simple menus, checklists, radio buttons and combo-boxes.
These are typically used for providing a choice of options.

The menu is used to select one of a range of options. Each option is defined
using two arguments, which you might like to think of as a key and a label.
An example of the usage is shown below.

Example 23. --menu dialog box

kdialog --menu "Select a language:" a "American English" b French d "Oz'
English"



Figure 17. --menu dialog box

If you select the first option (in this case American English and press OK,
then kdialog will send the associated key (in this case the letter a) to
standard output. Note that the keys do not need to be lower case letters -
you can equally use numbers, upper case letters, strings or the contents of
shell variables.

As with the other examples we've seen, the return value depends on the
button used. OK returns zero. Cancel returns one.

U. Zinngrebe

unread,
Mar 15, 2013, 8:43:36 PM3/15/13
to
Maurice Batey wrote:

> On Wed, 13 Mar 2013 20:00:14 +0000, Maurice Batey wrote:
>
>>> If the ooRrexx program makes successive calls of a Linux function, e.g.
>>>
>>> 'kmail --view ~/testmail/sample-email'
>>> 'kmail --view ~/testmail/huge-base64'
>> how can that be arranged so that the program halts after each call, and
>> re-starts (i.e. to do the 2nd call) only when the user exits from the
>> first call of the Linux function?
>
> Not possible?
> (But many thanks for other info,. e.g. w.r.t. KDialog.; much
> appreciated.)
>

I don't know.

By default the rexx interpreter does exactly what you want: sends a command
to the environment and waits for the return code.
However the command has the right to send an early reply and continue on a
different thread, concurrently to the interpreter. This is a way to fork.

kmail seems to send an early reply, and the return code indicates rather
"task received" than "task finished".

Cheers, Uli

Jerry Stuckle

unread,
Mar 15, 2013, 8:47:11 PM3/15/13
to
No, kmail is a mail client. It just queues up the mail to the MTA. It
doesn't indicate the task is "received" or "finished".

Most mail clients work similarly. They only queue the mail; they don't
indicate whether it was actually sent or received; that's the MTA's job.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Maurice Batey

unread,
Mar 16, 2013, 9:16:58 AM3/16/13
to
On Sat, 16 Mar 2013 01:43:36 +0100, U. Zinngrebe wrote:

> kmail seems to send an early reply, and the return code indicates rather
> "task received" than "task finished".

Ah, that explains it! Thank you.

It has been suggested to simply do a Pull after each call of KMail.
This does do the trick, but requires a key to be hit to continue, but in
the absence of a neater solution I may well settle for that...

Maurice Batey

unread,
Mar 16, 2013, 9:18:50 AM3/16/13
to
On Fri, 15 Mar 2013 17:23:53 -0400, LesK wrote:

> BSF4ooRexx is a language binding for the easy to learn and powerful
> scripting language ooRexx, which allows ooRexx programmers to directly
> use the Java Runtime Environment

So the answer is 'yes', it *is* a true superset of ooRrexx?!

(Nice to hear from an old colleague. Les)

Maurice Batey

unread,
Mar 16, 2013, 9:20:35 AM3/16/13
to
On Fri, 15 Mar 2013 19:31:41 +0000, I wrote:

in response to:
>> You may want to look into the Rexx program "samples/demo.BSF.dialog.rxj"

> Is that in the Linux version of BSF4ooRexx?

Anyone know, please?

Maurice Batey

unread,
Mar 16, 2013, 10:02:47 AM3/16/13
to
On Sat, 16 Mar 2013 01:25:05 +0100, U. Zinngrebe wrote:

> 'kdialog --menu "Select a language:" 1 "American English" 2 French 3 "Oz
> English" | rxqueue '
> pull answer
> say 'chosen:' answer
>
> RXQUEUE you can read up in the reference, chapter 18.3.2.

That looks promising, but appears to require the menu lines all in 1
character string.
I had already looked at other options but could not see a 'menu' one
that accepted a file containing the menu lines (of which there may be
100's).

> I would also install rlwrap and change the hashbang to
> #!/usr/bin/rlwrap /usr/bin/rexx
> so that you have cursors and command history while tracing.

Thank you for the tip!

LesK

unread,
Mar 16, 2013, 12:48:32 PM3/16/13
to
On 3/16/2013 9:18 AM, Maurice Batey wrote:
> On Fri, 15 Mar 2013 17:23:53 -0400, LesK wrote:
>
>> BSF4ooRexx is a language binding for the easy to learn and powerful
>> scripting language ooRexx, which allows ooRexx programmers to directly
>> use the Java Runtime Environment
>
> So the answer is 'yes', it *is* a true superset of ooRrexx?!
>
> (Nice to hear from an old colleague. Les)
>
Hi Maurice,

I was wondering if that was you... welcome! Several old friends here.
Not a superset, but you could think of it as an extension that you can
use from your ooRexx code. Similar in nature to OLE for MS products. The
big difference is it opens up the whole world of Java and its tools for
you to use from ooRexx!

LesK

unread,
Mar 16, 2013, 12:52:52 PM3/16/13
to
So you write a little rexx function... :-)

LesK

unread,
Mar 16, 2013, 1:03:11 PM3/16/13
to
On 3/16/2013 9:16 AM, Maurice Batey wrote:
> On Sat, 16 Mar 2013 01:43:36 +0100, U. Zinngrebe wrote:
>
>> kmail seems to send an early reply, and the return code indicates rather
>> "task received" than "task finished".
>
> Ah, that explains it! Thank you.
>
> It has been suggested to simply do a Pull after each call of KMail.
> This does do the trick, but requires a key to be hit to continue, but in
> the absence of a neater solution I may well settle for that...
>
You might need the help of an ooRexxpert, but meanwhile take a look at
the section of the Ref on Concurrency.

LesK

unread,
Mar 16, 2013, 1:10:12 PM3/16/13
to
On 3/13/2013 1:50 PM, Maurice Batey wrote:
> My Rexx is quite rusty but recently I've been using it to do the odd
> small ad hoc job, using ooRexx.
>
> The current program searches in a directory of files looking for files
> that have certain characteristics, and compiles a list of those that
> satisfy the search criteria.
> That all works nicely.
>
> What I then want to do is put on screen a list of those files such that
> the user can scroll the list and select nan entry using a mouse (or
> positioning a marker line and hitting Enter), so that the program can
> then (using a Linux app) display the contents of that file (then repeat
> the selection for other iselected files).
>
> Is there a ooRexx utility that will is0play such a selectable list?!
>
Depending on what you want to do with the file once its displayed, I
might use THE (The Hessling Editor) to display the list. I do that all
the time to select from my favorite list of folders, or a list of
virtual folders.

The nice thing about THE is that you _already_ know 95% of it... it's an
Xedit look-a-like! You could have a *lot* of fun converting my Windows
tools to recognize Linux!

Rony

unread,
Mar 16, 2013, 1:16:31 PM3/16/13
to
On 16.03.2013 14:20, Maurice Batey wrote:
> On Fri, 15 Mar 2013 19:31:41 +0000, I wrote:
>
> in response to:
>>> You may want to look into the Rexx program "samples/demo.BSF.dialog.rxj"
>
>> Is that in the Linux version of BSF4ooRexx?
>
> Anyone know, please?
>
BSF4ooRexx is an external Rexx function package for ooRexx. So it serves as an add-on.

All samples that come with the package can be run unchanged on all operating systems like Linux,
Windows and/or MacOSX, including the GUI samples.

The reason being, that BSF4ooRexx camouflages Java as the much easier to use ooRexx. Hence, whatever
functionality you use via ooRexx from Java (e.g. the GUI classes in the awt, swing or swt packages),
will run on all operating systems. This is due to Java's property to "compile once and run everywhere".

In your case, you are running Linux and the latest ooRexx for Linux I assume. If so, then

-> go to <http://sourceforge.net/projects/bsf4oorexx/files/GA/BSF4ooRexx-410.20130107-GA/> and
scroll down to read the installation instructions.

-> download the file
<http://sourceforge.net/projects/bsf4oorexx/files/GA/BSF4ooRexx-410.20130107-GA/BSF4ooRexx_install-20130107-GA.zip/download>,
which contains a cross-platform command-line installer. Unzip this file and run
"bsf4oorexx/install/linux/install.sh". You may need to logoff and logon in order to see the entry
"BSF4ooRexx" in your desktop menu, which you then can go ahead explore. One link should open the
"samples" directory which contains the aforementioned sample "samples/demo.BSF.dialog.rxj", which
you can usually run by double-clicking, but also view using the right-mouse-button.

If you use "vim" you get proper ooRexx syntax color highlighting.

A last hint: in the "BSFooRexx" menu you will find an entry named "ooRexxTry.rxj". This is an ooRexx
program that uses Java's GUI classes to create a GUI for Rexx programmers that allow you to enter
test Rexx code and execute it and see the results. This program runs unchanged on Linux, MacOSX and
Windows! (It's path in the system is "b sf4oorexx/utilities/ooRexxTry.rxj".

---

Of course there is *much more* you can do with BSF4ooRexx sticking to ooRexx and no need to learn
the Java programming language at all!

If you come to this year's International Rexx Symposium (cf. http://www.RexxLA.org), you will be
able to meet the author in person, but also get a tutorial introducing BSF4ooRexx as well as
presentations on how to create operating-system independent GUIS and/or process XML files.

HTH,

---rony

Rony

unread,
Mar 16, 2013, 1:49:41 PM3/16/13
to
Here is an example that turns the SysFileTree() stem array into an array, which is then used to fill
the dialog:

say "---"
call sysFileTree "*.rxj", "files.", "FOS" -- find all BSF4ooRexx programs
if files.0>0 then -- if any files were found, process them
do
arrFiles=.array~new -- new array (and ordered collection)
do i=1 to files.0 -- append all found file names to the array
arrFiles~append(files.i) -- append file name
end

-- bring up the input dialog box
res=.bsf.dialog~inputBox("Pick a file!", "Pick a File!", "plain", , arrFiles) -- ,
defaultTxtOption)
say "inputBox: you picked" pp(res) -- filename or .nil (if 'undo' was pressed)
end
else
say "no files were found using the pattern: '*.rxj*"


::requires BSF.CLS -- get support for using Java


The above program was created and tested on Windows XP, but should run unchanged on Linux and MacOSX
as well.

HTH,

---rony



Maurice Batey

unread,
Mar 16, 2013, 2:21:02 PM3/16/13
to
On Sat, 16 Mar 2013 12:52:52 -0400, LesK wrote:

> So you write a little rexx function

You mean to get KDialog to accept a file containing the menu text?
No idea how to get inside KDialog.

If you mean to construct the lengthy string argument (possibly >100
menu lines) to pass to 'KDialog --menu', that would take only a few minutes
to add into the overall ooRexx program, and perhaps that's what I'll try!

Maurice Batey

unread,
Mar 16, 2013, 2:24:01 PM3/16/13
to
On Sat, 16 Mar 2013 18:16:31 +0100, Rony wrote:

> it serves as an add-on.

OIC!

Many thanks also for all the info on BSF4 - much appreciated...

Maurice Batey

unread,
Mar 16, 2013, 2:30:22 PM3/16/13
to
On Sat, 16 Mar 2013 13:03:11 -0400, LesK wrote:

> take a look at the section of the Ref on Concurrency.

OK - have got the ooRexx doc's, so will peruse there.

Maurice Batey

unread,
Mar 16, 2013, 3:20:11 PM3/16/13
to
On Sat, 16 Mar 2013 13:10:12 -0400, LesK wrote:

> Depending on what you want to do with the file once its displayed,

The requirement is to display a list of lines, each containing the main
headers (Subject, From, To, Date) of selected email (maildir) files, such
that any selected line can allow the related file to be shown via KMail.

(The lines are output from the ooRexx app I've now cobbled together to
perform the KMail 'Find Messages facility, which has been broken since KMail
was akonadified.)

> I might use THE (The Hessling Editor) to display the list.

THE sounds interesting, but it's a few decades since I put the Boxes
Xedit macro together, and even since I bought the Mansfield Kedit package to
play with!

LesK

unread,
Mar 16, 2013, 5:14:44 PM3/16/13
to
On 3/16/2013 2:21 PM, Maurice Batey wrote:
> On Sat, 16 Mar 2013 12:52:52 -0400, LesK wrote:
>
>> So you write a little rexx function
>
> You mean to get KDialog to accept a file containing the menu text?
> No idea how to get inside KDialog.
>
> If you mean to construct the lengthy string argument (possibly >100
> menu lines) to pass to 'KDialog --menu', that would take only a few minutes
> to add into the overall ooRexx program, and perhaps that's what I'll try!
>
I meant to construct the lengthy string. But now that Rony has posted,
you've got one of _the_ ooRexxperts helping you!

LesK

unread,
Mar 16, 2013, 5:32:56 PM3/16/13
to
THE can also emulate Kedit. I chose it when I was forced to retire
because it is free and it nicely emulates Xedit with additional power
appropriate for the pc.

Kedit had a BOX.KEX and I used it as a base for my BOXES.THE so I could
add more box types and use it as a base for an etch-a-sketch to keep a 2
year old occupied when I was in Germany on vacation for three months.

Choosing an editor is a purely personal thing. Since THE uses whichever
Rexx you have installed as its macro language, its quite easy to write
tools for it and I've written a bunch of them and presented some at the
Rexx Symposium since 2007.

Maurice Batey

unread,
Mar 17, 2013, 9:26:49 AM3/17/13
to
On Sat, 16 Mar 2013 18:16:31 +0100, Rony wrote:

> read the installation instructions.

I notice in there:

"1) Unzip the installation archive "BSF4ooRexx_install-*.zip" (this will
also unzip the OpenOffice/StarOffice-support files)"

But I use LibreOffice! Is support for that also included?

Maurice Batey

unread,
Mar 17, 2013, 12:57:02 PM3/17/13
to
On Sat, 16 Mar 2013 18:16:31 +0100, Rony wrote:

> run
> "bsf4oorexx/install/linux/install.sh"

Tried that but it didn't like my level of ooRexx:

[root@newpc linux]# ./install.sh
Installation starts ...
setupAllAndRun.rex: this package needs ooRexx version 4.0.1 or higher,
you are running: ooRexx 4.0.0, aborting...

Looking on www.oorexx.org I can't see any recent download for Mageia (or
Mandriva).

Maurice Batey

unread,
Mar 17, 2013, 1:17:51 PM3/17/13
to
On Sat, 16 Mar 2013 18:16:31 +0100, Rony wrote:

> BSF4ooRexx is an external Rexx function package for ooRexx.
> So it serves as an add-on.

Some add-on!
The BS4 download is 6MB, whereas the ooRexx download is a mere 870KB!

Maurice Batey

unread,
Mar 17, 2013, 1:46:25 PM3/17/13
to
On Sun, 17 Mar 2013 16:57:02 +0000, I wrote:

> this package needs ooRexx version 4.0.1 or higher,
> you are running: ooRexx 4.0.0, aborting...
>
> Looking on www.oorexx.org I can't see any recent download for Mageia (or
> Mandriva).

So I tried "ooRexx-4.0.1.x86_64.rpm".

Mysteriously, although that installed, and responded to the null call
'rexx', it will not run any of my rexx progs.
(It doesn't explictly refuse; it just sits there doing nothing, and I
cannot break out with Ctl-C - only Ctl-Z.)

Does v.4 .0.1 require some particular top-of-file header line?

Maurice Batey

unread,
Mar 17, 2013, 1:59:31 PM3/17/13
to
On Sun, 17 Mar 2013 17:46:25 +0000, I wrote:

> So I tried "ooRexx-4.0.1.x86_64.rpm".
>
> Mysteriously, although that installed, and responded to the null call
> 'rexx', it will not run any of my rexx progs.

However, after replacing the 64-bit version with the 32-bit
(ooRexx-4.0.1.i586.rpm), it now works.

Does 64-bit have problems?

$ cat /etc/release
Mageia release 2 (Official) for x86_64

Maurice Batey

unread,
Mar 17, 2013, 2:09:19 PM3/17/13
to
On Sun, 17 Mar 2013 17:59:31 +0000, I wrote:

> after replacing the 64-bit version with the 32-bit
> (ooRexx-4.0.1.i586.rpm), it now works.

- as did the BSF4 install - except that it complains about 32-bit Java.

(See install log at: https://dl.dropbox.com/u/10969499/bsf4-install-log )

The $64 question is, of course, will BSF4 work, given the apparent
32-bit v. 64-bit mismatch?

Maurice Batey

unread,
Mar 17, 2013, 2:32:56 PM3/17/13
to
On Sun, 17 Mar 2013 18:09:19 +0000, I wrote:

> will BSF4 work, given the apparent
> 32-bit v. 64-bit mismatch?

From the BSF4 icon in the Launcher Menu, I selected the 'rexxtry' facility
but it failed as follows (in red!):

-------------------------------------------------
Warning: Could not start program '/opt/BSF4ooRexx/install/rexxj.sh' with
arguments '/opt/BSF4ooRexx/install/rexxj.sh /opt/BSF4ooRexx/utilities/ooRexxTry.rxj'.
-------------------------------------------------

Tomorrow will experiment to see how to use the BSF4 function in my ooRexx
progs.

LesK

unread,
Mar 17, 2013, 4:59:10 PM3/17/13
to
On 3/17/2013 1:59 PM, Maurice Batey wrote:
> On Sun, 17 Mar 2013 17:46:25 +0000, I wrote:
>
>> So I tried "ooRexx-4.0.1.x86_64.rpm".
>>
>> Mysteriously, although that installed, and responded to the null call
>> 'rexx', it will not run any of my rexx progs.
>
> However, after replacing the 64-bit version with the 32-bit
> (ooRexx-4.0.1.i586.rpm), it now works.
>
> Does 64-bit have problems?
>
> $ cat /etc/release
> Mageia release 2 (Official) for x86_64
>
I don't know what its like for Linux, but on Windows unless you have a
specific requirement for 64 bit ooRexx, you'll get better backward
compatibility with 'other' dll's if you use 32 bit ooRexx. 64 bit ooRexx
changed the API.

LesK

unread,
Mar 17, 2013, 5:36:42 PM3/17/13
to
On 3/17/2013 1:17 PM, Maurice Batey wrote:
> On Sat, 16 Mar 2013 18:16:31 +0100, Rony wrote:
>
>> BSF4ooRexx is an external Rexx function package for ooRexx.
>> So it serves as an add-on.
>
> Some add-on!
> The BS4 download is 6MB, whereas the ooRexx download is a mere 870KB!
>
Think a minute about all it has to do to handle two-way communications
between typeless data in ooRexx and typed data in Java!

Here's a quick presentation from 2011:

www.rexxla.org/events/2011/presentations/201112-BSF4ooRexx.pdf

Rony likely will post a more current, or extended presentation, link.

Maurice Batey

unread,
Mar 18, 2013, 8:58:52 AM3/18/13
to
On Sun, 17 Mar 2013 16:59:10 -0400, LesK wrote:

> 64 bit ooRexx changed the API.

Don't understand why a 64-bit version should refuse even to start
executing* an ooRexx program that runs under 32-bit ooRexx...
Why/how can there be such a difference?

(* If called with no arguments, 64-bit does respond, with syntax info.)

LesK

unread,
Mar 18, 2013, 9:32:19 AM3/18/13
to
On 3/18/2013 8:58 AM, Maurice Batey wrote:
> On Sun, 17 Mar 2013 16:59:10 -0400, LesK wrote:
>
>> 64 bit ooRexx changed the API.
>
> Don't understand why a 64-bit version should refuse even to start
> executing* an ooRexx program that runs under 32-bit ooRexx...
> Why/how can there be such a difference?
>
> (* If called with no arguments, 64-bit does respond, with syntax info.)
>
Doesn't make sense to me either, but I never touch 64 bit.

Les

Rony

unread,
Mar 18, 2013, 9:53:32 AM3/18/13
to
Hi Maurice,

this e-mail attempts to kill a few birds with one stone.

Ad 64- vs. 32-bit:
------------------
Newer operating systems come with 64-bit, which means that only 64-bit executables and libraries can
run. In order to support 32-bit executables and libraries the respective 32-bit operating system
support must be installed. This may or may not be the case on Linux (depends on distributions), but
is the normal case with Windows.

ooRexx
------
First of all, use the latest version of ooRexx, which is 4.1.2 as it includes bugfixes. Then decide
whether you want to install the 32- or the 64-bit version. Both versions should be able to run plain
Rexx scripts flawlessly.

In the case that you are using external Rexx function libraries, then it may be the case that you
want to stick to the 32-Bit ooRexx version which supports the Rexx-SAA external interfaces. The
64-bit version of ooRexx does not support that Rexx-SAA external interface anymore. (ooRexx 4.x in
both bitnesses introduced a new, powerful native C++ interface to the interpreter, which is easy to
use and extremely powerful; external ooRexx function libraries for 32-bit can be simply compiled to
64-bit and continue to work.)

BSF4ooRexx
----------
The command line installation utility that you use will determine whether the 32- or the 64-bit
ooRexx interpreter is installed, and will install the appropriate 32- or 64-bit library. Depending
on the bitness, BSF4ooRexx needs a matching bitness installation of Java.

Java
----
Java in principle can support 32- and 64-bit as its compiled classes are independent of bitness.
However, to get in touch with Java via (native) libraries the appropriate 32- and/or 64-bit Java
library must be installed.

LibreOffice/OpenOffice
----------------------
Currently the support for (Apache) OpenOffice (AOO) works for LibreOffice (LO). However, on Linux
you need to determine the bitness of the installed AOO/LO. Depending on 32- or 64-bit you must
install the matching ooRexx, Java and then (re-)install BSF4ooRexx.
[AOO/LO on MacOSX and Windows is currently available in 32-bit only. Hence on those platforms
install the 32-bit versions of ooRexx and Java, in order to become able to program AOO/LO from
ooRexx and have ooRexx installed as a macro language to AOO/LO.]

HTH,

---rony


Rony

unread,
Mar 18, 2013, 9:56:13 AM3/18/13
to
Hmm, forgot probably the most important information: you cannot intermix 32- and 64-bit executables
and libraries! The executables and libraries must match in their bitnesses with AOO/LO, ooRexx (and
BSF4ooRexx, Java). Hence the need to distinguish thoroughfully between 32- and 64 bit nowadays.

---rony




LesK

unread,
Mar 18, 2013, 10:02:54 AM3/18/13
to
On 3/18/2013 9:53 AM, Rony wrote:
> Hi Maurice,
>
> this e-mail attempts to kill a few birds with one stone.
>
> Ad 64- vs. 32-bit: ------------------ Newer operating systems come
> with 64-bit, which means that only 64-bit executables and libraries
> can run. In order to support 32-bit executables and libraries the
> respective 32-bit operating system support must be installed. This
> may or may not be the case on Linux (depends on distributions), but
> is the normal case with Windows.
Huh? I have 64bit Windows 7 and run normal 32 bit executables. Is this a
German/English translation problem?

Maurice Batey

unread,
Mar 18, 2013, 11:33:27 AM3/18/13
to
On Sat, 16 Mar 2013 18:16:31 +0100, Rony wrote:

> "samples/demo.BSF.dialog.rxj", which
> you can usually run by double-clicking,

The double-clicking didn't work, so I copied the code into another file
and ran that wth ooRexx, but the 2nd of these two lines:

say "Demonstrating .bsf.dialog~messageBox(...):"
.bsf.dialog~messageBox("This is an informal message")

failed as follows:

------------------------------------------------------------------------
Demonstrating .bsf.dialog~messageBox(...):
4 *-* .bsf.dialog~messageBox("This is an informal message")
REX0097E: Error 97 running /home/mab/rx/testview line 4: Object method not found
REX0476E: Error 97.1: Object ".BSF.DIALOG" does not understand message "MESSAGEBOX"
------------------------------------------------------------------------

What have I omitted to do?

Maurice Batey

unread,
Mar 18, 2013, 12:00:14 PM3/18/13
to
On Mon, 18 Mar 2013 10:02:54 -0400, LesK wrote:

> I have 64bit Windows 7 and run normal 32 bit executables.

I have 64-bit Linux Mageia-2 and run normal 32-bit executables...

Rony

unread,
Mar 18, 2013, 12:10:14 PM3/18/13
to
On 18.03.2013 15:02, LesK wrote:
> On 3/18/2013 9:53 AM, Rony wrote:
>>
>> this e-mail attempts to kill a few birds with one stone.
>>
>> Ad 64- vs. 32-bit: ------------------ Newer operating systems come
>> with 64-bit, which means that only 64-bit executables and libraries
>> can run. In order to support 32-bit executables and libraries the
>> respective 32-bit operating system support must be installed. This
>> may or may not be the case on Linux (depends on distributions), but
>> is the normal case with Windows.
> Huh? I have 64bit Windows 7 and run normal 32 bit executables. Is this a German/English translation
> problem?

Sorry for my English.

64-bit Windows currently comes with 32-bit Windows support ("WoW", "Windows-on-Windows" support) as
does MacOSX.

Some 64-bit Linux distributions may come with no 32-bit support pre-installed. In such distributions
one can usually install 32-bit support though.

---rony




Rony

unread,
Mar 18, 2013, 12:21:26 PM3/18/13
to
The setup program should have created "/opt/BSF4ooRexx" and finally the links from there to the
"obvious" places on Linux (/usr/bin, /usr/lib, /usr/lib32, /usr/lib64, depending on the Linux
distribution) and define an entry to the profile (/etc/profile) with appropriate entries in the
paths on CLASSPATH.

If double-clicking does not work (or pressing the right mouse button while hovering over the Rexx
file does not yield appropriate Rexx/BSF4ooRexx related entries), then the setup did not run
successfully.

The reported error message is interesting as there should be an error message when loading the file
"BSF.CLS" (unless you removed the directive "::requires BSF.CLS" from the program) as that ooRexx
program defines the class named .BSF.DIALOG.

---

If you ran "bsf4oorexx/install/linux/install.sh", then the script
"bsf4oorexx/install/setupAllAndRun.rex" would be run as sudo with the rexx interpreter.

If you did not allow that script to run with sudo, then the necessary setups have not been run
(including copying the unzipped subtree to /opt/BSF4ooRexx).

Another possibility where something could have gone wrong is not having mataching 32- or 64-bit
executables and libraries installed on your system. In this case make sure you download and install
e.g. the 32-bit Java, ooRexx, and rerun the installation script.

-> If you have a partially working installation of BSF4ooRexx on your system, then run the
reinstallation script "/opt/BSF4ooRexx/install/linux/reinstall.sh" or remove it using
"/opt/BSF4ooRexx/install/linux/uninstall.sh", before reinstalling it again from the unzipped
(temprorary/download) installation package.


HTH,

---rony

Maurice Batey

unread,
Mar 18, 2013, 1:45:39 PM3/18/13
to
On Sat, 16 Mar 2013 13:10:12 -0400, LesK wrote:

> might use THE (The Hessling Editor)

I've just d/l the latest THE, but would prefer to install via RPM
rather than get into compiling from source.

In the 'install' help, I see:

------------------------------------------------------------------
THE can use Regina, ooRexx or REXX-imc as its Rexx interpreter. The
instructions below assume you are installing Regina.

Installation of THE as a native X11 application

Download the following RPMs:
o http://downloads.sourceforge.net/hessling-editor/THE-
X11-3.2-1.i386.rpm
o http://downloads.sourceforge.net/pdcurses/PDCurses-2.8-1.i386.rpm
o http://downloads.sourceforge.net/rexxtrans/RexxTrans-1.8-1.i386.rpm
o http://downloads.sourceforge.net/regina-rexx/Regina-
REXX-3.3-1.i386.rpm
-----------------------------------------------

As I already have ooRexx installed, and do not want to change to Regina,
is it just question of ignoring the last RPM on the above list, or
would it need a different set of RPMs to do an RPM install where ooRexx
is already installed?

(By the way, I tried to email you direct (correctly replacing Arabic etc)
but my email was blocked by RoadRunner...))

Maurice Batey

unread,
Mar 18, 2013, 2:27:22 PM3/18/13
to
On Mon, 18 Mar 2013 17:21:26 +0100, Rony wrote:

> The reported error message is interesting as there should be an error message when loading the file
> "BSF.CLS" (unless you removed the directive "::requires BSF.CLS" from the program) as that ooRexx
> program defines the class named .BSF.DIALOG.

I had, in fact, omitted it!
However, having now added it at the end of the file, I now get:

448 *-* ::requires "BSF4ooRexx" library
50 *-* ::requires BSF.CLS
REX0098E: Error 98 running /usr/bin/BSF.CLS line 448: Execution error
REX0711E: Error 98.982: Library "BSF4ooRexx" is not compatible with
current interpreter version.

Rony

unread,
Mar 18, 2013, 2:39:25 PM3/18/13
to
.03.2013 19:27, Maurice Batey wrote:
> On Mon, 18 Mar 2013 17:21:26 +0100, Rony wrote:
>
>> The reported error message is interesting as there should be an error message when loading the file
>> "BSF.CLS" (unless you removed the directive "::requires BSF.CLS" from the program) as that ooRexx
>> program defines the class named .BSF.DIALOG.
>
> I had, in fact, omitted it!

You did not say so! 8-))


> However, having now added it at the end of the file, I now get:
>
> 448 *-* ::requires "BSF4ooRexx" library
> 50 *-* ::requires BSF.CLS
> REX0098E: Error 98 running /usr/bin/BSF.CLS line 448: Execution error
> REX0711E: Error 98.982: Library "BSF4ooRexx" is not compatible with
> current interpreter version.
>

So maybe you have installed BSF4ooRexx beforehand with a different bitness of the ooRexx interpreter ?

If so, you could try:

rexx -v

This will show you the version and bitness of the installed ooRexx.

In /opt/BSF4ooRexx/install/32 you'll find the 32-bit version of libBSF4ooRexx.so and in
/opt/BSF4ooRexx/install/64 the 64-bit version of libBSF4ooRexx.so.

Now the tricky part:

- locate your currently linked libBSF4ooRexx directory (/usr/lib, /usr/lib32, /user/lib64), remove it

- add a link to *depending on your Linux distribution (this differs!)* to your /usr/lib (maybe!),
/usr/lib32 (if 32-bit, maybe!) and/or /usr/lib64 (if 64-bit, maybe!).


[Hint: you may want to locate all places where librexx.so is linked to. Remove the current link to
libBFSF4ooRexx.so and add new links to libBSF4ooRexx.so in the same lib-directories as librexx.so.]


[An alternative would be to remove /opt/BSF4ooRexx altogether, then go into the unzipped
(downloaded) installation package and run bsf4oorexx/install/linux/install.sh which now picks up the
current bitness of ooRexx and does the above link, depending on your Linux distribution, accordingly.]

HTH,

---rony

Maurice Batey

unread,
Mar 18, 2013, 3:31:31 PM3/18/13
to
On Mon, 18 Mar 2013 19:39:25 +0100, Rony wrote:

> you could try:
>
> rexx -v

rexx -v
Open Object Rexx Version 4.0.1
Build date: May 2 2010
Addressing Mode: 32
etc...

LesK

unread,
Mar 18, 2013, 5:47:33 PM3/18/13
to
Sorry, but I don't know anything about Linux or how THE installs on it.

I don't know why RR would block you, but I've heard of it happening
before. I suggest you send the RR report to your ISP for their analysis
and help.

I'll ask Mark to look at your posting and see if he can help.

Rony

unread,
Mar 19, 2013, 5:57:27 AM3/19/13
to
On 18.03.2013 20:31, Maurice Batey wrote:
> On Mon, 18 Mar 2013 19:39:25 +0100, Rony wrote:
>
>> you could try:
>>
>> rexx -v
>
> rexx -v
> Open Object Rexx Version 4.0.1
> Build date: May 2 2010
> Addressing Mode: 32
> etc...
>
So you have the 32-bit ooRexx installed (an old version, which you should upgrade to 4.1.2 as there
are new features and bug fixes applied).

Then make sure that you have the 32-bit Java installed (i.e. the 32-bit libjvm.so).

Then reinstall BSF4ooRexx. Preferably remove /opt/BSF4ooRexx and run
bsf4oorexx/install/linux/install.sh from the unzipped installation package.

---rony



Maurice Batey

unread,
Mar 19, 2013, 12:44:28 PM3/19/13
to
On Tue, 19 Mar 2013 10:57:27 +0100, Rony wrote:

> make sure that you have the 32-bit Java installed (i.e. the 32-bit
libjvm.so).

The only instance I see of that is in /opt/bsf400rexx, and points to:

/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/amd64/server/libjvm.so

- so it would appear to be 64-bit, and I'm not prepared to get involved with two versions of
Java.

I also tried the bsf4 'uninstall' and 'reinstall', but after asking for my sudo password the
terminal session disappeared and nothing seemed to be happening. Just like a no-op.
So I can't even remove bsf40oorexx that way!

(Is the simplest way just to remove /opt/BSF4ooRexx? )

Because of the BSF4 (and also ooRexx) unhappiness w.r.t. 32-bit v. 64-bit, I am not going to go
any further with BSF4ooRexx, but I much appreciate your afforts to help get me on board.

Regards,

Maurice Batey

unread,
Mar 19, 2013, 12:50:20 PM3/19/13
to
On Tue, 19 Mar 2013 10:57:27 +0100, Rony wrote:

> you have the 32-bit ooRexx installed (an old version, which you should
> upgrade to 4.1.2 as there are new features and bug fixes applied).

I did look into that, but - as I said earlier - could not find an RPM for
Mageia (or Mandriva) on the ooRexx Downloads page.

The most recent 'neutral' RPM I could find was ooRexx-4.0.1.i586.rpm,
which I installed, as it was the oldest version that BSF4 was willing to
accept.

Rony

unread,
Mar 19, 2013, 1:01:48 PM3/19/13
to
On 19.03.2013 17:44, Maurice Batey wrote:
> On Tue, 19 Mar 2013 10:57:27 +0100, Rony wrote:
>
>> make sure that you have the 32-bit Java installed (i.e. the 32-bit
> libjvm.so).
>
> The only instance I see of that is in /opt/bsf400rexx, and points to:
>
> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/amd64/server/libjvm.so
>
> - so it would appear to be 64-bit, and I'm not prepared to get involved with two versions of
> Java.
The Java version would remain the same. The difference is the library that needs to be loaded. And
if you have a 32-Bit ooRexx installed, then you need a 32-bit libjvm.so AFAIK.


>
> I also tried the bsf4 'uninstall' and 'reinstall', but after asking for my sudo password the
> terminal session disappeared and nothing seemed to be happening. Just like a no-op.
> So I can't even remove bsf40oorexx that way!
>
> (Is the simplest way just to remove /opt/BSF4ooRexx? )
Yes, do a

rpm -rf /opt/BSF4ooRexx

This leaves you probably with broken links in /usr/lib, /usr/lib32 and/or /usr/lib64 as well as in
/usr/bin. Hence you should inspect those directories for these.


>
> Because of the BSF4 (and also ooRexx) unhappiness w.r.t. 32-bit v. 64-bit, I am not going to go
> any further with BSF4ooRexx, but I much appreciate your afforts to help get me on board.
You are very welcome. It is a pity that it did not work out for you, but at least you know how the
pieces should fit together in the case that you try this endeavour sometimes in the future.

---

Ad ooRexx rpms: maybe you can locate a rpm that is compatible with your system at
<http://sourceforge.net/projects/oorexx/files/oorexx/4.1.2/>?

If not, you could try to build the rpm on your system for yourself, which is not difficult at all.
Maybe you could also ask for help on the ooRexx mailing lists.

It definitely is worth to try to get the latest version of ooRexx!

---rony

Rony

unread,
Mar 19, 2013, 1:07:28 PM3/19/13
to
On 19.03.2013 18:01, Rony wrote:
> On 19.03.2013 17:44, Maurice Batey wrote:
>> On Tue, 19 Mar 2013 10:57:27 +0100, Rony wrote:
>>
>>> make sure that you have the 32-bit Java installed (i.e. the 32-bit
>> libjvm.so).
>>
>> The only instance I see of that is in /opt/bsf400rexx, and points to:
>>
>> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.6.x86_64/jre/lib/amd64/server/libjvm.so
>>
>> - so it would appear to be 64-bit, and I'm not prepared to get involved with two versions of
>> Java.
> The Java version would remain the same. The difference is the library that needs to be loaded. And
> if you have a 32-Bit ooRexx installed, then you need a 32-bit libjvm.so AFAIK.
>
>
>>
>> I also tried the bsf4 'uninstall' and 'reinstall', but after asking for my sudo password the
>> terminal session disappeared and nothing seemed to be happening. Just like a no-op.
>> So I can't even remove bsf40oorexx that way!
>>
>> (Is the simplest way just to remove /opt/BSF4ooRexx? )
> Yes, do a
>
> rpm -rf /opt/BSF4ooRexx
>
> This leaves you probably with broken links in /usr/lib, /usr/lib32 and/or /usr/lib64 as well as in
> /usr/bin. Hence you should inspect those directories for these.


Also inspect /etc/profile for lines that have a string referring to BSF4ooRexx and delete those.

---rony

Rony

unread,
Mar 19, 2013, 1:09:17 PM3/19/13
to
Maurice:

a last word: if you can make it to this year's International Rexx Symposium (cf.
http://www.RexxLA.org) in Raleigh/RTP at the beginning of May, then we could take a look at your
system and "convince" it to get and use the latest ooRexx and BSF4ooRexx.
:)

---rony

LesK

unread,
Mar 19, 2013, 3:22:01 PM3/19/13
to
Or maybe you could use the free TeamViewer? You'd have to check to see
if it has chat support built in. I always use the phone. I expect that's
awfully expensive in Europe.

Maurice Batey

unread,
Mar 19, 2013, 3:20:57 PM3/19/13
to
On Tue, 19 Mar 2013 18:01:48 +0100, Rony wrote:

> maybe you can locate a rpm that is compatible with your system at
> <http://sourceforge.net/projects/oorexx/files/oorexx/4.1.2/>?

Sadly, nothing for Mageia or Mandriva. :-(
(Possibly any of the RPM packages would do, but one never knows...)

Maurice Batey

unread,
Mar 19, 2013, 3:22:19 PM3/19/13
to
On Tue, 19 Mar 2013 18:09:17 +0100, Rony wrote:

> International Rexx Symposium (cf.
> http://www.RexxLA.org) in Raleigh/RTP at the beginning of May,

Sadly not, though I did work at Raleigh RTP for most of 1987!

Rony

unread,
Mar 20, 2013, 8:48:37 AM3/20/13
to
On 19.03.2013 20:20, Maurice Batey wrote:
> On Tue, 19 Mar 2013 18:01:48 +0100, Rony wrote:
>
>> maybe you can locate a rpm that is compatible with your system at
>> <http://sourceforge.net/projects/oorexx/files/oorexx/4.1.2/>?
>
> Sadly, nothing for Mageia or Mandriva. :-(
> (Possibly any of the RPM packages would do, but one never knows...)
>

You could try it?


---rony

U. Zinngrebe

unread,
Mar 20, 2013, 10:28:09 AM3/20/13
to
Maurice Batey wrote:

>
> Sadly, nothing for Mageia or Mandriva. :-(
> (Possibly any of the RPM packages would do, but one never knows...)
>

If you are interested & have autotools installed: downloading the sources
and compiling RPM packages on your own system is not difficult.

But maybe this is too remote from your original question ?

Cheers, Uli

Maurice Batey

unread,
Mar 21, 2013, 11:03:13 AM3/21/13
to
On Mon, 18 Mar 2013 17:45:39 +0000, I wrote:

> I tried to email you direct (correctly replacing Arabic etc)
> but my email was blocked by RoadRunner...))

Les, it became unblocked yesterday, but today the block is back again, so
I can't respond to your email at the moment.

Maurice Batey

unread,
Mar 31, 2013, 1:20:37 PM3/31/13
to
On Sat, 16 Mar 2013 01:25:05 +0100, U. Zinngrebe wrote:

> 'kdialog --menu "Select a language:" 1 "American English" 2 French 3 "Oz
> English" | rxqueue '
> pull answer
> say 'chosen:' answer

Thank you - that does indeed do the trick!

But there is a problem if the menu's Cancel button is hit.
No string is returned (so can't check for ""), and RC=0 whethre Cancel is
hit or not.

Is there an ooRexx way to detect Cancel being hit?

(I now have ooRexx 4.1.2 installed.)

U. Zinngrebe

unread,
Mar 31, 2013, 7:41:17 PM3/31/13
to
Maurice Batey wrote:

> On Sat, 16 Mar 2013 01:25:05 +0100, U. Zinngrebe wrote:
>
>> 'kdialog ... | rxqueue '
>> pull answer
...
>
> But there is a problem if the menu's Cancel button is hit.
> No string is returned (so can't check for ""), and RC=0 whether Cancel is
> hit or not.
>
> Is there an ooRexx way to detect Cancel being hit?

You can intercept that no string is returned and conclude that the Cancel
button has been hit.

'kdialog ... | rxqueue '
if queued()
then pull answer
else answer=0 -- cancel button was hit

RC=0 because it is returned from the last stage of the pipeline (rxqueue).


Cheers, Uli

Maurice Batey

unread,
Apr 1, 2013, 7:33:30 AM4/1/13
to
On Mon, 01 Apr 2013 01:41:17 +0200, U. Zinngrebe wrote:

> 'kdialog ... | rxqueue '
> if queued()
> then pull answer
> else answer=0 -- cancel button was hit

Great - many thanks!
By the way, have ou been able to operate a KDialog '--progressbar' ?

(I can get the initial KDialog 'Initialising x' window up, but cannot find a
way to use 'dcop' to update it.)

U. Zinngrebe

unread,
Apr 1, 2013, 6:39:20 PM4/1/13
to
Maurice Batey wrote:

> By the way, have you been able to operate a KDialog '--progressbar' ?
>
> (I can get the initial KDialog 'Initialising x' window up, but cannot find
> a way to use 'dcop' to update it.)

I never tried before and I'm unable to. Below what I tried.
If Rony is reading this, maybe he can tell what goes wrong.

Cheers, Uli

------------------------------------------

How to talk to the progessbar process that runs concurrently to the rexx
script ? A problem not for the rexx interpreter to solve but rather for KDE.
Google hints that KDE4 uses dbus (and KDE3 dcop) for this task.

In order to talk to some service on the dbus, one need its address; that
address is assigned when the service is created, so one must recover the
reply when launching the progress bar:

'kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 2 |
rxqueue';pull reply;say reply

ORG.KDE.KDIALOG-29179 /PROGRESSDIALOG


Then to talk on the dbus there is /usr/bin/qdbus which comes in package
libqt4. But when I then try to talk to this progressdialog it doesn't work:


'qdbus' reply 'org.kde.kdialog.ProgressDialog.setLabelText "Step 1" '

Cannot find 'org.kde.kdialog.ProgressDialog.setLabelText' in object
/PROGRESSDIALOG at ORG.KDE.KDIALOG-29179
. rc = 1

'qdbus' reply 'Set org.kde.kdialog.ProgressDialog value 1'

Cannot find '.Set' in object /PROGRESSDIALOG at ORG.KDE.KDIALOG-29179
. rc = 1


However the progressdialog still lives and methods/properties can be queried
from another rexx program runnning in another console:

'qdbus org.kde.kdialog-29179 /ProgressDialog'

property readwrite bool org.kde.kdialog.ProgressDialog.autoClose
property readwrite int org.kde.kdialog.ProgressDialog.maximum
property readwrite int org.kde.kdialog.ProgressDialog.value
method void org.kde.kdialog.ProgressDialog.close()
method void org.kde.kdialog.ProgressDialog.setLabelText(QString label)
method void org.kde.kdialog.ProgressDialog.showCancelButton(bool value)
method bool org.kde.kdialog.ProgressDialog.wasCancelled()
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString
interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString
interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name,
QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()

U. Zinngrebe

unread,
Apr 2, 2013, 1:45:04 AM4/2/13
to
U. Zinngrebe wrote:

> Maurice Batey wrote:
>
>> By the way, have you been able to operate a KDialog '--progressbar' ?
>>
>> (I can get the initial KDialog 'Initialising x' window up, but cannot
>> find a way to use 'dcop' to update it.)


found the error: PULL capitalises, while qdbus is case sensitive.
PARSE PULL preserves case, talking to the progressdialog works now.

Cheers, Uli
-----------------------------------------------------------------------

'kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 2 |
rxqueue';parse pull reply;say reply

org.kde.kdialog-10528 /ProgressDialog

Maurice Batey

unread,
Apr 2, 2013, 7:40:36 AM4/2/13
to
On Tue, 02 Apr 2013 07:45:04 +0200, U. Zinngrebe wrote:

> 'kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 2 |
> rxqueue';parse pull reply;say reply
>
> org.kde.kdialog-10528 /ProgressDialog

Good work!

I tried the following:

'kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 2 |
rxqueue'
parse pull reply
call SysSleep 5
'qdbus' reply 'org.kde.kdialog.ProgressDialog.setLabelText "Step 1" '
call SysSleep 5
'qdbus' reply 'org.kde.kdialog.ProgressDialog.setLabelText "Step 2" '

and the Dialog did start up with an empty bar and the word "Initializing",
but although the word "Initializing" did change to "Step 1" and then "Step
2", the bar stayed empty (when I expected it to fill up wth e.g. blue).

Perhaps I have not understood what --progressbar is supposed to do...

Maurice Batey

unread,
Apr 2, 2013, 8:22:37 AM4/2/13
to
On Mon, 01 Apr 2013 01:41:17 +0200, U. Zinngrebe wrote:

> 'kdialog ... | rxqueue '
> if queued()
> then pull answer
> else answer=0 -- cancel button was hit

Works beautifully for '--menu', but I find that for '--inputbox',
perversely it *does* return a null string for Cancel!

LesK

unread,
Apr 2, 2013, 12:19:01 PM4/2/13
to
On 4/2/2013 8:22 AM, Maurice Batey wrote:
> On Mon, 01 Apr 2013 01:41:17 +0200, U. Zinngrebe wrote:
>
>> 'kdialog ... | rxqueue '
>> if queued()
>> then pull answer
>> else answer=0 -- cancel button was hit
>
> Works beautifully for '--menu', but I find that for '--inputbox',
> perversely it *does* return a null string for Cancel!
>
Ralph Waldo Emerson:

A foolish consistency is the hobgoblin of little minds, adored by little
statesmen and philosophers and divines.

LesK

unread,
Apr 2, 2013, 12:49:59 PM4/2/13
to
On 4/2/2013 8:22 AM, Maurice Batey wrote:
> On Mon, 01 Apr 2013 01:41:17 +0200, U. Zinngrebe wrote:
>
>> 'kdialog ... | rxqueue '
>> if queued()
>> then pull answer
>> else answer=0 -- cancel button was hit
>
> Works beautifully for '--menu', but I find that for '--inputbox',
> perversely it *does* return a null string for Cancel!
>
What does the documentation say? You _do_ have the docs, right?
Google seems to know a lot about about kdialog. You might try it.

U. Zinngrebe

unread,
Apr 3, 2013, 6:53:35 PM4/3/13
to
Maurice Batey wrote:

> but although the word "Initializing" did change to "Step 1" and then "Step
> 2", the bar stayed empty (when I expected it to fill up wth e.g. blue).

If you contemplate: it cannot work that way, because the progress bar does
not know how many steps to expect, so the amount of blue colour per step is
undefined.

You have to study documentation or google for examples.
A few posts further up I queried the properties/methods that --progressbar
posseses. From that list 'maximum' and 'value' seem plausible properties to
set.

Cheers, Uli


Maurice Batey

unread,
Apr 4, 2013, 11:00:47 AM4/4/13
to
On Thu, 04 Apr 2013 00:53:35 +0200, U. Zinngrebe wrote:

> If you contemplate: it cannot work that way, because the progress bar does
> not know how many steps to expect, so the amount of blue colour per step is
> undefined.

But in the example in the KFDialag PDF file, the initial call specifies
the number of steps (4), and then shows how the step can be increased, o
presumably Step 1/4 would show a 25% bar, Step 2 50%, etc. etc.

So if the bar is going to represent the processing of 100 files, the
initial call would specify 100, so that each successive Step command would
increase the bar length by 1%.
But I'm ready to to be convinced otherwise!

I haven't actually tried that yet, as my current use is to display a 3-part
dynamically-incremented count in the 'text' e.g. "2/52/1000" to signify
that there have been 2 'finds' after processing 52 files out of 100.

But just out of curiousity I shall try adding Steps to see if the bar will
materialise...
0 new messages