Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A pseudo-GUI for a new shell project...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Bazza
LXF regular


Joined: Sat Mar 21, 2009 11:16 am
Posts: 1474
Location: Loughborough

PostPosted: Tue Mar 25, 2014 7:55 am    Post subject: Reply with quote

Hi Ram...

The cursor visibility is an important piece of info. Thanks...
I will see if turning the cursor visibility off, and placing a character is its place is any good. How about "^" or maybe "<". I would like opinions as to what character would suit you, plural.

@jh...

I have no idea except that your terminal does not support pseudo-graphics modes.
Does the cursor move?
If "yes" then I might have to go backwards to these characters "+-|" to produce the boxes...

So far though the many outweigh the few... ;o)
(__Spock__)

Thanks again for all the input.
You guys rock...
_________________
73...

Bazza, G0LCU...

Team AMIGA...
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8455
Location: Warrington, UK

PostPosted: Tue Mar 25, 2014 8:43 am    Post subject: Reply with quote

johnhudson wrote:
I tried it again and didn't get the fi error at the end but otherwise it was the same. None of the beautiful displays that others have got.


It looks like you're pasting the code directly into a shell, instead of saving it as a script and running that.

Bazza: It might be easier if you put the script somewhere on the net and posted a link here, trying to paste from code tags into an editor is no fun.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)


Last edited by nelz on Tue Mar 25, 2014 1:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1667
Location: Guisborough

PostPosted: Tue Mar 25, 2014 9:31 am    Post subject: Reply with quote

Cheers nelz, this brought a smile to my face "trying to paste from code tags into an editor is no fun"

I copied into 'vi'
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1070
Location: Worcestershire

PostPosted: Tue Mar 25, 2014 11:00 am    Post subject: Reply with quote

Forgot to say, no cursor visible, just the command caret blinking top left.
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
Bazza
LXF regular


Joined: Sat Mar 21, 2009 11:16 am
Posts: 1474
Location: Loughborough

PostPosted: Tue Mar 25, 2014 6:19 pm    Post subject: Reply with quote

Hi nelz...

Done!

The latest here:-

http://wisecracker.host22.com/public/Function_Generator.sh

It now cleanly closes.

@guy...

How about a piccy so I can see what you mean...
_________________
73...

Bazza, G0LCU...

Team AMIGA...
Back to top
View user's profile Send private message
johnhudson
LXF regular


Joined: Wed Aug 03, 2005 2:37 pm
Posts: 870

PostPosted: Tue Mar 25, 2014 9:36 pm    Post subject: Reply with quote

nelz wrote:
It looks like you're pasting the code directly into a shell, instead of saving it as a script and running that.


Right in one. Running it as a script returns the line:
Code:
./test: line 15: text: command not found

followed by a background screen about six times the size of the buttons plus prompt but without the title bar that others have displayed and the buttons in the lower left hand corner.

Changing to xterm, I simply get the buttons plus prompt without the title bar in the top left on a background slightly larger than the buttons. I get the same with Terminology (Enlightenment).

Changing to lxterminal, I get the buttons plus prompt without the title bar in the bottom half of the background which is only slightly wider than the buttons but twice as tall. I get the same result with xfceterminal.
Back to top
View user's profile Send private message
Bazza
LXF regular


Joined: Sat Mar 21, 2009 11:16 am
Posts: 1474
Location: Loughborough

PostPosted: Wed Mar 26, 2014 8:29 am    Post subject: Reply with quote

Hi jh...

Line 15 now corrected...

OSX 10.7.5, using xterm, not the default terminal...

_________________
73...

Bazza, G0LCU...

Team AMIGA...
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1070
Location: Worcestershire

PostPosted: Wed Mar 26, 2014 10:47 am    Post subject: Reply with quote

Bazza wrote:
@guy...

How about a piccy so I can see what you mean...


Using your updated code from yesterday:



The black rectangle does move as a cursor using the arrow keys, but not using A,D, etc. as you described. I now suspect it was coincidence that the command prompt appeared over it when the program quit: with your updated code, the screen clears nicely.

Note improved button and display borders, too. You made a lot of changes?
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1667
Location: Guisborough

PostPosted: Wed Mar 26, 2014 6:06 pm    Post subject: Reply with quote

@Guy,

You did use Capital A,B,C,D.
_________________

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
Back to top
View user's profile Send private message MSN Messenger
Bazza
LXF regular


Joined: Sat Mar 21, 2009 11:16 am
Posts: 1474
Location: Loughborough

PostPosted: Wed Mar 26, 2014 6:42 pm    Post subject: Reply with quote

guy wrote:

The black rectangle does move as a cursor using the arrow keys, but not using A,D, etc. as you described. I now suspect it was coincidence that the command prompt appeared over it when the program quit: with your updated code, the screen clears nicely.

Note improved button and display borders, too. You made a lot of changes?


The letters are uppercase not lowercase but are a byproduct of the cursor keys so therefore as long as any of them work that is mighty fine by me...

Changes to the display, no, to the while loop, yes and very minor. This will be changed in due course...

Corrected line 15 which was a command call instead of an array although it will be removed in due course as this code is proof of concept only. The next stage is enabling and disabling the buttons and to make the text inside them light up too.

This site is getting the very first of the experiments and I will upgrade the version accordingly soon.

@Ram...

You beat me to it...

Again you guys are really helpful many thanks...
_________________
73...

Bazza, G0LCU...

Team AMIGA...
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1070
Location: Worcestershire

PostPosted: Wed Mar 26, 2014 8:55 pm    Post subject: Reply with quote

Ah, upper case does work. I just assumed you were talking keycap legends, silly me.

One other thing, the cursor tends to disappear when "over" the series of blank spaces after the text in each button. Reappears when I move it away again. It's as if it were running underneath the space characters or something. Odd.
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
johnhudson
LXF regular


Joined: Wed Aug 03, 2005 2:37 pm
Posts: 870

PostPosted: Thu Mar 27, 2014 9:55 pm    Post subject: Reply with quote

Quick try of the new version; Konsole is the most badly behaved - does not display the titlebar.

xterm/terminology are as displayed above.

xfceterminal/lxterminal have the titlebar above the dropdown options.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast