Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
d/e/tprint and mouse clicks #34120 10 Apr 21 04:08 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
I have quite recently ported my software to A-Shell although a long time AMOS user. We did a lot of work some years back developing an interface with AMOS and Windows using .NET. Now in A-Shell I have been exploring various Windows interfaces including mouse detection and enhanced screen input/output. I use my own version of INPUT/INFLD which, in conjunction with the applications allows the user to click around menus, data entry screens etc. I have found though that using the enhanced, proportional font, print statements d/e/tprint that the mouse click detection, on those parts of the screen, stops working. Any feedback would be appreciated. I have a simple, sample program to demonstrate this if required.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34122 11 Apr 21 12:29 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Welcome to the Forum Eddie!

I haven't had a chance to review your sample program yet, but let me comment that there are two or three separate mouse click response mechanisms, leading to some inevitable confusion in an environment like you describe (which sounds like a mixture of the traditional main window / plain text grid and GUI objects).

1. Traditional mouse click reporting (see MX_MCRS) - this works only when the click is sensed by the main window (rather than by a GUI object overlaying the main window). This requires the application to actively query the click information and decide how to respond based on the coordinates and type of click.

2. Automouse - this works only in the main window with standard fixed pitch text. The idea is simply that when you double click on some text, A-Shell attempts to identify the boundaries of the token and then transmits it to the keyboard. This is a painless way to support mouse clicking in screens where the normal keyboard options are visible as text (like in menus, or in display lists where you can enter the identifier for one of the records to get more info.)

3. AUI click events. You have some options about what happens when the user clicks on a GUI object, but the event takes place automatically; the application doesn't get the opportunity to intervene. And when a click occurs on the GUI object, the message does not filter through to the main window where MX_MCRS could be used to sense it.

A further complication is that TPRINT / DPRINT / EPRINT, while providing an easy way to create GUI objects, don't provide a way to specify what the click event does. For that, you need to use the full AUI_CONTROL or AG_CONTROL commands.

The problem with mixing traditional mouse click reporting with GUI click events, besides having to have two completely different sets of logic, is that, at least in the case of text objects, the user can't necessarily see the boundaries of the objects, which could make it difficult for them to know what to expect by a particular click.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34123 11 Apr 21 09:13 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Thanks Jack. Understood. Maybe, this is not the method for me then. I had been using your tab(-10,68) utilities to create different shades for text, menus and data but hoped that the proportional text and sunken fields would provide a more Windows like appearance. All my software is event driven (i.e. the user can click around the screen and get responses). I'm not too sure how I would have dealt with moving the cursor around a proportional text field anyway.Can you suggest an alternative way of acheiving the appearance of sunken fields?

BTW I have, foolishly, posted this twice, here and on the general Windows page, doh! I think some of the earlier references to people being stuck in their ways applies to me too.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34124 11 Apr 21 09:34 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Tesssting sending an attachment, sample screens.

Attached Files
Attached PDF document
Screens.pdf (296.52 KB, 43 downloads)
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34125 11 Apr 21 09:56 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
How it might look using e/dprint

Attached Files
Attached PDF document
e & dprint version.pdf (158.74 KB, 6 downloads)
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34127 11 Apr 21 10:31 AM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
I told you that we are fast here wink
(nice screens cool)

Last edited by Jorge Tavares - UmZero; 11 Apr 21 10:32 AM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34128 11 Apr 21 11:32 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Cheers, still try to retain 24*80 but with all the features of Windows. We wasted a lot of time creating the .NET/AMOS interface and now I'm catching up. frown

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34129 11 Apr 21 02:03 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Sample program but I think you have answered my queston Jack. Compile with x:2. When we first met this could have been in a bar table and kept us amused for hours!

Attached Files
clktst.txt (747 Bytes, 25 downloads)
SHA1: 7985948a1cc2b871a6cba0c2c686adf661277e06
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34130 11 Apr 21 04:28 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I actually struggled over that problem myself, trying to figure out why TPRINT, DPRINT, and EPRINT were acting like ordinary PRINT. At the time it seemed like a good idea treat them all as PRINT when compiling under the original COMPIL (without /X:2).

But your sample program also through me off by not containing the TAB(-1,158) command to activate click reporting. Once I added that, it works fine, except when you click on the GUI fields created by T/D/EPRINT. Which I guess is what you were complaining about in the first place.

If you're want to use the GUI objects, then a couple of things will have to change...

Since T/D/EPRINT don't give you a way to specify the click event, you'd have to switch to the full AUI_CONTROL or AG_CONTROL syntax in order to specify what gets sent when the object is clicked. Typically developers use the VK_xF### scheme to send virtual function keys which are then picked up in the exitcode parameter of INFLD, XTREE, EVENTWAIT, etc. (The virtual function key sequences could also be interpreted byte-by-byte like you doing for the mouse-click sequences). Or you could program the click event for the GUI objects to mimic exactly what the mouse cursor reporting sequence would be. Since the full AUI_CONTROL syntax is a lot more detailed/verbose than the PRINT statements, you might want to create wrapper functions to simplify the conversion, maybe something like FN'PRINT(row,col,text{,clickstring}) where the default clickstring would be based on the row and col parameters to mimic the mouse cursor reporting.

