Re: [flexcoders] Re: Replacing double slash with a single slash
Hi Valdor, Thanks for the reply, I've just tried this code but no joy... :( var doubleSlash : RegExp = //g; var slash : RegExp = //; winMessage = winMessage.replace( doubleSlash, slash ); I'm sure it's easy when you know how :) Nick On 8 November 2011 19:24, valdhor valdhorli...@embarqmail.com wrote: ** As I understand it the backslash character is special in both the regex and the replacement string, so it has to be double escaped in both places. That means, for every single backslash you want to match or insert, you have to put *four* backslashes in the regex or replacement string. --- In flexcoders@yahoogroups.com, Nick Middleweek nick@... wrote: Hi, I'm trying to replace a double slash with a single slash and am having a little trouble, has anyone done this before? Here's what I've got thus far... var doubleSlash : RegExp = /(\\)(\\)/g; var slash : RegExp = /(\\)/; winMessage = winMessage.replace( doubleSlash, slash ); Cheers, Nick
[flexcoders] Replacing double slash with a single slash
Hi, I'm trying to replace a double slash with a single slash and am having a little trouble, has anyone done this before? Here's what I've got thus far... var doubleSlash : RegExp = /(\\)(\\)/g; var slash : RegExp = /(\\)/; winMessage = winMessage.replace( doubleSlash, slash ); Cheers, Nick
[flexcoders] Creating an unconvential Air app like kuler
Hi, How does one create an Air app that has a non-rectangle window like Kuler? And is it possible to create an Air app that has multi windows? Thanks, Nick
[flexcoders] Util, Helper, Worker, etc Classes
Hello, Does anyone know of a good list of Class types, their naming and usage conventions? I'm trying to find the difference between say a Worker or Helper Class, when to use each and what other standards there are? Cheers, Nick
[flexcoders] Can't see scrollbars on an MX list in a Spark TitleWindow
Hi, Are there any obvious reasons why my MX List won't show scrollbars. It's tucked inside a Spark TitleWindow. The list has verticalScrollPolicy = on, width and height = 100% and the TitleWindow is width = 400, height = 250. There is enough data so the List should render scrollbars. Thanks, Nick
[flexcoders] Re: Can't see scrollbars on an MX list in a Spark TitleWindow
Mmmm, I must be doing something silly, I've also tried this using MX only components, so MX:TitleWindow with an MX:List. Here's my code: http://pastebin.com/ZkzPQBgJ ... and I'm not getting any Scrollbars on the List... height = 100%, TitleWindow.height=250. Can anyone see what I'm missing? Cheers, Nick On 9 September 2011 16:31, Nick Middleweek n...@middleweek.co.uk wrote: Hi, Are there any obvious reasons why my MX List won't show scrollbars. It's tucked inside a Spark TitleWindow. The list has verticalScrollPolicy = on, width and height = 100% and the TitleWindow is width = 400, height = 250. There is enough data so the List should render scrollbars. Thanks, Nick
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Alex, Not sure if I've overlooked something but how can the blue focus rectangle help? Cheers, Nick On 8 September 2011 03:11, Alex Harui aha...@adobe.com wrote: ** I think I’d just hack it in. You can probably hang it off of the DG when not used and grab it from there when needed. The parent of the blue focus rectangle is shared among all Flex components in an app.
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Doug, what's that? On 7 September 2011 20:48, Douglas Knudsen douglasknud...@gmail.com wrote: ** also keep in mind virtualization use in Lists. Just one more cog in The Wheel That Depends Douglas Knudsen http://www.cubicleman.com this is my signature, like it? On Wed, Sep 7, 2011 at 3:21 PM, Nick Middleweek n...@middleweek.co.ukwrote: ** Alex, That's a good idea... What's your thoughts on approach to implement a shared Button? Would you create it at the parent view level and inject into the IR's using some kind of IFactory or perhaps attach it to the data property? Cheers, Nick On 7 September 2011 17:27, Alex Harui aha...@adobe.com wrote: ** Yes, it is a set of trade-offs. Deferring until you know you need it is best for memory and startup time, but you have to pay for the adding later. You can cache the button so you don’t always create a new one. You can even share a button between all renderers if you want. On 9/7/11 5:42 AM, ganaraj p r ganara...@gmail.com wrote: With toggling the visibility property you are creating 1 Button per Item Renderer. When you are creating an object each time a user's mouse is over it, and then deleting it when its out, you are creating 'n' number of objects and deleting them , the new objects need to be garbage collected. The initial load is going to be more ofcourse, but then its a set number since you are only going to be creating a set number of buttons. On Wed, Sep 7, 2011 at 10:23 AM, Nick Middleweek n...@middleweek.co.uk wrote: Alex, Just checking/ thinking... But if I go down the visibility route and addChild( x ) up front in createChildren() would I be consuming more initial memory than if I addChild( x ) as and when I needed it? In my case, I have 15 columns, using the same renderer and 40 rows so that's 600 extra buttons that would be created that are initially set visible = false; I'm assuming they are all in memory and when scrolling, this could impact scroll performance. Or is adding/ removing children dynamically and making each Item Renderer go through it's update cycle more expensive? Cheers, Nick On 6 September 2011 19:48, Alex Harui aha...@adobe.com wrote: States are still available in the MX way. You can also hide and show instead of add and remove. Known children should be created in createChildren or in states. But otherwise, you have to create them when you know you need them. The List components create them in updateDisplayList since that’s when they finally know how many to create. On 9/6/11 10:48 AM, Nick Middleweek n...@middleweek.co.uk http://n...@middleweek.co.uk wrote: Thanks for this... So I'm extending UIComponent, does this mean I'm doing it the MX way? Cheers... On 6 September 2011 14:38, Haykel BEN JEMIA hayke...@gmail.com http://hayke...@gmail.com wrote: Hi Nick, if you use Spark components and the child components you want to add are fixed and known, e.g. a 'close' button that should be visible on mouse-over, then I would use skin states and manage visibility of the components in the skin. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 10:28 AM, Nick Middleweek n...@middleweek.co.uk http://n...@middleweek.co.uk wrote: Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } ); -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Douglas, Thanks... So as a rule of thumb, add all children that I know I need up front and show/ hide them using visibility in e.g. onMouseOver/ Out. Or set a dirty flag and then invalidateDisplayList(), then from within updateDisplayList(), check the dirty flags and addChild( x ) in there... cool. thanks! p.s. yeah I like it :) On 6 September 2011 20:35, Douglas Knudsen douglasknud...@gmail.com wrote: ** ze MX way, yes. So, um, I suggest you look at the visible property. Adding the child once in createChildren() then managing the visible property sounds better in the long run. If you really must add/remove the button, I'd say use updateDisplayList(), a good place for adding/removing dynamic children. There's a crap ton of info on the life cycle, here is one such source http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf68641-7ff0.html Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Alex, Just checking/ thinking... But if I go down the visibility route and addChild( x ) up front in createChildren() would I be consuming more initial memory than if I addChild( x ) as and when I needed it? In my case, I have 15 columns, using the same renderer and 40 rows so that's 600 extra buttons that would be created that are initially set visible = false; I'm assuming they are all in memory and when scrolling, this could impact scroll performance. Or is adding/ removing children dynamically and making each Item Renderer go through it's update cycle more expensive? Cheers, Nick On 6 September 2011 19:48, Alex Harui aha...@adobe.com wrote: ** States are still available in the MX way. You can also hide and show instead of add and remove. Known children should be created in createChildren or in states. But otherwise, you have to create them when you know you need them. The List components create them in updateDisplayList since that’s when they finally know how many to create. On 9/6/11 10:48 AM, Nick Middleweek n...@middleweek.co.uk wrote: Thanks for this... So I'm extending UIComponent, does this mean I'm doing it the MX way? Cheers... On 6 September 2011 14:38, Haykel BEN JEMIA hayke...@gmail.com wrote: Hi Nick, if you use Spark components and the child components you want to add are fixed and known, e.g. a 'close' button that should be visible on mouse-over, then I would use skin states and manage visibility of the components in the skin. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 10:28 AM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Alex, That's a good idea... What's your thoughts on approach to implement a shared Button? Would you create it at the parent view level and inject into the IR's using some kind of IFactory or perhaps attach it to the data property? Cheers, Nick On 7 September 2011 17:27, Alex Harui aha...@adobe.com wrote: ** Yes, it is a set of trade-offs. Deferring until you know you need it is best for memory and startup time, but you have to pay for the adding later. You can cache the button so you don’t always create a new one. You can even share a button between all renderers if you want. On 9/7/11 5:42 AM, ganaraj p r ganara...@gmail.com wrote: With toggling the visibility property you are creating 1 Button per Item Renderer. When you are creating an object each time a user's mouse is over it, and then deleting it when its out, you are creating 'n' number of objects and deleting them , the new objects need to be garbage collected. The initial load is going to be more ofcourse, but then its a set number since you are only going to be creating a set number of buttons. On Wed, Sep 7, 2011 at 10:23 AM, Nick Middleweek n...@middleweek.co.uk wrote: Alex, Just checking/ thinking... But if I go down the visibility route and addChild( x ) up front in createChildren() would I be consuming more initial memory than if I addChild( x ) as and when I needed it? In my case, I have 15 columns, using the same renderer and 40 rows so that's 600 extra buttons that would be created that are initially set visible = false; I'm assuming they are all in memory and when scrolling, this could impact scroll performance. Or is adding/ removing children dynamically and making each Item Renderer go through it's update cycle more expensive? Cheers, Nick On 6 September 2011 19:48, Alex Harui aha...@adobe.com wrote: States are still available in the MX way. You can also hide and show instead of add and remove. Known children should be created in createChildren or in states. But otherwise, you have to create them when you know you need them. The List components create them in updateDisplayList since that’s when they finally know how many to create. On 9/6/11 10:48 AM, Nick Middleweek n...@middleweek.co.uk http://n...@middleweek.co.uk wrote: Thanks for this... So I'm extending UIComponent, does this mean I'm doing it the MX way? Cheers... On 6 September 2011 14:38, Haykel BEN JEMIA hayke...@gmail.com http://hayke...@gmail.com wrote: Hi Nick, if you use Spark components and the child components you want to add are fixed and known, e.g. a 'close' button that should be visible on mouse-over, then I would use skin states and manage visibility of the components in the skin. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 10:28 AM, Nick Middleweek n...@middleweek.co.uk http://n...@middleweek.co.uk wrote: Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
[flexcoders] Re: Flex 4: MouseOver not firing on a UIComponent Item Renderer
OK, well I've settled with the white background for now... On 5 September 2011 11:36, Nick Middleweek n...@middleweek.co.uk wrote: Hi, We're using Flex 4 and have an Item Renderer that extends UIComponent. We're adding a TextField that's added in createChildren(). In the Constructor(), I'm adding the listener: this.addEventListener(MouseEvent.MOUSE_OVER, this_onMouseOver); ...And in the listener function, I'm adding a button: indicator = new Button(); indicator.width = 20; indicator.height = 20; indicator.label = ...; this.addChild(indicator); this.invalidateDisplayList(); The problem is that the MouseOver event is ONLY firing when I mouse over the TextField and not the 'background' of the IR. If I draw a rectangle in updateDisplayList: // draw rect this.graphics.beginFill(0xFF, 1); this.graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); this.graphics.endFill(); ... the MouseOver event DOES fire on the red background. Is there a way of achieving this without drawing a rectangle? I did think of setting the rect to white but this doesn't seem like the correct approach. Thanks for any help... Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } ); -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
[flexcoders] What is the a correct lifecycle phase to add new child components?
Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()* but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } );
[flexcoders] Using RemoteClass meta tag
Hi, Am I right in thinking the [RemoteClass] meta tag is used for mapping ActionScript Objects to Server-Side Objects AND vice versa? I've been reading the Adobe docs and I can't figure out at what point the RemoteClass meta tag kicks in to aid conversion. Does anyone have a super simplified explanation of the process? For the record: I'm using WebOrb for .Net on a project - Existing services are working and we're generally calling a service using parameters but in the Responder's result() method our code is just casting var myObject : MyClass = evt.result.myObject as MyClass; Because it's using casting I can't see where the [RemoteClass] is actually of any use? Thanks, Nick
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Hi Jeff, The component I'm working on is an Item Renderer for an Advanced Data Grid. I'm currently creating the button on onMouseOver() and then removing the button on onMouseOut(). commitProperties() doesn't come into play unless I guess, I set a flag on a setter and then call invalidateProperties() from the setter but would that make any real difference? I mean, is it the same calling addChild(myButton) from onMouseOver() function handler or from within commitProperties? Does anything naturally happen (life cycle wise) after commitProperties() is invoked? Thanks, Nick On 6 September 2011 13:09, Jeffry Houser jef...@dot-com-it.com wrote: ** I hav used commitProperties() in the past. Although some people will use commitProperties to call createChildren() if new children are needed to be created. However, I'd be cautious about creating children based on the update_complete event. It seems like an unnecessary way to force yet another full render of the component.. On 9/6/2011 5:28 AM, Nick Middleweek wrote: Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } ); -- Jeffry Houser Technical Entrepreneur203-379-0773 --http://www.flextras.com?c=104 UI Flex Components: Tested! Supported! Ready! --http://www.theflexshow.comhttp://www.jeffryhouser.comhttp://www.asktheflexpert.com -- Part of the DotComIt Brain Trust -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
Re: [flexcoders] What is the a correct lifecycle phase to add new child components?
Thanks for this... So I'm extending UIComponent, does this mean I'm doing it the MX way? Cheers... On 6 September 2011 14:38, Haykel BEN JEMIA hayke...@gmail.com wrote: ** Hi Nick, if you use Spark components and the child components you want to add are fixed and known, e.g. a 'close' button that should be visible on mouse-over, then I would use skin states and manage visibility of the components in the skin. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Tue, Sep 6, 2011 at 10:28 AM, Nick Middleweek n...@middleweek.co.ukwrote: ** Hi, I've been trying to find the correct 'place' to create new components after the parent component is UPDATE_COMPLETE. During initialisation, we create child components in *createChildren()*but where/ when should we create them for e.g. in response to a mouseOver or a mouseClick event? Is it simply 'ok' to *this.addChild( *myNewButton *)* in a MOUSE_EVENT function handler or should I be setting some dirty flag to trigger off an invalidation and then add the button in a lifecycle override function? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } ); -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
Re: [flexcoders] Re: Flex 4: MouseOver not firing on a UIComponent Item Renderer
brilliant, this worked: this.graphics.beginFill(0xFF, 0); // zero = alpha off. Thanks! On 6 September 2011 15:54, Alex Harui aha...@adobe.com wrote: ** Something has to draw onto every pixel, otherwise the mouse hit passes through to underneath. You can set the alpha to 0 and it will still work. You can also set background=true and pick a backgroundColor on the TextField and not have to draw the fill. On 9/6/11 2:18 AM, Nick Middleweek n...@middleweek.co.uk wrote: OK, well I've settled with the white background for now... On 5 September 2011 11:36, Nick Middleweek n...@middleweek.co.uk wrote: Hi, We're using Flex 4 and have an Item Renderer that extends UIComponent. We're adding a TextField that's added in createChildren(). In the Constructor(), I'm adding the listener: this.addEventListener(MouseEvent.MOUSE_OVER, this_onMouseOver); ...And in the listener function, I'm adding a button: indicator = new Button(); indicator.width = 20; indicator.height = 20; indicator.label = ...; this.addChild(indicator); this.invalidateDisplayList(); The problem is that the MouseOver event is ONLY firing when I mouse over the TextField and not the 'background' of the IR. If I draw a rectangle in updateDisplayList: // draw rect this.graphics.beginFill(0xFF, 1); this.graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); this.graphics.endFill(); ... the MouseOver event DOES fire on the red background. Is there a way of achieving this without drawing a rectangle? I did think of setting the rect to white but this doesn't seem like the correct approach. Thanks for any help... Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://www.middleweek.co.uk } );
Re: [flexcoders] Re: Flex 4: MouseOver not firing on a UIComponent Item Renderer
Thanks for the tip... If I bumped up to GroupBase, does that mean I can use Spark skinning as well or is this not related? On 6 September 2011 16:31, turbo_vb timh...@aol.com wrote: ** You might try bumping up from UIComponent to GroupBase and set mouseEnabledWhereTransparent = true; -TH --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: Something has to draw onto every pixel, otherwise the mouse hit passes through to underneath. You can set the alpha to 0 and it will still work. You can also set background=true and pick a backgroundColor on the TextField and not have to draw the fill. On 9/6/11 2:18 AM, Nick Middleweek nick@... wrote: OK, well I've settled with the white background for now... On 5 September 2011 11:36, Nick Middleweek nick@... wrote: Hi, We're using Flex 4 and have an Item Renderer that extends UIComponent. We're adding a TextField that's added in createChildren(). In the Constructor(), I'm adding the listener: this.addEventListener(MouseEvent.MOUSE_OVER, this_onMouseOver); ...And in the listener function, I'm adding a button: indicator = new Button(); indicator.width = 20; indicator.height = 20; indicator.label = ...; this.addChild(indicator); this.invalidateDisplayList(); The problem is that the MouseOver event is ONLY firing when I mouse over the TextField and not the 'background' of the IR. If I draw a rectangle in updateDisplayList: // draw rect this.graphics.beginFill(0xFF, 1); this.graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); this.graphics.endFill(); ... the MouseOver event DOES fire on the red background. Is there a way of achieving this without drawing a rectangle? I did think of setting the rect to white but this doesn't seem like the correct approach. Thanks for any help... Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Flex 4: MouseOver not firing on a UIComponent Item Renderer
Hi, We're using Flex 4 and have an Item Renderer that extends UIComponent. We're adding a TextField that's added in createChildren(). In the Constructor(), I'm adding the listener: this.addEventListener(MouseEvent.MOUSE_OVER, this_onMouseOver); ...And in the listener function, I'm adding a button: indicator = new Button(); indicator.width = 20; indicator.height = 20; indicator.label = ...; this.addChild(indicator); this.invalidateDisplayList(); The problem is that the MouseOver event is ONLY firing when I mouse over the TextField and not the 'background' of the IR. If I draw a rectangle in updateDisplayList: // draw rect this.graphics.beginFill(0xFF, 1); this.graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); this.graphics.endFill(); ... the MouseOver event DOES fire on the red background. Is there a way of achieving this without drawing a rectangle? I did think of setting the rect to white but this doesn't seem like the correct approach. Thanks for any help... Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } );
[flexcoders] Setting a custom Air app version/ release number
Hi, When I install the Air app that I've just created using Export Release Build I can see a version number in the installation window but it's always set to the same value... How can I change this? Are there any rules or gotchas around it as well? Other Air apps I've installed have custom version numbers and this would be handy for releases... Thanks, Nick
Re: [flexcoders] Setting a custom Air app version/ release number
ah nice one Rob, thank you. On 6 September 2010 14:09, Rob Parkhill rob_parkh...@yahoo.com wrote: There is a version number section in the XML for the application. Same place where you can enter app name and such. Rob -- *From:* Nick Middleweek n...@middleweek.co.uk *To:* flexcoders@yahoogroups.com *Sent:* Mon, September 6, 2010 5:22:17 AM *Subject:* [flexcoders] Setting a custom Air app version/ release number Hi, When I install the Air app that I've just created using Export Release Build I can see a version number in the installation window but it's always set to the same value... How can I change this? Are there any rules or gotchas around it as well? Other Air apps I've installed have custom version numbers and this would be handy for releases... Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
[flexcoders] FB4: DataGroup not resizing when dataProvider is updated
Hello, I'm new to FB4 and am working with another chap creating a component. We've got a DataGroup who's dataProvider is increased when a button is pressed. When the DataGroup is set to a fixed height, i.e. 200 we can see the itemRenderer components being added on screen but with the DataGroup.height = 100%, the itemRenderers are being placed ontop of each other. The Layout of the DataGroup is set to VerticalLayout. Has anyone had any success with anything similar? Thanks in advance and happy bank holiday! Nick
[flexcoders] NumericInput UI control
Hello, Up until now I've been using a NumericStepper Control for number entry fields... My client has been suggesting changes to the default behaviour of the Control to the point where it's almost not worth using a NumericStepper anymore... What does everyone use for numeric data entry fields? I need to support standard number formatting, decimals, negative and positive values... Any initial thoughts or should I just extend TextInput and roll my own control? Thanks, Nick
[flexcoders] Semi-dial / speedo-type control in flex
Hi, I thought there was a dial or speedometer control built into Flex 3? Does anyone have any references to one if I'm mistaken? Thanks, Nick
[flexcoders] Player Security - Local SWF accessing local and network?
Hi, Hopefully the Player Security subject hasn't scared you off but I'm stumped with an issue. When I'm creating a little demo app or any Flex app really, I'm accessing the local file system for an .xml settings file and a search will access a remote HTTP or Web Service so I'm accessing both local and remove resources. I do a Release Build, test and it works. I zip it up, send to my product owner and he gets a security error. I've tried directing him to http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htmlto tick Always allow, restart the browser, reload the flex app via the .html file but still no joy. Security error. Does anyone know why this works on my machine but not his? Is it because I'm using the Flash Debug player? Are there any rules around making a SWF be Security.LOCAL_TRUSTED ? I'm on Vista Business, my PO is on Windows 7. Cheers, Nick
Re: [flexcoders] Player Security - Local SWF accessing local and network?
Cheers Alex - I'll continue playing with the settings and report back... Thanks... On 3 August 2010 18:48, Alex Harui aha...@adobe.com wrote: The settings manager and/or flashplayertrust files make the sandbox rules LOCAL_TRUSTED instead of one of the other LOCAL_XXX sandboxes. I think you have to specify locations to trust in that dialog. AlwaysAllow option may be for internet hosted SWFs
Re: [flexcoders] How to split a String on spaces but including Quoted Phrases?
Guys, I missed this one... Thank you for your replies... I'll check out the code and see what works. I did end up writing a string parser but I'm now curious to see how RegEx stands up to the task. Cheers, Nick On 29 July 2010 23:30, Oleg Sivokon olegsivo...@gmail.com wrote: Ouch, actually, it has a flaw, but I'm not sure you need a fix for that, but it's possible to fix it, if you want. It only checks for the double quotes, when it checks for the non-quoted words, but it checks for both single and double quoted groups of words. If you need both single and double quotes however, the expression is going to be a tid bit longer... but if you don't need, then it'd be shorter in fact: /(.*[^])|(\s[^\s]+(?!\s))/g
[flexcoders] Mouse coordinates on DragEvent = DragManager.MOVE
Hi, Has anyone been able to obtain the MouseX and MouseY in the drop phase of drag drop? I've tried the following but nothing is giving... :( var mouseEvent_X : int = MouseEvent( event ).localX; var mouseEvent_Y : int = MouseEvent( event ).localY; var relatedObject_X : int = DatesItemRenderer( event.relatedObject ).x; var relatedObject_Y : int = DatesItemRenderer( event.relatedObject ).y; var dragEvent_X : int = DragEvent( event ).stageX; var dragEvent_X : int = DragEvent( event ).stageY; var point : Point = new Point( this.contentMouseX, this.contentMouseY ); Thanks for any help on a friday afternoon! Nick
[flexcoders] Re: Mouse coordinates on DragEvent = DragManager.MOVE
Got it... var point : Point = new Point( this.contentMouseX, this.contentMouseY ); point = contentToGlobal( point ); On 30 July 2010 14:22, Nick Middleweek n...@middleweek.co.uk wrote: Hi, Has anyone been able to obtain the MouseX and MouseY in the drop phase of drag drop? I've tried the following but nothing is giving... :( var mouseEvent_X : int = MouseEvent( event ).localX; var mouseEvent_Y : int = MouseEvent( event ).localY; var relatedObject_X : int = DatesItemRenderer( event.relatedObject ).x; var relatedObject_Y : int = DatesItemRenderer( event.relatedObject ).y; var dragEvent_X : int = DragEvent( event ).stageX; var dragEvent_X : int = DragEvent( event ).stageY; var point : Point = new Point( this.contentMouseX, this.contentMouseY ); Thanks for any help on a friday afternoon! Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
[flexcoders] How to split a String on spaces but including Quoted Phrases?
Hi, I haven't been able to work out regex yet so apart from looping and parsing a string manually, is there anyway of parsing the following string... flex action script parse string function into the following Array... [0] = flex [1] = action script [2] = parse [3] = string [4] = function Thanks, Nick
[flexcoders] How to detect the decimal point character?
Hi, I'm doing some custom bits on the Flex 3 NumericStepper and I need to prevent more than decimal point being entered into it's textField. Is there a way to detect the character used? e.g. Germany uses a comma... Or should I do something like this... How future proof, multi-lingo is that? var decimalCharacter : String = Math.PI.toString().substr( 1, 1 ); Thanks, Nick
[flexcoders] How to remove the DateField textInput border?
Hi, Has anyone been able to modify the border of the TextInput component of the Date field? I'm trying to set it to ZERO. I've tried extending the DateField - MyDateField and specifying the borderThickness in updateDisplayList using this.textInput.setStyle(borderThickness, 0); ... to be honest, I'm not even sure if that's the correct approach? is there a way to do it through code? Thansk in advance!! Nick
Re: [flexcoders] Re: Capturing ENTER key in a Numeric Stepper
Hi Andrew. Can you trap the ENTER (keyCode = 13) on a Numeric Stepper? I've been failing to do this... :( When a user presses the ENTER key, I want to perform an operation, such as a search... So I'm thinking I need to somehow trap the ENTER key and dispatch a custom event. Mmmm... Any ideas? Cheers, Nick On 11 July 2010 03:46, Andrew cottag...@gmail.com wrote: In my applications I use the change event to fire events( like change='doThisThing()'). Seems to work for the number stepper just fine. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek n...@... wrote: Hello, I've got a form with a few fields on, one being a numeric stepper. On the TextInput, I can test the enter key being pressed using the enter event but there doesn't appear to be an equivalent for the numericstepper... -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] Capturing ENTER key in a Numeric Stepper
Hi dork, how you doing?... Thanks for the info on this... Have you managed to achieve this when using a NumericStepper for your form objects? i...@ve just this out as an example: http://flexmusings.wordpress.com/2008/10/30/using-default-button/ And it works when pressing ENTER in either of the TextInputs but if I pop a NS control on the form and press ENTER from within that it doesn't invoke the defaultButton?... Here's my code: http://pastebin.com/65HwfuGf Cheers for the help... Nick On 11 July 2010 01:26, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: the canvas tag has a defaultButton property that will dispatch a click event on your submitSearch button. i'm not sure what the eq would be in flex 4. On Sat, Jul 10, 2010 at 7:08 PM, Nick Middleweek n...@middleweek.co.ukwrote: Hello, I've got a form with a few fields on, one being a numeric stepper. On the TextInput, I can test the enter key being pressed using the enter event but there doesn't appear to be an equivalent for the numericstepper... Has anyone managed to acheive this and how did you do it please? On enter, I want to dispatch a submitSearch event but can't seem to detect this for the NS control.. Any ideas will be great.. Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] Re: Capturing ENTER key in a Numeric Stepper
Andrew - cheers. My problem was that I am working with a custom Numeric Stepper, I had extended the base control it so it could support null entries and to be quite restrictive with the inputs... 0-9, delete key, backspace, etc... I forgot to include ENTER.. doh! :-) After your post, I decided to go back to basics and testing and trace(event.keyCode.toString()) on the keydownHander... Cheers, it's all sorted. I'm now firing out my own FlexEvent.ENTER from my custom numberstepper. nice! :-) On 11 July 2010 15:31, Andrew cottag...@gmail.com wrote: I would probably have an event handler to deal with ALL keystrokes, and within that have a switch statement. One case of the switch statement would be case '13': var searchValue:int = myNumericStepper.value; doTheSearch(searchValue); break; So when the enter key click is captured, the code goes and looks at the number stepper and sends whatever its current value is to the search function. a --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek n...@... wrote: Hi Andrew. Can you trap the ENTER (keyCode = 13) on a Numeric Stepper? I've been failing to do this... :( When a user presses the ENTER key, I want to perform an operation, such as a search... So I'm thinking I need to somehow trap the ENTER key and dispatch a custom event. -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
[flexcoders] Capturing ENTER key in a Numeric Stepper
Hello, I've got a form with a few fields on, one being a numeric stepper. On the TextInput, I can test the enter key being pressed using the enter event but there doesn't appear to be an equivalent for the numericstepper... Has anyone managed to acheive this and how did you do it please? On enter, I want to dispatch a submitSearch event but can't seem to detect this for the NS control.. Any ideas will be great.. Cheers, Nick
[flexcoders] focusrect on custom components?
Hi, Does anyone know the right way of applying the focusrect to a composite component, instead of the individual components that make it up? I've got a custom comp made up of about 4 basic UI objects and when I click inside it I want the whole component to look as if it's received the focus and not the individual component... I've just started looking into the NumericStepper for an example but it seems quite involved... Do I carry on hunting or is there an easy way? :-) Cheers, Nick
Re: [flexcoders] User Interface Design Groups
Hi, I wil get it compiled an upload to a site and post a follow up - thanks for the message :) Cheers, NIck On 7 July 2010 22:21, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: nick, i know the perfect group, its called flexcoders. ...or flashcoders. most flash platform developers come from a design background and have a passion for the best UI experience. so post it here!! :) design and UI xp IS part of the flash platform...
Re: [flexcoders] Input formatter?
Ok, cool... Thanks Scott... I was hoping there'd be a built in way that I can apply to different objects, I'm using it on the DateField object... I'll check that link out and have a hunt around... Nick On 7 July 2010 04:23, Scott h...@netprof.us wrote: Sorry, my bad. I missunderstood. You’ll need to either extend the textinput or use a custom component already created for this. I’ve seen a few but I can’t find the one I used last winter… I did find this one on Adobe. It’s for 2.01 but it should work ok. http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetailextid=1049969 GL. Sj
[flexcoders] User Interface Design Groups
Hi, I've been working on a little composite search UI component but it needs polishing off and I wondered if there were any groups out there that could help with this sort of thing? Does anyone know of any? Cheers, Nick
[flexcoders] Input formatter?
Hello, Is it possible to have a data entry/ input formatter? For example, I have a DateField and I want to override the data entry so that they can only type 1 or 2 numbers followed by a slash, then 1 or 2 numbers followed by a slash, then 4 numbers. Is there such thing in Flex as an Input Data Formatter or something similar? How do others handle this? Thanks, Nick
Re: [flexcoders] Input formatter?
Hi scott, Thanks for the link, this only seems to format the 'string' when I focus out the field... What I'd like is on every key press, the entry field validates the character at each position... So taking this as an entry format... DD/MM/, or perhaps I should write it as #0/#0/ where a # represents an optional number and 0 means any number. The users can type 10 and if they type 7 as the third character, it automatically puts in the slash character and uses as the fourth character, typing slash now should pad out the month into 07 and then the next 4 numbers would represent the year... I'm after a data entry filter to help the users not enter invalid entries. Thanks, Nick On 6 July 2010 13:10, Scott h...@netprof.us wrote: Yes, you can use formatters… http://livedocs.adobe.com/flex/3/html/help.html?content=formatters_2.html Bind the component to the variable.
[flexcoders] Data Import Web Service... Where has it gonein FB4?
Hi, Does anyone know where I can get FB3's Import Web Service feature in FB4? I just want to import all the Value Objects from my WSDL but the FB4 Connect to Web Service feature seems to create a load of bloated code. Perhaps I'm just used to the FB3 version and I need to adjust my thinking but what are other peoples thoughts on this? It was quite easier previously, import the WSDL, copy the value objects and plumb in the SchemeType declarations... Cheers, Nick
Re: [flexcoders] Data Import Web Service... Where has it gonein FB4?
Hi, Unless I'm mistaken but I think that is the same as selecting Connect to Web Service... from the Data menu ? I was hoping to get to the FB3 import Web Service feature... Cheers, Nick On 25 June 2010 15:29, claudiu ursica the_bran...@yahoo.com wrote: Data Services Tab, usually near Problems one or Data Button /Connect to Web Service C
Re: [flexcoders] setting the border thickness on a Spark mx.controls.VBox ?
Hey Alex, I had my Flex 4 project set to use both Halo and Spark. I was using mx.controls.VBox but couldn't set the borderThickness. I ended up switching project to Flex 3.5 SDK and just sticking with mx.controls... so I've got round it but it'd be handy to know how to set a borderThickness on a VBox when using Spark + Halo under SDK v4... Is it possible? Cheers, Nick On 23 June 2010 17:07, Alex Harui aha...@adobe.com wrote: Which theme? On 6/22/10 3:24 PM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, Sounds a bit contradictory - Spark and mx.controls but I'm using Flex 4 but working on some Flex 3 code and can't update to Spark at the moment. I'm struggling to find out how to set the border thickness of my VBox to 10. Has anyone acheived this ? Thanks, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
[flexcoders] setting the border thickness on a Spark mx.controls.VBox ?
Hi, Sounds a bit contradictory - Spark and mx.controls but I'm using Flex 4 but working on some Flex 3 code and can't update to Spark at the moment. I'm struggling to find out how to set the border thickness of my VBox to 10. Has anyone acheived this ? Thanks, Nick
Re: [flexcoders] how to place cursor in textinput
Hi, Assuming your login window is popped up using the PopupManager you can set the loging window component to implement IFocusManagerContainer. mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=355 height=217 implements=mx.managers.IFocusManagerContainer creationComplete={init();} . . . import mx.managers.IFocusManagerContainer; . . . private function init():void { focusManager.setFocus(login_userName); } . . . PopUpManager.createPopUp() : http://livedocs.adobe.com/flex/3/langref/mx/managers/PopUpManager.html#createPopUp%28%29 Hope that helps... Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } ); On 17 June 2010 06:34, venkatreddy_006 venkatreddy_...@yahoo.com wrote: Hi everyone, i was setthe focus to the TextInput component, (this is component in login window). This highlights my TextInput component, but it is not place cursor in textinput Regard's VenkatReddy s
[flexcoders] Different effects
Hi, I'm reading up about Flex Effects... Can anyone explain the difference between the three types: 1). MaskEffect 2). TweenEffect 3). CompositeEffect. I'm guessing that Tween is animation and Composite is a combined effect such as move and resize. Thanks, Nick
[flexcoders] Defining layouts in Spark controls
Hi, Is there another way of defining the layout on a Spark control? It seems we have to do this... s:Panel title = Range Search s:layout s:VerticalLayout/ /s:layout /s:Panel Is there a nicer way?... Something like... layout = {new VerticalLayout()} Thanks, Nick
[flexcoders] removeEventListener - is it important?
Hi, I'm trying to get my head into the Flex (3) component architecure and am reading through the source code of mx.controls.DateField. I've noticed quite a calls (eight of them) to addEventListener but there are none to removeEventListener. Is it not important to clear up after yourself?... It is a good idea to remove any handlers that will no longer be used. This removes references to objects so that they can be cleared from memory. - http://livedocs.adobe.com/flex/3/html/help.html?content=events_05.html So; when I create a DateField, a number of event handlers are attached to it, so if I remove that DateField from the stage, are the event handlers still attached and therefore the DateField is referenced by these handlers and therefore won't get GD'd ? Mmmm Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] removeEventListener - is it important?
Hi Oleg, Thanks for the reply... I think it's important too but can't understand why the DateField Class in the Flex SDK doesn't do it? Digging a little deeper... Here's the Constructor of the DateField... /** * Constructor. */ public function DateField() { super(); addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler); } The removedFromStageHandler() function, seems to be doing some clean ups, so I guess that's kind of like it's .dispose() method. Nick On 2 June 2010 12:44, Oleg Sivokon olegsivo...@gmail.com wrote: If you are adding handlers to events dispatched by the objects that are going to be removed along with the listener, then why not? However, it is true that Flex components have no dispose() or similar methods.
[flexcoders] Has the Flex 4 component architecture changed much from Flex 3?
Hi, Has the Flex 4 component architecture changed much from Flex 3? I was recommended to get the Flash Builder 4 Flex 4 Bible to learn about writing components but I'm still working with Flex 3 projects and realistically, I probably will be for a couple more years... Thanks, Nick
Re: [flexcoders] Has the Flex 4 component architecture changed much from Flex 3?
Hi Paul, Although I'll be working with Flex 3 for a couple more years, any new projects will be Flex 4. More importantly though, in what way has the component architecture changed? Cheers, Nick On 1 June 2010 11:29, Paul Andrews p...@ipauland.com wrote: On 01/06/2010 11:00, Nick Middleweek wrote: Hi, Has the Flex 4 component architecture changed much from Flex 3? I was recommended to get the Flash Builder 4 Flex 4 Bible to learn about writing components but I'm still working with Flex 3 projects and realistically, I probably will be for a couple more years... If that's the case, I'd stick with Flex 3 books for the moment. Things have certainly changed. Thanks, Nick
Re: [flexcoders] Get URL that user typed in
i think you're after the HTTP referrer. You can access this information server-side and I believe some of the data is available from JavaScript so from Flex, just reach out. HTH, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } ); On 28 May 2010 04:49, Scott h...@netprof.us wrote: Is there any way to get the URL that the user typed in to get to the website? For example, if the user loads IE, Chrome, etc… and goes to http://www.mysite.com is there anyway that I can pull that information in FB? I know I could do this in Apache but I want do something a little more dynamic. If I have multiple URLS pointing to my server I’d like to know what the original URL was to provide the correct content. Thanks! Scott
[flexcoders] Changing the dataProvider for a ComboBox doesn't seem to work properly
Hi, I have a ComboBox with it's dataProvider set to an Array( =, , , ); If a TextInput is changed, I want to change (or update) the ComboBox dataProvider to use this Array( =, ); And if that TextInput is blank (), then I want to switch it back to Array( =, , , ); I've tried declaring two private var arrays and switching the ComboBox.dataProvider on the change event of the TextInput but strange things happening and it seems the dataProvider isn't refreshed properly until I clicked on the ComboBox and select an item. I've tried using validateNow. Is this a bug or am I doing something wrong? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
[flexcoders] advanced flex architecure books?
Hi, Can anyone recommend any Advanced Flex/ Actionscript books out there that can teach me all about the writing components properly, using mx_internal, the Flex life cycle and anything else so I can know everything about Flex and it's inner workings :-) Maybe quite a lot to ask but I've often said You don't know what you can do until you know how to do it... Are there any must read books to master Flex, the framework and writing components, etc (the right way)? Cheers, Nick
Re: [flexcoders] How to store information in Cookies ???
Hi, Cookies are pretty easy to use, I did something very similar, storing the selected value from a Menu. First things first, download the CookieUtil library and plug it into your project. Then you can use CookieUtil.setCookie and CookieUtil.getCookie to set and get the values. Hope that helps, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } ); On 27 May 2010 10:14, Nini7016 Nini7016 nahloulaha...@hotmail.com wrote: Hello :) I have a menu item et i would like to store these information in CookiesI didn't work with Cookies before :( :( ...Do you have any example please please ... there is a code for the menu item : menuitem label=Option icon={newproject} menuitem label=View icon={newproject} menuitem label=Proprities icon= id=18 type=check toggled=false/ menuitem label=Macroimage icon= id=19 type=check toggled=false/ menuitem label=UDDI Navigator icon= id=20 type=check toggled=true/ /menuitem /menuitem And when the user modifie these infomation by checking an option, i would like to store these information . Any idea please ...??? Thank you very much :):):)
Re: [flexcoders] How to store information in Cookies ???---Thank you :) Nick , Do you have an example of what you have done
Yeah sure... /** * Resets the ADG zoom feature to the browser-cookie stored value or to 100% * if there isn't one and then saves 100% to the browser-cookie. * * @param event The Event Object. * @return void */ private function zoomMenuReset ( event : Event ) : void { var numIndex : Number = 0; var strCookieScale : String = ''; var objCookieScale : Object; objCookieScale = CookieUtil.getCookie( 'intFontScalePercentage' ); if ( objCookieScale == null ) strCookieScale = 100; //If there's no cookie then we default it to 100% else strCookieScale = objCookieScale.toString(); for each ( var Obj : Object in zoomMenu.dataProvider ) { if ( Obj.scale == Number( strCookieScale )) break; else numIndex++; } zoomMenu.selectedIndex = numIndex; zoomScale.label = zoomMenu.dataProvider[ zoomMenu.selectedIndex ].label; intFontScalePercentage = zoomMenu.dataProvider[ zoomMenu.selectedIndex ].scale; zoomScale.close(); CookieUtil.setCookie( 'intFontScalePercentage', intFontScalePercentage.toString(), 120 ); } HTH, Nick On 27 May 2010 11:48, Nini7016 Nini7016 nahloulaha...@hotmail.com wrote: Thank you very much Nick Could you give an example which shows how do you have done to restore your selected value please :) It will be very helpful for me :) Thank you very much -- To: flexcoders@yahoogroups.com From: n...@middleweek.co.uk Date: Thu, 27 May 2010 10:51:00 +0100 Subject: Re: [flexcoders] How to store information in Cookies ??? Hi, Cookies are pretty easy to use, I did something very similar, storing the selected value from a Menu. First things first, download the CookieUtil library and plug it into your project. Then you can use CookieUtil.setCookie and CookieUtil.getCookie to set and get the values. Hope that helps, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } ); On 27 May 2010 10:14, Nini7016 Nini7016 nahloulaha...@hotmail.com wrote: Hello :) I have a menu item et i would like to store these information in CookiesI didn't work with Cookies before :( :( ...Do you have any example please please ... there is a code for the menu item : menuitem label=Option icon={newproject} menuitem label=View icon={newproject} menuitem label=Proprities icon= id=18 type=check toggled=false/ menuitem label=Macroimage icon= id=19 type=check toggled=false/ menuitem label=UDDI Navigator icon= id=20 type=check toggled=true/ /menuitem /menuitem And when the user modifie these infomation by checking an option, i would like to store these information . Any idea please ...??? Thank you very much :):):) -- Vous voulez protéger votre vie privée ? La solution avec Internet Explorer 8 http://clk.atdmt.com/FRM/go/232102477/direct/01/ -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
[flexcoders] Setting UI components in a composite component to private?
Hi, When we create a composite component, such as an itemRenderer, based on an HBox and there's a button and TextInput inside, those sub-components are public, is there a way to specify they're private? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
[flexcoders] Intuitive search UI ideas?
Hi, I was wondering if anyone has done any good search UI components? I'm about to start one for a project but I'm raising questions early about the handling of date/ numeric ranges and perhaps multiple ranges of fields values. Our normal search panels are generally just a bunch of fields that the user would type values into and then hit search. The standard server search logic would combine the results using that AND that AND that. I'm now thinking what if the user wants a more refined search such as ( ( ( sex = male ) AND ( age 25 ) ) OR ( ( sex = female ) AND ( age 20 ) ) ) which would return all males above 25 and all females above 20. Now using a 'standard' search screen, this isn't possible. Does anyone have any examples or ideas on how to present such custom query options to the user and keeping it relatively easy and nice :) Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] The Flex DOM?
Cheers Jake - thanks for the reply. @Oleg: I was trying to find out if there was a 'DOM' within Flex to easily access to the Containers and other Objects but I guess the more correct way to ask, would've been to question how Flex manages components but I didn't want to open the doors about the component life cycle. Apologies if I got the terminology wrong - I'm still getting my head round certain things and I saw a thread yesterday about looping through dynamically added TextInputs to which Valdor replied and it made me think how I used to do similar operations with JavaScript and the HTML-DOM and was thinking could I apply similar concepts?... (I've got another question and it's not abut squares :) but I'll create another thread). @Paul - I'll have a quick search, thanks. Cheers guys, Nick On 24 May 2010 22:30, Jake Churchill reyna...@gmail.com wrote: It's kind of like a DOM. It's just a hierarchical relationship of components and controls. On Mon, May 24, 2010 at 4:01 PM, Nick Middleweek n...@middleweek.co.ukwrote: Hi, Might be a silly one but Flex doesn't have a DOM does it... or does it? I'm pretty sure I've seen a debugger app that shows a hierachical view starting from the Application level and displays all the containers and objects within. Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] Detecting Browser Re-Size
Can you expand a little on the page layout you ha.ve that needs to change?.. You might be able to just use CSS to position some DIV tags in a fluid layout and your SWF is in one DIV, your IFRAME in another and when the browser resizes, the browser handles the moving using relative positioning. So maybe forget that you've got an IFRAME and SWF, this fluid layout concept will apply to any HTML objects such as two images. Hope that helps somehow... (unless I've misread your problem?) Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424, blog: http://blog.middleweek.co.uk } ); On 24 May 2010 20:35, Battershall, Jeff jeff.battersh...@dowjones.comwrote: There’s a lot on this subject out there but not the definitive answer I’m looking for – so I thought I’d see what Flex Coders has on the subject. I need to be able to re-position some HTML content (an IFrame) relative to the screen coordinates of my Flex app, when the browser is re-sized. Can anyone point me in the direction of the best solutions to this?
Re: [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control
Hi Angelo, If you don't set a width on the column it will default to 100. What I think you'd need to do is create a customComponent for your item Renderer, most likely based on an HBox with your link buttons inside that. On the creationComplete event of the itemRenderer you could get the actual width of the HBox, check that the itemRenderer is in row ONE of the data grid (or it is the actual first row - see the API) and then fire out a custom Event with the width value attribute and then set the column width from the parent component. You might also be able to reach the DataGrid Column from within the itemRenderer itself. I'm saying only do this on row one, just to optimise it, otherwise it'll run for ever row in the DG, which would hinder performance. Hope this helps, ask if you need anymore help. Cheers, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } ); On 21 May 2010 14:09, Angelo Anolin angelo_ano...@yahoo.com wrote: Thanks for this tip. But, I came across another thing. How would I set the width of the column so that it matches the width of the itemrenderers inside it? Apparently, setting the width to 100% for the datagrid column is not allowed. Thanks. Angelo -- *From:* Christopher McArthur cmcart...@riotgames.com *To:* flexcoders@yahoogroups.com *Sent:* Thu, 20 May, 2010 17:14:06 *Subject:* RE: [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control the includeInLayout property may also be helpful to you in this case, try: includeInLayout={outerDocument. fncVisible( )} *From:* flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] *On Behalf Of *Angelo Anolin *Sent:* Thursday, May 20, 2010 2:46 PM *To:* flexcod...@yahoogro ups.com *Subject:* [flexcoders] Set Width of An Item Renderer Component Based on Visible Property of the Control Hi FlexCoders, I have declared an in-line item renderer in my datagrid: mx:DataGridColumn headerText=Test textAlign=center sortable=false mx:itemRenderer mx:Component mx:HBox horizontalAlign=center mx:LinkButton id=lnk1 label=Link 1 visible={outerDocum ent.fncVisible( )} width={???}/ mx:LinkButton id=lnk1 label=Link 1 / mx:LinkButton id=lnk1 label=Link 1 / /mx:HBox /mx:Component /mx:itemRenderer /mx:DataGridColumn as you may see, I am determining the visibility of the link button via a function. What I want to achieve is that if the linkbutton contrl is invisible, the width should be 0, but if it is visible, then width should be 100. How do I pass in a function for the width of the control whether it's visibility is set to true or false? Thanks.
[flexcoders] Looping to addChild TextInputs, then removeAllChildren, are they GC'd?
Hi, If I looped ten times and added ten Ten TextInputs to the 'stage' (addChild) they would remain in memory until they were removed (removeAllChildren) and then Garbabe Collected? Right? Let's say I created an Array and changed my loop to add them to the 'stage' (addChild) *AND* put the object reference into the Array. If I then removed them from the stage, am I right in thinking they'd remain in memory because they are referenced by the Array so therefore wouldn't be GC'd? I'm trying to tick some boxes in my head about how the inners of Flex works so if by reading this you think I might benefit from reading soemthing, I'd appreciate some links to articles. Thanks guys, Nick
[flexcoders] The Flex DOM?
Hi, Might be a silly one but Flex doesn't have a DOM does it... or does it? I'm pretty sure I've seen a debugger app that shows a hierachical view starting from the Application level and displays all the containers and objects within. Thanks, Nick
Re: [flexcoders] Re: var myVar : Function = new Function ? examples?
Thanks for the replies and those important points Oleg - nice! On 21 May 2010 08:57, ouaqa abenef...@gmail.com wrote: If it may help, this is how I usually manage my remote connections. Before you say it's off-topic, I think it might answer your question : public class LCRemoteConnectionManager { private static var serverRemoteObject : RemoteObject ; // = null private var onGetCelluleFormatListResultFunction : Function ; private var onGetCelluleFormatListResultFaultFunction : Function ; /* some irrelevant stuff */ public function getCellulesFormats (AGetFormatListResultFunction : Function ,AGetFormatListResultFaultFunction : Function ) : void { if (serverRemoteObject === null) { this.createServerRemoteObject() ; } this.onGetCelluleFormatListResultFaultFunction = AGetFormatListResultFaultFunction ; this.onGetCelluleFormatListResultFunction = AGetFormatListResultFunction ; serverRemoteObject.getCellulesFormats(); } private function getCellulesFormatsResult (AEvent : ResultEvent):void { if (this.onGetCelluleFormatListResultFunction != null) { this.onGetCelluleFormatListResultFunction(AEvent) ; } else { Alert.show(LCRemoteConnectionManager : getCellulesFormatsResult : onGetFormatListResultFunction is null) ; } } So I assign myFunction variables like any others (myFunction = someFunction ) and then, I call it like any other. The only problem is that I need to know how to use someFunction when calling myFunction. good luck --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek n...@... wrote: Hello, I can't find any examples on how to create Functon variables? Does anyone have any to hand please? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@..., blog: http://blog.middleweek.co.uk } ); -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } );
[flexcoders] var myVar : Function = new Function ? examples?
Hello, I can't find any examples on how to create Functon variables? Does anyone have any to hand please? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );
Re: [flexcoders] var myVar : Function = new Function ? examples?
ok, thanks Oleg... I was going to use the approach for my URLLoader complete event handler function, I was hoping to keep things a bit neater and just pass the .data through to my Cairngorm Command. What are your thoughts on the idea? something like this... private funtion loadXML(path:String) : void { var myReq : URLRequest = new URLRequest(path); var myLoad : URLLoader = new URLLoader(); var completeHandler : Function = function (evt : Event) : Type { // handle data load } myLoad.addEventListener(Event.COMPLETE, completeHandler) myLoad.load(myReq); } Cheers, Nick On 20 May 2010 11:46, Oleg Sivokon olegsivo...@gmail.com wrote: You cannot construct a function like that. What you can do is more like this: var f : Function = function (arguments) : Type { function body } -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, mobile: +44(0)774 035 5424 } );
Re: [flexcoders] how to style a ComboBox - Dropdown ?
ok, cool... Thanks Alex, Does it say that in the docs? I can't see it and have been stumped on similar things like this before when a styleProperty refers to another .stylename Cheers, Nick On 13 May 2010 18:30, Alex Harui aha...@adobe.com wrote: It depends on the dropdown. The default is List. On 5/13/10 7:46 AM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm trying to find all the CSS options that are available so I can style up my ComboBox - Dropdown menu. Looking at the Language Reference I can see all the Styles available for hte ComboBox itself but one of the properties is called dropdownStyleName. What I'm stumped with now, is where to look in the Adobe Flex docs on what options I'm allowed to use to create a CSS style which I can then assign to CompboBox.dropdownStyleName ? Cheers, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] how to style a ComboBox - Dropdown ?
ah ha... ComboBox.dropdownFactory = Class factory that creates an mx.controls.List On 13 May 2010 19:45, Nick Middleweek n...@middleweek.co.uk wrote: ok, cool... Thanks Alex, Does it say that in the docs? I can't see it and have been stumped on similar things like this before when a styleProperty refers to another .stylename Cheers, Nick On 13 May 2010 18:30, Alex Harui aha...@adobe.com wrote: It depends on the dropdown. The default is List. On 5/13/10 7:46 AM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm trying to find all the CSS options that are available so I can style up my ComboBox - Dropdown menu. Looking at the Language Reference I can see all the Styles available for hte ComboBox itself but one of the properties is called dropdownStyleName. What I'm stumped with now, is where to look in the Adobe Flex docs on what options I'm allowed to use to create a CSS style which I can then assign to CompboBox.dropdownStyleName ? Cheers, Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Resource bundles/ locales?
Hi, I'm looking at Resource bundles and Locales and trying to get an understanding of how they are working in a project I've just come from. Has anyone seen this before?... We have a component who's label was bound to a Class.property... mx:Button id=me label={Labels.SAVE_LABEL} / In the Labels Class, we have a bunch of properties, the .save looking as below... public static var SAVE_LABEL : String = labels::search.save; ... and we also have ResourceBundles project which has multiple locale folders; there is a labels.properties file in each which have many key-value pair's including this one... . . search.save=Save . . . This seems pretty neat and better than using label={...@resource(bundle='labels', key='search.save')} everywhere. Has anyone seen this before and do you know how it is working? Thanks, Nick
[flexcoders] Re: Resource bundles/ locales?
OK, found the answer to this one... Basically, the static vars are being looped and replaced with the actual bundle.properties key-value. Hope this helps someone, it did me :) On 11 May 2010 14:42, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm looking at Resource bundles and Locales and trying to get an understanding of how they are working in a project I've just come from. Has anyone seen this before?... We have a component who's label was bound to a Class.property... mx:Button id=me label={Labels.SAVE_LABEL} / In the Labels Class, we have a bunch of properties, the .save looking as below... public static var SAVE_LABEL : String = labels::search.save; ... and we also have ResourceBundles project which has multiple locale folders; there is a labels.properties file in each which have many key-value pair's including this one... . . search.save=Save . . . This seems pretty neat and better than using label={...@resource(bundle='labels', key='search.save')} everywhere. Has anyone seen this before and do you know how it is working? Thanks, Nick
Re: [flexcoders] Resource bundles/ locales?
Yep - it's funny what you find when you spend a little longer digging around... But I thought it was some undocumented waay of using resource bundles... Pretty cool stuff. Cheers Andriy :) Nick On 11 May 2010 16:01, Andriy Panas a.pa...@gmail.com wrote: Hi Nick, Have a closer look at the source code that you are dealing with, you are telling us only half of the story. Search for IResourceManager, resourceManager and getString in your source code. -- Best regards, Andriy Panas
Re: [flexcoders] how to find redundant classes?
Hi, This is exactly what I'm trying to do :) I'm documenting my code but am trying to clear up at the same time... Although I'm tryping in the ASDocs comments myself and in my Eclipse I've got a little toolbar that generates ASDocs comments for the current file... It doesn't though tell me if there are any errors or if it's an unused Class... So perhap you mean something else? Is there a Flex project to ASDocs generator? Cheers Oleg... Nick On 23 April 2010 00:01, Oleg Sivokon olegsivo...@gmail.com wrote: Not a real answer: document them with ASDocs - it will try to document everything - will certainly find errors in unused classes - will argue with you about those classes - you will know what to delete - bonus, you will get documentation for the project :)
Re: [flexcoders] how to find redundant classes?
Cheers Aaron... Thanks! On 23 April 2010 01:48, Aaron Hardy aaronius...@gmail.com wrote: FlexPMD would probably do the trick: http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD Aaron
Re: [flexcoders] how to find redundant classes?
Ah ok, thanks Oleg... Cheers for the other tip - link-report, I'l give that a try too. Nick On 23 April 2010 09:46, Oleg Sivokon olegsivo...@gmail.com wrote: Hi, yes, just as Aron said. I was simply judging from my previous experience - usually the old classes would contradict to the other classes in one way or another. So the ASDoc would find the contradiction and spit it at you :) If somehow the PMD wont do that, you can always compile with -link-report - that will print only the classes used. Best. Oleg
Re: [flexcoders] how to find redundant classes?
FlexPMD only works on projects that do not have spaces in the the path name... Hopefully they fix that one soon... On 23 April 2010 10:00, Nick Middleweek n...@middleweek.co.uk wrote: Ah ok, thanks Oleg... Cheers for the other tip - link-report, I'l give that a try too. Nick On 23 April 2010 09:46, Oleg Sivokon olegsivo...@gmail.com wrote: Hi, yes, just as Aron said. I was simply judging from my previous experience - usually the old classes would contradict to the other classes in one way or another. So the ASDoc would find the contradiction and spit it at you :) If somehow the PMD wont do that, you can always compile with -link-report - that will print only the classes used. Best. Oleg
Re: [flexcoders] Re: TitleWindow.title won't update from a setter
Thanks Amy... I'm now doing that and silly me forgot to use super.commitProperties() after the .title in commitProperties(). That took a while to work out :) Cheers, Nick On 22 April 2010 20:05, Amy amyblankens...@bellsouth.net wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek n...@... wrote: Alex, That has fixed it but has now made me realise I'm initialising my private var _iFormID : String = ; And the first time I was opening the Popup, I was setting the .iFormID = , so the setter was *not* getting called. I'm now initialising it to null and it's working fine... It might be _slightly_ better practice to call invalidateProperties() in the setter, rather than calling validateNow() from outside the component. HTH; Amy
[flexcoders] how to find redundant classes?
Hi, Is there a quick way to find Classes that I no longer need? I'm sure I've asked this before but I can't find the thread... Unless I thought about asking it but didn't :-) I'm going through a project, some of it was inherited and some I don't know if I need anymore... Is there a good way of doing this from Eclipse or otherwise? I'm using the FB4 plugin with the 3.4 SDK. Thanks, Nick
Re: [flexcoders] TitleWindow.title won't update from a setter
Hi, When tracing the setter, it is definately getting called. I'm currently just trying to set this.title from the iFormID setter. Here's my setup... I have an MXML ArrayCollection with the CreateVendorDialog component inside of the Array so it's created but not displayed (not sure if this is goood practice but I picked it up along somewhere :) The component ID=createVendor) In my main Application I have a controlbar with two buttons, Create Vendor and Create Vendor from iForm, they both call the same function but one passes an extra string. private function createVendorDialog(iFormID : String = ) : void { createVendor.iFormID = iFormID; PopupManager.addPopUp(createVendor); //createVendor.title = test; } The iFormID setter is getting called and this.title is being set but it's not rendering. The only way I can get it working is to put this code in the TitleWindow MXML component but that's a bit hacky isn't it?... mx:TitleWindow title = {(iFormID.length 0) ? 'Create Vendor by iForm' : 'Create Vendor'} . . . / Perhaps I need to take a step back somewhere?... Thanks, Nick On 21 April 2010 07:39, Alex Harui aha...@adobe.com wrote: Are you sure your setter is getting called? If so, when is it called? Maybe it is being called inside commitProperties after super.commitProperties. On 4/20/10 3:07 PM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I've got a small MXML Component based on TitleWindow which I'm opening with PopupManager that has a setter and getter called iFormID. In the setter I have this code... public function set iFormID ( value : String ) : void { if ( _iFormID == value ) return; _iFormID = value; if(iFormID.length 0) { this.title = Create Vendor; } else { this.title = Create Vendor by iForm; } } I am find that the title remains blank, but then if I close the PopUp and open it again, the last value the .title should have been is now visible... Is there some a refresh issue with TitleWindow.title? If I set the .title outside of the component, after I've used PopupManager, then it's set as expected but I want to control the .title from the setter function. Does anyone have an idea what I should be doing? I've also tried setting a dirty_flag, calling invalidateProperties() and setting the .title from within commitProperties() but no joy there either... Thanks for any help... Nick -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] TitleWindow.title won't update from a setter
Alex, That has fixed it but has now made me realise I'm initialising my private var _iFormID : String = ; And the first time I was opening the Popup, I was setting the .iFormID = , so the setter was *not* getting called. I'm now initialising it to null and it's working fine... Thanks for your help... Nick On 21 April 2010 18:09, Alex Harui aha...@adobe.com wrote: Interesting. Try calling validateNow after addPopUp.
Re: [flexcoders] Re: Find tree node in groupingcollection?
Thanks Amy... Reading the docs a bit closer, that does make sense... GroupingCollection inherits from HierarchicalData which implements IHierarchicalData and the source of HierarchicalCollectionView is of type IHierarchicalData. Great stuff, thanks again! Nick On 19 April 2010 16:00, Amy amyblankens...@bellsouth.net wrote: HierarchicalCollectionView has methods for getting the parent node. Just cast your GroupingCollection to HierarchicalCollectionView. http://flexdiary.blogspot.com/search/label/AdvancedDataGrid HTH; Amy
Re: [flexcoders] Re: GroupingCollection.getParent() doesn't exist?
ok - thanks Amy! :) So if were to extend GroupingCollection and create MyGroupingCollection, I could then have a public function on MyGroupingCollection that in turn calls the getParent() protected function of GroupingCollection. Cheers, Nick On 19 April 2010 16:09, Amy amyblankens...@bellsouth.net wrote: Check a reference on Actionscript 3 for the definition of protected. HTH; Amy --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick Middleweek n...@... wrote: Hi, Does anyone know why the getParent() command listed in the docs doesn't seem to exist? http://livedocs.adobe.com/flex/3/langref/mx/collections/GroupingCollection.html#getParent%28%29 I've trying to use it like this... refreshParent = GroupingCollection(model.groupingCollection).getParent(); Thanks, Nick
[flexcoders] TitleWindow.title won't update from a setter
Hi, I've got a small MXML Component based on TitleWindow which I'm opening with PopupManager that has a setter and getter called iFormID. In the setter I have this code... public function set iFormID ( value : String ) : void { if ( _iFormID == value ) return; _iFormID = value; if(iFormID.length 0) { this.title = Create Vendor; } else { this.title = Create Vendor by iForm; } } I am find that the title remains blank, but then if I close the PopUp and open it again, the last value the .title should have been is now visible... Is there some a refresh issue with TitleWindow.title? If I set the .title outside of the component, after I've used PopupManager, then it's set as expected but I want to control the .title from the setter function. Does anyone have an idea what I should be doing? I've also tried setting a dirty_flag, calling invalidateProperties() and setting the .title from within commitProperties() but no joy there either... Thanks for any help... Nick
[flexcoders] Cairngorm/ Command/ AdvancedDataGrid.expandChildrenOf() ?
Hi, I'm working on a cairngorm flex app and have been told to put all business logic inside the CG Command. At the end of the CG Command, I need to get the ADG to expand it's grouping nodes for a particular node. What is the correct way of solving this problem because from my Command, I can't 'see' the view. Should I update the model from the Command and have a ChangeWatcher on the view to run the AdvancedDataGrid.expandChildrenOf() code? Is there a right and wrong way of solving this? Thanks, Nick
Re: [flexcoders] Cairngorm/ Command/ AdvancedDataGrid.expandChildrenOf() ?
Hi Jake, Thanks for the info... I know this sounds crazy but because of project/ company politics we have extreem difficulty getting 3rd party libraries on the project. Are there any preferred alternative ways? Cheers, Nick On 18 April 2010 19:11, Jake Churchill reyna...@gmail.com wrote: Download cairgorm extensions. It has classes called Callbacks which basically notifies the view after a command has finished. It's perfect for this situation. -Jake -- Sent from my Palm Prē -- On Apr 18, 2010 1:02 PM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm working on a cairngorm flex app and have been told to put all business logic inside the CG Command. At the end of the CG Command, I need to get the ADG to expand it's grouping nodes for a particular node. What is the correct way of solving this problem because from my Command, I can't 'see' the view. Should I update the model from the Command and have a ChangeWatcher on the view to run the AdvancedDataGrid.expandChildrenOf() code? Is there a right and wrong way of solving this? Thanks, Nick
Re: [flexcoders] Cairngorm/ Command/ AdvancedDataGrid.expandChildrenOf() ?
Hey Jake, Cheers for the response... I've gone with a ChangeWatcher approach. Update the model from the command and I've dropped in the ChangeWatcher in the view, seems to be working but was curious who others would solve this... I'll look into CG Extensions though, cheers for the idea! Nick On 18 April 2010 20:29, Jake Churchill reyna...@gmail.com wrote: Wel, just tell them it's an upgraded version of the cairngorm SWC. You can just replace the SWC in the project and it'd be all good -Jake -- Sent from my Palm Prē -- On Apr 18, 2010 1:46 PM, Nick Middleweek n...@middleweek.co.uk wrote: Hi Jake, Thanks for the info... I know this sounds crazy but because of project/ company politics we have extreem difficulty getting 3rd party libraries on the project. Are there any preferred alternative ways? Cheers, Nick On 18 April 2010 19:11, Jake Churchill reyna...@gmail.com wrote: Download cairgorm extensions. It has classes called Callbacks which basically notifies the view after a command has finished. It's perfect for this situation. -Jake -- Sent from my Palm Prē -- On Apr 18, 2010 1:02 PM, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm working on a cairngorm flex app and have been told to put all business logic inside the CG Command. At the end of the CG Command, I need to get the ADG to expand it's grouping nodes for a particular node. What is the correct way of solving this problem because from my Command, I can't 'see' the view. Should I update the model from the Command and have a ChangeWatcher on the view to run the AdvancedDataGrid.expandChildrenOf() code? Is there a right and wrong way of solving this? Thanks, Nick
[flexcoders] Find tree node in groupingcollection?
Hi, Does anyone know the best way to find the tree node in the grouping collection for the selected row in an AdvancedDataGrid ? Hope that makes sense... I've got an ADG with a grouping collection for the provider and I've got a selected row, what I would like to do is get the next level up and reference the tree node so i can then vendorComplexSearch.advancedDataGrid.expandChildrenOf(treeNode, false); vendorComplexSearch.advancedDataGrid.expandChildrenOf(treeNode, true); to force a refresh only on that tree node without collapsing the whole AdvancedDataGrid. Thanks for any help... Nick
[flexcoders] GroupingCollection.getParent() doesn't exist?
Hi, Does anyone know why the getParent() command listed in the docs doesn't seem to exist? http://livedocs.adobe.com/flex/3/langref/mx/collections/GroupingCollection.html#getParent%28%29 I've trying to use it like this... refreshParent = GroupingCollection(model.groupingCollection).getParent(); Thanks, Nick
[flexcoders] DataGrid vs List ?
Hi, Just curious... But why would you use a List control when you can use a DataGrid with one Column? Are there benefits over specifically using a List? It seems that a DG is a List but supports multiple columns... Thanks, Nick
[flexcoders] Problem with BindingUtils.bindProperty
Hi, I'm trying to Bind a property on a component to a sub component but it doesn't seem to like binding to a property on this. // Set up Bindings and Watchers... __vendorAgencyOfficeFieldsEnterableChangeWatcher = BindingUtils.bindProperty(agencyOfficeHybridAccordian, enterable, this, vendorAgencyOfficeFieldsEnterable);// vendorName, editable); Has anyone managed to do this? Thanks, Nick
[flexcoders] Re: Problem with BindingUtils.bindProperty
The same goes for ChangeWatcher... I can't do this... ChangeWatcher.watch( this, boolEditableProperty, callback ); but I can do this... ChangeWatcher.watch( vendorName, editable, callback ); // where vendorName is a TextBox. Apart from binding this.boolEditableProperty to a hidden textBox.editable and then Binding my Watcher to the hidden textBox, is there a correct way of handling this? Cheers guys... Nick On 2 April 2010 23:05, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm trying to Bind a property on a component to a sub component but it doesn't seem to like binding to a property on this. // Set up Bindings and Watchers... __vendorAgencyOfficeFieldsEnterableChangeWatcher = BindingUtils.bindProperty(agencyOfficeHybridAccordian, enterable, this, vendorAgencyOfficeFieldsEnterable);// vendorName, editable); Has anyone managed to do this? Thanks, Nick
[flexcoders] Re: Problem with BindingUtils.bindProperty
Ok, the property that i'm Binding to must be public, that seems to work and the docs back it up :) On 2 April 2010 23:18, Nick Middleweek n...@middleweek.co.uk wrote: The same goes for ChangeWatcher... I can't do this... ChangeWatcher.watch( this, boolEditableProperty, callback ); but I can do this... ChangeWatcher.watch( vendorName, editable, callback ); // where vendorName is a TextBox. Apart from binding this.boolEditableProperty to a hidden textBox.editable and then Binding my Watcher to the hidden textBox, is there a correct way of handling this? Cheers guys... Nick On 2 April 2010 23:05, Nick Middleweek n...@middleweek.co.uk wrote: Hi, I'm trying to Bind a property on a component to a sub component but it doesn't seem to like binding to a property on this. // Set up Bindings and Watchers... __vendorAgencyOfficeFieldsEnterableChangeWatcher = BindingUtils.bindProperty(agencyOfficeHybridAccordian, enterable, this, vendorAgencyOfficeFieldsEnterable);// vendorName, editable); Has anyone managed to do this? Thanks, Nick
Re: [flexcoders] Re: Pasting an image into an image or bitmap container?
Do you have a link to this blog though please? I'm still interested in reading through it... I've just googled Andrew Trice BitMapData blog getUIComponentBitmapData but can't find what you've mentioned. Cheers, Nick On 25 March 2010 10:43, bhaq1972 mbha...@hotmail.com wrote: I think i'm barking up the wrong tree. I misread your question. thanks Bod
Re: [flexcoders] Re: Pasting an image into an image or bitmap container?
Hi, I think that is only for grabbing the bitmap of a Flex or Air app container. I want the ability for the user to paste any image into the image container. I check out the blog just incase there is some other magic there... Cheers, Nick On 25 March 2010 09:31, bhaq1972 mbha...@hotmail.com wrote: But, pressing Print Screen and then pasting it into an image container would be much nicer and more consistant. Have you checked out Andrew Trice's BitMapData blog. Very clever stuff. Just an idea. When someone presses the PrintScreen button, call his function getUIComponentBitmapData() to copy your screen into an image container.
[flexcoders] double check that this Switch statement can't work...
Hi, I was hoping I could use a switch statement to test what Object type is selected on my ADG but I don't think it's possible and need to use an if, else if, chain... if ( orgStructureADG.selectedIndex = 0 ) { switch ( orgStructureADG.selectedItem ) { case VendorCompcodeData: { trace( VendorCompcodeData ); } case VendorPurchorgData: { trace( VendorPurchorgData ); } default: { trace( default ) } } } I can't drop in the is statement. Is this right, or am I going mad? :) Cheers, Nick
Re: [flexcoders] double check that this Switch statement can't work...
Ah nice... Cheers Oleg. I always put my break; statement inside the case brackets. I quite like the 1st way... Easier to read I think. Thanks, Nick On 25 March 2010 12:49, Oleg Sivokon olegsivo...@gmail.com wrote: In AS3 switch construction uses break - otherwise it'll fall through (all cases will be executed after the first case that matches the condition). Besides, you can leave the condition blank and put any statement in the case block, however, you have to be careful that the cases are unique. Example: switch ( true ) { case (orgStructureADG.selectedItem is VendorCompcodeData): { trace( VendorCompcodeData ); } break; case (orgStructureADG.selectedItem is VendorPurchorgData): { trace( VendorPurchorgData ); } break; default: { trace( default ) } } However, I would do it like this: switch ((orgStructureADG.selectedItem as Object).prototype) { case VendorCompcodeData: { trace( VendorCompcodeData ); } break; case VendorPurchorgData: { trace( VendorPurchorgData ); } break; default: { trace( default ) } } Best. Oleg
[flexcoders] Automatically insert name, date, time into code, etc
Hi, Is it possible from Eclipse to automatically insert my name, the date and time to the top of Class files and when making code changes, perhaps press a key combo to insert this information? Thanks, Nick
[flexcoders] Pasting an image into an image or bitmap container?
Hi, Using Flex 3.x, I've done a bit of research and understand that through code, for security reasons I can't access the Clipboard - makes perfect sense. Is there though, a way to allow the user to manually paste an bitmap into an on screen Object so that I can access it as a bitmap or something, which I can send to the server and save as an image, server side? Thanks, Nick
Re: [flexcoders] Re: Pasting an image into an image or bitmap container?
Hi, I really wanted the user to be able to just paste into Flex and then click send. It's for a tech support system and when ever there are screen errors, they get logged. At the moment they're either pasted in word and word is uploaded or those that know how, paste into MS Paint, save as a JPEG and upload that. But, pressing Print Screen and then pasting it into an image container would be much nicer and more consistant. Thanks, Nick On 24 March 2010 16:19, valdhor valdhorli...@embarqmail.com wrote: I don't think so. Why not just ask them to open the file on their system and then you could upload it to the server. I don't do this with images but I do with MS Excel files. There are many Flex File Upload examples.