Home > Newsletter, Blog, and Other Topics > Topic

Question regarding Effortless Flex 4 Development

Posted by Ichonas 
This forum is now read only. You can not log in or make any changes. Please use the new forum linked above.
As of March 14, 2011, this forum has been replaced and is permanently set to read-only mode. This means you can view any existing post but cannot open new posts or reply to existing ones. The new forum is located athttp://www.larryullman.com/forums/If you need to post a message, you'll need to register there. If you have to post in order to follow up on a thread started here, well, that's going to be a bit of a pain. I would recommend just posting the appropriate information, or copying the original text from here, or linking to your thread here. I apologize for the inconvenience but this purge will make for better forums in the long run. Thanks.
Question regarding Effortless Flex 4 Development
August 24, 2010 11:25PM
I have been reading, and following along, Effortless Flex 4 Development. I am currently working through chapter 9, Data Management in Flash Builder.
I am on page 319 and am in the process of testing the application. I am having some trouble with the checkbox used in the datagrid. When I start the application, if I select any row that has an unchecked checkbox and check it, and click on commit, the data gets updated in the database. It works perfectly. I then uncheck a checkbox and click commit. It will never commit that change to the database. I get the feeling that somewhere along the line, the checkbox control isn't updating the data, held in memory, to be committed.

Any help would be greatly appreciated.
Re: Question regarding Effortless Flex 4 Development
August 30, 2010 02:08PM
Sorry for the delay. My computer broke last week and I'm getting setup again. Could you confirm your setup? OS? PHP version? MySQL version? Also, what debugging steps you've taken and what the results were.

Best Wishes,
Larry

Writer/Web Developer/Instructor
Forum Moderator
Re: Question regarding Effortless Flex 4 Development
August 30, 2010 02:35PM
Sorry for your computer mishap.
I am running Windows 7, xampplite with Apache 2.2.14, PHP 5.3.1, and MySQL 5.1.41, Zend Framework 1.10.7., Dreamweaver CS5 and Flash Builder 4 Standard.
While trying to see what is actually being passed to the service, I added a text field to my table and have the service store the values being passed as well at the actual MySQL query statement. Two of the fields that are being passed are boolean and on the client side, they are represented by checkboxes. When they are passed from the service to the client, they are represented just fine. When changes are made and they are passed back, for update, only one of them seem to make it back to the service.
I am currently doing some other testing to see where those values are lost.
Any direction you might be able to give me would be greatly appreciated.
Re: Question regarding Effortless Flex 4 Development
September 02, 2010 04:48PM
If you have computers, you have problems! Just discovered last night email wasn't being sent out. Ugh!

Your debugging approaches are excellent and these things are tough to debug. Is your PHP and Flex code exactly like mine in the book and in the downloads?

You say that only one of the changes gets passed back to the service. Is it consistent which one? Like always the first or always the second or always a specific one? And how do you know this to be the case?

Best Wishes,
Larry

Writer/Web Developer/Instructor
Forum Moderator
Re: Question regarding Effortless Flex 4 Development
September 03, 2010 08:33PM
I'm sorry, if I didn't make myself clear. It passes all of the changes except for the boolean value. This is both with me typing the code, from the book, and using the downloaded code from your site.
It is just the boolean value that will not update, and from the debug data, it appears that the boolean value is not being sent. If it comes from that database as false, and I update it to true, via the form, it will update. If it comes from the database as true and I update it to false, it doesn't pass the value.

I think I just confused myself. Basically, I start that database with a boolean field that is false. I then pass that false to the datagrid, as a checkbox, using a custom renderer. The box shows as unchecked. I edit that row and change the checkbox to checked. I commit the change and the value doesn't get sent back to the database. It isn't sending any value for that field. It just seems to be the boolean field values.
Re: Question regarding Effortless Flex 4 Development
September 11, 2010 12:52AM
Hey Ichonas,

So sorry for dropping the ball on this one. I'm still getting up to speed on my new computer (just installed Flash Builder) while simultaneously trying to finish the book I'm doing. Ugh. Apologies again.

So before I cue this up and finally get you an answer, could you confirm your last statement? You "commit the change and the value doesn't get sent back to the database. It isn't sending any value for that field. It just seems to be the boolean field values." You're saying it just seems to be having problems not sending Boolean field values?

And have you confirmed that the request is being made of the PHP script and the request isn't including these or is the request not being made at all?

Best Wishes,
Larry

Writer/Web Developer/Instructor
Forum Moderator