How to pass skinclass for custom component?

Hi guys, I'm moving my main application of my custom component skinClass. Here is my code, but it gave me an error saying "initializer for 'skinType': values of type spark.componets.supportClasses.Skin' cannot be represented in the text. "  I don't know if it is possible to do. Any thoughts? Thank you very much.

hand. MXML

< components: loginPanel id = "loginPanel" horizontalCenter = "33" "-15" = Red

skinType = 'skins. CustomPanel.

loginButtonClick = "loginpanel_loginButtonClickHandler (event)" / >

component loginPanel

script

[Bindable]

public var skinType:Skin;

MXML

< s:Panel cornerRadius = "5".

ID = "loginPanelComp".

"32" = x y = '8 '.

width = "373" height = "200".

title = "sign in".

skinClass = "{skinType}.

>

...............

< / sign >

You try to pass a string to match the value of a class. SkinnableComponent skinClass property is a style.

You must use styles css, or if you want to set this runtime do something like

private var _skinRef: Class;

public function set skinClassRef(value:Class):void

{

_skinClassRef = value;

If (loginPanelComp)

{

loginPanelComp.setStyle (skinClass, skinRef);

}

}

C

Tags: Flex

Similar Questions

  • Support of Inline actionscript for custom component events

    Is it possible to support actionscript inline for custom component events?

    For example, let's say I have a custom component that distributes a refreshed event called. Is this possible via mxml to bind the event to actionscript inline? You can do this with components that come with Flex 3, but did not do with the events of custom component.

    Something like: < com:custom_component id = "cus1" refresh = "{Alert.show ("the refreshed component!") ;}}" "/ >

    You need create metadata for the event in order so that it can be accessed online, when you declare the custom component:

  • Creation_Complete event not pulling for custom component

    I have a component instantiated in Actionscript:

    var chartControl:ChartControls = new ChartControls();

    chartControl.addEventListener (FlexEvent.CREATION_COMPLETE, initializeChartPanel);

    ChartControls is a VBox that has also a creationComplete method:

    < mx:VBox ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "creationComplete ="init ()">

    public Function init():void {}

    slider.setPanel (chartPanel);

    slider.setThumbValueAt(0,initWid);

    var evt:SliderEvent = new SliderEvent (SliderEvent.CHANGE,false,false, 0, initWid);

    slider.dispatchEvent (evt);

    }

    Could only be originally does not fire?  I've never had a problem for events to trigger, but this is the first time I tried it with a custom component.  How can I get this to work?

    The cause as possible, I do not see where you add the custom component instance:

    this.addChild (chartControl);

    If this post answers your question or assistance, please mark it as such.

  • How by-pass iCloud for photos of digital devices?

    I recently upgraded to an iMac 27 "new and I want to spend all my photos my old computer.  My old system was a Mac Mini that I never used iCloud on because the internal drive was small so I stored all my pictures on an external hard drive.  A majority of these photos were taken with my digital camera.  I know that you only have 5 GB of space free iCloud and my photos are much more than that.

    How can I keep my photos on my computer without them going to iCloud?  I use iCloud for pictures taken with my iPhone and my iPad so I don't want to disable this feature.

    Go on your Mac in Photos > Preferences > iCloud. There you can "download for Mac originals" where they will be offline. I hope this helps!

  • pass information to custom component

    Hello

    I'm new to BB10 apps development and its environment.

    I use the latest IDE with 10.3 SDK in cascade mode.

    I want to pass information to main.qml to another qml file.

    The scenario is like this.

    I have the second page that opens when a file is chosen by a filepicker.

    onFileSelected: {
                  selectedFile = selectedFiles[0]
                  var myPage = pageDefinition.createObject()
                  navigationPane.push(myPage)
             }
    

    second page is attachedobjects as:

    attachedObjects: [
        ComponentDefinition {
            id: pageDefinition
            source: "asset:///secondpage.qml"
        }
    ]
    

    I want to use info in "selectedFile" on the second page. How can I do?

    Thank you!

    TRY THIS

    onFileSelected: {
                  selectedFile = selectedFiles[0]
                  var myPage = pageDefinition.createObject()              myPage.fs = selectedFile; // new line
                  navigationPane.push(myPage)
             }
    

    second page is attachedobjects as:

    attachedObjects: [
        ComponentDefinition {
            id: pageDefinition
            source: Page{            id: secondPage            property alias fs: fileinfo.text  // create an alias            Container{                 Label{                     id: fileinfo                     //this field will be populated width the name after you                     //create and push the new page onto your nav                     text: ""                  }            }        }
        }
    ]
    
  • How to pass through for support staff

    I can't go to the support team. All my attempts end with asking me to provide more information, and then redirected to useful pages that do not respond to my problem and then I find myself on a sort of loop by which it happens everywhere again. How actually to talk to someone?

    Hello

    Could you please share the query you have?

    Also, in order to get in touch with the help, please visit the link below:

    Contact the customer service

    Hope this helps!

  • How to recover customizations for custom Applications

    Hello

    We are accustomed to deveolped OAF Pages and those who are enrolled in the responsibilities of custom Application.

    Now when we do customizations on these pages OFA custom personalization documents are not generated.

    Functional administrator of navigation-> personalization-> Import/Export

    as I enter the Application name XXAPL Custom Application and click go it throws error
      Error 
     oracle.adf.mds.exception.MDSException: "/oracle/apps/xxapl" not found in repository.
    can anyone suggest why the customization documents are not seen where exactly these documents are generated


    Krishna

    Krishna

    In this path with the /CustomTop test. Do not type anything in the scope, and then click the Go button.

    I even looked at my end and I am able to see all my personlizations.

    I hope that helps!

    Thank you
    AJ

  • Question about the use of the custom component class define what declarative component

    12.1.3 jdev

    I'm trying to define a declarative component with my custom component class.

    This is the code for my component jsf declarative. I'm trying to use the label on selectManyListbox attribute to pass queryClass for my component class name. It does not work. I also try to use f: attribute to my component class. It does not work too. Question 1: how to move my declarative component attribute to my class of component?

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "namingp1" simple = "true" label = "#{attrs.queryClass}" "

    ' autoSubmit Binding = "#{dropListComp.selectManyListBox}" = "true" valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < f: attribute name = "queryClass" value = "#{attrs.queryClass}" / >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "sl_2" simple = "true" label = "#{attrs.queryClass} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    That's how I try to retrieve the label or f: attribute queryClass in my component class. I get null for both directions.

    {} public void setSelectManyListBox (RichSelectManyListbox selectManyListBox)
    this.selectManyListBox = selectManyListBox;
    If (this.selectManyListBox.getChildCount () == 0) {}
    queryClass = (String) this.selectManyListBox.getLabel ();
    System.out.println (".. queryClass of the label..." + queryClass);
    If (queryClass is nothing)
    {
    queryClass = (String) this.selectManyListBox.getAttributes () .get ("queryClass");
    System.out.println (".. queryClass of attr..." + queryClass);
    }
    If (queryClass is nothing)
    queryClass = "glog.server.query.powerdata.InvolvedPartyQualQuery";
    this.selectManyListBox.getChildren () .addAll (buildDropListSelectItems (queryClass));
    }
    }

    Thank you.

    Hello

    If your declarative component has a defined class of request attribute then #{attrs.name_of_attribute} called from Java should be able to solve

    Frank

  • Pass a parameter for the custom component - get null

    Main MXML (part of the code):

    < s:Application

    "" xmlns:ns1 = "*".

    creationComplete = "init (); >

    import MyComponent;

    private function init (): void {}

    var myArray:Array is ["FFF", "TT", "RRR"];.

    myComp.width = 200;

    myComp.height = 200;

    myComp.getArray = myArray;

    myContainer.rawChildren.addChild (myComp);

    }

    < fx:Declarations >

    < ns1:MyComponent id = "myComp" x = "0" y = "0" / >

    < / fx:Declarations >

    custom component:

    package 
    {
              public var getArray:Array;
    public class MyComponent extends Sprite { } trace (getArray); trace null
    }
    }

    What is myContainer?

    I have a working version with my container as UICOmponent inside the hand.

    SerializableAttribute public class MyComp extends Sprite

    {

    private var _getArray:Array;

    public void MyComp()

    {

    }

    public function get getArray (): Array

    {

    Return _getArray;

    }

    public function set getArray(value:Array):void

    {

    trace ("setter", value);

    _getArray = value;

    }

    }

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    "" xmlns:NS1 = "*".

    minWidth = "955" = "600" minHeight

    creationComplete = "init (); » >

    private function init (): void {}

    var myArray:Array is ["FFF", "TT", "RRR"];.

    myComp.width = 200;

    myComp.height = 200;

    myComp.getArray = myArray;

    myContainer.addChild (myComp);

    }

    ]]>

    Not sure whether what you are after but it traces:

    Setter FFF TTT, RRR

    Why do you add to rawChildren?

    C

  • listening in the main application for event from custom component

    I have a component that custom im using an identifier.  I watch videos and tutorials on how to pass variables between applications and custom components. the problem im having is that tutorials or explanation you put the event on the custom component and then it refers to a function in the main application.

    Is a fair way to listen on the main application at the event begins? Ive been tempting for hours and I know there must be something im missing may not be so difficult. any help, I would be really grateful.

    Thank you

    Miguel

    Hello

    The following example has been done as a simple demonstration of States, but the connection (state1) component, is a simple custom event which is sent by the ok button on the connection, the event could be extended to transfer the information to connect to the main application, in this case because the login screen is always public vars or fields of the box would be available for the main application anyway.

    http://gumbo.flashhub.NET/Wizard/ source included

    David.

  • Looking for MC1496 - any custom component library?

    Hey all,.

    I'm trying to simulate the modulator/demodulator signal MC1496 chip. It seems that this is not standard with Multisim. I was wondering if there was like a library of custom components that the community has put in place (or something of the sort).

    I have the part for LTSPICE but (seeing as how I use Multisim for a grand total of half an hour) am not completely confident in my abilities to make imported and put in place correctly. If someone else more experienced with Multisim, I have already made it would be infinitely preferable.

    Thank you very much.

    As far as I can tell here, the problem is the mapping of the spindle between the symbol and the model. The .subckt uses only the 10 pins, but the symbol has 14. The symbol for the model mapping pin, you have the default assignment - all 14 pins symbol assigned to the nodes of the model.

    Based on the .subckt line and the way you have the component cable for the schema, it looks like pins 7, 9, 11 and 13 are not used. You will need for those like 'Not connected' (NC) in the mapping table, correct the remaining pins (PIN symbol 8 will actually be the 7th model node, pin 10 is the 8th node, pin 12 9th node and PIN 14 will be the 10th node - ideally this subcircuit uses the pins in order, it just jumps).

    That should fix the mistake of simulation. The error was just because he was trying to use 14 knots for a .subckt of 10 knots. (u1_open_11 is just the name that has been attributed to the simulation of pin 11 node because the mapping of the model says to use it, but nothing connected).

  • How to manage the timestamp custom scheduled task, written for target recognition

    Hello

    I wrote a custom users reconciile system scheduled task target... but whenever I run the scheduled task to target Recon... it generates the Recon. events for all users.

    How to handle this... How to pass the timestamp value to custom target Recon scheduled task.

    Thank you
    Patricia

    That is why ignoreEvent() API is provided in the interface of the IOM.

    But he does this method comapare ignoreEvent() values with IOM user profile user or users process form values?
    Yes, it works for both. The input of this API argument is the name of the resource object and the Office of receiver can be approved / target you created. SO for your resource target reconciliation, it works for you.

  • How to write a custom component

    I have 3 quick questions on How to write a component. Here is the code in my main file I want to write as a component:

    buttonCanvas = new Toile;

    buttonCanvas.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler)

    buttonCanvas.addEventListener (FlexEvent.CREATION_COMPLETE, setcanvasPosition)

    buttonCanvas.width = 300;

    buttonCanvas.height = 30;

    if (i%2==0){

    buttonCanvas.setStyle ("styleName" "style1");

    }else{

    buttonCanvas.setStyle ("styleName" "style2");

    }


    This is the component:


    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Canvas ' http://www.Adobe.com/2006/MXML "creationComplete ="init ()">
    < mx:Script >
    <! [CDATA]
    public var i: int
    public void init (): void {}
    trace ("i =" + i)
    This.Width = 300;
    This.Height = 30;
    If (i %2 == 0) {}
    this.setStyle ('styleName', 'style1');
    } else {}
    this.setStyle ('styleName', 'style2');
    }
    this.addEventListener (MouseEvent.MOUSE_DOWN
    }
    []] >
    < / mx:Script >
    < / mx:Canvas >

    Question 1: What is the best way to pass the value of the variable 'i' to the compoonent? What I have to write:

    buttonCanvas.i = i;
    or can I pass the argument to the component as follows, and if so, how I capture the value of the component? :

    buttonCanvas = new ButtonCanvas (i);


    Question 2: Where is the best place to put the listeners? Should I put them in the main file:

    buttonCanvas.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler)
    buttonCanvas.addEventListener (FlexEvent.CREATION_COMPLETE, setcanvasPosition)
    or should I put them in the component like this:

    this.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler)

    Question 3:If I put them in the component, how to point to the function named "buttonMouseDownHandler" in the main file?

    Thanks for your time!

    Hi SiHoop,

    Well come to your question, here is the solution:

    Question 1: What is the best way to pass the value of the variable 'i' to the compoonent? What I have to write:

    buttonCanvas.i = i;
    or can I pass the argument to the component as follows, and if so, how I capture the value of the component? :

    buttonCanvas = new ButtonCanvas (i);

    (A) you can use the method buttonCanvas.i = i; but not buttonCanvas = ButtonCanvas (i) again because this corresponds to an instantiation of the constructor, and you cannot specify a constructor explicitly for your component as the Flex compiler automatically provides at the time of the compilation;

    Using the second approach, you can pass that I appreciate, but you can use this syntax to get the value I have...

    buttonCanvas = new ButtonCanvas();

    buttonCanvas ["i"] = i;

    Question 2: Where is the best place to put the listeners? Should I put them in the main file:

    buttonCanvas.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler)
    buttonCanvas.addEventListener (FlexEvent.CREATION_COMPLETE, setcanvasPo)
    or should I put them in the component like this:

    this.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler)

    (A) it depends purely on your condition if you want to listen to these events with in your component and make somechanges in your component itself and not to other elements, then you can set headphones for events in the same component.

    But if you want to know or communicate with other components in your component event has occurred then define you the eventListeners in other components as below and update of data or make changes in the other component accordingly...

    buttonCanvas = new ButtonCanvas();

    buttonCanvas.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler);
    buttonCanvas.addEventListener (FlexEvent.CREATION_COMPLETE, setcanvasPosition);

    Question 3: if I put them in the component, how to point to the function named "buttonMouseDownHandler" in the main file?

    (A) If you put the eventListeners with the component and if you want to point to the function named "buttonMouseDownHandler" in the main file, then you must do the following:

    In your component

    this.addEventListener (MouseEvent.MOUSE_DOWN, buttonMouseDownHandler);

    private void buttonMouseDownHandler(event:MouseEvent)

    {

    Here, you need to send a custim event to warn other components this thi event has been dispatched

    this.dispatchEvent (new Event ("buttonMouseDownEvent"));

    }

    Now in your main mxml, you have to listen to this event, as shown below:

    buttonCanvas = new ButtonCanvas();

    buttonCanvas.addEventListener ("buttonMouseDownEvent", buttonMouseDownHandler);
    buttonCanvas.addEventListener (FlexEvent.CREATION_COMPLETE, setcanvasPosition);

     

    private void buttonMouseDownHandler(event:MouseEvent)

    {

    It is the function in your main mxml file

    }

    Hope you understand most... If you have any doubts do let me know...

    Thank you

    Jean Claude

  • How can I associate with the component States custom content scroll buttons?

    Hi, I need help I have a deadline to meet in the next few weeks and im stuck!

    Basically, what I did is I made a content scrolling lists, containing about 10 products in each of them, my plan was to make a button for each product so that users could click on this product and bring them to a new page containing more detailed information on this product. When they have finished looking at this product they can click a button to return to the list that they were previously. However I can't do just a State nine for each product there is a limit to 20 States, and I'll need about 50 of them.

    So, what I read, I will need to create custom components. the only problem with that is that I can't link to the component on a different State personal main scenario (I get no option to link to the custom component States).

    If I put the image of the product detailed in the scroll pane, that I can't make a link to it, however, he's inside the scrolling content and it just scrolls autour and stuff that is not what I want. as it gives an appearance of disorder.

    -Basically, I need from the buttons in the drop-down list, a link to a more detailed page for this product. Then be able to go back to the list button.

    If anyone has any input on how to do this, please help me. Start panic now, as this must be finished before September: s

    BTW, I'm happy to share my .fxp which helps produce.

    Thank you, hoping for some useful answers on this topic

    -Tom

    Hi Tom,

    Add this back here to share my wire with the community.

    Brought together a quick .fxp based on the section "product" of your project.

    Take a look at how the product lists are linking in the pages of detail of product within their custom components.

    Using this model, you should be able to expand outside the States of infinite product details.  If a particular area has more than the maximum allowed States, just start a new custom component (part 2 of this section of product).

    Let me know if you have any questions. Hope that it affects you on a path to get your complete project.  It is looking nice.

    Tanya

  • How to import the custom component exported from flash cs3

    Hello

    I exported a custom component that I designed in flash cs3 as a SWC file. How to import it in my project flex and how to use it?

    Sorry if this is a stupid question. I'm new to flex. Thank you.

    You must add the swc file in your path of the project. Please check the following URL for more information about how to import Flash components in Flex project.
    http://www.Adobe.com/devnet/flash/articles/flex_component_workflow.html

    I hope this helps.

Maybe you are looking for