![]() |
Forum Index : Microcontroller and PC projects : CMM2: UltraBox - Get File Dialog plus more
Author | Message | ||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Before I get too far into the weeds, here is the current development state of my GetFile dialog box software. This latest rendition works with a mouse if available. Adjust line 15 to suit your mouse or none. Could those with a Hobbytronics mouse interface test and report? DIM MousePort = 0 ' mouse port, set to -1 if no mouse For keyboard use, the arrow keys move around the directory structure, [Enter] selects an item and [Esc] cancels. Slightly unusual is that right arrow on the top item [..] goes UP one level. For mouse use, things are pretty much GUI normal. The wheel rolls the directory list up and down, single clicks hilite items, double-click either selects an item or changes directory. The scroll bar on the LEFT isn't usable yet. (Yes, left side is weird but I have my reasons.) To select a directory, you must hilite your choice, then click the Select button. Directory select functionality is not quite right yet. Selecting [Root] or [..] doesn't perform properly. Comments, suggestions and bug reports appreciated. Thanks. ![]() Visit Vegipete's *Mite Library for cool programs. |
||||
epsilon![]() Senior Member ![]() Joined: 30/07/2020 Location: BelgiumPosts: 255 |
Hi Vegipete, Good to see you're picking this up again. I don't have a mouse so I set MousePort to -1. The Dialog box opens but no directory is shown. The program hangs. Here's the trace (after I pressed Ctrl-C): > trace list [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [733] [734] [737] [738] [739] [740] [742] [743] [747] [750] [751] [754] [755] [756] [759] [760] [761] [762] [763] [764] [762] [763] [764] [762] [763] [764] [765] [768] [769] [771] [772] [773] [775] [538] [848] [849] [850] I ran it on the following directory: list files A:/ghost 21:34 03-04-2021 1811 ghost.bas 21:34 03-04-2021 12709 Ghost.png 21:34 03-04-2021 14506 Part02.png 0 directories, 3 files I'm using FW version 5.07.00b23. Epsilon CMM2 projects |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
I'll try this later today with my crippled Hobbytronics adapter...guess I need to get off my duff and get the updated version...I think updating the HT firmware is probably beyond my 'tinkering' level! Steve |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi Pete, I did test it with HT mouse (port 2) and it works perfectly... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
The trace is quite useful - thanks. The firmware version is the issue. (Fixed in b25) If you change line 850 to do : loop until getscanline < 5 it should work.If still no go, add a "MODE 2,8" command at the start of the program. Edit: "at the start" means anywhere _before_ line 68. See Matherp's posting about 2/3 down page 4 of the firmware update thread. / Edited 2021-04-18 02:29 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Works good with my HT adapted mouse, with the added bonus, that a single click of the scroll wheel takes me to the top or bottom of the list! You have plans on allowing the up/down arrows to be clickable and the bar draggable? That would be really nice, given my wonky scroll wheel firmware! Steve |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
Works well with my PS2 mouse and Ver. b27 Pete. Only v. minor comment (after a short session). Might be good to tab one or two spaces for the sub-directory list when a subdirectory is displayed; leave the top 'root' at full left. Greg |
||||
epsilon![]() Senior Member ![]() Joined: 30/07/2020 Location: BelgiumPosts: 255 |
The workaround at line 850 works. Thanks! I'm using an earlier version of Ultrabox in xedit. I added a rudimentary option to create new files in the dialog box. I'll reintegrate your version if at some point you decide to add such a feature. I doubt I'll ever add mouse support though. Congratulations on your Programming Challenge entry btw! Amazing what you can do in one page of MMBasic. Epsilon CMM2 projects |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |