Hi Gehan, Thanks for the reply. My requirement is somewhat like this below...
--------------- TestModule.mxml --------------- <?xml version="1.0"?> <mx:Module name="TestModule" xmlns:mx="http://www.adobe.com/2006/ mxml"> <mx:Script> <![CDATA[ public function getModuleName():String { return "TestModule"; } ]]> </mx:Script> <mx:TabNavigator id="testTabNavigator" width="100%" height="100%"> <mx:VBox label="Panel 1"> <mx:Label text="TabNavigator container panel 1"/> </mx:VBox> <mx:VBox label="Panel 2"> <mx:Label text="TabNavigator container panel 2"/> </mx:VBox> <mx:VBox label="Panel 3"> <mx:Label text="TabNavigator container panel 3"/> </mx:VBox> </mx:TabNavigator> </mx:Module> --------------- TestClass.as --------------- package { public class TestClass { public function testing():void { //I want to add one more tab to the module } } } Suppose my module has a TabNavigator, I want to add a tab from TestClass.as. If I do like var yourInstance:TestModule =new TestModule(); /// /// yourInstance.testTabNavigator.addChild(myVbox);//I am not getting the scope of testTabNavigator, this is coming as null. Thanks, Paritosh On Nov 19, 3:48 pm, flexorz group of flex corders <[email protected]> wrote: > just create a instance and call with that instance. > > package > { > import TestModule > public class TestClass > { > public function testing():void > { > var yourInstance:TestModule =new TestModule(); > trace(yourInstance.getModuleName()); > } > } > > } > > regards > > Gehan > > On 11/19/09, Paritosh Bisi <[email protected]> wrote: > > > Hi All, > > > I have a doubt in module. My module has a public method, I want to > > call this method from one as class which is included in the module. > > > --------------- > > TestModule.mxml > > --------------- > > > <?xml version="1.0"?> > > <mx:Module name="TestModule" xmlns:mx="http://www.adobe.com/2006/ > > mxml"> > > > <mx:Script> > > <![CDATA[ > > > public function getModuleName():String { > > return "TestModule"; > > } > > > ]]> > > </mx:Script> > > </mx:Module> > > > --------------- > > TestClass.as - Is included in this module > > --------------- > > > package > > { > > public class TestClass > > { > > public function testing():void > > { > > //I want to call the method getModuleName() from this class > > } > > } > > } > > > Thanks, > > Paritosh > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Flex India Community" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/flex_india?hl=. -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=.

