Function Super Gaussian

Hello, everyone,

I have the super Gaussian beam profile, it is attached. I would like to hold a kind of function on it.

Maybe someone knows a super Gaussian function?

See you soon,.

SIMAS

You can check this document:

http://SLAC.Stanford.edu/cgi-wrap/getDoc/SLAC-pub-6684.PDF

See you soon

Edgar

Tags: NI Software

Similar Questions

  • 625 x noise specification

    I have a card PCI-6255 that I intend to use for certain sensitive measures.

    I'm trying to put together a budget-to-end error and I have a few questions.

    My model is in terms of number of analog-to-digital converter (also known as the LSB in your datasheet).

    In the table of absolute precision on page 5 of the 615 x standard OR I see a column called random noise, (uVrms).

    I think I understand the residual gain error, offset error residual and associated with it and the INL error, but random noise is confusing to me.

    Here's why: on the +/-2V of type range, the random noise is 16 uV.  On this beach, the resolution of the ADC is 6.1 uV so random noise is about 2.6LSB

    If I look at the +/-5V Beach, I see a random noise of 140uV.  On this beach, the resolution of the ADC is 305uV so random noise is well under a LSB.

    Therefore, in the budget of my mistake, I can use "1 LSB" for noise random when on the beach of 5V, but I have to use LSB '2.6' or '3' when the type 2V range.

    I expect a signal of about 150 mV riding on a 2, 5V CC.  I was worried, I might need to compensate the signal (remove the 2, 5V dc) in order to use the +/-gamme.2 volts to get the best resolution.  Also, I thought that I would get better sound performance too.  In looking at the figures here, but looks like I'd be better off using the +/-5V range (assuming that there is enough resolution) because the readings have less noise counties (even if it's more noise volts).

    I can explain the error of Gain and Offset error by injecting known signals and making a "correction of the software.  Not sure, but I think I can correct for the INL also if I use a 2nd or 3rd order polynomial.  It is the random noise, I have problems understanding.

    Here's the question: what is the random noise in table AI accuracy for 625 x boards?  Can you give an example of how NEITHER could have measured it?

    Secondly, note 2 says "sensitivity is the smallest voltage change this canbe found. It is a function of the noise. "He measured with a signal to noise ratio of '1' or '2' or some other standard, or is it a calculated value?

    Thank you

    MG

    The function of Gaussian Distribution is often used to describe the noise. Random noise spec'd in the table of precision is a gap type distribution of probability of noise and was probably calculated using statistical analysis. That's why the uncertainty of noise takes into account a 3 coverage factor that represents the largest part of the distribution.

    With respect, the specification of sensitivity, this requires a more detailed explanation, but it is essentially an industrial standard that takes into account more statistical analysis on a signal when awarded with noise. According to me, the mix is a compoenent of this measure.

  • Control number of the howto of calls to a PLSQL inside a VORowImpl

    Hello experts!

    I am facing a problem of performance that I coded a calling a PLSQL procedure to calculate the value of an attribute to the get VORowImpl method.

    I noticed that the method is executed several times for each record. That I currently have 13 records and 56 calls are connected to the PLSQL (4 calls per type of registration, and in both cases, 6 calls!)

    Is it possible to control the PLSQL procedure is called only once for each record in the table?

    BTW, I use 11.1.1.5

    Best regards
    Jose.

    For example, createRowFromResultSet()?

    Create the ViewObjectImpl class, createRowFromResultSet() substitution, inside this method invoke functionality (super.createRowFromResultSet ()) by default and save the line created in a variable, call your plsql function, complete attribute and return created and initialized row.

    Dario

  • AS3 base how to pass a method correctly?

    Hello.

    I'll build a play on words. I did a class array that will contain all the functions for the letters that appear in the game of words. (This class is related to my class file main .as).

    I did a constructor function with a list of all the things I want to do (to define their own functions sup). For now I just placed trace ("this function") in the method until I write the real method then. The first statement works and I get the trace in the output area. But for the rest, I get this error message:

    1180: call to a method may not set initCheckIfLetterIsCorrect.//or init whatever education is for all 5 of them.

    What I am doing wrong?

    Thank you

    Images of recommended

    Here is my code so far:

    package

    {

    import //all

    SerializableAttribute public class extends MovieClip LetterArray

    {

    private var _stage:Stage;

    public void LetterArray(s:Stage)

    {

    several = stage;

    initLetters();

    initLetterWasClickedOn();

    initCheckIfLetterIsCorrect();

    initInGameAnimation();

    initRemoveLetterChilren();

    initPointsGiven();

    }

    public function initLetters (): void

    {

    trace ("Initiation has started");

    This one works. The rest are not

    }

    public void LetterWasClickedOn (): void

    {

    trace ("letter has been clicked on");

    }

    public void CheckIfLetterIsCorrect (): void

    {

    trace ("search if the letter is correct");

    }

    public void InGameAnimation (): void

    {

    trace ("InGameAnimation");

    }

    public void RemoveLetterChildren (): void

    {

    trace ("RemoveLetterChildren");

    }

    public void PointsGiven (): void

    {

    trace ("PointsGiven");

    }

    None of your other functions are named with the names you ask by.

    initLetterWasClickedOn! = LetterWasClickedOn... and so on

  • Background repeated with LinearGradient?

    Is it possible to make a fill repeat when you use a LinearGradient?  I would like to force the following background to repeat itself:

    < s:Rect left = "0" right = "0" top = low "0" = "0" >

    < s:fill >

    < s:LinearGradient rotation = spreadMethod "90" = "repeat" >

    < s:GradientEntry color = "#717681" / >

    < s:GradientEntry color = "#aaafbb" / >

    < / s:LinearGradient >

    < / s:fill >

    < s:stroke >

    < s:SolidColorStroke color = "#565 c 65" weight = "1" / >

    < / s:stroke >

    < / s:Rect >

    spreadMethod = "repetition" does not appear to have any effect.

    -Very well, so I'll assume you want to dynamically create Rectangles to completely fill a resizable space. What is your intention?

    If Yes, then the most efficient method is draw programmatically. I create a component from MXML to the Group and replace the updateDisplayList function. In this function, you'll want to draw your rectangles according to the space available.


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight
    "xmlns:local =" * ">
       
           
       

       
       
       


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" >
       
           
       

       
       
            override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);
                   
    var Graphics = g:Graphics;
                   
    var rectCount:int = Math.floor(unscaledHeight / 50);
    var YCourant: Number = 0;
                   
    g.beginFill (0x00FF00, 1);
                   
    for (var i: int = 0; i< rectcount;="">
    {
    g.drawRect (0, currentY, 100, 40);
    += currentY 50
    }
                   
    g.endFill ();
    }
    ]]>
       

  • Help me complete my first Login of Cairngorm example.

    Hello

    I'm still fearing to make an application using Cairngorm. Help, please

    This will be my sketch of my Caringorm request.

    This will is a LoginExample where on a successful connection is displayed as WELCOME or INVALID CONNECTION in the case of a bad connection.

    Please go through my code:

    It's my hand mxml file


    <? XML version = "1.0" encoding = "utf-8"? >
    < mx:Application xmlns:controller = "uk.co.clockobj.cairngormdemo.controller. *" >
    < controller: AppController / >
    < mx:Script >

    user: UserDTO var = new UserDTO();
    public function login (): void
    {
    User.UserName = UNAMETI.text;
    User.Password = PASSTI.text;
    systemManager.dispatchEvent (LoginEvent.LOG_USER_IN, user);

    }
    < / mx:Script >
    < / mx:Application >

    It's my UserDTO object:

    package dto
    {
    [Bindable]
    [RemoteClass(alias="namespace.to.some.server.dto")]
    public class UserDTO
    {
    public var username: String;
    password public var: String;

    public void UserDTO()
    {
    }
    }
    }

    This is my controller class:

    controller package
    {
    SerializableAttribute public class AppController extends FrontController
    {
    public void AppController()
    {
    Super();
    initialiseCommands();
    }

    private void initialiseCommands(): void
    {
    addCommand (LOG_USER_IN, LogUserInCommand);
    }
    }
    }

    This is my class of the event:

    package events
    {
    import com.adobe.cairngorm.control.CairngormEvent;

    SerializableAttribute public class LoginEvent extends CairngormEvent
    {

    public static const var LOG_USER_IN:String = "LOG_USER_IN";

    the user public var: UserDTO

    public void LoginEvent (type: String, user: UserDTO, bubbles: Boolean = false, cancelable: Boolean = false)
    {
    Super (type, bubbles, cancelable);

    This.User = UserDTO;
    }

    }
    }

    This is my command class:

    package controls
    {
    public class LogUserInCommand implements ICommand, IResponder
    {

    Service myremoteservice;
    public void LogUserInCommand()
    {
    }

    override public function execute(event:CairngormEvent):void
    {

    myRemoteService = ServiceLocator.getInstance () .getRemoteObject ("docsServices");
    }

    public void result(data:Object):void
    {

    ModelLocator.getInstance (.welcome = property ResultEvent (data));

    }

    public void fault(info:Object):void
    {

    ModelLocator.getInstance (.invalid = property ResultEvent (data));


    }

    }
    }

    This is my ModelLocator class:

    package template
    {[Bindable]
    / public class ModelLocator implements IModelLocator
    {
    private static var _instance:ModelLocator;

    Public Shared function getInstance (): {ModelLocator}
    If (_instance == null) {}
    _instance = new ModelLocator();
    }
    return _instance;
    }

    public void ModelLocator()
    {
    If (_instance! = null)
    {
    throw (new Error ("class Singleton has already been instantiated"));
    } else
    {
    session = new SessionModel();
    }
    }

    the user public var: UserDTO

    public var welcome: String;
    public var invalid: String;

    }
    }


    I have my file services.mxml defined in connection with my java file:


    < mx:RemoteObject
    ID = "docsServices".
    destination = "ToRemote.

    source = "cairngormcf.com.cf.CairngormJava" > "
    < / mx:RemoteObject >

    my questions to what is above the code are:

    1. How can I call the FrontController of my connection function of the main Application under the container form.

    2. after sending my logon function event, who should listen to this event. (How to do here)

    3.
    3. after obtaining the DTO user details in my Java layer, I validate the data and I sends a string either valid or invalid connection Login as String, here's how my main Application gets it data?

    Please help me in all these things, really, it will be a great help.

    While waiting for the responses from the experts

    Thanks a lot for reading long code.

    Hi Kiran, this is your class in place of the stuff as mentioned in the classes below that it's

    or if you can change it yourself here I use the custom component and I import this component custom demand... so use custom component to send event cairngorm...

    the best practice is to create a display component, and then import this view in your application and which will reduce the file size of your application and file size of download... so if you have any problem using this code let me know

    company
    ------------
    1 MyServices
    ------------

    http://www.Adobe.com/2006/mxml '.
       
    xmlns:Cairngorm = "" com.adobe.Cairngorm.Business. * ">"
       
       
        <>
    destination = "user".
    ID = "userRO" >
           
       
       

    2 UserDelegate
    --------------
    business package
    {
    import com.adobe.cairngorm.business.ServiceLocator;
       
    Import mx.rpc.AsyncToken;
    Import mx.rpc.IResponder;
    Import mx.rpc.remoting.RemoteObject;
       
    import Vos. UserVO;
       
    public class UserDelegate
    {
           
    public var myServices:ServiceLocator;
           
    public void UserDelegate()
    {
    TODO: to implement the function
    myServices = ServiceLocator.getInstance ();
               
    }
           
    Create a function to communicate with the server here

    public void validateUser(userObj:UserVO,responder:IResponder):void {}
               
    Check out the service you want
    communicate the servicelocator
               
    var userRO:RemoteObject = myServices.getRemoteObject ("userRO");
    var resMsg:AsyncToken = userRO.validateUser (userObj);
               
    join the answering machine
               
    resMsg.addResponder (responder);
               
               
    }

    }
    }

    LoginCommand
    ------------
    package controls
    {
    import business. UserDelegate;
       
    import com.adobe.cairngorm.commands.ICommand;
    import com.adobe.cairngorm.control.CairngormEvent;
       
    How to import events. LoginEvent;
       
    Import model. MyModelLocator;
       
    Import mx.controls.Alert;
    Import mx.rpc.IResponder;
    Import mx.rpc.events.ResultEvent;
       
    import Vos. UserVO;

    public class LoginCommand implements ICommand, IResponder
    {
    public var myModel:MyModelLocator;
    public var userDelegate:UserDelegate;
           
    public void LoginCommand()
    {
    TODO: to implement the function
    This allows to manipulate data in the
    model
               
    myModel = MyModelLocator.getInstace ();
    }

    public void execute(event:CairngormEvent):void
    {
    TODO: to implement the function
    We will do our logic here
               
    var loginEvent:LoginEvent = event as LoginEvent;
    var userObj:UserVO = loginEvent.userDtl;
               
    / * If (userObj.userName == "[email protected]" &)
    {userObj.password == "naresh") "}
    do something
    myModel.userDtl = userObj;
    myModel.APP_STATE = "login";
                   
    } else {}
    do something else
    Alert.Show ("connection failed");
    }*/
               
    create the delegate user instance
               
    userDelegate = new UserDelegate();
    userDelegate.validateUser (userObj, this);
                
    }
           
    public void result(event:Object):void {}
               
    var resultEvent:ResultEvent = event as ResultEvent;
               
    {if(resultEvent.Result!=null)}

    myModel.userDtl = resultEvent.result as UserVO;
    myModel.APP_STATE = "login";
                
    } else {}
                   
    Alert.Show ("connection failed");
    }
               
    }
           
    public void fault(event:Object):void {}
               
    }
           
           
    }
    }

    LoginPanel
    ----------

    <>
    "xmlns:MX ="http://www.adobe.com/2006/mxml"
    title = "Login here" >
       
       
            How to import events. LoginEvent;
    import Vos. UserVO;
    Import model. MyModelLocator;
    Import mx.events.ValidationResultEvent;
               
    public void loginUser(event:MouseEvent):void {}
                   
    var emailValEvnt:ValidationResultEvent
    = emailVal.validate ();
    var pswdValEvnt:ValidationResultEvent
    = pswdVal.validate ();
                               
    If (emailValEvnt.type is ValidationResultEvent.VALID
    (& pswdValEvnt.type == ValidationResultEvent.VALID) {}
                       
    as the validation is made
    communicate the data on the server
                       
    the failure of the value object
    var userObj:UserVO = new UserVO();
    userObj.userName = userNameTI.text;
    userObj.password = passwordTI.text;
                       
    var loginEvent:LoginEvent =
    new LoginEvent (LoginEvent.LOGIN_EVENT, userObj);
    dispatches the event
    loginEvent.dispatch ();

    CairngormEventDispatcher.getInstance.dispatch (loginEvent);  //Import com.adobe.cairgorm.CairngormEventDispatcher CairngormEventDispathcer
    } else {}
    display error message
    this.errorString = 'Pleae enter valid details';
    }
                   
    }
               
    ]]>
       
       
    <>
    source = "{userNameTI}".
    property = "text".
    ID = "emailVal".
    required = "true".
    triggerEvent =""
    />

    <>
    source = "{passwordTI}".
    ID = "pswdVal".
    maxLength = "16".
    minLength = "6".
    property = "text".
    triggerEvent =""
    />


           

               
           
           
               
           

           
       
           
       

       

    MyFrontController
    -----------------
    controller package
    {
    import com.adobe.cairngorm.control.FrontController;
       
    How to import events. LoginEvent;
    import controls. LoginCommand;

    SerializableAttribute public class MyFrontController extends FrontController
    {
    public void MyFrontController()
    {
    Super();
    addCommand (LoginEvent.LOGIN_EVENT, LoginCommand);
               
    }
           
    }
    }

    LoginEvent
    -----------
    package events
    {
    import com.adobe.cairngorm.control.CairngormEvent;
       
    import flash.events.Event;
       
    import Vos. UserVO;

    SerializableAttribute public class LoginEvent extends CairngormEvent
    {
    public static const = "loginEvent"; LOGIN_EVENT:String
            
    public var userDtl:UserVO;
           
    public void LoginEvent (type: String, userObj:UserVO)
    {
    TODO: to implement the function
    Super (type);
    this.userDtl = userObj;
    }
           
    override public function clone (): Event {}
               
    return of new LoginEvent (type, userDtl);
    }
    }
    }

    MyModelLocator
    --------------
    package template
    {
    import com.adobe.cairngorm.CairngormError;
    import com.adobe.cairngorm.model.IModelLocator;
       
    import Vos. UserVO;
       
    [Bindable]
    / public class MyModelLocator implements IModelLocator
    {
    public static var instance: MyModelLocator;
           
    public void MyModelLocator(enforcer:SingletonEnforcer)
    {
    TODO: to implement the function
    {if(Enforcer==null)}
                   
    trace ("you cannot create more than one instance of ModelLocator");
    throw new CairngormError ("initializing Multiple");
                                   
    }
               
    }
           
    public static function getInstace (): {MyModelLocator}
               
    {if(instance==null)}
    create a new instance
    Return it
    instance = new MyModelLocator (new SingletonEnforcer());
    return instance;

    } else {}
    return the existing instance
    return instance;
    }
               
    }
           
    Declare the Variables here
    Don't forget to initialize them
           
    contains the user data
    public var userDtl:UserVO = new UserVO();
    check the status of the application
    public var APP_STATE:String ="";
           
    }
    }
    Class SingletonEnforcer {}

    UserVO
    -------
    package vo
    {
    [Bindable]
    [RemoteClass(alias="com.test.lcds.vo.UserVO")]
    public class UserVO
    {
    public var userName:String;
    password public var: String;
           
    public void UserVO()
    {
    }

    }
    }

    Cairngorm2
    -----------

    <>
    "xmlns:MX ="http://www.adobe.com/2006/mxml"
    layout = "absolute".
    xmlns:comp = "comp.*.
    xmlns:control = "controller.*".
    xmlns:vo = "vo.*".
    xmlns:business = "mentoring."
    Initialize = "initApp () '"
    currentState = "{myModel.APP_STATE}" > "
       
       
       
       
       
       
       
       
       
       
            Import model. MyModelLocator;
               
    [Bindable]
    public var myModel:MyModelLocator;
               
    public function initApp (): void {}
                   
    myModel = MyModelLocator.getInstace ();
                   
                   
    }
               
    ]]>
       

       
           
               
               
                   
    text = fontWeight "Congratulation {myModel.userDtl.userName}" = "bold" fontSize = "18" / >
               

           

       

       
        <>
    horizontalCenter = "0".
    Red = "0" id = "loginpanel1" >
           
       
       

    Place these classes in relavent ane packages try it... you must implement service locator in the pakage delegate as well as the UserDelegate class

  • Custom itemRender event shipping

    Hi all. Have a problem with the custom itemRender event.

    First of all, I created TileList:

    < mx:TileList height = "544" width = "575" dataProvider = "{favourite}" id = "FavoriteTileList".
    itemDoubleClick = "onFavoritesClick (event)" x "5" = "
    doubleClickEnabled = "true".
    itemRenderer = "FavoriteItemRender" >
    < / mx:TileList >

    Then, I created new itemRender:

    package
    {

    import flash.events.MouseEvent;

    Import mx.containers.HBox;
    Import mx.containers.VBox;
    Import mx.controls.Image;
    Import mx.controls.Label;
    Import mx.controls.LinkButton;
    Import mx.controls.Spacer;
    Import mx.controls.listClasses.IListItemRenderer;
    Import mx.core.UIComponent;
    Mx.events import. *;

    SerializableAttribute public class FavoriteItemRender extends UIComponent implements IListItemRenderer
    {

    Internal variable for the value of the property.
    private var _data:Object;

    private var hBox:HBox;
    private var vBox:VBox;
    private var image: Image;
    private var textLabel:Label;
    private var deleteFavorite:LinkButton;
    private var hSpacer:Spacer;
    private var vSpacer:Spacer;

    [Bindable] public var myData:DataModel = new DataModel();
    Do the data property bindable.
    [Bindable ("dataChange")]

    public void FavoriteItemRender()
    {
    Super();
    this.explicitHeight = 150;
    this.explicitWidth = 150;
    }

    Define the getter method.
    public function get data (): object {}
    return _data;
    }

    Define the Set accessor method and dispatches an event when the property
    changes to support data binding.
    public function set {data(value:Object):void}
    _data = value;

    myData = new DataModel();
    myData.source = value.source;
    myData.text = value.text;
    myData.tag = value.tag;
    myData.carNumber = value.car_id;

    invalidateProperties();
    dispatchEvent (new FlexEvent (FlexEvent.DATA_CHANGE));
    }

    override protected function createChildren() (): void
    {
    super.createChildren ();

    this.explicitHeight = 150;
    this.explicitWidth = 150;

    vBox = new VBox();
    vBox.explicitHeight = 150;
    vBox.percentWidth = 100;
    vBox.setStyle ("horizontalAlign", "center");
    vBox.setStyle ("verticalAlign", "top");
    addChild (vBox);

    image = new Image();
    image.explicitHeight = 100;
    image.explicitWidth = 120;
    vBox.addChild (image);

    vSpacer = new Spacer();
    vSpacer.explicitHeight = 10;
    vBox.horizontalScrollPolicy = 'off ';
    vBox.verticalScrollPolicy = 'off ';
    vBox.addChild (vSpacer);

    hBox = new HBox();
    hBox.setStyle ("horizontalAlign", "center");
    hBox.explicitHeight = 30;
    hBox.percentWidth = 100;
    hBox.horizontalScrollPolicy = 'off ';
    hBox.verticalScrollPolicy = 'off ';
    vBox.addChild (hBox);

    hSpacer = new Spacer();
    hSpacer.explicitWidth = 10;

    textLabel = new Sun;

    deleteFavorite = new LinkButton();
    deleteFavorite.label = 'X '.
    deleteFavorite.setStyle("color","#06ADE4");
    deleteFavorite.addEventListener (MouseEvent.CLICK, handleDeleteClick);

    hBox.addChild (textLabel);
    hBox.addChild (deleteFavorite);
    hBox.addChild (hSpacer);


    }

    override protected function commitProperties (): void
    {
    super.commitProperties ();



    textLabel.text = myData.text;
    image.source = myData.source;
    }

    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);

    vBox.move (0,0);
    vBox.setActualSize ((unscaledWidth-4), unscaledHeight);
    }

    private function handleDeleteClick (event: MouseEvent): void
    {
    dispatchEvent (new DeleteFavoriteEvent (myData.carNumber));
    }

    }
    }

    As you can see I have manage, click link button to send my own DeleteFavoriteEvent event. As I first thought this event to malleable in the mxml file with TileList parent will be sufficiently defined in the init section:

    addEventListener (DeleteFavoriteEvent.DELETE_FAVORITE, deleteFavorite);

    But it 'doesn't work. As at the time I find I should addEventListener to object instance that will send, for as far as I understand to listen to this event, I should write something like this:

    (Instance FavoriteItemRender) .addEventListener (DeleteFavoriteEvent.DELETE_FAVORITE, deleteFavorite);

    in the mxml with TileLIst definition file? But I have no instance of it, because to help

    < mx:TileList height = "544" width = "575" dataProvider = "{favourite}" id = "FavoriteTileList".
    itemRenderer = "FavoriteItemRender" >

    Give me counsel how to listen itemRender parent mxml file event where the final TileList?

    private function handleDeleteClick (event: MouseEvent): void

    {
    dispatchEvent (new DeleteFavoriteEvent (myData.carNumber));
    }

    As you can see I have manage, click link button to send my own DeleteFavoriteEvent event. As I first thought this event to malleable in the mxml file with TileList parent will be sufficiently defined in the init section:

    addEventListener (DeleteFavoriteEvent.DELETE_FAVORITE, deleteFavorite);

    But it 'doesn't work. As at the time I find I should addEventListener to object instance that will send, for as far as I understand to listen to this event, I should write something like this:

    (Instance FavoriteItemRender) .addEventListener (DeleteFavoriteEvent.DELETE_FAVOR ITE, deleteFavorite);

    in the mxml with TileLIst definition file? But I have no instance of it, because to help


    itemRenderer = "FavoriteItemRender" >

    the

    Give me counsel how to listen itemRender parent mxml file event where the final TileList?

    I guess the problem lies in what parateters you pass to your constructor DeleteFavoriteEvent. In fact, it is a parameter, you do not pass: bubbles. It is default to false, which means that your event not be the propagation phase. This is why he does not move to the top of the display list and TileList of your parents does not. So just pass 'true' as second parameter to the constructor of the event and see if that helps:

    private function handleDeleteClick (event: MouseEvent): void
    {
    dispatchEvent (new DeleteFavoriteEvent (myData.carNumber, true));
    }

    Now I don't know if it's appropriate way to atchieve your goal (whatever it is). In my opinion, the stuffing out of your custom to the display list events is not applausable. But that's just my opinion after all.

  • earpiece touch an item converter

    If I have a data grid that includes the editable column and I have overridden function keyUpHandler how can I check if the focus is in the position of editor in Chief

    so normally I absolutely next to check the development of the grid

    override the keyUpHandler(event:KeyboardEvent):void function
    {
    super.keyUpHandler (event);

    If (event.keyCode is Keyboard.ENTER)
    {
    If (focusManager.getFocus () is searchResultsDataGrid)

    {}

    .

    .

    .

    .

    What happenes if I want to test the update to the post editor

    Thank you

    The current editor is referenced by the itemEditorInstance property

  • Custom button class WordWrap

    Someone knows how to make text wrap to a custom button class? I tried everything (as you can see below)! I even tried the Flexlib CanvasButton class, but not really sure how to apply only to one class custom. BTW, these buttons are inside a TileList component if that makes a difference... I love Flex but sometimes its really simple things that you SHOULD be able to easily do that just drive me NUTS!

    Thanks in advance!

    -Mike

    package action.button
    {
    import flash.display. *;
    import flash.events. *;

    Import mx.controls.Button;
    Import mx.controls.listClasses.BaseListData;
    Import mx.controls.listClasses.ListData;
    Import action.button.NoTruncationUITextField;
    Import mx.core.UITextField;
    Import flexlib.controls.CanvasButton;

    SerializableAttribute public class ButtonCatSearch extends button
    {
    private var _baseListData:BaseListData;
    private var _listData:ListData;
    private var _label:String ="";

    public void ButtonCatSearch()
    {
    Super();
    the cursor always behave as if it were a button
    mouseChildren = false;
    buttonMode = true;
    useHandCursor = true;
    height = 150;
    width = 20;
    setStyle ("paddingLeft", 50);
    setStyle ("paddingRight", 50);
    setStyle ("paddingTop", 50);
    setStyle ("paddingBottom", 50);

    setStyle("horizontalGap",100);
    setStyle ("wordWrap", true);

    wordWrap = true;

    addEventListener (MouseEvent.MOUSE_DOWN, onButtonClick);

    }
    public void onButtonClick(e:Event):void
    {
    _label = e.target.label;

    }
    //----------------
    to return to the line
    for button
    override protected function createChildren() (): void
    {
    Create a UITextField to display the label.
    If (! textField)
    {
    textField = new UITextField();
    textField.styleName = this;
    addChild (DisplayObject (textField));
    }
    super.createChildren ();
    textField.multiline = true;
    textField.wordWrap = true;

    super.createChildren ();
    }
    //-----------------
    override public function get listData (): BaseListData
    {
    Return _baseListData;

    }

    /**
    * @private
    */
    override public function set listData(value:BaseListData):void
    {
    super.listData = value;
    _baseListData = value;
    _listData = _baseListData as ListData;
    }
    //-----------------
    override public function set data(value:Object):void
    {
    / * If {(_listData)
    If {(_listData.icon)
    this.setStyle ("icon", _listData.icon);
    }
    }
    */

    Super.Data = value;
    setStyle ("wordWrap", true);
    }
    //-------------------------
    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);


    this.textField.multiline = true;
    this.textField.wordWrap = true;

    Data.@price < = 0)? NEGATIVE_COLOR: POSITIVE_COLOR);
    }
    }
    }

    You need to replace [] Measure to get the correct behavior. By default, the button sets the width of the TextField child. What you want is for the width of the TextField to be limited by the width of the button and the button height to vary the height measured from the TextField object.

    I had a quick go at below, but it will probably need more work. I used the example of radio button Alex Harui multiline as a starting point:

    http://blogs.Adobe.com/aharui/2007/04/multiline_buttons.html

    ------------------------------------------------

    package
    {
    import flash.display.DisplayObject;
       
    Import mx.controls.Button;
    Import mx.core.IUITextField;

    SerializableAttribute public class WordWrapButton extends button
    {
    Protected Overrides function createChildren() (): void
    {
    If (! textField)
    {
    textField = IUITextField (createInFontContext (UITextFieldNoTruncation));
    textField.styleName = this;
    addChild (DisplayObject (textField));
    }
               
    super.createChildren ();
               
    textField.multiline = true;
    textField.wordWrap = true;
    }
           
    Override protected function [] Measure: void
    {
    If (isNaN (explicitWidth) is false)
    {
    textField.text = label;
                   
    textField.width =
    explicitWidth-
    Value ("paddingLeft")-
    Value ("paddingRight");
                       
    measuredHeight =
    textField.getExplicitOrMeasuredHeight () +.
    Value ("paddingTop") +.
    Value ("paddingBottom");
    }
    on the other
    {
    Super.Measure ();
    }
    }
           
    override protected function updateDisplayList)
    unscaledWidth: unscaledHeight, number: number): void
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);
               
    () textField.setActualSize
    textField.width,
    textField.getExplicitOrMeasuredHeight ());
               
    textField.move (textField.x, value ("paddingTop"));
    }
    }
    }

    ------------------------------

    package
    {
    import flash.text.TextFormat;
    import flash.text.TextFormatAlign;
       
    Import mx.core.UITextField;

    SerializableAttribute public class UITextFieldNoTruncation extends UITextField
    {
    Public Overrides function truncateToFit (truncationIndicator: String = null): Boolean
    {
    Returns false;
    }
    }
    }

    ------------------------------


    <>
    "xmlns:MX ="http://www.adobe.com/2006/mxml"
    Layout = "vertical".
    "xmlns:local =" * ">
       
        <>
    Width = "50".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "100".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "200".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "300".
    label = "A very long label I want the button to encapsulate" / >

    <>
    Width = "400".
    label = "A very long label I want the button to encapsulate" / >

  • Pass data from one XML object to an itemRenderer

    I'm trying to color the background of a column in a datagrid, and we found a sample file that illustrate the concept. However, the sample has data stored in an arrayCollection collection, while mine is in an XML object. The problem is that the data from the sample file apparently automatically passed to the itemRenderer (below: notice the trace statement). My XML object does not automatically pass to the itemRenderer data. So my questions are:

    1. is there a simple way to pass data stored in an XML object to an itemRenderer

    or

    2 should I convert my XML an arrayCollection collection? If Yes, what is the best way to do it - I tried the following, but without success:

    < mx: Model id = source = "example3.xml" / "xmldata" >
    < mx:ArrayCollection id = "myAC" source = "{ArrayUtil.toArray (xmldata. Example1)}"/ >

    Here is what the XML looks like:

    < TABLE >
    example < 1 >
    < Difficulty > 0,5 < / difficulty >
    < discrimination > 0.7 < / discrimination >
    < item 3 > < / point >
    < / example1 >
    < /table >

    Here is the itemRenderer:

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Label ' http://www.Adobe.com/2006/MXML ">

    <!--
    This element converter simply extends label and overrides the updateDisplayList function
    draw a filled rectangle of gradient. The colors of the gradient are determined from the
    data.
    ->
    < mx:Script >
    <! [CDATA]

    to import flash.geom.Matrix;
    import flash.display.GradientType;
    import flash.display.Graphics;

    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);

    var m:Matrix new matrix());
    m.createGradientBox (unscaledWidth, unscaledHeight);

    var Graphics = g:Graphics;
    trace("Data.COL3="+Data.col3)
    var colors: Array = (data.col3 < 2000? ([0x0000CC, 0x0000FF]: [0x00CC00, 0x00FF00]);

    g.Clear ();
    g.beginGradientFill (GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);

    the rectangle is drawn a little high and a bit large to compensate for the gap
    the DataGrid control is introduced between the rows.
    g.drawRect (0, -2, unscaledWidth, unscaledHeight + 4);
    g.endFill ();
    }
    []] >
    < / mx:Script >
    < / mx:Label >

    This code example should answer your question of how to import data in the renderer automatically. It is through the dataProvider of the DataGrid and then refer to it in the renderer in the form of data. XYZ, where XYZ is the field in the XML file with the data. See FB 3 help sys on the e4x syntax.

    -mainapp.mxml-

    
    
      
        
      
      
      
        
          
          
          
        
      
    
    

    -MyLabel.mxml-

    
    
      
        
      
    
    

    -data2.xml-

    
    
           0.5 
           0.7 
           3 
       
  • Where to start with "composite component?

    Hello world.  I'm having a hard time to understand how to create a composite base component.  There is an online help on this, but for some reason, I just can't follow it.  Honestly, I'm not trying to find someone here to do my job for me, but I hope that if a very simplified version of what I need to do, has described that someone could show me how do through code.

    Here's what I'm looking mainly to (generate a control that is a combobox with a button on the side of it):

    < hbox >

    < combobox / >

    < button / >

    < / hbox >

    Do something like above is pretty easy.  But what I really need, is for the control of the root must be a combobox so that all of the properties and events for the combobox control are available to its owner without having to re-do/proxy of them myself.

    I hope that this will illustrate the concept:

    < combobox >

    < button / >

    < / combobox >

    I see the doc I need an ACE of the class and must override updateDisplayList, createChildren(), etc..  But for some reason I can't understand the doc to do something even this simple enough.  I think that if someone showed me how to make this example, it would be a good starting point for me to go back to the doc and I hope it'll make more sense!

    Thanks in advance!

    I think the op is loking for an example of composition that begins with the extension of some components like ComboBox and then adds another control.  the advantage of this is that the new control can be treated as a ComboBox with all its features.  Here is an example.  You have to find your own image to use for the button, or replace it with a normal button.

    Test application:


    http://www.Adobe.com/2006/mxml '.
    "" xmlns = "*".
    layout = "absolute".
    creationComplete = "init ()" > "
       
    Import mx.collections.ArrayCollection;
    Import mx.controls.Alert;

    [Bindable] private var _acDP:ArrayCollection;
     
    public void init (): void
    {
    _acDP = new collection ArrayCollection ([{label: "one", value: 1}, {label: "two", value: 2}, {label: "three", value: 3}])
    }
    private void onButtonClick(event:Event):void
    {
    Alert.Show (ComboButton (Event.currentTarget) .selectedLabel);
    }
    ]]>    

    ComboButton.as

    package
    {
    import flash.events.Event;
    import flash.events.MouseEvent;
    Import mx.controls.ComboBox;
    Import mx.controls.Image;
     
    [Event (name = "comboButtonClick" type = "flash.events.Event")]
    SerializableAttribute public class ComboButton extends ComboBox
    {
    [Embed(source="assets/help.gif")]
    private var buttonImage: Class;
       
    private var _imgButton:Image;

    Constructor
    public void ComboButton()
    {
    Super();
    }
       
    / * instantiate the button and add it to the displaylist * /.
    override protected function createChildren() (): void
    {
    super.createChildren ();                The call to the superclass of necessary treatment.
    if(!_imgButton) {/ / Create the button.}
    _imgButton = new Image();
    _imgButton.source = ButtonImageGadget;
    _imgButton.ToolTip = "click Me";
    _imgButton.addEventListener (MouseEvent.CLICK, onClickButton);
    addChild (_imgButton);
    }
    }//
       
    / * Positions and sizes the image button * /.
    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);
    var buttonHeight:Number = unscaledHeight;
    var buttonWidth:Number = buttonHeight;
    var nbuttonX:Number = unscaledWidth + 5;
    var nbuttonY:Number = 0;
    _imgButton.height = buttonHeight;
    _imgButton.width = buttonWidth;
    _imgButton.move (nbuttonX, nbuttonY);
    } //updateDisplayList
       
    / * dispatches the event on click of button * /.
    private void onClickButton(event:MouseEvent):void
    {
    dispatchEvent (new Event ("comboButtonClick", false));
    }
    } //public class ComboButton
    } //package

    Tracy Spratt

  • Grid newbie - DataGridColumn styles

    I am very new to Flex so forgive me if I'm missing something very basic. I looked in all the documentation on how I could have either different color or thickness of horizontal grid lines throughout my DataGrid. I'm currently building a book of calendar time and I want to increments of 15 minutes (lines) pertaining to the time (1st 4 rows) they are below and then have a dark line prior to the next hour. Is it possible to accomplsih this? Thakns in advance!

    Thanks, that did the trick. I have not seen a way to make the casting in the documentation (at least by reading what I had to this day) and ActionScript is quite different from all other languages script/program with which I worked so I couldn't guess how. I really appreciate your help on this!

    Answer:
    ========
    > You should be able to do it with an itemRenderer customized for each of your DataGridColumns.

    Col: DataGridColumn var = new DataGridColumn (columnName);
    col.itemRenderer = new ClassFactory (AppointmentBookCellRenderer);

    AppointmentBookCellRenderer:
    ---------------------------------------------
    package amicus
    {
    Import mx.controls.Label;
    Mx.controls.dataGridClasses import. *;
    Import mx.controls.DataGrid;
    import flash.display.Graphics;
    Import mx.controls.listClasses.IListItemRenderer;
    Import mx.core.IFactory;
    Import mx.core.UIComponent;

    SerializableAttribute public class AppointmentBookCellRenderer extends Label
    {

    public void AppointmentBookCellRenderer() {}
    Super();
    }

    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);

    var Graphics = g:Graphics;
    var grid: DataGrid = DataGrid (DataGridListData (listData) .owner);
    var tm:String = data.time;

    If (tm.indexOf(":00") > - 1).
    {
    g.lineStyle (2, 0 x 400040, 1.0);
    g.moveTo (0, -3);
    g.lineTo (150, -3);
    }

    }

    }
    }

  • Custom creation for AreaChart AreaRenderer problem

    First question: if I buy the graphics package, can I get the source code? That would certainly solve my problems.

    OK the real question: does anyone have a quick example class that is a custom for an AreaChart AreaRenderer?

    I am trying to create a custom of the AreaRenderer implementation. According to the docs, I need to implement the interface "AreaRenderer' (no IAreaRenderer (?)) who supposedly resides in the mx.charts.renderers.interfaces but Flex Builder complains that the interface is not found.

    Link to documentation: http://livedocs.macromedia.com/flex/15/asdocs_en/mx/charts/renderers/interfaces/AreaRender er.html

    Otherwise, I tried simply stretching from AreaRenderer but methods: draw, beginDraw and endDraw seem not to be there, or are not substitutable?

    Ugh I always to understand these things right after that I have post. I was hitting my head on this for more than a day too.

    In any case, for someone else, everything you do is extend ProgrammaticSkin and implement IDataRenderer. Here is my example class:

    package
    {
    Import mx.core.IDataRenderer;
    Import mx.skins.ProgrammaticSkin;
    Import mx.charts.series.items.AreaSeriesItem;
    Import mx.charts.series.renderData.AreaSeriesRenderData;
    import flash.display.Graphics;

    SerializableAttribute public class MyAreaRenderer extends ProgrammaticSkin implements IDataRenderer
    {
    private var _data:AreaSeriesRenderData;

    public function get data (): object
    {
    return _data;
    }

    public function set data(d:Object):void
    {
    _data = d as AreaSeriesRenderData;
    }

    override the updateDisplayList(width:Number,_height:Number):void function
    {
    super.updateDisplayList (width, height);

    var Graphics = g:Graphics;

    g.Clear ();
    g.moveTo (width, height);
    g.beginFill (0xFF0000);

    (hint: string var in _data.filteredCache)
    {
    var point: AreaSeriesItem = _data.filteredCache [index];

    g.lineTo (item.x, item.y);
    }
    g.endFill ();
    }
    }
    }

    Still, I would like to know if get you the code source for charting package, however.

  • Custom component Help

    Hello

    I'm trying to pass a variable to a custom component that I did. Here is my list of import for the script AS:

    Import mx.controls.Image;
    Import mx.controls.Label;
    Import mx.containers.HBox;
    Import mx.containers.VBox;
    Import mx.containers.Panel;
    Import mx.containers.Canvas;
    Import mx.events.FlexEvent;
    import flash.events.Event;

    The script essentially make a picture of a thermometer and then I pass a value and it increases the level of 'mercury '. Here's my .mxml script that works fine:

    < mx:Canvas label = "Test" width = "140" height = "268" y = "10" >

    < custom id: thermometer = "thermo" y = "10" x = "10" Temperature = "27".
    high value = relax "50" = "0" title = "Office" width = "116" height = "245" / >

    < / mx:Canvas >

    That is why a photo of the thermometer exactly as it should. My problem is that when I moved the component a varaible like {pSrv.lastResult.data.current.RH_OFFICE_CURR} it doesn't work anymore! I have no idea why, and I hope that someone has had this problem before. Why can't I send these data to my component?

    Here is the solution discussed:

    package components
    {
    Import mx.containers.Canvas;
    Import mx.containers.VBox;
    Import mx.controls.Image;

    Thermometer/public class extends Canvas
    {
    / * Variables for the child components * /.
    protected var canvas: VBox;
    protected var top_img:Image;
    protected var bottom_img:Image;

    / * Flex calls the createChildren() method when
    * the components are added. This is the right place
    * implement control. Any final design, etc..,.
    * occurs in updateDisplayList * /.
    override protected function createChildren() (): void
    {
    super.createChildren ();
    If (! canvas)
    {
    canvas = new VBox();
    canvas.setStyle ("verticalGap", 0);
    addChild (canvas);
    }

    Create and initialize the top image.
    If (! top_img)
    {
    top_img = new Image();
    canvas.addChild (top_img);
    }

    If (! bottom_img)
    {
    bottom_img = new Image();
    canvas.addChild (bottom_img);
    }
    }

    / * Set the picture styles * /.
    override protected function commitProperties (): void
    {
    super.commitProperties ();
    top_img.source = ' img/blue.png;
    bottom_img.source = ' img/red.png ';
    }

    / * updateDisplayList positions, sizes and draw something it takes * /.
    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);

    TODO: use the unscaledHeight property to determine the
    good scaling for the control.
    top_img. ScaleY = 20;
    bottom_img. ScaleY = _temp;
    }

    override protected function measure (): void
    {
    Super.Measure ();
    measuredWidth is measuredMinWidth = 75;.
    measuredHeight is MaxHeight = 200;.
    }

    public void Thermometer()
    {
    Super();
    }

    [Inspectable (defaultValue = 1)]
    private var _temp:uint = 1;

    [Bindable (event = "tempChange")]
    public function get time (): uint
    {
    Return _temp;
    }

    public function set time (value: uint): void
    {
    _temp = value;
    invalidateDisplayList();
    }
    }
    }

  • button in the datagrid not pulling cell click event

    I have a datagrid with a custom button built in Actionscript rendering engine. I'm trying to figure out how to capture the click event of the component when the button is clicked.

    I am generating the component of the cell based on the field type:
    column.itemRenderer = new ClassFactory (DpFileRenderer);

    The element itself:

    package joe.ui {}
    Import mx.controls.Button;
    import flash.events.MouseEvent;
    import flash.events.Event;

    SerializableAttribute public class DpFileRenderer extends button
    {
    [Embed("/assets/icons/drive_disk.png")]
    private var diskIcon: Class;
    [Embed("/assets/icons/drive_disk_grey.png")]
    private var diskIconDisabled: Class;

    override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
    {
    super.updateDisplayList (unscaledWidth, unscaledHeight);
    This.label = this.listData.label;
    If (this.listData.label! = '0')
    {
    this.setStyle ("icon", diskIcon);
    } else {}
    this.setStyle ("icon", diskIconDisabled);
    This.Enabled = false;
    }
    this.labelPlacement = 'left ';
    this.setStyle ("color", 0x000000);
    }
    }
    }

    I don't know exactly on where to put a diffuse in this event.

    Could someone help?

    Thank you.

    Add an event listener in the constructor of your rendering engine and dispatches the event from the Manager. You certainly want the event to bubble as well.

    Here's an example, using a text control, but the theory is the same.

    http://www.CFLEX.NET/showfiledetails.cfm?channelId=1&object=file&ObjectID=595

    Tracy

