[Sugar-devel] [Karma] updating jsdoc for Karma

Felipe López Toledo zer.subzero at gmail.com
Mon Oct 19 17:45:52 EDT 2009


I have been figuring how to produce the full jsdoc documentation, but I
haven't had any luck, I have tried with @memberOf, @lends, @nameOf, and so
on...

2009/10/14 Bryan Berry <bryan at olenepal.org>

> On Wed, 2009-10-14 at 18:24 -0500, Felipe López Toledo wrote:
> >
> > I will try to fix it this weekend, I will keep u on track of positive
> > or negative results.
>
> tks a lot dude
>
> quick questions, is KObject a separate class from Karma?
>
yes, Karma is a separated class that initializes i18n, graphics, etc stuff


>
> Are KImage, KSound, KSurface all members of both the Karma class and
> KObject or just KObject?
>
 the unique relation that has Karma with KImage, KSound, KSurface is the
shortcuts functions (for image, sound, surface).
The shortcuts are factory-functions (avoid using new) and, if necessary they
supply some extra configuration, as an example for KSurface.

KImage, KSound, KSurface inherits from KObject.


> KObject mimics uses pseudo-classical inheritance correct? so each
> KImage, KSound instance gets its own copy of KObject?

yes,  KImage, KSound and so on has their own copy of KObject, also they have
their own copy of KMedia.


> One drawback to
> this is that we have to load extra copies of the same KObject properties
> for each instance. If we used prototypal inheritance we would use a lot
> less memory as only the prototype object would take up memory. Would it
> be possible to use prototypal inheritance? possibly using the mixin
> pattern? just curious
>
yes, I think it's possible but the prototypal inheritance doesn't support
multiple inheritance.
Actually we don't use it, but when I was designing the structure I thought
it would be useful.


>
>
>
> --
> Bryan W. Berry
> Senior Engineer
> OLE Nepal, http://www.olenepal.org
>
> regards


-- 
Felipe López Toledo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20091019/69d325c5/attachment.htm 


More information about the Sugar-devel mailing list