dbTalk Databases Forums  

openqm menus and persay

comp.databases.pick comp.databases.pick


Discuss openqm menus and persay in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pi3k
 
Posts: n/a

Default openqm menus and persay - 07-25-2005 , 06:55 PM






Hey,
I was wondering if anyone had an example of a menu that has an access
subroutine based on the account name? Is the subroutine a basic program
thats in the BP folder or is it something completely different?

I was also wondering if anyone knew how to make the backspace key
delete characters like ^h does. The key seems to work fine in menus
created in MED, but in screens or reports done in persay you need to
use ^h. I can deal with this, although it is really annoying, but the
users of the system will hate it. I've tried switching terminals and
playing with the Terminal Params in persay, but nothing has worked. If
I can't just add a line to the term files, is there some code I can use
in the programs that require entry to make the backspace key work
properly??

Thanks


Reply With Quote
  #2  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: openqm menus and persay - 07-26-2005 , 01:25 AM






Goo'day,

On 25 Jul 2005 16:55:59 -0700, "pi3k" <pi3kisatropos (AT) gmail (DOT) com> wrote:

Quote:
Hey,
I was wondering if anyone had an example of a menu that has an access
subroutine based on the account name? Is the subroutine a basic program
thats in the BP folder or is it something completely different?
Don't *quite* understand what you're looking for......
Quote:
I was also wondering if anyone knew how to make the backspace key
delete characters like ^h does. The key seems to work fine in menus
created in MED, but in screens or reports done in persay you need to
use ^h. I can deal with this, although it is really annoying, but the
users of the system will hate it. I've tried switching terminals and
playing with the Terminal Params in persay, but nothing has worked. If
I can't just add a line to the term files, is there some code I can use
in the programs that require entry to make the backspace key work
properly??

Didn't Martin Phillips go into this in some depth just recently....
Can't remember whether it was OpenQM developers list or OpenQM user
list..... But I'm sure you'll find something there.....somewhere....
Not just for Persay, per se, .......................<Bloody hell! The
pub *must* be open>

Have a wander through both lists......

HTH
Quote:
Thanks
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #3  
Old   
pi3k
 
Posts: n/a

Default Re: openqm menus and persay - 07-26-2005 , 11:25 AM



I was looking through the posts in both the openqm-user/devel list and
found Martins posts, but my problem is that the backspace key doesn't
work when inputting into programs. It works fine at TCL. I think I will
try to post this to one of those lists as well.
The other thing I was looking for was basically an example of how to
use what the manual calls the "Access Subroutine" in MED. I couldn't
really find any other documentation on it.
Thanks


Reply With Quote
  #4  
Old   
Tom deL
 
Posts: n/a

Default Re: openqm menus and persay - 07-27-2005 , 02:32 PM



Hi pi3k,

pi3k wrote:
Quote:
I was looking through the posts in both the openqm-user/devel list and
found Martins posts, but my problem is that the backspace key doesn't
work when inputting into programs. It works fine at TCL. I think I will
try to post this to one of those lists as well.
This is something that I keep meaning to look into but found a simple
fix and so haven't.

Seems that the xterm termcap doesn't work very well for most x-term
applications. I use gnome-terminal and in linux set the TERM env.
var. to 'vt220':
$ TERM=vt220;export TERM
This emulation seems to work well for other things as well. If it
works, you could put it in your .bashrc or equivalent.

Another issue is how the terminal emulator handles backspace. In gnome-
terminal, under 'Compatibility' in setup, there is an option for
'Backspace key generates: ' and one of the options is 'Control-H'.

This setup works very well for me in both QM and D3 (In D3 I have a
'SET-TERM' in my login phrase).

With this setup the backspace key works well in QM BASIC for me. You
might try a little program to see if the second part of above (the
character that the terminal emulator is sending) is in play, something
like:

INPUT STR
MAX=LEN(STR)
FOR X=1 TO MAX
CRT X:' ':SEQ(STR[X, 1])
NEXT X
END

With my setup, if my input is:
ABCDE<Backspace>EFG<Backspace>GHI

The following is echoed:
?ABCDEFGHI

The output is:

1 65
2 66
3 67
4 68
5 69
6 70
7 71
8 72
9 73

If I change gnome-terminal to send 'ASCII-DEL' instead:

The following is echoed:
?ABCDE<Spade>EFG<Spade>GHI

And the output is:

1 65
2 66
3 67
4 68
5 69
6 127
7 69
8 70
9 71
10 127
11 71
12 72
13 73

So the system isn't seeing the ASCII-DEL as a backspace and is'nt
using it as such, it is just another character received by BASIC.

This should narrow it down a bit. Then you can check your termcap
entry and maybe fix it and recompile (I think there is a qmtic
program provided).

HTH,
-Tom

Quote:
The other thing I was looking for was basically an example of how to
use what the manual calls the "Access Subroutine" in MED. I couldn't
really find any other documentation on it.
Thanks


Reply With Quote
  #5  
Old   
Thomas Dickey
 
Posts: n/a

Default Re: openqm menus and persay - 07-27-2005 , 03:38 PM



Tom deL <ted (AT) blackflute (DOT) com> wrote:

Quote:
Seems that the xterm termcap doesn't work very well for most x-term
applications. I use gnome-terminal and in linux set the TERM env.
var. to 'vt220':
$ TERM=vt220;export TERM
gnome-terminal doesn't really do vt220 either - it's debatable whether
it manages to do a passable vt100. For grins,

http://invisible-island.net/vttest/

