Chris, On Mon, Aug 23, 2010 at 8:52 AM, Chris H <[email protected]> wrote:
> Tom, > > First, thanks to you and all(Eric, Doug, Bidhu) who responded with useful > advice to my question. > Glad I could help. > > Yes, unit_dp and division_dp were simply pointers to the same, filtered > object. > > I used a clone as you suggested and the application works fine now. > Pretty simple, once somebody explains it and you Google "Flex clone object," right? I learned this exactly the way you did -- stumbling till I found some resource on the Web. > I thought I knew enough Flex to decipher code after I completed the Flex 3 > Bible, but I guess I still have to study Actionscript 3 Bible to know the > subtle differences like when pass by reference and pass by value are done. > The more Flex you do, the more you'll do in Actionscript and the less you'll do in MXML. And yes, two things are vital: a good Actionscript reference and the Flex online docs, which I keep open much of the time I'm working. > Coming from a C/C++ development background it is hard from me to realize > that division_dp = Application.application.division_dp is pass by reference. > Now, I wish I knew Java well which is quite similar to Flex. > The syntax is pretty similar, but I don't know that you could say the behavior is the same. I don't know either well enough to comment. But since things like pass by value/pass by reference are fairly core to whatever language you're working in, but rarely emphasized, they're often something you learn when you run afoul of them. Just keep asking questions, here or on FlexCoders. It's pretty much what we all do. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560
