Some classes not locking

Scotte Meredith spomacguy at gmail.com
Fri Feb 12 22:58:00 UTC 2021


I'm trying to lock classes in a library. I have a list of the classes to be locked and I'm looping through locking them.

This is Studio 10.2.

Most of the time they lock without a problem, but sometimes certain ones won't lock.

What I noticed is that most of the ones that won't lock are Window classes and once it stops locking it may lock every other one. Once one has been missed in going through, it is difficult but not impossible to lock it. Sometimes if I just run the locking line of code again, it will lock.

I have tried looping through up to 10 times if it doesn't lock the first time, but that doesn't help. I've tried rebuilding my list of items to lock including just the unlocked ones. I've tried putting in a Kelly loop (a delay in the code) in case it needed time to write it to disk.

I've tried setting the lock in each of these ways:

Set reference lRef to lTargetLib.$classes.[lClasses.lClassName]
Do lRef.$locked.$assign(kTrue) Returns #F

Calculate lRef.$locked as kTrue

Do lTargetLib.$classes.[lClasses.lClassName].$locked.$assign(kTrue) Returns #F

I've tried with and without Save Class after making the change.

In every case when it does not lock the class, #F = kTrue, claiming to have locked it. However a test for lRef.$locked shows it is not locked (as well as inspecting the library class).

Does anyone have any ideas on why a class will not lock?


Scotte Meredith
spomacguy at gmail.com
509/998-0991






More information about the omnisdev-en mailing list