15 Replies Latest reply on Sep 2, 2011 10:06 AM by Amy Blankenship

    a little more complicated than sharing simple data via a custom event, I think

    Kristin95762 Level 1

      I have a custom component (titleWindow) in which I want to insert an author name and an array of titles by said author.


      I have an event that sends the author name and a SINGLE title back to the main application easily enough because all the sqlstatements are handled in the main app.


      Ideally I would like to be able to enter up to 4 titles for a single author.


      I'm having trouble seeing how I would do this without having an INSERT statement for each instance of a title. And since I'm new to this Flex stuff, I already have a main application FULL of sqlstatements.


      If I could handle all the database functions within the titleWindow, I would really like that. But then I run into the problem of not being able to update the main application with the new author (at least, I've determined that my eventListener will only listen if the addAuthor event is the top level event, which precludes me opening a database connection within my custom component.) The main application has a list of all authors and a button that opens the addAuthor titleWindow component.


      IDK. Like I said, I'm new to this stuff. How would I handle a situation of wanting to add POSSIBLY more than one title to the database? Would that be a 'for each' loop, or is there something more concise?