Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Override methods
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michał Przybysz  
View profile  
 More options Aug 9 2012, 10:17 am
From: Michał Przybysz <michal.kamil.przyb...@gmail.com>
Date: Thu, 9 Aug 2012 07:17:39 -0700 (PDT)
Local: Thurs, Aug 9 2012 10:17 am
Subject: Override methods

Hi,

I have something like this:

/**
 * Description
 * * @constructor
 **/
alib.b.A = function() {};

/**
 * Description
 * @class
 * @extends alib.b.B
 **/
alib.b.B = alib.extend(alib.b.A,  
    /** @lends alib.b.B.prototype */
    {
   fade: function (config) {
       //do something
   },
//blabla
 });
/**
 * Description
 * @class
 * @extends alib.b.B
 **/
alib.b.C = alib.extend(alib.b.B,  
    /** @lends alib.b.C.prototype */
    {
   fade: function (config) {
       //do something
   },
   //blabla

});

It is proper way to document this code?? In output documentation method
fade occurs twice.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Mathews  
View profile  
 More options Aug 10 2012, 4:13 am
From: Michael Mathews <micm...@gmail.com>
Date: Fri, 10 Aug 2012 09:13:51 +0100
Local: Fri, Aug 10 2012 4:13 am
Subject: Re: Override methods

Hello Michał,

I believe this is a bug, or at least I would consider it one: extended members with the same name should be overridden in the docs, not duplicated, in my opinion.

Here's a greatly simplified example case:

````javascript
/** @class */
A = function() {};
/** document me */
A.prototype.f = function() {

}

/** @class
    @extends A
*/
B = function() {};
/** document me */
B.prototype.f = function() {
}

````

I suspect this issue arises from the action of the [augments.js  file](https://github.com/jsdoc3/jsdoc/blob/master/rhino_modules/jsdoc/augme...).

@tschaub can you offer any further advice?

Michael Mathews
micm...@gmail.com

On 9 Aug 2012, at 15:17, Michał Przybysz <michal.kamil.przyb...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Schaub  
View profile  
 More options Aug 10 2012, 3:24 pm
From: Tim Schaub <tim.sch...@gmail.com>
Date: Fri, 10 Aug 2012 13:24:00 -0600
Subject: Re: Override methods
Is there any justification for there to be an array of doclets for a given name?

In augments.js, I followed the structure I saw being created here:

https://github.com/jsdoc3/jsdoc/blob/master/jsdoc.js#L155-160

I'll try to get that fixed up in the next couple hours.  Might be that
when I get my head back into it I see the reason for the array.

https://github.com/jsdoc3/jsdoc/issues/158

Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Mathews  
View profile  
 More options Aug 10 2012, 4:17 pm
From: Michael Mathews <micm...@gmail.com>
Date: Fri, 10 Aug 2012 21:17:35 +0100
Local: Fri, Aug 10 2012 4:17 pm
Subject: Re: Override methods
The array is to support _overloaded_ methods. But in the case of `@extends` and subclasses the assumption should be that the subclass always wants to override and not overload.

For example, given the following code, the "name" method should appear in the docs twice.

```javascript
/** @constructor */
function Person() {

}

/**
  Set the name.
  @param {string} n - The name to set.
*//**
  Get the name
  @returns {string} The name.
*/
Person.prototype.name = function(n) {
    if (n) this.n = n;
    else return n;
}

```

In addition it is possible to use the `@also` tag to document this sort of thing.

Michael Mathews
micm...@gmail.com

On 10 Aug 2012, at 20:24, Tim Schaub <tim.sch...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »