Re: [flexcoders] Re: Cannot access a property or method of a null object reference at mx.controls::Tree/::buildUpCollectionEvents()

2008-07-02 Thread Josh McDonald
You're right :)

But still no exception, it works fine under HF1 and HF3.

-Josh

On Thu, Jul 3, 2008 at 2:51 AM, Sergey Kovalyov <
[EMAIL PROTECTED]> wrote:

>  May be so. But I want to find relevant workaround. Unfortunately, I have
> no possibility to switch the platform.
>
> On Tue, Jul 1, 2008 at 4:08 PM, valdhor <[EMAIL PROTECTED]> wrote:
>
>>   I don't use Flex 2.0.1 (I use Flex 3).
>>
>> I ran your app in Flex 3 and it works fine - ie. no exception is thrown.
>>
>> Could this be a bug in Flex 2.0.1?
>> .
>>
>>
> 
>



-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: Cannot access a property or method of a null object reference at mx.controls::Tree/::buildUpCollectionEvents()

2008-07-02 Thread Sergey Kovalyov
May be so. But I want to find relevant workaround. Unfortunately, I have no
possibility to switch the platform.

On Tue, Jul 1, 2008 at 4:08 PM, valdhor <[EMAIL PROTECTED]> wrote:

>   I don't use Flex 2.0.1 (I use Flex 3).
>
> I ran your app in Flex 3 and it works fine - ie. no exception is thrown.
>
> Could this be a bug in Flex 2.0.1?
> .
>
> 
>


Re: [flexcoders] Re: Cannot access a property or method of a null object reference at mx.controls::Tree/::buildUpCollectionEvents()

2008-07-02 Thread Sergey Kovalyov
Probably, you have not selected the first item before clicking on a button.
That's why new item has not been added. See this:

var parentXML : XML = XML(tree.selectedItem);
var newItemXML : XML = ;
tree.dataDescriptor.addChildAt(parentXML, newItemXML, parentXML.length());

On Wed, Jul 2, 2008 at 2:50 AM, Josh McDonald <[EMAIL PROTECTED]> wrote:

>   I'm not getting an exception, tried in 2.0.1HF1 and HF3. I'm not getting
> any change on screen though.
>
> On Tue, Jul 1, 2008 at 11:08 PM, valdhor <[EMAIL PROTECTED]> wrote:
>
>> I don't use Flex 2.0.1 (I use Flex 3).
>>
>> I ran your app in Flex 3 and it works fine  - ie. no exception is thrown.
>>
>> Could this be a bug in Flex 2.0.1?
>>
>>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>
> 
>


Re: [flexcoders] Re: Cannot access a property or method of a null object reference at mx.controls::Tree/::buildUpCollectionEvents()

2008-07-01 Thread Josh McDonald
I'm not getting an exception, tried in 2.0.1HF1 and HF3. I'm not getting any
change on screen though.

On Tue, Jul 1, 2008 at 11:08 PM, valdhor <[EMAIL PROTECTED]> wrote:

> I don't use Flex 2.0.1 (I use Flex 3).
>
> I ran your app in Flex 3 and it works fine  - ie. no exception is thrown.
>
> Could this be a bug in Flex 2.0.1?
>
>
-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Re: Cannot access a property or method of a null object reference at mx.controls::Tree/::buildUpCollectionEvents()

2008-07-01 Thread valdhor
I don't use Flex 2.0.1 (I use Flex 3).

I ran your app in Flex 3 and it works fine  - ie. no exception is thrown.

Could this be a bug in Flex 2.0.1?


--- In flexcoders@yahoogroups.com, "Sergey Kovalyov"
<[EMAIL PROTECTED]> wrote:
>
> Hi All!
> 
> When I add a new item to the tree node and then open this item by
user input
> null pointer exceptions is thrown and after that Tree behavior becomes
> strange.
> 
> Steps to reproduce:
> 
> 1. Run application.
> 2. Select My Branch node.
> 3. Click Add button. As a result My Leaf subnode is created as a
child of My
> Branch.
> 4. Click My Leaf disclosure icon to expland this item.
> 5. Exception mentioned above is thrown.
> 
>  I compile this example in Flex 2.01 and run in Flash Player 9.0.47.0.
> 
> We have found workaround. The bug can be "fixed" by setting Tree
> openDuration style to 0. But I dislike workarounds. Are there any real
> solutions to fix this bug?
> 
> Sergey.
> 
> 
> 
> 
> http://www.adobe.com/2006/mxml";
> 
> layout="vertical">
> 
> 
> 
> 
> 
> 
> 
>  
> labelField="@label"
> 
> showRoot="false"
> 
> dataProvider="{itemsXMLListCollection}" />
> 
> 
> 
> 
>




