[flexcoders] Re: HTTP Headers and RemoteObject

2012-02-15 Thread valdhor
You could use the setRemoteCredentials method of the RemoteObject to send 
username and password as a header item.

If not, check out the replies at 
http://stackoverflow.com/questions/81548/how-to-set-an-http-header-while-using-a-flex-remoteobject-method

--- In flexcoders@yahoogroups.com, mores stephen.more@... wrote:

 Is there anyway to attach a HTTP Header to a 
 flex.messaging.messages.RemotingMessage such that my 
 flex.messaging.endpoints.AMFEndpoint will be able access it ?
 
 I have a server that is protected/secured and the only way to access the 
 resources is by attaching a token to the HTTP Header.





[flexcoders] Re: CSS for spark dataGrid?

2012-02-15 Thread valdhor
You need to use skins for spark components.

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

 Hi,
 
  I use CSS for spark dataGrid, that is like
 
fx:Style
 
 @namespace s library://ns.adobe.com/flex/spark;
 
 s|DataGrid {
 
 alternatingRowColors: #FF, #FF;
 
 }
 
 /fx:Style
 
  but I get the message:  CSS type selectors are not supported in components: 
 'spark.components.DataGrid'.
 
 why css can not work with spark.components.DataGrid?
 
 I use FB4.6 for mobile app now
 
 Thanks
 
 Mark





[flexcoders] Re: HttpService resultHandler in different Window

2012-02-14 Thread valdhor
So, somewhere a null object is trying to be referenced.

You will need to add debugging code to check which object is null.

If you need two way communication between your windows I would recommend 
creating an interface and implementing it in both windows.

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

 I am working on an AIR application with 2 windows: One to create a new 
 customer and another to display some information about the customer. On 
 window 1, there is also a textfield to search for a customer by Id or name.
 
 These are the steps to create a new customer:
 
 with an add button on window 1, I open window 2.
 on window 2, the user completes a form to create a new customer.
 the information is saved in a MySQL Database over an HttpService.
 The result handler method calls a public function on window 1:
 
 result = new wWin1().resultSaveCustomer(event)
 This part works well - the new customer Id is received.
 
 In some cases, according customer data, I change the component color - this 
 operation works well, if I load a customer after a using the search field, 
 but if I search directly from the resultSaveCustomer function (after 
 completion of step 3), a message appears:
 
 Cannot access a property or method of a null object reference.
 
 I don't understand why, because all the components in window 1, have an Id 
 name! Or the property is a label with Id Name.
 
 Thanks for helping me.





[flexcoders] Re: SWF Management...

2012-02-14 Thread valdhor
This does seem to be the current behavior. It started happening with my code 
too.

I don't know exactly when it started but may be due to the fact that I just 
upgraded to 4.5 and Flash Player 11.

--- In flexcoders@yahoogroups.com, jamesfin james.alan.finnigan@... wrote:

 A module is being loaded by a simple ModuleManager.load.
 
 In debug mode, there is output like this...
 
 [Unload SWF] View.swf/[[DYNAMIC]]/307 - 632 bytes after decompression
 [Unload SWF] View.swf/[[DYNAMIC]]/308 - 632 bytes after decompression
 [Unload SWF] View.swf/[[DYNAMIC]]/309 - 632 bytes after decompression
 [Unload SWF] View.swf/[[DYNAMIC]]/310 - 632 bytes after decompression
 [Unload SWF] View.swf/[[DYNAMIC]]/311 - 632 bytes after decompression
 
 and
 
 [SWF] View.swf/[[DYNAMIC]]/337 - 632 bytes after decompression
 [SWF] View.swf/[[DYNAMIC]]/338 - 632 bytes after decompression
 [SWF] View.swf/[[DYNAMIC]]/339 - 632 bytes after decompression
 [SWF] View.swf/[[DYNAMIC]]/340 - 632 bytes after decompression
 [SWF] View.swf/[[DYNAMIC]]/341 - 632 bytes after decompression
 
 when interacting with the application.
 
 
 Is this normal and why the all the loading and unloading messages?





[flexcoders] Re: Overriding Focus Manager?

2012-02-06 Thread valdhor
I would add a focus out event listener on text2. When it fires, check to see if 
Text1 has been validated. If not, prevent the event from propagating.

--- In flexcoders@yahoogroups.com, Mandy Mandy amachutta@... wrote:

 Hello All,
 
 I have a project I'm working on in Flex 3.5 that involves writing a bunch of 
 validation stuff for focusIn and focusOut for components. Depending on the 
 type of validation selected this could generate an Alert message. So the 
 problem I am running into is say I have two TextInput boxes, both with their 
 FocusOut property set to validate a phone number, and if the phone number is 
 incorrect, it will pop an alert and place the focus back into that textbox.. 
 A user types in a Phone Number and hits tab. The focusOut on Text1 does its 
 validation and pops a message that the phone number needs to be at least 10 
 digits in length. The focus gets pulled from Text2 to place it back into 
 Text1 thereby calling the focus out in Text2 which is blank so it also pops 
 an alert and now we have an infinite loop of alert and focus movement. 
 
 I've been trying to find a way to code around this and am fishing for ideas. 
 One idea I had was to somehow override the focusManager for this form, but am 
 not having much luck figuring out how to exactly do this. Anyone have any 
 ideas?
 
 
 Thanks, 
 Amanda





[flexcoders] Re: How to create a line after each line in a TextArea

2012-01-31 Thread valdhor
Add a row of dash's or underscore's?

--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
dorkiedorkfromdorktown@... wrote:

 I'm trying to show a horizontal line under each row of text sort of like
 legal paper. I'm not sure what to do to accomplish this.





[flexcoders] Re: Need help dynamically modifying text displayed based on DB return

2012-01-31 Thread valdhor
Firstly, the way you are setting your public variables won't work. The {} 
syntax only works inside an MXML statement. You would need to change

[Bindable] public var imageTitle:String = {win.title};

to

[Bindable] public var imageTitle:String = win.title;

Secondly, you may like to look into using item renderers.

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

 
 Part of the functionality in the gallery app ia am working on for my
 wife is a popup window that displays information about the specific
 painting or drawing.
 
 I am trying to figure out how to do the following based on the value
 returned from the DB for the imageStatus field:
 1) Change the text displayed for the Price to the {imageStatus)if that
 value is anything other than Available.
 2) Change the color of the above text to RED if the {imageStatus) ==
 Sold.
 
 
 
 fx:Script![CDATA[
 
 ... //cut for brevity
 
 [Bindable] public var imageTitle:String = {win.title};
 
 [Bindable] public var imageStatus:String = {win.status};
 
 [Bindable] public var imagePrice:String = {win.price};
 
 [Bindable] public var displayPrice:String ;
 
 
 
 ... // cut for brevity
 
 ]] /fx:Script
 
 s:Group
 
 s:layout
 
 s:VerticalLayout/
 
 /s:layout
 
 s:RichText id=style x=13 y=14 width=120 color=#C39F70
 fontFamily=Times New Roman fontSize=18 text={imageStyle}/
 
 s:RichText width=120 color=#C39F70 fontFamily=Times New Roman
 fontSize=18 text={imageMedium}/
 
 s:RichText id=dimensions width=112 color=#C39F70
 fontFamily=Times New Roman fontSize=18 text={imageHeight} x
 {imageWidth}/
 
 s:RichText id=artPrice width=120 color=#C39F70 fontFamily=Times
 New Roman fontSize=18 text={imagePrice} / !-- Currently
 displaying the art's price --
 
 /s:Group
 
 I have tried several things with public functions, getters/setters, but
 have gotten no where.
 
 Could someone kindly point me in the right direction?
 
 Thanks,
 
 John





[flexcoders] Re: Build Release (generated on Windows) returns NULL query values

2012-01-30 Thread valdhor
Use Charles (www.charlesproxy.com) to see if the data you are expecting to come 
across the pipe is actually there.

If the data is there, you have a bug in your Flex code. If it isn't, you have a 
bug in your CFC.

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

 when migrated to Linux Production server.
 
 Dev environment: Win 7 Pro, CF9/Apache/MySQL, AI/FC/FB4.5
 Production Env:  LAMP/CF9
 
 I am a beginner in Flex and I have been working on developing a new Web Site 
 for my wife's art.
 
 Beginning with the backend (database functionallity) and then the frontend 
 goodies. The site, as it is now, works fine on my Dev machine but when I move 
 the app to the linux server (Ubuntu 10.?) database queries return NULL values.
 
 http://www.elisabetahermann.com/Main.html
 
 Go to the Gallery link to see. also if you mouseover any of the missing 
 images and click I should have a larger view of the selected art. note the 
 null X null next to the dimensions Label.
 
 Originally, the CFCs were in the [root]/CFC directory and this threw an error 
 Cannot find CFC ...
 I moved them to root/elisabetahermann/CFC and the error went away but no joy 
 on the query results.
 
 Any suggestions?





[flexcoders] Re: Evaluating a Boolean String Expression

2012-01-26 Thread valdhor
http://stackoverflow.com/questions/1312986/how-to-make-a-logical-boolean-parser-for-text-input

--- In flexcoders@yahoogroups.com, BillF bill.franklin@... wrote:

 So, I have a string expression that I need to evaluate as a boolean result.  
 Any ideas on how to do that?  The expression can be in any valid boolean 
 format..
 
 example1: (true  false) || true, evaluate to true
 example2: false || (true  not true), evaluate to false
 example3: false || true, evaluate to true
 example4: true  false, evaluate to false
 example5: true
 
 TIA
 
 Bill





[flexcoders] Re: send failed

2012-01-20 Thread valdhor
Try checking with Charles.

--- In flexcoders@yahoogroups.com, Greg Morphis gmorphis@... wrote:

 We have an older flex app written in Flex 2 with ColdFusion as middle ware.
 I haven't messed with this app or Flex in well over a year.
 The app partially loads up and then we get a couple Send Failed when
 hitting the page.
 Is there a place to check for logs, that error doesn't tell us anything at
 all. I checked the ColdFusion logs and there's nothing in there either.
 
 Like I said, it's been a long time since I've looked at Flex so please be
 gentle :)
 
 Thanks





[flexcoders] Re: Flex alternatives

2012-01-17 Thread valdhor
Yes, that is the case with my company as well (300,000+ employees) but there is 
procedures for getting things done. We have all kinds of in house built 
applications and a special installer application for installing them on users 
machines.

As I said, the AIR apps are only used for building IOS apps.

Flash Player is updated regularly and is pushed to every computer on the 
network.

--- In flexcoders@yahoogroups.com, Ron G rgrimes@... wrote:

 The problem with that approach is a lot of people are behind corporate 
 firewalls where they also do not have local admin rights and are therefore 
 not allowed to install anything on their desktop. If they want it, they have 
 to call the network guys and get authorization and then have them install it. 
 That's the way my company is and we're over 5000 employees strong. Now, if 
 that's just one company, I can safely say you're still excluding millions by 
 going with an AIR app. This is the reason I never used the AIR feature 
 before, but always deployed my web apps as SWFs. Even that was a problem if 
 someone had an older version of Flashplayer and I had built the app for a 
 newer version of FP. 
 
 Ron
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  On the suggestion that I will be leaving IOS devices out, that seems 
  absurd. You can use the same Flex code and with some modifications make it 
  into an AIR app that can be compiled for IOS devices.
  
  Again, all just my perspective. I think some people are blowing the open 
  source announcement out of all perspective.
 





[flexcoders] Re: Flex alternatives

2012-01-16 Thread valdhor
Good luck on convincing IT departments in large corporations who are generally 
Microsoft shops.

--- In flexcoders@yahoogroups.com, Guy Morton guy@... wrote:

 A thought on cross-browser hell…
 
 If every web developer in the world today decided to drop support for IE, 
 everyone would go get Chrome or Firefox. 
 
 This would be a win-win, as they would get a better browser, and we would get 
 a better development environment.
 
 Who's with me?
 
 Guy
 
 
 On 16/01/2012, at 6:31 AM, Ron G wrote:
 
  
  
  Valdhor:
  
  You are right about that. That is precisely why we went with Flex 
  originally (it insulated us from X-Browser issues). But, since we can't 
  count on that lasting, and even Adobe is telling developers to plan on 
  moving to HTML5, it seems like they're pushing us back into x-browser hell. 
  
  I didn't want to go there, which is why we chose ZKoss. Yes, there is still 
  going to be HTML/JS/CSS ultimately used, but it's how much. Even Flex SWFs 
  are wrapped in HTML and JS when deployed. So, it's not that I'm against 
  using any amount of HTML/JS; it's how little can I get away with to avoid 
  these issues.
  
  Even with HTML5 libraries, such as the much touted jQuery, is, to a large 
  degree, an insulator against x-browser issues. If you read the actual 
  jQuery code, it deals with those issues for you. 
  
  Now, ZK has a ZK Client JS library, which includes jQuery, that is designed 
  to be a communicator mechanism between the client and the bulk of app logic 
  that resides on the server. So, your normal editing and data manipulation 
  that you might write in JS in a full blown HTML5 app is actually stored as 
  Java on the server, and executed as needed per the EDA (event driven 
  architecture). This type of JS is typically what breaks the page on 
  different browsers and versions thereof. By limiting the amount of 
  client-side JS, as does a jQuery type library, yes, you have some exposure 
  to potential x-browser issues, but not as much as a HTML5 app that does 
  everything on the client. And, when there are issues, they can be resolved 
  in the ZK Client library as a patch/fix. 
  
  So, now it seems to me that developers have several choices. Stick with 
  Flex and you won't break the browser; you just won't be able to have your 
  app viewed by millions on iOS products. If that seems like a better 
  solution that minimal exposure to x-browser issues by using ZK or some 
  other technology, well, that's certainly a choice each company has to make.
  
  Ron
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   
   On a side note, I like the look of ZKoss. I don't know if there are cross 
   browser issues with it seeing as we use older versions of browsers. One 
   of the great features of Flex is we don't have to bother coding for 
   compatibility between different browsers and versions. When IT deployed 
   IE7, Flex applications worked just as they had before.
   
   Anyway, just my 2c from the enterprise perspective.
   
  
 





[flexcoders] Re: Flex alternatives

2012-01-16 Thread valdhor
All of that seems inordinately complex compared to just coding in ActionScript.

I still believe there is a future with Flex (I am planning for 3-5 years). 
Adobe is still developing Flash for the desktop.

Flex is just an ActionScript Framework (Or library if you like to think of it 
that way) of components. It has been free to download for quite some time. Open 
sourcing the code just lets the community fix some bugs, enhance some 
components and create new ones (Although that has been happening for some time 
anyway). There have been patches, workarounds and new components being built by 
members of the community already. The only difference now is Adobe is not the 
only entity that can push official releases. I liken it to how Apple open 
sourced Darwin.

Hopefully Adobe (Or someone else) can build an IDE for HTML5/JS/CSS that is as 
easy to use as Flash Builder and insulates developers from the complexities 
inherent in that workflow. Once that happens I will be moving forward. At the 
moment there is nothing I believe ready for prime time except maybe ZKoss 
(Although I have yet to make that determination).

On the suggestion that I will be leaving IOS devices out, that seems absurd. 
You can use the same Flex code and with some modifications make it into an AIR 
app that can be compiled for IOS devices.

Again, all just my perspective. I think some people are blowing the open source 
announcement out of all perspective.

--- In flexcoders@yahoogroups.com, Ron G rgrimes@... wrote:

 
 
 Valdhor:
 
 You are right about that. That is precisely why we went with Flex originally 
 (it insulated us from X-Browser issues). But, since we can't count on that 
 lasting, and even Adobe is telling developers to plan on moving to HTML5, it 
 seems like they're pushing us back into x-browser hell. 
 
 I didn't want to go there, which is why we chose ZKoss. Yes, there is still 
 going to be HTML/JS/CSS ultimately used, but it's how much. Even Flex SWFs 
 are wrapped in HTML and JS when deployed. So, it's not that I'm against using 
 any amount of HTML/JS; it's how little can I get away with to avoid these 
 issues.
 
 Even with HTML5 libraries, such as the much touted jQuery, is, to a large 
 degree, an insulator against x-browser issues. If you read the actual jQuery 
 code, it deals with those issues for you. 
 
 Now, ZK has a ZK Client JS library, which includes jQuery, that is designed 
 to be a communicator mechanism between the client and the bulk of app logic 
 that resides on the server. So, your normal editing and data manipulation 
 that you might write in JS in a full blown HTML5 app is actually stored as 
 Java on the server, and executed as needed per the EDA (event driven 
 architecture). This type of JS is typically what breaks the page on different 
 browsers and versions thereof. By limiting the amount of client-side JS, as 
 does a jQuery type library, yes, you have some exposure  to potential 
 x-browser issues, but not as much as a HTML5 app that does everything on the 
 client. And, when there are issues, they can be resolved in the ZK Client 
 library as a patch/fix. 
 
 So, now it seems to me that developers have several choices. Stick with Flex 
 and you won't break the browser; you just won't be able to have your app 
 viewed by millions on iOS products. If that seems like a better solution that 
 minimal exposure to x-browser issues by using ZK or some other technology, 
 well, that's certainly a choice each company has to make.
 
 Ron
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  
  On a side note, I like the look of ZKoss. I don't know if there are cross 
  browser issues with it seeing as we use older versions of browsers. One of 
  the great features of Flex is we don't have to bother coding for 
  compatibility between different browsers and versions. When IT deployed 
  IE7, Flex applications worked just as they had before.
  
  Anyway, just my 2c from the enterprise perspective.
 





[flexcoders] Re: Flex alternatives

2012-01-13 Thread valdhor
We are staying with Flex as well but keeping an eye on what is happening.

I work for a very large enterprise company and it takes a while for our IT 
department to test software before deployment. They have almost completed 
Windows 7 and have a tentative deployment start of 2012. In late 2011 IE7 was 
ratified and became the company standard for web browsing. Up until then we had 
to stay with IE6!

As far as we are concerned HTML5/JS is not ready for prime time. Many 
enterprise customers are in the same boat and do not deliver the bleeding edge 
to their users.

Once there is a viable ecosystem available for HTML5/JS (Including mature IDE's 
of the same value as Flash Builder with Flex) we will seriously look at them. I 
really don't see that happening for at least 5 years.

On a side note, I like the look of ZKoss. I don't know if there are cross 
browser issues with it seeing as we use older versions of browsers. One of the 
great features of Flex is we don't have to bother coding for compatibility 
between different browsers and versions. When IT deployed IE7, Flex 
applications worked just as they had before.

Anyway, just my 2c from the enterprise perspective.

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

 Staying with Flex.  Not looking elsewhere.
 
 Michael
 
 From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On 
 Behalf Of Ron G
 Sent: Wednesday, January 11, 2012 8:15 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Flex alternatives
 
 
 
 Yes, we have also abandoned Flex in favor of ZKoss. Since we are already a 
 Java shop, on the server side, it seemed logical to use a Java based 
 framework on the client-side.
 
 The thing I really like about ZK or ZKoss is that it has equivalent 
 components to Flex. In fact, it actually has more components than Flex.
 
 It implements an approach that I really like of separating the UI into 
 appearance and behavior - much like the Spark components of Flex. Well, not 
 exactly, but sort of. :) Here's what I mean. For each UI object, it has a 
 client side (widget) and server side (component). I won't go into further 
 detail, but it gives you a nice separation of concerns that you can avail 
 yourself of. This feature also greatly insulates the rendered pages from 
 x-browser compatibility issues.
 
 Check it out for yourself at their site (zkoss.org).
 
 Ron
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Sal 
 sal.celli@mailto:sal.celli@ wrote:
 
  hi,
  as i can sadly see from the message history bottom grid, many programmers 
  are leaving flex.
  So this thread is to ask you all, if you have already found a valid 
  alternative to flex for RIA development.
 





[flexcoders] Re: Challenge in Migrating to HTML5 from FLEX.

2012-01-13 Thread valdhor
On another thread someone mentioned zkoss.

--- In flexcoders@yahoogroups.com, Venkat M venkat_yum@... wrote:

 Hi Team,
  
 I have a question on migration from FLEX to HTML5. This
 question may be little out of the discussion in here; It would be great if 
 someone
 help me out.
  
 I have a java server side application. It had a class that
 exposed a bundle of routines that are needed for the flex front end to drive
 the backend. I connect this class using with blazeds and get access to all the
 routines within and able to work just fine. It worked like a charm and 
 everyone
 was happy till date.
  
 Now, I have a parallel requirement to build a HTML5 equivalent
 front end that does the same. I am asked to provide a estimate and possible 
 frameworks
 that can be used with ease. Can someone put down any views if they have.
 Thanks.
  
 Scenario.  Java back end remains the same †Build an
 interactive HTML5 webpage just looking similar to my current flash version  
 - there is a submit_button() java routine
 which I have to call when a button on HTML page is clicked †Web server 
 used is
 Jetty †Please Comment! 
  
 Thanks!!
  
 Cheers,
 Venkat.





[flexcoders] Re: Air Controlling InDesign?

2011-12-22 Thread valdhor
Would this be on a PC or a Mac?

On a Mac you should look into leveraging AppleEvents.

--- In flexcoders@yahoogroups.com, grimmwerks grimm@... wrote:

 I know there's a few apps out there to control Photoshop and the like, but 
 I'm wondering if anyone has any information as to how to go about it?  Trying 
 to find out from the client exactly 'how' they want to control InDesign; I'd 
 imagine calling a native process on a script for it...?
 
 
 Garry Schafer
 grimmwerks
 grimm@...
 portfolio: www.grimmwerks.com/





[flexcoders] Re: Air Controlling InDesign?

2011-12-22 Thread valdhor
I would also look at Merapi.

--- In flexcoders@yahoogroups.com, valdhor valdhorlists@... wrote:

 Would this be on a PC or a Mac?
 
 On a Mac you should look into leveraging AppleEvents.
 
 --- In flexcoders@yahoogroups.com, grimmwerks grimm@ wrote:
 
  I know there's a few apps out there to control Photoshop and the like, but 
  I'm wondering if anyone has any information as to how to go about it?  
  Trying to find out from the client exactly 'how' they want to control 
  InDesign; I'd imagine calling a native process on a script for it...?
  
  
  Garry Schafer
  grimmwerks
  grimm@
  portfolio: www.grimmwerks.com/
 





[flexcoders] Re: Needs to word wrap on FormItem label

2011-12-09 Thread valdhor
http://www.nbilyk.com/multiline-formitem-label

--- In flexcoders@yahoogroups.com, koti reddy koti_reddy972@... wrote:

 Hi,
 
 I have been fighting to wrap text the FormItem label using css but can't able 
 to achieve the task.
 
 Could any of you please suggest me what should i do if i have a too long 
 label and needs to wrap to half.
 
 I really appreciate your help.
 Koti





[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] Re: Examining static variables when debugging with Flash Builder

2011-11-16 Thread valdhor
You have to create a variable of type Global somewhere in your code before you 
can use the class variable x.

The Flash Builder compiler is Smart. If you explicitly import a class but 
then don't use it the compiler will not import the class. To do so would bloat 
the code for something that is not used.

As x is a static variable (ie. class variable) you would need to use the class 
to get access to x. ie. Global.x

After you create the variable you don't need to use that variable. In fact, the 
variable will be null. Global will not appear in the Variables view as it is 
not a variable - it is a class. To see x in debug you would need to create an 
expression - Global.x

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

 I've got a class like this:
 
 package tos.model
 {
   public class Global
   {
   public static var x:int
   }
 }
 
 when at a breakpoint in Flash Builder 4.5, I'd like to find out what the 
 value of Global.x is.
 
 Global doesn't appear in the Variables view.
 
 I've tried adding watches for Global, Global.x, tos.model.Global, and 
 tos.model.Global.x.  All produce 'error(s)_during_the_evaluation' in red in 
 the Value column.
 
 Any ideas on how I could get a look at Global.x?
 
 William Mitchell
 Research Programmer
 School of Information: Science, Technology,  and Arts
 The University of Arizona





[flexcoders] Re: Replacing double slash with a single slash

2011-11-15 Thread valdhor
Can you give an example source string and how you would want it to look? Or a 
couple so that I don't just look at a single instance?

--- In flexcoders@yahoogroups.com, Nick Middleweek nick@... wrote:

 Hi Valdor,
 
 Thanks for the reply, I've just tried this code but no joy... :(
 
 var doubleSlash : RegExp = //g;
 var slash : RegExp = //;
 winMessage = winMessage.replace( doubleSlash, slash );
 
 I'm sure it's easy when you know how :)
 
 
 Nick
 
 
 
 On 8 November 2011 19:24, valdhor valdhorlists@... wrote:
 
  **
 
 
  As I understand it the backslash character is special in both the regex
  and the replacement string, so it has to be double escaped in both places.
  That means, for every single backslash you want to match or insert, you
  have to put *four* backslashes in the regex or replacement string.
 
 
  --- In flexcoders@yahoogroups.com, Nick Middleweek nick@ wrote:
  
   Hi,
  
   I'm trying to replace a double slash with a single slash and am having a
   little trouble, has anyone done this before?
  
   Here's what I've got thus far...
  
   var doubleSlash : RegExp = /(\\)(\\)/g;
   var slash : RegExp = /(\\)/;
  
   winMessage = winMessage.replace( doubleSlash, slash );
  
  
   Cheers,
   Nick
  
 
   
 





[flexcoders] Re: Mapping/Image in Flex

2011-11-08 Thread valdhor
Take a look at the callout component - 
http://www.adobe.com/devnet/flex/samples/fig_callout.html

--- In flexcoders@yahoogroups.com, Venkat M venkat_yum@... wrote:

 Thank you.
 
 What if it is not a map?. Say for example I have a car image, when I hover 
 over the tires, I should get the info about tires similarly all the 
 parts. then how do I do with mapping?
 
 Any help would be greatly appreciated. Thanks!
  
 Cheers,
 Venkat. 
  
  
 
 
 
 
 From: sony antony pow_like_me143@...
 To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
 Sent: Friday, November 4, 2011 11:30 PM
 Subject: Re: [flexcoders] Mapping/Image in Flex
 
 
   
 Try ammap examples
 
 
 
 
 From: Venkat M venkat_yum@...
 To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
 Sent: Saturday, 5 November 2011 2:13 AM
 Subject: [flexcoders] Mapping/Image in Flex
 
 
   
 Hi Group,
  
 I have a
 basic question in flex regarding the mapping of an image.
  
 Ex: I have
 a world map, depending on the click on the map, the corresponding information
 of the county has to be populated in the adjacent information box. I know this
 could be done quite easily in html with [map †coordinates], but I doubt 
 how to
 do it in flex. 
  
 Any ideas.
 Please help. Thanks.
  
 Cheers,
 Venkat. 
  
  
 
 
  
 
 





[flexcoders] Re: opening another Window in Flex for commenting on data entered in TextArea compon

2011-11-08 Thread valdhor
The way I would do it is to include an extra text area underneath (Or beside) 
each of the current text areas for the reviewer to add comments. These text 
areas would only be visible if a reviewer logged in. Depending on some flags 
that are populated in the database, you could make one or the other 
editable/visible at a time (eg. If a reviewer has already added comments, make 
the comments text area visible but not editable)

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

 I have a TitleWindow which has some TextArea components where end users(using 
 the application) will enter data to answer some questions. A reviewer needs 
 to comment on the entered answers. The reviewer comments would be stored in a 
 MySQL database using ColdFusion as the middle tier. Later, the end users 
 would make changes to their answers based on reviewer comments.
  
 I was thinking of doing it as MS-Word does it for reviewing by having a 
 Add/View button next to each TextArea. On clicking the button, a window would 
 open where the reviewer could enter his comments for the TextArea. But, the 
 issue is when the new window is opened, the answer in TextArea component will 
 not be seen. In MS-Word, a reviewer can view/highlight the data that he wants 
 to comment on, then enter his comments on the comment box.
  
 1. How can I implement this so that reviewing answers/data is as 
 intuitive/easy as in a MS-Word document for the reviewer and end-users when 
 they need to make changes based on review comments?
  
 2. I am thinking of adding a Add/View comment button next to each TextArea. 
 On clicking it, I open a new window, create a panel with two textareas where 
 first textarea has user's original answer(which would be readonly for the 
 reviewer) copied from the parentWindow's TextArea, second textarea would have 
 reviewer comments(which would be readonly for end user of the application). 
 The reviewer would make comments in second textarea based on the answer(in 
 first textarea) and click a button to save his comments(which would be stored 
 in a MySQL database). The end user would click the Add/View comment button, 
 revise his answer(in first textarea) based on reviewer comments(inn second 
 textarea), click a button which would then update his original answer in the 
 parentWindow with the revised answer.
  
 3. If approach described in 2 is advisable, should I open a new Window using 
 PopupManager or is there some other option(like the one at Multiple Windows 
 in Adobe AIR) which might be more suited?
  
 I am using compiler Flex 4.5 with Flex 3 compatibility mode. I am a beginner 
 to intermediate in Flex
  
 Any suggestions would be appreciated.
 
 P.S. I am talking about the view end user receives when he uses MS-Word to 
 review a document(not how MS-Word implements it). If you have MS-Word 
 installed, you can open it, create a new document in it, type text in it, 
 highlight the text you want to comment about, then choose Review option from 
 the Menu, then select option New comment and you would see a box where you 
 can enter comments. I want to create something like that so a reviewer/end 
 user is more comfortable in using it.





[flexcoders] Re: code out of sync with flash builder

2011-11-08 Thread valdhor
Do you have the debug even if there are errors (Or whatever it is called) 
turned on?

I have only seen this when there are errors in the code so a compile can't 
complete. In this case Flex will let you debug but use the previous compiled 
version.

--- In flexcoders@yahoogroups.com, Wouter Schreuders wschreuders@... wrote:

 Has anyone at least run into this problem before? I've had it on three
 different machines.
 
 On 3 November 2011 10:29, Wouter Schreuders wschreuders@... wrote:
 
  Hi All
 
  I'm continually running into this problem. When I debug my code flash
  builder intermittently show's me the previous build. It's super frustrating
  because you make a complex logic change to your code and then it doesn't
  work and you never know if it's that the code is wrong or flash builder
  just screwed up and is showing you the previous version.
 
  Anyone else run into this and know of some concrete steps I can take to
  prevent it from happening? A friend of mine runs FDT and says he's also
  encountered it so I'm guessing it's an eclipse problem.
 
  Any help would be appreciated
 
  thanks
 
  Wouter
 
 
 





[flexcoders] Re: Replacing double slash with a single slash

2011-11-08 Thread valdhor
As I understand it the backslash character is special in both the regex and the 
replacement string, so it has to be double escaped in both places. That means, 
for every single backslash you want to match or insert, you have to put *four* 
backslashes in the regex or replacement string.

--- In flexcoders@yahoogroups.com, Nick Middleweek nick@... wrote:

 Hi,
 
 I'm trying to replace a double slash with a single slash and am having a
 little trouble, has anyone done this before?
 
 Here's what I've got thus far...
 
 var doubleSlash : RegExp = /(\\)(\\)/g;
 var slash : RegExp = /(\\)/;
 
 winMessage = winMessage.replace( doubleSlash, slash );
 
 
 Cheers,
 Nick





[flexcoders] Re: ALEX HAURI please help

2011-11-04 Thread valdhor
I agree with John.

This type of question should not even be directed at Alex as it is something 
that is documented. Alex will jump in if he deems necessary.

First read the documentation at 
http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_5.html and 
then try to implement it yourself. If you have any problems with the 
implementation post again with code as well as any errors you get and a stack 
trace (if any). 

--- In flexcoders@yahoogroups.com, John Fletcher fletchgqc@... wrote:

 Deepa,
 
 I'm not sure that such a subject line conforms to mailing list etiquete; in
 any case if you want someone's help, may I suggest that you first take care
 to spell his name correctly. People tend to like their own names.
 
 Regards,
 John
 
 2011/11/3 deepa_pathuri deepa_pathuri@...
 
  **
 
 
  i want to implement undo and redo operations.
  i am dragging image from one container to other and i want to facilitate a
  undo and redo for it.
  can some body please tell me how to acheive it?
 
   
 





[flexcoders] Re: ModuleLoader.child is null

2011-11-04 Thread valdhor
In your module code I don't see where it implements 
com.storefront.interfaces.controller.ITest. If there is no implementation of 
the interface, the child will be null.

--- In flexcoders@yahoogroups.com, method_air loudjazz@... wrote:

 Can anyone explain why ModuleLoader.child is null in the module event 'ready' 
 event listener:
 
 this._moduleLoader = new ModuleLoader();
 this._moduleLoader.url = ImageComparisonModule.swf; // 
   
 this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);
 
 private function onReady(e:ModuleEvent):void
 {
  var test:ITest ITest(this._moduleLoader.child); // null  
 }
 
 Module code:
 
 ?xml version=1.0 encoding=utf-8?
 s:Module xmlns:fx=http://ns.adobe.com/mxml/2009; 
 xmlns:s=library://ns.adobe.com/flex/spark 
 xmlns:mx=library://ns.adobe.com/flex/mx 
implements=com.storefront.interfaces.controller.ITest
 
   fx:Declarations
   !-- Place non-visual elements (e.g., services, value objects) 
 here --
   /fx:Declarations
   
   s:VGroup width=100% /
 /s:Module
 
 Cheers,
 
 Philip





[flexcoders] Re: ModuleLoader.child is null

2011-11-04 Thread valdhor
I do it a different way than you which you may like to try...

private function onReady(e:ModuleEvent):void
{
 var ml:ModuleLoader = e.target as ModuleLoader;
 // cast the module (the child property of the ModuleLoader) to the
 // ITest interface. If the child implements this interface
 // ichild will not be null.
 var ichild:* = ml.child as ITest;
 if(ichild != null)
 {
 // Pass data to module via interface
 ichild.somedataiwanttopass = this.thedataiwanttopass;
 }
}

Using this I have never found the child to be null (Although I do
check).



--- In flexcoders@yahoogroups.com, Philip Smith loudjazz@... wrote:


var test:ITest ITest(this._moduleLoader.child); // null

 The module implements ITest. Regardless, before the module is cast to
an interface, this._moduleLoader.child is null. I read on another thread
that the module 'ready' event may be dispatched before it's ready...


 To: flexcoders@yahoogroups.com
 From: valdhorlists@...
 Date: Fri, 4 Nov 2011 16:10:22 +
 Subject: [flexcoders] Re: ModuleLoader.child is null




























   In your module code I don't see where it implements
com.storefront.interfaces.controller.ITest. If there is no
implementation of the interface, the child will be null.



 --- In flexcoders@yahoogroups.com, method_air loudjazz@ wrote:

 

  Can anyone explain why ModuleLoader.child is null in the module
event 'ready' event listener:

 

  this._moduleLoader = new ModuleLoader();

  this._moduleLoader.url = ImageComparisonModule.swf; //

  this._moduleLoader.addEventListener(ModuleEvent.READY, onReady);

 

  private function onReady(e:ModuleEvent):void

  {

   var test:ITest ITest(this._moduleLoader.child); // null

  }

 

  Module code:

 

  ?xml version=1.0 encoding=utf-8?

  s:Module xmlns:fx=http://ns.adobe.com/mxml/2009;

  xmlns:s=library://ns.adobe.com/flex/spark

  xmlns:mx=library://ns.adobe.com/flex/mx

