I am not sure if it matters but, I am working with Flex 1.5. I
declared a string and gave it a title specific to the component.
Then attached that String to the new object. However I am still
getting undefined as my title when it creates my popup. Is there
somthing else I am missing?

This is what I have:

public var sTitle : String = "my component specific title";

showText(sTitle:String){
var textDescObj:Object = {title:sTitle};
var t:Object = TitleWindow(PopUpManager.createPopUp(this, textZoom,
false, textDescObj, false));
}


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]>
wrote:
>
> You could pass in the title:
> showText(sTitle:String){
> var textDescObj:Object = {title:sTitle};
> ...
>
> Tracy
>
> -----Original Message-----
> From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of rgwilson26
> Sent: Monday, June 05, 2006 2:34 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Object name referencing within a TitleWindow
>
> I am working on an app where I would like to reuse TitleWindow
popup
> component many times throughout my app. However, depending where
the
> user is in the app, it will change the title on the TitleWindow
> popup. I need to reference the specific initObject name each time
a
> new TitleWindow instance is created and change the title depending
> on what the titlewindow popup is being used for.
>
> So, if my showText method creates a new popup with the initObject
> name of textZoom I need to know how to how to reference it in the
> popup (in an if statement) to change the title.
>
> I think I am on the right track, but any suggestions would be
> appreciated.
>
> Thanks
>
> *****************
>    mainApp.mxml
> *****************
>
> public function showText():Void{
>
>   var textDescObj = new Object();
>   var t:Object = TitleWindow(PopUpManager.createPopUp this,
> textZoomPopup, false, textDescObj, false))
> }
>
>
> *********************
>    TitleWindow.mxml
> *********************
> pseudo code:
>
> If this objects name == textDescObj
> then change my title to "Desired Title"
> else if objects name == someOtherObjName
> then change my title to "Different Title"
>
>
>
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to