If your method gets invoked by a binding, the binding code will swallow most errors so you never see them. It's rather annoying when you're losing an error, but without it binding would be pretty much useless. Some sort of "BindingUtils.logThrownErrors = true" feature would be nice :)
-Josh On Fri, Oct 31, 2008 at 8:12 AM, Aaron Miller < [EMAIL PROTECTED]> wrote: > Nope, I'm running the debugger. Application continues just fine, there's > just a gap in the code that disappears for a bit. > > > On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith <[EMAIL PROTECTED]> wrote: > >> My guess is that getNewElementInstance() threw an error and you're not >> running in a debugger. >> >> >> >> Gordon Smith >> >> Adobe Flex SDK Team >> >> >> >> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On >> Behalf Of *Aaron Miller >> *Sent:* Thursday, October 30, 2008 2:27 PM >> *To:* [email protected] >> *Subject:* [flexcoders] code going into a black whole >> >> >> >> Hello, I have some strange behavior I'm trying to figure out. It seems >> like my code just stops working in mid-loop without giving any errors. >> >> >> >> >> >> ================== >> >> public function set pageModel( value:PageModel ): void { >> >> trace('PageCanvas.pageModel = '+value); >> >> if( _pageModel != value ) { >> >> _pageModel = value; >> >> >> >> this.width = _pageModel.width; >> >> this.height = _pageModel.height; >> >> >> >> this.removeAllChildren(); >> >> >> >> for each( var elementModel:IPageElementModel in >> _pageModel.elements ) { >> >> trace('This happens!'); >> >> var newElement:IElementControl = >> _docManager.getNewElementInstance(elementModel); >> >> >> >> trace('But this does not!'); >> >> >> >> this.addChild( >> DisplayObject(newElement) ); >> >> } >> >> >> >> trace('End of the line.'); >> >> } >> >> >> >> } >> >> ================== >> >> >> >> trace output: >> >> ================== >> >> PageCanvas.pageModel = [object PageModel] >> >> This happens! >> >> DocManager.getNewElementInstance >> >> ================== >> >> >> >> So it seams that everything stops after the call to getNewElementInstance. >> >> >> >> Is it because I'm doing all this stuff in a setter? If this is the case, >> what would be the appropriate way to recreate all the children when the >> underlying data model changes? >> >> >> >> >> >> Thanks for any input! >> >> ~Aaron >> >> > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/

