Re: [flexcoders] Re: Detect if Object exists

2006-07-21 Thread Ralf Bokelberg
Hi Nick, you could use something like an itemRenderer as the tab and its data property to compare against the selected item of your data grid. Here is a simple example: snip ?xml version=1.0 encoding=utf-8? mx:Application

Re: [flexcoders] Re: Detect if Object exists

2006-07-21 Thread Scotty Scott
Change var selectTab:Container = this.windowTabs.getChildByName(newid);to var selectTab:Container = Container(this.windowTabs.getChildByName(newid));Or var selectTab:Container = this.windowTabs.getChildByName(newid) as Container;Im not sure which syntax is the correct way or what

Re: [flexcoders] Re: Detect if Object exists

2006-07-21 Thread Nick Collins
Hmm... well Scotty, interestingly enough, this train of thought isn't working... for some reason the condition is always returning true, even when no tabs at all have been created... back to the drawing board I guess. On 7/20/06, Scotty Scott [EMAIL PROTECTED] wrote:

Re: [flexcoders] Re: Detect if Object exists

2006-07-21 Thread Scotty Scott
Hey Nick,I used this as a test case its stripped down from what you are doing but maybe it will point you in the right direction.?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=vertical creationComplete=init() mx:Script ![CDATA[ import

Re: [flexcoders] Re: Detect if Object exists

2006-07-21 Thread Nick Collins
if ( selectTab != null )That did it! Woot!!! Thanks man. This thing has been a pain in my butt for the last week.On 7/21/06, Scotty Scott [EMAIL PROTECTED] wrote: Hey Nick,I used this as a test case its stripped down from what you are doing but maybe it

[flexcoders] Re: Detect if Object exists

2006-07-20 Thread fwscott
Hey Nick, You could assign a name to your tab and then use this.windowTabs.getChildByName(newtab.name); Something like private function createTab(createTabName:String):void { var newid:String = 'userTab' + this.masterList.selectedItem.ContribNum; var selectTab:Container =

Re: [flexcoders] Re: Detect if Object exists

2006-07-20 Thread Nick Collins
I tried something very similar to that, but got the following error, as I did this time:1118: Implicit coercion of a value with static type flash.display:DisplayObject to a possibly unrelated type mx.core:Container. On 7/20/06, fwscott [EMAIL PROTECTED] wrote: