My New Flex Cookbook Post on Using Custom Events

I just created a Flex Cookbook post on using custom events to pass data between the Flex application and custom components:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=15466&loc=en_US
Hope it helps.

After perusing the SDK classes, I realize that all arguments from the superclass should go first in constructor arguments. 
Also, although we are listening in capture phase, both the bubble and capture phase have the problem of requiring unique event names.  This is why the application frameworks recommend singletons like model singletons so you can listen directly to them instead of basically broadcasting to everyone (bubbling) or listening to everyone (capture).
That would be a bit more complex, and I am trying to keep this simple, but another good point to keep in mind.

Similar Messages

  • How to force a new document to check in using an event receiver

    Hello,
    I need someone to guide me how to achieve using an event receiver or any other method how to force a document to check in. I have some users that forget to check in their documents. I have a workflow that runs every time a new document is uploaded and check
    in to run an approval process. Hope anyone can help me with this.
    Best Regards,
    Fer

    You can check-in document in the ItemAdded event
    Example:
    namespace MultipleFileUpload.MultipleItemsAdded
    /// <summary>
    /// List Item Events
    /// </summary>
    public class MultipleItemsAdded : SPItemEventReceiver
    /// <summary>
    /// An item was added.
    /// </summary>
    private Guid siteID;
    private SPFile file;
    public override void ItemAdded(SPItemEventProperties properties)
    siteID = properties.SiteId;
    file = properties.ListItem.File;
    using (SPSite site = new SPSite(siteID))
    using (SPWeb web = site.OpenWeb())
    base.ItemAdding(properties);
    SPListItem oItem = properties.ListItem;
    oItem["Title"] = "Please add a title.";
    oItem["Description"] = "Please add a description.";
    oItem.Update();
    if (file.CheckOutType != SPFile.SPCheckOutType.None)
    file.CheckIn("Automatic Check In");
    [custom.development]

  • Issue in using custom event from outreach

    Hi
    I have created a custom event and executed a scenario successfully for this custom event from ACC. But when I try to configure the same event from Outreach(BCC), I am able to see this custom event in the list of available events, but after selecting this event there is no option to configure attributes for this event, but I can configure attributes in ACC. My BCC version is 10.1.1
    Edited by: 1002715 on Apr 26, 2013 3:06 AM

    Dear Ankit,
    Once the pricing procedure is downloaded, please maintain the document pricing procedure at service contract header level, and maintain the customer pricing procedure at business partner sales area billing data.
    In spro, maintain the pricing procedure for the combination of sales area, document pricing procedure, customer pricing procedure.
    Please crosscheck whether the condition table is active or not.
    Regards,
    Maddy

  • New issue breaking Gmail when using custom domain name

    I have been using my own domain name in conjunction with Gmail since the launch of Gmail.  The use case is fairly straightforward -- I have my own domain name and have created an email address alias on this domain ("custom email address') that forwards email to my Gmail account.  I have configured Gmail to override the From field with this custom email address.  With this configuration, Gmail is happy.  
    On my Z10, I had created a Gmail email integration account via the Advanced Settings with my custom email address in the "email address" field and my gmail email address as the username with the appropriate gmail server settings.  When I continue from the advanced screen, I was taken to the Google account login screen where I grant permissions for my BlackBerry to access my account.  On this screen, I logged in using my gmail email address.  This worked fine and I received email without incident on my Z10 since I bought it on the Feb launch date ... until this past weekend.  My Z10 then suddenly reported that my settings had changed and nothing I could do could convince it to accept the above settings as correct.
    If you have a similar configuration and have noticed recent issues, there is a solution.  This new "issue" appears to be that when you log into the Google permissions screen during the BB10 email account configuration process (i.e. the Google login page after you enter all the server settings in Advanced section of BB email account setup), you are no longer allowed to enter a username that differs with the custom email address you are setting up.  It won't ever tell you that this is the problem.  You just get a vague email settings error at the end of the process and you can't get your mail.  It is possible that Google is the one who introduced this glitch, since the solution is within your Google account configuration, not BlackBerry.  Simply put, you must associate your custom email address with your gmail account login within Google.
    To do this, log in to Gmail using your usual gmail address.  Click on your Gmail address in the top right corner, select the "Account" link in the drop down.  Click the "Edit" link to the right of the Email heading.  At the bottom of this edit page add your custom email address in the field next to the label "Add a new alternate address".  After you add it, you will need to verify this address via an email that will be in your Gmail account.  I probably should have done this long ago, but never had the need to until now.
    Now you can get BB email working again.  Go back to the BB10 account settings page for your Gmail account.  This time when are kicked over to the Google login page to grant permissions to your BlackBerry to access your account, use your custom email address as your Google username and use your usual Gmail password.

    Amazing, Thanks !

  • New FLEX Job posted on FLEX - RIA Opportunities

    http://tech.groups.yahoo.com/group/flexriaopps/
    Check it out! Join up! This is your community and we need
    more people to be active!
    Thank you,

    I was disappointed with the kind of response from a forum like this to an amateur like me.
    I found a way around, decided not to use Eclipse at all with Flex SDK. Instead I am using Flash Develop which is a free IDE specific for Flash & Flex and integrating Flex SDK is pretty easy in that. Provided a very good feature set for a free software. Anyone stuck with this problem I suggest to go ahead with FlashDevelop instead of trying to figure out Eclipse. It is available for download here
    http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page

  • Could some one explain to me how Custom Events work?

    I tried looking in the live docs and still it confused me, so
    then I went searching on the net and found this very lovely
    tutorial
    http://www.tink.ws/blog/custom-events-in-as-30-dont-forget-to-override-the-clone-method/
    but still it confused me. The part I am puzzled on the most is that
    when you create like a event that listens for when your mouse
    clicks something is setup like addEventListener(MouseEvent.CLICK,
    eventHandler) etc, etc. And when a mouse is clicked the event is
    triggered! but if the CLICK constant is just a a string value what
    is going on behind the scenes that tells it (lets say Flex is
    talking -->) "okay he/she specified the 'CLICK' constant so I
    guess this means I will make this event happen only when the mouse
    clicks on that particular object" and same with
    MouseEvent.DOUBLE_CLICK how does it know to trigger this event only
    when the mouse double clicks on a item. I want to make my own
    custom events that trigger a particular event based on what a
    object does, but I just don't understand how to set it up and
    implement it.

    HI,
    The hole concept of event dispatcher is that events get fired
    all the time, if there is someone listening to the event or not. In
    your own example, the CLICK event gets fired each time someone
    clicks on the object.
    When you add an event listener basically what you are doing
    is adding a function to a queue of functions that get executed each
    time a specific event is fired. This is very important to keep in
    mind from the object disposal point of view, since for the garbage
    collector to actually kill an object all reference to it must be
    eliminated, and this include the reference in this queue for the
    listening function.
    The reason that an event name is simply a String is so you
    can actually define any event you might like. Still is good
    practice to define constants for your events names since it will
    avoid a lot of errors when writing code.
    Now to fire an event all you need to do is dispatch a
    specific event using the "dispatchEvent" function. This is what
    happens each time you click on an object, the dispatchEvent(new
    Event(Event.CLICK))) function is called.
    If you are using custom events it's a good idea to extend the
    Event class so you can add some extra information to the event, for
    example, in the MouseEvent the x and y coordinates of the mouse are
    added. To dispatch a custom event all you do is call the event
    dispatcher with the custom event:
    dispatchEvent(new CustomEventClass(Some Data));

  • Observable vs Custom Events

    Hi.
    I'm creating a project that uses the MVC design pattern, and being eager to make sure I follow the best practices I have a couple of questions. When notifying a 'View' of changes to the 'Model' is it preferable to effect this notfication using the Observer/Observable pattern, or through a custom eventListener? I can understand that the Observer/Observable way of doing things allows the View to be completely independant of the Model. However if I were to use custom events and eventListeners it would certainly make things easier to read and implement (my model is quite a large beast, comprising of multiple sub-models), as I would be able to provide more information about the change with each notification.
    Is the answer to this just personal preference, or is there a convention?
    Thanks in advance.

    EventListener is an example of the [Subject] Observer
    pattern.
    If you are using swing/awt then use EventListener, if
    you wish to decouple your implementation from
    swing/awt, then implement your own solution based on
    the [Subject] Observer pattern.I disagree. Swing/awt have nothing to do with this. EventListener, EventObject, Observer, and Observable all belong to java.util. In theory you could do this without using any of these classes and making the event and listeners yourself without extending anything from java.util.
    Observer and Observable is good for a one to one relationship. It is quick, easy to do, and you don't have a lot to worry about. Multiple Observers watching one Observable is also nice. It is when you start watching multiple Observable classes that things get messy. Observer has one method that all Observable classes call. You have to do a lot of checking to see which class the Observable is before you know how to handle it.
    IMO the biggest disadvantage to Observer and Observable, is that something must extend Observable. This is bad if the class you want to observe extends something else. Instances of Observer and Observable are also bound tightly together.
    Events and Listeners are not bound together. Typically once the event is processed, it is disposed unless you want to save it and use it over and over. When using multiple listeners and events, you would implement each listener (or make anonymous) and it would have its own methods for a specific event, and not one large update method that handles everything. The events would be constructed as needed, and passed to the listeners.
    You are not limited to extend Event like you are with Observable. If you tried to handle an Observable the same way as an Event, you would have to register the Observable with the Observer, notify the Observer, then remove the Observable.
    Event/Listener is awesome for multithreading. You could write a Thread and Queue to manage all of your events (Similar to the AWTEventQueue). A class could put an event into the queue to be processed at a later time (or right away) by another thread. The Observer/Observable relationship cannot support this easily.
    The disadvantage is that you have to handle sending an event to each listener manually, where the Observer/Observable handles that on its own.
    In summary, Observer/Observable is a slightly more limitted version of Event/Listener, but it handles notifying the Observer/Listener on its own.

  • Documentation for custom event listeners

    Hi,
    I am searching in portal 8.1 documents for using custom events, coding and registering event listeners, and using them in jsp pages. So far my search has been unsuccessful.
    Can some one let me know where i find this info?
    -thanks

    Hi J, 
    Thanks for your reply.
    I didn’t find the custom work item Web Access control Official documents, but you can refer to the information in these articles(it’s same in TFS 2013):
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-development.aspx
    http://blogs.msdn.com/b/serkani/archive/2012/06/22/work-item-custom-control-development-in-tf-web-access-2012-deployment.aspx
    For how to debug TFS Web Access Extensions, please refer to:
    http://www.alexandervanwynsberghe.be/debugging-tfs-web-access-customizations/.
    For the custom work item Web Access control Official documents, you can
    submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them seriously.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Regarding custom events

    I got some difficulties using custom event listeners.
    What I would like to achieve is pretty simple. With a bunch
    of movable fruits, when dragging one of them(this becomes the
    'active' object) to collide with others(these are the 'inactive
    objects'), I need Flash to tell me who is colliding whom.
    So I setup the Fruit Class, with the ability to dispatch and
    listen the custom event: "EXECUTE_HITTEST". For me the code looks
    good, but there's must be something wrong...
    The full .fla & .as files can be downloaded
    here, and you can
    preview
    the
    snapshot here.
    Thanks in advance.
    It's in the .zip file as well but for your convenience I just
    put the Fruit Class here:
    ================================================================

    your event (and everything else in your class) is specific to
    class instances. no two instances can communicate with each other
    directly.
    you can create another class that contains references to them
    all, but that won't get you any further than using each instance to
    get to the root timeline which then allows access to the others.
    there are several strategies for increasing efficiency of
    hitTests. i like to use a grid.
    imagine the stage divided into a grid. if your objects are
    not changing position with time t, you have an easy task. if they
    change position with time, you'll have more work to do.
    but for each time t, each grid contains a list of objects
    within it. for each time t, each object has a property referencing
    the grid within which it's contained.
    when you want to perform a hittest for a particular object,
    check its grid. then execute a hittest against all objects in that
    grid and the eight (assuming rectangular shaped) surrounding grids.
    there are several strategies for picking a grid size. but, in
    general, you don't want grids to be so small that when you check
    for collisions, you have to check beyond the surrounding 8 plus the
    center grid.

  • Workflow custom event trigger

    Hi experts,
    I have inherited zbus2030 from bus2030 and also i have delegated it. Now i am using custom event zcreated in my workflow. The linkage is active and exists in swetypv transaction. But the event is not getting triggered through VA11 transaction. If i trigger through SWUe transaction,. It is getting triggered.
    Can anyone please guide me what my problem is??

    I think you had to use the Super type Business object and your enhanced event.
    - start the event log using SWELS
    - execute your transaction which should raise the event.
    - use transaktion SWEL to look which event was really raised. Use this event in SWDD (small hat in top bar)  start events.
    - dont forget to activate !
    hope this helps
    regards
    matthias

  • Cannot add a new SHIP_TO address to a exist customer by using Interface

    Hi,
    I am encountered an error when i am using Customer Import Interface to add a new SHIP_TO address to a exist customer,
    the template format of the Excel i used like below: <will insert to table: ra_customers_interface_all>
    Customer Num. | Customer Name | Site Name | Address | Site Use Code | ... ...
    1 | oracle | AA | address1 | BILL_TO |... ...
    1 | oracle | AA | address1 | SHIP_TO |... ...
    1 | oracle | AB | address2 | SHIP_TO |... ...
    I am able to import top 2 rows correctly, as those 2 sites with same Site Name AA;one is BILL_TO site and another one is SHIP_TO address; I tested for few customers, it can run correncty if the BILL_TO address and SHIP_TO address are same.
    But when running import for the third row to add another SHIP_TO address<AB&address2> to the exist customer<1&oracle>,the error raised, it gave error message like below:
    The Customer Number has been used by another customer,import failed !
    I am not too clear about this error,i just want to add a SHIP_TO address to the exist customer<1&oracle> and don't want to create a new customer.
    what should i pay attention to? please give me some tips,,,,,,
    Thanks a lot...
    Rock Lei

    Did you ever get a response or resolution? I have the same issue. Did you get a fix for this? If so, could you share?
    Thanks

  • How to add New Menu Bar using Custom.pll

    Hi All,
    I have developed a form based on the Oracle Apps form.For standard form i have to add one more menu bar in tools menu using custom.pll,i'm using 11.5.8 version.
    So can any one help me in thi regards as i'm new to this custom.pll,How can we add that New menu bar item and how can we open the custom.pll
    where we have to write the code and all the stuff.Which we have to use like wise.
    If any one is having the code on the regarding u can please pass me.
    Help me in this as it is urget to the client.
    Regards
    Siva

    Hi Donny thanks for ur reply,
    As i was new to the Custom.pll,i have opened the custom.pll throught Form Builder.I have found the packages of the Custom.pll,I have to add new Special Menu to it.If u have code can u please give me simple example.
    If I press that Menu I have to open New Form that i have Customized.And also to get values into that form.
    Can u please help me in this give me simple Example.In Which trigger i have to write the code and all the stuff....
    Bit urget
    If any one is having coding can pls send me to my mail id :[email protected]
    Regards
    Siva

  • Create feature for generate new collection having separate content database by using custom coding with C#

    Hi all My self ArunDarly .Iam using share point 2010 ,I want below task solve by  using custom coding with
    C#
    I have one task that create new site collection having separate content database. and that content database site collection limit  should be only one  (it must contain one site collection and note more than one  )
    This total functionality should happen when I am saving one list item (dynamically generate new site collection ) 
    If any body know this Please give me your guidance  
    Thanking  You,
    Arun Darly

    Hey Arun,
    I have done the same job. Hope this code will help you.
    using (SPSite siteCollectionOuter = new SPSite("Any SC url in which u want to create site."))
    SPWebApplication webApp = siteCollectionOuter.WebApplication;
    SPSiteCollection siteCollection = webApp.Sites;
    SPContentDatabase contentDatabase =
    siteCollection.WebApplication.ContentDatabases.Add(ServerName, New Database Name, Admin Name,
    "Admin Password",25,50, 0);
    //Above line will create new content DB
    contentDatabase.Update();
    siteCollection.WebApplication.Update();
    SPSite newSite = contentDatabase.Sites.Add("New SC Url", "SC Title", SC Desctipyion, 1033,
    15, "STS#0", "SC Admin", "Admin", "admin password",
    "User 2", "User NAme", "Password");
    //Ablove line will create new SC in to the Content DB
    //add the upper limit for the site collection
    SPQuota quota;
    quota = new SPQuota {StorageMaximumLevel = 2510220};
    newSite.Quota = quota;
    // And update the site collection and the content database
    newSite.RootWeb.Update();
    contentDatabase.Update();

  • Hi. I'm new to this and thought I already posted this question, but don't see it anywhere. My question: If I get a new iPhone, can I still use the old one like an iPod and download music and apps?

    If I buy a new iphone, can I still use the old one like an ipod with my iMac and download music, videos and apps?

    Absolutely, Yes. I'm sure that many iPhones are "recycled" that way within a family.
    The worst that will happen is that once in a while it will remind you to activate it as a phone. Just ignore the notifications.

  • When I change from "remember History" to "use custom settings" it defaults back to remember history when I close the window. How do I keep my new setting?

    I need 3rd party cookies enabled for a specific site. When I try to save custom settings, it defaults back to remember history and I can't open what I need on the site

    Enabling thirds-party cookies is the default and if there aren't any other changes made then Firefox will show "Remember History"
    Choosing the "Use custom settings for history" setting doesn't make any changes.<br />
    If Firefox shows the "Use custom settings for history" setting then that is an indication that at least one of the history and cookie settings are not the default to make you aware that changes were If all History settings are default then you see "Firefox will: (Never) Remember History" and the custom settings are hidden.<br />

Maybe you are looking for

  • Print outs are blurry when printing from a web page.

    I have sorta a strange problem with my printer that I'm hoping someone might be able to help me with. I have an HP 895 series printer that I got from an website not long ago. I bought (remanufactured) ink cartridges for it because it looked like the

  • MBP quad-core i7 2.3GHz. Magic Mouse delay on external monitor

    MacBook Pro quad-core core i7 2.3GHz. When I connect to external display, magic mouse work sometimes disconnected, cursor moving is not stable with delays. I made all updates, unpair and pair. What is problem?.

  • Changing account in icloud

    Hello.  I did some research for this question but I have not found an answer. Here is my situation. I had an ip4 and I bought an ip5.  I am using the ip4 as a touch and have been using the same user id for icloud to sync both devices. Now I want to c

  • Documents in Crystal report on BW report

    Dear experts, we use Crystal Report on BW reports. During the planning process our user enter some comments as documents within BW system. (f.e. Year, Version, SalesOrg 1 --> comment 1,... Year, Version, SalesOrg n --> comment n) These documents shou

  • Dynamic Columns in FSG

    Hi, We need to create multiple reports using FSG. For some of the reports the rows will be common and columns will change based on a segment in COA. Example: A company having multiple office such as regional office, divisional office and branches. Al