2 Replies Latest reply on Apr 20, 2010 11:22 PM by rezashah95

    null check behaviour

    rezashah95

      Hi,

      I have problem when doing null checking against datagrid.provider, also tried using httpservice.lastresult too.

      if(datagrid.provider == null)
      {
           Alert.show("Null data");
      }
      
      

       

      Above codes will display alert window on linux, but not on windows, and the rest of the codes below not executed.

      No visual cue at all.

       

      My development environment:

      - Linux 2.6.33

      - Adobe air runtime 1.5.3

      - Flex 4.0 release version

       

      Windows environment:

      - windows 7

      - Air runtime 1.5.3

       

      Anybody has clue?

       

      Thanks,

      Reza

        • 1. Re: null check behaviour
          joan_lafferty Adobe Employee

          Are you actually trying to check the 'dataProvider' property, rather than 'provider' on a DataGrid?

          • 2. Re: null check behaviour
            rezashah95 Level 1

            Thanks for the answer.

            The problem was different behaviour between windows and linux.

            I'm using httpservice to get data from server, but i listened only to ResultEvent.

            In linux i donot have problem when comparing dataProvider against null.

            In windows my program silently stop working without crash or any additional visual clue.


            After i added FaultEvent handler, everything works properly.

             

            I donot know why in linux if server return error it goes to ResultEvent, but in window it goes to FaultEvent.

             

            Regards,

            Reza