Can't receive events with a custom component

I am using the MDIPanel created by Christophe Coenraets in
the Sales Builder demo code in Flex 2. However, this custom
component (MDIPanel) doesn't seem to receive regular events other
than the custom events. The MDI Panel source code is included as
entails. Since it extends Panel, I assume that it would get all
regular events coming in but it is not. For example, I can't use
resource bundle to change the label text or I can't seem to get
dataprovider to work within a datagrid inside the MDIPanel. Any
ideas on what's happening here?
package
import mx.core.UIComponent;
import flash.events.MouseEvent;
import flash.events.Event;
import mx.controls.Button;
import mx.events.ResizeEvent;
import flash.display.Graphics;
import mx.managers.CursorManager;
import mx.containers.Panel;
import mx.controls.Image;
import mx.controls.Label;
import mx.states.SetStyle;
public class MDIPanel extends Panel
// Constants for MDI panel event names
public static var MINIMIZE:String = "minimize";
public static var MAXIMIZE:String = "maximize";
public static var CLOSE:String = "close";
public static var RESTORE:String = "restore";

I'm curious to know if this is possible as well (or really the question should be, is there a non-hackish way to get a reference to the skin instance)?
When I've needed to do something like this, I've always just dispatched an event off a skin part from within my skin. IE.
this.contentGroup.dispatchEvent(...)
Then I would just listen for the event on the skin part.
This is a bit hackish, so it would be nice if someone could share a better solution. I've been meaning to look into it, just never have been able to justify the time looking for a better solution.

