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.
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.
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.
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.
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!
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.
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.
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.)
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.
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?
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.)
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.
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.
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.)
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
Thanks Frank, of course some of us were writing Alpha Basic in the 70s !. 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.
Our first GUI version ran on both ATE and CRT. That must be where my hair started looking more like Hermans'
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.
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.
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.
Last edited by Jorge Tavares - UmZero; 03 May 2111:14 PM.
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.
Thanks Jorge! Wow i can certainly not live up to those kind words 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.
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?
BTW, I am planning to use tabx as a means of creating nicer screens, I am not expecting to wait for events. I plan to detect and respond to changes of panes through simple mouse click detection.
I see you have the "gui bug" now... that is a dangerous thing...
Looks like you are off to a good start. When you mean "blue bar" do you mean in the "combo" control? Or are you referring to xtree which is the ability to add lookups and all sorts of grid features to your software? xtree started off as a simple listbox sort of control, now has grown to a almost a full blown spreadsheet / data entry tool in it's own right... but you can still use it for simple picklists, etc as it was initially designed.
Thanks Frank. I have created a user interface that resembles a combo box. This is a subroutine that creates a white background box containing a list, as the user scrolls down, the highlighted row has a pale blue background (see sample three in yesterdays attachment, bit like windows explorer). I need to decide whether I can achieve this by a combination of print tricks on the tabx control background. I will also have a look at xtree. My method is functionally equivilant to, say, .NET combos and I guess xtree, without the windows drag bar. I will put together a couple of simple programs to demonstrate my issues. Sounds like xtree is worthy of attention. Jack and Ty have certainly not let the grass grow under their feet.
In the past doing this has often focused my attention to the actual cause! By the way, I have now discovered that you shouldn't start one of these quick replys, then leave the page to check something, you lose the reply!
Hi Eddie, Looking at your screen, in my opinion, a quick and nice upgrade will be to convert all your code/description fields to combos, which can be in two flavours, list and self. You should use the self combo when the table behind the field is big enough that a regular combo list will not be easy to handle or you want to add some kind of advance search. Easily you will find on the documentation everything about that and it's the kind of conversion that will not add an huge change into your program considering that in a combo list, everything happens inside the control itself and, it makes an huge difference in the look of your screen and you will save dozens of programming lines of code.
I'm not giving too much examples of my programs, at least by now, because I moved directly to 100% GUI and my logic of programming could be different and confuse things.
As an aside, if you want, I can send you LEO, it's a GUI tool that I developed to design GUI screens, below you can see the UI. Once it's an A-Shell program itself, the desing matches 100% what it will look in you final program. That's the starting point for all my programs because it creates the initial code and, after the first release, any change, just update the include that handles the GUI controls but, you can use LEO just for design and play with GUI controls or even just create proposals for customers.
Have fun.
Last edited by Jorge Tavares - UmZero; 07 May 2111:34 AM.
Thanks Jorge. I have used the Combo concept with .NET. With my Alpha code I have a created generic user interface for simple lists as well as larger data files e.g. customers. Wheras .NET comes back for chunks of data, my method interacts with the file handling and also supports find, find next/previous and some other features. I need to investigate xtree/combos. Your LEO looks very impressive. Many years ago we created a code gererator which I have maintained going forward incorporating .NET, A-Shell features as well as the code restructuring required, very clunky compared to what you have created. Firstly, though, I need to spend a moment sorting out my current issue. It will almost certainly be something I have done wrong I think it will be my using a combination of A-Shell methods to output to screen combined with my newly learned tabx bits. I am creating a test program that contains just enough lines of code to demonstrate the issue, normally by that time I realise what I have done wrong and stop blaming Jack!
It looks as though as I get used to A-Shell, I can jetison a lot of my code.
You cannot go wrong using Jorge as your mentor! Like he said, using the combo control i think will resolve your issue. As a general rule, if you have a bunch of selections, that's when i would employ xtree to perform the lookup/picklist function for you.
I have tried various combinations and managed to achieve my original hope which was to enable my current 'Combo' boxes to work with tabx controls. My problem was to do with mixing older print methods with more recent 'Controls'. FYI I swapped a tab(-10,AG_ATTRSUB) with a 3D tab in order to create diffently coloured, shaded backgrounds. Points noted and I will start looking at xtree soon.
Thanks for all input and have a good weekend, nearly time to open the wine over here
Eddie, that's not fair, mention the magic (wine) word on a Friday night???
That was the perfect excuse to open the most strange blend I've ever bought Marselan/Tannat while producing this video
Below is the final result of the 30 minutes video, you decide if it worths the time to watch it and I'll be happy if you skip it because you are ahead in your GUI process. Also attached are the code/run files.
It was done on the fly so, apologize for some clumsy but, I hope you have fun to watch as I had to produce it.
PS: the video is still rendering, hopefully will not crash this post
Hi Jorge, that didn't seem to work for me, see top of screen for my version of A-shell plus the debug trace to the right. I'll post a copy of my revised prototype form when it's near done. I say near done as I have been working on this for fourty years and it never gets done
Video worked for me here in rainy Cambridge, I watched the whole block buster movie (nice one Jorge) but was expecting a Cheers with Jorge holding a glass of wine at the end!
Jorge, the last thing I want to do is burden you with a problem to fix on a Saturday morning (are you based in Portugal or Brazil?). I attach, for your perusal, a copy of the debug log.
Morning Steve, but I'm just the idiot user. I'll go back and take a look as all I received was .BAS and .RUN, settings issue I recompiled with /av/x:2/p/ls, still just seems to loop.
Good morning guys, You're right Steve, apologize for that missing part, it was in my plans but the video became so extended that I was in a hurry to just hit the stop button and, also, that (strange) wine didn't encourage me Let's try with the next bottle, maybe when I add the refresh button and the XTREE to list the wines below the fields.
Eddie, one message caught my attention in your ashlog: CreateWindowEx Error = 1158 (The current process has used all of its system allowance of handles for Window ) Looking to your PDF, all AUI controls are there but missing all the INFLD.
Let's start with the basics: 1. what happen with a single line program with one sbxinp, like the one I've started the example? 2. updating to the attached SBXINP.SBX makes any difference? 3. If the above don't do the trick, my guess is about MIAME settings, or environment settings on the A.Shell top menu, if you want to share it, maybe something there can enlight the cause of the problem.
As for my location, I live in Rio for almost 9 years but my business is fully based in Portugal, all my customers are there (since last year I have one non-AShell customer here). The World's new reality didn't change anything in my professional life because I'm in remote mode since then, except to the fact that, for the first time, I didn't visited customers in a full year, hopefully, that will happen next July if, in the meantime, the flights from Brazil don't get suspended, again. So, in resume, we both work in the same Time Zone
Cheers! (now with my big cup of coffee in hands, due the domestic Time Zone)
Last edited by Jorge Tavares - UmZero; 08 May 2110:01 AM.
Hi, just got back from my daily walk and it is indeed rainy here. I replaced the sbxinp and aligned our settings, got further but not beyond the brand. When I'm in Portugal I quite like the local farmer's produce, 10 Euros for a 5 litre water bottle from his vats!
Well, it seems that, now, you have a fully functional example. Have you noticed the link to "the video" and watched it? My exercise stopped there, there is nothing more after the Brand (besides the checkbox) so, apologize if you have frustrated expectations. Have a nice weekend
Last edited by Jorge Tavares - UmZero; 08 May 2102:05 PM.
Ahh, great.That was very imformative Jorge, and very kind of you to take the time.This language and environment has come on a long way. I will take some time soon to explore my options.
Pls. see attached a sample of my progress so far. As I said earlier I modified my code a long time ago while just using AMOS and Z-Term. We developed a .NET interface which prompted me to restructure my code (and there's a hell of a lot of it) to react to mouse clicks. So I had one set of code that either reacted to a full .NET GUI front end or, alternatively, mouse clicks generated via Z-Term. The problem I had was trying to get the users to use the GUI!
Morning guys, I've dipped my toes in the sbxinp pool. I can see how field validation and file handling would be handled, a couple of quick questions before I go much further. The sample provided, I get it that it was quick to put together and powerful.
Can we detect if the user has clicked a field out of sequence? For this we needed to validate the field left and then focus on the field selected. Can we put up icons and detect when these are selected? With combos, can we process large files, say several thousand customers or products (I think you have answered yes to this). We had to deal with these differently to simple lists in the .NET interface. Are there search options on combos? Are there options for multiple row data entry forms?.
I'm sure you will answer yes to all these as you have all managed to put together solutions. Just asking.
Jorge, we hope to go to Portugal in two weeks, stay in touch as we have a villla on the Algarve, not many people sitting and writing A-Shell/Alpha Basic code down there.
I remember when Jorge met me in the Algarve and he popped into the local shop and they said sorry we don’t understand you !we only speak English! , think Jorge felt like he some how end up in a different country , maybe a new English colony by the back door didn’t you Jorge.
Hi Eddie, so, you're one of the English colonizers of Algarve As Steve mentioned, and I remember very well (great days there ) at least in Albufeira area, I'm sure you feel at home, there, you listen more english than portuguese. Where do you have your villa? It would be a pleasure to visit you there but, unfortunatelly, I'm in Rio de Janeiro, unless you stay until July-September when I'll be in Portugal.
And, apologize for not have answered to your doubts, it was, and still is in my plans but, didn't have enough quiet in the last week to do it properly but, stay tunned.
Last edited by Jorge Tavares - UmZero; 17 May 2109:15 PM.
Hey Eddie - didn't know they let you out of the country yet! Have a good trip - in the meantime here are a few ideas:
Can we detect if the user has clicked a field out of sequence? For this we needed to validate the field left and then focus on the field selected. >>Yes, unfortunately in the new GUI realm you must trap for every single event. (via an exitcode value). If this is not what you expect, you need to provid some user feedback. This was the most difficult transition from text where WE can control the program flow. Now its completely out of your hands.
Can we put up icons and detect when these are selected? >> Yes, put icons wherever you want... then trap exitcodes as above and process or give some sort of error feedback
With combos, can we process large files, say several thousand customers or products (I think you have answered yes to this). We had to deal with these differently to simple lists in the .NET interface. >> I would not use COMBOS for more than a small handful of choices... think maybe colors, genders, or small data sets. There is a limited string size the combo will hold. As a general rule, if its >50 i would move your selections to XTREE.
Are there search options on combos? >> I believe it will match on the first char, then second if you key quickly. You must sort the input data first. Again if you're building complex pick lists i would use XTREE.
Are there options for multiple row data entry forms?. >> Yes, if you research INFLD you will see the ability to create multiple line entries that you can parse when entered.