I want it to work so bad.... - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: I want it to work so bad.... (/showthread.php?tid=1175) |
RE: I want it to work so bad.... - TempodiBasic - 11-25-2022 A bit more deep... in some way the routine of "vs GUI" MainRoutine is the cause of the problem! if you REM it from the code and run F5 you got a working program... except that you must manage manually the button for keyboard and mouse. At start I have thought that in some way that SUB modifies the screenimage(1), but it is clear that it stucks on itself and also an EXIT SUB does not works. Welcome to the Mystery Valley in QB64! RE: I want it to work so bad.... - NasaCow - 11-25-2022 So digging through a bit, I have made some progress. The GUI library takes control, not only with mouse events but also with _display so reenabling _autodisplay fixed the issue with the screen not showing yet stepping through still worked and CheckMenu as well to the DO/LOOP. This was never an issue when MainRouter was originally made to run non-stop once called. Seems I can use one or the other at a time in a particular window, just not together well, keyboard shortcuts (of the menu bar) work with the GUI, just not with the mouse (still digging through it...) Adding: Code: (Select All) MainRouter: So, 1/2 the battle solved. Now, they don't play well together but using the GUI as pop-up window (without a menu bar at top) might be a happy compromise as well. I originally went with the GUI library because I am to unable to easily change the menu ribbon once made. I may keep digging to see if I can help these two wonderful resources play better together (it is what us teachers do anyhow ) Thanks for the suggestions and pointing out some of my other mistakes that could have cause headaches further down the stretch. And if anyone else has an insight into why, feel free to share (updated code w/o the .exe this time)! Thank you again RE: I want it to work so bad.... - bplus - 11-25-2022 @NasaCow I was thinking about what TempodiBasic wrote and realized last night it's a piece of cake to use a list box just like a menu! Just read the item in the selectItem event and do what you would do for selecting a menu Item. I remember one time making a calculator solely from a list box control! Menus and buttons both can be done from a list box. TempodiBasic also brought up an interesting thought, you do know how to write code for an event? I left a manual? Anyway you are fighting city hall with two systems wanting control of mouse and keypress events. Have you thought of building different GUI apps (.exes) and then jobbing out to them from a central menu app, that way you can have both systems and keep them separate for mouse control. Update: now you've done it, I am trying a gradebook app with GUI ;-)) RE: I want it to work so bad.... - TempodiBasic - 11-26-2022 @NasaCow _AutoDisplay !!! yep! Good Shoot! I have never thought about the control of the output to screen fine it works if I put it (_autodisplay) after MainRoutine but it doesn't work if I put it in the BtnClickEvent! ... mouse and keyboard inputs...as Bplus suggests you can write a simple FirstMainRoutine in which mouse and keyboard bring their input and following the cohordination between hot keys and the events of application , more the click of mouse and the event programming put in scene. It is sure that buttons and menu are not overlapping themselves. where is the mouse? MenuArea? activate menu event manager. Button or other GUI items? Activate GUI event manager? Using comboKey with no duplication you can do the same with keyboard. Again good luck. @Bplus GUI manual + GUI application for examples is a good add on for putting in evidence "vs GUI" library. Who can do this better than its creator? PS: I apoligize for my bad nigthly english with many mistakes! RE: I want it to work so bad.... - bplus - 11-26-2022 Yeah TempodiBasic I do have a manual of sorts including change log called: b+ Very Simple GUI.txt OK I finally got the data entry bas file going in preparation for GUI. I made up a: PE Forum - Class.txt list in a WP to start. I used that list to sketch out my vision of a Gradebook and then I made a Gradebook Data Entry.bas to go over details of how to work lines for List box and saves to .dat file. I wrote Class Notes.txt to explain some stuff more and there is one GUI app for browsing files and folders to get a filename in this case the Class.txt file for list of name of class we are recording grades, actually scores from 1 to 100. Get 1 point just for showing up and getting your name right. Needed that to distinguish from test scores not filled in yet in the dat file lines. So here is the package I made to prepare to convert to GUI but really, do we have to? It's working pretty nice already! Source code for get_Filename.exe is in sub folder for you to compile but I use SHELL to call it from inside demo bas files and I don't know if that works for Linux folks. You folks will have to plug in your own version of that line I think? Here's a screen shot of the Sketch: Wow! JRace has a 0, that shouldn't happen in random generated scores I made for Gradebook Data Entry.bas file, I think. It did find correct ave for 5 not 4 but I didn't have to worry about how many tests to average for Sketch demo. I sure did when loading and editing data from file! get_Filename in action with proper file highlighted in List box, just click the "Use This File" button. RE: I want it to work so bad.... - bplus - 11-26-2022 Guess I should have left some columns (scores for given test) empty instead of filling in all 10 but it can rewrite all 10 columns with different numbers. Basically I am thinking a teacher gives x amount of tests over a period of time and adds up and averages for final grade. Anything else? So what do we want to menu? Loading different _____ - Class.txt files for different classes of course, what else? Editing with GUI is sure going to be a challenge to make easier to use than what I have now. RE: I want it to work so bad.... - Pete - 11-26-2022 Looks like Dav's the smartest guy on the boards. My grade didn't even show up. Someone must have left it in the basement, again. Pete RE: I want it to work so bad.... - JRace - 11-26-2022 (11-26-2022, 03:14 AM)bplus Wrote: Wow! JRace has a 0.... Integer rollover. Happened to me all the time in school. At least, that's how I explained my grades to my parents. RE: I want it to work so bad.... - Pete - 11-26-2022 (11-26-2022, 06:42 PM)JRace Wrote:(11-26-2022, 03:14 AM)bplus Wrote: Wow! JRace has a 0.... ROFL! +1. I used the old dog ate my report card. Trouble was, we didn't own a dog. RE: I want it to work so bad.... - bplus - 11-26-2022 (11-26-2022, 05:37 PM)Pete Wrote: Looks like Dav's the smartest guy on the boards. My grade didn't even show up. Someone must have left it in the basement, again. Oh hey Mark remembers: 1. you can resize Console Window 2, you can highlight and Ctrl+C to copy text to _Clipboard Now use code box for that paste and display and maybe Pete won't feel so low Code: (Select All) a740g 70 53 57 28 30 238 48 LOL @JRace now I know how you get the extra points to roll over 100, so yours should be 112. BTW I forgot to mention I WAS using INPUT # to read file lines from dat file and for life of me could not figure why the right aligned names were all trimmed? Screwing up needed predictable layout of test scores,yikes! Turns out INPUT #file Trims the file line!! I had to use Line Input # instead to preserve leading spaces for right aligned names. Just noticed Jarvis is off by one. Update: OK Line Input # fixed that one too! Edited the Sketch Output from Console. Update: what!?? OK that's just some freaky problem with this forum editor! |