O$ 4.3.1 Locking

Nick Harris nick.harris at exact.be
Tue Apr 21 03:22:28 EDT 2009


This is the code that I use.  

It locks all classes in all open libraries.

You can alter/omnit the filter in the middle, put it in there in case
there are any libraries you do not want locked.


Do $clib().$ignoreexternal.$assign(kTrue) Returns #F

; load lst of libs
Do $libs().$makelist($ref.$name) Returns lvLstLibraries
Do lvLstLibraries.$cols.1.$name.$assign('Name')

; filter
Do
lvLstLibraries.$search(mid($ref.Name,1,3)<>'lib',kTrue,kFalse,kTrue,kTru
e)
Do lvLstLibraries.$remove(kListDeleteSelected)

; lock process
For lvLstLibraries.$line from 1 to lvLstLibraries.$linecount step 1
  Do
$libs.$findname(lvLstLibraries.Name).$classes.$sendall($ref.$locked.$ass
ign(kTrue))
End For

Do $clib().$ignoreexternal.$assign(kFalse) Returns #F

Hth
Nick


-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Peter van
Rooij
Sent: dinsdag 21 april 2009 9:12
To: OmnisDev List - English
Subject: Re: O$ 4.3.1 Locking

Hello Chris,

you can build a list of objects 'to-lock' and then do something like:

For iLockList.$line from 1 to iLockList.$linecount step 1
	If iLockList.0.$selected
		Calculate $objects.[iLockList.C1].$locked as kTrue
		Save class {[iLockList.C1]}
	End If
End For

HTH

Peter

On 20 apr 2009, at 20:05, Chris Peck wrote:

> Hi All,
>
>
>
> Anyone know if there is a way to notationally lock a class during  
> runtime
> execution?
>
>
>
> Chris Peck
>
> Software Developer
>
> Word Master, Inc.
>
> V: 847-948-9600
>
> F: 847-948-9617
>
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com



More information about the omnisdev-en mailing list