implements=com.storefront.interfaces.controller.ITest

  

   fx:Declarations

!-- Place non-visual elements (e.g., services, value objects)
here --

   /fx:Declarations

 

   s:VGroup width=100% /

  /s:Module

 

  Cheers,

 

  Philip

 




[flexcoders] Re: HttpService error handling

2011-11-03 Thread valdhor
Have you tried using an AsyncToken?

--- In flexcoders@yahoogroups.com, Sells, Fred fred.sells@... wrote:

 I'm using Flex 4.1 with a django backend.  Django provides a really
 useful HTML error traceback when it fails.  Currently I then have to
 manually insert the offending url into the browser url to see the error
 details when debugging.  That's a pain.   I would like to subclass
 HttpService to provide a generic automatic solution, but I'm having
 trouble.
 
  
 
 My typical pattern is
 
 Var parms:Object = new Object()
 
 Parms.a=3
 
 Parms.b=4
 
 MyHttpService.url = http://yadda.yadda.yadda/root/function;
 
 MyHttpService.send(parms)
 
  
 
 When the faultHandler is called I would like to do something like this
 
 navigateToURL( new URLRequest(
 Configure.getServer()+'getpdf?id='+parms.id+resid=+parms.resid ) ); 
 
  
 
 but I cannot find a way to get the parms back from the HttpService in
 order to create the URLRequest string.  I've tried the
 MyHttpService.request object but that appears to be empty.  It won't
 expand in debugger view and a for loop does not iterate through it.
 
  
 
 Can anyone offer a suggestion?
 
  
 
 Thanks,
 
 Fred.





[flexcoders] Re: Flex HTTP Service Charset

2011-11-01 Thread valdhor
I'm sorry, I couldn't quite understand the error you are getting.

Could you copy/paste the exact error you get as well as the XML String that is 
returned.

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

 Dear Flexer, 
 
 I'm a french user, and I have some problem with charset.
 
 Indeed, I try to use httpservice to load data in datagrid.
 
 To do that, I use the php file, you can read below.
 
 ?php
 include 'functions.php';
 require_once 'MySQL.php';
 require_once 'conf.php';
 
 header(Content-Type: text/xml; charset=ISO-8859-1); 
 
 
 $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PWD, DB_DATABASE);
 if (mysqli_connect_errno()) {
 printf(Échec de la connexion : %s\n, mysqli_connect_error());
 exit();
 }
 
 // If a connection was established, run the query:
 if ($dbc) { 
   // Define the query:
   $q ='SELECT 14TypeRdv.trIndex, 14TypeRdv.trCode, 14TypeRdv.trNom, 
 14TypeRdv.trDurDef, 14TypeRdv.trDurPrat, 14TypeRdv.trCouleur FROM 14TypeRdv';
   }
   
 // Run the query:
   $r = mysqli_query($dbc, $q);
   
   $reponse = typeRDVs;
   
 
   // Confirm that some rows were returned:
   if (mysqli_num_rows($r)  0) {
   // Fetch every row and print it as XML:
   while ($row = mysqli_fetch_array($r, MYSQLI_NUM)) {
  $reponse.=typeRDVid.$row[0]./id;
  $reponse.=code.$row[1]./code;
  $reponse.=nom.$row[2]./nom;
  $reponse.=duree.$row[3]./duree;
  $reponse.=tps.$row[4]./tps;
 $reponse.=color.$row[5]./color;
 
   $reponse.=/typeRDV;
  
   } 
   } 
   
   else
   {
   $reponse.=typeRDV/typeRDV;
 
   }
   $reponse.=/typeRDVs;
   
 echo $reponse;
 
 ?
 
 
 
 But when I test it in my brower the message xml file worth formatted appear.
 In flex, an error appear.
 
 Can you help me to solve that.
 
 Thanks





[flexcoders] Re: Flex 4.5 - Cell background color in datagrid

2011-10-31 Thread valdhor
I am currently still using Flex SDK 3.5a and this is the code in the
item renderer I use for background colors...

 override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 var g:Graphics = graphics;
 g.clear();
 g.beginFill(super.data.backgroundColor as String);
 g.drawRect(0, -2, unscaledWidth, unscaledHeight + 4);
 g.endFill();
 }


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

 Hi,

 I load some data with httpservice.
 In those data, I have a backgound color for each cell.
 Can you explain how to do to change background color accordind data in
dataprovider?
 I thinks I must use itemrender but I don't found how to use
dataprovider data to do that.

 Thaks for helping.




[flexcoders] Re: What version of Flash Builder do you have?

2011-10-27 Thread valdhor
Are you perhaps confusing the versions of Flash Buidler and Flex?

The Flash Builder Application is at 4.5.0.x

The Flex SDK is at 4.5.1

You can download Flex SDK builds at 
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5

Adobe packages the two items above and calls it Flash Builder 4.5.1

--- In flexcoders@yahoogroups.com, Kevin MacDonald kevinmacdonald@... wrote:

 If I launch Flash Builder and go to Help -- About I see Flash Builder
 version 4.5.0.308971, not 4.5.1. I have run all available software updates.
 I called Adobe and they said there is no FB 4.5.1. Yet, there is this
 Release Notes page on the adobe site.
 http://kb2.adobe.com/cps/905/cpsid_90599.html However, I am unable to find
 a place where I can download 4.5.1.
 
 Anyone know what's up? Am I missing something?
 
 Kevin





[flexcoders] Re: Datagrid's Itemrenderer - Access to Datagrid

2011-10-27 Thread valdhor
Even though it looks like you have an answer to your question I'd like to ask 
why you would want that?

It is always a much better practice to inject what you want into the item 
renderer instead of trying to reach back out to the original owner to get it. 
As Item Renderers are recycled this leads to major overhead, the inabilty to 
re-use the item renderer as well as tight coupling.

You may want to reconsider your use case and look at a different way of doing 
it. Telling us what you are trying to achieve may yield a best practices 
approach.

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 I have a custom itemrenderer in a GridColumn of a Spark Datagrid. I need
 to get access to the Datagrid from the custom itemrenderer. What's the
 best way to do this?
 
 Thanks, in advance.





[flexcoders] Re: Custom Itemrenderer - maintaining changed value in dropdownlist

2011-10-27 Thread valdhor
You will need the item renderer to act as an item editor. Also, you will need 
to add an extra field to the data provider to hold this value. On itemEditEnd 
event, update the dataprovider to reflect the change.

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 I have a custom itemrenderer for a datagrid's column that contains a
 dropdownlist (DDL). This DDL is populated with a set of numbers starting
 at 1 and stopping at the length of the itemrenderer's datagrid
 dataprovider's length (i.e. 1 thru 20). I then have the DDL'S
 selectedIndex set to the row number in which the DDL appears. So,
 looking at the datagrid, first row is set to 1, second row to 2, etc.,
 etc. The DDL is being populated correctly as well as its
 selectedIndexes. This is all being handled in the prepare function of
 the itemrenderer.
 
 The issue comes in when I go to change the DDL's value, if I scroll the
 datagrid, or mouse back over the DDL, the value of the DDL reverts back
 to the original value. I am pretty sure this has something to do with my
 code and the fact that it's been handled in the prepare function as well
 the itemrenderers being recycled(?). I am just not sure how to resolve
 it.
 
 I have included the prepare function code below:
 
  override public function
 prepare(hasBeenRecycled:Boolean):void {
 
 
  if(data != null) {
 
  // grab datagrid reference;
  dg = DataGrid(owner);
 
 
  // since prepare() is called several times only
 populate list_ac
  // to length of dg dataprovider.length;
  if( list_ac.length != dg.dataProvider.length){
 
  for(var i:int=0;i dg.dataProvider.length;i++) {
 
  list_ac.addItem(i+1);
  }
 
  }
 
  // set selected index of dropdownlist(ddl) for
 'this' itemrenderer
  // to match location in row of datagrid(dg);
  for(var j:int = 0;jdg.dataProvider.length;j++){
 
  if(data.question_id == 
 dg.dataProvider.getItemAt(j).question_id){
 
  ddl.selectedIndex = j;
  break;
 
  }
 
  }
 
  }
  }
 
 Please let me know if anything is unclear as I tried to make it as
 straightforward as possible. Thanks, in advance.





[flexcoders] Re: Hello Friend...

2011-10-27 Thread valdhor
Is there any way wen can block this address until we are sure it will not spam 
the list?

--- In flexcoders@yahoogroups.com, jitendra jain jitendra_jain_2007@... wrote:

 pHello Friend.breveryone was worried that I would amount to nothing this 
 picked me up when I was down now im back in control please keep this between 
 usbra 
 href=http://call-tv.cba.pl/MichaelFerguson69.html;http://call-tv.cba.pl/MichaelFerguson69.html/abrc
  ya/p





[flexcoders] Re: .as vs .mxml best practices

2011-10-27 Thread valdhor
It's as simple as

mx:Script source=includes/Sample3Script.as/

All it does is include the AS file at that point. Everything inside the MXML 
file is available to the AS file - no custom events necessary.

See http://livedocs.adobe.com/flex/3/html/help.html?content=usingas_6.html

--- In flexcoders@yahoogroups.com, Sells, Fred fred.sells@... wrote:

 Embedding the ActionScript in the .mxml file is fine up to a point.  Now
 I've got quite a bit of logic dealing with the handling of DnD on an
 mx:DataGrid and I would like to move that code into a .as file just to
 keep my sanity and to take advantage of the outline feature of the IDE.
 I may also be able to use it (or subclass it) to handle the similar
 actions on a List.
 
  
 
 I'm not really certain of the right way to go about that and to be
 able to reference all the id's within the remaining mxml.  Similarly, I
 would like to be able to listen for the events from the mxml without
 having to define and dispatch custom events.
 
  
 
 This is probably basic stuff for those of you who are really into the
 technology, but I could use a jump start - even a link to a reasonable
 tutorial would be fine.
 
  
 
 FWIW I'm using 4.1 and plan to upgrade to 4.5 as soon as I get some
 breathing room in my deadlines.
 
  
 
 Thanks in Advance,
 
  
 
 Fred.





[flexcoders] Re: Flex 4.1 VBOX background renderer fails

2011-10-25 Thread valdhor
I agree with Tim - use an item renderer. Inside the IR, use a graphics fill to 
set your background color.

--- In flexcoders@yahoogroups.com, turbo_vb TimHoff@... wrote:

 In practice, itemRenderers actually tend to be the best candidate for skins.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  You cannot set the backgroundColor of the renderer.  Backgrounds are 
  removed in order to allow alternating background colors to show through.  
  But you should be able to set it on the TextArea.
  
  
  On 10/24/11 6:40 PM, Sells, Fred fred.sells@ wrote:
  
  
  
  
  
  
  Yes I tried setStyle() as well as styleName= with no success.  I could not 
  set the backgroundColor property in actionscript (compiler did not 
  recognize property) but I could set that property in mxml to a binding 
  expression and set the color in the bound variable.  Suspect bug but 
  deadlines rapidly approaching and this works.
  
  I'll try upgrading to 4.5 once I get this delivery out.
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yah! oogroups.com] On 
  Behalf Of Alex Harui
  Sent: Monday, October 24, 2011 7:41 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Flex 4.1 VBOX background renderer fails
  
  
  
  Did you try myText.setStyle(backgroundColor, ...)?
  
  
  On 10/24/11 9:59 AM, Sells, Fred fred.sells@ wrote:
  
  
  
  
  
  
  I'm using a VBox as a renderer for a datagrid as shown below.  I've
  tried every combination I can think of but I can only set the background
  color of the mx:TextArea in the mxml.  I need to change it in the
  actionscri! pt.  I've tried styles and properties with no success. n! 
  bsp;I'm brreluctant to change wrapper or children since I had a very hard 
  time
  getting it to work with a custom row height.  I used HTML text so I
  could add some bold/font color decoration; although that requirement has
  dissipated.
  
  ?xml version=1.0 encoding=utf-8?
  mx:VBox xmlns:fx=http://ns.adobe.com/mxml/2009;
   xmlns:s=library://ns.adobe.com/flex/spark
   xmlns:mx=library://ns.adobe.com/flex/mx
   borderThickness=0
   verticalScrollPolicy=off horizontalScrollPolicy=off
   paddingBottom=0 paddingLeft=0 paddingRight=0
  paddingTop=0
   
  fx:Script
  ![CDATA[
  private var _data:Object;
  
  public static var PAYOR_COLORS:Object
  ={0:pink, 1:lightgreen,! 3:libhtblue, 8:yellow};
  
  override public function set
  data(value:Object):void{
  _data = value;
  mytext.htmlText = set data called;
  if (_data==null ||
  _data.resident__id==0) {
  mytext.visible = false;
  }else{
  mytext.visible = true;
  var color:String =
  PAYOR_COLORS[_data.payor];
  if (color==null) color=black;
  //mytext.backgroundColor =
  color;
  mytext.opaqueBackground = color;
  mytext.htmlText = _data.name;
  trace(colordata.name =
  +color+, payor=+_data.payor);
  //mytext.styleName =
  payor+_data.payor;
  
  //this.setStyle(backgroundColor, yellow);
  
  //trace(style=payor+_data.payor+;);
  //this.setStyle(color,
  green);
  //background = true;
  trace(render +_data.name+,
  +color);}
  }
  
  
  override public function get data():Objec! t{
  re turn _data;
  }
  
  
  ]]
  /fx:Script
  mx:TextArea id=mytext width=100% height=100%
   useHandCursor=true buttonMode=true
  mouseFocusEnabled=false mouseChildren=false
   editable=false
   verticalScrollPolicy=off
  horizontalScrollPolicy=off
   
  !-- mx:htmlText  
  ![CDATA[Joe Bl0w font
  color=#FFMCD/font pline2/p]]
  /mx:htmlText
  
  --
  /mx:TextArea
  
  !-- sample use from web ![CDATA[
  Joe Blw font color=#FFHTML text/font in a bHalo
  TextArea control/b.
  pUse the uhtmlText property/u of the font
  color=#008800TextArea control/font to include basic HTML markup in!
  your text.
  ]]
  --
  /mx:VBox
  
  
  
  
  
  
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui
 





[flexcoders] Re: AIR - PHP : How to load local file to remote server

2011-10-25 Thread valdhor
You'll need to use the Flex FileReference class.

If you do a Google search for Flex File Upload you will find a number of 
examples.

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

 Dear Flex,
 
 I search some idea to load local file to remote server with php.
 I try to do that, but it didn't works
 
  var rq:URLRequest = new URLRequest(new urlManager().urlService() + 
 upload.php);
   rq.method = URLRequestMethod.POST;
   var varphp:URLVariables = new 
 URLVariables();
   varphp.userID = monIdPatient;
   varphp.url = myFileDir;
   
   rq.data = varphp;
   file.upload(rq, 'Filedata');
 
 
 ?php
 if(isset($_POST['myFileDir']))  
 $patRoot=$_POST['myFileDir'];
 
 $file_temp = $_FILES['Filedata']['tmp_name'];
 $file_name = $_FILES['Filedata']['name'];
 
 $file_path = $_SERVER['DOCUMENT_ROOT'].$patRoot;
 
 //checks for duplicate files
 if(!file_exists($file_path./.$file_name)) {
 
  //complete upload 
  $filestatus = move_uploaded_file($file_temp,$file_path./.$file_name);
 
  if(!$filestatus) {
  $success = false;
  array_push($errors,Upload failed. Please try again.);
  }
 
 }
 else {
 $success = false;
 array_push($errors,File already exists on server.);
 }
 
 echo $file_path;
 
 
 
 Thanks for helping.





[flexcoders] Re: Why hhtpservice is too long

2011-10-21 Thread valdhor
I suggest you move from XML to Remote Objects.

You obviously have control of both the server and the Flex client. Currently 
you are retrieving data from the server and converting it to an XML string that 
you return to Flex. On the Flex side you then decode the XML to a form that you 
can use. That encode/decode cycle adds additional complexity and time to your 
data transfer tasks.

Remote Objects use a compressed binary stream to transfer data. You will 
probably find that the amount of data transferred will be around one tenth of 
what you are currently seeing. There is no need to do any conversion - You 
create objects on the server for each row; Put the objects in an array; And 
return the array to Flex. On the flex side you create an Array Collection from 
the resultant array and can use the objects directly. These objects are called 
DTO (Data Transfer Objects) and generally have no methods attached.

When I first started out with Flex I used XML as that seemed to be the easiest 
way and Remote Objects looked difficult to learn. Once I put in the time to 
learn and found out the benefits I never looked back. Now I only use XML in 
SOAP solutions.

I would also suggest using WebORB for PHP as your middleware for Remote 
Objects. I have been using it for years and it is rock solid. There is a 
community version which is free for use but can also be licensed if you want 
enterprise support.

If you are returning 17,000 rows you probably want to look at data paging of 
your data grid. What I do is calculate the space available to the datagrid and 
calculate the maximum number of rows that can be seen. Then in the request I 
pass an offset and rowcount property to the server. On the server I use these 
properties in a LIMIT clause to MySQL. If the offset is zero I also add 
SQL_CALC_FOUND_ROWS to the query so I can return total number of rows for the 
query so I can calculate the number of pages.

Using both of the above techniques should optimize your data request/response 
times.

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

 Dear flexer,
 
 I try to load a datagrid with httpservice.
 But, I'm so desapointed because load about 17000 lines take around 5 sec.
 So can you help me to optimize this time.
 
 ?php 
 
 // Send the content-type header:
 header('Content-Type: text/xml');
 
 
 // Include the database information script:
 require_once ('MySQL.php');
 require_once ('conf.php');
 include('functions.php');
 
 // Connect to the database:
 $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PWD, DB_DATABASE);
 
 // If a connection was established, run the query:
 if ($dbc) { 
 
   // Define the query:
   $q ='SELECT 20Patients_1012.paIndex, 20Patients_1012.paNomP, 
 20Patients_1012.paPrenom, 20Patients_1012.paCodePostal, 
 20Patients_1012.paDossier1, 20Patients_1012.paDossier2, 
 20Patients_1012.paNaissance, 20Patients_1012.paNumTel1, 
 30Traitemnt_201223.ttTStatutP, 30Traitemnt_201223.ttDateStatut, 
 12Praticien_02.prInitiales FROM 20Patients_1012 JOIN 30Traitemnt_201223 ON 
 20Patients_1012.paIndex = 30Traitemnt_201223.ttIndex JOIN 12Praticien_02 ON 
 30Traitemnt_201223.ttPraticien = 12Praticien_02.prIndex';
   }
   
   // Run the query:
   $r = mysqli_query($dbc, $q);
   
   $reponse = patients;
 
   // Confirm that some rows were returned:
   if (mysqli_num_rows($r)  0) {
   // Fetch every row and print it as XML:
   while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) {
  $reponse.=id.$row[0]./idpr.$row[2]./prst
   .$row[8]. .$row[9]./std1.$row[4]. / 
   
 .$row[5]./d1dn.$row[6]./dnpr2.$row[10]./pr2
   .dn.$row[6]./dn;
 
   } // End of WHILE loop.
   
 
   } // End of mysqli_num_rows() IF.
 
 } // End of $dbc IF.
 
 // Complete the XML:
 $reponse.=/patients;
 printf (%s,$reponse);
 
 mysql_free_result($reponse);
 ?
 
 Thanks





