it sounds like you declared it as
var __editWindow:TitleWindow;
The problem is that Adobe's TitleWindow class doesn't have a "seller"
property; it's your SellerEdit subclass of TitleWindow that added that
property.
When you create an MXML component SellerEdit.mxml starting with
<mx:TitleWindow>, the MXML compiler autogenerates a subclass that looks
like
public class SellerEdit extends TitleWindow
{
public var seller:Object;
}
So the solution is to declare
var __editWindow:SellerEdit;
and cast the result of createPopUp() to a SellerEdit:
__editWindow = SellerEdit(PopUpManager.createPopUp(this, SellerEdit,
true));
- Gordon
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Santangelo
Sent: Friday, May 19, 2006 12:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] probably-stupid AS3 question
I'm new here, as will be made clear by the beginner-level of my
question...
I have a TitleWindow component in SellerEdit.mxml:
<mx:TitleWindow ... >
<mx:Script>
<![CDATA[
public var seller:Object;
]]>
</mx:Script>
</mx:TitleWindow>
And from my application, I create it:
__editWindow = TitleWindow(PopUpManager.createPopUp(this, SellerEdit,
true));
__editWindow.title = 'Edit Seller';
__editWindow.addEventListener('creationComplete', initWindow);
__editWindow.seller = sellers.selectedItem;
I get an error on the last line, "Access of possibly undefined property
seller through a reference with static type mx.containers:TitleWindow."
According to the "Defining properties and methods in ActionScript"
article in help, it sounds like this is the right way to do it? Am I
just missing something obvious?
thanks,
-josh
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.