Hello Danny,

 

To use namespace you should use this syntax “use namespace” instead of “import”

So just try that:

 

use namespace flash_proxy;  //instead of import flash.utils.flash_proxy;

 

 

Cheers,

 

De Ridder Yaniv
Flex Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK

m: +44 (0) 7758 643 37 81
[EMAIL PROTECTED]

 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Danny Patterson
Sent: Wednesday, August 23, 2006 5:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Extending a subclass of Proxy

 

I'm trying to extend a subclass of the Proxy class and I'm getting an error.  Here is an example of my problem:

 

// ProxyA.as

package {
 
 import flash.utils.Proxy;
 import flash.utils.flash_proxy;

 

 public class ProxyA extends Proxy {
  
  flash_proxy override function callProperty(methodName:*, ...args):* {
   return "ProxyA: " + methodName;
  }
  
 }
 
}

 

 

// ProxyB.as

package {
 
 import flash.utils.flash_proxy;

 

 public class ProxyB extends ProxyA {
  
  flash_proxy override function callProperty(methodName:*, ...args):* {
   return "ProxyB: " + methodName;
  }
  
 }
 
}

 

 

// ProxyBugExample.as

package {
 
 import flash.display.Sprite;
 import flash.utils.Proxy;

 

 public class ProxyBugExample extends Sprite {
  
  public function ProxyBugExample() {
   var proxy:Proxy = new ProxyB();
   trace(proxy.test());
  }
  
 }
 
}

 

I the ProxyB class I get the following error:

Namespace was not found or is not a compile-time constant.

 

I assume this is referring to the flash_proxy namespace, but it is imported just like in the ProxyA class.  I'm not sure what the problem here is, any help would be appreciated.

 

Thanks,

Danny

__._,_.___

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