But there's a $TERM for it ("gnome") in ncurses.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


Reply With Quote
  #6  
Old   
Tom deL
 
Posts: n/a

Default Re: openqm menus and persay - 07-28-2005 , 09:40 AM



Hi Thomas,

Where _do_ you folks find the time? LOL

Quote:
Seems that the xterm termcap doesn't work very well for most x-term
applications. I use gnome-terminal and in linux set the TERM env.
var. to 'vt220':
$ TERM=vt220;export TERM

gnome-terminal doesn't really do vt220 either - it's debatable whether
it manages to do a passable vt100. For grins,

http://invisible-island.net/vttest/

This is something that I keep meaning to look into but found a simple
fix and so haven't.
Perhaps I should have elaborated that it isn't a perfect fix but it
_has_ allowed use of the simple tools (ED, SED, etc.) required at TCL.

Quote:
But there's a $TERM for it ("gnome") in ncurses.
That is correct. It works as poorly in the application in question as
does the xterm $TERM. Are you suggesting that using it will somehow
cure the OP's problem?
-Tom

Quote:
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


Reply With Quote
  #7  
Old   
pi3k
 
Posts: n/a

Default Re: openqm menus and persay - 07-28-2005 , 11:09 AM



Well I sort of got it to work, but I was really looking for a local
solution so that every client that connected wouldn't have to configure
there system correctly.
In kde's konsole, if you go to Settings -> Keyboard and change it to
VT420PC or Solaris. When you log into openqm and run the program, the
backspace key now works properly. The problem is as Tom deL suggested,
the keyboard is sending a 127 char instead of a 8 char or ^H. Anyone
have any ideas on how to correct this on the server side or is it
completely a client side issue? Btw, I tried different export TERM=???
in the .bashrc, but none of them worked.


Reply With Quote
  #8  
Old   
Tom deL
 
Posts: n/a

Default Re: openqm menus and persay - 07-28-2005 , 04:18 PM



Hi pi3k,

pi3k wrote:
Quote:
Well I sort of got it to work, but I was really looking for a local
solution so that every client that connected wouldn't have to configure
there system correctly.
In kde's konsole, if you go to Settings -> Keyboard and change it to
VT420PC or Solaris. When you log into openqm and run the program, the
backspace key now works properly. The problem is as Tom deL suggested,
the keyboard is sending a 127 char instead of a 8 char or ^H. Anyone
have any ideas on how to correct this on the server side or is it
completely a client side issue? Btw, I tried different export TERM=???
in the .bashrc, but none of them worked.
As always I am too short on time to properly work this out right now
but another munge you can try:

If you can find an emulation that works well in QM for everything but
Backspace (e.g. cursor keys and F-keys if needed), you can change the
terminfo definition for that emulation:

Let's say that 'vt220' works for kterm (the cursor keys seem to work
with the default kterm setup).

Become the user who owns your /usr/qmsys tree, then:

$ cd /usr/qmsys

Back up the existing terminfo source file:

$ cp -vp terminfo.src terminfo.src.orig

Edit the vt220 entry in terminfo.src, in it you will find kbs=^H

Replace the ^H with DEL (in vi, place cursor on the caret in ^H and
press the 'x' key twice. Then in insert mode, <Ctrl>V and the Delete
key. This should place '^$' as a single character: kbs=^$

Save the file then compile the vt220 entry:

$ bin/qmtic -tvt220 terminfo.src

Now you should be able to put something like:

if [ ${TERM} = 'kterm' ]
then
TERM=vt220;export TERM
fi

In your .bash_profile for each user needing this special definition
(and maybe in /etc/skel/.bash_profile). Again, I haven't tested this
beyond whether the cursor keys and backspace work.

HTH,
-Tom



Reply With Quote
  #9  
Old   
Tom deL
 
Posts: n/a

Default Re: openqm menus and persay - 07-28-2005 , 04:48 PM



.... and a couple of things I thought of that I should mention before
someone busts my chops about them:

The munge in my previous post should break the vt220 emulation in other
(non QM) programs.

By rights, you should probably create something like vt220-qm in both
QM's terminfo and the system terminfo databases.

Another approach would be to ask Martin (are you listening?) about the
possibility of having openQM look for an environment variable of its
own like the old filePro PFTERM, etc. Then if you could set QMTERM (or
whatever) to vt220-qm and leave the system TERM variable as kterm.
-Tom


Reply With Quote
  #10  
Old   
Tom deL
 
Posts: n/a

Default Shooting from the hip ... - 07-28-2005 , 10:10 PM



.... often leads to shooting oneself in the foot.

During several hours of quality time with my lawn tractor (redneck
meditation) the real solution to enabling the new terminfo definition
came to me. Forget about using .bash* since as mentioned in my earlier
post it will break the emulation for other programs. Here is (I hope
anyway) the correct way to use the munged terminfo definition from the
first post:

After making that fix (changing kbs=^H to kbs=^$ and recompiling),
simply create a little BASIC program named 'SET-TERM' (or make up your
own name) to test the term type and set our new one accordingly:

0001: * Set alternate term type upon login
0002: IF @TERM.TYPE = 'kterm' OR @TERM.TYPE = 'xterm' THEN
0003: EXECUTE 'TERM , vt220'
0004: END
0005: *
0006: END

Compile it then create a VOC item named 'LOGIN' (Or a VOC item in the
qmsys account named 'MASTER.LOGIN'):

0001: PA
0002: RUN BP SET-TERM

Now openQM will be the only application affected by this munged
terminfo entry.
-Tom


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.