RE: [flexcoders] Re: Roles Based UI
hasPermission(...) is better than hasRole(...), but the reason we are moving towards the component mapping approach is that hasPermission(...) could end up returning something anomalous if your business logic gets complicated (which is where we lie). If it is as simple as ( some activity == true ) then hasPermission(...) works, but if the internal business logic gets expanded past role based access to include, for example system configuration (or even whether the user has paid for a particular feature), hasPermission(someActivity) may end up returning false, even if they DO have that activity. Not to mention again, by assigning activities to each of the components involved, you've exposed your authentication system to the rest of the application, which makes it harder to replace / swap. Corporate restrictions prevents me from posting any real code, but something like mx:Button id=deleteItem enabled={UserModel.getUser(userKey).hasAccess(ItemTasks.DELETE)} / In User.as public function hasAccess( task : String ) { if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { return true; } return false; } P.S. Ignore some of the more funky quirks in my code... There are a few hangovers there. And I do believe we are mainly arguing semantics at this point ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: 20 January 2009 17:34 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Roles Based UI In our case, we use a similar scheme except that we have roles and permissions. It is the permission that defines the access to the component. If the user, in his role, has the permission set to true, then the user gain access to the component. It is very flexible as you can create many roles will similar or different permissions. At the end, you do not tie up the UI to a specific role but to a permission. E.g. mx:Button id=btndelete1 enabled=User.hasPermission('CanDelete') / mx:Button id=btndelete2 enabled=User.hasPermission('CanDelete') / mx:Button id=btnAdd enabled=User.hasPermission('CanAdd') / etc... You can see here that two buttons can be displayed using the same permission.
Re: [flexcoders]TextLayoutFramework - support for graphics / swfs?
Thank you! On Tue, Jan 20, 2009 at 2:51 PM, Gordon Smith gosm...@adobe.com wrote: A1: This is under investigation, but may not make it into TLF 1.0 / Flex 4.0. If it gets in, what will be supported will probably be a 'float' attribute on the img tag, allowing a graphic within the text to be pinned to the left or right of the container -- but vertically positioned based on where it appears in the TextFlow -- with the text wrapping around it. Wrapping text around an absoloutely-positioned graphic will almost certainly not be supported in the first release. A2: You should be able to set the 'source' of an img to a SWF. A Loader will get created to load the SWF. If you haven't specified the width or height, they'll be determined by the Loader. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *dorkie dork from dorktown *Sent:* Tuesday, January 20, 2009 2:45 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders]TextLayoutFramework - support for graphics / swfs? Q1 I saw that there is support for inline graphics but is there support for wrapping text around an image? Q2 Is there support for an inline swf?
Re: [flexcoders] Re: Roles Based UI
I think mx:Button id=deleteItem visible={UserModel.getUserCapability(ItemTasks.DELETE)} / would be better. There should be no need for code such as if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { . The user capabilities should be assigned by the role - once only. Paul - Original Message - From: Gregor Kiddie To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 8:41 AM Subject: RE: [flexcoders] Re: Roles Based UI hasPermission(.) is better than hasRole(.), but the reason we are moving towards the component mapping approach is that hasPermission(.) could end up returning something anomalous if your business logic gets complicated (which is where we lie). If it is as simple as ( some activity == true ) then hasPermission(.) works, but if the internal business logic gets expanded past role based access to include, for example system configuration (or even whether the user has paid for a particular feature), hasPermission(someActivity) may end up returning false, even if they DO have that activity. Not to mention again, by assigning activities to each of the components involved, you've exposed your authentication system to the rest of the application, which makes it harder to replace / swap. Corporate restrictions prevents me from posting any real code, but something like mx:Button id=deleteItem enabled={UserModel.getUser(userKey).hasAccess(ItemTasks.DELETE)} / In User.as public function hasAccess( task : String ) { if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { return true; } return false; } P.S. Ignore some of the more funky quirks in my code. There are a few hangovers there. And I do believe we are mainly arguing semantics at this point ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk -- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: 20 January 2009 17:34 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Roles Based UI In our case, we use a similar scheme except that we have roles and permissions. It is the permission that defines the access to the component. If the user, in his role, has the permission set to true, then the user gain access to the component. It is very flexible as you can create many roles will similar or different permissions. At the end, you do not tie up the UI to a specific role but to a permission. E.g. mx:Button id=btndelete1 enabled=User.hasPermission('CanDelete') / mx:Button id=btndelete2 enabled=User.hasPermission('CanDelete') / mx:Button id=btnAdd enabled=User.hasPermission('CanAdd') / etc... You can see here that two buttons can be displayed using the same permission. --
RE: [flexcoders] Re: Roles Based UI
Not if the user capabilities are set by a third party, which is the situation I dealing with. I suspect our situation is drastically more complicated than the Ops though! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:03 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI I think mx:Button id=deleteItem visible={UserModel.getUserCapability(ItemTasks.DELETE)} / would be better. There should be no need for code such as if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { . The user capabilities should be assigned by the role - once only. Paul - Original Message - From: Gregor Kiddie mailto:gkid...@inpses.co.uk To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 8:41 AM Subject: RE: [flexcoders] Re: Roles Based UI hasPermission(...) is better than hasRole(...), but the reason we are moving towards the component mapping approach is that hasPermission(...) could end up returning something anomalous if your business logic gets complicated (which is where we lie). If it is as simple as ( some activity == true ) then hasPermission(...) works, but if the internal business logic gets expanded past role based access to include, for example system configuration (or even whether the user has paid for a particular feature), hasPermission(someActivity) may end up returning false, even if they DO have that activity. Not to mention again, by assigning activities to each of the components involved, you've exposed your authentication system to the rest of the application, which makes it harder to replace / swap. Corporate restrictions prevents me from posting any real code, but something like mx:Button id=deleteItem enabled={UserModel.getUser(userKey).hasAccess(ItemTasks.DELETE)} / In User.as public function hasAccess( task : String ) { if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { return true; } return false; } P.S. Ignore some of the more funky quirks in my code... There are a few hangovers there. And I do believe we are mainly arguing semantics at this point ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: 20 January 2009 17:34 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Roles Based UI In our case, we use a similar scheme except that we have roles and permissions. It is the permission that defines the access to the component. If the user, in his role, has the permission set to true, then the user gain access to the component. It is very flexible as you can create many roles will similar or different permissions. At the end, you do not tie up the UI to a specific role but to a permission. E.g. mx:Button id=btndelete1 enabled=User.hasPermission('CanDelete') / mx:Button id=btndelete2 enabled=User.hasPermission('CanDelete') / mx:Button id=btnAdd enabled=User.hasPermission('CanAdd') / etc... You can see here that two
Re: [flexcoders] Re: Roles Based UI
The user capabilities should sit and be changeable by anyone who has the userCapability(editCapability) or userCapability(editRole). Doesn't matter if it's a third party or not. Roles should map to capabilities. The application is controlled by capabilities, not roles. By assigning a role (or roles) to a user, the administrator grants capabilties to a given user. So, your application is driven by capabilities and any (authourised) person can decide what role grants what capability. If you do this you can add and remove new roles, without having to change your application. Naturally, there's a bit more work to do with it and security and scope considerations to address. Paul - Original Message - From: Gregor Kiddie To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:07 AM Subject: RE: [flexcoders] Re: Roles Based UI Not if the user capabilities are set by a third party, which is the situation I dealing with. I suspect our situation is drastically more complicated than the Ops though! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk -- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:03 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI I think mx:Button id=deleteItem visible={UserModel.getUserCapability(ItemTasks.DELETE)} / would be better. There should be no need for code such as if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { . The user capabilities should be assigned by the role - once only. Paul - Original Message - From: Gregor Kiddie To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 8:41 AM Subject: RE: [flexcoders] Re: Roles Based UI hasPermission(.) is better than hasRole(.), but the reason we are moving towards the component mapping approach is that hasPermission(.) could end up returning something anomalous if your business logic gets complicated (which is where we lie). If it is as simple as ( some activity == true ) then hasPermission(.) works, but if the internal business logic gets expanded past role based access to include, for example system configuration (or even whether the user has paid for a particular feature), hasPermission(someActivity) may end up returning false, even if they DO have that activity. Not to mention again, by assigning activities to each of the components involved, you've exposed your authentication system to the rest of the application, which makes it harder to replace / swap. Corporate restrictions prevents me from posting any real code, but something like mx:Button id=deleteItem enabled={UserModel.getUser(userKey).hasAccess(ItemTasks.DELETE)} / In User.as public function hasAccess( task : String ) { if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { return true; } return false; } P.S. Ignore some of the more funky quirks in my code. There are a few hangovers there. And I do believe we are mainly arguing semantics at this point ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: 20 January 2009 17:34 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Roles Based UI In our
[flexcoders] Re: FadeIn Effect not working with custom item renderers in List
--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, tonyjobrien yahoo@ wrote: I'm trying to get the FadeIn effect to work on my List control, but I'm having no luck. The custom renderer stays white for the FadeInDuration and then appears instantly. If I switch back to using the default renderer, all is well. Also, if I have both a list with a custom renderer and the default at the same time, they both exhibit the same behaviour as the custom renderer. Here is a simple Flex app that shows the issue (comment out the lists as required). FYI, I'm using Flex 3 on Windows XP with Firefox 3. Try changing: mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label}/ /mx:Canvas /mx:Component /mx:itemRenderer to mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label} blendMode=layer/ /mx:Canvas /mx:Component /mx:itemRenderer HTH; Amy Amy, I have tried that but it still does not display properly. I've tried changing the Canvas component to other container objects, but they all appear to exhibit the same functionality. I've tried with both 3.1 and 3.2 versions of the SDK. The list effect starts with a background color of blue (to make it easier to see what's happening). When using just a Label as the renderer, I can see the blue background boxes resizing into position and then the label fading into view over the 4 second duration. But when using any sort of container object (admittedly I've only tried Canvas, HBox and VBox), the list remains white for the entire 4 second duration, at which point, the renderers become visible immediately (with no blue background or fading at all). When I place both list views on the screen at once, they both exhibit the behaviour of the container renderer. This leads me to believe that the container is doing something different and the single-threaded nature of Flash is causing both views to update once the fade effect has finished. Problem is, I can't work out what it's doing.
[flexcoders] Re: FadeIn Effect not working with custom item renderers in List
--- In flexcoders@yahoogroups.com, sunild99 sunilbd...@... wrote: I got your example to work by removing the Canvas tags from this snippet: mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label} blendMode=layer/ /mx:Canvas /mx:Component /mx:itemRenderer Sunil Perhaps I should have been clearer in my original description. The issue seems to be related to the use of containers as custom renderers. While I admit that in this case, removal of the container solves the issue, this is just a simple case to demonstrate the issue. In my real life case, my item renderers are much more complicated, containing many sub-components, hence the use of containers.
Re: [flexcoders] Re: FadeIn Effect not working with custom item renderers in List
It may be caused by Container not implementing IDropInListItemRenderer or IListItemRenderer. You really don't want to be extending Container for item renderers if you can avoid it, I believe it's a big performance penalty. -Josh 2009/1/21 tonyjobrien ya...@indigointernet.co.uk --- In flexcoders@yahoogroups.com, sunild99 sunilbd...@... wrote: I got your example to work by removing the Canvas tags from this snippet: mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label} blendMode=layer/ /mx:Canvas /mx:Component /mx:itemRenderer Sunil Perhaps I should have been clearer in my original description. The issue seems to be related to the use of containers as custom renderers. While I admit that in this case, removal of the container solves the issue, this is just a simple case to demonstrate the issue. In my real life case, my item renderers are much more complicated, containing many sub-components, hence the use of containers. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
RE: [flexcoders] Re: Roles Based UI
Yeah my example doesn't actually include roles as they are only a convenience mechanism for assigning groups of activities. But we have the dichotomy of the third party controlling the assignment of activities (the third party is not our user group btw and there are legal aspects to which activities a user is assigned), and our users controlling configuration (which interacts with the assigned activities), so we have to handle both in a sensible way. As I said though this is way beyond the OP's original question. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:19 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI The user capabilities should sit and be changeable by anyone who has the userCapability(editCapability) or userCapability(editRole). Doesn't matter if it's a third party or not. Roles should map to capabilities. The application is controlled by capabilities, not roles. By assigning a role (or roles) to a user, the administrator grants capabilties to a given user. So, your application is driven by capabilities and any (authourised) person can decide what role grants what capability. If you do this you can add and remove new roles, without having to change your application. Naturally, there's a bit more work to do with it and security and scope considerations to address. Paul - Original Message - From: Gregor Kiddie mailto:gkid...@inpses.co.uk To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:07 AM Subject: RE: [flexcoders] Re: Roles Based UI Not if the user capabilities are set by a third party, which is the situation I dealing with. I suspect our situation is drastically more complicated than the Ops though! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:03 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI I think mx:Button id=deleteItem visible={UserModel.getUserCapability(ItemTasks.DELETE)} / would be better. There should be no need for code such as if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { . The user capabilities should be assigned by the role - once only. Paul - Original Message - From: Gregor Kiddie mailto:gkid...@inpses.co.uk To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 8:41 AM Subject: RE: [flexcoders] Re: Roles Based UI hasPermission(...) is better than hasRole(...), but the reason we are moving towards the component mapping approach is that hasPermission(...) could end up returning something anomalous if your business logic gets complicated (which is where we lie). If it is as simple as ( some activity == true ) then hasPermission(...) works, but if the internal business logic gets expanded past role based access to include, for example system configuration (or even whether the user has paid for a particular feature), hasPermission(someActivity) may end up returning false, even if they DO have that activity. Not to mention
Re: [flexcoders] Re: Roles Based UI
Gregor, I just wanted to say that while I do believe that for role based applications (something beyond 'user' and 'admin') the approach I outlined is a good way to go, I fully understand that implementation of roles is down to a lot of considerations and not everyone has the time (or inclination) to separate roles from capabilities. In my case the client needed a sophisticated system that allowed administrators to assign and change roles and even grant/remove individual capabilities all within a security system controlling the scope for changes. These capabilities were held as part of the user data and the application did not take account of roles (except as a means of assigning capabilities). The developers did not assign or even define roles (except for the initial minimal roles). I'm not being a dictator - few clients want or need the sophistication that we built for that system. It was a great system (if I say so myself!). Paul - Original Message - From: Paul Andrews To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:18 AM Subject: Re: [flexcoders] Re: Roles Based UI The user capabilities should sit and be changeable by anyone who has the userCapability(editCapability) or userCapability(editRole). Doesn't matter if it's a third party or not. Roles should map to capabilities. The application is controlled by capabilities, not roles. By assigning a role (or roles) to a user, the administrator grants capabilties to a given user. So, your application is driven by capabilities and any (authourised) person can decide what role grants what capability. If you do this you can add and remove new roles, without having to change your application. Naturally, there's a bit more work to do with it and security and scope considerations to address. Paul - Original Message - From: Gregor Kiddie To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:07 AM Subject: RE: [flexcoders] Re: Roles Based UI Not if the user capabilities are set by a third party, which is the situation I dealing with. I suspect our situation is drastically more complicated than the Ops though! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:03 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI I think mx:Button id=deleteItem visible={UserModel.getUserCapability(ItemTasks.DELETE)} / would be better. There should be no need for code such as if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) { . The user capabilities should be assigned by the role - once only. Paul - Original Message - From: Gregor Kiddie To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 8:41 AM Subject: RE: [flexcoders] Re: Roles Based UI hasPermission(.) is better than hasRole(.), but the reason we are moving towards the component mapping approach is that hasPermission(.) could end up returning something anomalous if your business logic gets complicated (which is where we lie). If it is as simple as ( some activity == true ) then hasPermission(.) works, but if the internal business logic gets expanded past role based access to include, for example system configuration (or even whether the user has paid for a particular feature), hasPermission(someActivity) may end up returning false, even if they DO have that activity. Not to mention again, by assigning activities to each of the components involved, you've exposed your authentication system to the rest of the application, which makes it harder to replace / swap. Corporate restrictions prevents me from posting any real code, but something like mx:Button id=deleteItem enabled={UserModel.getUser(userKey).hasAccess(ItemTasks.DELETE)} / In User.as public function hasAccess( task : String ) { if ( _activities.include( _taskMapping[ task ] ) configuration.taskAllowed( task ) ) {
[flexcoders] flex 2 tilelist datachange effects
hi guys am using flex builder 2 and i would like to know how to implement a data change effect on a tile list, it looks like it can only be done in flex 3 but is there a way to do it in flex 2 and if its there does anyone a a tutorial on it. thanks
RE: [flexcoders] Re: Roles Based UI
I think this is a good candidate for taking offline huh ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:53 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI Gregor, I just wanted to say that while I do believe that for role based applications (something beyond 'user' and 'admin') the approach I outlined is a good way to go, I fully understand that implementation of roles is down to a lot of considerations and not everyone has the time (or inclination) to separate roles from capabilities. In my case the client needed a sophisticated system that allowed administrators to assign and change roles and even grant/remove individual capabilities all within a security system controlling the scope for changes. These capabilities were held as part of the user data and the application did not take account of roles (except as a means of assigning capabilities). The developers did not assign or even define roles (except for the initial minimal roles). I'm not being a dictator - few clients want or need the sophistication that we built for that system. It was a great system (if I say so myself!). Paul - Original Message - From: Paul Andrews mailto:p...@ipauland.com To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:18 AM Subject: Re: [flexcoders] Re: Roles Based UI The user capabilities should sit and be changeable by anyone who has the userCapability(editCapability) or userCapability(editRole). Doesn't matter if it's a third party or not. Roles should map to capabilities. The application is controlled by capabilities, not roles. By assigning a role (or roles) to a user, the administrator grants capabilties to a given user. So, your application is driven by capabilities and any (authourised) person can decide what role grants what capability. If you do this you can add and remove new roles, without having to change your application. Naturally, there's a bit more work to do with it and security and scope considerations to address. Paul - Original Message - From: Gregor Kiddie mailto:gkid...@inpses.co.uk To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:07 AM Subject: RE: [flexcoders] Re: Roles Based UI Not if the user capabilities are set by a third party, which is the situation I dealing with. I suspect our situation is drastically more complicated than the Ops though! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:03 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI I think mx:Button id=deleteItem visible={UserModel.getUserCapability(ItemTasks.DELETE)} / would be better. There should be no need for code such as if ( _activities.include( _taskMapping[ task ] )
[flexcoders] ContextMenu CheckBox (toggle check)
How do you add a checkbox sort like item in the contextmenu? (like the 'show redraw regions'). Thx, Lieven Cardoen
Re: [flexcoders] RTL with FP10, Flex 3
There are examples with the TLF distribution. Start with them and for rendering text from right to left, you just have to set the direction of the text flow to RTL. You can check the 'changeDirection' function in the Flex example. Try also these links (from the readme file of the TLF distribution): - Framework Overview http://www.adobe.com/go/textlayout_overview (pdf) – Overview for developers using the Text Layout Framework - Framework API http://www.adobe.com/go/textlayout_api – API Documentation for the Text Layout Framework Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 4:05 AM, Hyder hyder_...@hotmail.com wrote: I tried reading docs on the new text layout framework but I found it really confusing. I'd love to get some quick tips on getting started with rendering text from right to left.
Re: [flexcoders] internationalization
Yes, they are called resource modules! Thanks Gordon! http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@adobe.com wrote: Haykel is probably talking about loading a resource module. The resource bundles in a resource module automatically get added to the ResourceManager. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Yves Riel *Sent:* Tuesday, January 20, 2009 4:16 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] internationalization Haykel, out of curiosity, when you load them dynamically at run-time, do you pass them to the resource bundle manager? That's what we did but I'm curious to see what other did and if there are a open source libraries that do just that. We didn't find any at the time so we had to do it all ourselves. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Tuesday, January 20, 2009 3:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
[flexcoders] Centered preloader that displays while image is loading
how can i show a preloader while an image?
Re: [flexcoders] ContextMenuItem with a checkbox ?
There is already support for checkbox menu items. Just set their 'type' property to 'check'. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Mon, Jan 19, 2009 at 11:57 PM, Michael Pelz-Sherman mpelzsher...@gmail.com wrote: Hi again, I thought I'd try extending the ContextMenuItem class to provide this behavior, but according to the compiler, the ContextMenuItem class is declared final in the Gumbo Flex SDK. I found a post from 2006 that shows ContextMenuItem being extended: http://www.bigroom.co.uk/blog/custom-context-menu-with-keyboard-shortcuts-in-flash Did this change recently? If so, why? Thanks, - Michael -- *From:* Michael Pelz-Sherman mpelzsher...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, January 19, 2009 2:15:33 PM *Subject:* [flexcoders] ContextMenuItem with a checkbox ? Hi, I'd like to create a ContextMenuItem with a checkbox that toggles some behavior. Is this possible? Thanks! - Michael
Re: [flexcoders] Centered preloader that displays while image is loading
put a progress bar into your custom image component, then you liste to ther progress event and and adjust pthe progress property accordingly. HTH, Claudiu From: stinasius stinas...@yahoo.com To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 12:41:02 PM Subject: [flexcoders] Centered preloader that displays while image is loading how can i show a preloader while an image?
[flexcoders] Relative Axes on DateTime Chart
Hi, Hit a small piece of weirdness and hope someone knows of a solution... I'm plotting three dateTime series on the same chart and unexpectedly, the lines aren't plotted relative to one another - ie I was expecting that a datapoint relating on one line to a particular date to correspond to a datapoint on another line in terms of its x-position but it seems that each dateTime series on the chart holds its own axis and therefore if the date ranges for each line aren't precisely the same for each then the chart just doesn't make any sense - you cannot look at one position on the x axis and see what values exist on each line for that position. Is there any way I can force the lines to 'relate' to one another in the x-dimension? Thanks, Jamie.
[flexcoders] Re: internationalization
--- In flexcoders@yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote: if the data is loaded dynamic, then set up a event listener for resourceManager.change event, it will fire whenever the localeChain was changed. Yes, they are called resource modules! Thanks Gordon! http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@... wrote: Haykel is probably talking about loading a resource module. The resource bundles in a resource module automatically get added to the ResourceManager. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Yves Riel *Sent:* Tuesday, January 20, 2009 4:16 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] internationalization Haykel, out of curiosity, when you load them dynamically at run-time, do you pass them to the resource bundle manager? That's what we did but I'm curious to see what other did and if there are a open source libraries that do just that. We didn't find any at the time so we had to do it all ourselves. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Tuesday, January 20, 2009 3:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@... wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
[flexcoders] Navigational Design Patterns?
Hi, We have a modular Flex project. Each screen has back and next buttons. There are various routes through the application and I'm about to re-write the logic which determines where the buttons take the user when they are pressed (what is already in place is overly complex). I'm guessing that there are fairly established methods for achieving this and would be interested to see what exists, rather than roll out a bespoke solution. Can anyone point me in the direction of a good resource? Cheers, Neil
Re: [flexcoders] Font's not loading in IE?
Are you sure your application is using fonts that are embedded in the application, and not drawing on fonts from the client system? Rob On Jan 20, 2009, at 7:32 PM, tchredeemed wrote: I have noticed that when I embed my fonts they load fine in Mac - Safari Firefox However, on a Windows machine - IE 6/7 Google Chrome Firefox The fonts do not load correctly. Anyone know why this happens? Even in some places, the fonts look fine, however in a lot of places they won't seem to load correctly... Odd behavior, not sure what the cause is...
RE: [flexcoders] FB debug constantly logs to console
You say it was a bug in your code. Did you find a way to remove the traces from the console? We do load a lot of images in our project and those unwanted trace statements really annoy me! I never looked into it but if you found a way to suppress these traces, do you mind sharing it? From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of John Van Horn Sent: Tuesday, January 20, 2009 7:35 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FB debug constantly logs to console Yep, that was it...a bug in our code. Thanks Josh. FlexBuilder, I take back every bad thing I said about you.well, at least in the last hour. On Tue, Jan 20, 2009 at 5:53 PM, Josh McDonald dzn...@gmail.com mailto:dzn...@gmail.com wrote: You're probably loading images or something along those lines using a SWFLoader or one of its subclasses such as Image. This is simply Player telling you about it decoding the results and adding them to the VM. -Josh 2009/1/21 John Van Horn jmvanh...@gmail.com mailto:jmvanh...@gmail.com All of a sudden a few days ago, launching a debug session in FB3, results in FB (or maybe debug player) logging constantly to the console. I get about 2 of these messages a second, and it doesnt stop till I terminate the debug session. This does not output to flashlog.txt. It makes reading traces in FB console very difficult. Anybody experienced this or know a solution? [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 2,747 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 997 bytes after decompression [SWF] Users:jvanhorn:player.swf - 1,646 bytes after decompression [SWF] Users:jvanhorn:player.swf - 985 bytes after decompression [SWF] Users:jvanhorn:player.swf - 985 bytes after decompression [SWF] Users:jvanhorn:player.swf - 1,646 bytes after decompression [SWF] Users:jvanhorn:player.swf - 3,798 bytes after decompression [SWF] Users:jvanhorn:player.swf - 686,596 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression [SWF] Users:jvanhorn:player.swf - 0 bytes after decompression -- John Van Horn jmvanh...@gmail.com mailto:jmvanh...@gmail.com -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com mailto:j...@gfunk007.com :: http://flex.joshmcdonald.info/ http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk http://twitter.com/sophistifunk -- John Van Horn jmvanh...@gmail.com mailto:jmvanh...@gmail.com
RE: [flexcoders] internationalization
The only problem I have with resource modules is that they are compiled into swf. Our users require that the language files be accessible using notepad or any text editor so I cannot use Flex. A typical example would be a lexicon file where the user could add terms at any time. We had to load the file separately and push it into the resource manager. Of course we lose bandwidth but it's what our user base needs. I was just curious to see if other were doing it this way. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Haykel BEN JEMIA Sent: Wednesday, January 21, 2009 5:12 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] internationalization Yes, they are called resource modules! Thanks Gordon! http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com http://www.allmas-tn.com On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@adobe.com mailto:gosm...@adobe.com wrote: Haykel is probably talking about loading a resource module. The resource bundles in a resource module automatically get added to the ResourceManager. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Yves Riel Sent: Tuesday, January 20, 2009 4:16 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: RE: [flexcoders] internationalization Haykel, out of curiosity, when you load them dynamically at run-time, do you pass them to the resource bundle manager? That's what we did but I'm curious to see what other did and if there are a open source libraries that do just that. We didn't find any at the time so we had to do it all ourselves. From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Haykel BEN JEMIA Sent: Tuesday, January 20, 2009 3:33 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] internationalization Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us mailto:h...@netprof.us wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
Re: [flexcoders] How to remove space at the end of line chart when using disabledDays = [6,0]!
Hi Jim, I tried like u told. I replaced ur code in 3 places. then I run my application. Still i see same white spaces at right side. I think we need to re-build sdk to effect the changes. I dont know how to re-build, can u pls help me on this. thanking you -- Vijay SV. Jim Cheng-2 wrote: It's a Flex 3 charting bug alright. This was originally reported about 9 months ago during the beta cycle on the Flex bugbase and was later closed by Adobe with a resolution of Cannot Fix for what I believe to be a rather spurious reason, see: https://bugs.adobe.com/jira/browse/FLEXDMV-963 Contrary to what's reported in the comments on that bug, the problem is actually not too difficult to fix provided you have access to the source code (e.g. using Flex Builder 3 Pro) and are willing to do a little bit of subclassing or monkey-patching to fix the issue. Read on if you're interested. The basic problem is that the DateTimeAxis class does not correctly calculate the total space available for charting when disabledDays and/or disabledRanges is enabled. This is always taken to be the difference between computedMaximum and computedMinimum (as seen in the transformCache, buildLabelCache and buildMinorTickCache methods). However, this calculation becomes wrong when there are disabled ranges, as it yields a total span that's now too large (not accounting for the ranges that have been removed). The visual consequence of this is that the chart now appears to be condensed to the left. The available space should instead be taken to be the difference between computedMaximum and computedMinimum, with the following term also subtracted (in the context of the DateTimeAxis class): dateRangeUtilities.calculateDisabledRange(computedMinimum, computedMaximum); This additional term accounts for the space that is removed by the disabled ranges (or days), and consequently allows the chart's axis and elements to correctly take up the full available width. To make a simple monkey-patch to fix this, you can copy the contents of Adobe's DateTimeAxis class into your own class path, doing a search and replace on all instances in the file like so (removing quotes and excess whitespace for formatting): Find: computedMaximum - computedMinimum Replace with: computedMaximum - computedMinimum - dateRangeUtilities.calculateDisabledRange(computedMinimum, computedMaximum); You can also do this as a subclass, but that's somewhat trickier since the methods that you'll need to override make references to a number of private variables and methods of DateTimeAxis. As an aside, perhaps someone at Adobe might want to consider evaluating this patch for possible inclusion into the Flex 3 Charting codebase. I haven't found any other side effects in testing and my own use of this change, and it correctly handles the test case from the JIRA bug listed at the top of message. Jim buithanhtuu wrote: I'm using chart of flex 3. When I use Linechart with DateTimeAxis tag, in this tag i used property disabledDays = [6,0] then weekend days did not show on chart, but a lot of white space are show at the end of chart. So, the width of line chart is not scale full the width of chart. I used sample from this link http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_04.html http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_04.html Could you please help me fix this problem or this is bugs of chart in flex 3 ? -- View this message in context: http://www.nabble.com/How-to-remove-space-at-the-end-of-line-chart--when-using-disabledDays-%3D-%22-6%2C0-%22%21-tp16328679p21580875.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Flex Builder 3 + Eclipse plugins vs. MyEclipse + FB3 plugin?
Hi Aswin, can you please send me screen shot error message. Assuming that you have followed steps correctly and when you click on Run Run As Flex Application in the right click menu or on Menu's on top, you see the message I believe. Am I wrong? Correct me if I am. The message clearly shows that, it is looking for /test.html/test.html file, which basically will not be present as you only need to run test.html. If it is same test project which I have posted, then all you need to do is just select the project and click on RUN button, nothing else, you need not go to menu Run Run As Flex Application at all. Regards Srinivas S M ashwiba wrote: Hi, IHi, I have tried the info provided by s.m.srinivas . Still i am not able to run from Run-RunAs- FlexApplication. Getting Request Resourse is not available error like below : -- type Status report message /test.html/test.html description The requested resource (/test.html/test.html) is not available. -- Help me out on the same Regards, Ashwin.B s.m.srinivas wrote: Hi, I have posted an article in my http://riawanderer.blogspot.com/ blog which explains how to install Flex Builder on MyEclipse. This post has Video, Text Images showing you the steps to achieve it. Hope it's helpful. Thanks, Srinivas gers32-3 wrote: Hi, I've been using MyEclipse + Flex Builder 2 plugin, as well as a bunch of other plugins (RadRails, Database Explorer, SVN, etc) for about 6 months. The makers of MyEclipse tell me they don't officially support Flex Builder. So when I eventually upgrade to FB3, I'm considering installing the FB3 application by itself. Since FB3 is based on Eclipse, can I then recreate my existing development environment by installing the other plugins mentioned above? Thanks, Chris. -- View this message in context: http://www.nabble.com/Flex-Builder-3-%2B-Eclipse-plugins-vs.-MyEclipse-%2B-FB3-plugin--tp15824053p21576935.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Implementing ORS in flex
Hello guys , i am trying to implement ORS in flex . I want to control this component through Javascript . can anybody tell me is thr already such component ..that will reduce my overall time to finish the project ?
[flexcoders] Re: Roles Based UI
Hi, I would consider using ViewStates. Create a base state with general controls that must be available to all roles. Add a viewstate for each role, with the changes related to the base state. Makes it easy to maintain and you don't have to build a complete custom solution. Regards, Frank --- In flexcoders@yahoogroups.com, ilikeflex ilikef...@... wrote: Hi I am developing role based GUI. Can anybody please point to best practices or any flex article which can help to achieve this. Thanks ilikeflx
RE: [flexcoders] Re: Roles Based UI
And now to answer ilikeflex last questions ... Yes you will need to store the mapping between permissions and roles. When you create a new role, you need to have a UI that will help the user assign a list of permissions. You can also create a role from a template that already has a set of permissions assigned to it. You then just add or remove the required permissions to customize the role. This approach, as stated earlier in the e-mail trail, has the benefit of allowing to easily customize the UI for any type of users but it has the drawback that you must develop a role/permission model and all the UI that comes with it. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ilikeflex Sent: Tuesday, January 20, 2009 1:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Roles Based UI Hi It make sense the way you have implemented. Then you need to store the mapping between the permissions and role. correct and what do you do when a new role is added. Thanks ilikeflex --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Yves Riel r...@... wrote: In our case, we use a similar scheme except that we have roles and permissions. It is the permission that defines the access to the component. If the user, in his role, has the permission set to true, then the user gain access to the component. It is very flexible as you can create many roles will similar or different permissions. At the end, you do not tie up the UI to a specific role but to a permission. E.g. mx:Button id=btndelete1 enabled=User.hasPermission ('CanDelete') / mx:Button id=btndelete2 enabled=User.hasPermission ('CanDelete') / mx:Button id=btnAdd enabled=User.hasPermission('CanAdd') / etc... You can see here that two buttons can be displayed using the same permission. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of ilikeflex Sent: Tuesday, January 20, 2009 12:00 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Roles Based UI Hi Do you mean to say that i should do something like this mx:Button id=btndelete visiblieUser.hasAccess(btndelete)/ In the above i am passing the id of the component. Then this means that i have to make some mapping between the component and Role. I think this will be more difficult to manage. Let me know as you are already implementing it. If you could some psuedo code then it will be great. Thanks ilikeflex --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Gregor Kiddie gkiddie@ wrote: As someone who is currently re-working their Role Based Access Control mechanism, point 2 is the wrong way around. It leaks the roles into the rest of the client and stops all your business logic being in one place. Incidentally, this is how we currently do it, and I can show how it's a pain when new roles are added. The better solution is to bind the visibility (enabled, etc, however you deal with not having the correct authorization) of the UIComponent to a hasAccess( componentKey : String ) method on the User class. This has benefits of meaning that all the code for deciding on access is in one place (and makes it very easy to alter / add / remove roles and components), and by binding it, if the authentication changes for any reason, the view can be updated quickly and cleanly. A pitfall to watch out for is hiding pieces of UI which has unexpected behaviour. For example, not showing a piece of the form if the user doesn't have the auth to change that data, if your backend deletes any data it isn't sent by the client, it is easy to turn a not authorised into a delete lots of data. So make sure your client behaviour fits the use cases defined by your back end. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ http://www.inps.co.uk/ http://www.inps.co.uk/ http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[flexcoders] Flex calling Java/Apache Axis web service
Hi All, I have a Java/Apache axis web service which sits on Linux box. I am able to call this fine through a Flex .swf file on Windows. However when I copythe same swf file to the Linux server I get the error posted below. Bar the web service, the rest of the app works the same on both platforms. Any pointers much appreciated. I am using Tomcat web server. [FaultEvent fault=[RPC Fault faultString=Security error accessing url faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTP] messageId=13005BD7-59AB-B3DA-B850-F95031390FF7 type=fault bubbles=false cancelable=true eventPhase=2]
Re: [flexcoders] internationalization
This is more than a simple internationalization, but I think the way you do it is ok as long as you only use text resources. The advantage of resource modules (and why they are compiled to swf) is that they also allow to use media files with the resources. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 2:00 PM, Yves Riel r...@cae.com wrote: The only problem I have with resource modules is that they are compiled into swf. Our users require that the language files be accessible using notepad or any text editor so I cannot use Flex. A typical example would be a lexicon file where the user could add terms at any time. We had to load the file separately and push it into the resource manager. Of course we lose bandwidth but it's what our user base needs. I was just curious to see if other were doing it this way. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Wednesday, January 21, 2009 5:12 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Yes, they are called resource modules! Thanks Gordon! http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@adobe.com wrote: Haykel is probably talking about loading a resource module. The resource bundles in a resource module automatically get added to the ResourceManager. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Yves Riel *Sent:* Tuesday, January 20, 2009 4:16 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] internationalization Haykel, out of curiosity, when you load them dynamically at run-time, do you pass them to the resource bundle manager? That's what we did but I'm curious to see what other did and if there are a open source libraries that do just that. We didn't find any at the time so we had to do it all ourselves. -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Haykel BEN JEMIA *Sent:* Tuesday, January 20, 2009 3:33 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] internationalization Use resource bundles. If you only have 2 or 3 languages and the resources are not heavy in size, you can simply compile them in the application, otherwise load them at runtime. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us wrote: I'm working on a project that requires multiple languages. I'm thinking I have two choices... 1) Use an XML file to change the text to different languages 2) Create a query/remote object through coldfusion to pull the different language. Are those my only options? Or should I say, what is the best way to do this? Has anyone done this or come across any articles? The articles I've found thus far deal with changing the currency/calendar/etc.. While that is something that I need to use, it's not the whole story... Thanks much. Scott
RE: [flexcoders] Navigational Design Patterns?
Someone in this list once pointed to this framework (http://code.google.com/p/flex-slide/). I have not looked at it but it seems very interesting. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of nwebb Sent: Wednesday, January 21, 2009 7:08 AM To: flexcoders Subject: [flexcoders] Navigational Design Patterns? Hi, We have a modular Flex project. Each screen has back and next buttons. There are various routes through the application and I'm about to re-write the logic which determines where the buttons take the user when they are pressed (what is already in place is overly complex). I'm guessing that there are fairly established methods for achieving this and would be interested to see what exists, rather than roll out a bespoke solution. Can anyone point me in the direction of a good resource? Cheers, Neil
Re: [flexcoders] Flex calling Java/Apache Axis web service
Do you have a policy acess specified on the linux machine? Claudiu From: paramjit.parmar paramjit.par...@yahoo.com To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 3:20:19 PM Subject: [flexcoders] Flex calling Java/Apache Axis web service Hi All, I have a Java/Apache axis web service which sits on Linux box. I am able to call this fine through a Flex .swf file on Windows. However when I copythe same swf file to the Linux server I get the error posted below. Bar the web service, the rest of the app works the same on both platforms. Any pointers much appreciated. I am using Tomcat web server. [FaultEvent fault=[RPC Fault faultString= Security error accessing url faultCode=Channel. Security. Error faultDetail= Destination: DefaultHTTP ] messageId=13005BD7 -59AB-B3DA- B850-F95031390FF 7 type=fault bubbles=false cancelable=true eventPhase=2]
Re: [flexcoders] Navigational Design Patterns?
Perhaps you can find some hints here: http://designinginterfaces.com/ Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 1:07 PM, nwebb neilw...@gmail.com wrote: Hi, We have a modular Flex project. Each screen has back and next buttons. There are various routes through the application and I'm about to re-write the logic which determines where the buttons take the user when they are pressed (what is already in place is overly complex). I'm guessing that there are fairly established methods for achieving this and would be interested to see what exists, rather than roll out a bespoke solution. Can anyone point me in the direction of a good resource? Cheers, Neil
Re: [flexcoders] Centered preloader that displays while image is loading
One simple way to do it is to create a component with two states: 'progress' and 'image' for example. The default state would be 'progress', where a progress bar (or text, or animation) is visible and the image is hidden. Update the progress bar while the image is loading and in the 'complete' event handler change the state to 'image', in which the progress bar is hidden and the image is visible. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Jan 21, 2009 at 11:41 AM, stinasius stinas...@yahoo.com wrote: how can i show a preloader while an image?
[flexcoders] Re: FadeIn Effect not working with custom item renderers in List
--- In flexcoders@yahoogroups.com, tonyjobrien ya...@... wrote: --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote: --- In flexcoders@yahoogroups.com, tonyjobrien yahoo@ wrote: I'm trying to get the FadeIn effect to work on my List control, but I'm having no luck. The custom renderer stays white for the FadeInDuration and then appears instantly. If I switch back to using the default renderer, all is well. Also, if I have both a list with a custom renderer and the default at the same time, they both exhibit the same behaviour as the custom renderer. Here is a simple Flex app that shows the issue (comment out the lists as required). FYI, I'm using Flex 3 on Windows XP with Firefox 3. Try changing: mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label}/ /mx:Canvas /mx:Component /mx:itemRenderer to mx:itemRenderer mx:Component mx:Canvas mx:Label text={data.label} blendMode=layer/ /mx:Canvas /mx:Component /mx:itemRenderer HTH; Amy Amy, I have tried that but it still does not display properly. I've tried changing the Canvas component to other container objects, but they all appear to exhibit the same functionality. I've tried with both 3.1 and 3.2 versions of the SDK. The list effect starts with a background color of blue (to make it easier to see what's happening). When using just a Label as the renderer, I can see the blue background boxes resizing into position and then the label fading into view over the 4 second duration. But when using any sort of container object (admittedly I've only tried Canvas, HBox and VBox), the list remains white for the entire 4 second duration, at which point, the renderers become visible immediately (with no blue background or fading at all). When I place both list views on the screen at once, they both exhibit the behaviour of the container renderer. This leads me to believe that the container is doing something different and the single-threaded nature of Flash is causing both views to update once the fade effect has finished. Problem is, I can't work out what it's doing. I suspect that the problem is with one of two things: 1) The specific way that the itemsChangeEffect is implemented 2) The loop where you add the items to the ArrayCollection. The reason I say the first is that you can see an example here http://flexdiary.blogspot.com/2008/09/groupingcollection-example- featuring.html where fade effects are working fine on containers. So if there is a problem with fade effects, it's specific to what happens in that particular situation. If it's the second, you can figure it out pretty quickly by calling disableAutoUpdate() before the loop where you populate the AC and enableAutoUpdate() after the loop. Finally, you may want to double-check to make sure that you did actually set the blendMode on the label to layer. HTH; Amy
[flexcoders] Re: FadeIn Effect not working with custom item renderers in List
--- In flexcoders@yahoogroups.com, Josh McDonald dzn...@... wrote: It may be caused by Container not implementing IDropInListItemRenderer or IListItemRenderer. You really don't want to be extending Container for item renderers if you can avoid it, I believe it's a big performance penalty. AFAIK, those interfaces only deal with how data gets passed into the renderer, not how effects are applied.
[flexcoders] What determines a component's initial skin?
I've been dinking with extending PopUpButton and have run into something that really puzzles me - how does it know to load PopUpButtonSkin by default? There is no code that mentions it in PopUpButton. Is it somehow selected based on the class name? In my PopUpButton descendant, I want it to load a different skin by default. Do I just have to hardcode it into the constructor (or somewhere else that initializes the component), or is there some more standard/graceful way? -- Jason
[flexcoders] Re: Font's not loading in IE?
Yes, I am sure. Or atleast... I thought I was sure... I converted all fonts to truetype and tested it, but it doesn't seem to be working correctly in some places. Is there any reason it would not display correctly on windows but it would display correctly on a mac? --- In flexcoders@yahoogroups.com, Rob Kunkle r...@... wrote: Are you sure your application is using fonts that are embedded in the application, and not drawing on fonts from the client system? Rob On Jan 20, 2009, at 7:32 PM, tchredeemed wrote: I have noticed that when I embed my fonts they load fine in Mac - Safari Firefox However, on a Windows machine - IE 6/7 Google Chrome Firefox The fonts do not load correctly. Anyone know why this happens? Even in some places, the fonts look fine, however in a lot of places they won't seem to load correctly... Odd behavior, not sure what the cause is...
Re: [flexcoders] Re: Font's not loading in IE?
Either this is an esoteric bug, or you've just overlooked something somewhere (we've all done that). I'd post your embed and display code just so we can rule out the second option. On Wed, Jan 21, 2009 at 10:23 AM, tchredeemed apth...@liberty.edu wrote: Yes, I am sure. Or atleast... I thought I was sure... I converted all fonts to truetype and tested it, but it doesn't seem to be working correctly in some places. Is there any reason it would not display correctly on windows but it would display correctly on a mac? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Rob Kunkle r...@... wrote: Are you sure your application is using fonts that are embedded in the application, and not drawing on fonts from the client system? Rob On Jan 20, 2009, at 7:32 PM, tchredeemed wrote: I have noticed that when I embed my fonts they load fine in Mac - Safari Firefox However, on a Windows machine - IE 6/7 Google Chrome Firefox The fonts do not load correctly. Anyone know why this happens? Even in some places, the fonts look fine, however in a lot of places they won't seem to load correctly... Odd behavior, not sure what the cause is...
[flexcoders] Vertical CoverFlow or carousel linked to data grid
Anyone have info on doing this? Need it for store, search creates grid of results and carousel of pictures. Changing the picture selects the grid row, clicking a grid row selects the picture. I am just starting with Flex, this will be my first project, I will to happy to share my code when done.
[flexcoders] filtering blazeds messages
I have blazeds working on a channel I have set up, but how do you filter out the information you broadcast on that channel? If I want to send data to one instance of my application, but no another, how do I determine that. Here is how I set up the message in java and flex. I have tried setting the consumer.selector as it says to in the documentation, but that doesn't seem to do anything, at least not the way I'm doing it. Here is the code: !-- flex code -- mx:Consumer id=consumer destination=factory message=msgHandler(event.message)/ !-- actionscript snippet consumer.selector = reportID = '+reportID+'; consumer.subscribe(); -- // java code message = new AsyncMessage(); message.setDestination(factory); // the channel I've set up message.setClientId(clientID); message.setMessageId(UUIDUtils.createUUID()); message.setTimestamp(System.currentTimeMillis()); message.setHeader(reportID, this.getRepID()); message.setBody(channelDef); // my object service.pushMessageToClients(message, false);
RE: [flexcoders] Re: Roles Based UI
No, please, keep this on line. I have been following it closely because I will be designing and implementing a permissions system in the next couple months. I am finding the discussion very helpful. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: Wednesday, January 21, 2009 5:08 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI Yes, though it's a refreshing change for a flexcoders thread to go beyond the problems of the mechanics of writing an application and include the wider issues. I sometimes think that given the convoluted use of flex we sometimes see, a broader view is sometimes beneficial. Paul - Original Message - From: Gregor Kiddie mailto:gkid...@inpses.co.uk To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:57 AM Subject: RE: [flexcoders] Re: Roles Based UI I think this is a good candidate for taking offline huh ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk http://www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: 21 January 2009 09:53 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Roles Based UI Gregor, I just wanted to say that while I do believe that for role based applications (something beyond 'user' and 'admin') the approach I outlined is a good way to go, I fully understand that implementation of roles is down to a lot of considerations and not everyone has the time (or inclination) to separate roles from capabilities. In my case the client needed a sophisticated system that allowed administrators to assign and change roles and even grant/remove individual capabilities all within a security system controlling the scope for changes. These capabilities were held as part of the user data and the application did not take account of roles (except as a means of assigning capabilities). The developers did not assign or even define roles (except for the initial minimal roles). I'm not being a dictator - few clients want or need the sophistication that we built for that system. It was a great system (if I say so myself!). Paul - Original Message - From: Paul Andrews mailto:p...@ipauland.com To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:18 AM Subject: Re: [flexcoders] Re: Roles Based UI The user capabilities should sit and be changeable by anyone who has the userCapability(editCapability) or userCapability(editRole). Doesn't matter if it's a third party or not. Roles should map to capabilities. The application is controlled by capabilities, not roles. By assigning a role (or roles) to a user, the administrator grants capabilties to a given user. So, your application is driven by capabilities and any (authourised) person can decide what role grants what capability. If you do this you can add and remove new roles, without having to change your application. Naturally, there's a bit more work to do with it and security and scope considerations to address. Paul - Original Message - From: Gregor Kiddie mailto:gkid...@inpses.co.uk To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 9:07 AM Subject: RE: [flexcoders] Re: Roles Based UI Not if the user capabilities are set by a third party, which is the situation I dealing with. I suspect our situation is drastically
[flexcoders] input text currency mask ?
does anyone know any function/component for a inputtext to format when the guy is typing to currency format ? i know there is the currency formatter, but then.. it would not work as the user inputs the data
[flexcoders] Passing variables from .swf to .swf
Hi All, I've been researching this challenge and am not sure which of the methods I've found is the best...need some input on this one. I have a dashboard application (dashboard.swf) that uses multiple swfloaders to load the various widgets that the user needs (which are also .swf's). The trick is that I need to pass a variable into the widgets to let them know which user logged in which allows the widget to load the data specific to that user. I've seen a method that utilizes a localConnection to pass a connection string, a method and parameters...my concern is the local connection...there can be up to 20 widgets on a dashboard and opening an LC for each doesn't seem like it's be efficient... Help?! Thanks, Adrian
[flexcoders] Re: File download from server
Once you create the zip file you need to return the correct headers to the browser so that the browser will pop up the dialog box asking the user what to do. I don't use Java - I use PHP. When the user clicks a button in Flex I create a new URLRequest and then navigateToURL. The PHP script creates the file and when done sends the following headers: Header(Content-type: application/octet-stream); Header(Content-disposition: attachment; filename=zipTest.zip); The script then streams the file to the browser. The headers sent back to the browser cause the browser to pop up the save file window just as if the user clicked a file link on an HTML page. --- In flexcoders@yahoogroups.com, oneworld95 oneworl...@... wrote: I've run into an interesting situation with Flex: I've got a Java servlet that will generate a Zip file when the user clicks a button in Flex. But the file download dialog after the server action requires the user to click a button. It throws this error: Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press. So how do you handle these situations? After the server responds successfully, do you display a second button to do the actual Flex file download? - Alex
Re: [flexcoders] copyright notices in code
We had to add copyright notices to a number of .mxml and .as files, and wrote a short python script to do this. The only tricky part was that you can't put an XML comment before the XML preamble (the '?xml version=1.0...' part), but you can put it outside the root element. If your script can recognize the copyright header it spits out, updating it to a new wording is trivial (ours does not do this yet). -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: arieljake arielj...@yahoo.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] copyright notices in code Date: Wed, 21 Jan 2009 03:57:31 - How do people add copyright notices to their code? When they create a new file? What if the notice changes? Do they use ant to add it before compilation to each file? Does compiling Flex remove the copyright notice? If so, should one worry about having a copyright notice in the code for if/when it is decompiled? Anyone notice that comments are removed from an MXML file when it is edited in design mode? Any and all responses are invited!
[flexcoders] Re-parenting Tree nodes using drag drop
I looked in the archive but didn't find any useful information for this. So, here it is: I have a Flex Tree component in which I want to re-parent a node using drag drop. Basically, I want to be able to take a node, drag it on top of another node and that the dragged node be added as a child. The standard Flex Tree will not allow this (unless I don't know how to set it up) and I didn't find any open source component on the net. Does any one have or has seen such a tree? Thanks!
RE: [flexcoders] Navigational Design Patterns?
This is pure opinion, and probably not at all helpful to you at this stage of your application, but... I do not like next and back as navigational options. In fact, I do not like the entire metaphor of navigation. It feels like a holdover from the experiences of web surfing, when one felt like one was moving down uncharted, independent paths, where one could lost without a having a marked trail to follow back. I prefer to design my apps from a task oriented standpoint. One completes the subtasks (I know, follow the steps, it is a ubiquitous metaphor) or chooses to stop that task. There are no uncharted paths, one is never lost, you just choose a different task. Sure, there are many times that a wizard can be helpful, particularly to enforce the order of completion of subtasks. You can probably guess that I turn off history management! Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of nwebb Sent: Wednesday, January 21, 2009 7:08 AM To: flexcoders Subject: [flexcoders] Navigational Design Patterns? Hi, We have a modular Flex project. Each screen has back and next buttons. There are various routes through the application and I'm about to re-write the logic which determines where the buttons take the user when they are pressed (what is already in place is overly complex). I'm guessing that there are fairly established methods for achieving this and would be interested to see what exists, rather than roll out a bespoke solution. Can anyone point me in the direction of a good resource? Cheers, Neil
RE: [flexcoders] Passing variables from .swf to .swf
How about just having a central data model? Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Adrian Williams Sent: Wednesday, January 21, 2009 11:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing variables from .swf to .swf Hi All, I've been researching this challenge and am not sure which of the methods I've found is the best...need some input on this one. I have a dashboard application (dashboard.swf) that uses multiple swfloaders to load the various widgets that the user needs (which are also .swf's). The trick is that I need to pass a variable into the widgets to let them know which user logged in which allows the widget to load the data specific to that user. I've seen a method that utilizes a localConnection to pass a connection string, a method and parameters...my concern is the local connection...there can be up to 20 widgets on a dashboard and opening an LC for each doesn't seem like it's be efficient... Help?! Thanks, Adrian
[flexcoders] Re: filtering blazeds messages
Message Service destinations support subtopics - The subtopic feature lets you divide the messages that a Producer component sends to a destination into specific categories in the destination. You can configure a Consumer component that subscribes to the destination to receive only messages sent to a specific subtopic or set of subtopics. You use wildcard characters (*) to subscribe for messages from more than one subtopic. http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html? content=messaging_7.html Also you could use- Message filtering Use the AsyncMessage.headers property of the message to specify the message headers. The headers are contained in an associative Array where the key is the header name and the value is either a String or a number message.headers = new Array(); message.headers[prop1] = 5; It depends on what you need --- In flexcoders@yahoogroups.com, netdeep deep...@... wrote: I have blazeds working on a channel I have set up, but how do you filter out the information you broadcast on that channel? If I want to send data to one instance of my application, but no another, how do I determine that. Here is how I set up the message in java and flex. I have tried setting the consumer.selector as it says to in the documentation, but that doesn't seem to do anything, at least not the way I'm doing it. Here is the code: !-- flex code -- mx:Consumer id=consumer destination=factory message=msgHandler(event.message)/ !-- actionscript snippet consumer.selector = reportID = '+reportID+'; consumer.subscribe(); -- // java code message = new AsyncMessage(); message.setDestination(factory); // the channel I've set up message.setClientId(clientID); message.setMessageId(UUIDUtils.createUUID()); message.setTimestamp(System.currentTimeMillis()); message.setHeader(reportID, this.getRepID()); message.setBody(channelDef); // my object service.pushMessageToClients(message, false);
RE: [flexcoders] Re-parenting Tree nodes using drag drop
Hmm, that should be standard functionality. I have used Tree DnD to rearrange xml regularly, though not recently. I wil look for a simple example. Have you tried this? As I recall, it can be difficult to drop the first child node into an empty parent. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: Wednesday, January 21, 2009 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re-parenting Tree nodes using drag drop I looked in the archive but didn't find any useful information for this. So, here it is: I have a Flex Tree component in which I want to re-parent a node using drag drop. Basically, I want to be able to take a node, drag it on top of another node and that the dragged node be added as a child. The standard Flex Tree will not allow this (unless I don't know how to set it up) and I didn't find any open source component on the net. Does any one have or has seen such a tree? Thanks!
Re: [flexcoders] Re: Peculiar Image Behavior!
Did you ever resolve this issue with your JPEGs? I've just run into exactly the same thing. On Wed, Jan 7, 2009 at 11:35 AM, tchredeemed apth...@liberty.edu wrote: I saved it out as Baseline(standard) just to be sure, same problem. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560
RE: [flexcoders] input text currency mask ?
Yes, I recall such a component. Maybe on Flex Exchange? Try google for this. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of rockorgames Sent: Wednesday, January 21, 2009 11:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] input text currency mask ? does anyone know any function/component for a inputtext to format when the guy is typing to currency format ? i know there is the currency formatter, but then.. it would not work as the user inputs the data
[flexcoders] Re: DataGrid Column Sizing issue
Hi Alex, Thanks for the reply. I am reseting column every time when I add remove any column from from DataGrid Column.But It still scaled last column up to right most of dataGrid. I am summing size of all column and assigning it to datagrid.width and calling datagrid.validateNow() method. still it is not resizing size of dataGrid. Any idea ,which method i need to call to ask container to resize it. Regards, Dharmendra --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: When horizontalScrollPolicy=off (default), all columns are scaled to fit within the width of the DG. It makes it kind of hard to insert one column and get the sizing you want because existing columns get an extra attempt their sizes honored. One solution is to totally reset the columns array. If horizontalScrollPolicy=on or auto columns do not get scaled but the last column will get stretched as necessary so we don't leave dead space at the far right of the scroll area. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dharmendra Chauhan Sent: Tuesday, January 20, 2009 8:02 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid Column Sizing issue Hi All, I have designed a custom dataGrid which allows user to select column which he wants to be visiable.Here is the issue which I have been facing: When user select two column to be visiable, Lets assume Col1.with = 25 , Col2.with = 20 , Expected Result: It should occupy 25+20 pixel space and adjust datagrid size accordingly. Actual Result: Col1 is occupying correct space but col2 occupies all rest of the space available on the right hand side i.e. col2 is to occupying more space than it is suppose to be. I want col2 to occupy only 20 pixel space. datagird height and width both are 100 % Any help would be highly appreciated. Regards, Dharmendra Chouhan
[flexcoders] Re: Big issue with keyboard mapping on Windows
Does anybody have an idea about this one?Because I'm still stuck on it and I'm going crazy! Sébastien Arbogast http://sebastien-arbogast.com 2008/12/18 Sebastien ARBOGAST sebastien.arbog...@gmail.com I'm currently developing a Flex 3 business application on a Mac laptop with a French Belgian keyboard. Everything worked great until some customers started to notice that they can't type some characters in my app under Windows. It seems like the main problem is with the top digit keys on the main keyboard: accentuated characters are correctly typed. For example '2' and 'é' are on the same key and normally I have to press Shift+'2' to actually get a '2'. Yet, on Windows (XP or Vista), all I get is a 'é', whether I press Shift or not. Furthermore, Ctrl+Alt characters like '@' are simply impossible to type. Is anyone aware of any problem with internationalization and keyboard mapping? Is there a way to solve that? (I hope so because this one is likely to ruin my entire project!) Sébastien Arbogast http://sebastien-arbogast.com
Re: [flexcoders] Passing variables from .swf to .swf
Hi Tracy, We are already using a cental db here...we are running a pretty massive DB via SQL, use C#.Net for our control layer and use Flex/AS for our presentation, which calls for the data using a WSDL...the dashboard is for project managers...when they login to the dashboard, I need to be able to pass their loginId to the widgets so they can load the various data points for the project that person manages...i.e. widget-A loads project statistics...and it needs to know which project's statistics to load...the only way it will know that is by having the userId that logged in. Or am I not understanding what you are referring to as a central data model? Adrian Tracy Spratt wrote: How about just having a central data model? Tracy Spratt Lariat Services Flex development bandwidth available *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Adrian Williams *Sent:* Wednesday, January 21, 2009 11:53 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Passing variables from .swf to .swf Hi All, I've been researching this challenge and am not sure which of the methods I've found is the best...need some input on this one. I have a dashboard application (dashboard.swf) that uses multiple swfloaders to load the various widgets that the user needs (which are also .swf's). The trick is that I need to pass a variable into the widgets to let them know which user logged in which allows the widget to load the data specific to that user. I've seen a method that utilizes a localConnection to pass a connection string, a method and parameters...my concern is the local connection...there can be up to 20 widgets on a dashboard and opening an LC for each doesn't seem like it's be efficient... Help?! Thanks, Adrian
RE: [flexcoders] Re-parenting Tree nodes using drag drop
Yes, there is an example in the docs under the heading: Using drag-and-drop with list-based controls Subheading: Dragging and dropping in the same control Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Wednesday, January 21, 2009 12:14 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re-parenting Tree nodes using drag drop Hmm, that should be standard functionality. I have used Tree DnD to rearrange xml regularly, though not recently. I wil look for a simple example. Have you tried this? As I recall, it can be difficult to drop the first child node into an empty parent. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: Wednesday, January 21, 2009 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re-parenting Tree nodes using drag drop I looked in the archive but didn't find any useful information for this. So, here it is: I have a Flex Tree component in which I want to re-parent a node using drag drop. Basically, I want to be able to take a node, drag it on top of another node and that the dragged node be added as a child. The standard Flex Tree will not allow this (unless I don't know how to set it up) and I didn't find any open source component on the net. Does any one have or has seen such a tree? Thanks!
[flexcoders] What is the results of a web service
I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl; fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
RE: [flexcoders] Re: Big issue with keyboard mapping on Windows
I have a French Canadian keyboard mapping on my Windows machine and I can type all of the accentuated characters in any TextArea or TextInput. The only thing that I have witnessed is that I need to toggle on my French Canadian keyboard every time after the browser opens. It seems that Flash doesn't initially read the keyboard mapping correctly. As soon as I toggle the keyboard mapping on, once inside the browser, the keyboard works perfectly. Maybe that's your problem too. Looks more like a keyboard configuration issue to me than a Flex issue. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sebastien ARBOGAST Sent: Wednesday, January 21, 2009 12:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Big issue with keyboard mapping on Windows Does anybody have an idea about this one? Because I'm still stuck on it and I'm going crazy! Sébastien Arbogast http://sebastien-arbogast.com http://sebastien-arbogast.com 2008/12/18 Sebastien ARBOGAST sebastien.arbog...@gmail.com mailto:sebastien.arbog...@gmail.com I'm currently developing a Flex 3 business application on a Mac laptop with a French Belgian keyboard. Everything worked great until some customers started to notice that they can't type some characters in my app under Windows. It seems like the main problem is with the top digit keys on the main keyboard: accentuated characters are correctly typed. For example '2' and 'é' are on the same key and normally I have to press Shift+'2' to actually get a '2'. Yet, on Windows (XP or Vista), all I get is a 'é', whether I press Shift or not. Furthermore, Ctrl+Alt characters like '@' are simply impossible to type. Is anyone aware of any problem with internationalization and keyboard mapping? Is there a way to solve that? (I hope so because this one is likely to ruin my entire project!) Sébastien Arbogast http://sebastien-arbogast.com http://sebastien-arbogast.com
RE: [flexcoders] Passing variables from .swf to .swf
I mean a data model in the flex app itself. I like the singleton pattern myself. Also remember, content loaded in a SWFloader can communicate directly with main app data via the dom (Application.applicatin, parentApplication). And the main app can access public members of loaded content via the content property. There are coupling theory issues with these approaches if that is a concern to you. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Adrian Williams Sent: Wednesday, January 21, 2009 12:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Passing variables from .swf to .swf Hi Tracy, We are already using a cental db here...we are running a pretty massive DB via SQL, use C#.Net for our control layer and use Flex/AS for our presentation, which calls for the data using a WSDL...the dashboard is for project managers...when they login to the dashboard, I need to be able to pass their loginId to the widgets so they can load the various data points for the project that person manages...i.e. widget-A loads project statistics...and it needs to know which project's statistics to load...the only way it will know that is by having the userId that logged in. Or am I not understanding what you are referring to as a central data model? Adrian Tracy Spratt wrote: How about just having a central data model? Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Adrian Williams Sent: Wednesday, January 21, 2009 11:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing variables from .swf to .swf Hi All, I've been researching this challenge and am not sure which of the methods I've found is the best...need some input on this one. I have a dashboard application (dashboard.swf) that uses multiple swfloaders to load the various widgets that the user needs (which are also .swf's). The trick is that I need to pass a variable into the widgets to let them know which user logged in which allows the widget to load the data specific to that user. I've seen a method that utilizes a localConnection to pass a connection string, a method and parameters...my concern is the local connection...there can be up to 20 widgets on a dashboard and opening an LC for each doesn't seem like it's be efficient... Help?! Thanks, Adrian
Re: [flexcoders] What is the results of a web service
Hi Wally, Any particular reason you are not setting a resultFormat on your mx:operation? For example: mx:operation name=service resultFormat=object result=serviceResult(event)/ Adrian Wally Kolcz wrote: I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl; fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
[flexcoders] Re: input text currency mask ?
hm found it here: http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetailloc=en_usextid=1616518# --- In flexcoders@yahoogroups.com, rockorgames eguilhe...@... wrote: does anyone know any function/component for a inputtext to format when the guy is typing to currency format ? i know there is the currency formatter, but then.. it would not work as the user inputs the data
Re: [flexcoders] What is the results of a web service
Thanks. Totally forgot about the resultFormat. So used to using RemoteObjects, but we have Blue Disaster(opps, Dragon) here at the U. From: Adrian Williams adri...@familytreedna.com Sent: Wednesday, January 21, 2009 9:47 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the results of a web service Hi Wally, Any particular reason you are not setting a resultFormat on your mx:operation? For example: mx:operation name=service resultFormat=object result=serviceResult(event)/ Adrian Wally Kolcz wrote: I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl; fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
[flexcoders] Re: What determines a component's initial skin?
--- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: I've been dinking with extending PopUpButton and have run into something that really puzzles me - how does it know to load PopUpButtonSkin by default? There is no code that mentions it in PopUpButton. Is it somehow selected based on the class name? There's a globals.css that seems to get compiled in by default. In my PopUpButton descendant, I want it to load a different skin by default. Do I just have to hardcode it into the constructor (or somewhere else that initializes the component), or is there some more standard/graceful way? I couldn't find a way to fudge this that was any easier than just having a css declaration for the subcomponent. If you want it to travel with your component, though, I suspect you'll have to put it into the constructor, since you probably don't want to assume other developers have included your style declaration in their globals.css. HTH; Amy HTH; Amy
RE: [flexcoders] What is the results of a web service
First, on the operation, set resultFormat=e4x. The default object has many drawbacks, search the archives for details. Then modify your handler to work with XMLListCollection [Bindable]public var storyFeed:XMLListCollection; public function buildBookHandler(e:ResultEvent):void { var xmlResult:XML = XML(e.result); trace(xmlResult.toXMLString()); //to see your xml structure var xlStoryFeed:XMLList = xmlResult.What.Ever.Path.To.Story.nodes; //depends on xml structure trace(xlStoryFeed.toXMLString()); //this what you expect storyFeed = new XMLListCollection(xlStoryFeed); //now you can use this for a dataProvider //If youwant to loop over the data, use the XMLList var xmlStoryNode:XML for (var i:uint = 0; i xlStoryFeed.length(); i++){ //note the parens on length xmlStoryNode = xlStoryFeed[i]; ... storyArea.text = xmlStoryNode.story; //assumes story child node ... Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Wally Kolcz Sent: Wednesday, January 21, 2009 12:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] What is the results of a web service I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl; fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
[flexcoders] Re: Roles Based UI
--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: No, please, keep this on line. I have been following it closely because I will be designing and implementing a permissions system in the next couple months. I am finding the discussion very helpful. Could we please start trimming it, though? There doesn't need to be a rehash of the entire discussion sent out to everyone every time someone adds to the discussion. Thanks for your courtesy, as I am confident everyone involved in the discussion will extend it. -Amy
RE: [flexcoders] What is the results of a web service
object' is the default. Don't use it. See my other post. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Wally Kolcz Sent: Wednesday, January 21, 2009 12:51 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the results of a web service Thanks. Totally forgot about the resultFormat. So used to using RemoteObjects, but we have Blue Disaster(opps, Dragon) here at the U. From: Adrian Williams adri...@familytreedna.com Sent: Wednesday, January 21, 2009 9:47 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the results of a web service Hi Wally, Any particular reason you are not setting a resultFormat on your mx:operation? For example: mx:operation name=service resultFormat=object result=serviceResult(event)/ Adrian Wally Kolcz wrote: I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http:/ http:// /www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
RE: [flexcoders] Re: Big issue with keyboard mapping on Windows
Dump out the Keyboard events. Are they different? ALT is definitely a problem in Flash plugins. The Browser's often steal ALT. Try using Buzzword and see if it has the same problem. They have a complex keyboard mechanism that uses JS to capture keystrokes and forward to Flash. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sebastien ARBOGAST Sent: Wednesday, January 21, 2009 9:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Big issue with keyboard mapping on Windows Does anybody have an idea about this one? Because I'm still stuck on it and I'm going crazy! Sébastien Arbogast http://sebastien-arbogast.com 2008/12/18 Sebastien ARBOGAST sebastien.arbog...@gmail.commailto:sebastien.arbog...@gmail.com I'm currently developing a Flex 3 business application on a Mac laptop with a French Belgian keyboard. Everything worked great until some customers started to notice that they can't type some characters in my app under Windows. It seems like the main problem is with the top digit keys on the main keyboard: accentuated characters are correctly typed. For example '2' and 'é' are on the same key and normally I have to press Shift+'2' to actually get a '2'. Yet, on Windows (XP or Vista), all I get is a 'é', whether I press Shift or not. Furthermore, Ctrl+Alt characters like '@' are simply impossible to type. Is anyone aware of any problem with internationalization and keyboard mapping? Is there a way to solve that? (I hope so because this one is likely to ruin my entire project!) Sébastien Arbogast http://sebastien-arbogast.com
Re: [flexcoders] What is the results of a web service
Well, still getting the same error. From: Wally Kolcz wko...@isavepets.com Sent: Wednesday, January 21, 2009 9:51 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the resultsgeof a web service Thanks. Totally forgot about the resultFormat. So used to using RemoteObjects, but we have Blue Disaster(opps, Dragon) here at the U. From: Adrian Williams adri...@familytreedna.com Sent: Wednesday, January 21, 2009 9:47 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the results of a web service Hi Wally, Any particular reason you are not setting a resultFormat on your mx:operation? For example: mx:operation name=service resultFormat=object result=serviceResult(event)/ Adrian Wally Kolcz wrote: I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl; fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
RE: [flexcoders] Re-parenting Tree nodes using drag drop
Thanks but this is exactly what I tried before writing this question. I was not able to actually take a node and make it a child of another node. The only exception to this is when the target node already has children and that the children are already visible in the tree. If the target node is close or has no children ... it's impossible ... at least for me :-) From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Wednesday, January 21, 2009 12:37 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re-parenting Tree nodes using drag drop Yes, there is an example in the docs under the heading: Using drag-and-drop with list-based controls Subheading: Dragging and dropping in the same control Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Wednesday, January 21, 2009 12:14 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re-parenting Tree nodes using drag drop Hmm, that should be standard functionality. I have used Tree DnD to rearrange xml regularly, though not recently. I wil look for a simple example. Have you tried this? As I recall, it can be difficult to drop the first child node into an empty parent. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: Wednesday, January 21, 2009 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re-parenting Tree nodes using drag drop I looked in the archive but didn't find any useful information for this. So, here it is: I have a Flex Tree component in which I want to re-parent a node using drag drop. Basically, I want to be able to take a node, drag it on top of another node and that the dragged node be added as a child. The standard Flex Tree will not allow this (unless I don't know how to set it up) and I didn't find any open source component on the net. Does any one have or has seen such a tree? Thanks!
RE: [flexcoders] Re: DataGrid Column Sizing issue
You can try making copies of every DataGridColumn as once they are used some fields get set so they don't get treated the same the next time. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dharmendra Chauhan Sent: Wednesday, January 21, 2009 9:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: DataGrid Column Sizing issue Hi Alex, Thanks for the reply. I am reseting column every time when I add remove any column from from DataGrid Column.But It still scaled last column up to right most of dataGrid. I am summing size of all column and assigning it to datagrid.width and calling datagrid.validateNow() method. still it is not resizing size of dataGrid. Any idea ,which method i need to call to ask container to resize it. Regards, Dharmendra --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: When horizontalScrollPolicy=off (default), all columns are scaled to fit within the width of the DG. It makes it kind of hard to insert one column and get the sizing you want because existing columns get an extra attempt their sizes honored. One solution is to totally reset the columns array. If horizontalScrollPolicy=on or auto columns do not get scaled but the last column will get stretched as necessary so we don't leave dead space at the far right of the scroll area. From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Dharmendra Chauhan Sent: Tuesday, January 20, 2009 8:02 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] DataGrid Column Sizing issue Hi All, I have designed a custom dataGrid which allows user to select column which he wants to be visiable.Here is the issue which I have been facing: When user select two column to be visiable, Lets assume Col1.with = 25 , Col2.with = 20 , Expected Result: It should occupy 25+20 pixel space and adjust datagrid size accordingly. Actual Result: Col1 is occupying correct space but col2 occupies all rest of the space available on the right hand side i.e. col2 is to occupying more space than it is suppose to be. I want col2 to occupy only 20 pixel space. datagird height and width both are 100 % Any help would be highly appreciated. Regards, Dharmendra Chouhan
RE: [flexcoders] Re-parenting Tree nodes using drag drop
Yes, this is a problem, as I noted previously. Re-parenting is not the problem. Perhaps you should start a new thread with the right subject. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: Wednesday, January 21, 2009 1:01 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re-parenting Tree nodes using drag drop Thanks but this is exactly what I tried before writing this question. I was not able to actually take a node and make it a child of another node. The only exception to this is when the target node already has children and that the children are already visible in the tree. If the target node is close or has no children ... it's impossible ... at least for me :-) From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Wednesday, January 21, 2009 12:37 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re-parenting Tree nodes using drag drop Yes, there is an example in the docs under the heading: Using drag-and-drop with list-based controls Subheading: Dragging and dropping in the same control Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Wednesday, January 21, 2009 12:14 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re-parenting Tree nodes using drag drop Hmm, that should be standard functionality. I have used Tree DnD to rearrange xml regularly, though not recently. I wil look for a simple example. Have you tried this? As I recall, it can be difficult to drop the first child node into an empty parent. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Yves Riel Sent: Wednesday, January 21, 2009 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re-parenting Tree nodes using drag drop I looked in the archive but didn't find any useful information for this. So, here it is: I have a Flex Tree component in which I want to re-parent a node using drag drop. Basically, I want to be able to take a node, drag it on top of another node and that the dragged node be added as a child. The standard Flex Tree will not allow this (unless I don't know how to set it up) and I didn't find any open source component on the net. Does any one have or has seen such a tree? Thanks!
RE: [flexcoders] Re: Roles Based UI
No, I decline. I prefer to see the context in every post. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Amy Sent: Wednesday, January 21, 2009 12:58 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Roles Based UI --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspr...@... wrote: No, please, keep this on line. I have been following it closely because I will be designing and implementing a permissions system in the next couple months. I am finding the discussion very helpful. Could we please start trimming it, though? There doesn't need to be a rehash of the entire discussion sent out to everyone every time someone adds to the discussion. Thanks for your courtesy, as I am confident everyone involved in the discussion will extend it. -Amy
[flexcoders] Re: input text currency mask ?
hm forget it.. it doesnt work any1 else have anything else ? --- In flexcoders@yahoogroups.com, rockorgames eguilhe...@... wrote: hm found it here: http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetailloc=en_usextid=1616518# --- In flexcoders@yahoogroups.com, rockorgames eguilherme@ wrote: does anyone know any function/component for a inputtext to format when the guy is typing to currency format ? i know there is the currency formatter, but then.. it would not work as the user inputs the data
RE: [flexcoders] Re: What determines a component's initial skin?
Default styles for 3rd party components is a rough spot in Flex 3. Default styles are usually defined in a CSS type selector (see defaults.css for examples), but third parties have to do a more difficult dance since they can't append to defaults.css. There is a pattern for doing this in the docs and has been discussed on this forum. In it involves a classConstruct() function IIRC From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Amy Sent: Wednesday, January 21, 2009 9:55 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: What determines a component's initial skin? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: I've been dinking with extending PopUpButton and have run into something that really puzzles me - how does it know to load PopUpButtonSkin by default? There is no code that mentions it in PopUpButton. Is it somehow selected based on the class name? There's a globals.css that seems to get compiled in by default. In my PopUpButton descendant, I want it to load a different skin by default. Do I just have to hardcode it into the constructor (or somewhere else that initializes the component), or is there some more standard/graceful way? I couldn't find a way to fudge this that was any easier than just having a css declaration for the subcomponent. If you want it to travel with your component, though, I suspect you'll have to put it into the constructor, since you probably don't want to assume other developers have included your style declaration in their globals.css. HTH; Amy HTH; Amy
[flexcoders] Flash Detection
Hi, I have a program which has a normal desktop setup (installshield). After install and on launch it launches an IE window and inside it's Flex. Now I want to require minimum version of 10, but it's breaking my program using javascript detection as in http://www.adobe.com/products/flashplayer/download/detection_kit/. My question is, is it possible to detect version of Flash not through the browser? I want to be able to read some registry. Otherwise, can I bypass the automatic detection and upgrade mechanism by any chance? I'm having major problem with the way Adobe is doing it, which is upgrading, closing the window, and relaunching the same page. Can I detect that it's less than 10, than just give user a link (redirect to some other page), without going through how Adobe upgrades inside the browser? Thanks, Mike
[flexcoders] 3.2 plus datavisualization
I have yet to upgrade to 3.2, and I'm not sure that the Flexbuilder 3.0.2 upgrade I did a while back was fully successful (I use the plug-in). So I was thinking of downloading the SDK 3.2 separately and adding it to flexbuilder. But I need the datavisualization classes. Is it OK to copy datavisualization.swc to the libs folder of my 3.2 SDK? It looks as though there is also stuff in dataviz stuff in locales. Anything else?
[flexcoders] flex builder student version
Hi does the the student/faculty version license of flex builder will remove the water mark from the flex charting? Regards
RE: [flexcoders] Flash Detection
Maybe you could, through InstallShield, look at the ShockwaveFlash.ShockwaveFlash key under the HKEY_CLASSES_ROOT in the registry. The CurVer sub-key will give you the current version of the Flash Plugin. You can then decide to force the upgrade before you install your app. I have done that once but I don't know if it will properly work for non English based OS. I assume so but I'm not sure. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mike Chang Sent: Wednesday, January 21, 2009 1:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flash Detection Hi, I have a program which has a normal desktop setup (installshield). After install and on launch it launches an IE window and inside it's Flex. Now I want to require minimum version of 10, but it's breaking my program using javascript detection as in http://www.adobe.com/products/flashplayer/download/detection_kit/ http://www.adobe.com/products/flashplayer/download/detection_kit/ . My question is, is it possible to detect version of Flash not through the browser? I want to be able to read some registry. Otherwise, can I bypass the automatic detection and upgrade mechanism by any chance? I'm having major problem with the way Adobe is doing it, which is upgrading, closing the window, and relaunching the same page. Can I detect that it's less than 10, than just give user a link (redirect to some other page), without going through how Adobe upgrades inside the browser? Thanks, Mike
[flexcoders] Re: Font's not loading in IE?
I am actually embedding them like this: I have a module BickhamPro.mxml: on creationComplete I call creationCompleteHandler(); [Embed(source='assets/Bickham Script Pro.ttf', fontFamily='Bickham Script Pro', fontName='Bickham Script Pro', fontWeight=normal, fontStyle=normal, mimeType=application/x-font-truetype)] private static var _bickhamScriptPro:Class; private function creationCompleteHandler():void { Font.registerFont( _bickhamScriptPro ); } When the app is loaded, I load the module into a moduleLoader and add it as a child to the main application. This seems to work on a mac but not on a pc... I do not believe that everyone who has tested this has the fonts installed, I could be wrong. Do you see anything wrong with the code or should I explore each computer for the fonts?
[flexcoders] Re: What is the results of a web service
I looked at the response with Charles and with the variables debug window. The response is basically an arrayCollection of arrayCollections. The following code will display the title of the first data item (Story). You should be able to extrapolate this easily for the rest of the data (ie. a for loop): ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=onCreationComplete() mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.rpc.soap.mxml.*; private var ws:mx.rpc.soap.mxml.WebService; public function onCreationComplete():void { ws = new mx.rpc.soap.mxml.WebService(); ws.endpointURI = http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc;; ws.loadWSDL(http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?w\ sdl); ws.addEventListener(FaultEvent.FAULT, faultHandler); ws.addEventListener(ResultEvent.RESULT, resultHandler); } public function resultHandler(event:ResultEvent):void { var resultArrColl:ArrayCollection = event.result.data; var firstResult:ArrayCollection = resultArrColl[0]; Alert.show(firstResult[0]); } public function faultHandler(event:FaultEvent):void { Alert.show(event.fault.faultString); } public function runRequest():void { ws.listBySubject(); } ]] /mx:Script mx:Button label=Run Request click=runRequest()/ /mx:Application Run this with a breakpoint on the second line of the function resultHandler. You should be able to look at the resultArrColl variable and see that each object in the arrayCollection is itself an arrayCollection. Each object in that arrayCollection has 4 items - linktext, story, photo and defaultLogo. --- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: mx:WebService id=storyGateway wsdl=http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl; fault=Alert.show(event.fault.message,'Story Gateway Error') mx:operation name=listBySubject result=buildBookHandler(event) fault=Alert.show(event.fault.message,'Story Gateway Error') / /mx:WebService It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) I tried to set it to a variable as an ArrayCollection: [Bindable] public var storyFeed:ArrayCollection = new ArrayCollection(); public function buildBookHandler(e:ResultEvent):void { storyFeed = e.result as ArrayCollection; for (var i:uint = 0; i e.result.data.length; i++){ ... //Story Area var storyArea:TextArea = new TextArea(); storyArea.text = storyFeed.getItemAt(i).story; storyArea.wordWrap = true; storyArea.height = 550; storyArea.width = 400; storyArea.editable = false; magPage.addChild(storyArea); storyArea.x = 0; storyArea.y = 25; ... } rssMag.flipOnClick = true; } But still getting errors.. TypeError: Error #1009: Cannot access a property or method of a null object reference. at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] Line 36 is: storyArea.text = storyFeed.getItemAt(i).story; Help!
[flexcoders] Re: HTML and Flex
OK, I'll bite . . . The only solution that I can think of, off the top of my head, is to pop up a new browser window and embed just the TinyMCE instance in that window. When the user has committed their changes in the editor window, use JavaScript and Flex's ExternalInterface API to get the edited content back into the Flex world. And you need some code to close the pop up window, etc. Personally, I'd try real hard to work around that scrolling issue you mentioned, first, before I implemented the pop-up. --Jim --- In flexcoders@yahoogroups.com, bffoley bffo...@... wrote: I have a client who I am making a full-page Flex application for. We originally had the application embeded in the HTML page, but because of Flex's Browser and VBox scrollbars scrolling together bug, I had to made the application show the full page, including the other content in the page which I had to recreate in MXML. The issue here is the client uses TinyMCE in some homemade CMS to make updates to the rest of the content on the page, and he doesn't want to give this up. I haven't been able to find a solution that lets us import the HTML he creates in TinyMCE into the Flex app. I've seen a few iframe options that wont work because of the scrollbars (the iframe stays in the same spot, no matter where you scroll up and down on the page), and some other option I found that converts HTML to a Flash-friendly format doesnt support tables (only DIV tags), which TinyMCE relies on heavily. What are my options here? Is there some sort of solution I can do here that would allow a person who's not technical but likes WYSIWYG editors to get new content into a Flex app?
[flexcoders] StyleManager weirdness
When using StyleManager loadstyledeclarations() to load fonts at runtime, we are seeing strange issues with UI elements either disappearing or moving on stage during the load process. Once the load completes, the UI elements return to their correct positions. Has anyone else noticed anything like this? Rich
Re: [flexcoders] flex builder student version
Yes - I've built an app using a student license from flexregistration.com and it has no watermarks on the charting components. Even better, there is no limitation if you wish to commercialise your creation - no need to buy a copy of Flex Builder for commercial purposes. 2009/1/22 hworke kanps...@gmail.com: Hi does the the student/faculty version license of flex builder will remove the water mark from the flex charting? Regards -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] LCDS read-only problems
Has anyone had problems updating data managed read-only collections? Here are two different scenarios that are causing us problems. We have an Object1 that has a one-to-many/many-to-one bi-directional read-only collection of Object2's. Method 1: We create a new Object2 and add the reference to Object1 to this object We then commit Object2 using dataService.commit([Object2]) We handle the result of that commit and then add Object2 to the collection in Object1 We then commit Object1 Problem... when we use this method, the Object1 id appears in the Object2 table after the commit of Object2, however then in the next commit of Object1, it gets changed to NULL. Method 2: We create a new Object2 and add the reference to Object1 to this object We then add Object2 to the collection in Object1 We then commit Object1 Problem... when we use this method, the commit of Object1 takes an extraordinarily long time. It also hangs the browser as if the Flash Player is being pushed to it's limit. Our Object2 collections have only 2-3 items in them and there are only about 250 Object1's in the database so it's not like we are dealing with huge amounts of data at this point. Any thought or ideas about this would really help us. We are completely stuck at this point since neither method produces any error messages. Thanks! Kevin
Re: [flexcoders] Re: What determines a component's initial skin?
Any hint on what that topic might be under in the docs? I'm having trouble finding it. On Wed, Jan 21, 2009 at 12:15 PM, Alex Harui aha...@adobe.com wrote: Default styles for 3rd party components is a rough spot in Flex 3. Default styles are usually defined in a CSS type selector (see defaults.css for examples), but third parties have to do a more difficult dance since they can't append to defaults.css. There is a pattern for doing this in the docs and has been discussed on this forum. In it involves a classConstruct() function IIRC *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Amy *Sent:* Wednesday, January 21, 2009 9:55 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: What determines a component's initial skin? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: I've been dinking with extending PopUpButton and have run into something that really puzzles me - how does it know to load PopUpButtonSkin by default? There is no code that mentions it in PopUpButton. Is it somehow selected based on the class name? There's a globals.css that seems to get compiled in by default. In my PopUpButton descendant, I want it to load a different skin by default. Do I just have to hardcode it into the constructor (or somewhere else that initializes the component), or is there some more standard/graceful way? I couldn't find a way to fudge this that was any easier than just having a css declaration for the subcomponent. If you want it to travel with your component, though, I suspect you'll have to put it into the constructor, since you probably don't want to assume other developers have included your style declaration in their globals.css. HTH; Amy HTH; Amy -- Jason
[flexcoders] Re: StyleManager weirdness
It appears that the issue was the loadstyledeclarations() update flag being set to true was causing the UI to have these issues. On Wed, Jan 21, 2009 at 2:46 PM, Rich Tretola rtret...@gmail.com wrote: When using StyleManager loadstyledeclarations() to load fonts at runtime, we are seeing strange issues with UI elements either disappearing or moving on stage during the load process. Once the load completes, the UI elements return to their correct positions. Has anyone else noticed anything like this? Rich
[flexcoders] Re: input text currency mask ?
ah decided to stop looking for such component and did this on my own, its not the best thing but is working good enough, if any1 wants the code just reply and i post it here.. (warning its ugly lol) --- In flexcoders@yahoogroups.com, rockorgames eguilhe...@... wrote: does anyone know any function/component for a inputtext to format when the guy is typing to currency format ? i know there is the currency formatter, but then.. it would not work as the user inputs the data
Re: [flexcoders] Passing variables from .swf to .swf
Hi Tracy, Oh if only it were that easy!! Looks like it's gonna have to be much deeperhere's why... A project manager can have any number of projects they run... The dashboard is setup so they have access to all their projects via one dashboard Basically, when they login, I get a list of all the projects they manageand then create a simple viewStack with tabNavigator, one tab for each of the projects they run. Each tab has the same widgets, only loaded with the data specific to the project for the tab they are looking at (much akin to having several tabs opened in Firefox, all of them on Amazon, yet on each one, I'm looking for a book different from the other tabs.) The widgets are simple stand-alone apps that are repatedly used in each tab...i.e. projectStatistics.swf is used once on every tab (i.e. for every project) on the dashboard. For each instance of the widget, it needs to know the project name so it can query the data for that specific project. All of this is created dynamically in my actionscript (will paste below). In addition, the user can customize (and persist in the db) their widget configuration for each project (tab). So, with my 3-column layout, they might have, on [Tab1] Project 1, column 1, Widgets A, C and D while on [Tab2] Project 2, column 1, Widgets A, B, F, Q. All of this persistence is read from the database upon their login and the code simply builds their dashboard, tabs and widgets based on their last know setup. Since this is so dynamic, I don't think I can get away with trying to access any static public variables via application.application. I've taken a look at your example on cflex.net on manipulating the .content property, but it looks like I need to specifically reference each of the loaded widgets, which is not very simple considering their dynamic loading... Any other ideas? And I cannot seem to find much regarding the data model in flex you mentioned... Best, Adrian private function getGapWidgetConfigurationsResult(event:ResultEvent):void { gapWidgetConfigs = event.result as ArrayCollection; buildViewstack(); } private function buildViewstack():void { for each (var project:Object in projectsArray) { var projectName:String = project.label; var newCanvas:Canvas = new Canvas(); newCanvas.id = canvas + projectName; newCanvas.label = projectName; newCanvas.percentHeight = 100; newCanvas.percentWidth = 100; dashboardMainViewstack.addChild(newCanvas); var newHBox:HBox = new HBox(); newHBox.id = hbox + projectName; newHBox.percentHeight = 100; newHBox.percentWidth = 100; newCanvas.addChild(newHBox); for (var i:int = 0; i 3; i++) { var newVBox:VBox = new VBox(); newVBox.id = col + i + projectName; newVBox.percentWidth = 33; newVBox.percentHeight = 100; newVBox.setStyle(borderStyle, solid); newVBox.setStyle(borderThickness, 1); newVBox.setStyle(cornerRadius, 4); newVBox.setStyle(horizontalAlign, center); newVBox.setStyle(horizontalCenter, 0); newVBox.setStyle(paddingTop, 5); newVBox.setStyle(paddingBottom, 5); newVBox.setStyle(backgroundColor, #FCF3D3); newVBox.addEventListener(MouseEvent.MOUSE_DOWN,setMouseDownTrue); newVBox.addEventListener(MouseEvent.MOUSE_UP,setMouseDownFalse); newVBox.addEventListener(DragEvent.DRAG_ENTER,checkAndHandleDE); newVBox.addEventListener(DragEvent.DRAG_DROP,checkAndHandleDD); newHBox.addChild(newVBox); for each (var widgets:Object in gapWidgetConfigs) { if (widgets.DisplayColumn == i + 1 widgets.BcgGroup == projectName widgets.Active == 1) { var newPanel:SuperPanelPlus = new SuperPanelPlus(); newPanel.id = widgets.PanelId; newPanel.title = widgets.Title; newPanel.y = 0; newPanel.percentHeight = widgets.Height; newPanel.percentWidth = 98; newPanel.collapsed =
[flexcoders] Re: Roles Based UI
--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: No, I decline. I prefer to see the context in every post. Here's the thread in the archive http://tech.groups.yahoo.com/group/flexcoders/message/134714. That's an easy way to see the conversation in context. It's common courtesy to snip posts--you don't know what environment people are reading the forum in (it might be via their cell phone), and I don't understand why so many people on here feel common courtesy is beneath them. -Amy
[flexcoders] Re: What determines a component's initial skin?
--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Default styles for 3rd party components is a rough spot in Flex 3. Default styles are usually defined in a CSS type selector (see defaults.css for examples), but third parties have to do a more difficult dance since they can't append to defaults.css. There is a pattern for doing this in the docs and has been discussed on this forum. In it involves a classConstruct() function IIRC Which just goes to show that if you can't get an answer to your question the first time around, wait for someone else to post the same question and give them your best guess :-). Then you'll get a correction from someone that gets you a little closer to the real answer. -Amy
[flexcoders] Re: Navigational Design Patterns?
FWIW, I have to concur with the advice that Tracy gave you and I can also recommend--HIGHLY--the content at the link that Haykel gave you. In short, use Wizard-style navigation for infrequent/complex/inherently multi-step tasks. For the rest of (usually, most of) your tasks, use a more fluid navigational mechanism, such as Hub-and-Spoke. --Jim --- In flexcoders@yahoogroups.com, nwebb neilw...@... wrote: Hi, We have a modular Flex project. Each screen has back and next buttons. There are various routes through the application and I'm about to re-write the logic which determines where the buttons take the user when they are pressed (what is already in place is overly complex). I'm guessing that there are fairly established methods for achieving this and would be interested to see what exists, rather than roll out a bespoke solution. Can anyone point me in the direction of a good resource? Cheers, Neil
[flexcoders] Re: copyright notices in code
For your compiled code: If you are compiling an application, then the first screen that a user sees (splash screen, login form, etc.) should have a copyright notice. If you are compiling a library or resource file of some sort, you may want to include a string which contains a copyright notice. The above does NOT constitute legal advice! --Jim --- In flexcoders@yahoogroups.com, arieljake arielj...@... wrote: How do people add copyright notices to their code? When they create a new file? What if the notice changes? Do they use ant to add it before compilation to each file? Does compiling Flex remove the copyright notice? If so, should one worry about having a copyright notice in the code for if/when it is decompiled? Anyone notice that comments are removed from an MXML file when it is edited in design mode? Any and all responses are invited!
RE: [flexcoders] Passing variables from .swf to .swf
Well it is only the architecture that is simple. If you have complex requirements, the implementation will be complex as well. Data model is a generic term for some accesible structure that holds data, not a class. It is not static. In the creationComplete handler of each of your child swf's, you might have something like: var xmlProject:XML = Application.application.MyModel.getProjectData(ProjectId); That assumes the data is already in the model. If a data service call is required, you would need do something like: Application.application.MyModel.fetchProjectData(ProjectId); Then have a listener or ChangeWatcher listeneing to a model property. When the data call returns in myModel, it sets the value of the bindable property, and the watcher in the child swf is called with the retrieved data. But the core idea is that all components communicate via the model. Using a model and events is probably best, but you can also go straight through dom references. Listeners can be added to dynamically created components, so you would not need specific, named references to the child swfs. You would listen for the applicationComplete event, as in my example, then pass the project Id or something into the child swf. If you passed it in via a setter, you could invoke the get data from within that function. Of if you already have the project data ready when you load the swf, pass it in. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Adrian Williams Sent: Wednesday, January 21, 2009 3:45 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Passing variables from .swf to .swf Hi Tracy, Oh if only it were that easy!! Looks like it's gonna have to be much deeperhere's why... A project manager can have any number of projects they run... The dashboard is setup so they have access to all their projects via one dashboard Basically, when they login, I get a list of all the projects they manageand then create a simple viewStack with tabNavigator, one tab for each of the projects they run. Each tab has the same widgets, only loaded with the data specific to the project for the tab they are looking at (much akin to having several tabs opened in Firefox, all of them on Amazon, yet on each one, I'm looking for a book different from the other tabs.) The widgets are simple stand-alone apps that are repatedly used in each tab...i.e. projectStatistics.swf is used once on every tab (i.e. for every project) on the dashboard. For each instance of the widget, it needs to know the project name so it can query the data for that specific project. All of this is created dynamically in my actionscript (will paste below). In addition, the user can customize (and persist in the db) their widget configuration for each project (tab). So, with my 3-column layout, they might have, on [Tab1] Project 1, column 1, Widgets A, C and D while on [Tab2] Project 2, column 1, Widgets A, B, F, Q. All of this persistence is read from the database upon their login and the code simply builds their dashboard, tabs and widgets based on their last know setup. Since this is so dynamic, I don't think I can get away with trying to access any static public variables via application.application. I've taken a look at your example on cflex.net on manipulating the .content property, but it looks like I need to specifically reference each of the loaded widgets, which is not very simple considering their dynamic loading... Any other ideas? And I cannot seem to find much regarding the data model in flex you mentioned... Best, Adrian private function getGapWidgetConfigurationsResult(event:ResultEvent):void { gapWidgetConfigs = event.result as ArrayCollection; buildViewstack(); } private function buildViewstack():void { for each (var project:Object in projectsArray) { var projectName:String = project.label; var newCanvas:Canvas = new Canvas(); newCanvas.id = canvas + projectName; newCanvas.label = projectName; newCanvas.percentHeight = 100; newCanvas.percentWidth = 100; dashboardMainViewstack.addChild(newCanvas); var newHBox:HBox = new HBox(); newHBox.id = hbox + projectName; newHBox.percentHeight = 100; newHBox.percentWidth = 100; newCanvas.addChild(newHBox); for (var i:int = 0; i 3; i++) { var newVBox:VBox = new VBox();
RE: [flexcoders] Re: Roles Based UI
...you don't know what environment people are reading the forum in... Precisely. Removing the context is no courtesy to me. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Amy Sent: Wednesday, January 21, 2009 3:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Roles Based UI --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspr...@... wrote: No, I decline. I prefer to see the context in every post. Here's the thread in the archive http://tech.groups.yahoo.com/group/flexcoders/message/134714. http://tech.groups.yahoo.com/group/flexcoders/message/134714. That's an easy way to see the conversation in context. It's common courtesy to snip posts--you don't know what environment people are reading the forum in (it might be via their cell phone), and I don't understand why so many people on here feel common courtesy is beneath them. -Amy
[flexcoders] configuring trace
Configuring debug tracing in Flex is pretty easy, just do something like so: var t:TraceTarget = new TraceTarget(); t.level = 1; But for PROD, I want the level to be 8... is this the only way? Is there a better way? How do you guys handle it? Dimitrios Gianninas RIA Developer Team Lead Optimal Payments Inc. -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L’expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s’il est retransmis sans son autorisation. Si vous n’êtes pas le destinataire visé du présent message ou si vous l’avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l’expéditeur.
Re: [flexcoders] Re: Roles Based UI
- Original Message - From: Amy amyblankens...@bellsouth.net To: flexcoders@yahoogroups.com Sent: Wednesday, January 21, 2009 8:50 PM Subject: [flexcoders] Re: Roles Based UI --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: No, I decline. I prefer to see the context in every post. Here's the thread in the archive http://tech.groups.yahoo.com/group/flexcoders/message/134714. That's an easy way to see the conversation in context. It's common courtesy to snip posts--you don't know what environment people are reading the forum in (it might be via their cell phone), and I don't understand why so many people on here feel common courtesy is beneath them. We're all human Amy and forget from time to time. I'm sure you've been guilty yourself sometimes. If it comes to a question of stifling an interesting discussion and paring posts right down, I'm sure most people would err on the odd transgression. I think that's pretty courteous. Paul -Amy
RE: [flexcoders] configuring trace
You mean in the sense that you want to change the level for a production release without recompiling the swf? We use a configuration file. If the trace level is not in the config file or if the config file is not there altogether, the level defaults to 8.
[flexcoders] Hslider and Vslider (Fx 3.2) causing issues OR is it my code?
I have this code in my custom component that contains a slider and when my slider is set to a scale of 1.75 (yes things are scaled very large in my app) my custom components on the stage disappear? What I mean by disappear is that my components scale as they should but when it hits 1..75 scale everything in my component disappears except for the any textfields. I can't seem to find any issues. Not sure if this a bug or my code. Here is the code. ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; click=stopProp(event) creationComplete=init() horizontalAlign=center width=35 mx:Script ![CDATA[ import com.spiceworks.networkmap.ui.components.SliderTrack; import com.spiceworks.networkmap.ui.components.CSpSliderThumb; import com.spiceworks.networkmap.ui.views.SubNode; private function init():void { } public static const ZOOM_MIN:Number = 25; public static const ZOOM_MAX:Number = 525; public static const ZOOM_MIN_PERCENT:Number = .25; public static const ZOOM_MAX_PERCENT:Number = 5.25; ]] /mx:Script !--mx:Label toolTip=Use this to zoom the map. text=Zoom fontSize=9 textAlign=center click=stopProp(event) /-- mx:Style source=assets/styles/main.css/ mx:Canvas width=99% verticalScrollPolicy=off height=190 horizontalScrollPolicy=off top=3 mx:Spacer height=1 / mx:VSlider styleName={getStyle('sliderStyle')} height=95% id=bzoom values=[25] maxHeight=140 minimum={ZOOM_MIN} maximum={ZOOM_MAX} tickInterval=25 tickLength=0 snapInterval=25 liveDragging=true change=updateVScale(event) click=stopProp(event) mouseDown=stopProp(event) sliderThumbClass={CSpSliderThumb} thumbCount=1 showDataTip=true left=4 top=25/ mx:Button id=plusZoom alpha=0 icon={EmbeddedIcons.zoominIcon} cornerRadius=2 width=16 height=16 left=9 click=handleZoomButtonClick(ZoomSlider.ZOOM_UP);stopProp(event); top=6/ mx:Button id=minusZoom alpha=0 icon={EmbeddedIcons.zoomoutIcon} cornerRadius=2 width=16 height=16 left=9 click=handleZoomButtonClick(ZoomSlider.ZOOM_DOWN);stopProp(event); top={bzoom.y + bzoom.height + 3}/ /mx:Canvas mx:Script ![CDATA[ import org.un.cava.birdeye.ravis.utils.events.VGraphEvent; import org.un.cava.birdeye.ravis.graphLayout.visual.VisualGraph; import org.un.cava.birdeye.ravis.assets.icons.EmbeddedIcons; import flash.events.Event; private var _vgraph:VisualGraph; public static const ZOOM_UP:String = zoomup; public static const ZOOM_DOWN:String = zoomdown; /** * Provides access to the registered vgraph object. * */ public function set vgraph(v:VisualGraph):void { _vgraph = v; registerListeners(); } public function stopProp(e:MouseEvent):void { //e.stopImmediatePropagation(); } /** * @private * */ public function get vgraph():VisualGraph { return _vgraph; } public function adjustDefaultZoom(value:Number = 0) : void