[flexcoders] Re: Flexbuilder doesn't give compile error when using a undeclared variable, methods

2009-10-30 Thread benjamine_df


Compile time we don't need to check for data, we only need to check 
for declared variable, method class etc. So I am in favour for what 
java is doing. It will help to catch the errors during compile time

I think flex allows this because of associative arrays.
var data:object = new Object();

new data.length means data['length'] 

Is there any way I can tell flex compiler that don't assume objects as 
associative array unless I specifically declare as Array.



[flexcoders] Re: Flexbuilder doesn't give compile error when using a undeclared variable, methods

2009-10-30 Thread benjamine_df
I wanted to clarify more on my other response.

As Amy referred this does not happen to Dictionary object alone. create an 
instance of any object , then call a non existing method and you won't get 
compile time errors.

Example
var data:Array = new Array()
data.xyz() //xyz method does not exist in Array, but still no compile time 
errors.

Without compile time errors, when things don't work in run time, it wastes lot 
of my time to find the problem.

Any help from Flex gurus are appreciated.

Thanks
Ben

--- In flexcoders@yahoogroups.com, droponrcll amyblankens...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, benjamine_df benjamine_df@ wrote:
 
  Hello,
  
I am new to flex and I make lot of mistakes by calling a method or
   field in an object which does not exist. But flex builder 3 doesn't 
  seem to throw a compile error when I do this. In java it would be a 
  quick compile error. Is there any flex builder setting I can set to 
  give compile errors.
  
  Example
  var data:Dictionary = new Dictionary();
  data.length   //no compile error for this
  data[indexint]  //no compile error
 
 Create your own typed objects if you want type checking:
 
 public clas YourClass {
public var indexInt:int;
public var length:int;
 }
 
 var yourClass:YourClass = newYourClass();
 
 var foo:String = YourClass.foo; //compiler error
 
 
 I'm pretty sure Java wouldn't throw a compiler error if you add or access a 
 previously nonexistent key to a Dictionary, either, since that's pretty much 
 the point of a Dictionary in most languages, isn't it?
 
 -Amy





[flexcoders] Flexbuilder doesn't give compile error when using a undeclared variable, methods

2009-10-29 Thread benjamine_df
Hello,

  I am new to flex and I make lot of mistakes by calling a method or
 field in an object which does not exist. But flex builder 3 doesn't 
seem to throw a compile error when I do this. In java it would be a 
quick compile error. Is there any flex builder setting I can set to 
give compile errors.

Example
var data:Dictionary = new Dictionary();
data.length   //no compile error for this
data[indexint]  //no compile error

Thanks



[flexcoders] streaming amf doesn't work with Trader desktop sample using blazeds

2009-10-02 Thread benjamine_df
Hello all,

  I am trying to evaluate flex. I tested the Trader desktop and it works great 
when I use my-polling-amf, but when I select my-streaming-amf I am not getting 
any updates in the frontend. 


I am adding the code related to subscription:

private function subscribe(symbol:String):void
{
var consumer:Consumer = new Consumer();
consumer.destination = market-data-feed;
consumer.subtopic = symbol;
consumer.channelSet = new 
ChannelSet([channels.selectedItem]);
consumer.addEventListener(MessageEvent.MESSAGE, 
messageHandler);
consumer.subscribe();
consumers[symbol] = consumer;
}



messaging channel configuration

destination id=market-data-feed
properties
server
allow-subtopicstrue/allow-subtopics
subtopic-separator./subtopic-separators
/server
/properties
channels
channel ref=my-polling-amf/
channel ref=my-streaming-amf/
channel ref=per-client-qos-polling-amf/
/channels
/destination



There are no errors in the tomcat backend. Is this a known problem with blazeds?

I don't have a debug version of flash. Is there any log file where I can check 
errors?

Thanks!!



[flexcoders] Blazeds backend server restart stops the flex frontend updates

2009-10-02 Thread benjamine_df
Hello again,

  I am testing the Trader desktop sample with blazeds backend. when I use the 
polling amf, I am able to see the stock updates. while the flex frontend is 
running, if I restart the backend after 5 minutes, then the frontend no longer 
gets the updates. If I refresh the web page, then it works again. If I restart 
teh backend server quickly (lets say 10 seconds), then it works.

It looks like if the flex client cannot connect to backend server, it tries to 
reconnect few times, once it cannot connect after many tries it gives up. where 
can I change the settings about how often to retry?

Thanks
Ben