Alternatively, although it would require a modification to A-Shell, it's not out of the realm of possibility that a configuration option could be implement to cause A-Shell to forward the click event from the GUI objects to the main window if the GUI object didn't have it's own click string. In that case the behavior of the mouse click reporting would be unaffected by the use of T/D/EPRINT vs regular PRINT.

On a related aside, although the AG_ATTRSUB trick for changing the behavior of the underline attribute might be a quick upgrade in some situations where you don't want to go all in on GUI, you might also want to look at the so-called 3D TAB mechanism for a more comprehensive/flexible approach that maintains the more-or-less traditional PRINT TAB() syntax.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34131 11 Apr 21 06:45 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Yeah, I try to trim down sample programs and chucked the baby out with the bathwater with losing the -10,158 bit. A 3d tab for both sunken fields and also raised ones for menus would be realy useful to me. Take care.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34132 11 Apr 21 06:58 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
OK with the dropped tab back in

Attached Files
clktst.txt (811 Bytes, 19 downloads)
SHA1: c251d4b458277358dfb370fabf85c23b8cfa5804
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34133 11 Apr 21 07:14 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Just to be clear, the "3D" isn't referring to 3 dimensional in the sense of raised/sunken, but in the sense of taking three arguments (row, col, and a code that indexes to a set of predefined attributes, including color, type style, sunken, etc.)

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34134 12 Apr 21 08:31 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Understood re 3D

Attached Files
clktst.txt (1.21 KB, 21 downloads)
SHA1: ae13676d46a6240130aec7be294f38538058f600
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34135 12 Apr 21 04:04 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
As a heads up, I'm looking into what it would take to support mouse cursor reporting in T/D/EPRINT objects. If not too messy, that might make sense for your scenario. I'll make a decision on it in a day or two.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34142 13 Apr 21 04:56 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Here's the beta update which supports the TAB(-1,158) mouse cursor reporting sequences when clicking on T/D/EPRINT objects ...

ash65notes.txt
ash-6.5.1702.0-w32-upd.zip
ash-6.5.1702.0-w32c-upd.zip

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34146 13 Apr 21 10:38 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Impressed.I am in new territory here and may need a bit of gentle handholding. I cannot directly execute the ash-6.5 zipped files. I get vic32.dll and ashicol not found messages. I am currently using 6.5.1687.1 Can someone please advice how to access a download via your site or am I just doing something stupid? ): Can I use the downloads section on Microsabio.com or elsewhere?

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34147 13 Apr 21 10:46 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Maybe I just copy the .exe to vm\miame\bin? I'll try that (:

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34148 13 Apr 21 10:57 AM
Joined: Sep 2003
Posts: 4,135
Steve - Caliq Offline
Member
Offline
Member
Joined: Sep 2003
Posts: 4,135
That will do the trick smile

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34149 13 Apr 21 11:47 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Cheers Steve, it did. I'll give this a good testing and get back.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34150 13 Apr 21 12:33 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Looks good so far (:

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34155 13 Apr 21 03:56 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Regarding the zip or tz updates, typically when changes are first introduced, they only affect the executable (ashw32.exe or ashell for Linux) and so to save time I initially post just that file (in compressed form). So yes, the procedure is to just un-compress it on top of your existing executable (ideally after making a copy of your existing executable just in case you want to quickly go back to it). Of course for this technique to work, you need to start with a reasonably recent full installation. (Dropping the 6.5 executable on top of a 6.4 set of bin files may only partially work, leaving some of older DLLs unusable.) After a reasonable beta test period, I'll build a complete install/update package which you can run from the regular /dist/<platform>/ directory, or, eventually via the Help > Update menu. (Since the Help > Update menu feature is exposed to virtually all end users, we try to be extra cautious about making updates available that way, until they've had an appropriate amount of field testing. The threshold for 'appropriate' is naturally higher for the 'stable' release than for the development release.)

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34158 14 Apr 21 05:51 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Cheers Jack, it's all working fine so far, got a little bit of work to do but I'll let you know. Thanks for any other comments/help. Looks like the A-Shell world is a good place.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34159 14 Apr 21 01:30 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
Congrats Eddie on a successful port!

(Just don't hold us responsible for Herman... wink )

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34160 14 Apr 21 02:06 PM
Joined: Aug 2001
Posts: 2,645
H
Herman Roehm Offline
Member
Offline
Member
H
Joined: Aug 2001
Posts: 2,645
Wait a minute, now. Be polite to your elders!

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34161 14 Apr 21 03:06 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
laugh

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34168 16 Apr 21 09:36 AM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Cheers

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34185 30 Apr 21 07:13 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Thanks to A-Shell enhancements I have all but replaced our earlier .NET interface to create screens to front our interactive applications. Still need a bit of work for sub-forms, memos,multiple line forms etc. but close.Thanks so far.

Attached Files
Attached PDF document
Screens with proportional font.pdf (448.21 KB, 48 downloads)
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34186 30 Apr 21 07:21 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Doh, little screen glitch on sample, but you get the gist.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34188 30 Apr 21 07:41 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Looks nice and clean. (I'll notify the order processing department to be ready for a deluge when your potential customers get a glimpse and start a run on it.) cool

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34189 30 Apr 21 07:54 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
smile

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34190 30 Apr 21 08:11 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
Hi Eddie - having been in your shoes i know it will take a while to get all the hooks in but looks good so far! Just a friendly recommendation, on your front/menu screen, replace all your fixed font / 80 pitch text to some nice proportional font, even use some different font size, bold, etc to give it a nice upgrade. Not much effort but will help get your menu out of the 70's smile

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34195 01 May 21 07:24 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Thanks Frank, of course some of us were writing Alpha Basic in the 70s smirk !. Did you use 3D tabs for changing fonts? I have also (as I am sure all have) created all sorts of output stuff PDF, XML Excel, Drill downs etc.interfaces with email, outlook etc.It will be interesting to see what some of you have been creating. Have a good weekend.

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34196 03 May 21 01:13 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
Does the 80's count wink

Our first GUI version ran on both ATE and CRT. That must be where my hair started looking more like Hermans' wink

I tried all sorts of things, sunken fields, etc.. i have found personally that you don't want to use too many variations of fonts, etc or it can look "gimicky". Just some different sizes for emphasis, and some well placed graphics. We have moved to "hover menus" for our main menu. Happy to help.

Attached Files SIGNIN.PNGMENU.PNG
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34197 03 May 21 04:10 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
PS: Another idea to help transform your programs would be to place your infld / edit controls into some sort of container, like a dialog or tab (we use the latter). I realize you are just trying to get going but this is also a good way to get past the old crt 24x80 look.

Attaching a simple data entry screen sample as an example.

Attached Files INSCO.PNG
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34200 03 May 21 11:13 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Congratulations Frank, I love "the order" in your screens, always, very elegant and modern.
It's noticeable that every pixel was thought and approved, those screens guarantee sells, for sure.
Eddie, if you're looking for directives to GUIzation, follow Frank, in the short term you will not be able to stop with such wonderfull results and not that much effort for convertion. cool

Last edited by Jorge Tavares - UmZero; 03 May 21 11:14 PM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34201 04 May 21 12:36 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Nice one Frank, I've still got much to learn. Can you give me pointers e.g. creating the text tabs at the top (notes, contract etc.) I am not adverse to reading the documentation and sample programs.

Cheers Eddie

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34202 04 May 21 01:41 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
Thanks Jorge! Wow i can certainly not live up to those kind words wink Truly my screens are just the beginning, when you are ready to push the GUI envelope, look at Jorge's screen examples! They will make these look like first grade! (Jorge maybe you can publish one here just to show Eddie the sky is the limit here!)

Eddie - thanks... I am happy to give you any pointers here as will any one of the great group of people here! Don't be afraid to ask!

We are using a control Jack added a few years (8?!) ago called TABX. It has lots of cool options including colors, and tab placement anywhere on the screen. I found this to be a good way to organize screens with multiple options. We have gone with this look as the main screen field "container". Some like Jorge use the main system window and populate with literally hundreds of gui controls, all related to the user task. It depends on the overall focus of the program. Since our system is derived from text-entry (like yours) this seemed a good approach.

The key to your screen designs is to maintain a parent/child relationship with all the GUI controls. If you populate a tab as your main screen, that becomes the parent, and any control inside that become the child, and so on. Child controls are relative to the parent as far as positioning and how you add them. I think the best way to get your feet wet would be to write a small stand alone program for you to play with, then figure out the best way to back it into your business code.



TABX Link

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34203 04 May 21 02:24 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
Great, many thanks, I'm on it smile

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34204 04 May 21 04:51 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
smile

Re: d/e/tprint and mouse clicks [Re: Eddie Parker] #34219 06 May 21 07:44 PM
Joined: Dec 2017
Posts: 43
E
Eddie Parker Offline OP
Member
OP Offline
Member
E
Joined: Dec 2017
Posts: 43
I've been looking at tabx and have now got to grips so far on my prototypes. As I am discovering, using d/e/t prints, tabx etc. we are dealing with 'controls' and these do not seem to always behave as I would prefer (in my nievety) with traditional screen displays. My problem is maybe that I have invested so much in incorporating mouse clicks with my data entry, menus etc to create interactive applications.

I am quite happy to continue with trial and error but would like to achieve, for example, drop down or 'combos' as I had with traditional and even with proportional font stuff. Since converting to A-Shell I have used various methods of creating menus, drop-downs, displays etc.including tab(-1,68) (with underline), tab(-10,15) to set RGB and 3D tabs for various colours and fonts.I am now using tabx to create my main background using Groupbox for the white background for combos. I would like to achieve the light blue bar when scrolling down. Any pointers?

Thanks, Eddie

Attached Files
Attached PDF document
Screens with tabx.pdf (545.93 KB, 37 downloads)
Page 1 of 2 1 2

Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3