You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2014/07/14 19:07:58 UTC

Function is not ready

I have the following pseudo code:

public function someTypeChange(event:IndexChangeEvent=null):void
{
someArrayCollection.filterFunction = someFilterFunction;
someArrayCollection.refresh();
}
public function someFilterFunction(item:Object):Boolean
{
                         .....
}
I have a component that consists of two elements: TextInput and Combo.
The code above is behind this component. someTypeChange is a listener for
combo change.
When I select a new value in the combo the above code works fine. But if I
call someTypeChange like this from combo:
override public function set data(value:*):void
{
super.value = value;
someTypeChange.call();
}
then I am getting:
Cannot access a property or method of a null object reference. and the
error line is:
someArrayCollection.filterFunction = someFilterFunction;

Any idea?

Thanks

Re: Function is not ready

Posted by mark goldin <ma...@gmail.com>.
My fault, there was another object of a null reference.


On Mon, Jul 14, 2014 at 5:44 PM, Justin Ransom Dallas <
justindallas@gmail.com> wrote:

> Well what was it?!
>
>
> On Mon, Jul 14, 2014 at 1:28 PM, mark goldin <ma...@gmail.com>
> wrote:
>
> > Never mind, I found the problem.
> >
> >
> > On Mon, Jul 14, 2014 at 12:22 PM, mark goldin <ma...@gmail.com>
> > wrote:
> >
> > > Yes, same error.
> > >
> > >
> > > On Mon, Jul 14, 2014 at 12:12 PM, Subscriptions <
> > > subscriptions@leeburrows.com> wrote:
> > >
> > >> do you get same error with someTypeChange() instead of
> > >> someTypeChange.call()
> > >>
> > >>
> > >>
> > >> On 14/07/2014 18:07, mark goldin wrote:
> > >>
> > >>> I have the following pseudo code:
> > >>>
> > >>> public function someTypeChange(event:IndexChangeEvent=null):void
> > >>> {
> > >>> someArrayCollection.filterFunction = someFilterFunction;
> > >>> someArrayCollection.refresh();
> > >>> }
> > >>> public function someFilterFunction(item:Object):Boolean
> > >>> {
> > >>>                           .....
> > >>> }
> > >>> I have a component that consists of two elements: TextInput and
> Combo.
> > >>> The code above is behind this component. someTypeChange is a listener
> > for
> > >>> combo change.
> > >>> When I select a new value in the combo the above code works fine. But
> > if
> > >>> I
> > >>> call someTypeChange like this from combo:
> > >>> override public function set data(value:*):void
> > >>> {
> > >>> super.value = value;
> > >>> someTypeChange.call();
> > >>> }
> > >>> then I am getting:
> > >>> Cannot access a property or method of a null object reference. and
> the
> > >>> error line is:
> > >>> someArrayCollection.filterFunction = someFilterFunction;
> > >>>
> > >>> Any idea?
> > >>>
> > >>> Thanks
> > >>>
> > >>>
> > >> --
> > >> Lee Burrows
> > >> ActionScripter
> > >>
> > >>
> > >
> >
>
>
>
> --
> Justin Dallas
> Phone:814-880-5637
>

Re: Function is not ready

Posted by Justin Ransom Dallas <ju...@gmail.com>.
Well what was it?!


On Mon, Jul 14, 2014 at 1:28 PM, mark goldin <ma...@gmail.com> wrote:

> Never mind, I found the problem.
>
>
> On Mon, Jul 14, 2014 at 12:22 PM, mark goldin <ma...@gmail.com>
> wrote:
>
> > Yes, same error.
> >
> >
> > On Mon, Jul 14, 2014 at 12:12 PM, Subscriptions <
> > subscriptions@leeburrows.com> wrote:
> >
> >> do you get same error with someTypeChange() instead of
> >> someTypeChange.call()
> >>
> >>
> >>
> >> On 14/07/2014 18:07, mark goldin wrote:
> >>
> >>> I have the following pseudo code:
> >>>
> >>> public function someTypeChange(event:IndexChangeEvent=null):void
> >>> {
> >>> someArrayCollection.filterFunction = someFilterFunction;
> >>> someArrayCollection.refresh();
> >>> }
> >>> public function someFilterFunction(item:Object):Boolean
> >>> {
> >>>                           .....
> >>> }
> >>> I have a component that consists of two elements: TextInput and Combo.
> >>> The code above is behind this component. someTypeChange is a listener
> for
> >>> combo change.
> >>> When I select a new value in the combo the above code works fine. But
> if
> >>> I
> >>> call someTypeChange like this from combo:
> >>> override public function set data(value:*):void
> >>> {
> >>> super.value = value;
> >>> someTypeChange.call();
> >>> }
> >>> then I am getting:
> >>> Cannot access a property or method of a null object reference. and the
> >>> error line is:
> >>> someArrayCollection.filterFunction = someFilterFunction;
> >>>
> >>> Any idea?
> >>>
> >>> Thanks
> >>>
> >>>
> >> --
> >> Lee Burrows
> >> ActionScripter
> >>
> >>
> >
>



