explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

Silly Adobe…don’t you know? private means private

6 Comments

Doing component development is a challenging task, especially if you are trying to stick within the guidelines established by the MX framework.  So frustrating is this challenge sometimes, it makes you want to tear clumps of hair from your scalp.

I found this while digging around trying to extend mx:ComboBox:

/**
     *  @private
     */
    private function displayDropdown(show:Boolean, trigger:Event = null):void
    {
        if (!initialized || show == _showingDropdown)
            return;

        // Subclasses may extend to do pre-processing
        // before the dropdown is displayed
        // or override to implement special display behavior

Silly Adobe indeed.

Advertisements

6 thoughts on “Silly Adobe…don’t you know? private means private

  1. If you spend any time digging around in Flex, you find these kinda things all the time. It’s just a shame Adobe can’t employ some better AS coders. The classic that sticks with me goes something like this:

    var len : uint = anArray.length;
    for( var i : uint = 0; i < anArray.length; i ++ )

    It annoyed me so much a logged it as a bug, it’s the only way they’ll learn 😉

    Jolyon

  2. Wow… so I guess Adobe never learned about the protected keyword. That’s why I don’t use the MX framework.
    Joylon, which class was this in? I hope the MX framework and not the core…….

  3. @private is used by ASDoc to indicate that a function shouldn’t be exposed in the documentation. Most likely this was a function that was protected (which is still documented by ASDoc) but someone forgot to remove the @private tag. That doesn’t seem that silly to me.

  4. I agree that doing component development can be a real pain, it took me quite a lot of reading and searching(thanks to all the guys that also give info on this). I also found the Flex source code quite weird at first, but after having read their coding conventions, I sort of understood it a bit better, even though I’ll never ever adopt them, lots of them are for me a big waste of time and make those AS files look ugly (spaces everywhere for method calls and a new line for the curly braces = yuk)

  5. Sometimes the Flex framework source reads like an example of how not to code for extention.

  6. i like curly braces on new lines, it makes me feel warm 🙂

    but this private function with the comments left in does explain a lot about how competent their as coders are… If anyone’s tried to compile a flash component from raw as files with the flex sdk they’ll find a whole load of compile errors and warnings, normally because variable and function return types have been left out. tards.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s