Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8110915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:55:45+00:00 2026-06-06T01:55:45+00:00

I have made a YUI module a little like the code shown below, which

  • 0

I have made a YUI module a little like the code shown below, which is the recommended pattern for YUI3 stuff, both within YUI’s own core files and within Moodle as per here.

The problem is that now I can’t see any of the methods (such as initializer() and show() in the code below) in the IDE’s file structure/navigator pane. It seems that the Y.extend() logic is too much to handle, despite previous use of YAHOO.lang.Extend() outside of the sandboxed pattern used below working fine.

Has anyone any suggestions as to how to fix this? Is it just my IDE (tried IntelliJ IDEA – bug here, and NetBeans)? Surely the YUI devs don’t have this same problem do they?

YUI.add('moodle-local_hub-comments', function (Y) {

    var COMMENTSNAME = 'hub_comments';

    var COMMENTS = function () {
        COMMENTS.superclass.constructor.apply(this, arguments);
    }

    M.local_hub = M.local_hub || {};

    Y.extend(M.local_hub, Y.Base, {

        // Invisible property:
        event : null,

        // Invisible function:
        initializer : function (params) {
            // function code here
        },

        // Invisible function:
        show : function (e) {
            // function code here
        },

        // Invisible function:
        hide : function () {
            // function code here
        }

    }, {
        NAME : COMMENTSNAME,
        ATTRS : {
            commentids : {value : 450} 
        }
    });

}, '@VERSION@', {
    requires : ['base', 'overlay', 'moodle-enrol-notification']
    //Note: 'moodle-enrol-notification' contains Moodle YUI exception
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:55:48+00:00Added an answer on June 6, 2026 at 1:55 am

    This appears to be a possible bug with IntelliJ, with details here. Good to know that they at least in theory support it.

    As a worksround, JSDoc can be added above the extends function like this:

    /**
     * @class M.local_hub
     **/
    Y.extend(M.local_hub, Y.Base, {
    

    Which makes all the methods show up 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made up the custom module as : YUI.add('util', function(Y) { Y.namespace('com.myCompany'); var
I have made a module which is transmitting but I don't know whether the
I have made a game which is nearly identical to Popcap's Atomica. ( http://www.popcap.com/gamepopup.php?theGame=atomica
I have made a basic ascx control which is just a panel with a
I have made the code to find the similarity between two documents by finding
I have made a script to intimate the admin the list of module need
I have made one file say a.php. Now I want some thing like if
I have made this controller, which should be used to send emails. I need
I have made an application in which there is a file main.c which uses
I have made an app that starts a service, which starts a timer, which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.