[flexcoders] Re: problem accessing menuBar component Sub-Items

2011-10-17 Thread valdhor
Add an event listener to the menubar itself. In the event listener you can find 
out which item was clicked based on the label property.

--- In flexcoders@yahoogroups.com, Gustavo Duenas gduenas@... wrote:

 Hi I have this menu bar.
 
 mx:MenuBar width=1079.697 height=40.151516 id=mBar  
 labelField=@label creationComplete=init() fontSize=14  
 fillAlphas=[0.26, 0.26, 0.26, 0.26] fontWeight=bold  
 cornerRadius=6 color=#071243 fontFamily=Arial  
 verticalCenter=-4 left=9.05
mx:dataProvider
mx:XMLListCollection
mx:XMLList xmlns=
item label=Petici—n de Oraci—n/
item label=Petici—n de Visita/
item label=Cont‡ctenos/
item label=Publicaciones
item label=La Biblia Antiguo Testamento groupName=libros/
item label=La Biblia Nuevo Testamento groupName=libros/
item label=Concordancia Tem‡tica de la Biblia groupName=libros/
item label=Doctrina Cristiana groupName=libros/
/item
item label=Iglesia FLS Blog/
item label=Donaciones/
/mx:XMLList
/mx:XMLListCollection
/mx:dataProvider
 
 I wan to access the group name libros items to add evenListeners to  
 them.
 
 I have this code to access the main ones on the menuBar.
 
 
protected function init():void{
 
var mbiBlog:MenuBarItem= mBar.menuBarItems[4] as MenuBarItem;
mbiBlog.addEventListener(MouseEvent.CLICK, openWindowBlog);
var mbiAntiguoT:MenuBarItem = mBar.menuBarItems[3].root[1] as  
 MenuBarItem;// I've been trying to access the sub-Items I really don't  
 know how, some help please.
mbiAntiguoT.addEventListener(MouseEvent.CLICK, windowBibliaAntigua);
 
}





[flexcoders] Re: Flex, HTML5, Javascript...oh my!

2011-10-14 Thread valdhor
Thanks for that. You're right; I'd never heard of it before. All I ever knew 
about was SproutCore.

--- In flexcoders@yahoogroups.com, Johannes Nel johannes.nel@... wrote:

 look, i don't want to get into a fight with people, but i can really say
 that the google closure toolset makes every other html/javascript approach
 look absolutely stoneage. a compiler, i mean a real compiler,
 it eliminates dead code, does your optimisations for you, you don't have to
 write javascript like you are the compiler. if you play nice and religiously
 annotate your code, you get static type checking (huge benefit!) proper OO,
 interfaces (granted no way to really do is-A)
 
 lots of components
 http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/
 
 components actually have a livecycle (believe me, for most people playing
 around with javascript this is a radical concept).
 there is a framework (called relief), but i don't use it, it is not trying
 to solve the problems I am solving. I implemented my own binding system in a
 matter of hours, you can even add your own passes to the compiler (at any
 point, so pre abstract syntax tree (AST) or use the AST to do your own
 transforms)
 
 I tend to code in netbeans since the code completion is decent and I can
 also say the chrome debugger and profiler is extremely sweet. other people
 use different tools.
 
 if you like flex I think you will like closure, it is like the step up from
 flash to flex which I took in 2004 and I went like whaaa this is
 awesome.
 check this video http://www.youtube.com/watch?v=M3uWx-fhjUc
 
 now the bad, people don't seem to know about it, so it does not get all the
 loving it deserves, the lists however are extremely responsive (there are
 lists for all the different parts of the toolsets, but using all of them
 together makes for insane results)
 the compiler is not very fast, but using stuff like plovr (build tool)
 people make life pretty easy.
 
 i am just going to flame here as a finish, but jquery is for building mom
 and pop crap, if you plan to do any kind of real development in javascript
 and you like your wrists, closure is really the only way to go IMO.
 
 On Thu, Oct 13, 2011 at 9:52 PM, jamesfin james.alan.finnigan@...wrote:
 
  **
 
 
  As a devoted flex developer of over five years now, I'm getting the nudge
  by management to get as comfortable with HTML5/Javascript as I currently am
  with MXML/Actionscript. Not my decision.
 
  That said, I figured this forum would be better suited to answer a few
  questions about html5/javascript rather than a endure throught a few
  flash-hater filled javascript forums. ;)
 
  Knowing the following about common flex development practices, what are the
  analogs with flex when using javascript, if any at all?
 
  FlashBuilder = ? (i.e. dreamweaver?)
  MXML = HTML
  Actionscript = Javascript
  RobotLegs = ?
  AS3Signals = ?
  Others, feel free to contribute...
 
  Also,
  Using Robotlegs affords many comforts towards MVC development practices. In
  that context, can other analogs be made in HTML5/Javascript where separate
  files are used for each of these areas? Links and/or examples would be
  great.
 
  View = ?
  Mediator = ?
  Service = ?
  Model = ?
  Controller = ?
  Dependency Injection = ?
  Signals = ?
 
  It would appear as if SproutCore shares some of the attributes we enjoy in
  Flex but would like to hear what Javascripts frameworks are most friendly to
  Flex Developers.
 
  Thanks in advance!
 
   
 
 
 
 
 -- 
 j:pn
 \\no comment





[flexcoders] Re: Any difference between instantiating in declaration vs. init()

2011-10-13 Thread valdhor
In your use case probably no. It all comes down to when you want to use the 
variable you are creating.

In my case I always like my variables in a predetermined state when I create 
them so, if I can, I'll always initialize them in the declaration. It also 
saves an extra line of code ;-}

--- In flexcoders@yahoogroups.com, luvfotography ygroups@... wrote:

 Hi, 
 Is there any difference between initializing a variable in the declarations 
 vs. in the creationComplete function?
 
 private var scrollTimer:Timer = new Timer(500,1);
  
  or
 
 private var scrollTimer:Timer;
 
 private function init():void {
  scrollTimer = new Timer(500,1);
 }
 
 When/Why should I use one vs. the other?
 thanks,





[flexcoders] Re: accessing buttons on button bar

2011-10-12 Thread valdhor
Add an event listener for the menubar rather than each item then check the 
label of the item that was clicked in the event.

See http://livedocs.adobe.com/flex/3/html/help.html?content=menucontrols_6.html 
for an example.


--- In flexcoders@yahoogroups.com, Gustavo Duenas gduenas@... wrote:

 Hi I have this code, for a title bar, so far I can add behaviours to  
 the main buttoms but I come with the ideo to add new
 sub-buttoms and I'm lost how can I put eventlisteners to them?
 
 here is the code of my buttom bar
 
 mx:MenuBar width=1079.697 height=40.151516 id=mBar  
 labelField=@label creationComplete=init() fontSize=14  
 fillAlphas=[0.26, 0.26, 0.26, 0.26] fontWeight=bold  
 cornerRadius=6 color=#071243 fontFamily=Arial  
 verticalCenter=-4 left=9.05
   mx:dataProvider
   mx:XMLListCollection
   mx:XMLList xmlns=
   item label=Petici—n de Oraci—n/
   item label=Petici—n de Visita/
   item label=Cont‡ctenos/
   item label=Publicaciones
   item label=La Biblia Antiguo 
 Testamento/
   item label=La Biblia Nuevo 
 Testamento/
   item label=Concordancia Tem‡tica de 
 la Biblia/
   item label=Doctrina Cristiana/
   /item
   item label=Iglesia FLS Blog/
   item label=Donaciones/
   /mx:XMLList
   /mx:XMLListCollection
   /mx:dataProvider
 
 
 here is the code of the CDATA script.
 
 protected function init():void{
   
   var mbiBlog:MenuBarItem= mBar.menuBarItems[4] 
 as MenuBarItem;
   mbiBlog.addEventListener(MouseEvent.CLICK, 
 openWindowBlog);
   
   }
 
 the buttoms I'd like to know how can I put the eventListeners are
 item label=La Biblia Antiguo Testamento/
   item label=La Biblia Nuevo 
 Testamento/
   item label=Concordancia Tem‡tica de 
 la Biblia/
   item label=Doctrina Cristiana/
 
 Some help will be appreciated.
 
 Gustavo





[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-10 Thread valdhor
Sorry, I am out of my depth here. I don't use ColdFusion.

All I can suggest is creating a debug file on the server and dump to the file 
to see if you are getting the desired response. After that, use Charles to see 
if the server is sending the correct response.

--- In flexcoders@yahoogroups.com, ZIONIST stinasius@... wrote:

 Hi guys, i have changed from using a cfc to using cfm. And when i do a 
 cfdump, i get the feed showing up. When i try to point flex to the cfm, and 
 run the app i get no data. Below is the code. Could someone please help.
 
 flex code
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute
   creationComplete=init()
   
   mx:Script
   ![CDATA[
   import mx.collections.ArrayCollection;
   import mx.rpc.events.ResultEvent;
 
   [Bindable]
   private var _rssResults:ArrayCollection;
 
   private namespace atom=http://www.w3.org/2005/Atom;;
   use namespace atom;
 
   private function processResult(event:ResultEvent):void
   {
   var xmlList:XMLList=event.result.channel.item 
 as XMLList;
   for each (var item:XML in xmlList)
   {
   var myDate:String=item.PUBLISHEDDATE;
   myDate=myDate.slice(0, 22);
   _rssResults.addItem({title: item.TITLE, 
 date: myDate});
   }
   }
 
   private function init():void
   {
   _rssResults=new ArrayCollection();
   tweetFeed.send();
   }
   ]]
   /mx:Script
 
   mx:HTTPService id=tweetFeed
   url=cfcs/twitter.cfm
   result=processResult(event)
   resultFormat=e4x/
 
   mx:List id=twitterFeed dataProvider={_rssResults}
itemRenderer=itemRenderers.tweetFeedRenderer/
 
 /mx:Application
 
 Coldfusion Code
 ===
 cfset feedurl = 
 http://search.twitter.com/search.atom?q=from%3ARealtrOnline; /
 cffeed source=#feedurl# properties=feedmeta query=feeditems /
 cfdump var= #feeditems# label= feedItems /





[flexcoders] Re: help with a repeater

2011-10-10 Thread valdhor
As I said, it is easier to package up the items into a component and
repeat that. To that end, here is an example (Unfortunately, it appears
that vimeo is set up not to allow embedding. It does work with other web
sites however):

Application:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical xmlns:Vimeo=Vimeo.*
creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 import mx.collections.XMLListCollection;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;

 private var vimeoListArrayColl:ArrayCollection;

 private function onCreationComplete():void
 {
 vimeoService.send();
 }

 private function onResult(event:ResultEvent):void
 {
 vimeoListArrayColl = event.result.videos.video as
ArrayCollection;
 vimeoRepeater.dataProvider = vimeoListArrayColl;
 }

 private function onFault(event:FaultEvent):void
 {

 }
 ]]
 /mx:Script
 mx:Repeater id=vimeoRepeater
 Vimeo:VimeoList vimeoItem={vimeoRepeater.currentItem}/
 /mx:Repeater
 mx:HTTPService id=vimeoService
url=http://vimeo.com/api/v2/iglesiafls/videos.xml;
resultFormat=object result=onResult(event) fault=onFault(event)/
/mx:Application

VimeoList.mxml:
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 mx:Script
 ![CDATA[
 import mx.managers.PopUpManager;

 [Bindable] public var vimeoItem:Object;

 private function openWindowVimeo(event:MouseEvent):void
 {
 var myVimeoWindow:VimeoWindow =
PopUpManager.createPopUp(this, VimeoWindow, true) as VimeoWindow;
 myVimeoWindow.windowTitle = vimeoItem.title;
 myVimeoWindow.iFrameSource = vimeoItem.url;
 PopUpManager.centerPopUp(myVimeoWindow);
 }
 ]]
 /mx:Script
 mx:Image source={vimeoItem.thumbnail_medium} width=200
height=150/
 mx:Text id=titleText text={vimeoItem.title} color=#F5FBFC
fontSize=14 width=300/
 mx:Text text={vimeoItem.description} color=#F5FAFB
width=300/
 mx:Text text={vimeoItem.url}/
 mx:Button name={vimeoItem.title} label=ver video
click=openWindowVimeo(event) enabled=true/
/mx:VBox

VimeoWindow.mxml:
?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical width=800 height=600
 xmlns:flexiframe=http://code.google.com/p/flex-iframe/;
 title={windowTitle}
 showCloseButton=true
 close=titleWindow_close(event);
 mx:Script
 ![CDATA[
 import mx.events.CloseEvent;
 import mx.managers.PopUpManager;

 [Bindable] public var windowTitle:String;
 [Bindable] public var iFrameSource:String;

 private function titleWindow_close(evt:CloseEvent):void
 {
 PopUpManager.removePopUp(this);
 }
 ]]
 /mx:Script
 flexiframe:IFrame id=iFrameBySource width=100% height=100%
source={iFrameSource}/
/mx:TitleWindow

You will need flex-iframe from
https://github.com/flex-users/flex-iframe/ to embed the HTML.

Note that this is a quick and dirty example with no error checking etc.
You should use this to further your understanding rather than as a basis
for production code.

--- In flexcoders@yahoogroups.com, Gustavo Duenas gduenas@... wrote:

 This repeater is making me crazy, someone can help me out.

 Hi I have a repeater that has a button and the button open a title
 window component from flex
 So far I use the name property of the button to pass the title from
 the repeater to the title of the titlewindow

 here it is:
 Vimeo is the name of the repeater
 mx:button name={vimeo.currentItem.title}

 on the as3:
 myWindow.title=event.currentTarget.name;

 so far I can open it with the names from the list.

 Also I have an html inside of the title window and I want to set its
 location from the parameters of the repeater
 so here is when it start to be hard to imagine a way to retrieve that
 information from the repeater and pass it to
 the location.

 here is my code.
 import mx.managers.PopUpManager;
  import mx.containers.*;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import flsWindow;

