Adobe Dreamweaver Forums



Last 10 THreads :         CreateODBCDate and cfqueryparam with cf_sql_date (Last Post : hannibalcanibal - Replies : 0 - Views : 1 )           »          Load bmp images in a flex app (Last Post : eholz1 - Replies : 0 - Views : 1 )           »          Problem with "Title" and DW CS4 (Last Post : Murray *ACE* - Replies : 1 - Views : 2 )           »          Snippet Pod Problems (Last Post : Pat@ffic - Replies : 2 - Views : 3 )           »          DDX generated PDF Table of Contents issue (Last Post : Flashm@n - Replies : 0 - Views : 1 )           »          Array of Queries (Last Post : ptrott - Replies : 3 - Views : 4 )           »          image alignment (Last Post : alexander glomba - Replies : 0 - Views : 1 )           »          Importing Iweb to Dreamweaver (Last Post : tllearner - Replies : 2 - Views : 3 )           »          How to I get an FLV Skin to display on external sites? (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Spry menu bar with a different image for each item? (Last Post : bongalook - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-05-2008, 03:14 AM
wallanceM
 
Posts: n/a
Diggs:
Default How do I set the variable of a custom component

I have a custom component based on the TitleWindow component and I have
declared a bindable public variable in that custom component's script tag. In
my app If the user clicks a button, flash will open the title window using the
PopUpManager. After it is opened, I want to pass in some data. I have tried
doing this a number of different ways, but have failed. Can someone help me?
Thank you in advance!



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-05-2008, 03:43 AM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: How do I set the variable of a custom component

import mx.core.Application;

titleWindowClickHandler(event:MouseEvent):void{
titleWindowVar = Application.application.mainAppVar;
}

Reply With Quote
  #3 (permalink)  
Old 11-05-2008, 03:54 AM
wallanceM
 
Posts: n/a
Diggs:
Default Re: How do I set the variable of a custom component

Thank you for responding. I don't quite get the third line of your code. This
is the function where I call the PopUp:

public function editQuote():void {
//Fill in fields of SingleRecordDetail component
//currentStudent = quoteGrid.selectedItem;
//Open the Quote_SingleRecord pop up
var editQuoteWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this,
quoteSingleRecordDetail, true));
PopUpManager.centerPopUp(editQuoteWindow);
//Set the value of the bindable variable that will determine the title of the
Quote_SingleRecordDetail panel
var selectedStudentName:String = quoteGrid.selectedItem.lastname + ", " +
quoteGrid.selectedItem.firstname;
editQuoteWindow.title = "Editing Quote for: " + selectedStudentName;
currentStudentAsProperty = quoteGrid.selectedItem;
}

Reply With Quote


  #4 (permalink)  
Old 11-05-2008, 04:56 AM
wallanceM
 
Posts: n/a
Diggs:
Default Re: How do I set the variable of a custom component

I solved my problem. I changed the variable type to the name of my custom
component. From the code I pasted above, this is the only edit:

var editQuoteWindow:quoteSingleRecordDetail =
quoteSingleRecordDetail(PopUpManager.createPopUp(t his, quoteSingleRecordDetail,
true));

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk