Re: [flexcoders] No, Flex Flash Are Not Dead

2011-11-17 Thread John Fletcher
Ermm, that post only repeats what adobe just said, but with a different
headline. And highlights a sentence in red, for special value-add.

John
2011/11/16 turbo_vb timh...@aol.com

 **


 http://www.tricedesigns.com/2011/11/16/no-flex-flash-are-not-dead/

  



[flexcoders] Problems when using asynchronous RemoteObject requests

2011-11-17 Thread txakin
Hi all, I'm having some problems with the asynchronous in Flex using
RemoteObject to communicate with the Java side to get some information.


* First of all, let me explain what i'm doing:
I have developed a search component to allow the user to find stored
documents by name, content or both in some folders. The component has 2
panels:



1. Filter: The properties to filter are a keyword and a list of
folders

2. Result: Per each folder selected by the user, will display a
datagrid with the documents stored in.
When the user fill the filter and click the Search button, automatically
i send one request to the Java side per each selected folder (if the
user has selected 3 folders, will send 3 requests to the server using
RemoteObject)

I'm retrieving 3 ResultEvents, but in randomly order, and sometimes the
result of the search are not correct because of this. The result of each
responses is the dataprovider of the different DataGrids.

Here i put some of my code (in my example, this delegate class will be
instantiated3 times, one per selected folder)

public class SearchDelegate {
public var remoteObject:RemoteObject = new RemoteObject();

public function findDocuments(urlEndpoint:String, keyword:String,
folder:String):void {
 try {
 remoteObject.endpoint = urlEndpoint;
remoteObject.destination = searchService;
 remoteObject.addEventListener(ResultEvent.RESULT,
onFindDocumentsSuccess);
 remoteObject.findBasic(keyword, folder);
 } catch (error:Error) {

ErrorMgr.getInstance().raiseError(ErrorMgr.APPLICATION_ERROR, error);
 }
}

public function onFindDocumentsSuccess(event:ResultEvent):void {
remoteObject.removeEventListener(ResultEvent.RESULT,
onFindDocumentsSuccess);
 var documents:ArrayCollection = event.result;
 dispatcher.dispatchEvent(new SuccessEvent(ticket,
SuccessEvent.SUCCESS, false, true, documents));
}
}

* My question is: How can i solved this problem? Is any way to match
the different requests with the real responses. In my case looks like
the responses are overwritten between them (for example: i should have 3
different results, but in many cases i have only 2 results, because one
response has overwritten one of the others). I know i can do it
synchronous, but in my case i want only in ASYNCHRONOUS way
* The other things about my program are working correctly, please
only focus in the asynchronous problem.

Thanks so much in advanced for your help.





[flexcoders] Re: Problems when using asynchronous RemoteObject requests

2011-11-17 Thread valdhor
Use an AsyncToken to tag the requests using the data property. When a result 
comes in check the AsyncToken data property to see which one has come in.

--- In flexcoders@yahoogroups.com, txakin txakin@... wrote:

 Hi all, I'm having some problems with the asynchronous in Flex using
 RemoteObject to communicate with the Java side to get some information.
 
 
 * First of all, let me explain what i'm doing:
 I have developed a search component to allow the user to find stored
 documents by name, content or both in some folders. The component has 2
 panels:
 
 
 
 1. Filter: The properties to filter are a keyword and a list of
 folders
 
 2. Result: Per each folder selected by the user, will display a
 datagrid with the documents stored in.
 When the user fill the filter and click the Search button, automatically
 i send one request to the Java side per each selected folder (if the
 user has selected 3 folders, will send 3 requests to the server using
 RemoteObject)
 
 I'm retrieving 3 ResultEvents, but in randomly order, and sometimes the
 result of the search are not correct because of this. The result of each
 responses is the dataprovider of the different DataGrids.
 
 Here i put some of my code (in my example, this delegate class will be
 instantiated3 times, one per selected folder)
 
 public class SearchDelegate {
 public var remoteObject:RemoteObject = new RemoteObject();
 
 public function findDocuments(urlEndpoint:String, keyword:String,
 folder:String):void {
  try {
  remoteObject.endpoint = urlEndpoint;
 remoteObject.destination = searchService;
  remoteObject.addEventListener(ResultEvent.RESULT,
 onFindDocumentsSuccess);
  remoteObject.findBasic(keyword, folder);
  } catch (error:Error) {
 
 ErrorMgr.getInstance().raiseError(ErrorMgr.APPLICATION_ERROR, error);
  }
 }
 
 public function onFindDocumentsSuccess(event:ResultEvent):void {
 remoteObject.removeEventListener(ResultEvent.RESULT,
 onFindDocumentsSuccess);
  var documents:ArrayCollection = event.result;
  dispatcher.dispatchEvent(new SuccessEvent(ticket,
 SuccessEvent.SUCCESS, false, true, documents));
 }
 }
 
 * My question is: How can i solved this problem? Is any way to match
 the different requests with the real responses. In my case looks like
 the responses are overwritten between them (for example: i should have 3
 different results, but in many cases i have only 2 results, because one
 response has overwritten one of the others). I know i can do it
 synchronous, but in my case i want only in ASYNCHRONOUS way
 * The other things about my program are working correctly, please
 only focus in the asynchronous problem.
 
 Thanks so much in advanced for your help.





[flexcoders] Re: Examining static variables when debugging with Flash Builder

2011-11-17 Thread valdhor
Strange. It works for me.

Maybe you need to initialize x in the constructor of the Global class. Leaving 
it unassigned may cause that error.

--- In flexcoders@yahoogroups.com, William Mitchell whm@... wrote:

 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  You have to create a variable of type Global somewhere in your code before 
  you can use the class variable x.
 
 valdhor: Thanks for that note.  I'd tried to boil the question to its 
 essence.  In the real app, various static members of Global are used in 
 various places.  However, your note did prompt me to add this field in the 
 application (tos.mxml):
 
 public static var global: Global = new Global
 
 That produces an interesting result: tos.global.x in the Expressions view 
 shows me the data of interest, giving me a viable workaround.
 
 But Global.x in the Expressions view produces the same result: 
 error(s)_during_the_evaluation





[flexcoders] Red error borders on form items before form is validated

2011-11-17 Thread dorkie dork from dorktown
When I display my Form elements (TextInput, Combox, etc) the red error
border is shown right away before the user even types into it. Why is this
happening? How can I prevent it from showing a red error border when it's
first displayed?


Re: [flexcoders] Re: Why Flex now?

2011-11-17 Thread Angelo Anolin
95% of organizations and businesses bottom line is to be able to deliver 
projects and applications with the least amount of time and budget.

We are able to deliver software faster, better and more responsive using 
Flex/Flash technology running on the web than any other implementation out 
there.

I think Adobe forgot to mention that enterprise grade applications are far 
different from fancy web sites powered by HTML5, CSS, JS, etc..

Bottom line is if you are able to deliver software better, and you have very 
satisfied users, use that technology. 

Just read this post and somehow rings true..
http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/




 From: Tomislav i...@svemir.net
To: flexcoders@yahoogroups.com 
Sent: Wednesday, November 16, 2011 6:08:58 AM
Subject: [flexcoders] Re: Why Flex now?
 

  
That statement is updated today. Checkout the same link:
http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html

--- In flexcoders@yahoogroups.com, Rick Schmitty flexcode@... wrote:

 I've been a Flex developer since it's first beta however many years ago.
  Today I just saw this response from Adobe:
 http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html
 
 
 *Does Adobe recommend we use Flex or HTML5 for our enterprise application
  development?
  *In the long-term, *we believe HTML5 will be the best technology for
  enterprise application development*. We also know that, currently, Flex
  has clear benefits for large-scale client projects typically associated
  with desktop application profiles.
  Given our experiences innovating on Flex, we are extremely well positioned
  to positively contribute to the advancement of HTML5 development, starting
  with mobile applications. In fact, *many of the engineers and product
  managers who worked on Flex SDK will be moving to work on our HTML efforts
  *. We will continue making significant contributions to open web
  technologies like WebKit  jQuery, advance the development of PhoneGap and
  create new tools that solve the challenges developers face when building
  applications with HTML5.
 
 
 Emphasis mine.  If anyone has followed any game or application development
 where 'many members' of the team are switched to the next greatest thing,
 that normally means there are few maintenance developers for the existing
 product and not much new innovation to it.  The company wants its best and
 brightest working on its future, not supporting its past.
 
 Combine that with the facts that Adobe bought PhoneGap and released Edge
 preview.  It's not hard to put all these facts together and see that long
 term they want an IDE  framework for app development in HTML5.  Perhaps
 Flex5 will be an HTML5 version of Flex as they start putting together html5
 components
 
 
 Outside of having to support IE6 why would you choose to start a project
 in Flex today?