private function
 openWindowVimeo(event:MouseEvent):void{
  var
 myVimeoWindow:TitleWindow= TitleWindow(PopUpManager.createPopUp(this,
 flsWindow, true));
  myVimeoWindow.width=800;
 

[flexcoders] Re: Parsing Soap Response

2011-10-10 Thread valdhor
Have you seen the training video at 
http://tv.adobe.com/watch/adc-presents/build-a-flex-application-that-connects-to-a-soap-web-service/

--- In flexcoders@yahoogroups.com, David Nester dnestertx@... wrote:

 Greetings!
  
 I have a SOAP response from a webservice that i am trying to parse to a 
 datagrid.  The information that comes back to the result handler is in the 
 format of:
  
 SOAPENV:ENVELOPE
 -- soapenv:body
 ns2:serviceResponse
 --ns2:return
 ns1:data
  
  
 I'm trying to figure out how to grab everything in ns1 and populate that 
 information to a grid.  I'm very new to flex - anyone out there who can help?
  
 Thanks so much!





[flexcoders] Re: sandbox problem someone help me

2011-10-10 Thread valdhor
These security errors are generally at the other end. ie. ustream (Or whatever 
domain you are trying to call) has to have a crossdomain.xml file that allows 
you to call it. There is nothing you can do at your end to override this. They 
have to let you access their stuff (Or provide an API to you)

--- In flexcoders@yahoogroups.com, Gustavo Duenas gusduenas@... wrote:

 Hi is there a way to load a remote swf that calls a live feed from ustream? I 
 have this viewer and I cannot load it inot air, because it keeps telling me 
 of the sandbox violation 
 even though I did the 
 Security.allowDomain(http://leftandrightsolutions.com;); in the mx:Script 
 part.
 Someone could point me out to a good tutorial or give a hand?
 
 gus





[flexcoders] Re: DataGrid column width to be calculated by headerText

2011-10-10 Thread valdhor
Nope, no quick fix.

You would need to loop over all the data and find the longest strings. You 
would then need to calculate the widths based on FontMetrics for the font you 
are using.

I have seen an example in the past so Google should be your friend.

--- In flexcoders@yahoogroups.com, kg_andrew21 grizzly33@... wrote:

 Hey guys,
 
 this is my first post, I tried searching for the issue but came up with no 
 matches, so I hope it won't be a duplicate.
 
 So what I want to do is this: have a DataGrid that has all its column's width 
 set to the greatest of these 2 values: its typicalItem's width (which without 
 specified is the dataProvider's first item) or the headerText's width so that 
 the headerText will not get cut off.
 Currently the problem is that if the typicalitem's width is smaller than the 
 headerText than the headerText is cut off, but I don't want that, I want 
 headerText to be fully displayed in all of my columns.
 
 What I can do is set the minWidth on each of the columns manually so that the 
 headerText will surely not get cut off. This works perfectly but its a lot of 
 pain to do that by hand. So my question is is there a method or quick fix to 
 prevent headerText to be cut off? One solution that I think could work is to 
 determine the width that's required by the headerText and set minWidth to 
 that for that column. 
 
 thanks,
 Andrew





[flexcoders] Re: custome list scroller issue

2011-10-10 Thread valdhor
Copy the built-in scroller code to your custom component and modify that.

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

 I create a custom Scroller Skin all code designed by flash catalyst.
 My computer has two monitor when I drag the application to the other monitor 
 then switch to full screen,
 the list controller is still display as that monitor resolution.
 If I use the default list scroller the trouble is gone, the list adjust his 
 content to the monistor.
 How can I make the custome scroller skin has the same ability as the default 
 scroller.





[flexcoders] Re: binding controls with Xml in flex

2011-10-10 Thread valdhor
Google two way binding.

--- In flexcoders@yahoogroups.com, Asad Zaidi asadzaidi23@... wrote:

 hello every body,
 i need to bind Xml with my flex controls. by binding i mean that data should 
 flow in both directions, from xml to control and also control to xml. for e.g 
 there is textinput binded with xml tag. i want value of xml should be 
 displayed in text input but if user changes the value and submitt form then 
 value in xml should get update automatically. But i am unable to get 2nd 
 scenario. kindly help me its very urgent. 
 
 thnks in advance.
 
 Zaidi.





[flexcoders] Re: help with a repeater

2011-10-07 Thread valdhor
I have had better results with a repeater if I bundle all the components in the 
repeater into a single component and then repeat that. You can create public 
variables in this custom component to hold values you need to pass in.

--- In flexcoders@yahoogroups.com, Gustavo Duenas gduenas@... wrote:

 I have a repeater which reads a xmllist from vimeo, it works and do  
 the repeat but when I tried to pass info from the repeater to the  
 title window, something happens and I have an as3
 errror. this is  my code.
 
 mx:Script
   ![CDATA[
   import mx.managers.PopUpManager;
   import mx.containers.*;
   import mx.controls.Alert;
   import mx.rpc.events.FaultEvent;
   import mx.rpc.events.ResultEvent;
   import flsWindow;
   
   private function openWindowVimeo(event:MouseEvent):void{
   var myVimeoWindow:TitleWindow=  
 TitleWindow(PopUpManager.createPopUp(this, flsWindow, true));
   
 myVimeoWindow.title=vimeoService.lastResult.video.title;///this is  
 the one using the xmlList,
 it works but only the last title and with tags there is a way that my  
 different video titles will be in the opened windows?
 also when I try using the repeater like:
 myVimeoWindow.title=vimeo.currentItem.title
 is always giving me and error.
   
   }
   
 ///here is my repeater, it works, but I cannot open the window as I  
 want.
 mx:HTTPService id=vimeoService 
 url=http://vimeo.com/api/v2/iglesiafls/videos.xml 
  resultFormat=e4x fault=onFault(event)/
 mx:XMLListCollection id=myVimeoList  
 source={vimeoService.lastResult.video}/
   mx:VBox width=340 height=334 x=699 y=422
   mx:Repeater id=vimeo dataProvider={myVimeoList}
   mx:Image source={vimeo.currentItem.thumbnail_medium} 
 width=200  
 height=150/
   mx:Text text={vimeo.currentItem.title} color=#F5FBFC  
 fontSize=14 width=300/
   mx:Text text={vimeo.currentItem.description} color=#F5FAFB 
  
 width=300/
   mx:LinkButton label=ver video click=openWindowVimeo(event) 
  
 id=vimeoButton enabled=true/
   
   /mx:Repeater
   /mx:VBox
 
 Could someone help me out
 
 gus





[flexcoders] Re: is there another flexcoders list?

2011-10-07 Thread valdhor
Of course, all the most knowledgeable people are still here because they can't 
stand the chatter over there ;-}

--- In flexcoders@yahoogroups.com, Jeffry Houser jeffry@... wrote:

 
   This list started to die after Adobe launched their new forums.  I 
 think that was a couple of years ago.  Adobe, basically, stopped 
 directing people to this list and instead started directing them to the 
 forums.
 
   So, that is where you'll find the traffic.
 
 On 10/7/2011 9:44 AM, Gustavo Duenas wrote:
 
  Hi, is there another list, it's been ages since someone just answer
  me...it is just me or everyone else has migrated to some other list?
 
  Gus
 
  
 
 
 -- 
 Jeffry Houser
 Technical Entrepreneur
 203-379-0773
 --
 http://www.flextras.com?c=104
 UI Flex Components: Tested! Supported! Ready!
 --
 http://www.theflexshow.com
 http://www.jeffryhouser.com
 http://www.asktheflexpert.com
 --
 Part of the DotComIt Brain Trust





[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-07 Thread valdhor
This is a CF error. I don't know much about CF but the error is saying that you 
are not allowed to access that method remotely.

Is there some setting in CF that tells it which methods are remotely 
accessible? Is the crossdomain file set up correctly?

From my point of view, it has to be some configuration problem with CF.

Of course, I could be wrong (And probably are) so any CF masters like to jump 
in here?

--- In flexcoders@yahoogroups.com, ZIONIST stinasius@... wrote:

 Hi guys below is the code i came up with but i get this error 
 faultCode:Server.Processing faultString:'Unable to invoke CFC - The method 
 'getTweets' in component 
 C:\ColdFusion9\wwwroot\twiiterCFlex\src\cfcs\twitter.cfc cannot be accessed 
 remotely.' faultDetail:''
 
 flex code
 =
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   layout=absolute
   creationComplete=tweetSvc.getTweets()
 
   mx:Script
   ![CDATA[
   import mx.rpc.events.ResultEvent;
   import mx.rpc.events.FaultEvent;
   import mx.collections.ArrayCollection;
   import mx.controls.Alert;
   import mx.managers.CursorManager;
   [Bindable]
   private var tweetAr:ArrayCollection;
 
   private function tweetResult(event:ResultEvent):void
   {
   tweetAr=event.result as ArrayCollection;
   }
   ]]
   /mx:Script
 
   mx:RemoteObject id=tweetSvc
destination=ColdFusion
source=twiiterCFlex.src.cfcs.twitter
showBusyCursor=true

 fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)
 
   mx:method name=getTweets
  result=tweetResult(event)/
 
   /mx:RemoteObject
 
   mx:List id=twitterFeed
dataProvider={tweetAr}
itemRenderer=itemRenderers.tweetFeedRenderer/
 
 /mx:Application
 
 
 coldfusion cfc
 ===
 
 cfcomponent
 cffunction name=getTweets access=public returntype=query

 
 cfset var qryGetTweets =  /
 
 cffeed source=http://twitter.com/status/user_timeline/RealtrOnline; 
 properties=meta query=qryGetTweets /
 
 cfreturn qryGetTweets /
 /cffunction
 /cfcomponent
 
 What am i missing?





[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-07 Thread valdhor
OK, so now it doesn't like the XML you are sending to the CFC.

What does Charles show as the XML string that is actually being sent? Does that 
XML pass a validation check? Does it look right?

--- In flexcoders@yahoogroups.com, ZIONIST stinasius@... wrote:

 I changed access to 'remote' on the cfc and when i run it i get this error 
 faultCode:Server.Processing faultString:'Unable to invoke CFC - Unable to 
 parse the feed: Either source specified is invalid or feed is malformed.' 
 faultDetail:'Error: Invalid XML'





[flexcoders] Re: RTE when setting spark gridcolumn visible property (f

2011-10-07 Thread valdhor
If that is the use case I would have built that data grid and columns on the 
fly in ActionScript. Why bother having columns in memory that you don't use?

--- In flexcoders@yahoogroups.com, bhaq1972 mbhaque@... wrote:

 The problem doesn't exist if the code is executed in the preintialize or 
 creationComplete event. However, I didn't want to mention that because it 
 takes the focus away from what looks like a bug in initialize. Why would one 
 column give a runtime error and the other not?
 Halo datagrid doesnt have this problem.
 
 In our scenario, some columns have no relevance to certain customers. Instead 
 of removing the column from the mxml, we store the column info (in this case 
 make invisible) in the database.
 During the datagrid initialze we make it invisible. The creationcomplete 
 event would be too late because by then the column would have rendered (for a 
 split second).
 
 Preinitialize would be ok...but other parts of my code (unrelated to this 
 problem) are failing because preinitialize is too early. i can't bare any 
 more code rewrites(but i suppose it keeps me in a job).
 
 
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  The column probably hasn't been created yet. Try the creationcomplete event 
  of the datagrid.
  
  --- In flexcoders@yahoogroups.com, bhaq1972 mbhaque@ wrote:
  
   I get a runtime error when I set the gridcolumn.visible property during a 
   datagrid initialize event. There is no problem's
   if its the first gridcolumn. Looks like a bug?
   
   Can anyone suggest a workaround? 
   
   
   s:DataGrid initialize=makeColumnInvisible()
 s:columns
   s:ArrayList
 s:GridColumn id=gc0 dataField=col0 headerText=col0/
 s:GridColumn id=gc1 dataField=col1 headerText=col0/
   
   ..
   public function makeColumnInvisible():void
   {
  gc1.visible = false;  // causes a RTE
  gc0.visible = false;  // doesnt give a problem
   ..   
   
   
   RangeError: Error #1125: The index 1 is out of range 0.
 at 
   spark.components.gridClasses::GridDimensions/setTypicalCellWidth()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1325]
 at 
   spark.components.gridClasses::GridDimensions/columns_visibleChangedHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1840]
 at 
   spark.components.gridClasses::GridDimensions/columnsCollectionChanged()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1800]
 at 
   spark.components::Grid/columns_collectionChangeHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Grid.as:4429]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at spark.components.gridClasses::GridColumn/set 
   visible()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridColumn.as:1564]
   ...
  
 





[flexcoders] Re: RTE when setting spark gridcolumn visible property (f

2011-10-05 Thread valdhor
The column probably hasn't been created yet. Try the creationcomplete event of 
the datagrid.

--- In flexcoders@yahoogroups.com, bhaq1972 mbhaque@... wrote:

 I get a runtime error when I set the gridcolumn.visible property during a 
 datagrid initialize event. There is no problem's
 if its the first gridcolumn. Looks like a bug?
 
 Can anyone suggest a workaround? 
 
 
 s:DataGrid initialize=makeColumnInvisible()
   s:columns
 s:ArrayList
   s:GridColumn id=gc0 dataField=col0 headerText=col0/
   s:GridColumn id=gc1 dataField=col1 headerText=col0/
 
 ..
 public function makeColumnInvisible():void
 {
gc1.visible = false;  // causes a RTE
gc0.visible = false;  // doesnt give a problem
 ..   
 
 
 RangeError: Error #1125: The index 1 is out of range 0.
   at 
 spark.components.gridClasses::GridDimensions/setTypicalCellWidth()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1325]
   at 
 spark.components.gridClasses::GridDimensions/columns_visibleChangedHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1840]
   at 
 spark.components.gridClasses::GridDimensions/columnsCollectionChanged()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridDimensions.as:1800]
   at 
 spark.components::Grid/columns_collectionChangeHandler()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Grid.as:4429]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at spark.components.gridClasses::GridColumn/set 
 visible()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\gridClasses\GridColumn.as:1564]
 ...





[flexcoders] Re: Reading barcodes

2011-09-28 Thread valdhor
I would have thought that the library you mention would work fine.

Barcodes don't change. Once you have it all working there does not need to be 
an update.

--- In flexcoders@yahoogroups.com, Richard Rodseth rrodseth@... wrote:

 Can anyone recommend a good strategy for reading barcodes on an AIR 3 mobile
 app?
 
 The as3 port of the zxing library does not appear to have been updated since
 2009, but may work well, for all I know.
 But it occurs to me, that this could also be a good opportunity for a native
 extension.
 
 Any experiences or thoughts?





[flexcoders] Re: exclude certain classes from debugging session

2011-09-28 Thread valdhor
I'm obviously not getting it then.

My project uses thousands of classes and I can debug it and just look at the 
classes I want.

What are you trying to do exactly? ie. What does monitor the activity taking 
place in a couple of the classes actually mean?

--- In flexcoders@yahoogroups.com, Wouter Schreuders wschreuders@... wrote:

 yes, I'm familiar with watch expressions but they don't really help me with
 this project, I'm working on a project with thousands of classes and want to
 monitor the activity taking place in a couple of the classes while excluding
 the rest.
 
 On 26 September 2011 16:59, valdhor valdhorlists@... wrote:
 
  **
 
 
  Just use watch expressions to see only the items you are interested in.
 
 
  --- In flexcoders@yahoogroups.com, Wouter Schreuders wschreuders@
  wrote:
  
   Hi All
  
   When debugging some code and stepping through or stepping over some code,
  is
   it possible to configure flex to not include certain classes in the
   debugging session or at least to entirely skip those classes from begin
   included in the debugging session(but they still need to execute, just
  don't
   want to see it)
  
   The reason for this is that sometimes I'm stepping though some code and
   there are certain classes just dont' want to know about (for instance
   tweening classes or robotlegs)
  
   Anyone know if this is possible?
  
   Thanks
  
   Wouter
  
 
   
 





[flexcoders] Re: exclude certain classes from debugging session

2011-09-26 Thread valdhor
Just use watch expressions to see only the items you are interested in.

--- In flexcoders@yahoogroups.com, Wouter Schreuders wschreuders@... wrote:

 Hi All
 
 When debugging some code and stepping through or stepping over some code, is
 it possible to configure flex to not include certain classes in the
 debugging session or at least to entirely skip those classes from begin
 included in the debugging session(but they still need to execute, just don't
 want to see it)
 
 The reason for this is that sometimes I'm stepping though some code and
 there are certain classes just dont' want to know about (for instance
 tweening classes or robotlegs)
 
 Anyone know if this is possible?
 
 Thanks
 
 Wouter





[flexcoders] Re: ClassFactory, properties, itemrenderers and changing prop dynamically

2011-09-22 Thread valdhor
I don't know about others here but IMHO a better user experience would be to 
remove the selected item from the source list. This way it is not even there to 
be selected. Just a simple matter of removing it from the dataprovider.

--- In flexcoders@yahoogroups.com, grimmwerks grimm@... wrote:

 Here's another convoluted question -- I've got a list that is bound to an 
 array of a certain Class - let's cal them Permissions.  In the Permissions 
 class you've got userId, read and write (booleans there, id for userId, 
 normal stuff).
 
 I'm using the same itemrenderer in two lists - a source list which is not 
 editable and a drop list which is;  the itemrenderer has an 'editable' 
 variable and I'm setting each list's ClassFactory to this same itemrenderer, 
 with one ClassFactory's properties setting editable to false, one to true.  
 All that is good.
 
 Now the strange request I JUST had from someone here is that once an item is 
 dragged and dropped from the source list to the drop list, the item in the 
 source list should dim to show that it's already been chosen, unable to 
 choose again.   I've created a property called itemEnabled in the 
 itemrenderer, defaulting to true (so it's ignored in the droplist basically).
 
 Here's the thing; it would be simple enough to set a particular item's 
 'itemenabled' property in the dataproviider and it would trickle down; but 
 since this is a list of cast objects that don't have the itemEnabled property 
 it's a no go...
 
 So is there a way of selecting an itemrenderer or item at a certain position 
 in the sourcelist and setting IT's itemEnabled to false? Is it something with 
 the classfactory for a specific item?
 
 
 Garry Schafer
 grimmwerks
 grimm@...
 portfolio: www.grimmwerks.com/





[flexcoders] Re: mx.controls.HTML in AS3 project

2011-09-16 Thread valdhor
According to the documentation it is in the standard mx.controls package. See 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/HTML.html

Of course, that means you will have to include the flex SDK. An AS3 only 
project probably doesn't include the SDK.

I just had a look at the framework.swc file where I would have expected to see 
mx.controls.HTML. It includes the mx.controls package but I don't see the HTML. 
H...

Anyone else?

--- In flexcoders@yahoogroups.com, rwgcoenen coenen.rob@... wrote:

 Hello group,
 I want to use the mx.controls.HTML component in a AS3 / AIR project.When
 I create a AS3/AIR project in Flash Builder it gives an error when I try
 to
 import mx.controls.HTML
 I reckon I need to add a .swc to the build path, but I fail to figure
 out which .swc(/.swcs) provide the HTML component. Documentation and
 Google searches have not helped me any further either.  Any help here?





[flexcoders] Re: WebService timeout to Axis on Tomcat

2011-09-09 Thread valdhor
Try setting the request timeout to zero.

Also, what is the actual fault that is returned? Add the following to your 
fault handler to find out...

Alert.show(fault.fault.faultString, fault.fault.faultCode.toString());

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

 
 
 --- In flexcoders@yahoogroups.com, andrewwestberg andrewwestberg@ wrote:
 
  In my flex app, I keep getting a webservice fault after 30 seconds.
  I've set the requestTimeout property higher, but it doesn't seem to
  have an effect.  It only happens on a long-running webservice call
  that will most likely always take longer than 30 seconds.
  
  Is there some timeout happening on the server-side in Tomcat, or maybe
  in the lower-level HTTP request from flex? How can I debug this?
  
  Thanks,
  -Andrew
 
 
 
 Any news on this... :)





