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:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Aaron Miller
> *Sent:* Thursday, October 30, 2008 2:27 PM
> *To:* flexcoders@yahoogroups.com
> *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
>
>   
>

Reply via email to