18 Replies Latest reply on Sep 23, 2008 7:43 PM by Newsgroup_User

    List increase height automatically?

    gcatcher Level 1
      Ummm... this should be really simple, why is this not working (attached code)

      so I remove verticalScrollPolicy and I get a scroll bar. I add verticalScrollPolicy and I only see the first 6 rows.

      What?!

      How do I do the obvious: How to I make it so the list shows all 9 rows? Do I have to build my own custom control to do this really simple task? I really hope not - if you can't tell this is ridiculously frustrating.
        • 1. List increase height automatically?
          gcatcher Level 1
          ok, here's an example of the problems with list view

          http://cadenwhitaker.t35.com/mxlist/

          notice how the List isn't scaling properly in the red squares (because they are rendered after the fact)?

          Please, someone give me a good solution to this! I can't believe that Flex runs everything off on their own threads and then expects me to somehow gather who the last firing object was just so I can tell all the lists to update their row heights... GAHHH!

          • 2. Re: List increase height automatically?
            Level 7

            "garbagecatcher@hotmail.co" <webforumsuser@macromedia.com> wrote in message
            news:ga66gh$dbv$1@forums.macromedia.com...
            > ok, here's an example of the problems with list view
            >
            > http://cadenwhitaker.t35.com/mxlist/
            >
            > notice how the List isn't scaling properly in the blue squares (because
            > they
            > are rendered after the fact)?
            >
            > Please, someone give me a good solution to this! I can't believe that Flex
            > runs everything off on their own threads and then expects me to somehow
            > gather
            > who the last firing object was just so I can tell all the lists to update
            > their
            > row heights... GAHHH!

            Override the measure() function.

            This is a good primer on what you need to know to write itemRenderers well
            http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html

            http://www.quietlyscheming.com/blog/components/randomwalk-component/ was
            written as a tutorial of how to build components from scratch with best
            practice.

            HTH;

            Amy


            • 3. Re: List increase height automatically?
              gcatcher Level 1
              >Override the measure() function.

              Where? Which component? Override it to do what?

              Thanks for the link but I could really really really use a direct answer to this specific issue. Not an overview on proper procedures. Unless following proper procedures will somehow make this work, I'll still need to override (hack) this to work as you have described.
              • 4. Re: List increase height automatically?
                Level 7

                "garbagecatcher@hotmail.co" <webforumsuser@macromedia.com> wrote in message
                news:ga6cvd$l5h$1@forums.macromedia.com...
                > >Override the measure() function.
                >
                > Where? Which component? Override it to do what?
                >
                > Thanks for the link but I could really really really use a direct answer
                > to
                > this specific issue. Not an overview on proper procedures. Unless
                > following
                > proper procedures will somehow make this work, I'll still need to override
                > (hack) this to work as you have described.

                If you go through the proper procedures in the links I posted, they will
                show you how and where to override measure().


                • 5. Re: List increase height automatically?
                  gcatcher Level 1
                  So... basically your response is "RTFM"

                  You realize there are hundreds of lines of code and several xaml files? I'm just looking for a reduced example of my specific issue. Not a manual, not a best practices. You know what? Fine. I'll dig through these, I guess I have nothing to do for the next few hours.

                  This is a bug. This is a ridiculously stupid bug and I can't believe that we are in version 3 and I have to resort to hours reading long winded documents just to find a cryptic message on how to override a measurement because I want to get a %@#! list to work like it is supposed to.
                  • 6. Re: List increase height automatically?
                    Level 7

                    "garbagecatcher@hotmail.co" <webforumsuser@macromedia.com> wrote in message
                    news:ga6i49$r5j$1@forums.macromedia.com...
                    > So... basically your response is "RTFM"
                    >
                    > You realize there are hundreds of lines of code and several xaml files?
                    > I'm
                    > just looking for a reduced example of my specific issue. Not a manual, not
                    > a
                    > best practices. You know what? Fine. I'll dig through these, I guess I
                    > have
                    > nothing to do for the next few hours.
                    >
                    > This is a bug. This is a ridiculously stupid bug and I can't believe that
                    > we
                    > are in version 3 and I have to resort to hours reading long winded
                    > documents
                    > just to find a cryptic message on how to override a measurement because I
                    > want
                    > to get a %@#! list to work like it is supposed to.

                    You could also do a search in the help for measure()...


                    • 7. Re: List increase height automatically?
                      gcatcher Level 1
                      Ok, so I've been working on this problem and I am nothing but unimpressed at this time.

                      Can someone from Adobe explain why they decided to leave this simple ability out of Flex? Or could they post code exactly how to do this simple procedure?

                      I'm tired of debugging, I'm tired of "hacking" to get this working, I'm tired of the #%@! measure function. I feel like this is so simple (a list) that there should be a document online outlining exactly how to do this. Not some super-detailed example of something I don't need. Something that just covers this, that's it, that's all.

                      So, could someone explain to me what the deal is?

                      Example
                      http://cadenwhitaker.t35.com/mxlist/
                      • 8. Re: List increase height automatically?
                        Level 7

                        "garbagecatcher@hotmail.co" <webforumsuser@macromedia.com> wrote in message
                        news:gb3dha$9jo$1@forums.macromedia.com...
                        > Ok, so I've been working on this problem and I am nothing but unimpressed
                        > at
                        > this time.
                        >
                        > Can someone from Adobe explain why they decided to leave this simple
                        > ability
                        > out of Flex? Or could they post code exactly how to do this simple
                        > procedure?
                        >
                        > I'm tired of debugging, I'm tired of "hacking" to get this working, I'm
                        > tired
                        > of the #%@! measure function. I feel like this is so simple (a list) that
                        > there
                        > should be a document online outlining exactly how to do this. Not some
                        > super-detailed example of something I don't need. Something that just
                        > covers
                        > this, that's it, that's all.

                        Unfortunately, you DO need to understand the entire component lifecycle to
                        understand why your code isn't working. So you're going to need to just dig
                        in and apply whatever time it takes until you _do_ understand it. It's not
                        going to go away because you don't want to look at it.


                        • 9. Re: List increase height automatically?
                          g-s-b Level 1
                          Amy is right of course. I too am new here and she ( and others ) have helped me a lot.
                          But I also understand your frustrations as well so here is one way. As with "skinning a cat" there are many ways to code: some good, some bad and many in-between.

                          • 10. List increase height automatically?
                            gcatcher Level 1
                            Amy, I agree with Greg that you have helped many people on here and I understand that you were trying to help. However your answers were not direct enough to solve my problem.

                            See, I have this link

                            http://cadenwhitaker.t35.com/mxlist/

                            And I want to see someone reference a fix using that example. Or I want to see an answer using an example as basic as my own. I want to see someone talk about this specific issue - not a reference to an entire application and not a reference to the poorly written livedocs.

                            I also want to know why this issue is here, why do I have to make hacks in order to get my example ( http://cadenwhitaker.t35.com/mxlist/) to work.
                            • 11. Re: List increase height automatically?
                              g-s-b Level 1
                              Hummm...

                              Did my solution not work for you?

                              • 12. List increase height automatically?
                                Ansury Level 3
                                He probably overlooked it:

                                <mx:List id="dg"
                                width="200"
                                dataProvider="{a}"
                                rowCount="{a.length}"
                                verticalScrollPolicy="off" />
                                • 13. List increase height automatically?
                                  gcatcher Level 1
                                  hey g-s-b

                                  Thanks fir that actually no I didn't overlook it, that first issue was a minor issue and yeah I implemented something similar (however, thank you for a simple direct reply!). The real issue can be found at the url I posted several times

                                  Here (notice how the red squares are cut-off because they are being drawn after the fact)
                                  http://cadenwhitaker.t35.com/mxlist/
                                  • 14. Re: List increase height automatically?
                                    Level 7

                                    "garbagecatcher@hotmail.co" <webforumsuser@macromedia.com> wrote in message
                                    news:gb9koo$pnb$1@forums.macromedia.com...
                                    > hey g-s-b
                                    >
                                    > Thanks fir that actually no I didn't overlook it, that first issue was a
                                    > minor
                                    > issue and yeah I implemented something similar (however, thank you for a
                                    > simple
                                    > direct reply!). The real issue can be found at the url I posted several
                                    > times
                                    > (which Ansury must have overlooked!)

                                    The issue is, of course, that your problem cannot be solved with a simple,
                                    direct reply unless someone is willing to go through your code and write the
                                    solution for you. For you to solve the problem yourself, you will need to
                                    put your thinking cap on and process the information you've been pointed to.
                                    If you are not willing to do that, your options are:

                                    (1) Give up
                                    (2) Post to the FlexJobs Yahoo group and try to find a consultant to do it.
                                    (3) Hope someone here will donate enough time to rewrite your code for you.


                                    • 15. Re: List increase height automatically?
                                      gcatcher Level 1
                                      You know, I'll admit to being frustrated but I think this is just gotten silly.

                                      Amy, fine, I guess I should have just gone with your suggestion in the first place. Who am I to come back and say "That isn't enough information" or "That isn't helping me" or "Can I have more information"... I should just take what has been given to me. Nothing good ever comes from asking people to try and be more clear.

                                      • 16. Re: List increase height automatically?
                                        g-s-b Level 1
                                        garbagecatcher,

                                        I gave you a direct and simple solution to the problem that you posted. This is most often the case if you read the forum regularly. Answers are to help one help themselves; a common function of "user-to-user discussions" as this forum is. Remember. Responses are the "good will" of individuals not unlike yourself: learning, trying different things and sharing result with others.

                                        I think that you got off on the wrong foot here and should reconsider the attitude that you want to portray in your posts. IMHO

                                        Just a suggestion though.
                                        • 17. Re: List increase height automatically?
                                          Level 7

                                          "garbagecatcher@hotmail.co" <webforumsuser@macromedia.com> wrote in message
                                          news:gbb43n$lfd$1@forums.macromedia.com...
                                          > You know, I'll admit to being frustrated but I think this is just gotten
                                          > silly.
                                          >
                                          > Amy, fine, I guess I should have just gone with your suggestion in the
                                          > first
                                          > place. Who am I to come back and say "That isn't enough information" or
                                          > "That
                                          > isn't helping me" or "Can I have more information"... I should just take
                                          > what
                                          > has been given to me. Nothing good ever comes from asking people to try
                                          > and be
                                          > more clear.

                                          I don't have a better way to articulate what those links I sent you to said
                                          than the people who said it. If there was a specific concept you were
                                          having problems with, I would be happy to answer that.

                                          Hope this clarifies;

                                          Amy


                                          • 18. Re: List increase height automatically?
                                            Level 7

                                            "g-s-b" <webforumsuser@macromedia.com> wrote in message
                                            news:gbc7ff$2n6$1@forums.macromedia.com...
                                            > garbagecatcher,
                                            >
                                            > I gave you a direct and simple solution to the problem that you posted.
                                            > This
                                            > is most often the case if you read the forum regularly. Answers are to
                                            > help
                                            > one help themselves; a common function of "user-to-user discussions" as
                                            > this
                                            > forum is. Remember. Responses are the "good will" of individuals not
                                            > unlike
                                            > yourself: learning, trying different things and sharing result with
                                            > others.
                                            >
                                            > I think that you got off on the wrong foot here and should reconsider the
                                            > attitude that you want to portray in your posts. IMHO

                                            The problem is that his issue is not as simple as your answer. His problem
                                            is caused by the fact that List Based components typically just populate one
                                            itemRenderer with data, measure with that, and lay out all of the components
                                            from it.

                                            I haven't looked at the part of the DataGrid code that deals with
                                            variableRowHeight, but I am pretty sure that it will adjust the size of the
                                            row based on the tallest itemRenderer, as long as the component is reporting
                                            its size correctly at the time that this is measured. What often happens
                                            with custom itemRenderers is that something happens in the renderering
                                            process that affects its overall size, but it will happen at an
                                            inappropriate time and the developer doesn't realize what order the events
                                            are happening. So you really have to understand the component life cycle in
                                            order to fix these types of problems.

                                            I have code out there with lingering problems of this type I just didn't
                                            know how to fix when I wrote it, and I couldn't say for certain if I could
                                            fix it now if I were to go back and revisit it. It's just part of life as a
                                            Flex developer.

                                            HTH;

                                            Amy