[flexcoders] Re: Animating an arrow into a target

2011-09-09 Thread valdhor
Both of those ideas look promising.

I'll have to see if they will work with mx components as I am still using Flex 
3.5a.

Thanks.



--- In flexcoders@yahoogroups.com, Mark Embrey mark.c.embrey@... wrote:

 check out
 http://flex4fun.com/2010/11/30/flex4-navigation-menu-using-state-and-timerfor
 an idea
 On Sep 7, 2011 4:21 PM, valdhor valdhorlists@... wrote:
  I have a project where I need to show the progress of a, well, project.
 The project has seven specific stages that it must pass through.
 
  What I would like to do is have an animated arrow move from left to right
 across the screen until it hits a target on the right side. At any time a
 user can navigate to the page to see what stage the project is up to. I'd
 like the user to see the arrow move to that point and stop.
 
  Unfortunately I am not a designer nor animator. I have looked at tweening
 but that just seems to be able to move an object (like the arrow) from one
 place to another but I would like the arrow to elongate as it moves (ie. The
 head and tail stays the same but the shaft elongates).
 
  I have PNG images of the arrow and target and can break the arrow into a
 head, a tail and a 1-pixel wide shaft.
 
  If anyone has any ideas on how to accomplish it, examples/tutorials or
 sites I can visit I would be most appreciative. (I have been googling all
 day but can't find anything useful)
 
 





[flexcoders] Animating an arrow into a target

2011-09-07 Thread valdhor
I have a project where I need to show the progress of a, well, project. The 
project has seven specific stages that it must pass through.

What I would like to do is have an animated arrow move from left to right 
across the screen until it hits a target on the right side. At any time a user 
can navigate to the page to see what stage the project is up to. I'd like the 
user to see the arrow move to that point and stop.

Unfortunately I am not a designer nor animator. I have looked at tweening but 
that just seems to be able to move an object (like the arrow) from one place to 
another but I would like the arrow to elongate as it moves (ie. The head and 
tail stays the same but the shaft elongates).

I have PNG images of the arrow and target and can break the arrow into a head, 
a tail and a 1-pixel wide shaft.

If anyone has any ideas on how to accomplish it, examples/tutorials or sites I 
can visit I would be most appreciative. (I have been googling all day but can't 
find anything useful)




[flexcoders] Re: Anyone had problems moving to SDK 3.5 (especially from 3.2)? Please reply.

2011-09-01 Thread valdhor
3.2 to 3.5 was pretty much painless in my case.

--- In flexcoders@yahoogroups.com, Greg Lafrance glafrance@... wrote:

 Our team have switched from using Flex SDK 3.2 to SDK 3.5 and we're seeing 
 some issues.
 
 I'm wondering how many others out there have seen issues with using SDK 3.5, 
 especially if you were using SDK 3.2 previously.
 
 Please contribute your experience in this post. Thanks in advance.





[flexcoders] Re: Basic Doubt - Flex Module

2011-08-30 Thread valdhor
Just to be different, I would use an interface between the Application and all 
the modules.

--- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote:

 I would have the button listen for events from the module.
 
 
 On 8/29/11 4:12 PM, Venkat M venkat_yum@... wrote:
 
 
 
 
 
 
 
 Hi Group,
 
 I have a basic question on modules and module loader in flex. Can some on 
 help out please?
 
 I have a main application that loads up any one of the available 4 (A,B,C,D) 
 modules from a dropdown. The module loader in the main application is binded 
 to the combobox of choice and the particular module loads up.For example if 
 user selects A from combobox, module A.swf loads up. When the user changes 
 the option to B in dropdown, the module loader unloads module A and loads 
 Module B. This is the scenario.
 
 How can I control a logout button (activate/deactivate) in main application 
 with the value of flag variable provided in all the modules.
 
 All the modules has a flag variable in them, when some action is being 
 performed within the module the flag is set to 1, other wise 0; So my button 
 on main application should be active only when the flag in the currently 
 loaded module is 0. How do I deal with this.
 
 Thanks in advance!!
 
 Best Regards,
 Venkat Maddali.
 
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Re: Adding up Arraycollections to Datagrid!

2011-08-26 Thread valdhor
It is trivial to write a function to do what you want...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;

 private var firstArray:Array = [1,2,3,4,5,6,7,8,9,10];
 private var secondArray:Array =
[one,two,three,four,five,six,seven,eight,nine,ten];
 private var mergedArray:Array = new Array();

 private function onCreationComplete():void
 {
 if(firstArray.length  0  firstArray.length ==
secondArray.length)
 {
 for(var i:int = 0 ; i  firstArray.length ; i++)
 {
 var tempObject:Object = new Object();
 tempObject.item1 = firstArray[i];
 tempObject.item2 = secondArray[i];
 mergedArray[i] = tempObject;
 }
 }
 datagrid.dataProvider = new
ArrayCollection(mergedArray);
 datagrid.rowCount = datagrid.dataProvider.length;
 }
 ]]
 /mx:Script
 mx:DataGrid id=datagrid/
/mx:Application

--- In flexcoders@yahoogroups.com, Venkat M venkat_yum@... wrote:

 Hi Group,

 I have a basic question on arraycollections. Please assist.

 I have an array collection A populated with values
{1,2,3,4,5,6,7,8,9,10}
 Also I have an arraycollection B populated with values
{one,two,three,four,five,six,seven,eight,nine,ten}

 Given this data, How do I present this in a datagrid? Can I map at a
column level to an array collection?
 (Or)
 Can we make an arraycollection C, that has the values of
arraycollection A and arraycollection B paired up and then just bind to
datagrid. If so, please help me how to fabricate arraycollection C.
(Or)
 Any other ideas, please comment.

 Thanks in advance.

 Best Regards,
 Venkat.




Re:[flexcoders] Re: remoting problem

2011-08-26 Thread valdhor
So, did you try defining a variable in the top application of that type? You 
don't have to use it in the top application.

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

 I try to use strongly type to cast my varaible.
 But I don't have this type of the varaible in the top application.
 I use them in the itemrenderer.
 
  eztDoctor = data as EztDoctor;
 
 if( eztDoctor != null ){// here is always null 
  docName = eztDoctor.DName;
  price = eztDoctor.DFee.toString();
  docTitle = eztDoctor.DTitle;
  docIcon.source = eztDoctor.pic;
 }
  
  
 package com.frameworks.mvc.model.VO.remoting
 {
  [Bindable]
  [RemoteClass(alias=com.ezt.server.pojo.EztDoctor)]
  public class EztDoctor{
   public var sex:String;
   public var DLevel:Number;
   public var DStatus:Number;
 ...
 ...
 
 At 2011-08-25 21:13:43,valdhor valdhorlists@... wrote:
  
 
 That does not look like a Flex class. Is it PureMVC?
 
 I would try what it tells you to do. ie. Define a variable of that type in 
 the top level application.
 
 --- inflexcod...@yahoogroups.com, j2me_soul j2me_soul@ wrote:
 
  warning: The class com.frameworks.mvc.model.VO.remoting.EztDept has been 
  used in a call to net.registerClassAlias() in 
  _DepartmentListState_FlexInit. This will cause modules:DepartmentListState 
  to be leaked. To resolve the leak, define 
  com.frameworks.mvc.model.VO.remoting.EztDept in the top-level application.
 
  How to solve this ?
 





[flexcoders] Re: HttpService results inconsistent

2011-08-25 Thread valdhor
This is pretty much how Flex works and has been documented.

What I always do is convert the result into an array...

new ArrayCollection(ArrayUtil.toArray(event.result))

so even with only one record I still get an ArrayCollection.

--- In flexcoders@yahoogroups.com, Sells, Fred fred.sells@... wrote:

 If I have multiple records in the response I get an ArrayCollection
 however if I have only 1 record I get an ObjectProxy.  I'm not sure if
 specifying the resultFormat would resolve this and if so, which format
 is appropriate.  I typically map the results to an ArrayCollection which
 is the dataProvider for a datagrid.
 
  
 
 Perhaps I should just map the datagrid .dataProvider to the
 HttpService.lastResult...
 
  
 
 Any suggestions or experience with this.  My code is below:
 
  
 
  
 
 mx:HTTPService id=QueryService
 result=QueryService_resultHandler(event) /
 
 ...
 
 protected function QueryService_resultHandler(event:ResultEvent):void
 {
 
 try { GridDataArray = event.result.resultset.record;
 
 }catch (e:*) {  GridDataArray = new ArrayCollection();  }
 
 mydatagrid.dataProvider = GridDataArray;
 
 }__,_
 
  
 
 -- results with std xml header removed
 -
 
 resultset
 
 record order__therapy=OT name=Landers, Ivee
 time__id=3  time__label=08:00   id=3 order__resident__payor=3/
 
 /resultset
 
  
 
 ._,___





[flexcoders] Re: remoting problem

2011-08-25 Thread valdhor
That does not look like a Flex class. Is it PureMVC?

I would try what it tells you to do. ie. Define a variable of that type in the 
top level application.

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

 warning: The class com.frameworks.mvc.model.VO.remoting.EztDept has been used 
 in a call to net.registerClassAlias() in _DepartmentListState_FlexInit. This 
 will cause modules:DepartmentListState to be leaked. To resolve the leak, 
 define com.frameworks.mvc.model.VO.remoting.EztDept in the top-level 
 application.  
  
 How to solve this ?





[flexcoders] Re: Mobile-Desktop Desktop-Mobile synching

2011-08-25 Thread valdhor
If you can sync to the web why can't you create an embedded web server in the 
desktop application using an esoteric port number?

--- In flexcoders@yahoogroups.com, Amy amyblankenship@... wrote:

 Hi, all;
 
 I have been searching for a tutorial/example that shows how to get data from 
 a mobile app to a desktop version of the same app, and vice versa, but I have 
 only come up with examples that synch to the web.  Can anyone point me to at 
 least the basics of how to accomplish synching between mobile and desktop?
 
 TIA;
 
 Amy





[flexcoders] Re: Catching/Trapping Error #3003: File or directory does not exist

2011-08-22 Thread valdhor
What does model.networkDriveLetter actually hold? Is it just the drive letter 
or is the colon attached as well?

Perhaps the call is failing even before the resolve tries to happen.

You may like to check the code in resolvePath to see how it works and where it 
throws the error.

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 Thanks for the reply. I tried the following listeners, all to no avail.
 File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ER\
 ROR,onSourceFileIoError)
 File.desktopDirectory.addEventListener(IOErrorEvent.NETWORK_ERROR,onSour\
 ceFileIoError)
 File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ER\
 ROR,onSourceFileIoError)
 File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_E\
 RROR,onSourceFileIoError)File.desktopDirectory.addEventListener(IOErrorE\
 vent.IO_ERROR,onSourceFileIoError)
 Suggestions?
 Thanks, in advance.
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Try attaching a listener to File.desktopDirectory
 
 
  On 8/19/11 8:40 AM, sdl1326 azsl1326-email@ wrote:
 
 
 
 
 
 
  I am getting the following error:
 
  Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
 directory does not exist
  How can I trap this error? I have tried using a Try/Catch as well as a
 listener - see code below:
 
 
 
  try {
 
  var sourceFile:File = new File();
 
 
 sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);
 
  sourceFile = File.desktopDirectory.resolvePath(
 model.networkDriveLetter + \\ + event.payload.asset_location );
 
  }
  catch(e:Error){trace('an error has occurred')};
 
 
  However, neither of these seems to trap the error. Suggestions?
 
  Thanks, in advance.
 
 
 
 
 
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui
 





[flexcoders] Re: runtime add images in hbox

2011-08-19 Thread valdhor
I have been away for a few weeks on vacation and have only just got back.

I created a test application with your code and XML file and I don't see where 
the problem is. All the images are different (Not the same).

Could you elaborate further?

--- In flexcoders@yahoogroups.com, NishitH nishit_2571988@... wrote:

 my code is look like this...
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
   creationComplete=service.send() xmlns:ns1=rendered.* 
 xmlns:render=render.* width=100%
 
 mx:Script
   ![CDATA[
   import mx.controls.Alert;
   import mx.collections.ArrayCollection;
   import mx.rpc.events.ResultEvent;
   
   [Bindable]
   public var pictures:ArrayCollection = new ArrayCollection();
   
   [Bindable]
   public var selectpicture:ArrayCollection = new 
 ArrayCollection();
   
   [Bindable]
   public var curindex:int=0;
   
   
   private function resulthandler(event:ResultEvent):void
   {
pictures = event.result.pages.page;
   
 /*  for (var i:uint = 0; i  pictures.length; i++)
   {

 
   pictures[i].url;
   
 
 }  
 */
 
   /* for(i=0;ipictures.length;i++);
   {
   pictures[i];
   } */ 
   /* Alert.show(+pictures.url); */
   }   
   
   
   
private function nextimg(event:MouseEvent):void
   {
   
   
   if(curindex  pictures.length - 1)
   {
   pictures[curindex] += 1;
   }
   else
   {
   curindex = 0;
   }
   }  
   public function imgtransfer(event:Event):void
   {
   
   
   }
   ]]
 /mx:Script
 mx:HTTPService id=service url=data/globals.xml 
 result=resulthandler(event) /
 mx:VBox height=75% width=100% borderColor=#00 borderThickness=7 
 borderStyle=solid
 mx:HorizontalList labelField=Select Images horizontalScrollPolicy=off 
 dataProvider={pictures} id=slideList width=100% height=30%
   rowHeight=125 
 columnWidth=125  backgroundColor=#F1E3E3 
   
   mx:itemRenderer
   mx:Component  
 
   mx:HBox  horizontalAlign=center 
 verticalAlign=middle borderThickness=2 borderStyle=solid width=100%
   height=100% 
 horizontalScrollPolicy=off verticalScrollPolicy=off
   mx:VBox height=100% 
 width=100%
   mx:Image height=100% 
 width=100% source={data.url}/
   
   
   
   mx:CheckBox id=chkimg  
 label={data.name} height=10%
   selected=false 
 change=outerDocument.imgtransfer(event)/   
  
   /mx:VBox
   /mx:HBox
   /mx:Component
   /mx:itemRenderer
   /mx:HorizontalList
   
   
   mx:Button label=next id=nextbtn  
 click=nextimg(event)/
   
   mx:HorizontalList dataProvider={pictures} 
 id=slideList1 width=100% height=25%
   rowHeight=125 columnWidth=125  
 backgroundColor=#F1E3E3 
   mx:itemRenderer
   mx:Component
   mx:HBox  horizontalAlign=center 
 verticalAlign=middle borderThickness=2 borderStyle=solid width=100%
   height=100% 
 horizontalScrollPolicy=off verticalScrollPolicy=off
   mx:VBox height=100% 
 width=100%
   mx:Image height=100% 
 width=100% source={data.url}/

[flexcoders] Re: Flex Sdk 3.5 does not have ADG?

2011-08-19 Thread valdhor
The free Flex SDK 3.x did not include AdvancedDataGrid. This was included as 
part of the Flex Builder pro license.

Flash Builder 4.x includes AdvancedDataGrid as standard.

This is IIRC. Someone else please chime in if I am incorrect.

--- In flexcoders@yahoogroups.com, Raj raju raj.virtuali@... wrote:

 Hi all,
 
 When am creating Custom Advance DataGrid using ActionScript 3 , am facing 
 problem with Flex Sdk 3.5 .
 
 Flex SDK 3.5  not allowing me to import AdvanceDataGrid Columns. When i 
 change my SDK from 3.5 to 3 , then it's working fine.
 
 is it true ..? Flex SDK 3.5 doesn't have AdvanceDataGrid supported classes...?
 
 If anybody facing this same issue , please  update me.
 
 Thanks in advance,
 M.Raju.





[flexcoders] Re: Flash Builder, The user operation is waiting for background work to complete

2011-08-19 Thread valdhor
I get that On my Windows XP box. It's usually when I have changed multiple 
files and save them one after the other. I have build automatically turned on 
so it compiles after each change. Sometimes that takes a bit longer than normal 
and I get that message. Waiting for a little while usually clears it up.

--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
dorkiedorkfromdorktown@... wrote:

 Occasionally something happens to Flash Builder where everytime I save I get
 the dialog,
 The user operation is waiting for background work to complete. I've tried
 restarting and it doesn't seem to make a difference.
 Usually I end up closing all the editors and all the projects, cleaning them
 and restarting FB and restarting the OS and usually one of those things
 works and sometimes none of them work. I have 8GB of memory and a 2011 mac.
 
 Is there a way to turn this message off or determine what's causing it?





[flexcoders] Re: [Important] Simultaneous HTTPService in the same component

2011-08-19 Thread valdhor
You may be better off using Remote Objects.

In some of my components I have multiple remote object requests being made at 
the same time (Flash is intelligent enough to bundle all of these requests into 
one call if the requests come fast enough).

You can use one file to handle all of the requests as each call can be made to 
different methods.

In my case I use PHP on the server along with WebORB and it has been rock solid.

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

 Dear Flexer,
 
 I created an Air application.
 On loading my component, I'd to make simultaneous request to my database to 
 load some data to my component.
 
 My component is a form with several comobobox and and text field.
 
 But to do that I have two major problem.
 - Sometimes, my form (my component) is loaded but there no information in my 
 text field, perhaps request is not finished? but how to verify that and how 
 to solve.
 - Other question, as requests with http service is for different table, one 
 to load sudent, other to load note, other to load teaching , is it possible 
 to do this request in the same php file and to get all thos informations with 
 the same E4X file.
 
 Thanks for help





[flexcoders] Re: Could AIR create an automation app?