-- 
Justin Dallas
Phone:814-880-5637

Re: Function is not ready

Posted by mark goldin <ma...@gmail.com>.
Never mind, I found the problem.


On Mon, Jul 14, 2014 at 12:22 PM, mark goldin <ma...@gmail.com> wrote:

> Yes, same error.
>
>
> On Mon, Jul 14, 2014 at 12:12 PM, Subscriptions <
> subscriptions@leeburrows.com> wrote:
>
>> do you get same error with someTypeChange() instead of
>> someTypeChange.call()
>>
>>
>>
>> On 14/07/2014 18:07, mark goldin wrote:
>>
>>> I have the following pseudo code:
>>>
>>> public function someTypeChange(event:IndexChangeEvent=null):void
>>> {
>>> someArrayCollection.filterFunction = someFilterFunction;
>>> someArrayCollection.refresh();
>>> }
>>> public function someFilterFunction(item:Object):Boolean
>>> {
>>>                           .....
>>> }
>>> I have a component that consists of two elements: TextInput and Combo.
>>> The code above is behind this component. someTypeChange is a listener for
>>> combo change.
>>> When I select a new value in the combo the above code works fine. But if
>>> I
>>> call someTypeChange like this from combo:
>>> override public function set data(value:*):void
>>> {
>>> super.value = value;
>>> someTypeChange.call();
>>> }
>>> then I am getting:
>>> Cannot access a property or method of a null object reference. and the
>>> error line is:
>>> someArrayCollection.filterFunction = someFilterFunction;
>>>
>>> Any idea?
>>>
>>> Thanks
>>>
>>>
>> --
>> Lee Burrows
>> ActionScripter
>>
>>
>

Re: Function is not ready

Posted by mark goldin <ma...@gmail.com>.
Yes, same error.


On Mon, Jul 14, 2014 at 12:12 PM, Subscriptions <
subscriptions@leeburrows.com> wrote:

> do you get same error with someTypeChange() instead of
> someTypeChange.call()
>
>
>
> On 14/07/2014 18:07, mark goldin wrote:
>
>> I have the following pseudo code:
>>
>> public function someTypeChange(event:IndexChangeEvent=null):void
>> {
>> someArrayCollection.filterFunction = someFilterFunction;
>> someArrayCollection.refresh();
>> }
>> public function someFilterFunction(item:Object):Boolean
>> {
>>                           .....
>> }
>> I have a component that consists of two elements: TextInput and Combo.
>> The code above is behind this component. someTypeChange is a listener for
>> combo change.
>> When I select a new value in the combo the above code works fine. But if I
>> call someTypeChange like this from combo:
>> override public function set data(value:*):void
>> {
>> super.value = value;
>> someTypeChange.call();
>> }
>> then I am getting:
>> Cannot access a property or method of a null object reference. and the
>> error line is:
>> someArrayCollection.filterFunction = someFilterFunction;
>>
>> Any idea?
>>
>> Thanks
>>
>>
> --
> Lee Burrows
> ActionScripter
>
>

Re: Function is not ready

Posted by Subscriptions <su...@leeburrows.com>.
do you get same error with someTypeChange() instead of someTypeChange.call()


On 14/07/2014 18:07, mark goldin wrote:
> I have the following pseudo code:
>
> public function someTypeChange(event:IndexChangeEvent=null):void
> {
> someArrayCollection.filterFunction = someFilterFunction;
> someArrayCollection.refresh();
> }
> public function someFilterFunction(item:Object):Boolean
> {
>                           .....
> }
> I have a component that consists of two elements: TextInput and Combo.
> The code above is behind this component. someTypeChange is a listener for
> combo change.
> When I select a new value in the combo the above code works fine. But if I
> call someTypeChange like this from combo:
> override public function set data(value:*):void
> {
> super.value = value;
> someTypeChange.call();
> }
> then I am getting:
> Cannot access a property or method of a null object reference. and the
> error line is:
> someArrayCollection.filterFunction = someFilterFunction;
>
> Any idea?
>
> Thanks
>

-- 
Lee Burrows
ActionScripter