I think the problem is just that you've made this change recently, and it didn't get properly compiled for some reason. Delete all the files in the bin-debug folder and go to Project>Clean to clean your project.
If that doesn't work, post back with more info.
Already tried that...unfortunately didn't help
Is your logic within a setter of a property marked Bindable?
the dataProvider is bindable, but this is called in a submit method. So it doesn't get called until a MouseEvent is fired from a button on the same View.
for clarification's sake, the validate method is my own method which returns a bool from the nested view/object inside of the list...not one of the Flex core validate properties.
Code inside bindable setters can get skipped in the way you describe--that's why I asked. My suspicion is still on the compiler side, unless this is inside some conditional you didn't mention that's failing to be true.
unfortunately no. The only lines above those I provided earlier are these, in the scope of this function.
private function validateSurvey(event:MouseEvent):void
var isValid:Boolean = true;
/****Code posted earlier***/
just for kicks I did a quick trace on lst_modules.dataGroup and it is def. not null, so I just don't understand why its just blowing right past it, as if there's nothing in the dataGroup. I'm also confused why I can't drill down into the dataGroup when I hit a breakpoint at the beginning of this function...its almost like the dataGroup doesn't exist, despite the fact that I know it does.
1 person found this helpful
Looking more closely at your code, the problem is here:
for each(var qRend:QuestionEditorRenderer in m.lst_questions.dataGroup)
a DataGroup is a View, _not_ a collection, so you can't iterate for it. Be careful trying to access its renderers using getElementAt as well, because when virtualization is on, this can return null, even though the element you are trying to get is < numElements.
Wouldn't it make more sense to just validate the data items, rather than the renderers that are displaying them?
Normally I would agree that it would be easier to just validate the data, but the data is abstracted from the view because the data can, and many times is, results from services. This all started because I need to validate input on some text input fields that are within these nested lists as well as number validation for a few comboBoxes. Unfortunately those are elements that are displayed via the view, which is instantiated within the ItemRenderer for the list.
If you have any better ways of solving this problem, I'm totally open to a fresh perspective. Sometimes it becomes difficult to see the forest through the trees.