Re: [flexcoders] Re: Cannot access a property or method of a null object reference?

2008-06-09 Thread Michael Schmalle
Is the gateway property defined?

Other than that... from the code you have shown, I don't have a clue. ;-)

Mike

On Mon, Jun 9, 2008 at 9:39 AM, xaero <[EMAIL PROTECTED]> wrote:

>   I add an Alert.show, and delete the CALL function, like this:
>
>
> var atClass:Object = new Object();
> atClass.atcls = ComboBox(event.target).selectedItem.data;
> Alert.show(atClass["atcls"],"ALERT");
> //gateway.call("cys.getStudents", new Responder(onResult, onFault),
> atClass); //line 51
>
> It can show the data of the item I selected!
>
> --- In flexcoders@yahoogroups.com , "Michael
> Schmalle"
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > From the look if it
> >
> > ;ComboBox(event.target).selectedItem
> >
> > seems to be where the null pointer is. Make sure you actually have a
> > selectedItem in the list.
> >
> > I have actually done this myself when testing and actually forgot to
> > 'select' an item before a service call.
> >
> > Mike
> >
>
>  
>



-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: Cannot access a property or method of a null object reference?

2008-06-09 Thread xaero
I add an Alert.show, and delete the CALL function, like this:

var atClass:Object = new Object();
atClass.atcls = ComboBox(event.target).selectedItem.data;
Alert.show(atClass["atcls"],"ALERT");
//gateway.call("cys.getStudents", new Responder(onResult, onFault),
atClass); //line 51

It can show the data of the item I selected!

--- In flexcoders@yahoogroups.com, "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> From the look if it
> 
> ;ComboBox(event.target).selectedItem
> 
> seems to be where the null pointer is. Make sure you actually have a
> selectedItem in the list.
> 
> I have actually done this myself when testing and actually forgot to
> 'select' an item before a service call.
> 
> Mike
> 




