Try to add the Constructor function inside your class.

package test{
public class Program{
  private var programId:int;
  private var programName:String;

  public function Program(){

  }

}
}

João Fernandes
-----Original Message-----
From: [email protected] on behalf of eairox
Sent: Sat 06-May-06 7:57 AM
To: [email protected]
Subject: [flexcoders] Re: Please Help: Not being able to access the .as class from mxml in Flex 2 Beta 2

Hi,
Thanks for replying.

Yes, Program.as live in test package and it is in test directory. In
the flex builder, there is no compile-time error. I get the error,
when I run it.

This is the directory configuration:

- programview.mxml
- test\Program.as

Am I missing any configuration?

Thanks,
Umesh


--- In [email protected], "Peter Farland" <[EMAIL PROTECTED]>
wrote:
>
> Is the Program class correctly declared inside a package test {}
block?
> Does Program.as live in a subdirectory called test?
>
> -----Original Message-----
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of eairox
> Sent: Thursday, May 04, 2006 7:02 PM
> To: [email protected]
> Subject: [flexcoders] Please Help: Not being able to access the .as
> class from mxml in Flex 2 Beta 2
>
> Hi,
>
> I am not able to use the actionscript class in the mxml. I have
declared
> a class as follows:
>
> Class: Program.as
>
>     import mx.collections.*;
>     //These imports should be unnecessary in the final release
>     import mx.data.IManaged;
>     import mx.data.utils.Managed;
>     import mx.core.mx_internal;
>      
>       [Managed]
>       [RemoteClass(alias="test.Program")]
>      
>       public class Program {
>                 //auto generated
>     private var programId:int;
>    
>     //auto generated
>     private var programName:String;
>     ...
>     ...
> }
>
>
> mxml code:
>
> import test.Program;
>
> [Bindable]
> public var program:Program;
>
>
>
> Error:
>
> Type is not found or not a compile-time constant: Program
>
> 36:              public var risks:ArrayCollection;
> 37:              public var program:Program;
>
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------
~-->
> Get to your groups with one click. Know instantly when new email
arrives
> http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
> --------------------------------------------------------------------
~->
>
> --
> 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 <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>        Computer software development <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>        Software design and development <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>       
Macromedia flex <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>        Software development best practice <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>       

________________________________

YAHOO! GROUPS LINKS


      *      Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> " on the web.
       
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
       
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .


________________________________




--
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




<<winmail.dat>>

Reply via email to