5 Replies Latest reply on Jun 22, 2011 8:15 AM by pauland

    Three questions

    Jerry62712 Level 1
      1. While looking at “Problems” in a new application being finalized, I’m limited to only the first 100 warnings.  How do I see the second 100?  There are about 800 in this new system and I’d like to eliminate a lot of them.
      2. I get this warning in response to this code:

        PopUpManager.addPopUp(notifyPopup,Application.application.parentDocument);

        608: 'application' has been deprecated since 4.0. Please use 'FlexGlobals.topLevelApplication'.

      3. In the following code, "doc" is used in a prior case statement.  The error is "duplicate variable".  The question is the code needed?

              public function result(data:Object):void

       

              {

       

                  var list:ArrayCollection = data.result as ArrayCollection;

       

                  if (_model.defaultSearch != true) //new 17 March

       

                      SearchLogic.displayResultMessage(list,type);

       

                  _model.defaultSearch = false; //new 17 March

       

                  if (!list)


                      return;

       

                  switch (type)
                  {
      ...
                      case Const.CUSTOMER_DOCUMENT_SEARCH:
                          _model.dpCustomerDocumentList = list;

       

                          for each(var doc:DocumentVO in _model.dpCustomerDocumentList)
                          {
                              for each(var item:SupportTableVO in _model.dpDocumentType)
                              {
                                  if (doc.docTypeCd == item.supportTableCode)
                                      doc.docTypeDesc = item.shortDescription;
                              }

       

                              for each(var src:SupportTableVO in _model.dpDocumentSource)
                              {
                                  if (doc.docSrcTypeCd == src.supportTableCode)
                                      doc.docSrcDesc = src.shortDescription;
                              }
                          }
                          _model.applicationStatus = Const.CUSTOMER_DOCUMENT_LIST_RETRIEVED;
                          break;

      ...

                      case Const.ADMIN_USER_SEARCH:

       

                          _model.dpAdminUserSearchList = list;

       

                          _model.applicationStatus = Const.ADMIN_USER_SEARCH_RETRIEVED;

       

                          break;

       

                  }

       

              }

       

       

      The end of the switch follows, so what is the point of "doc?"
        • 1. Re: Three questions
          pauland Level 4

          Jerry62712 wrote:

           

          1. While looking at “Problems” in a new application being finalized, I’m limited to only the first 100 warnings.  How do I see the second 100?  There are about 800 in this new system and I’d like to eliminate a lot of them.

           

          Forget about the second hundred, deal with the first 100!

           

          1. I get this warning in response to this code:

            PopUpManager.addPopUp(notifyPopup,Application.application.parentDocume nt);

            608: 'application' has been deprecated since 4.0. Please use 'FlexGlobals.topLevelApplication'.

           

          The warning is pretty explicit about what you need to do. Take a look at the Docs.

           

          1. In the following code, "doc" is used in a prior case statement.  The error is "duplicate variable".  The question is the code needed?

                  public function result(data:Object):void

           

                  {

           

                      var list:ArrayCollection = data.result as ArrayCollection;

           

                      if (_model.defaultSearch != true) //new 17 March

           

                          SearchLogic.displayResultMessage(list,type);

           

                      _model.defaultSearch = false; //new 17 March

           

                      if (!list)


                          return;

           

                      switch (type)
                      {
          ...
                          case Const.CUSTOMER_DOCUMENT_SEARCH:
                              _model.dpCustomerDocumentList = list;

           

                              for each(var doc:DocumentVO in _model.dpCustomerDocumentList)
                              {
                                  for each(var item:SupportTableVO in _model.dpDocumentType)
                                  {
                                      if (doc.docTypeCd == item.supportTableCode)
                                          doc.docTypeDesc = item.shortDescription;
                                  }

           

                                  for each(var src:SupportTableVO in _model.dpDocumentSource)
                                  {
                                      if (doc.docSrcTypeCd == src.supportTableCode)
                                          doc.docSrcDesc = src.shortDescription;
                                  }
                              }
                              _model.applicationStatus = Const.CUSTOMER_DOCUMENT_LIST_RETRIEVED;
                              break;

          ...

                          case Const.ADMIN_USER_SEARCH:

           

                              _model.dpAdminUserSearchList = list;

           

                              _model.applicationStatus = Const.ADMIN_USER_SEARCH_RETRIEVED;

           

                              break;

           

                      }

           

                  }

           

           

          The end of the switch follows, so what is the point of "doc?"

           

          doc is a variable and it's been declared twice - hence the warning. Considering the questions, I'm not sure you should be looking after a complex system.

          • 2. Re: Three questions
            Jerry62712 Level 1

            I see you have made about 400 responses.  Were that all as useless as the one you sent to me?

             

            Q1.  how to moving in "Problems"

            A1.  Don't move in Problems

             

            Q2. "Application" v. "FlexGlobals"

            A2. read the manual

             

            Q3. variable that doesn't seem to be used anywhere else

            A3. You don't seem to know much, quit.

             

            Very unhelpful in the extreme.  Three questions and not a single answer if you exclude snide wastes of bandwidth.  Why did you bother to not answer at all?  Just an ego trip for you?  You have to put others down to try to create some worth for yourself?

             

            Could you explain what your purpose in being here is?  People ask questions because they don't know the answer.  They are not looking for a snippy jerk answer.  Is that all you have to offer?

            • 3. Re: Three questions
              pauland Level 4

              Jerry62712 wrote:

               

              I see you have made about 400 responses.  Were that all as useless as the one you sent to me?

               

              Q1.  how to moving in "Problems"

              A1.  Don't move in Problems


               

              If you have 100 warnings, fixing ten warnings may remove thirty others. Nobody will try and fix all those problems in one go because often one problem may cause another. My advice was good.

               

              Q2. "Application" v. "FlexGlobals"

              A2. read the manual

              It doesn't help to just dole out answers to people who really don't quite understand what is going on. The deprecation is about doing things in a slightly differrent way. If you took the time to read the help you wouldn't need to have to ask the question, or you might ask a differrent question. You need to spend time on the documentation.

               

               

              Q3. variable that doesn't seem to be used anywhere else

              A3. You don't seem to know much, quit.

              The doc variable is used elsewhere, otherwise the compiler wouldn't be warning you that it's been redeclared. Your question, particularly regarding the redeclaration of the variable, is very basic stuff and looking at the code snippet you provided, I think you have a tough job to be handling the complexity of the application. Don't quit, but this doesn't look like a beginner project.

               

              [edit: If "doc" wasn't necessary, I guess the original programmer wouldn't be using it. Doc is being used to point at a document from a list ]

               

              Very unhelpful in the extreme.  Three questions and not a single answer if you exclude snide wastes of bandwidth.  Why did you bother to not answer at all?  Just an ego trip for you?  You have to put others down to try to create some worth for yourself?

               

              Could you explain what your purpose in being here is?  People ask questions because they don't know the answer.  They are not looking for a snippy jerk answer.  Is that all you have to offer?

              My response may not be what you wanted or expected, but it was helpful. Being angry at me doesn't take you any closer to sorting out your Flex issues.

              • 4. Re: Three questions
                Jerry62712 Level 1

                One problem is when you assume.  For example, you assume when someone asks how to navigate in the Problems window that they don't want to naviage in the Problems window.  Any answer that doens't involve how to move isn't really an answer is it.  It may be helpful advice or may not, but it's not an answer.

                 

                While one fix may remove several others, that is a non sequitur.  It was a simple question and neither you nor I new the answer.

                 

                A second case in point is the question on "application" v. "FlexGlobal".  You made another of your assumptions that wasn't based on any facts at all.  I had googled the question and checked about 6 of the responses, including some threads here.  Of the possible solutions offered by them and the 100% non solution offered by you, none removed the warning.  Thus the question to those that know more than I do and apparently than you do as you didn't know either.

                 

                Trying to sound like a maven when you obviously don't have the answer only prevents solutions and ties up bandwidth.  While it is fun to pretend to be a guru, when you are not it is kind of pathetic.

                 

                The third question also shows you were not paying attention to the details.  The warning was that it was used multiple times.  It has nothing to do with any other warning about it not being used at all.  It's not really all that subtile a distinction.

                 

                I"m not particularly angry at you.  I've been doing this stuff for probably longer than you've been alive.  I am faily new to Flex (and LC for that matter) and I do have questions.  I"m spending this much time in the hope that you will see that you could spend your time better being helpful rather than snide.  Back when I taught data processing at the college I'd see the occasional student who thought he was being helpful, but was more of the problem than the solution.  For that matter, when I was a technical editor for Osborne-McGraw/Hill I'll bet the author wasn't happy when I had to correct his work.  But I always showed him what they had wrong with specifics on how to fix it.

                 

                Don't assume that someone that asks questions is always a newbie to the field.

                • 5. Re: Three questions
                  pauland Level 4

                  Thanks for that Jerry. I'm sure you feel better now.