[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-20 Thread Nate Pearson
Thank you Steve!

--- In flexcoders@yahoogroups.com, "Steve Cox" <[EMAIL PROTECTED]> wrote:
>
> If (dataProvider[i].hasOwnProperty("someValue") &&
> dataProvider[i].someValue != null)
> {
>  
> }
>  
> HTH
> Steve
>  
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Nate Pearson
> Sent: 17 February 2007 00:48
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Cannot access a property or method of a null
> object reference
>  
> Does anyone know? This would help me immensely. 
> 
> --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
> ups.com, "napearson99"  wrote:
> >
> > What if the property.someValue does not exist? How do I check if the
> > reference to dataprovider[i].someValue property is null?
> > 
> > my dataprovider is an arraycollection and holds different objects. 
> > Some objects have .someValue property and some do not. When i try to
> > step through it it doesn't like it when it expects a property but it
> > is not there.
> > 
> > "ReferenceError: Error #1069: Property Desc not found on
> > DragDrop_inlineComponent1 and there is no default value."
> > 
> > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
> ups.com, "Paul DeCoursey"  wrote:
> > >
> > > if (dataprovider[i].someValue == null){
> > > ...
> > > }
> > > 
> > > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
> ups.com, "napearson99"  wrote:
> > > >
> > > > I often get this error and I "usually" know why. Does anyone
> know how
> > > > to check for a null reference?
> > > > 
> > > > i.e.
> > > > 
> > > > if (dataprovider[i].someValue is null){
> > > > dothis();
> > > > }
> > > > 
> > > > Where dataprovider[i] does not have a someValue property. I bet
> this
> > > > is pretty simple and I just don't know the syntax. Thanks in
> advance!
> > > >
> > >
> >
>




RE: [flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-19 Thread Steve Cox
If (dataProvider[i].hasOwnProperty("someValue") &&
dataProvider[i].someValue != null)
{
 
}
 
HTH
Steve
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: 17 February 2007 00:48
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cannot access a property or method of a null
object reference
 
Does anyone know? This would help me immensely. 

--- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
ups.com, "napearson99" <[EMAIL PROTECTED]> wrote:
>
> What if the property.someValue does not exist? How do I check if the
> reference to dataprovider[i].someValue property is null?
> 
> my dataprovider is an arraycollection and holds different objects. 
> Some objects have .someValue property and some do not. When i try to
> step through it it doesn't like it when it expects a property but it
> is not there.
> 
> "ReferenceError: Error #1069: Property Desc not found on
> DragDrop_inlineComponent1 and there is no default value."
> 
> --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
ups.com, "Paul DeCoursey"  wrote:
> >
> > if (dataprovider[i].someValue == null){
> > ...
> > }
> > 
> > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
ups.com, "napearson99"  wrote:
> > >
> > > I often get this error and I "usually" know why. Does anyone
know how
> > > to check for a null reference?
> > > 
> > > i.e.
> > > 
> > > if (dataprovider[i].someValue is null){
> > > dothis();
> > > }
> > > 
> > > Where dataprovider[i] does not have a someValue property. I bet
this
> > > is pretty simple and I just don't know the syntax. Thanks in
advance!
> > >
> >
>
 


RE: [flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread Gordon Smith
> Some objects have .someValue property and some do not. 
 
It sounds like the objects in your dataProvider are instances of various
non-dynamic classes, where some of the classes declare a someValue
property and others don't. 
 
Is this correct? If so, you don't ant to write code like
 
   if (dataProvider[i].someValue == null)
 
because you get a ReferenceError if you access a nonexistend property of
a non-dynamic class. You should only write this if your dataProvider
objects are dynamic.
 
Instead, try
 
   if (dataProvider[i].hasOwnProperty("someValue"))
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Friday, February 16, 2007 4:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cannot access a property or method of a null
object reference



Does anyone know? This would help me immensely. 

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "napearson99" <[EMAIL PROTECTED]> wrote:
>
> What if the property.someValue does not exist? How do I check if the
> reference to dataprovider[i].someValue property is null?
> 
> my dataprovider is an arraycollection and holds different objects. 
> Some objects have .someValue property and some do not. When i try to
> step through it it doesn't like it when it expects a property but it
> is not there.
> 
> "ReferenceError: Error #1069: Property Desc not found on
> DragDrop_inlineComponent1 and there is no default value."
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "Paul DeCoursey"  wrote:
> >
> > if (dataprovider[i].someValue == null){
> > ...
> > }
> > 
> > --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "napearson99" 
wrote:
> > >
> > > I often get this error and I "usually" know why. Does anyone
know how
> > > to check for a null reference?
> > > 
> > > i.e.
> > > 
> > > if (dataprovider[i].someValue is null){
> > > dothis();
> > > }
> > > 
> > > Where dataprovider[i] does not have a someValue property. I bet
this
> > > is pretty simple and I just don't know the syntax. Thanks in
advance!
> > >
> >
>



 


[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread Nate Pearson
Does anyone know?  This would help me immensely.  

--- In flexcoders@yahoogroups.com, "napearson99" <[EMAIL PROTECTED]> wrote:
>
> What if the property.someValue does not exist?  How do I check if the
> reference to dataprovider[i].someValue property is null?
> 
> my dataprovider is an arraycollection and holds different objects. 
> Some objects have .someValue property and some do not.  When i try to
> step through it it doesn't like it when it expects a property but it
> is not there.
> 
> "ReferenceError: Error #1069: Property Desc not found on
> DragDrop_inlineComponent1 and there is no default value."
> 
> --- In flexcoders@yahoogroups.com, "Paul DeCoursey"  wrote:
> >
> > if (dataprovider[i].someValue == null){
> > ...
> > }
> > 
> > --- In flexcoders@yahoogroups.com, "napearson99"  wrote:
> > >
> > > I often get this error and I "usually" know why.  Does anyone
know how
> > > to check for a null reference?
> > > 
> > > i.e.
> > > 
> > > if (dataprovider[i].someValue is null){
> > >  dothis();
> > > }
> > > 
> > > Where dataprovider[i] does not have a someValue property.  I bet
this
> > > is pretty simple and I just don't know the syntax.  Thanks in
advance!
> > >
> >
>




[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread napearson99
What if the property.someValue does not exist?  How do I check if the
reference to dataprovider[i].someValue property is null?

my dataprovider is an arraycollection and holds different objects. 
Some objects have .someValue property and some do not.  When i try to
step through it it doesn't like it when it expects a property but it
is not there.

"ReferenceError: Error #1069: Property Desc not found on
DragDrop_inlineComponent1 and there is no default value."

--- In flexcoders@yahoogroups.com, "Paul DeCoursey" <[EMAIL PROTECTED]> wrote:
>
> if (dataprovider[i].someValue == null){
> ...
> }
> 
> --- In flexcoders@yahoogroups.com, "napearson99"  wrote:
> >
> > I often get this error and I "usually" know why.  Does anyone know how
> > to check for a null reference?
> > 
> > i.e.
> > 
> > if (dataprovider[i].someValue is null){
> >  dothis();
> > }
> > 
> > Where dataprovider[i] does not have a someValue property.  I bet this
> > is pretty simple and I just don't know the syntax.  Thanks in advance!
> >
>




[flexcoders] Re: Cannot access a property or method of a null object reference

2007-02-16 Thread Paul DeCoursey
if (dataprovider[i].someValue == null){
...
}

--- In flexcoders@yahoogroups.com, "napearson99" <[EMAIL PROTECTED]> wrote:
>
> I often get this error and I "usually" know why.  Does anyone know how
> to check for a null reference?
> 
> i.e.
> 
> if (dataprovider[i].someValue is null){
>  dothis();
> }
> 
> Where dataprovider[i] does not have a someValue property.  I bet this
> is pretty simple and I just don't know the syntax.  Thanks in advance!
>




[flexcoders] Re: Cannot access a property or method of a null object reference

2007-01-25 Thread Roger Ross
THANK YOU..
its always nice to have another pair of eyes when dealing with this
syntax!!!

My current dev. tool is nothing like this...

Roger



--- In flexcoders@yahoogroups.com, Doug McCune <[EMAIL PROTECTED]> wrote:
>
> Is catalog misspelled?
> 
> categories = event.result.catelog.category;
> 
> If there's no catelog child of the XML root, then trying to access a 
> child of that node will probably throw the error.
> 
> Doug
> 
> Roger Ross wrote:
> >
> > Hello,
> >
> > Working my way throught the "Training From the Source" turorial and
> > ran into this error message.
> >
> > Not sure why I am getting it. I compared my code to the completed code
> > for the lesson and it looks the same with no problems when I
compile it.
> >
> > TypeError: Error #1009: Cannot access a property or method of a null
> > object reference.
> > at Dashboard/::catHandler()
> > at Dashboard/__catRPC_result()
> > at
> >
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
> > at flash.events::EventDispatcher/dispatchEvent()
> > at
> >
mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent

> > ()
> > at
> >
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler

> > ()
> > at mx.rpc::Responder/result()
> > at mx.rpc::AsyncRequest/acknowledge()
> > at ::DirectHTTPMessageResponder/completeHandler()
> > at
> >
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
> > at flash.events::EventDispatcher/dispatchEvent()
> > at flash.net::URLLoader/flash.net:URLLoader::onComplete()
> >
> > Here is a copy of the code that it has me write with the comboBox that
> > is to receive the data:
> >
> >
> > 
> > http://www.adobe.com/2006/mxml 
> > "
> > layout="horizontal"
> > creationComplete="catRPC.send()">
> >
> > 
> > 
> > 
> >
> >  > url="http://www.flexgrocer.com/category.xml 
> > "
> > result="catHandler(event)"/>
> >
> >  > dataProvider="{categories}"
> > labelField="name"/>
> >
> > Any Idea's...
> >
> > Thanks,
> >
> > Roger
> >
> >
>