maybe try this?

var newClass:className = new className();
var _nav:String = className.getData()




----- Original Message ----
From: Gordon Smith <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, May 30, 2008 11:58:04 AM
Subject: RE: [flexcoders] Problems accessing a class method from an mxml file


What is your declaration of _nav? The
compiler apparently thinks it has type Class, rather than the type of the class
you've written.
 
Gordon Smith
Adobe Flex SDK Team
 

________________________________
 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of justSteve
Sent: Friday, May 30, 2008 6:42 AM
To: flexcoders
Subject: [flexcoders] Problems
accessing a class method from an mxml file
 
I have a
public class that defines a method as:

public function getData( ):String
{
return "mData";
} 

In an mxml file, I've imported that package and attempt to call ( _nav
= getData(); ) but get '1061: Call to a possibly undefined method
getData through a reference with static type Class.' I've tried fully
qualifying the object (_nav = com.myObject. getData() ; ) with the same
result.

Obviously I'm missing something very, very basic.

thx
--steve...    


      

Reply via email to