46317

How to make MXML Component Constructor with Arguments? [closed]

Question:

I`m new in flex and could anyone help me?

How do I create a constructor that takes arguments for an MXML component?

Answer1:

You can't; MXML Components do not have constructors that you can modify.

You have a few options. The first is to rewrite your component to use ActionScript. This can be tedious in some situations, and trivial in others. It depends what the component does.

A second option os to use public variables on the component. When you create the instance of your MXML Component, set the properties on it. You should be able to access such properties in a preinitialize event handler. prenitinialize will be dispatched after the constructor, but before createChildren().

Recommend

  • Scalac hanging in phase typer
  • Consuming Api in Console Application
  • Integration between HP ALM and Appium
  • storing images in database or on hard drive
  • access req in expressjs 3 views
  • Team System: Check-In Changes To Multiple Projects in a Single Changeset?
  • find the max of Collatz sequence from a giving list
  • Storing image/data in MySQL and naming conventions
  • Import Library benefit
  • Replace NGINX 403 for deny with a different error response code
  • How to handle many-to-many relationships with more than 2 tables?
  • Freeze Column Headers in excel after export from ssrs
  • AngularJS: Server Side Architecture
  • Libraries for Dockable GUI Development in C
  • is it possible to add colors to python output? [duplicate]
  • In common-lisp, how can I insert an element into a list in-place?
  • Prolog Design Pattern to extend module predicates
  • Could we use session to create a global variable for all client?
  • How to replace an element in a specific position of a list?
  • Pros and cons of using react's life cycle methods in arrow function format
  • C#: Catch multiple errors during xml validation
  • Convert decimal number to octal in Lisp
  • For Cassandra kundera.client.lookup.class options
  • How to choose which type of NoSQL to use [closed]
  • Recursion in scheme
  • Java or python which is better to do Automation using Selenium [closed]
  • Return the second element for every element in a list
  • Regression gives error on one of the input variables “contrasts can be applied only to factors with
  • Variadic generic types in TypeScript?
  • How to log out using spring-security?
  • '('(LIST) 'NIL 'NIL) should be a lambda expression in (hanoi('('(list)
  • Random nat stream and subset types in Coq
  • how can you interleave two vectors of differing lengths in clojure
  • Monadic guard with Either
  • Which of the following data duplication options across shards is recommended?
  • friend finder api, to retrieve contacts from gmail,yahoo and hotmail using java [closed]
  • asp.net mvc consuming asp.net web api end point
  • How to use the DTO efficiently based on Scenario in C#
  • Swapping assemblies to implement DBMS-specific functionality
  • Why am I getting this lambda expression error, and what can I do about it?
  • Storing value before return in a variable
  • Are there pronounceable names for common Haskell operators? [closed]
  • how do you append list of lists without using append in scheme?
  • linear goal programming in R unable to find solutions
  • Minimize System of Equations with constraints (scipy.optimize.minimize)
  • Error: conflicting types
  • Why prolog outputs a weird tree-like list?
  • What is diffrence implementing xtify using GCM and xtify using XMPP in android?
  • Lisp graph data structures
  • Scheme Recursion Loop Incorrect Values and Variable Binding
  • AAsset_read vs fopen
  • Three.js BufferGeometry vs Geometry for particles
  • Scala really weird Type Mismatch
  • Scheme streams and circular lists
  • Should I call parent directive controller or create service
  • Inject functions with side-effects
  • How the sequence type is defined in ocaml
  • SCHEME Mutable Functions
  • When should I use `REQUIRED` vs `NOT_SUPPORTED` as a the value of @TransactionAttribute for an MDB?
  • phpseclib vs libssh2
  • What is the file path, as a string, of a file in the application's resources?
  • python reportlab - registerFont - django - font not available after some time
  • Actionscript 3 setting multiple variables of an object in an array possible?
  • nix user packages vs system packages
  • Enum, Delegate Dictionary collection where delegate points to an overloaded method
  • How to split series in two columns pandas
  • create a dynamic SUM column in SQL
  • .NET Core 1.0 Deployment issue with dotnet-razor-tooling.dll
  • How to make this very long url appear short?
  • Way to explode list into arguments?
  • switch statement: “a constant value is expected”
  • VSCode Private Extension Repository for teams
  • depth first tree traversal accumulation in clojure
  • Eclipse ECF Vs Apache CXF
  • smart pointer array deletor
  • How to check if any word inside a text is in array?
  • Flask session not persisting
  • How to get display-name from web.xml in a Spring IoC XML Configuration
  • Stream webcam via. Wowza streaming server
  • Unit Testing the Server Interface for a Silverlight-Facebook Application
  • returns the first n of list
  • In Perl, how do I ensure that a sub is invoked as a method from methods of the same object?
  • Segmentation fault when accessing a list inside a struct
  • Why does x86 program segfault without .data section? [duplicate]
  • dealing with nested quotes in html generated from c#
  • Detecting single one-bit streams within an integer
  • How can I cons a list of pairs on to auto-mode-alist?
  • declaring device constant in terms of another constant
  • Loading an embedded image in AS3
  • Right way to access Java Singleton private members
  • selectInput can't populate duplicate values (using uiOutput and renderUI) in Shiny
  • Looking for datastructure that maintains a size & purges older elements in the process
  • Mysql UPDATE ON DUPLICATE KEY only inserting
  • getting started with http tunneling
  • Maple: How to insert a command to force my code to choose random integer values to find my values?
  • Extracting infromation from multiple JSON files to single CSV file in python
  • Why is new Number(8) not exactly equal to 8?
  • When is locking on types a good idea?
  • Editable Combo Box Javascript and HTML
  • Syntax error near unexpected token 'elif'
  • help('modules') crashing? Not sure how to fix
  • Refactoring advice: maps to POJOs
  • Validation fired but Red Border does not appear with User Control in Silverlight 4
  • custom string delimiters stringtemplate-4
  • Regex for URL rewrite with optional query string parameters
  • Using same constraints in multiple classes
  • Flash radiobutton: how do I get the selected radiobutton?
  • How to copy styled text in JTextPane
  • How to autopopulate a field in SugarCRM form
  • Apache RewriteRule redirection with url encoded
  • OOP Javascript - Is “get property” method necessary?
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • Use of this Javascript
  • D3 nodes and links from JSON with nested arrays of children
  • Master page gives error
  • Spring security and special characters
  • Deleting and Updating values from a cusrsor adapter
  • Modifying destination and filename of gulp-svg-sprite
  • 'TypeError' while using NSGA2 to solve Multi-objective prob. from pyopt-sparse in OpenMDAO
  • Redux, normalised entities and lodash merge
  • NSLayoutConstraint that would pin a view to the bottom edge of a superview