Re: [flexcoders] re:httpService to api
I haven't used bit shetler, but from this response it looks like you first have to present your email address and password to and httpS service for identification. In exchange you get a cookie back, and then you present the cookie with subsequent requests. It's like when you go in a club, and the bouncer at the front door checks your id...he would be the httpS service. Then you get your hand stamped and you can come in and out for the rest of the night through any door. The hand stamp would be the cookie. I'm not sure if you need to set up a special services-config.xml...You might want to just try sending your request to httpS://pa.photoshelter.com (or whatever url you were sending the request to)...that would be the first thing to try. you also need to set the protocol property of your httpService to https. That will probably do the trick. You will probably then set up a second httpService for handling the rest of the api calls, and you will pass a cookie into this...probably just a string value. These requests would just go to the normal http service. Rob mx:HTTPService concurrency=multiple|single|last contentType=application/x-www-form-urlencoded|application/xml fault=No default. id=No default. method=GET|POST protocol=http|https result=No default. resultFormat=object|xml|flashvars|text serviceName=No default. showBusyCursor=false|true url=No default. useProxy=true|false xmlEncode=No default. xmlDecode=No default. / On Nov 28, 2008, at 8:20 AM, spinglittery wrote: Thanks for the input Rob. It is worse than I thought... Using trace(XML(evt.result).toXMLString()); as you suggested, I see I am not getting authorisation because the setRemoteCredentials function isn't being properly received... The xml returned is: BitShelterAPI version=1.1 identity companyPhotoShelter, Inc./company applicationPhotoShelter/application urlhttp://pa.photoshelter.com/url /identity response error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Passwordlt;/bgt;./message /error error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Emaillt;/ bgt;./message /error /response usage nameauth/name descThe authentication module returns an HTTP cookie that is required by all the other modules. This cookie is of a proprietary format and should be sent as is. Modules will return an updated HTTP cookie so that accurate idle time can be tracked. Calls to the authentication module must be made via an HTTPS connection./desc input U_EMAILemail address/U_EMAIL U_PASSWORDpassword/U_PASSWORD /input output cookiesession cookie/cookie orgorganization array/org O_IDorganization ID/O_ID O_NAMEorganization name/O_NAME OU_F_MEMorganization user member flag/OU_F_MEM /output /usage /BitShelterAPI I am somewhat concerned that perhaps I am not connecting via a secure connection.( Calls to the authentication module must be made via an HTTPS connection.) And wonder whether I need to write a services-config.xml file in order to establish https?
[flexcoders] Re: How to get an object to delete itself?
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: this.parent.removeChild(this); and this.parent.removeChild(this); are synonomous (except for popups, where you need to use this.parent.removeChild(this) ). Anyone else confused by this? I'm seeing the exact same statement (this.parent.removeChild(this)) three times, so it seems to me that of COURSE the first two are synonymous, as they are identical, and the third shouldn't actually be an exception, since it's the same as the first two. Am I missing something?
Re: [flexcoders] Re: How to get an object to delete itself?
99% he meant : this.owner.removeChild(this); synonymous to: this.parent.removeChild(this); On Sat, Nov 29, 2008 at 4:04 PM, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: this.parent.removeChild(this); and this.parent.removeChild(this); are synonomous (except for popups, where you need to use this.parent.removeChild(this) ). Anyone else confused by this? I'm seeing the exact same statement (this.parent.removeChild(this)) three times, so it seems to me that of COURSE the first two are synonymous, as they are identical, and the third shouldn't actually be an exception, since it's the same as the first two. Am I missing something? -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
Re: [flexcoders] Re: How to get an object to delete itself?
LOL, yes, I did copy and paste but forgot to edit. Paul - Original Message - From: Fotis Chatzinikos To: flexcoders@yahoogroups.com Sent: Saturday, November 29, 2008 2:10 PM Subject: Re: [flexcoders] Re: How to get an object to delete itself? 99% he meant : this.owner.removeChild(this); synonymous to: this.parent.removeChild(this); On Sat, Nov 29, 2008 at 4:04 PM, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: this.parent.removeChild(this); and this.parent.removeChild(this); are synonomous (except for popups, where you need to use this.parent.removeChild(this) ). Anyone else confused by this? I'm seeing the exact same statement (this.parent.removeChild(this)) three times, so it seems to me that of COURSE the first two are synonymous, as they are identical, and the third shouldn't actually be an exception, since it's the same as the first two. Am I missing something? -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
[flexcoders] How to update menubar dataprovider
I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks.
Re: [flexcoders] How to update menubar dataprovider
Did you try with a bindable ArrayCollection? This usually dispatches the correct events for UI components to update automatically. [Bindable] var myData:ArrayCollection = new ArrayCollection() ; On Sat, Nov 29, 2008 at 8:19 PM, lampei [EMAIL PROTECTED] wrote: I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
[flexcoders] Re: How to update menubar dataprovider
Cool! That worked. I'm wondering what event is fired for the ArrayCollection that made it work...CollectionChange maybe? It'd be nice to know what would work/how to get it to work for the array too, but at least it works for the ArrayCollection. Thanks. --- In flexcoders@yahoogroups.com, Fotis Chatzinikos [EMAIL PROTECTED] wrote: Did you try with a bindable ArrayCollection? This usually dispatches the correct events for UI components to update automatically. [Bindable] var myData:ArrayCollection = new ArrayCollection() ; On Sat, Nov 29, 2008 at 8:19 PM, lampei [EMAIL PROTECTED] wrote: I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
[flexcoders] Re: How to update menubar dataprovider
I believe it is the CollectionChange event. --- In flexcoders@yahoogroups.com, lampei [EMAIL PROTECTED] wrote: Cool! That worked. I'm wondering what event is fired for the ArrayCollection that made it work...CollectionChange maybe? It'd be nice to know what would work/how to get it to work for the array too, but at least it works for the ArrayCollection. Thanks. --- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzinikos@ wrote: Did you try with a bindable ArrayCollection? This usually dispatches the correct events for UI components to update automatically. [Bindable] var myData:ArrayCollection = new ArrayCollection() ; On Sat, Nov 29, 2008 at 8:19 PM, lampei lampei@ wrote: I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation Fotis.Chatzinikos@,
Re: [flexcoders] Help with error message
Hi, markgoldin_2000 wrote: What exaclty this means: TypeError: Error #2007: Parameter antiAliasType must be non-null. at flash.text::TextField/set antiAliasType() Paraphrasing the error message one can defintely say that you have a TextField somewhere for which you're setting the anti alias type property (antiAliasType) to null (this might not be something you're doing on purpose, but you might be binding to something which has the value null at some point). If you check the docs for TextField you'll se that the valid values are only normal or advanced (the values are held in the class constants NORMAL and ADVANCED in the AntiAliasType class which one should always use instead of the literals). I don't know what you're doing, but if you're, for example, doing tests changing the anti alias type from a combo box or something like that, you should always test or provide a fallback for it. Something like mx:TextField antiAliasType={myValue || AntiAliasType.ADVANCED} / could do the job. hth, gabriel. -- gabriel montagné láscaris-comneno http://rojored.com +506 83.67.67.94
[flexcoders] Re: How to update menubar dataprovider
So how do I fire the CollectionChange event from the array so that the menuBar picks up that the collection has changed and to reload the dataProvider? --- In flexcoders@yahoogroups.com, Dominic Pazula [EMAIL PROTECTED] wrote: I believe it is the CollectionChange event. --- In flexcoders@yahoogroups.com, lampei lampei@ wrote: Cool! That worked. I'm wondering what event is fired for the ArrayCollection that made it work...CollectionChange maybe? It'd be nice to know what would work/how to get it to work for the array too, but at least it works for the ArrayCollection. Thanks. --- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzinikos@ wrote: Did you try with a bindable ArrayCollection? This usually dispatches the correct events for UI components to update automatically. [Bindable] var myData:ArrayCollection = new ArrayCollection() ; On Sat, Nov 29, 2008 at 8:19 PM, lampei lampei@ wrote: I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation Fotis.Chatzinikos@,
Re: [flexcoders] Re: How to update menubar dataprovider
Use an ArrayCollection :-) No need to use arrays for binding ops.. Arrays might be faster, but not for this type of processing... On Sun, Nov 30, 2008 at 3:23 AM, lampei [EMAIL PROTECTED] wrote: So how do I fire the CollectionChange event from the array so that the menuBar picks up that the collection has changed and to reload the dataProvider? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Dominic Pazula [EMAIL PROTECTED] wrote: I believe it is the CollectionChange event. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, lampei lampei@ wrote: Cool! That worked. I'm wondering what event is fired for the ArrayCollection that made it work...CollectionChange maybe? It'd be nice to know what would work/how to get it to work for the array too, but at least it works for the ArrayCollection. Thanks. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Fotis Chatzinikos fotis.chatzinikos@ wrote: Did you try with a bindable ArrayCollection? This usually dispatches the correct events for UI components to update automatically. [Bindable] var myData:ArrayCollection = new ArrayCollection() ; On Sat, Nov 29, 2008 at 8:19 PM, lampei lampei@ wrote: I am trying to update the dataProvider of a MenuBar without resetting the menuBar dataprovider to the original array. e.g. private var menuData:Array = []; private function init():void { menuData.push( { label: test1, type: normal } ); menuData.push( { label: test2, type: normal } ); menuData.push( { label: test3, type: normal } ); } mx:MenuBar id=mb dataProvider={ menuData } / It works if I put everything in the initial property creation or if I do: mb.dataProvider = menuData; in the init function after I've done all of my array pushes, but I was hoping there was a better way of doing things, i.e. firing an event or calling a method. I have tried mb.validateNow() (in fact, I've tried all validate methods), but none seem to refresh the menuData dataProvider. Anyone have any other ideas, or can tell me what I'm doing wrong? Thanks. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation Fotis.Chatzinikos@, -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
[flexcoders] Re: httpService to api
Thanks for your input. I have been sending to an https destination - but probably over insecure http, which may beone reason why it is being rejected. I had thought that the protocol property had been removed/deprecated - because I can't see it in the Flex 3 HTTPService class documentation... From Docs: The mx:HTTPService tag accepts the following tag attributes: mx:HTTPService Properties concurrency=multiple|single|last contentType=application/x-www-form-urlencoded|application/xml destination=DefaultHTTP id=No default. method=GET|POST|HEAD|OPTIONS|PUT|TRACE|DELETE resultFormat=object|array|xml|e4x|flashvars|text showBusyCursor=false|true makeObjectsBindable=false|true url=No default. useProxy=false|true xmlEncode=No default. xmlDecode=No default. Events fault=No default. result=No default. / Also when I compile with it included, I get an error: 'Cannot resolve attribute 'protocol' for component type mx.rpc.http.mxml.HTTPService.' Where did you get the version you sent that lists 'protocol' as a property? Is it Flex 2.01? ( I have a foreboding that I may have to use Blaze DS in order to access a secure HTTPS channel...) I do understand that I need to get a session cookie from bitshelter, just not how to obtain it. Any further tips/ thoughts are appreciated. Posted by: Rob Kunkle [EMAIL PROTECTED] rob_kunkle Sat Nov 29, 2008 12:44 am (PST) I haven't used bit shetler, but from this response it looks like you first have to present your email address and password to and httpS service for identification. In exchange you get a cookie back, and then you present the cookie with subsequent requests. It's like when you go in a club, and the bouncer at the front door checks your id...he would be the httpS service. Then you get your hand stamped and you can come in and out for the rest of the night through any door. The hand stamp would be the cookie. I'm not sure if you need to set up a special services-config.xml...You might want to just try sending your request to httpS://pa.photoshelter.com (or whatever url you were sending the request to)...that would be the first thing to try. you also need to set the protocol property of your httpService to https. That will probably do the trick. You will probably then set up a second httpService for handling the rest of the api calls, and you will pass a cookie into this...probably just a string value. These requests would just go to the normal http service. Rob mx:HTTPService concurrency=multiple|single|last contentType=application/x-www-form-urlencoded|application/xml fault=No default. id=No default. method=GET|POST protocol=http|https result=No default. resultFormat=object|xml|flashvars|text serviceName=No default. showBusyCursor=false|true url=No default. useProxy=true|false xmlEncode=No default. xmlDecode=No default. / On Nov 28, 2008, at 8:20 AM, spinglittery wrote: Thanks for the input Rob. It is worse than I thought... Using trace(XML(evt.result).toXMLString()); as you suggested, I see I am not getting authorisation because the setRemoteCredentials function isn't being properly received... The xml returned is: BitShelterAPI version=1.1 identity companyPhotoShelter, Inc./company applicationPhotoShelter/application urlhttp://pa.photoshelter.com/url /identity response error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Passwordlt;/bgt;./message /error error classFieldRequiredErr/class messageYou are missing the required field lt;bgt;Emaillt;/ bgt;./message /error /response usage nameauth/name descThe authentication module returns an HTTP cookie that is required by all the other modules. This cookie is of a proprietary format and should be sent as is. Modules will return an updated HTTP cookie so that accurate idle time can be tracked. Calls to the authentication module must be made via an HTTPS connection./desc input U_EMAILemail address/U_EMAIL U_PASSWORDpassword/U_PASSWORD /input output cookiesession cookie/cookie orgorganization array/org O_IDorganization ID/O_ID O_NAMEorganization name/O_NAME OU_F_MEMorganization user member flag/OU_F_MEM /output /usage /BitShelterAPI I am somewhat concerned that perhaps I am not connecting via a secure connection.( Calls to the authentication module must be made via an HTTPS connection.) And wonder whether I need to write a services-config.xml file in order to establish https? Back to top
[flexcoders] httpservice to api
Ah-hah. I discovered that I have to use a proxy, otherwise the setRemoteCredentials function is ignored... Using a proxy and a services- config.xml to set parameters, I recokon I can specify https. Certainly I can specify it as destination: destination property destination:String [read-write] An HTTPService destination name in the services-config.xml file. When unspecified, Flex uses the DefaultHTTP destination. If you are using the url property, but want requests to reach the proxy over HTTPS, specify DefaultHTTPS. ,,,but I remain unclear whether that means that I am actually communicating across a secured channel... or just accessing a secure destination. Anyway, some light in the murk.
RE: [flexcoders] Flash Modules?
I suppose that's possible, assuming you copy enough files but I really am not looking forward to working through all of the issues you might run into. The Flex compiler wraps your module in a bunch of code that Flash doesn't know how to do. Fundamentally, a module is just a SWF with some other code that factories the main class. Any SWF you create in Flash can be loaded and you can put together some way to instantiate classes in that SWF, and yes, they can implement some interface. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ivo Sent: Friday, November 28, 2008 8:17 AM To: FlexCoders Subject: [flexcoders] Flash Modules? Is it possible to create Flash Modules that implement an interface? Meaning that they extend ModuleBase, can be loaded/unloaded at runtime and expose a predefined interface? All my development experience is with Flex AS3 using mxmlc so I have zero Flash experience. My current project is a modular architecture Flex AS3 but there are specific interactive behaviors that are best written in Flash. I would like to be able to incorporate them as I would with AS3 modules. Thanks, - Ivo
RE: [flexcoders] How to embed icons in MenuBar?
Try public instead of private From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nathanleewei Sent: Thursday, November 27, 2008 3:31 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to embed icons in MenuBar? [Embed(source=/assets/document.png)] private static const document_icon:Class; mx:MenuBar id=menuBar width=100% labelField=@label iconField=@icon styleName=menuBar itemClick=onMenuBar(event) mx:XMLList menuitem label=File menuitem label=New icon=document_icon / it has no effect?!
[flexcoders] Flex nested tree get data from mysql and php
Hello all, I am working with nested arrayobjects and I cannot construct the needed data from my php/mysql backend. I am using nested sets (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html), with left and right keys. I need to construct the data (in php) and pass it to flex (using a remote call). I need/want to get the data to flex and put it into an arraycollection. Has any one done this? If so, can you post some code? I have been banging my head on this for a long time and cannot get the data into the right format for an array collection. Thanks for the help, timgerr