[Gambas-user] Problem with Lock method for DrawingArea class
Benoît Minisini
g4mba5 at gmail.com
Tue Jun 23 09:53:04 CEST 2020
Le 23/06/2020 à 07:54, John Rose a écrit :
> > You can lock an object by using the static method "Object.Lock".
> > There is no "Lock" method in the DrawingArea class."
>
> I don't understand the above. Quoting from
> https://gambaswiki.org/wiki/doc/object-model#t10:
>
>
> >2.3. Locking Objects
> > An object can be locked so that it stops raising events, and can be
> > unlocked so that it raises > them again. See
> > the Object.Lock
> <https://gambaswiki.org/wiki/comp/gb/object/lock> and
> Object.Unlock
> <https://gambaswiki.org/wiki/doc/comp/gb/object/unlock> methods.
> > 2.4. Observers
> > Observers <https://gambaswiki.org/wiki/comp/gb/observer> are
> objects that allow you to intercept events raised by
> > other objects. They > "observe" them.
>
> Since the above (later on in that web page) refers to a Button as an
> Object , I think that a Drawing Area is an object and therefore Lock &
> Unlock should be methods available to it.
> Also, the compiler does not object to e.g. DesktopDrawingArea (a
> Drawing Area) being used with Lock as in DesktopDrawingArea.Lock.
>
> I do try to follow Netiquette (in
> http://gambaswiki.org/wiki/doc/netiquette), so please tell me
> _specifically _where I go wrong.
>
> Regards,
> John
>
It means that you have to do:
Object.Lock(MyDrawingArea)
instead of:
MyDrawingArea.Lock()
Regards,
--
Benoît Minisini
More information about the User
mailing list