Hi,
thank you for the clarification.
Thibault
> Hi Thibault,
>
> Using BaseObject does change something in your code. It's a very minimal
> change anyway.
>
> The thing is that objects in Mozart has to be created calling an initial
> method. If you want to create a class where the attributes do not need to
> be
> initialized, then, you usually inherit the noop method from the base
> object.
>
> This is a dummy class just to spot the difference
>
> class Foo
> meth init
> skip
> end
> meth foo
> {Browse foo}
> end
> end
> Obj = {New Foo init}
>
> now, using the BaseObject
>
> class Foo from BaseOject
> meth foo
> {Browse foo}
> end
> end
> Obj = {New Foo noop}
>
> that's it.
> cheers,
> Boriss
>
>
> Thibault Germentier wrote:
>> Hi all,
>>
>> Here is my question:
>>
>> What is the goal of making the class 'BaseObject' a superclass of
>> another?
>> In the docs, I found that it only have one method 'noop' that does
>> nothing. But in many examples and programs, classes get BaseObject as
>> superclass.
>>
>> And it changes nothing at all in the program?!
>>
>> Thank you for your answers
>>
>> Thibault Germentier
>>
>> _________________________________________________________________________________
>> mozart-users mailing list
>> [email protected]
>> http://www.mozart-oz.org/mailman/listinfo/mozart-users
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users