Jump to content



Photo
- - - - -

"locked Or Protected", "variable In Use" Errors

programming errors

  • Please log in to reply
8 replies to this topic

#1 AussieGuy

AussieGuy

    Newbie

  • Members
  • Pip
  • 14 posts

  • Calculators:
    ClassPad 330

Posted 18 March 2013 - 09:17 AM

I'm trying to write some programs (so I can teach my students how to do it). However, for no reason that I can see, at one stage my attempts to save a program resulted in "Error: Locked or Protected". So I went to the Variable Manager, but I couldn't unlock this program, as I got an error saying "Variable in Use". I went back to the main screen, deleted all variables, and tried again. Same errors.

The last time this happened I deleted the entire program and re-keyed it in from scratch. But there must be some easier way!

What would cause this loop of errors, and how can I avoid it in future, and get out of it now?

Thanks,
-A.

#2 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 18 March 2013 - 12:52 PM

What calculator is this, and is it BASIC that is causing this problem?

#3 AussieGuy

AussieGuy

    Newbie

  • Members
  • Pip
  • 14 posts

  • Calculators:
    ClassPad 330

Posted 18 March 2013 - 08:55 PM

It's a recently bought ClassPad 330. I suppose it's BASIC. I've even tried deleting the program, but I can't, as I get an error saying "Program in Use". I'm quite mystified - and frustrated!

Thanks,
-A.

#4 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 19 March 2013 - 01:40 AM

MicroPro is probably the authority on this (I don't own a classpad), but from what I hear, you would probably want to use CPLua instead of BASIC anyway as it is much faster and more powerful. ;)

#5 AussieGuy

AussieGuy

    Newbie

  • Members
  • Pip
  • 14 posts

  • Calculators:
    ClassPad 330

Posted 19 March 2013 - 04:31 AM

I only have access to the handheld calculator, not to any computer emulator, and so all my programming is done on the device itself. Can I use Lua like this?

I got round the issue yesterday of the "Variable in Use" error, by doing a full reset of the device.

-A.

#6 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 19 March 2013 - 01:56 PM

I only have access to the handheld calculator, not to any computer emulator, and so all my programming is done on the device itself. Can I use Lua like this?


I think so, yes.

I got round the issue yesterday of the "Variable in Use" error, by doing a full reset of the device.


That's good, but it is sort of weird that that error would appear. Is it in the owner's manual?

#7 AussieGuy

AussieGuy

    Newbie

  • Members
  • Pip
  • 14 posts

  • Calculators:
    ClassPad 330

Posted 19 March 2013 - 11:12 PM

The owner's manual, in the list of errors, has a blank box (that is, no explanation) against "Variable in Use". In particular, I can find no information anywhere - manual or Internet - about this error when the variable is in fact a program.

-A.

#8 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 20 March 2013 - 12:13 AM

Hmm... interesting. Seems that if there is an error message casio should at least know what it means :D

#9 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 22 March 2013 - 05:58 PM

Hello AussieGuy and welcome to UCF! You should introduce yourself.

I'm recently seeing topics very late. :blush: but I hope I can explain this: When a ClassPad application uses a file, it locks the file. When the application finishes, it unlocks the file. This is different from the Lock/Unlock in Variable Manager. Now if the application crashes in the middle of the work, it doesn't reach to its end therefore doesn't have the opportunity to unlock the file. The Error: Locked or Protected you got is maybe because of some bug in the Program application.

Opening and saving the program file in Program should have unlocked it; it's strange it didn't. Unlocking the file is easy using the sdk programming (maybe if you told the path of the file I could write a tiny add-in to do it). This bug happens rarely, so hopefully you won't need to full reset the calc anymore.

Instead of deleting the file and re-keying, you could Copy-Paste the contents in a new program file. ;)

flyingfisch mentioned CPLua, you can find it here: http://community.cas...orum/61-cplua/ and yes, it's fully on-calc. ClassPad Basic is good for easy programs, it's the native and somewhat easier language. For programming anything serious with nice UI, fast speed and stuff, CPLua is the best choice.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users