I am working on a multiple choice question type and am looking for some direction. The question portion is working fine. But how should I store the answers, which also contain complex data?

I am considering the following:

1) Create an array property 'answers' of the question type. Then fourQ takes over and creates the table for me. It also takes care of data retrieval. B/c I need to store structured data, I packed it all into a structure, and WDDXed it. I also had to increase the size of the data column in the db (varchar(255) -> varchar(3000)) in order to allow for the XML. This approach worked, until I started getting problems with the JavaScript tree not rendering my nodes as soon as they had an answer assigned to them.


2) Create two seperate data types (question, answer), and manually link them together when the question's 'edit' template is submitted. This would require creating answers manually (e.g. createobject("component","#application.packagepath#.types.e11Answer"); ) upon submission, as well as deleting them. Assumeably, I can inherit the setData/delete methods. This seems to be the stronger of the approaches, but also entails significantly more effort. Before I go down this road, I want to ensure that these is nothing I have not taken into consideration.


---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to