escoz / QuickDialog

QuickDialog - Quick and easy dialog screens for iOS
http://escoz.com/open-source/quickdialog
Other
3.07k stars 637 forks source link

why does QSelectSection inherit from QDynamicDataSection? #655

Open ehuynh opened 10 years ago

ehuynh commented 10 years ago

I don't see why this is necessary for QSelectSection. The behaviour it adds to QSelectSection is undesirable when using bindings. E.g. When I bind an array of items to the QSelectSection, I would expect it to 'select' the 'items' that are in the QSelectSection. Instead, the QDynamicDataSection behaviour removes all the elements before starting the bind process. Am I missing something here?

escoz commented 10 years ago

It's that way so that the items in the selection list themselves can be dynamic, and loaded via binding from domain objects.

ehuynh commented 10 years ago

What if the you wanted to bind the selected items to a domain object, not the content of the list itself?— Sent from Mailbox for iPad

On Wed, Mar 19, 2014 at 3:42 AM, Eduardo Scoz notifications@github.com wrote:

It's that way so that the items in the selection list themselves can be dynamic, and loaded via binding from domain objects.

Reply to this email directly or view it on GitHub: https://github.com/escoz/QuickDialog/issues/655#issuecomment-37955995

ehuynh commented 10 years ago

When you bind to other elements you are getting the input from the form, whereas the binding in this case provides the content to the form. Just seems like its the other way around for the QSelectSection element.

escoz commented 10 years ago

There are two different properties in the element: items and selectedItems, you can bind against either one of them, or none.

On Tue, Mar 18, 2014 at 4:37 PM, Edward Huynh notifications@github.comwrote:

When you bind to other elements you are getting the input from the form, whereas the binding in this case provides the content to the form. Just seems like its the other way around for the QSelectSection element.

Reply to this email directly or view it on GitHubhttps://github.com/escoz/QuickDialog/issues/655#issuecomment-38002478 .

ehuynh commented 10 years ago

It seems no matter what you bind against, in QDynamicDataSection, it removes all child elements (e.g. QSelectItemElement) in the bindToObject:withString method