Similar Messages

  • Can you dispatch events from a custom component skin?

    If so, how?
    Thanks~Benny

    I'm curious to know if this is possible as well (or really the question should be, is there a non-hackish way to get a reference to the skin instance)?
    When I've needed to do something like this, I've always just dispatched an event off a skin part from within my skin. IE.
    this.contentGroup.dispatchEvent(...)
    Then I would just listen for the event on the skin part.
    This is a bit hackish, so it would be nice if someone could share a better solution. I've been meaning to look into it, just never have been able to justify the time looking for a better solution.

  • Can we replace OracleSytemUser with a custom user in ldap?

    HI,
    We have installed soa 11g and configured Microsoft AD as ldap provider.
    I have couple of questions around this.
    1. Can we remove the default embedded authenticator totally? If yes what are the things we should keep in mind?
    2. We don't want hard coded users like "OracleSystemUser". Can we replace OracleSystemUser with our custom user, maybe assinging our user to OracleSystemGroup in our ldap.
    Would appreciate any help.
    Thanks
    Manish

    There are Office-type apps available for iPad.
    Skype is also available for iPad.
    Whether you, specifically, can completely replace a laptop with an iPad depends on what you use your laptop for. The iPad is not designed to completely replace a laptop. There are many things a laptop can do that an iPad cannot. Whether those limitations are an issue for you, depends on your laptop usage.

  • Listening in main application for event coming from custom component

    I have a custom component that im using for a login.  i watch videos and tutorials on how to pass variables between custom components and application. the problem im having is that must tutorials or explanation have you put the event on the custom component and then it refers to some function within the main app.
    Is there a way to just listen on the main app when that event kicks off? ive been trying for hours and i know there has to be something im missing it cant be that hard. any help i would really appreciate.
    Thanks
    Miguel

    Sounds like you're asking about addEventListener():
         <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
                        comp.addEventListener("test", testHandler);
                   private function testHandler(e:Event):void {
                        trace(e);
              ]]>
         </fx:Script>
         <local:TestComponent id="comp"/>
    Add an event listener on your custom component (first string is the 'type' of the event).

  • Can't create events with times between 10:01 and 19:59

    I've recently updated to OSX 10.4.9, and now can't create events with times that start with a '1'. This only seems to be a problem on the day British Summer Time begins on 25 March.
    I usually create my events in the month view, and input the start and end times by clicking in the time boxes and typing in the hours and minutes. However when I try to put in a start time of, say, 11:00, it puts in 21:00 instead. The only way around this seems to be to put in a time it will accept, like 09:00, and using the arrow keys to move it to the time I want. Or creating the events in the day view and clicking on the start time there.
    Any ideas?

    Looks like you have found a wee bug. I can replicate it. You could report it though OS X Feedback or better though ADC, but for the latter you have to register first.
    I usually create events by double-clicking in week view; often this gets the start time right, but if not then edit the start time in the info pane. Your bug is there with events created in day and week views too.
    AK

  • Stumped with a custom component. Can anyone help?

    I'm working on a component that I would like to have 3 dream levels plus limbo.
    Oh wait, sorry...I'm mixed up. Though I do feel my issue is equally contrived and at times, frustrating to wrap my head around.
    What I REALLY would like, is to make a custom component that does indeed have 3 levels, and I'm having issues with mouseover. My goal, Is to have a menu of several items, each a custom component. When a component is clicked, it "opens" into a similar menu of additional components, which in turn can be hovered over to display an image. That seems to be the easy part.
    I have created each second level item (blue), that upon mouseover displays an image (green). I have combined all of those into a single custom component, (red) and made individual states for the overall component that 1) displays ONLY the red button and 2) displays the blue components with the red component disabled.
    What I can't figure out is how to make ONLY the (red) item appear for mouseover and click when in the top state. What is happening at the moment is that as far as the browser is concerned, the entire component is the mouseover area. This makes it impossible to put multiple (red) items next to each other.
    I've tried making the (blue) and (green) components hidden and/or disabled, but it does not seem to effect the problem. I can't make those items not "accept mouseover" because the (blue) items are in turn supposed to be buttons used to display the end (green) image.
    Does anyone know what I can do to solve this problem? I hope I was able to describe the situation well enough. Like I said....it's kind of stupid and contrived.

    WELL. After typing that whole deal out, I seem to have come across the solution myself, and it's ridiculously simple, and makes me feel the same for not figuring it out right away.
    Much like everything else in Catalyst, the "accepts mouse events" can be changed for the same object in different states. So what you do is uncheck the "accepts..." box for each item while in the top state, and check it once more in the lower states. Also, the "Transparency accepts mouse" needs to be unchecked.
    Simple.

  • Using itemCreationPolicy with a custom component

    I'm working on a project where the users need to be able to have a 'filtered' view of one of the edit dialogs. I'm using view states to control which of the input fields show up for each view. The 'save' logic is the same for both states, so I still need to be able to pull data for the inputs even if they are not currently displayed. I tried setting itemCreationPolicy to immediate with no success. Some of the inputs were getting created but the initial values were not being set. The issue seems to be that the input component (an extended version of DropDownList) defers setting the selected value until the commitProperties() method. Since the inpit isn't actually being shown, the commitProperties() method is never getting called and the value is never being set.
    Can anyone suggest a workaround for this issue? The only thing I can think of would be to use includeInLayout and visible to show/hide the inputs, but that is going to get really messy since I would have to apply it to every input and the FormItem components that enclose them.

    Jasmin,
    Is your class included in the custom component?
    Yes, It is a annotated entity class,
    When creating sessionFactory it is not loading the class.
    i'm using flowing code block for creating sessionFactory,
    factory =
    new AnnotationConfiguration().addAnnotatedClass(dao.entity.UserEntity.
    class).setProperty(
    "hibernate.dialect",m_dialect ).setProperty(
    "hibernate.connection.driver_class", m_driverClass).setProperty(
    "hibernate.connection.url", m_connectionUrl ).setProperty(
    "hibernate.connection.username",m_userName).setProperty(
    "hibernate.connection.password", m_password).setProperty(
    "hibernate.hbm2ddl.auto", m_hbmTodll ).setProperty(
    "current_session_context_class",m_contextClass ).configure(resource).buildSessionFactory();
    Is the jar referenced in the class patch section of the component.xml?
    Yes , I have tried for this approch too , but class is entity class is not loaded.

  • How to get an event both in custom component and into its instance

    I have a custom component that extends a Jtree
    I want to know when a node is clicked both , into my component and after into the component sited into Jpanel
    now, I can only detect it into the component, but I dont know how to detect it at the component I have in my Jpanel
    I have 'addTreeSelectionListener' in both places ...
    xxxxx.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
    public void valueChanged(javax.swing.event.TreeSelectionEvent e) { .....
    Any help ?
    Thanks

    tonnot wrote:
    Thank you.
    I think that a good answer can be ' Revise your code, because there must be a problem' Well, that's the life of a programmer. If you want to post an SSCCE, I'm sure somebody can help if you get stuck.
    And ...
    Why are you extending JTree? I'd bet you shouldn't be.Why not ? ....
    Why SUN develop the 'extends' functionality ? You should use extends if you're changing the behavior of an existing class. An example of this is extending JPanel and overriding the paintComponent() method to do some custom painting.
    You should not use extends if you just need an instance of an existing class. An example of this is extending JFrame instead of simply creating a JFrame instance.
    Without seeing your code, I can't be sure you're misusing extends. But many people do.
    Here's an example.
    Bad:
    public class MyProgram extends JFrame{
       public MyProgram(){
          setSize(200, 200);
          setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }Better:
    public class MyProgram{
       public MyProgram(){
          JFrame frame = new JFrame();
          frame.setSize(200, 200);
          frame.setVisible(true);
       public static void main(String [] args){
          new MyProgram();
    }

  • Handling Event of a custom component

    Hi,
    I created a TwoStateButton from an AbstractButton. As long as it has two states, There's a repaint() occuring when the user clicks on it and it is written within the component.
    I want to also handle the click event from outside the component (actionPerformed, something like that), how can I do this?
    I am relatively new to Java but for God's sake don't answer "Use a JtoggleButton instead". My main goal is to understand the component creation and event handling in Java.
    Thanks,
    Vince D.

    Forget about it, I discovered it myself... Sorry for interrupting
    Vince D.

  • Can't receive events from outlook 2000

    When some people send me invites to meetings from outlook 2000 on a PC, I can drag the event to iCal and it installs fine. When others do it, it will not be added to iCal or do anything at all except cause me problems. Has anyone else had this problem. I assume it is something that is set up wrong on the users computer. But I don't know what or even have a clue. Do you?
    The Macs are using OSX 10.4.7. Not sure on the PC's as there are 2000 & XP machines everywhere.
    Hope you can help,
    Tim

    Problem is with
    the pc, or whom ever is providing her mail service
    or
    do you have your mail provider doing any spam filtering for you
    that would remove spam before delivery to your computer?
    Does your isp give you access to webmail.
    Send from there.
    Do her messages arrive?

  • 3GS can't receive texts with iOS 5?

    So a couple of days ago I made the mistake of updating my iPhone 3GS to iOS 5. I can use everything else like normal, including the phone and I can send texts like normal but can't receive any, which is awful. Actually, I can only receive texts from people with an iPhone with iOS 5 installed. I can't see how or why this would happen. I know there's the new iMessage with the update, so I guess maybe it's not even letting me get texts at all, just messages from my friends through that? Has anyone else encountered this problem? I have no idea what to do. I've reset it multiple times as well as powered it on and off. I haven't restored it but I don't really want to lose all of my texts and whatnot. Plus I don't see why that would make much of a difference anyways. Is there something I can turn off or enable? Pleaseee help, I'm desperate. Thanks!

    you aren't receiving text messages because of a recent change in the way ios5 allocates space for the messages app.  It used to be that the messages app could store as many messages in memory as you had space, but with ios5, they have drastically reduced this "unlimited" storage amount to a mere 15MB (most likely to keep the messages app from slowing up).  Depending on how many MMS messages you've sent/received, this is anywhere between 50k and 75k messages. 
    Moral of the story is you will have to delete a good amount of your text messages (else restore and setup your device as a new device and not restore from backup).  If you're like me and don't really want to part ways with all the memories you have in SMS form on your iphone, you can try a utility called PhoneView for mac, that allows you to see and archive all your text messages to your computer.  This is only available for mac but there is a competent PC version called TouchCopy11 that you could use as well.  Bad news is none of these are free.  If you don't really care about saving your SMS messages from the past, then by all means delete all the ones you don't need and you'll see you're device will begin receiving texts again.
    Hope this helps.
    refer: http://support.apple.com/kb/TS1498?viewlocale=en_US

  • Can´t receive eMail with Edge

    Hi,
    I have a strange problem: working with EDGE, it is impossible to receive eMails (.mac / yahoo). Sending mails works fine. Also receiving mails with WLan works.
    This happend when I upgraded from 2.0 to 2.0.1.
    Any Ideas?
    Thx
    René

    Delete that e-mail account and re-add it if you are able to. Then see if the problem has been resolved.
    Sometimes, this may be due to the incoming server error and should be fixed by the e-mail service provider.

  • How can i receive event in calendar with joined files or note from outlook

    When i create an event in outlook 2010 with notes and joined files , i receive then event but no notes and no files .
    Do you have any ideas ?
    thanks.

    When the iPad is connected to your computer's iTunes, then on the device's Info tab you should be able to select where to sycn a calendar from - from the iPad manual :
    You can sync calendars from applications such as iCal on a Mac, or from Microsoft Outlook 2003, 2007, or 2010 on a PC. (On a Mac, you can sync calendars with multiple applications. On a PC, you can sync calendars with only one application at a time.)

  • OnMouseClicked event with overlapping custom nodes

    I'm having a bit of an issue with overlapping nodes.
    Essentially what I have are rectangular shaped custom nodes which, when an onMouseEntered event occurs, has an extended set of icons that fade in that are located on the above top right portion of the node. If I may use ASCII to illustrate :)
    X
    [ MyCustomNode ]
    +(Blank spaces don't work too well so let's pretend the X is sitting on top of the node on the upper left corner)+
    The X is an icon that simply deletes the node.
    The problem occurs when the nodes are overlapping (i.e. one above the other, where the X icon is overlapping with the node above it). When I click on the X, the onMouseClicked event fires for the node above.
    I've tried mucking around with disabling the node and using toFront() and toBack() as well, but no luck.
    Now that I think about it (I'm sure this is related), I've noticed issues with text/labels interfering with the "click-ability" of an object that it is overlapping. Since the text generally occupies little pixels in terms of the width of the actual text, it just seems to only sometimes interfere with onMouseClicked events - if you click on the right spot that is. If you disable the node, do the pixels the text/label occupy become "dead"? as in that space cannot be used to initiate the onMouseClicked event of an object behind the text? Make sense?
    Any ideas?

    I've put up a picture for your reference: [http://imagebin.ca/view/Lj9C7q.html]
    How it works is that each node can be clicked on, thus increasing its opacity to 1.0. Once "selected" there is a mouse enter/exit event for that particular node which allows the X icon to fade in/out to delete the node.
    What's happening is that if you click on the X of the selected node, the node directly above (1432-1481) is being selected, although the deletion of the original node works fine.
    Also the onMouseEnter event is firing for the "1432-1481" node if you hover over the X. As you can tell in the screenshot, the opacity is increased if you hover over an unselected node. You can see that the "1432-1481" is slightly brighter than the other nodes above it. Obviously the cursor is missing from the screenshot but it should make sense.

  • Can I restore events with titles from time machine?

    I need to restore 2 events back into iphoto. I am using time machine as my backup. When I restore the event it imports the photos from that event back into iphoto but puts them into an "untitled event".
    Is there a way to restore events including the title of the event or do I have to go by memory on what all the events were titled?
    It would seem that there would be a way to do this. My concern is if I ever have to restore a large number of events from time machine it would be nearly impossible to remember what each event is titled.
    Thank you in advance
    Message was edited by: Thomas Moccia

    Thomas:
    No, you can't do it that way. There is another way but is rather involved and time consuming and will require the paid version of iPhoto Library Manager. Here's how:
    1 - restore the entire library with the events you want and keep the current one.
    2 - rename the restored library to iPhoto Library Restored.
    3 - rename the original library back to just iPhoto Library.
    4 - open your current library and then close.
    5 - open iPLM and get both libraries loaded in the left hand pane.
    6 - copy the event from the restored library to the operation library like this.
    That will keep your keywords, titles and comments and Event title intact.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

Maybe you are looking for

  • What is difference between SAP R3 And SAP IS Mills Product

    HI Friends What is difference between SAP R3 And SAP IS Mills Product What are the futures are availables in IS MIlls Regards

  • Setting up a PIX-PIX VPN with Dynamic and Static IP's

    Hey everyone.. I'm recently working to deploy two PIx-506E devices at a remote site and at my home. I want to be able to connect these together and eventually create a spoke and hub method of deployment to keep several of the places I manage separate

  • TS3212 i had to reinstall iTunes and it will not install

    i had to reinstall iTunes and it will not install it keep on relling back

  • WPA with mac and pc

    I just got the buffalo WHR-HP-G54 router, amd it is great, easy to install and set up plus works much better than my old Linksys with a stronger signal. Is this normal..I set it up using Buffalo's client manager, encrypted with WPA, the desktop loads

  • Cannot call pacman through schroot

    I have a 32-bit chroot setup which I use for building i686 packages.  Ever since upgrading to pacman4, I am unable to call pacman through the shcroot command: Example: $ schroot -p -- sudo pacman -S libnetfilter_queue resolving dependencies... lookin