Re: [flexcoders] Re: Proxy callproperty probs

2007-01-10 Thread Webdevotion

serviceProxy is set in the constructor of the class,
the params are valid in the method callproperty.

I use

var myProxy:RemotingProxy = new RemotingProxy();
myProxy.getNews();

Maybe the private var serviceProxy is not yet instantiated ...
How can I make sure it's instantiated before I call a dynamic method ?


Re: [flexcoders] Re: Proxy callproperty probs

2007-01-10 Thread Webdevotion

Even if I try it like this, it fails:

// override to catch call operations
flash_proxy override function callProperty(methodName:*, ...args):* {
 serviceProxy = new ServiceProxy(
http://localhost.:8500/flashservices/gateway;, mysite.services.public);
 serviceProxy[getPhotobook].apply(serviceProxy,[]);//.getRecentNews(5);
}


[flexcoders] Re: Proxy callproperty probs

2007-01-09 Thread kevin_hammer
Put more of the code of your class up... serviceProxy or params could
be what's null...

--- In flexcoders@yahoogroups.com, Webdevotion [EMAIL PROTECTED] wrote:

 Hello,
 
 I've been staring into the dark since yesterday on this one.
 I extend Proxy and implement IEventDispatcher
 
 
 public dynamic class RemotingProxy extends Proxy implements
 IEventDispatcher{
 // my class
 }
 
 
 
 somewhere in my class I have the callProperty method
 
 
 flash_proxy override function callProperty( methodName:* , ... args ):*
 {
 return serviceProxy[methodName.toString()].apply(serviceProxy,params );
 }
 
 I always run into this compilation error.
 Error: TypeError: Error #1009: Cannot access a property or method of
a null
 object reference.