A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: 1078: Label must be a simple identifier.

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    6

    1078: Label must be a simple identifier.

    Im completely lost. Ive tried everything.

    Even tried

    import mx.core.mx_internal;
    use namespace mx_internal;

    What should I do? Im using Flex. Code is below.

    public function invalidateDisplayList() : void
    {
    if (!invalidateDisplayListFlag)
    {
    invalidateDisplayListFlag = true;
    if (isOnDisplayList() && UIComponentGlobals.layoutManageruse)
    {
    UIComponentGlobals.layoutManager.mx.managers:ILayo utManager::invalidateDisplayList(this)
    }
    }
    return;
    }// end function

  2. #2
    Junior Member
    Join Date
    May 2011
    Posts
    6
    Sorry this line is whats getting me the error

    UIComponentGlobals.layoutManager.mx.managers:ILayo utManager::invalidateDisplayList(this)

  3. #3
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Code:
    UIComponent.layoutManager.invalidateDisplayList(this);
    ILayoutManager is an interface. You must call methods on an instance (or static methods on a class).

  4. #4
    Junior Member
    Join Date
    May 2011
    Posts
    6
    Thanks, That worked. Im new to coding with flex. I might be on here more asking for help lol.

  5. #5
    Junior Member
    Join Date
    May 2011
    Posts
    6
    Another quick question, If I replace setStyle(param1, param2); with setStyle(param1.param2); would it perform same function?? With the comma I recieve 1000: Ambiguous reference to setStyle.

  6. #6
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    What class's setStyle method are you calling?

    You know you can't just make up syntax, right? You need to pass the same number of arguments that the function expects, and you need to separate those arguments with a comma. The dot operator is completely different, it does property access. So no, that wouldn't "perform the same function". It wouldn't do anything, since param1 does not have a param2 property.

  7. #7
    Junior Member
    Join Date
    May 2011
    Posts
    6
    Im new to coding, I was told that if I be more hands on with existing code then I will learn faster. I learn better hands on. I have a code that I imported into Flex and Im running into a few errors. I have fixed a few of them. The setStyle errors is here.

    Code:
            
    public function clearStyle(param1:String) : void
            {
                setStyle(param1, undefined);            
    return;
            }// end function
    
            public function setStyle(param1:String, param2) : void
            {
                var _loc_7:int = 0;
                var _loc_8:Object = null;
                var _loc_3:* = getStyle(param1);
                var _loc_4:Boolean = false;
                if (selectorRefCount > 0 && factory == null && defaultFactory == null && !overrides && _loc_3 !== param2)
                {
                    _loc_4 = true;
                }
                if (param2 !== undefined)
                {
                    setStyle(param1, param2);            
    }
                else
                {
                    if (param2 == _loc_3)
                    {
                        return;
                    }
                    setStyle(param1, param2);           
     }
                var _loc_5:* = SystemManagerGlobals.topLevelSystemManagers;
                var _loc_6:* = SystemManagerGlobals.topLevelSystemManagers.length;
                if (_loc_4)
                {
                    _loc_7 = 0;
                    while (_loc_7 < _loc_6)
                    {
                        
                        _loc_8 = _loc_5[_loc_7];
                        _loc_8.regenerateStyleCache(true);
                        _loc_7++;
                    }
                }
                _loc_7 = 0;
                while (_loc_7 < _loc_6)
                {
                    
                    _loc_8 = _loc_5[_loc_7];
                    _loc_8.notifyStyleChangeInChildren(param1, true);
                    _loc_7++;
                }
                return;
            }// end function

  8. #8
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    That is clearly decompiled code. If you have the rights to the code, get the original source. It will be a LOT easier to understand. If you don't have the rights, don't decompile and use others code. There's plenty of free software out there to learn from.

  9. #9
    Junior Member
    Join Date
    May 2011
    Posts
    6
    It was given to me to work with. I guess I will contact the guy that gave it to me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center