Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
EraserX
Posts: 168
Registered: ‎01-13-2011
My Device: Not Specified
Accepted Solution

Stubborn Error in FlashBuilder (AS3)

So I have run into this error, and I just can't seem to figure out why I am getting it. 

 

The following code:

 

trace(object1["labelText"])

 

 

Gives me the error:

 

ReferenceError: Error #1069: Property labelText not found on CascadingList.Data.BusinessActivity and there is no default value.

 

I understand what the error means, but its false.  (Note - object1 is a BusinessActivity object which is a non-dynamic class I have made).  What I can't figure out is that why FlashBuilder says that the labelText property is not found.  Specifically, when the code breaks (pauses execution) at the line because of the error:

  1. Adding object1 as a watch expression shows clearly that labelText is a property
  2. Adding object1["labelText"] as a watch expression evaluates the expression perfectly fine; and
  3. Waving the mouse over object1["labelText"] in the code evaluates the code perfectly fine.

Anyone have any ideas?

 

P.S. - I do actually need to get the value for object1["labelText"], not merely to print a trace statement.

 

Please use plain text.
Developer
EraserX
Posts: 168
Registered: ‎01-13-2011
My Device: Not Specified

Re: Stubborn Error in FlashBuilder (AS3)

Solution: the property "labelText" was private.  :Whistling:

Please use plain text.
Developer
thesmileman
Posts: 345
Registered: ‎03-13-2011
My Device: Playbook

Re: Stubborn Error in FlashBuilder (AS3)

 


EraserX wrote:

Solution: the property "labelText" was private.  :Whistling:


Kudos for comming back to update. I thought it might be something like that but I thought "no he would have checked that". (I do stuff like that all the time.) :Walkman:

 

Please use plain text.
Developer
erasmus
Posts: 30
Registered: ‎03-31-2011
My Device: Curve

Re: Stubborn Error in FlashBuilder (AS3)

 


EraserX wrote:

Solution: the property "labelText" was private.  :Whistling:


I stared at my code for 45 minutes the other night after doing the same thing. Glad you figured it out!

 

Please use plain text.
Developer
EraserX
Posts: 168
Registered: ‎01-13-2011
My Device: Not Specified

Re: Stubborn Error in FlashBuilder (AS3)

It's amazing how many times I have come to a wall and how just analyzing the problem and organizing it so I can post a clear question on this forum has enlightened me to the answer even before I push post.
Please use plain text.