Maybe you are looking for

  • 'Reply to all' now fails to include "Bcc" emails

    Updated to Thunderbird and now when I "reply all" to an e-mail with To, Cc and Bcc, Bcc emails the recipients are excluded from her 'reply to all '. Previously, this worked well and allowed me to easily send weekly emails to the same group of people.

  • HDD making noise

    Hello My hard drive makes a 'click '. Checked the activity monitor and there is nothing strange going on. How can I solve this? Thank you

  • Safari 9 (El Capitan) is to save cookies in private browsing

    Hello I noticed that Safari 9 (OS X El Capitan) saves cookies when I'm in the private browsing window. When I visit certain websites (e.g. gizmodo.com) in private browsing, and I close the window, the site cookie is always displayed. I tried to resta

  • How can I make sure that I do not continue to receive a daily bombardment of junk emails

    Junk e-mail How can ensure me that I do not continue to receive a daily bombardment of junk when emails I brush them every day?  I note that the shippers are often the same despite my allow to delete them immediately.  I ask you, what I would do with

  • Applications does not work - diagnose in safe mode?

    Something has caused several requests to stop running on my system (Vista SP2). I tried several things that didn't work and I was wondering if and how I can use the safe mode to diagnose what is wrong. Context: I still have my antivirus McAfee and Wi