Whoops... Oh dear


Author Message
IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 02:23pm 22 Dec 2022      

Hello all..

Running this lil pico with putty as my terminal editor.

As you now I'm just playing at the mo.

I have been working on a rather large program AND!! I assumed each time I run the program is safe inside..  I have no way at the moment to save a copy on the PC (I'm sure there is, but still learning )

I created my first interrupt, it was for a numberbox and  generated a #ref and hit F2, towit a  message appeared stating a 0 isn't valid and ( 1 to 9 ) was.

Realizing I have miss spelled the ref went back to edit..... All gone and memory wiped..  

Ho Hum... I am going to use a different term program as putty will not allow you to save any text on the screen.

Ian

Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8964
Posted: 02:44pm 22 Dec 2022      

I wonder what else was in your program? That error message is one that I would associate with working with flash slots. Pressing F2 should run the program (which lives in flash slot 0).

If you think this might be a bug, what version number of the PicoMite firmware is it?

If you'd like to try a different terminal program then Tera Term is excellent with the PicoMite if you are running Windows. It supports XMODEM so you can save files from the PicoMite to the PC.

Alternatively, you could try MMedit which is very popular.

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5994
Posted: 02:49pm 22 Dec 2022      

Hi IanRogers,

- I have seen this once before. Never could duplicate. Typically you can store your program in a flash slot inside the picomite. That (in my case) survived the "crash".
FLASH SAVE 1 (or 2 or ....5)

- Using MMEdit is definitely preferable. Since you store your programs on the PC. Highly recommended.

Volhout

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 03:04pm 22 Dec 2022      

  Mixtel90 said  I wonder what else was in your program? That error message is one that I would associate with working with flash slots. Pressing F2 should run the program (which lives in flash slot 0).


LOL... it was just a simple screen that loaded a jpg from SD with a button to enter config mode..(working fine)   I then placed 6 controls to access different menu options, one option to quit the program..  ( working)

The last option was to change a variable used in the main screen

 some thing like this

sub entry
' remove gui controls
 GUI DELETE menu1,menu2,menu3,menu4,menu5
 CLS 0
 GUI INTERRUPT myBut, myBut ' same interrupt
 text 20,30, "SELECT","LM", white, black
 GUI NUMBERBOX nbox1 20,50, 100, 37, white, black
 GUI NUMBERBOX ACTIVATE nbox1
 touched = 0 ' as interrupt key down had fired
 do
    if touched = 1 then
      ( save ctrlval and redraw previous screen )
       exit sub
    endif
 loop
end sub


I set the interrupt before this sub BUT  the control was actually named nbox and not nbox1
I also set up the GUI INTERRUPT  just befor

Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8964
Posted: 03:16pm 22 Dec 2022      

I trust that you allocated some memory for GUI stuff?

Always safer to save progs, especially when messing with interrupts I've found. They usually behave but you never know. :)

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 03:20pm 22 Dec 2022      

Yup

I'll not need more that 10 so I set it to 10 controls...
It won't let you use them if it's undefined.

print mm.ver
gives 5.0704

I'm downloading MMedit as we speak..

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 03:34pm 22 Dec 2022      

MMedit downloaded and running.

Lets hear no more of my madness...

Ian

Bit Later on.....  Back to where I was ( ish)  lets try the interrupt again..

BTW.. I like MMedit.. I like Textpad and I'd like to run that loader program direct from textpad...

I couldn't be a simple as passing the whole text to MMCC.. Guess I'll try.
Edited 2022-12-23 04:04 by IanRogers

TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6546
Posted: 08:16pm 22 Dec 2022      

  IanRogers said  
I couldn't be a simple as passing the whole text to MMCC.. Guess I'll try.


Yes, it could.

Jim

phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3321
Posted: 08:37pm 22 Dec 2022      

As you have an SD card attached...

Save "Ver 1.x.BAS"

before RUN.

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 10:43am 23 Dec 2022      

Cheers Jim.

I have used Textpad as an IDE for years.. It has the ability to setup a compiler to grab the text and compile... Similar as the MMedit.

However!! As MMedit is working sooo well, I'll just use that...( I don't want to introduce errors, not until I'm conversant with this topic..)

Ian

@phil99  Actually, as Peter has a Flash file system, it would make sense to use the new  version and stick it on flash... But using MMedit is tons easier than using a term program.. Cut and paste is a boon when duplicating lines of code..

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 02:11pm 23 Dec 2022      

Okay.. Back to where I was..

The issue is GUI NUMBERBOX ACTIVATE ttext

I used the Const ttext = 7

If I use an interrupt  sub  to increase a variable touched all works fine

Ie...  

sub mybut
touched = touched + 1
end sub

I can pick up that when touched = 2 the enter key was pressed.

But that's not what I want.. I want the number keypad to activate

The error on screen said my syntax is incorrect! It is typed as above..

matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11636
Posted: 02:58pm 23 Dec 2022      

If we are talking about the PicoMite then GUI Numberbox activate has been removed as it had intractable issues (also formatbox activate and textbox activate). The manual for 5.07.06 won't include it

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 12:08am 24 Dec 2022      

Okay..

I'll set a dummy interrupt and just use it as is.

Thanks for the heads up Peter.

Ian

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 02:07pm 24 Dec 2022      

Is there any way to falsify and generate an interrupt!

All I need is the keypad to pop up normally..Without interaction.

Ian

plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 11:26am 01 Jan 2023      

I am just curious, is this topic still going?

IanRogers

Senior Member

Joined: 09/12/2022
Location: United Kingdom
Posts: 152
Posted: 01:28pm 01 Jan 2023      

Clearly not

I have decided to make my own keypad and text control...  Maybe in the future?

I'll not push as Peter has his hands full with the flash storage at the mo.