Re: [flexcoders] Bindable metadata tag event name
Either I'm not following, or you have something else wrong. If a model object (or the MXML component itself) has a property with custom getter and setter as I showed, you can most certainly say mx:Text text = {model.txt}/ or mx:Text text = {this.txt} / Of course I'm referring to one-way binding - I have not yet played with binding in Flex 4. On Sat, May 1, 2010 at 10:21 PM, sasuke uzumaki.naruto...@gmail.com wrote: Hi, Yes, even I've done that. But my main gripe is that when you have a Bindable tag with your custom event name, is it not possible to use it directly with any custom/built-in flex control? [Bindable(myEvent)] private var txt:String = HI; mx:Text text={txt} / // is this not possible if I use custom events? I've always used plain bindable tags but I'd like to know whether I can achieve the same auto-updation functionality when it comes to using bindable tags with custom events. Regards, sasuke Richard Rodseth wrote: I've never looked at the implementation. When I do this, I create a custom getter and setter: [Bindable(fooChanged)] public function get foo():Boolean { return _foo; } public function set foo(value:Boolean):void { if (value != _foo) { _foo = value; dispatchEvent(new Event(fooChanged)) } } Note that you can also have computed properties based on multiple properties: [Bindable(fooChanged)] [Bindable(barChanged)] public function get foobar():Boolean { return _foo _bar; } On Sat, May 1, 2010 at 12:54 PM, sasuke uzumaki.naruto...@gmail.comuzumaki.naruto.is%40gmail.com wrote: Hi folks, The Bindable metadata tag allows an optional event name to be specified which would be event name that would be dispatched when the property in consideration changes. I've read somewhere that specifying a distinct event name for each bindable property reduces the performance overhead (less work for BindingUtils or so it seems, I can't seem to find the actual implementation detail). But this doesn't work with bindable properties when used with flex controls. For e.g. this *works* mx:Script [Bindable] private var txt:String = HI; private function onCreationCompleteDone(event:Event):void { txt = Changed text!; } /mx:Script mx:Text text={txt} / This doesn't (notice the event name specified): mx:Script [Bindable(myEvent)] private var txt:String = HI; private function onCreationCompleteDone(event:Event):void { txt = Changed text!; // Never called! } /mx:Script mx:Text text={txt} / I did try analyzing the autogenerated AS files; the ones generated when I use simple [Bindable] is pretty easy to understand since it generates plain getter and setter for the `txt` property but when I use [Bindable(someEvent)], the code generated is a bit cryptic with the stuff with Watchers and all that. Would someone be kind enough to shed some light on this matter? How this all this Bindable stuff work under the hood? TIA, sasuke -- View this message in context: http://old.nabble.com/Bindable-metadata-tag---event-name-tp28422913p28422913.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://old.nabble.com/Bindable-metadata-tag---event-name-tp28422913p28424902.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Bindable metadata tag event name
--- In flexcoders@yahoogroups.com, sasuke uzumaki.naruto...@... wrote: Hi, Yes, even I've done that. But my main gripe is that when you have a Bindable tag with your custom event name, is it not possible to use it directly with any custom/built-in flex control? [Bindable(myEvent)] private var txt:String = HI; When you use the syntax [Bindable(event=something)] You are telling the compiler I know what I'm doing, and I'm planning to dispatch the event 'something' myself. If you don't, or you're not, just use the default syntax and let Flex dispatch the needed events for you. http://tv.adobe.com/watch/360flex-conference/diving-in-the-data-binding-waters-by-michael-labriola/ HTH; Amy
[flexcoders] Re: MS - The future of the web is HTML 5
The subject says: The future of the web is HTML 5. It´s not true! Html5 will be a good technologie, but will not be the only one. The future of the web, the future of the software, the future of the mobile, will not be a single technology, IS NOW AND WILL BE A FUTURE integration of different technologies, different lenguagues and different enviroments. If somebody think that only one technologie can cover all requeriments? is wrong.
[flexcoders] Swapping custom components within Viewstack Navigation container...
Dear Group, Somewhat of a newbie and trying to do something that I think should be possible. I have my application below, that when I press a button in the viewstack it changes the Skinnable container stuff within the given navigation container to my custom component defined. So that works well. What I want to be able to do is within my custom component, I want to change the stuff again in the navigation container based on a button within the custom component to another custom component. To clarify I want to swap out custom component A with custom component B. Is there a way so that I can define a variable that is used instead of naming the component as in this snippet: s:NavigatorContent label=Clients icon=@Embed(source='/assets/png/32x32/globe.png') width=100% height=100% id=Information s:SkinnableContainer width=100% height=100% MyComps1:ClientsMain/ /s:SkinnableContainer /s:NavigatorContent Rather do this: s:NavigatorContent label=Clients icon=@Embed(source='/assets/png/32x32/globe.png') width=100% height=100% id=Information s:SkinnableContainer width=100% height=100% MyComps1:somekindavariabledefined/ /s:SkinnableContainer /s:NavigatorContent Then based on the click of another button it changes the value of the variable? s:Button x=105 y=111 label=Main Configuration width=148 height=31 click=changecomponentvariableA / s:Button x=106 y=206 label=Main Reports width=148 height=29 click=changecomponentvariableB / Full Main Application# ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/halo minWidth=1024 minHeight=768 currentState=Base xmlns:MyComps1=com.One.Views.* xmlns:MyComps2=com.Two.Views.* xmlns:MyComps3=com.Three.Views.* xmlns:MyComps4=com.Four.Views.* initialize=initCollections() xmlns:mx2=library://ns.adobe.com/flex/mx s:states s:State name=Base/ /s:states fx:Style @namespace s library://ns.adobe.com/flex/spark; @namespace mx library://ns.adobe.com/flex/halo; .buttonBarButtonStyles { skin: ClassReference(skins.SkinMainButtonBar); } /fx:Style fx:Declarations !-- Place non-visual elements (e.g., services, value objects) here -- /fx:Declarations fx:Script ![CDATA[ import skins.SkinMainButtonBar; import mx.events.MenuEvent; import mx.controls.Alert; import mx.collections.*; import mx.managers.PopUpManager; import mx.controls.Alert; [Bindable] public var menuBarCollection:XMLListCollection; private var menubarXML:XMLList = menuitem label=Menu1 data=top menuitem label=MenuItem 1-A data=1A/ menuitem label=MenuItem 1-B data=1B/ /menuitem menuitem label=Menu2 data=top menuitem label=MenuItem 2-A type=check data=2A/ menuitem type=separator/ menuitem label=MenuItem 2-B menuitem label=SubMenuItem 3-A type=radio groupName=one data=3A/ menuitem label=SubMenuItem 3-B type=radio groupName=one data=3B/ /menuitem /menuitem menuitem label=Menu3 data=top/ /; // Event handler to
[flexcoders] Printing without the pop-up window...
Is there a way to get a Flex program to send a print-job to the default printer without it popping up that window where you select the printer and click the print button? I'd really like to be able to do that. Is that even a function of Flash-player? Or is that built-in to the browser? Would there maybe be a java-script I could use to disable that pop-up in the browser? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Thoughts on Flash by Steve Jobs
--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, mitek17 mitek17@ wrote: --- In flexcoders@yahoogroups.com, Seth Caldwell wiz@ wrote: Steve is employing several tactics used by politicians. The iphone is not open. iPhone is a device, not a technology. Technology should be open, device software could be proprietary. Steve stresses it particularly, please read Job's message more throroughly. I hope that the pressure from Jobs will finally make Adobe get cracking. Get cracking at what? Steve Jobs is on record as saying that no matter what Adobe does with the player, the iPhone and iTampon won't support it. -Amy Frankly, I figured all this flap over Flash was because they wanted to try to force Adobe to make Flash-player open-source... And now you're saying that even if Adobe does that, they still won't allow Flash on their devices? That's stupid and stubborn of Jobs... And besides, if I own a device (I don't own any Apple devices, but if I did) I should be allowed to run whatever software I want to on it. It's MY device, not his. I own it, not him -- if he wants to give me one, and pay the monthly service for it, then he can tell me what I can run on it. Only then. Basically what Jobs is doing is screwing himself out of any potential business that I would ever give him. (For the project I'm working on now, we had plans to purchase about 50 iPads to use on-site. That's not gonna happen now... Glad doin' business with you, Steve -- we'll be buying Google or Dell tablets when they are available.) And it also pisses me off that everyone talks about video on Flash, as if that's the only thing it does. Jobs is singlehandedly ruining OUR jobs as Flex developers. That's really what it boils down to -- he's trying to put us out of business. We already can't write apps for Apple's portable devices -- and when he cuts off Flash support in OSX, there goes every Mac in the world. Thanks for ruining my job, Steve. Bastard. Laurence MacNeill Mableton, Georgia, USA
Re: [flexcoders] Re: Thoughts on Flash by Steve Jobs
Jeez...it's *three* devices, and you *do* have a choice... You're annoyed because you're being shut out of a market you want to be in, but your arguments as to why you should be allowed into that market are specious. If you buy an iPod/Pad/Phone, you buy it as is, knowing what it can and can't do. It can't do Flash. If you don't like that, don't buy the device, it's really very simple. If you want to hack it to make it capable of running Flash, then sure, go ahead, no-one is going to sue you. You might not be able to claim on your warranty or update the OS once you do that but, yes, it's your choice if you want to go that way. Most people don't because most people can actually live without Flash, believe it or not. If you want to develop for the iP*, then learn objective C or use HTML5/Javascript. If you don't then don't. Again, it's a simple choice you can make. Technologies change, sometimes their fortunes rise and sometimes they fall. Flash has been the undisputed winner in the RIA wars up till now. Jobs is betting the future of the iP* platform on HTML5. Maybe he's wrong about it, but maybe he isn't. Time will tell. Guy On 03/05/2010, at 8:22 AM, Laurence wrote: --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, mitek17 mitek17@ wrote: --- In flexcoders@yahoogroups.com, Seth Caldwell wiz@ wrote: Steve is employing several tactics used by politicians. The iphone is not open. iPhone is a device, not a technology. Technology should be open, device software could be proprietary. Steve stresses it particularly, please read Job's message more throroughly. I hope that the pressure from Jobs will finally make Adobe get cracking. Get cracking at what? Steve Jobs is on record as saying that no matter what Adobe does with the player, the iPhone and iTampon won't support it. -Amy Frankly, I figured all this flap over Flash was because they wanted to try to force Adobe to make Flash-player open-source... And now you're saying that even if Adobe does that, they still won't allow Flash on their devices? That's stupid and stubborn of Jobs... And besides, if I own a device (I don't own any Apple devices, but if I did) I should be allowed to run whatever software I want to on it. It's MY device, not his. I own it, not him -- if he wants to give me one, and pay the monthly service for it, then he can tell me what I can run on it. Only then. Basically what Jobs is doing is screwing himself out of any potential business that I would ever give him. (For the project I'm working on now, we had plans to purchase about 50 iPads to use on-site. That's not gonna happen now... Glad doin' business with you, Steve -- we'll be buying Google or Dell tablets when they are available.) And it also pisses me off that everyone talks about video on Flash, as if that's the only thing it does. Jobs is singlehandedly ruining OUR jobs as Flex developers. That's really what it boils down to -- he's trying to put us out of business. We already can't write apps for Apple's portable devices -- and when he cuts off Flash support in OSX, there goes every Mac in the world. Thanks for ruining my job, Steve. Bastard. Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Thoughts on Flash by Steve Jobs
you must be kidding. Gnash is not ready for use in commercial projects. Looking at the latest readme.txt: -Key events are not handled - Resizing browser window when plugin is running , will crash browser. Since 2005 they have not figured it out? This puppy must be put to sleep. PS And yes, exactly, we need flash.* sources :) Cheers! --- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: @ mitek17 Erm... GNash? Why the heck do you need the player sources? You have the SWF specs - player is the program that plays SWF files, you can make your own... In fact, GNash does it already and is GNU program, the problem is flash.* (AS3) package which is a proprietary extension to ECMAScript. If you want Flash to be an open standard - this is what you should be asking for :) Sorry, it's just like asking for ICQ sources while you want to implement OSCAR or Jabber.
[flexcoders] trace address of a object
Is there a way to print out an address of an object? PS I know that debugger shows addresses, I need to trace it. Thanks!
Re: [flexcoders] Re: Thoughts on Flash by Steve Jobs
mitek17 Yeah, I know that... well, I didn't say it's usable for commercial purposes. That's true it isn't. What I said is that, if it would matter more to Adobe these project exist and continue to develop, it would be better, for the image at least. Well, you know, MS doesn't really support MoonLite or Mono, but it kind of mentions it everywhere, and, well, to be honest, I don't know what the exact status of their relationship is :) But, they aren't fighting, or, at least so it seems :) I mean, that's great and most welcomed that Adobe have OSS initiatives, but, there are some times, when you know there's an error in the built-in classes - the most obvious are the one in the Sound constructor and ExternalInterface serialization routines - you can even see the damn thing in the playerglobals.swc, but you cannot help it's being there... I don't know how much of engineering powers are dedicated to the Linux version of FP for example, but, it sounds like not to much, and it also looks like they don't really communicate with the rest of the Linux community... and, to be honest, the Linux Flash Player made by Adobe is... well, if Mac users had that, I would side with Steven Jobs admirers in this topic :D It is truly the most buggy software I've got so far in my installation :) (right now for w/e reason it doesn't display any serif fonts at all for eg.) I hope the remark about flash.* sources wasn't sarcastic, I really believe that would help. Not that I know of any initiative of writing an alternative Flash Player (I'm not sure GNash is alive yet - one thing true - apt-get finds it so far), but, technically, that would made the language an OSS one. But, again, that must be some commercial concern, of which I don't have enough knowledge to say any more. Best. Oleg
[flexcoders] OAuth and AIR
Anyone know of a good solution for OAuth and AIR. I've seen oauth-as3 and am not to confident this is the right solution. I primarily feel this way due to the lack of external browser loading during token verification.
[flexcoders] Re: Thoughts on Flash by Steve Jobs
--- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote: Jeez...it's *three* devices, and you *do* have a choice... It's gonna be a hell of a lot more than just 3 portable devices, when Jobs removes Flash from OSX. That's every Mac in the world. There are a LOT of Macs out there... The whole reason I chose to learn Flex is that it (at the time) ran on every available platform. It was THE cross-platform language to learn. You're annoyed because you're being shut out of a market you want to be in, but your arguments as to why you should be allowed into that market are specious. My arguments are not specious -- I *was* a part of that market at one time. I'm being shut out of a market through NO FAULT OF MY OWN. Every Apple product in the world will soon have zero support for Flash -- that's NOT what I signed up for when I learned Flex. The MAIN REASON I learned Flex was for its cross-platform capabilites. I never had to worry about what system my programs were running on. Now Apple is gone from that equation -- ergo 25% of my customers just disappeared, unless I can get them all to buy PCs. Thanks, Steve! If you buy an iPod/Pad/Phone, you buy it as is, knowing what it can and can't do. It can't do Flash. If you don't like that, don't buy the device, it's really very simple. If you want to hack it to make it capable of running Flash, then sure, go ahead, no-one is going to sue you. You might not be able to claim on your warranty or update the OS once you do that but, yes, it's your choice if you want to go that way. Most people don't because most people can actually live without Flash, believe it or not. I agree with you here -- knowing in advance that it doesn't run Flash is a good thing, and people can then make a choice accordingly. It just really angers me if I were to own a device and some entity somewhere tells me I cannot run my own software on it. I would be ranting against MS or Linux just as angrily, if they were to suddenly come out and say I couldn't run a particular piece of software just because they don't like it anymore. (And, yes I read that article where MS says that HTML5 is the 'future of the internet.' They said nothing about removing Flash support from Microsoft Windows in that article. Steve Jobs IS going to remove Flash from all Apple products everywhere -- THAT'S my problem with this!) If you want to develop for the iP*, then learn objective C or use HTML5/Javascript. If you don't then don't. Again, it's a simple choice you can make. It's NOT a simple choice -- learning a whole other programming language is not a simple task. Before old Steve-o came out against Flash, I could write one program that would work on Windows, Linux, and Mac. Now Mac is gone from that equation -- thanks to some facist prick who thinks he knows everything that everyone else should do. Technologies change, sometimes their fortunes rise and sometimes they fall. Flash has been the undisputed winner in the RIA wars up till now. Jobs is betting the future of the iP* platform on HTML5. Maybe he's wrong about it, but maybe he isn't. Time will tell. Yes, technologies do change -- but it should be the free market that determines which technologies survive and which don't, not some ivory-tower egghead who determines by fiat what's best for everyone. THAT'S why I called Steve Jobs a bastard. Perhaps I should've said elitist bastard to make it clearer. I truly DESPISE it when ONE person has the power to mess up things in my life. If everyone decided ON THEIR OWN to stop using Adobe Flash, that would be a completely different story -- the majority would have spoken, and I could more easily accept the outcome. But Jobs is simply deciding that he knows best, and we're going to all follow him because he's so damn smart. THAT is not the free market!
Re: [flexcoders] trace address of a object
Coerce it to something it surely isn't and parse the error message? That's only possible in debugger player btw. There's no way to get those errors in release player.
Re: [flexcoders] OAuth and AIR
I think this ends up being kind of a philosophical debate with no right answer. I agree with you that the ideal solution is the external web browser loading the provider's page so that the user never types their credentials into a site or window that isn't the one that belongs to the service. But because these are AIR applications and they're already running in a trusted environment, it seems like the user already trusts the application not to do anything harmful and so from a UX standpoint, just using AIR's HTML component is a better solution. My 2 cents. =Ryan r...@adobe.com On Sun, May 2, 2010 at 1:44 PM, anthony.cint...@rocketmail.com anthony.cint...@rocketmail.com wrote: Anyone know of a good solution for OAuth and AIR. I've seen oauth-as3 and am not to confident this is the right solution. I primarily feel this way due to the lack of external browser loading during token verification.
[flexcoders] Scrollbars, mx:DataGrid, and non-Halo themes...
If I have a non-Halo theme (for example, Cobalt) in my Flex 4 app, there are no longer any scroll-bars on my Data Grid. How do I re-enable the vertical scroll bar, in particular? Thanks, Laurence MacNeill Mableton, Georiga, USA
[flexcoders] Verticalscrollposition in flashbuilder?
Anyone know the equivalent of var scrollUpPropertyAction:AnimateProperty = new AnimateProperty(this); scrollUpPropertyAction.property = verticalScrollPosition; scrollUpPropertyAction.fromValue = this.verticalScrollPosition; in a panel for flash builder 4? In addition in flex you use to be able to turn on the scrollpolicy via the mxml tag like this - verticalScrollPolicy=auto horizontalScrollPolicy=off Is their an equivalent know in flash builder? -r
[flexcoders] A way to removeAllChildren in a panel in flash builder 4?
Is their a flash builder 4 equivalent of - public function set dataItems(dataItemsCollection:ListCollectionView):void { //trace(set DataItems); _dataItems = dataItemsCollection; removeAllChildren(); rowsArray = []; will removeAllElements() really achieve the same result - it just doesn't seem to work right. -r
[flexcoders] Slider as Item Renderer/Editor in an ADG
Hi All, I am trying to use a Slider as an Item Renderer Editor in an ADG. Here is the sample code i have and it doesn't display the values that are passed to tge grid and also the value changes i made using the slider are not getting stored in the selected Item.. [CODE] mx:AdvancedDataGridColumn dataField=sliderVal headerText=Slider Test editable=true editorDataField=updatedValue rendererIsEditor=true itemRenderer=mytest.SliderItemEditor /mx:AdvancedDataGridColumn [/CODE] And the Item Editor have is: [CODE] ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% verticalAlign=top horizontalAlign=center mx:Script ![CDATA[ public var updatedValue:Number; private var log:ILogger=LogUtils.getLogger(this); override public function set data(value:Object):void { if(value!=null) { slider.value=parseInt(String(value)); } } public function valueChanged():void { updatedValue = slider.value; } ]] /mx:Script mx:HSlider id=slider minimum=0 maximum=1 value={data.value} labels=['0','1'] change=valueChanged() updateComplete=updatedValue=slider.value;/ /mx:HBox [/CODE] And i am passing an ArrayCollection of type Node s to the ADG [CODE] class Node{ public var sliderVal:Number; // Other members.. } [/CODE] Thanks mars
[flexcoders] how to know swf flash version?
Hi, I use swfloader load a swf file and how to know the flash version for the swf file. Thanks Mark
Re: [flexcoders] trace address of a object
There is no way. It isn’t necessarily its address anyway. You can use UIDUtil to give it a UID and track it that way. On 5/2/10 4:14 PM, mitek17 mite...@gmail.com wrote: Is there a way to print out an address of an object? PS I know that debugger shows addresses, I need to trace it. Thanks! -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Printing without the pop-up window...
It is a security aspect of Flash. I think you might be able to do it in AIR 2.0, but I haven’t checked to be sure. I heard you will be able to do it soon in Flash, but I don’t know if that means 10.1, 10.x or 11. On 5/2/10 3:04 PM, Laurence lmacne...@comcast.net wrote: Is there a way to get a Flex program to send a print-job to the default printer without it popping up that window where you select the printer and click the print button? I'd really like to be able to do that. Is that even a function of Flash-player? Or is that built-in to the browser? Would there maybe be a java-script I could use to disable that pop-up in the browser? Thanks, Laurence MacNeill Mableton, Georgia, USA -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Scrollbars, mx:DataGrid, and non-Halo themes...
--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: If I have a non-Halo theme (for example, Cobalt) in my Flex 4 app, there are no longer any scroll-bars on my Data Grid. How do I re-enable the vertical scroll bar, in particular? Thanks, Laurence MacNeill Mableton, Georiga, USA Figured this one out myself... Turns out it had nothing to do with the theme, and everything to do with the fact that my data-grid was too wide to see the scroll bar. As long as the Datagrid's verticalScrollPolicy is set to on or auto the vertical sroll bar will appear, it would seem... I just thought with all the scrolling changes that came about in Flex 4, maybe something got messed up. But it was just me. :-) L.