2011-08-19 Thread valdhor
You can use Merapi (http://code.google.com/p/merapi/) as a bridge between AIR 
and Java. Java has full hooks into the host OS so you should be able to do 
everything you want (As well as being platform agnostic)

--- In flexcoders@yahoogroups.com, James Ong yanlilei64@... wrote:

 Not direct invocation but you can control them through NativeProcess that
 can pass a command of argument and received standard output from the
 application like Command Prompt. That right, AIR is made to be as portable
 as possible.
 
 For your case, you can use .Net or C# to automate those task. For easier
 coding, consider AutoIT which is widely use by System Admin to automate
 routine tasks, you can do a simple control like mouse and window position to
 advance control like hook DLL. I did used AutoIT in the past.
 
 
 On Mon, Aug 8, 2011 at 12:07 PM, MicC chigwell23@... wrote:
 
  **
 
 
  Does AIR have enough hooks to the os to create an automation app? Programs
  like Automate and WinAutomation script mouse position and clicks to control
  an app's gui, and Automate automatically recognizes menus and buttons etc if
  the app to be controlled conforms to something - not sure what.
 
  I really need the power of actionscript to control a widget intensive music
  gui. TIA,
 
  Mic.
 
   
 





[flexcoders] Re: HTTPService e4x Error #1095: XML parser failure: Unterminated attribute

2011-08-19 Thread valdhor
What does the XML look like?

Note that you can use Charles to see exactly what is sent to Flex.

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

 Dear Flexer,
 
 I'd like to load data from my database with an httpservice and result on e4x 
 format.
 
 If on php side, I add only 12 row all works well, but if I try to load more 
 than 12 rows this errror appear Error #1095: XML parser failure: Unterminated 
 attribute.
 
 
 Can you help me to solve that?
 
 Thanks
 
 
 **  My Php code **
 
 ?php
 require_once ('MySQL.php');
 require_once ('conf.php');
 include('functions.php');
 
 // On commence par récupérer les champs 
 //if(isset($_POST['idPatient']))  
 //$id=$_POST['idPatient'];
 
 
 $link = mysql_connect(DB_HOST,DB_USER, DB_PWD);
 mysql_select_db(DB_DATABASE, $link);
 
 $query = SELECT 20Customer_1012.paIndex, 20Customer_1012.paNomU, 
 20Customer_1012.paPrenom,20Customer_1012.paDossier1, 
 20Customer_1012.paDossier2, 20Customer_1012.paNaissance, 
 20Customer_1012.paSexe, 20Customer_1012.paT_Qualite_P, 
 20Customer_1012.paNomPar,20Customer_1012.paPrenomPar, 
 20Customer_1012.T_AdrDefaut_P, 
 20Customer_1012.paAdress1,20Customer_1012.paAdress2,20Customer_1012.paCodePostal,20Customer_1012.paT_Ville_P,20Customer_1012.paPays,20Customer_1012.pa1T_TypeTel_P,20Customer_1012.paSMS1,20Customer_1012.paNumTel1,20Customer_1012.paRemTel1,20Customer_1012.pa2T_TypeTel_P,20Customer_1012.paSMS2,20Customer_1012.paNumTel2,20Customer_1012.paRemTel2,20Customer_1012.pa3T_TypeTel_P,20Customer_1012.paSMS3,20Customer_1012.paNumTel3,20Customer_1012.paRemTel3,20Customer_1012.paFax,20Customer_1012.paEMail,
  20Customer_1012.paProfMere, 20Customer_1012.paProfPatient, 
 20Customer_1012.paProfParent, 20Customer_1012.paUserZoneA1, 
 20Customer_1012.paUserZoneA2, 20Customer_1012.paUserZoneA3, 
 20Customer_1012.paUserZoneA4, 20Customer_1012.paUserZoneA5, 
 20Customer_1012.paUserZoneA6, 30Traitemnt_201223.ttTStatutP, 
 30Traitemnt_201223.ttDateStatut, 12Praticien_02.prInitiales, 
 20Customer_1012.pa2T_Qualite_P
 FROM 20Customer_1012
 JOIN 30Traitemnt_201223 ON 20Customer_1012.paIndex = 
 30Traitemnt_201223.ttIndex
 JOIN 12Praticien_02 ON 30Traitemnt_201223.ttPraticien = 12Praticien_02.prIndex
 WHERE 20Customer_1012.paIndex='16';
 
 
 $recordset = mysql_query($query, $link);
 
 $dom = new DOMDocument('1.0', 'UTF-8');
 $rootNode= $dom-appendChild($dom-createElement('OrthoExpertDB'));
 
 while($row_recordset = mysql_fetch_array($recordset))
 {
 
 $record = new DomElement(p, );
 $rootNode-appendChild($record);
 $record-SetAttribute(id, $row_recordset[0]); //index
 $record-SetAttribute(nU, $row_recordset[1]);//nom U
 $record-SetAttribute(pr, $row_recordset[2]);//prenom
 $record-SetAttribute(d1, $row_recordset[3]);//dossier1
 $record-SetAttribute(d2, $row_recordset[4]);//dossier2
 $record-SetAttribute(dn, datefr($row_recordset[5]));//naissance
 $record-SetAttribute(sx, $row_recordset[6]); //sexe
 $record-SetAttribute(paQ, $row_recordset[7]); //qualite patient
 $record-SetAttribute(nPar, $row_recordset[8]);
 $record-SetAttribute(pPar, $row_recordset[9]); 
 $record-SetAttribute(adD, $row_recordset[10]); 
 $record-SetAttribute(ad1, $row_recordset[11]); 
 $record-SetAttribute(ad2, $row_recordset[12]); 
 $record-SetAttribute(cp, $row_recordset[13]);//code postal
 $record-SetAttribute(vi, $row_recordset[14]); 
 $record-SetAttribute(pi, $row_recordset[15]); 
 $record-SetAttribute(tT1, $row_recordset[16]); 
 $record-SetAttribute(sms1, $row_recordset[17]); 
 $record-SetAttribute(nT1, $row_recordset[18]); 
 $record-SetAttribute(rT1, $row_recordset[19]);
 $record-SetAttribute(tT2, $row_recordset[20]); 
 $record-SetAttribute(sms2, $row_recordset[21]); 
 $record-SetAttribute(nT2, $row_recordset[22]); 
 $record-SetAttribute(rT2, $row_recordset[23]);
 $record-SetAttribute(tT3, $row_recordset[24]); 
 $record-SetAttribute(sms3, $row_recordset[25]); 
 $record-SetAttribute(nT3, $row_recordset[26]); 
 $record-SetAttribute(rT3, $row_recordset[27]);
 $record-SetAttribute(fax, $row_recordset[28]); 
 $record-SetAttribute(mail, $row_recordset[29]); 
 $record-SetAttribute(prPa, $row_recordset[30]); 
 $record-SetAttribute(prP, $row_recordset[31]); 
 $record-SetAttribute(prMe, $row_recordset[32]); 
 $record-SetAttribute(zA1, $row_recordset[33]); 
 $record-SetAttribute(zA2, $row_recordset[34]); 
 $record-SetAttribute(zA3, $row_recordset[35]); 
 $record-SetAttribute(zA4, $row_recordset[36]); 
 $record-SetAttribute(zA5, $row_recordset[37]); 
 $record-SetAttribute(zA6, $row_recordset[38]); 
 $record-SetAttribute(st, $row_recordset[39]);//statut
 $record-SetAttribute(dst, $row_recordset[40]);//date statut
 $record-SetAttribute(pr2, $row_recordset[41]);//initiale prat
 $record-SetAttribute(parQ, $row_recordset[42]);//qualité parent
 
 }
 mysql_free_result($recordset);
 mysql_close();
 
 
 print $dom-saveXML();
 //echo $xmlStr;
 ?
 
 
 ** End of php





[flexcoders] Re: How to communicate 2 computers using Air Application

2011-08-19 Thread valdhor
Write a socket server and client for both and exchange data through sockets.

Or use Merapi as a middle layer.

--- In flexcoders@yahoogroups.com, Wemerson Couto Guimarães wemersonrv@... 
wrote:

 Hello guys,
 
 There are a way of communicate 2 computers (or more) on the same network
 (LAN) using an Air application? Prefered 1.5 version of Air, because I have
 a opened project in this version.
 
 -- 
 *Wemerson Guimarães*
 Rio Verde - Go





[flexcoders] Re: Air app w/Bluetooth + UI / App Store for Arduino devices

2011-08-19 Thread valdhor
Way cool.

I am interested in using Zigbee sensors in ultra low power applications (ie. 
battery operated for three months or more). Are there any plans for this type 
of development?

--- In flexcoders@yahoogroups.com, Davis Ford davisford@... wrote:

 Hi flexcoders,
 
 I wanted to drop a note to tell you about an Air app I just built that has a
 couple unique features.  I built it to be a desktop app for Arduino (
 http://arduino.cc) devices.  If you're not familiar with Arduino it's an
 open source microelectronics hardware platform.  It makes it easy to program
 micros to do things like attach sensors, control motors, robotics, etc.  The
 possibilities are endless, and the Arduino subculture has really exploded in
 the last few years.
 
 If you're already a Flex dev. that likes messing with Arduino, this may be
 interesting to you.
 
 This app allows you to scan and connect to an Arduino-derivative, and
 connect to it via Bluetooth Serial Port Profile.  It also provides a visual
 App Store where you can browse and download an app specific to your
 hardware, and the types of sensors you may have plugged into it.
 
 So, for example, you could plug an infrared temperature sensor into the
 device, and then go grab an app that works with that device and temp. sensor
 and download it.
 
 An app (may) consist of two parts:
 
 a) Firmware for the microcontroller
 b) A SWF module that can be dynamically loaded into the desktop container
 
 These two components are meant to work with each other.  The firmware can
 control things on the device or read sensors and report values, and the
 module is a UI that allows you to interact with the firmware.  So, you can
 program the device over the air using bluetooth, and load the module into
 the desktop application container, and now you have a re-configurable
 microcontroller that you can easily write, share, and deploy software to.
 
 Here's some screenshots of the app: http://daisyworks.com/downloads.html  -
 and you can download it there; although it probably isn't all that useful
 unless you have the hardware.
 
 I wrote some tutorials here: http://daisyworks.com/docs.html on how to write
 your own firmware and UI for it.  The UI part should be very easy for the
 anyone on this mailing list.  The firmware part is also trivially easy even
 if you've never done it before.
 
 --- a few technical details about the app's design for anyone curious:
 
 * native installer for all 3 operating systems -- ant build script that will
 create the installer executable with one command
 * uses http://swizframework.org heavily, b/c I love swiz :)
 
 You might be wondering how Air is interfacing with Bluetooth...that was the
 kind of tricky part. I created an executable jar with an embedded Jetty
 server.  The Jetty server exposes BlazeDS services using Spring-Flex.  This
 is actually kind of cool b/c you can launch a full-fledged Java/BlazeDS
 server just by double-clicking a jar file.  The installer packages the jar
 with it, and when that app bootstraps itself, it starts the jar file itself
 and starts communicating with it.  I use the bluecove java library to
 scan/find/connect Bluetooth devices.
 
 On the App Store, we just download the .hex firmware image and the .swf.  We
 can now program the Arduino-derivative with the .hex file, and load the .swf
 module into a container.  The application container provides the Tx/Rx
 communication between the SWF module and the firmware on the device.
 
 Note: today this only works with our own Arduino derivative hardware -- we
 had to do a few tweaks to get the Firmware-Over-The-Air (FOTA) to work, but
 it wouldn't be that hard to extend it to work with other Arduino boards.
  Our boards work with the Arduino SDK/libraries so there is no difference
 from that standpoint.
 
 I plan to make it FOSS
 
 If you want to hack on some microelectronics and put your Flex skills to
 work building UIs for the device, come and check it out.
 
 Cheers,
 davis
 
 -- 
 http://daisyworks.com





[flexcoders] Re: Catching/Trapping Error #3003: File or directory does not exist

2011-08-19 Thread valdhor
Clasping at straws...

Maybe it's not an IO_ERROR type of IOErrorEvent so it's not being handled.

You could try adding listeners for all types of IOErrorEvent.

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 
 I am getting the following error:
 Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
 directory does not exist
 How can I trap this error? I have tried using a Try/Catch as well as a
 listener - see code below:
 
 
 
 
 try {
 
 var sourceFile:File = new File();
 
 sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);
 
 sourceFile = File.desktopDirectory.resolvePath( model.networkDriveLetter
 + \\ + event.payload.asset_location );
 
 }
 catch(e:Error){trace('an error has occurred')};
 
 
 
 However, neither of these seems to trap the error. Suggestions?
 
 Thanks, in advance.





[flexcoders] Re: Flex 4 CSS

2011-08-19 Thread valdhor
Instead of using mx:Canvas try using s:BorderContainer.
?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 xmlns:s=library://ns.adobe.com/flex/spark
 xmlns:mx=library://ns.adobe.com/flex/mx

 fx:Style
 .bgImage
{
 color: #DEDACF;
 contentBackgroundColor: #DEDACF;
 backgroundImage: Embed(BannerBackground.jpg);
 backgroundImageFillMode: repeat;
 }
 /fx:Style

 s:BorderContainer width=100% height=600 styleName=bgImage
 s:Label text=CSS Background test /
 /s:BorderContainer

/s:Application


--- In flexcoders@yahoogroups.com, Davidson, Jerry
jerry.davidson@... wrote:

 Alex, you might be Flex harUI in the other forum.  But I'm going to
 ask the question here as no one there seems to know the answer.



 I'm trying to convert a Flex 3 application to Flex 4.  I find CSS
isn't
 working under Flex 4 as it did before.  What I want to do is set a
back
 ground image on a canvas object.  Here is that object:

   mx:Canvas

 xmlns:mx=http://www.adobe.com/2006/mxml;

 xmlns:s=library://ns.adobe.com/flex/spark

 styleName=bgImage

 backgroundColor=#DEDACF

 borderColor=#DEDACF

 width=100%

 horizontalScrollPolicy=off verticalScrollPolicy=off



 Here is bgImage:

 .bgImage {

 /*background-image: /src/images/BannerBackground.jpg; */

 /*background-image: src/images/BannerBackground.jpg; */

 /*background-image: images/BannerBackground.jpg; */

 /*background-image: /images/BannerBackground.jpg; */

 /*background-image: ../images/BannerBackground.jpg; */

 /*background-image: ../BannerBackground.jpg; */

 /*background-image: FSCalc/images/BannerBackground.jpg; */

 /*background-image: url(images/BannerBackground.jpg); */

 /*background-image: url(images/BannerBackground.jpg); */

 /*background-image: url(/images/BannerBackground.jpg); */

 /*background-image: url(../images/BannerBackground.jpg); */

   background-image: url(FSCalc/images/BannerBackground.jpg);

 /*background-image: Embed(images/BannerBackground.jpg); */

 /*background-image: Embed(/images/BannerBackground.jpg); */

 /*background-image: Embed(../images/BannerBackground.jpg); */

 /*background-image: Embed(source=images/BannerBackground.jpg);
*/


 /*background-image: Embed(source=/images/BannerBackground.jpg);
 */

 /*background-image:
Embed(source=../images/BannerBackground.jpg);
 */

 /*background-image:
Embed(source=src/images/BannerBackground.jpg);
 */

   text-align: right;

   border-style: solid;

   }



 Obviously, many tests have not resulted in something that works.  The
 directory structure as I see it in Flash is:

 FSCalc

 src

 css

 DHSclasses

 images

 scripts



 If I change the color in the CSS class, I do see the color change in
the
 canvas object.  Therefore, I know that the CSS is available to the
 component.



 Any ideas anyone?




[flexcoders] Re: html form issue in adobe air?

2011-08-19 Thread valdhor
Rather than embed an HTML page, create a Flex form to do the File upload

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

 this is same question like this. no answer now.
 
 http://stackoverflow.com/questions/886380/html-input-type-file-in-adobe-air-does-not-present-file-browser
 
 Mark
 
 --- In flexcoders@yahoogroups.com, markflex2007 markflex2007@ wrote:
 
  I embed a html page in air
  
  mx:HTML location=http://192.168.100.2/upload1/test.php; width=100% 
  height=100% /
  
  I use the html page to upload file.
  
  form name=newad method=post enctype=multipart/form-data  action=
   table
  trtdinput type=file name=image Size=30/td/tr
  trtdinput name=Submit type=submit value=Upload 
  image/td/tr
   /table
  
  but I can not see the file input box(just a button) in the air application.
  
  it seems the html page looks different when it embed in adobe air.
  
  how to keep it looks same with browser.
  
  Thanks for help
  
  Mark
 





[flexcoders] Re: I don't know if I need Flex (please help me to decide)

2010-09-09 Thread valdhor
Where did you see that WebORB for PHP is discontinued? I did a Google search 
and the only thing I could find was your post.


 I also prefer AMFPHP over WebOrb, is faster (even faster than Zend_AMF) and 
 webOrb for PHP is discontinued



[flexcoders] Re: I don't know if I need Flex (please help me to decide)

2010-09-08 Thread valdhor
I can't talk to how easy ColdFusion is as I have not used it very much but 
WebORB for PHP is very robust. My application is used by tens of thousands of 
people every day. I do know that for me, at least, PHP is very easy.

