[flexcoders] Flex4 - using DropDownList as itemEditor in AdvancedDataGrid
Hi All, I am using DropDownList in the itemEditor of an AdvancedDataGrid. The problem: after an item is selected from the DropDownList and the mouse is released over the AdvancedDataGrid's row, that row gets selected and the cell edited (DropDownList appears). It does not appear in DataGrid. You can try it out here: http://narancs.net/flex/ADGTest/index.html Edit the 'year' column in the first row, and select 2003. You'll see that the 4th row will get edited in the AdvancedDataGrid but not in the DataGrid Source: http://narancs.net/flex/ADGTest/srcview/ Do you have an idea how to fix this issue in the AdvanncedDataGrid? Thanks, Andrea
Re: [flexcoders] Re: CairngormEvent Antipattern
e_baggg wrote: Andi- Tom was referring to having a hierarchy of FrontControllers. He happens to have a class called CoreController which all of his Flex apps would use. Then, each Flex app will have it's own FrontController that extends CoreController...this way each developer has their own controller. This assumes of course there's 1 developer working on a project. The CoreController would house the common Commands such as Login, Logout, and similar things. If you're in the situation where you have 1 large Flex app that has 1 large controller that all the developers are fighting for...I would suggest that users update the Contoller and check in their empty Command classes right away. Then begin development. That way if it takes them 2 days to implement the logic for an event, they won't have a lot of contacts. Another option is to make one developer the 'owner' of the front controller and have other developers e-mail them the line of code for the command. Thank you. I just wasn't sure this is the right way to do it. I mean, that cannot be more than one FrontController/project. It seems, this is the only solution. The problem I'm having with this is not regarding the 'owner', with a version control system that's not a problem. But the FrontController gets bigger and bigger, and less managable (although there is nothing much to manage :), just a bunch of addCommands :)), and I don't know weather this could cause problems or not (regarding speed for example). Andi --- In flexcoders@yahoogroups.com, Andrea Varga [EMAIL PROTECTED] wrote: Tom Chiverton wrote: On Wednesday 30 August 2006 13:14, Andrea Varga wrote: (For example, on a large project, when there are many developers working, all of them has to edit the FrontController to add an event.) This isn't a problem with a decent RCS. As it is, we've got a CoreController and then indivdual projects extend that to make their application specific events. Could you please tell me where can I found more about this? I cannot find anything. Thanks. Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: CairngormEvent Antipattern
Got it. Thanks for the explanation. There were many discussions about the FronController just growing and growing. Do you happen to have a solution for refactoring? (For example, on a large project, when there are many developers working, all of them has to edit the FrontController to add an event.) Andi e_baggg wrote: Andi- Nothing changes with the FrontController and Commands. You would still have 3 separate commands (1 each for add, update, delete). Remember, the generic CairngormEvent classes calls: super(commandName) so the dispatchEvent() for each call would like this: dispatchEvent(new WidgetEvent(WidgetFrontController.ADD_WIDGET, widgetVO)); dispatchEvent(new WidgetEvent(WidgetFrontController.UPDATE_WIDGET, widgetVO)); dispatchEvent(new WidgetEvent(WidgetFrontController.DELETE_WIDGET, widgetVO)); and each Command will apropriately be called just like it was. The key is we're no longer hard-coding the WidgetFrontController.ADD_WIDGET into each CairngormEvent sublcass. --- In flexcoders@yahoogroups.com, Andrea Varga [EMAIL PROTECTED] wrote: e_baggg wrote: Hello group- I hadn't seen a previous post regarding this explicity so I wrote a small blog about it. It helps reduce the #of classes that get created when using Cairngorm (a big issue with me since the client is VERY picky with their swf file sizes). This blog shows the code for usuing a reusable CairngormEvent versus creating separate classes for each dispatchable event. http://ebaggg.blogspot.com/2006/08/cairngormevent-anti-pattern-we-all.html Thoughts? The ideea is good, but how do you handle them further? Will you have 3 different commands associated with the same event? And each Command will start with an if statement, to see if that's the event he supposed to answer to? Doesn't seem right. Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] CairngormEvent Antipattern
e_baggg wrote: Hello group- I hadn't seen a previous post regarding this explicity so I wrote a small blog about it. It helps reduce the #of classes that get created when using Cairngorm (a big issue with me since the client is VERY picky with their swf file sizes). This blog shows the code for usuing a reusable CairngormEvent versus creating separate classes for each dispatchable event. http://ebaggg.blogspot.com/2006/08/cairngormevent-anti-pattern-we-all.html Thoughts? The ideea is good, but how do you handle them further? Will you have 3 different commands associated with the same event? And each Command will start with an if statement, to see if that's the event he supposed to answer to? Doesn't seem right. Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Flex AMFPHP and VOs
Oriol, You must have missed something. It works for me. Take a look at my ServiceCapture screenshot: http://virtualro.cluj.astral.ro/andi/screenshot.jpg Also, both the below expressions have true for result. (event.result.users[0] is UserVO) (model.users.getItemAt(0) is UserVO) Andi Oriol Gual wrote: Hi Andy, I finally tested your example, but it's still the same, it is receiving simple objects, not UserVO's, can you check this? Also, Robert, could you please provide a working sample? Thank you, Oriol. Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/SktRrD/hOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Flex AMFPHP and VOs
Linux, PHP 5.0.4. Did you check my code, or did you try to set up your code based on mine? Did you upload the advancedsettings.php ? The delicate point are, that cannot be debugged - VO's in php must have $_explicitType defined properly. - in advancedsettings.php, $incoming and $outgoing array must have defined properly. (I added some logging codes to amf-core/io/AMFSerializer.php to figure out how to set them). Let me know if I can help. Andi Oriol Gual wrote: Andi, What version of PHP are you using? Also, are you in windows or linux / unix? This is really driving me crazy! Also, I've uploaded the file so everyone can have it, get it here http://www.snokin.com/flex/ClassMappingExample.zip. Oriol. 2006/7/25, Andrea Varga [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Oriol, You must have missed something. It works for me. Take a look at my ServiceCapture screenshot: http://virtualro.cluj.astral.ro/andi/screenshot.jpg http://virtualro.cluj.astral.ro/andi/screenshot.jpg Also, both the below expressions have true for result. (event.result.users[0] is UserVO) (model.users.getItemAt(0) is UserVO) Andi Oriol Gual wrote: Hi Andy, I finally tested your example, but it's still the same, it is receiving simple objects, not UserVO's, can you check this? Also, Robert, could you please provide a working sample? Thank you, Oriol. Yahoo! Groups Sponsor -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links http://groups.yahoo.com/group/flexcoders/ mailto:[EMAIL PROTECTED] -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Flex AMFPHP and VOs
Oriol uploaded it A href="" class="moz-txt-link-rfc2396E" href="http://www.snokin.com/flex/ClassMappingExample.zip">"http://www.snokin.com/flex/ClassMappingExample.zip"here/A. Stefan Schmalhaus wrote: I just sent a private mail to you with the code. I'm also interested in your code sample. Would you mind sharing your code here on the list? If it's too much code please send me an email, too. Thanks in advance. Stefan Schmalhaus [EMAIL PROTECTED] Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [flexcoders] Re: Flex AMFPHP and VOs
That works too http://www.narancs.net/flex/ClassMappingExample/ClassMappingExample.html (view source enabled) Andi Oriol Gual wrote: First of all, I'd like to thank you all. I tried Renaun's example, and with ServiceCapture, it is returning an array of BookVO. At this point everything seems OK. But when you receive this array, if you do something like this: var testBook : BookVO = new BookVO; testBook = BookVO(ModelLocator.getInstance().books[0]); It will fail, because the objects inside the array collection aren't BookVO's , they are Objects: TypeError: Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to com.renaun.samples.vo.BookVO. And the same happens with your example Andi. Then, my question is, can anyone do this without the coercion error, and, without extra functions to map it? Thanks, Oriol. Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Flex AMFPHP and VOs
Hi You're right, it works perfect! Sorry about the other comment. I'm kinda surprised and happy, is this the same that you sent to me? Thanks Oriol. Yes, the code is exactly the same, I have just added that Label to show you that the casting works. Also, it would be great to know what differences are between yours and Renaun's, because one's working and the other not (at least for me). What changes have you done? I think the main idea is the same. Although, I don't know if he is using the advanceddsettings.php or not (it's not in the source), I couldn't make it work without setting the $outgoing array. As we are here, Renaun, I'd like to make an observation on the RemoteObjectAMF0? First of all, I would be dead without it, it's grate stuff. Many thanks for sharing. I had to change it a little bit, because in the way it was, it's not perfectly compatible with Cairngorm, you have to change the ServiceLocator.as, and add the getRPCService() method. That's because ServiceLocator's getService() returns an AbstractService but RemoteObjectAMF0 inherits Proxy. That's why I made RemoteObjectAMF0 to inherit from AbstractService (which inherits Proxy) and I had to add this line too, to get rid of some errors: use namespace flash_proxy; This way no Cairgorm code needs to be changed. I thought you might be interested in this. Or is there a good reason why you haven't used it in this way, and I'm missing something? Andi Yahoo! Groups Sponsor ~-- Yahoo! Groups gets a make over. See the new email design. http://us.click.yahoo.com/WktRrD/lOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Flex AMFPHP and VOs
I think it should. Stefan Schmalhaus wrote: --- In flexcoders@yahoogroups.com, Andrea Varga [EMAIL PROTECTED] wrote: That works too http://www.narancs.net/flex/ClassMappingExample/ClassMappingExample.html (view source enabled) Does it work with PHP4? Stefan -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Flex AMFPHP and VOs
Unfortunalelly there are no links to send yet. I'm just in the learning process and I was just playing around with Flex and Cairngorm. I'm pretty new to both of them. I'm working usually with Flash and AMFPHP, so the first thing I wanted to do is to see how Flex with AMFPHP is working together. FDS is too much for me yet. I'll let you know when I have something to show. Andi Renaun Erickson wrote: Andi, The Cairngorm 2 that is packaged in it was from their second 2 release, and I had to add the getRPCService myself also. I need to go back and include just the SWC or have people download it separate. As for the AbstractService and namespace usage, it is a more cleaner approach and I'll incorporate it. To tell you the truth haven't had much time to use the RemoteObjectAMF0, it was a class I wrote months ago back in beta and things where not solidified back then. Again thanks for all the updates and I'll incorporate them into the source, Please pass along any examples of the usage of the RemoteObjectAMF0, I am interested in how it is being used. Renaun -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Flex AMFPHP and VOs
Private email is on the way. Andi Dima Ulich wrote: could you share the code with me too, I couldn't map vos either thank in advance Dmitriy - Original Message From: Andrea Varga [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Sunday, July 23, 2006 9:00:04 PM Subject: Re: [flexcoders] Flex AMFPHP and VOs I just sent a private mail to you with the code. Oriol Gual wrote: I'd love to get some code :D 2006/7/22, Andrea Varga [EMAIL PROTECTED] t.com mailto:andi%40spindevelopment.com mailto:[EMAIL PROTECTED] t.com mailto:andi%40spindevelopment.com: Hi, I've managed to make it work once, in both directions, also with Renaun's RemoteObjectAMF0. As I remember, I had to change something in the AMFPHP code to make it work from PHP to Flex, but maybe I did something wrong, and it should have been worked without those changes. I can send you some code if you still need them. Andi Oriol Gual wrote: Well, it wasn't PHP 4, it was my fault. But, I still receive a plain Object, not an object of my class. I'm using Renaun's solution to connect to amfphp, what are you using? Thanks. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] how do Idempotent Services fit into Cairngorm?
Hi, Maybe this is not a proper namig. By Idempotent Services I mean services that can detect when they are called more than once with the same parameter and prevent calling the server when there is no need. How would be best to implement such a service in Cairngorm? Should Commands or Business Delegates take care of this? How? Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Flex AMFPHP and VOs
I just sent a private mail to you with the code. Oriol Gual wrote: I'd love to get some code :D 2006/7/22, Andrea Varga [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, I've managed to make it work once, in both directions, also with Renaun's RemoteObjectAMF0. As I remember, I had to change something in the AMFPHP code to make it work from PHP to Flex, but maybe I did something wrong, and it should have been worked without those changes. I can send you some code if you still need them. Andi Oriol Gual wrote: Well, it wasn't PHP 4, it was my fault. But, I still receive a plain Object, not an object of my class. I'm using Renaun's solution to connect to amfphp, what are you using? Thanks. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links mailto:[EMAIL PROTECTED] -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Flex AMFPHP and VOs
Hi, I've managed to make it work once, in both directions, also with Renaun's RemoteObjectAMF0. As I remember, I had to change something in the AMFPHP code to make it work from PHP to Flex, but maybe I did something wrong, and it should have been worked without those changes. I can send you some code if you still need them. Andi Oriol Gual wrote: Well, it wasn't PHP 4, it was my fault. But, I still receive a plain Object, not an object of my class. I'm using Renaun's solution to connect to amfphp, what are you using? Thanks. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] how to know when a remote calll is necessary
Hi, Let's say I have many view-s that need to display the same data retrieved from the server ( it doesn't metter how, XML, Remoting, WebService, etc.). Using Cairngorm. When the proper command is executing (one that changes the application state to show one of the above views), it needs to load the data from the server, so it makes the proper requests. Meanwhile, let's say another command is starting to execute, and this new command has to load the same data, but it wouldn't be good to load the data again, would it?. What is the best practice here? One solution I can think of: in my Model, I could have an additional property for all my data that are loaded from a server, that indicates the status of that data (undefined, loading, loaded, etc.). So, when it is loading, the commands won't load the data again. But this rises another problem. How will Command2 know when the data is loaded, when Commad1 started to load the data. Do you have a better solution? Andi Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] need solution/best practice regarding VO's
Hi All! I'm going to ask my question through an example. (I'm using Cairngorm, but I think the problem is general) Let's say I have a database with 2 tables: 1. user - with fields: user_id, user_name, user_country_id (foreign key from country table) 2. countries - with fields: country_id, country_name Let's say I need an application that lists all the users, in a datagrid with 2 columns: User Name, Country Name. How should I approach this? Let's say I have 2 VO's, to reflect the database structure: class UserVO { public var ID:int; public var name:String; public var countryID:int; } class CountryVO { public var ID:int; public var name:String; } And I have in my Model: users:ArrayCollection; // array collection of UserVOs countries:ArrayCollection; // array collection of CountryVOs How could I create a binding of users to a Datagrid, so it will display the country names? Or how else should I approach the problem? In case I have: class UserVO { public var ID:int; public var name:String; public var country:countryVO; } I think the bindig would be possibe, but a bunch of other questions/problems appear. Eg.: I'm using remoting to get the data from the server (AMFHP). On one hand: Class mappings won't work with VO's insite another VO. On second hand: I have to load the list of countries (I need it somewhere else), and I would not want to carry the CountryVO inside the UserVO, for many reasons. One of them is: this is a simple example, but what if CountryVO is a more complex data, and i need to send a userVO to the server (to update the database for example), I don't need a CountryVO there, just a UserVO that has the ID of a country. Thanks, Andi Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] need solution/best practice regarding VO's
Thanks. This works, but is this the best way to do it? To have VO's reflecting the database tables? I can't come out with a better solution, but maybe there is. Andi Tom Chiverton wrote: On Friday 14 July 2006 06:55, Andrea Varga wrote: How should I approach this? You could have the Flex app retrive a list of country IDs and names at start up, and then use a custom item renderer in the data grid to display the country based on the user VO's countryId. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] pageable records with amfphp
Hi, I know AMFHPH knows paging, and I know how to write the php part, But I'm having problems on the Flex part. In Flash, I know that there is a RecordSet class that has a setDeliveryMode() method that should be used, but there is no such class and method in Flex, and I wasn't able to find anything similar. What should I use instead? Thanks, Andi Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] OpenAMF, Tomcat and Flex2B3
Hi Carlos, Yes, I'm using AMF0, I'm using Renaun Erickson’s RemoteObjectAMF0 class. I have tested it with AMFPHP and it worked, so that part should be ok. http://renaun.com/blog/?p=31 I have read more docs, and I found that for class mappings I should use AdvancedGateway instead of DefaultGateway, but I haven't manage to write a proper openamf-config.xml yet. Thanks Andi Carlos Rovira wrote: Hi Andrea, The problem was solved in last beta (FP9 beta3), so you can pass VOs from AS to Java and from Java to AS. Your code looks ok, for me but the logs says something is happen, maybe...are you using AMF0?, remember that in FP9 default is AMF3. On 6/2/06, *Andrea Varga* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi I have been trying to set up a project using Java, OpenAMF, Tomcat, Flex2B2 and Cairngorm. I'm kinda new to OpenAMF andTomcat (and usually to application servers) and I have found the docs confusing. Finally i managed to get the remoting working. I can call my services, and get back the result, but I am having problems with my VO class mappings in both directions (if I send Strings, everything works fine) I have read in previous posts, that mapping from Java to AS was not working in Flash Player 8.5 (but should work from AS to Java), but I couldn't find anything about Flash Player 9. Actually, I have found this in Carlos Rovira's blog: El problema de mapeo de clases de Java hacia ActionScript está resuelto en el nuevo *Flash Player 9 Beta*. Unfortunatelly, I don't understand spanish, but it's close to romanian, does that mean that the problem has been solved in Flash Player 9 or the opposite ? :) I have a LoginVO class: Java code: --- package com.spindevelopment.model.vo; public class LoginVO { public String username; public String password; public LoginVO() { } } AS code: - package com.spindevelopment.model.vo { import org.nevis.cairngorm.vo.ValueObject; [RemoteClass(alias=com.spindevelopment.model.vo.LoginVO)] [Bindable] public class LoginVO implements ValueObject { public var username:String; public var password:String; } } In openamf-congid.xml I added this: custom-class-mapping java-classcom.spindevelopment.model.vo.LoginVO/java-class custom-classcom.spindevelopment.model.vo.LoginVO/custom-class /custom-class-mapping In my java service class, I have a simple test method, where I return a String with the 2 properties of LoginVO: public String doLogin(LoginVO pLogin ) { return new String(un: + pLogin.username + , pass: +pLogin.password); } The returned string is: un: null, pass: null; Here is my Tomcat log: 02.06.2006 15:54:45 org.openamf.io.AMFDeserializer init INFO: Deserializing Message, for more info turn on debug level 02.06.2006 15:54:45 org.openamf.DefaultGateway service INFO: REQUEST: [AMFBody: {serviceName=com.spindevelopment.services.Login, serviceMethodName=doLogin, response=/1, type=ARRAY, value=[ASObject[type=com.spindevelopment.model.vo.LoginVO]]}] 02.06.2006 15:54:46 org.openamf.invoker.JavaServiceInvoker getServiceMethod INFO: topRankedMethod: name=doLogin rank=100.0 02.06.2006 15:54:46 org.openamf.DefaultGateway service INFO: RESPONSE: [AMFBody: {serviceName=null, serviceMethodName=null, response=null, type=UNKNOWN, value=un: null, pass: null}] Could somebody point me in the right direction? Thanks Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+developmentw2=Computer+software+developmentw3=Software+design+and+developmentw4
[flexcoders] OpenAMF, Tomcat and Flex2B3
Hi I have been trying to set up a project using Java, OpenAMF, Tomcat, Flex2B2 and Cairngorm. I'm kinda new to OpenAMF andTomcat (and usually to application servers) and I have found the docs confusing. Finally i managed to get the remoting working. I can call my services, and get back the result, but I am having problems with my VO class mappings in both directions (if I send Strings, everything works fine) I have read in previous posts, that mapping from Java to AS was not working in Flash Player 8.5 (but should work from AS to Java), but I couldn't find anything about Flash Player 9. Actually, I have found this in Carlos Rovira's blog: El problema de mapeo de clases de Java hacia ActionScript está resuelto en el nuevo *Flash Player 9 Beta*. Unfortunatelly, I don't understand spanish, but it's close to romanian, does that mean that the problem has been solved in Flash Player 9 or the opposite ? :) I have a LoginVO class: Java code: --- package com.spindevelopment.model.vo; public class LoginVO { public String username; public String password; public LoginVO() { } } AS code: - package com.spindevelopment.model.vo { import org.nevis.cairngorm.vo.ValueObject; [RemoteClass(alias=com.spindevelopment.model.vo.LoginVO)] [Bindable] public class LoginVO implements ValueObject { public var username:String; public var password:String; } } In openamf-congid.xml I added this: custom-class-mapping java-classcom.spindevelopment.model.vo.LoginVO/java-class custom-classcom.spindevelopment.model.vo.LoginVO/custom-class /custom-class-mapping In my java service class, I have a simple test method, where I return a String with the 2 properties of LoginVO: public String doLogin(LoginVO pLogin ) { return new String(un: + pLogin.username + , pass: +pLogin.password); } The returned string is: un: null, pass: null; Here is my Tomcat log: 02.06.2006 15:54:45 org.openamf.io.AMFDeserializer init INFO: Deserializing Message, for more info turn on debug level 02.06.2006 15:54:45 org.openamf.DefaultGateway service INFO: REQUEST: [AMFBody: {serviceName=com.spindevelopment.services.Login, serviceMethodName=doLogin, response=/1, type=ARRAY, value=[ASObject[type=com.spindevelopment.model.vo.LoginVO]]}] 02.06.2006 15:54:46 org.openamf.invoker.JavaServiceInvoker getServiceMethod INFO: topRankedMethod: name=doLogin rank=100.0 02.06.2006 15:54:46 org.openamf.DefaultGateway service INFO: RESPONSE: [AMFBody: {serviceName=null, serviceMethodName=null, response=null, type=UNKNOWN, value=un: null, pass: null}] Could somebody point me in the right direction? Thanks Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Form Submit on Enter Key problem in TabNavigator
Hi All, I want to submit a form when a user presses the Enter key. As I understand from the help that I should use the defaultButton property of the Form. It works well, unless I place my form inide a TabNavigator. Below is my very simple example/test/demo code. Click inside the input field in the first form and hit Enter = Alert Click inside the input field in the TabNavigator and hit Enter = nothing (clcik on the Submit button = Alert) (I am using Flex2B3) main.mxml: --- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=absolute xmlns:ns1=* mx:HBox ns1:FormSubmitOnEnter/ mx:TabNavigator mx:Canvas ns1:FormSubmitOnEnter/ /mx:Canvas /mx:TabNavigator /mx:Box /mx:Application FormSubmitOnEnter.mxml: --- ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml width=400 height=300 mx:Script ![CDATA[ import mx.controls.Alert; public function doSubmit():void { Alert.show(Submit, , Alert.OK); } ]] /mx:Script mx:Form x=0 y=0 id=myForm defaultButton={submitFormButton} mx:FormItem label=Name: id=formitem1 mx:TextInput id=nameInput text=/ /mx:FormItem mx:FormItem mx:Button label=Submit click=doSubmit() id=submitFormButton/ /mx:FormItem /mx:Form /mx:Canvas How should I solve this? Thanks Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Cairngorm ServiceLocator and AMFPHP
Hi Stefan You might want to look at this: http://renaun.com/blog/?p=25 Andi stefan_schmalhaus wrote: I'd like to add an AMFPHP-based service to my Cairngorm ServiceLocator. The example from Mike Potter's Flex/AMFPHP tutorial works really well (for those who haven't tried it yet here's the URL to the tutorial: http://labs.adobe.com/wiki/index.php/Flex_Framework:tutorials:flex2_AMFPHP), but I don't know how to get it to work in a Cairngorm environment. In the tutorial an additional AS class (RemotingConnection) is set up that extends NetConnection. How do I combine this with the usual syntax for a adding a new service to the Cg ServiceLocator, e.g.: mx:HTTPService id=dummyDelegate url=""> result=event.call.resultHandler( event ) fault=event.call.faultHandler( event ) showBusyCursor=true useProxy=false / Is this possible at all? Thanks in advance. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Flex2B3 - Drag And Drop - Drop Into Tree (different from B2)
Hi All I'm having difficulty with the drop part of the drag and drop in a Tree in B3. I have my tree defined this way: mx:Tree id=myTree dataProvider={myTreeData} dragEnter=doDragEnterTree(event); dragDrop=doDragDropTree(event);/ And I have this method for dragDrop: private function doDragDropTree(event:DragEvent):void { trace(DROP IN TREE index: + myTree.calculateDropIndex(event)); } This works well. My problem is: I want to know WHERE exacty the drop was fired (where did the user released the mouse button) to know where the insert my new item. The calculateDropIndex works well for List type components, but for a Tree it is useless. It returns a level number. In B2 the Tree had a method Tree.getDropParent(event), I suppose this returned what I was looking for, but in B3 the Tree has no such a method. In Flex Beta 2 to Beta 3 Changes it says: Tree.getDropParent(event) - Use Tree.getParentItem(item:Object):*. But I don't understand the logic here. getParentItem() has as parameter item:Object, and I don't kno that, I know just an event, I want to find out the item:Object. What is the solution here? Thanks for your help! Andi PS. My messages appear on the list with more than 8 hours delay Why? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Flex2B3 - Drag And Drop - Drop Into Tree (different from B2)
Jason Hawryluk wrote: I've been having allot of problems as well with the tree and drag drop operations. Specifically if the fact that the tree does not update properly now, as it did before with relation to it's data source. Also I’m finding that the drop indicator is all over the place. Are you experiencing the same problems ? This is interesting (meaning strange :)). I was having the exact opposite problem I want to drag from a List and drop into a Tree. I always had the redX icon there, even when I called the acceptDragDrop, and the drop was excepted too. The only way I could find to solve the problem was leaving out the: dropEnabled=true on the Tree. It is really strange, because I thought that this is mandatory to be able to drop on the Tree. Below is my test code in case you are interested. Andi ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:ns1=* creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.containers.Canvas; import mx.managers.DragManager; import mx.events.DragEvent; import mx.collections.ArrayCollection; [Bindable] public var myListData:ArrayCollection; [Bindable] public var myTreeData:Object; private function onCreationComplete():void { myListData = new ArrayCollection([{name: 'aaa'},{name: 'bbb'},{name: 'ccc'}]); } private function initTree():void { myTreeData = {label: 'top', children: [{label: 'level1_A', children: [{label: 'level2_1'}, {label: 'level2_2'}]}, {label: 'level1_B', children: [{label: 'level2_x'}, {label: 'level2_y'}]} ]}; //expand Tree expandTreeNode(myTree, myTree.dataProvider[0]); } public function expandTreeNode(tmpTree:Tree, node:Object):void { tmpTree.expandItem(node, true); if(node.children != undefined) { for(var k:Number=0; k node.children.length; k++){ expandTreeNode(tmpTree, node.children[k]); } } } private function doDragOverTree(event:DragEvent):void { DragManager.showFeedback(DragManager.NONE); } private function doDragEnterTree(event:DragEvent):void { var dragTarget:Tree = Tree(event.currentTarget); if ((DataGrid(event.dragInitiator).id == 'myList')){ DragManager.acceptDragDrop(dragTarget); trace(DO DRAG ENTER accept drag into +dragTarget); } } private function doDragDropTree(event:DragEvent):void { trace(DROP IN TREE index: + myTree.calculateDropIndex(event)); trace(' dropevent[currentTarget] = '+event['currentTarget']); } ]] /mx:Script mx:DataGrid id=myList x=46 y=28 dataProvider={myListData} dragEnabled=true mx:columns mx:DataGridColumn headerText=Name dataField=name / /mx:columns /mx:DataGrid mx:Tree id=myTree x=46 y=242 width=200 height=400 dataProvider={myTreeData} dropEnabled=true dragEnter=doDragEnterTree(event); dragDrop=doDragDropTree(event); creationComplete=initTree();/ /mx:Application Yahoo! Groups Sponsor ~-- Everything you need is one click away. Make Yahoo! your home page now. http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] install debug player without (re)installing Flex Builder
Hi I uninstalled my flash player, reinstalled using the kit on labs, but that isn't the debug player. Can I somehow install Debug Player without reinstalling Flex Builder? Thanks, Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Help Contents dissapears (both Flex Builder 2 B2 and B3)
I haven't find anything like this. There is something about Flex Builder hanging up, but nothing like the problem I have. When I restart my computer, the help works, and after a while, it seems that the server that provides the content just stops and I'm not longer anle to view the help contents. A restart of Flex Builder does not help. Andi Chris Velevitch wrote: There's a note about it on known issues in beta 3 in the labs. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Help Contents dissapears (both Flex Builder 2 B2 and B3)
Hi Sometimes with B2 I lost my Help Contents. It came back just after a restart. I was hoping it won't happen in B3. I have installed B3. Opened the Help Contents, it was there, closed it, opened again. Haven't seen it since then. I have set it to use external browser (Window- Preferences - Help). It opens the browser with the URL: http://127.0.0.1:49633/help/index.jsp, and result: The page cannot be displayed. The 49633 number is different with each restart of the Flex Builder, so I assume each time a different server should start. What should I do to restore my help? Thanks, Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] [Flex2B2] DataGrid refresh problem
Hi! Here I have another problem with DataGrid: http://virtualro.co.uk/~andi/flex/datagrid/2/Test2.html (View Source enabled) The Change button adds some characters to the first element of the DataProvider. But the DataGrid does not refresh its content accordingly. The Add button adds a new element to the DataProvider. This time the DataGrid refreshes, the new element is there, and even the changes made before are visible. What an I missing? Why doesn't my changes show up in the DataGrid? Thanks, Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Flex2b2 - DataGrid bug - using ArrayCollection of ValueObjects as data provider
Hi Here is my vrey simple test: http://virtualro.co.uk/~andi/flex/datagrid/Test1.html View Source is enabled. Conains 2 very simple files. You can see that the first DataGrid works well, the second does not. The only difference between them is the structure of the dataprovder. The first one is an ArrayCollection of Objects, the second one is an ArrayCollection of TestVO, which is a very simple value object class with one single property. How could I make the DataGrid to accept my VO-s? Thanks Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Re: force image reload
Hi Peter, I didn't mean preventing caching. I knew the trick there. But, actually, your solution can be used for my problem too. Thanks, Andi Peter Blazejewicz wrote: Hello Andrea, do you mean something like preventing using cached images? try something similiar: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* creationComplete=initApp(); mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] private var imageURL:String; private function initApp():void{ imageURL = http://www.macromedia.com/images/ homepage/en_us/fma/fma_54_bu_messaging.gif; } private function getRand():String{ return ?+(new Date().getTime()); } ]] /mx:Script mx:Image id=img width=756 height=200 source ={imageURL+getRand()} complete=Alert.show('source url: '+img.source. toString()) click=img.executeBindings()/ /mx:Application click image to refresh and see current url, hope that helps, kind regards, Peter Blazejewicz -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Caurngorm 2 - where to deal with system events?
Hi All! I have to mention that I'm new to Cairngorm and Flex. What is best practice to deal with system events (or whatever the events that are not dispatched by a user gesture are called)? For example: after a successful user login I have to display a list of products (list loded from the server). So, I have a login form in a component: Login.mxml, where I have a dispatch for the LoginEvent = the LoginCommand takes care of it... (goes to server etc.), the onResult method in the LoginCommand is called. If the login was successful, I set the ModelLocator.applicationState to the new state, the view is binded to that, so now I have the correct view (with a datagrid for example), and now I need the list of the products. But for that, I need the list of the products = the ProductListGetCommand must be executed which means, that somebody has to dispatch an event for that, but there is no user gesture here. Where should I place the code for dispathing the event? Or, is my whole logic correct? My only idea here is to place it in LoginCommand.onResult? I have tried that: var tmpEvent:ProductListGetEvent = new ProductListGetEvent(); dispatchEvent( tmpEvent ); I got the error: Call to a possibly undefined method 'dispatchEvent' That's why I think this might not be the right place. I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not reallt relevant here. Thanks Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Caurngorm 2 - where to deal with system events?
I have read that using EventBroadcaster is deprecated in Cairngorm 2, instead the built in dispatchEvent() should be used: http://weblogs.macromedia.com/swebster/archives/2006/02/index.cfm OT - My messages appear with several hours delay on the list. Does anyone know why? Andi JesterXL wrote: You don't need that if you are using Cairngorm's EventBroadcaster; it has nothing to do with DisplayObjects. Simply do what Alex suggested in the result of your Command, do: EventBroadcaster.getInstance().broadcastEvent ( Event.YOUR_EVENT, {param: value}); - Original Message - From: Alex Uhlmann [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Sunday, April 23, 2006 12:03 PM Subject: RE: [flexcoders] Caurngorm 2 - where to deal with system events? Hi Andi, You can certainly call another Command in the onResult of your LoginCommand. But since a Command class in not on the display list, events wouldn't make it to Cairngorm's FrontController. You have to use mx.core.Application.application.dispatchEvent. Darron Schall has a nice explanation of it here: http://www.darronschall.com/weblog/archives/000224.cfm Best, Alex Alex Uhlmann Consultant (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrea Varga Sent: 23 April 2006 11:15 To: flexcoders@yahoogroups.com Subject: [flexcoders] Caurngorm 2 - where to deal with system events? Hi All! I have to mention that I'm new to Cairngorm and Flex. What is best practice to deal with system events (or whatever the events that are not dispatched by a user gesture are called)? For example: after a successful user login I have to display a list of products (list loded from the server). So, I have a login form in a component: Login.mxml, where I have a dispatch for the LoginEvent = the LoginCommand takes care of it... (goes to server etc.), the onResult method in the LoginCommand is called. If the login was successful, I set the ModelLocator.applicationState to the new state, the view is binded to that, so now I have the correct view (with a datagrid for example), and now I need the list of the products. But for that, I need the list of the products = the ProductListGetCommand must be executed which means, that somebody has to dispatch an event for that, but there is no user gesture here. Where should I place the code for dispathing the event? Or, is my whole logic correct? My only idea here is to place it in LoginCommand.onResult? I have tried that: var tmpEvent:ProductListGetEvent = new ProductListGetEvent(); dispatchEvent( tmpEvent ); I got the error: Call to a possibly undefined method 'dispatchEvent' That's why I think this might not be the right place. I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not reallt relevant here. Thanks Andi -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] Re: flex newbie - dispatchEvent question - Part 2 (Cairngorm)
Doug Lowder wrote: Hmm, the code you posted for Login.mxml dispatches a login event, not test, so that's one thing to be aware of. Yes, this was definitely a problem, but not THE problem. You'll need to add the listener to the Login object, which you can do by giving the Login component an id (Login id=loginComponentId ...) and then calling something similar to: loginComponentId.addEventListener(login, onLoginEvent). Yes, this works, but I don't want to do that. My application won't know who dispathes the event, just wants to know that it was dispatched. I created this test just to get a bit confortable with events, and to try to catch what is the problem in my original project which uses Cairngorm. In Cairngorm, in the FrontController's addCommand method, the listener is registered to Application.application. But it is not working in my project, and obviusly the problem is not in Cairngorm. Thanks Andi Doug --- In flexcoders@yahoogroups.com, Andrea Varga [EMAIL PROTECTED] wrote: Well, this worked, but in the Cairngorm framework this was correct and the problem is somewhere else. Below is my new little test. This time the button that does the dispatchEvent is not in the application, but inside another component The Main.mxml code is almost the same as before, just the Login component is new. The button with Login1 has the same code as the Login2 button inside the Login component (both dispatch a test event). But the Application catches just the Login1 event. What am I mmissing this time? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* layout=absolute applicationComplete=onComplete() mx:Script ![CDATA[ [Bindable] public var status:String = ; public function onComplete():void { status += Add Event Listener...\n; Application.application.addEventListener(test,onTestEvent); } public function onTestEvent(event:Event):void { Application.application.status += Test Event occured...\n; } public function dispatchTextEvent():void { var event:Event = new Event(test); dispatchEvent( event ); status += Event Dispatched...\n; } ]] /mx:Script mx:Button x=66 y=56 label=Login1 click=dispatchTextEvent() / mx:TextArea x=66 y=123 width=393 height=243 text={status}/ Login x=333 y=56 / /mx:Application The Login.mxml code: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* mx:Script ![CDATA[ public function loginUser():void { var event:Event = new Event(login); dispatchEvent( event ); Application.application.status += Dispatch login event...\n; } ]] /mx:Script mx:ControlBar mx:Button label=Login2 click=loginUser() / /mx:ControlBar /mx:Canvas [EMAIL PROTECTED] wrote: Try changing public function onTestEvent() to public function onTestEvent(event:Event) You should add event:Event in your listener. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) -- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] flex newbie - dispatchEvent question
Hi! I have to mention first that I'm new in Flex. I have started to develop a small application using Cairngorm, just to get more into it. But I have faced a problem, my Command is never executed. It seams the Event I'm sending is lost somewhere. So I made a small test (to see if I'm getting the whole dispatchEvent thing): Below is my code. The onTestEvent() is never called. What am I doing wrong? Thanks Andi ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* layout=absolute applicationComplete=onComplete() mx:Script ![CDATA[ [Bindable] public var status:String = ; public function onComplete():void { status += Add Event Listener...\n; Application.application.addEventListener(test, onTestEvent); } public function onTestEvent():void { Application.application.status += Test Event occured...\n; } public function dispatchTextEvent():void { var event:Event = new Event(test); dispatchEvent( event ); status += Event Dispatched...\n; } ]] /mx:Script mx:Button x=66 y=56 label=dispatch event click=dispatchTextEvent() / mx:TextArea x=66 y=123 width=393 height=243 text={status}/ /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] flex newbie - dispatchEvent question
It didn't work with this.addEventListener either. Andi JesterXL wrote: Out of curiosity, try changing: Application.application.addEventListener(test, onTestEvent); to: this.addEventListener(test, onTestEvent); - Original Message - From: Andrea Varga [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, April 20, 2006 10:52 AM Subject: [flexcoders] flex newbie - dispatchEvent question Hi! I have to mention first that I'm new in Flex. I have started to develop a small application using Cairngorm, just to get more into it. But I have faced a problem, my Command is never executed. It seams the Event I'm sending is lost somewhere. So I made a small test (to see if I'm getting the whole dispatchEvent thing): Below is my code. The onTestEvent() is never called. What am I doing wrong? Thanks Andi ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* layout=absolute applicationComplete=onComplete() mx:Script ![CDATA[ [Bindable] public var status:String = ; public function onComplete():void { status += Add Event Listener...\n; Application.application.addEventListener(test, onTestEvent); } public function onTestEvent():void { Application.application.status += Test Event occured...\n; } public function dispatchTextEvent():void { var event:Event = new Event(test); dispatchEvent( event ); status += Event Dispatched...\n; } ]] /mx:Script mx:Button x=66 y=56 label=dispatch event click=dispatchTextEvent() / mx:TextArea x=66 y=123 width=393 height=243 text={status}/ /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] flex newbie - dispatchEvent question
Yes, this has solved it Thanks [EMAIL PROTECTED] wrote: Try changing public function onTestEvent() to public function onTestEvent(event:Event) You should add event:Event in your listener. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [flexcoders] flex newbie - dispatchEvent question - Part 2
Well, this worked, but in the Cairngorm framework this was correct and the problem is somewhere else. Below is my new little test. This time the button that does the dispatchEvent is not in the application, but inside another component The Main.mxml code is almost the same as before, just the Login component is new. The button with Login1 has the same code as the Login2 button inside the Login component (both dispatch a test event). But the Application catches just the Login1 event. What am I mmissing this time? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* layout=absolute applicationComplete=onComplete() mx:Script ![CDATA[ [Bindable] public var status:String = ; public function onComplete():void { status += Add Event Listener...\n; Application.application.addEventListener(test,onTestEvent); } public function onTestEvent(event:Event):void { Application.application.status += Test Event occured...\n; } public function dispatchTextEvent():void { var event:Event = new Event(test); dispatchEvent( event ); status += Event Dispatched...\n; } ]] /mx:Script mx:Button x=66 y=56 label=Login1 click=dispatchTextEvent() / mx:TextArea x=66 y=123 width=393 height=243 text={status}/ Login x=333 y=56 / /mx:Application The Login.mxml code: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml xmlns=* mx:Script ![CDATA[ public function loginUser():void { var event:Event = new Event(login); dispatchEvent( event ); Application.application.status += Dispatch login event...\n; } ]] /mx:Script mx:ControlBar mx:Button label=Login2 click=loginUser() / /mx:ControlBar /mx:Canvas [EMAIL PROTECTED] wrote: Try changing public function onTestEvent() to public function onTestEvent(event:Event) You should add event:Event in your listener. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.