Badcreature / mad-components

Automatically exported from code.google.com/p/mad-components
0 stars 0 forks source link

Removing UIList container from stage imediatly after Event CLICKED #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I'm listening for UIList Clicked event
2. After I received selection from List, I remove UIList container (before that 
I'm trying to call UIList.destructor() and UI.clean, but bug repeats).
3. Stage is null in UIList.activate method

What is the expected output? What do you see instead?
I removed line:
stage.removeEventListener(MouseEvent.MOUSE_UP,mouseUp);
to the top of the activate() method (before Event CLICKED) and bug is gone. I 
don't know is this ok?

What version of the product are you using? On what operating system?
0.6.9

Please provide any additional information below.

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
    at com.danielfreeman.madcomponents::UIList/activate()[H:\rad\Flex4\RestaurantMenu4.6\InnMenuAndroidASFree\src\com\danielfreeman\madcomponents\UIList.as:604]
    at com.danielfreeman.madcomponents::UIList/pressButton()[H:\rad\Flex4\RestaurantMenu4.6\InnMenuAndroidASFree\src\com\danielfreeman\madcomponents\UIList.as:569]
    at com.danielfreeman.madcomponents::UIScrollVertical/mouseUp()[H:\rad\Flex4\RestaurantMenu4.6\InnMenuAndroidASFree\src\com\danielfreeman\madcomponents\UIScrollVertical.as:303]

Original issue reported on code.google.com by sto...@gmail.com on 18 Feb 2012 at 6:30

GoogleCodeExporter commented 9 years ago
I haven't been able to verify the problem yet.  This is what I'm doing:-

        protected function clickHandler(event:Event):void {
            trace("index="+_list.index+"  "+_list.row.label);
            UI.clear();
        }

(It's clear(), not clean(), btw. but I guess that's just a typo in the bug 
report, and you're using clear() anyway. )

Original comment by doc.andr...@gmail.com on 2 Mar 2012 at 4:42

GoogleCodeExporter commented 9 years ago
ok, in attachment is problematic code. Sprite which contains UIList is removing 
from the stage on List click event

Original comment by sto...@gmail.com on 18 Apr 2012 at 10:58

Attachments:

GoogleCodeExporter commented 9 years ago
It's likely that the problem is that I'm not calling the destructor superclass. 
 UIScrollVertical's destructor.  Will fix in next update.

Original comment by doc.andr...@gmail.com on 12 Jul 2012 at 1:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
is it now fixed ? cause I experiment he same problem I think. (I am using 0.7.6)

Original comment by androido...@googlemail.com on 28 Oct 2012 at 11:06