--- In flexcoders@yahoogroups.com, Bill Brutzman bill.brutz...@... wrote:

 Consider also Adobe's ColdFusion.  I have found ColdFusion to be easier to
 use and more robust than PHP.
 
  
 
 --Bill
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of enridp
 Sent: Tuesday, September 07, 2010 11:10 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: I don't know if I need Flex (please help me to
 decide)
 
  
 
   
 
 Yes, there's a lot of data.
 But I was thinking in AMFPHP for that.
 I think the alternatives are:
 1) Adapting the Flex code that I need to a pure AS3 project (I'm not sure if
 this is possible in all the casses)
 2) Using RSL's
 
 Because I can't start my project with 200Kb, the size is a really big
 problem.
 Can you (or someone) help me with some of the 2 options?
 I have not experience in it, so I can't think in possible problems with
 those solutions (Flex-AS3 and RSL's), can you see the problems?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 Bill Brutzman bill.brutzman@ wrote:
 
  My rule of thumb is that if there is data. like a database. then yes. Flex
  is the way to go.
  
  
  
  --Bill
 





[flexcoders] Re: Module-friendly modals

2010-09-08 Thread valdhor
Correct me if I am wrong but aren't windows of any kind parented by 
SystemManager?

The way I do things is to set an event listener in the main application and 
then inject the event into the currently loaded module using an interface.

--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote:

 Someone on the Mate forums advocated a way to treat a modal popup as a
 state of a view, where the presentation model has a modalShown
 property, and the view observes it using bindSetter.
 
 This has the nice effect of avoiding the need to pass in
 Application.application to createPopUp, but it's obviously quite a bit
 more work to create the bubbling events and injections. And in the end
 you typically want to center the popup over the whole application,
 rather than some intermediate container.
 
 So I find myself wondering if there is a cleaner way than
 Application.application to refer to the root context. Follow the
 DisplayObject.parent chain until it's null?





[flexcoders] Re: Using modules and remote objects

2010-09-07 Thread valdhor
I do this all the time. My main application is a shell that loads in the app's 
layout and loads the menu's based on a users access level. This app then loads 
whatever module the user is interested in. Each module has all of its 
functionality encapsulated including its required remoting. This is all using 
Flex 3.x (Whatever the latest version is) as I don't have time to port it to 4 
yet.

Can you post some code? Flex as well as server would be good. PHP would be even 
better.

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 Hi guys i have some issues concerning modules and remote objects. i have an 
 application that is split into modules and in each i use remote objects to 
 display data from the database. the problem is there is no data being 
 displayed and when i try to use the same code in a single app without using 
 modules, the data is displayed. could someone please help me out here. i 
 really need to use modules because it helps reduce the size of my app.





[flexcoders] Re: Which URL to use for amfEndpoint in LCCS Project?

2010-09-07 Thread valdhor
From the description on the web site you don't change that at all. It should 
point to Adobe's Livecycle collaboration Services site 
(http://www.adobe.com/ap/products/livecycle/collaborationservice/) which is an 
Adobe hosted service. You would have to sign up for a free trial to test it 
(http://www.adobe.com/go/lccs_trial).

--- In flexcoders@yahoogroups.com, bashababob cyber-woodch...@... wrote:

 I'm new to AIR development.  I'm trying to get this sample app running in 
 Flash Builder:
 
 http://coenraets.org/blog/2010/08/multi-user-video-tic-tac-toe-for-and roid/  
 http://coenraets.org/tictactoe/tictactoe.fxp
 
  
 
 But I can't figure out what URL to put in as the amfEndpoint in the 
 app-config.xml file that sets the remoteObject.endpoint to get it to work.  
 Do I have to be running ColdFusion server locally or something?
 
  
 
 It would be awesome if that's a quick simple answer someone can give me.  I'm 
 sure it's something silly.  Thanks for your help and patience!





[flexcoders] Re: flashBuilder.ini

2010-09-07 Thread valdhor
First off, are you running 32 bit or 64 bit Java? Not to mention Eclipse (Flash 
Builder). NB: Flash Builder is built on Eclipse. It looks like it is 32 bit 
(win32 mentioned in plugins line). This will give a maximum heap size of 2GB 
which you would not be able to set it to as there would not be any memory left 
to work with. Also, a DLL may have loaded into the memory area that the JVM 
wants to use for heap (The JVM needs a contiguous block of memory). Java is 
intelligent enough to give an error if you set initial(Xms) or maximum(Xmx) 
heap size too high.

Some posts that might help you understand these settings...

http://www.eclipsezone.com/eclipse/forums/t104307.html
http://wiki.eclipse.org/Eclipse.ini
http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html

--- In flexcoders@yahoogroups.com, Mike Slinn msl...@... wrote:

   The source code in my message did not look the same in the daily 
 digest as it did online.  I will try posting once again; the biggest 
 memory allocation that I can currently specify in FlashBuilder.ini file is:
 
 -nl
 en_US
 -startup
 plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
 --launcher.library
 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
 -vmargs
 -Xms800m
 -Xmx800m
 -XX:MaxPermSize=384m
 -XX:PermSize=128m
 -Djava.net.preferIPv4Stack=true
 
 Also, I have seen a report that running Eclipse from a JDK gives more 
 memory control than from a JRE.  That did not make sense to me, but I 
 tried it anyway, by changing the shortcut properties to:
 E:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.exe -vm 
 E:\Program Files\Java\jdk1.6.0_20\bin
 vs.
 E:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.exe -vm 
 E:\Program Files\Java\jdk1.6.0_20\jre\bin
 
 I did not find any difference.
 
 Mike





[flexcoders] Re: how do you guys read flexcoders

2010-09-07 Thread valdhor
I use the Yahoo groups page to read and reply. I use the Nabble Flexcoders page 
to search for posts (http://_.15888.www.nabble.com/Re-f16212.html - not that 
it's working at the moment ;-).

The emailed messages are collected and archived with my mail reader application.

--- In flexcoders@yahoogroups.com, ew6014 ew6...@... wrote:

 hi guys..
 
 now that searchcoders dashboard has not been working for sometimes, on a show 
 of hands, how are you guys reading flexcoders mailing list?
 
 just using rss ??





[flexcoders] Re: File Upload with php on Mac

2010-09-07 Thread valdhor
Does file uploading work from an HTML page? Get this working before involving 
AS3.

--- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... 
wrote:

 Hello, 
 
 What is the specificity of the Mac plateform, because my upload function with 
 AS3 and Php is working on Pc but not on Mac.
 
 Thank you,
 Christophe,





[flexcoders] Re: dynamic data load problem with OLAPDatagrid

2010-09-07 Thread valdhor
Binding problem?

--- In flexcoders@yahoogroups.com, Tejas Patel tejaspate...@... wrote:

 Single OLAPDatagrid component is not used for dynamic arraycollection data.
 
 Initially data displayed perfectly and also itemClicked event working 
 perfectly.
 But after data changed dynamically and fetch from DB, data is not displayed 
 perfectly and also itemClicked event not working properly.
 
 any idea OR guess?





[flexcoders] Re: flashBuilder.ini

2010-09-07 Thread valdhor


--- In flexcoders@yahoogroups.com, Mike msl...@... wrote:

 I am using a 32 bit JDK because as you have guessed FB is not 64 bit capable 
 at this time.

QED You have only 2GB of usable memory.

 It would be more helpful to post complete and working ini files that provide 
 800M of heap.

One person's ini file that works is probably not going to work on your system. 
It's all dependent on the DLL's that are loaded and where they position 
themselves in memory (They generally have a preferred location). In your case 
you have a loaded DLL (or more) that is/are loaded in memory somewhere inside 
the 2GB that is available. The JVM has determined that there is a contiguous 
800MB of memory and limits you to that.

Someone could post an ini file that works for him/her but they would have 
different DLL's loaded so that ini file will not work for you.

You can either try to unload the various DLL's you have or find some way to 
move their preferred memory location.



[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread valdhor
Works for me. Brings up a login screen.

--- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote:

 on my development pc the two apps work perfectly.





[flexcoders] Re: Switching Item Renderers

2010-09-01 Thread valdhor
The only computation I see is determining which component to use. With your 
original idea you would still need the same computation to figure out which 
(sub) item renderer to use. I still think you are trying to hide the woods 
using more trees.

--- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote:

 Yeah thats the way I've done it previously. I thought that this way would
 cut out on some additional computation.
 
 
 
 On Tue, Aug 31, 2010 at 6:04 PM, valdhor valdhorli...@...wrote:
 
 
 
  That seems overly complicated to me. What I would try is create two custom
  components then instantiate the appropriate one based on the data and add it
  in the updateDisplayList method.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wesley
  Acheson wesley.acheson@ wrote:
  
   Since nobody has replied I'm continueing to try this. I currently think I
   may need to override all methods in UI component.
  
  
   Is it clear what I'm trying to do?
  
   Is this the wrong way of doing it?
  
   I think its probably lighter than wrapping to components in a fully
  fledged
   UI component?
   *
   Some Thoughts*
  
   Also a comment on ListItemRenderer, theres an awful lot of methods that
  need
   to be implemented to make this work. I doubt all of them are used in a
  List
   Senario. Even implementing them all theres still a dependency on
   DisplayObject (who's methods seem to be implemented). It does feel to me
   like the architecture seems a bit off. I mean if all of those methods are
   implemented why is there still a dependency on DisplayObject.
  
   Its not just enough to implement IListRenderer which seems to defeat the
   purpose of an interace
  
   On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson
   wesley.acheson@wrote:
 
  
*Disclaimer:* This is a cross post with Stack Overflow. I know at least
one person on this list saw it there.
http://stackoverflow.com/questions/3507313/flex-switch-item-renderer
   
Hi
   
I was wondering if anyone had any luck with the following senario in
  flex.
   
I'd like to be able to have a custom item renderer which delegates to
another renderer inside.
   
The reason for this would be in a datagrid for instance displaying a
checkbox if the dataprovider for the row had a boolean value. Using the
default item renderer when the value was a non boolean.
   
Basically I was hoping to use a proxy object (though not necessarily
  the
proxy class) so that I could a renderer which delegated all of its
responsibilties to a sub renderer.
   
Hard to explain.
   
*Edit 1*
   
I think the following gives a clearer idea of what I had in mind. This
  is
only knocked up quickly for the purpose of showing the idea.
   
*SwitchingRenderer.as*
   
package com.example
{
import mx.controls.CheckBox;
   
import mx.controls.dataGridClasses.DataGridItemRenderer;
   
import mx.controls.listClasses.BaseListData;
   
import mx.controls.listClasses.IDropInListItemRenderer;
   
import mx.core.IDataRenderer;
   
import mx.core.UIComponent;
   
public class SwitchingRenderer extends UIComponent implements
  IDataRenderer, IDropInListItemRenderer
   
{
private var checkboxRenderer:CheckBox;
   
private var defaultRenderer:DataGridItemRenderer;
   
private var currentRenderer:IDataRenderer;
   
public function SwitchingRenderer()
   
{
this.checkboxRenderer = new CheckBox();
   
this.defaultRenderer = new DataGridItemRenderer();
   
this.currentRenderer = defaultRenderer();
   
super();
}
   
public function get data():Object
   
{
//If the data for this cell is a boolean
// currentRender = checkBoxRenderer
   
// otherwise
// currentRenderer = defaultRenderer
}
   
public function set data(value:Object):void
   
{
currentRenderer.data = value;
   
}
   
public function get listData():BaseListData
   
{
return currentRenderer.listData;
   
}
   
public function set listData(value:BaseListData):void
   
{
currentRenderer.listData = value;
   
}
   
   
   
}
}
   
   
   
  
 
   
 





[flexcoders] Re: Flex validator in action script

2010-08-31 Thread valdhor
Untested but how about...

[Bindable] private var textInput:TextInput = new TextInput();
private var val:Validator = new Validator();

textInput.id = myText; //Don't know why you need this as you can refer
to the TextInput by its variable name (textInput)
val.source = textInput.text;
val.required = true;


--- In flexcoders@yahoogroups.com, Adnan ad...@... wrote:

 Hello,

 How can I represent the following validator in action script;

 mx:Validator
 required=true
 source={myText}
 /
 s:TextInput id=myText /

 I am starting with this;

 var textInput:TextInput = new TextInput();
 textInput.id = myText;

 var val:Validator = new Validator();
 val.source = ;// problem how to define it to be bindable ?
 val.required = true;

 Any ideas?





[flexcoders] Re: Flex application with Microsoft Azure

2010-08-31 Thread valdhor
Take a look at http://phpazure.codeplex.com/

--- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... 
wrote:

 Hello, 
 
 Which library to use to talk with a Microsoft Azure database in the cloud 
 from a flex application. 
 
 My application use AmfPhp, does its work ? 
 
 Thank you,
 Christophe,





[flexcoders] Re: Switching Item Renderers

2010-08-31 Thread valdhor
That seems overly complicated to me. What I would try is create two custom 
components then instantiate the appropriate one based on the data and add it in 
the updateDisplayList method.

--- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote:

 Since nobody has replied I'm continueing to try this. I currently think I
 may need to override all methods in UI component.
 
 
 Is it clear what I'm trying to do?
 
 Is this the wrong way of doing it?
 
 I think its probably lighter than wrapping to components in a fully fledged
 UI component?
 *
 Some Thoughts*
 
 Also a comment on ListItemRenderer, theres an awful lot of methods that need
 to be implemented to make this work.  I doubt all of them are used in a List
 Senario. Even implementing them all theres still a dependency on
 DisplayObject (who's methods seem to be implemented). It does feel to me
 like the architecture seems a bit off.  I mean if all of those methods are
 implemented why is there still a dependency on DisplayObject.
 
 Its not just enough to implement IListRenderer which seems to defeat the
 purpose of an interace
 
 On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson
 wesley.ache...@...wrote:
 
  *Disclaimer:* This is a cross post with Stack Overflow. I know at least
  one person on this list saw it there.
  http://stackoverflow.com/questions/3507313/flex-switch-item-renderer
 
  Hi
 
  I was wondering if anyone had any luck with the following senario in flex.
 
  I'd like to be able to have a custom item renderer which delegates to
  another renderer inside.
 
  The reason for this would be in a datagrid for instance displaying a
  checkbox if the dataprovider for the row had a boolean value. Using the
  default item renderer when the value was a non boolean.
 
  Basically I was hoping to use a proxy object (though not necessarily the
  proxy class) so that I could a renderer which delegated all of its
  responsibilties to a sub renderer.
 
  Hard to explain.
 
  *Edit 1*
 
  I think the following gives a clearer idea of what I had in mind. This is
  only knocked up quickly for the purpose of showing the idea.
 
  *SwitchingRenderer.as*
 
  package com.example
  {
  import mx.controls.CheckBox;
 
  import mx.controls.dataGridClasses.DataGridItemRenderer;
 
  import mx.controls.listClasses.BaseListData;
 
  import mx.controls.listClasses.IDropInListItemRenderer;
 
  import mx.core.IDataRenderer;
 
  import mx.core.UIComponent;
 
  public class SwitchingRenderer extends UIComponent implements 
  IDataRenderer, IDropInListItemRenderer
 
  {
  private var checkboxRenderer:CheckBox;
 
  private var defaultRenderer:DataGridItemRenderer;
 
  private var currentRenderer:IDataRenderer;
 
  public function SwitchingRenderer()
 
  {
  this.checkboxRenderer = new CheckBox();
 
  this.defaultRenderer = new DataGridItemRenderer();
 
  this.currentRenderer = defaultRenderer();
 
  super();
  }
 
  public function get data():Object
 
  {
  //If the data for this cell is a boolean
  //  currentRender = checkBoxRenderer
 
  // otherwise
  //  currentRenderer = defaultRenderer
  }
 
  public function set data(value:Object):void
 
  {
  currentRenderer.data = value;
 
  }
 
  public function get listData():BaseListData
 
  {
  return currentRenderer.listData;
 
  }
 
  public function set listData(value:BaseListData):void
 
  {
  currentRenderer.listData = value;
 
  }
 
 
 
  }
  }
 
 
 





[flexcoders] Re: Announcement: Flextras Flex Calendar Component

2010-08-31 Thread valdhor
Any chance you could turn off auto connect to twitter? I am at work and can't 
use Twitter. It is a real pain in the @ss to have to click the cancel button on 
every page of the site. I finally got disgusted and closed the tab.

--- In flexcoders@yahoogroups.com, Jeffry Houser jef...@... wrote:

 
 
 Hi Everyone,
 
   I'm pleased to announce the release of the Flextras Calendar 
 Component.  This was a big undertaking for us and we can't wait to have 
 a few people take a look and tell us what we did wrong (or right).
 
   The Calendar is a great way for you to deal with date based data in a 
 Flex Application and it allows you to build Calendar or scheduling 
 applications. The component features:
 
 * Views for a Month, Week, and Day.
 * Extensive renderers so that you can make the component suit your
   needs.
 * Standard Flex APIs for drag and drop, itemEditors, and localization.
 
 
 
   You can download our no cost developer edition along with samples and 
 documentation at http://www.flextras.com/?c=217 .
 
 Here are some links to find out more:
 
 Product Page: http://www.flextras.com/?event=ProductHomeproductID=15c=217
 Documentation: 
 http://www.flextras.com/?event=ProductDocumentationProductID=15c=217
 Demos: http://www.flextras.com/?event=ProductSamplesProductID=15c-217
 
 Register and Download: 
 http://www.flextras.com/index.cfm?event=loginFormc=217
 
 Flextras Home: http://www.flextras.com/?c=217
 
 We are here to help and would love to hear your feedback.  What can we 
 do for you today?
 
 -- 
 Jeffry Houser, Technical Entrepreneur
 Adobe Community Professional: http://tinyurl.com/27h53fl
 Phone: 203-379-0773
 --
 UI Flex Components: Tested! Supported! Ready!
 http://www.flextras.com?c=104
 --
 http://www.twitter.com/reboog711
 http://www.twitter.com/flextras
 http://www.twitter.com/theflexshow
 --
 http://www.theflexshow.com
 http://www.jeffryhouser.com
 http://www.asktheflexpert.com
 --
 Part of the DotComIt Brain Trust





  1   2   3   4   5   6   7   8   9   10   >