Flex :: Disadvantages Of Using A Value Object In Construction And Intialisation
May 30, 2011I want to know if there are any disadvantages/ drawbacks of using value objects in initializing an object, for example:[code]
View 2 RepliesI want to know if there are any disadvantages/ drawbacks of using value objects in initializing an object, for example:[code]
View 2 RepliesI'm building a class that reads data from an xml file. The constructor takes the xml path and opens the file. It adds an event listener for the loading completion. But if constructor looks like
Code:
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
xmlLoader.load(new URLRequest("..."));
it will (probably) end-up when xml is not loaded yet. Are there any ways to stop the constructor execution until the xmlLoaded function has finished?
I'm making multiple similar calls with similar results to one remote object. Because these calls are so similar and very changeable, I've been keeping the name of the remote method in a config file, and when I need to make the call I use getOperation() on the remote object, and call send() on the operation object. However, the requirements have changed so that not all of the calls will have the same number of parameters. Because send uses ..., will I be able to continue using the same formation and pass an array, or will send() treat that as passing one argument of type array?
View 2 RepliesWhat are the Advantages and Disadvantages over the Bitmap and MovieClip in Flash.
View 1 RepliesI have a flex MXML UI that is building a set of radio buttons using the Repeater component:
<mx:Repeater id="radios"
dataProvider="{_lists.(@id == _question.single.@response_list).group.listItem}">
<mx:RadioButton groupName="responses"
[Code].....
I'm tasked with writing an application for placing and connecting objects (sort of like a room planner where you can place furniture). i've made a demo using Flash Builder 4 and built it for AIR as a desktop app. Now the client wants the full app, but they and I am unsure whether to continue building it as an AIR app or transform it to a web application using Flex. I tried making a simple conversion of the AIR app to a web app, and most things worked but not all. The things that don't work seem to be simple bugs, though, not complete lack of capability.The capabilities that I'm going to need (except for the modelling) are: Printing of the finished image + a list of the furniture that has been placed
A way to save and retrieve finished plans
A way to export the list of furniture to Excel format
Handling a whole slew of data about the different objects
Only the printing has been implemented so far, and seems to work in the web app as well.What advantages/disadvantages are there with the two approaches? Are any of the capabilities I need much worse (or even impossible) to implement in either approach?
Disadvantages
Requires Flash 10 (for saving files)
Requires a web server to serve content
Sligthly longer development time (from where I am right now)
Requires an internet connection to work
Lots of data transport, may be slow on a slow network
Desktop AIR app
Advantages
Slightly faster development time (from where I am right now)
No web server necessary
Can be used while not connected to the internet
All data is local and faster to load
Disadvantages
Requires the Adobe AIR runtime + a separate installation of the program
Updates need to be distributed to all users and an admin needs to install them
I've recently started making a game in FlexBuilder. The game is currently a Flex project. Is there any downside to using Flex as opposed to just Actionscript? A friend of a friend told me that Flex is slower than an Actionscript project. I've been unable to validate this on the internet; is there any truth to that claim?
View 6 RepliesI want to create a application for a website, that can calculate a persons daily energiexpenditure. The user of the application has to put in his/her height, weight and sex. So I want the program to switch between diferent formels depending on the input given. For example the formel for a girl, age 8, 38 kg and 1.40 cm is: (0.071*38)+(0.68*1.4)+1.55
And the formel for a man, age 30, 75 kg and 1.80 cm is: (0.064*75)+2,84
how would you do the coding?
I considering making a if-else construction, that checks whether the sex is male og female. And within this if-else construction i want to make a switch case, thats switches between different forms depending on the age input.
This is what i've done so far:
ActionScript Code:
public function energyintake()
{
var h:uint = 180; // The persons height in centimeters
[Code]....
I have some problems reading random size and construction XML files. Example: if u know the construction of file it is no problem, but when trying to display XML data that is unknown structure is more dif. how to read such file? I tried reading entire file into String then trying to manipulate it and have big problems:
[Code]....
What are the advantages and disadvantages of having just one main loop and having a main class control individual objects on your stage, in oppose to having each individual object have its own loop and giving it the responsibilities of doing what ever it has to do on its own. What are consider best practices.
View 3 RepliesI want to release my flash application not in release mode but in debug mode to see result of trace() after releasing the app.
I don't care that debug mode makes processing speed little slow.Except for processing speed, are there disadvantages to release flash application which was compiled in debug mode?Is it possible that the app throws exception or Flash Players of the app's users crash due to debug mode?
As it is said here: [URL] "If you do a Google search today for "MVVM and Flex", the first post is by somebody who claims that MVVM is not a good fit for Flex. I couldn't disagree more. Out of the box, the Flex framework makes it much easier to implement a Presentation Model than similar MVVM implementations in Silverlight. That is not to say that there aren't good third-party libraries that make it easier in Silverlight, but without any help, it is easier to do in Flex." So MVVM as LOGICAL CONCEPT can be implemented in both but the way it is implemented in Silverlight requires more Plumbing than Flex.
What prevents Silverlight MVVM to be implemented like Flex ? Doesn't Silverlight have same capability in event system to do the same? If yes why does Silverlight do things more complicated what's the advantages then ? Is it about using Class Interfaces which are more strongly typed? What are the disadvantages also ? For example as for implementing MULTIPLE VIEWS for 1 View-Model does Flex implementation make it also more obvious?
I have this situation where i'm trying to save "chat logs" while people switch around views in my flex mobile application..so, my plan is i'm starting out with a main object that I plan to re-use as the main chat log object..I call it textObjso, when someone new wants to chat my plan is to make a new object with the persons username.so how if i were to get the username from something like data.username how could I translate that into the var name of the object I want to make? So in the end i end up with.[code]
View 2 RepliesI am developing an application with Flex for the GUI and Restlet for the webservices. I have a strange problem. I put my XML as a property on a generic object, and send it as part of a POST request. But in the Restlet webservice, this XML is irretrievable. How do I retrieve it? I tried initialising the received Representation object to a DomRepresentation, but thats not working. If I put the received Representation object into a Form object, then getFirstValue is returning that XML as a string! I noticed that the contentType of the HTTPService was application/www-form-encoded so I set it to application/xml and its not helping either. I use restlet 2.0m6 and here is the code snippet that I use -
[Code]...
I've got a php backend which delivers a time (e.g. '07:00:00'). This time is recognized as a string but I need it as a Date. So what I need is: Convert a string '07:00:00' to a Flex Date object. Is there a way to do this (without using regular expressions)?
View 2 RepliesI am trying to move a 'Shape' object across the screen. As the object moves, a copy is being left at the initial position. Almost as if only an instance of original object ahs been moved
This is not an issue for moving an image or MXML graphic. Is something wrong in setting to the move object?
The code is as follows
private var arrow:UIComponent;
private function resetAssets():void{
arrow = new UIComponent();
[Code].....
We create Objects in flex by declaring type Object. for example
var objSampleObject:Object = new Object();
and we create properties directly with dot operator without creating any class
[Code].....
My question is in above process is there any class is created internally by flex?
Is it possible to have a Button object in a column in an AdvancedDataGrid object in flex 4?
View 1 RepliesIs it possible to have a Button object in a column in an AdvancedDataGrid object in flex 4? And how would I do this?
View 2 Repliesfor example i have object one a Textinput haveing id="
id_txtBox
", and a panel having a lot of children(TextInputs, Trees, Buttons etc.) if user is editing text in one of panel's child and then clik on "id_txtBox". can we get to know
[Code]...
How to dynamically add attributes to an object and convert that object into xml in Flex/Actionscript?
View 1 RepliesI have one MXML File as
<objecthandles:ObjectHandles xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" backgroundAlpha="1" xmlns:mx="library://ns.adobe.com/flex/mx"
[code].....
I think i am lost with basics itself. What is the difference between these two. String object is an instance of String Class.
[Code]...
If I create an object like so:
class Foo {
[Bindable] public var property: String;
}
The class Foo has an implicit event dispatcher to handle property change events. How can I access that without making Foo explicitly extend EventDispatcher?
I wish to develop a softare for 3D object compression (by polygon reduction) in flex using papervision 3D. Could you please suggest me an efficient algorithm for the same?
View 1 RepliesI have a tree with nodes , and a delete button , first user select the node and click this delete button , I want this node to be removed from the tree , Its not XML , every node in tree is of type Object
{label:'folder',children:[{label:'file1'}]}
I tried delete myTree.selectedItem (but compiler wont let me do it) also tried myTree.selectedItem = null (just unselects the item)and also how can I access reference to parent object of myTree.selectedItem ?
We are trying to automate our flex application. After adding automation libraries to our project we get the following exception:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.automation::AutomationManager$/addDelegates()
at mx.automation::AutomationManager$/addDelegates()
at mx.automation::AutomationManager$/addDelegates()
[code].....
We are using Flex 3.4 and maven2 to build the application.
I am trying to build an MXML application with Flash Builder 4.5, and I am integrating an API that requires the root of a display object to be a MovieClip. Personally I think this is bad design but I have to go with it. The root object always seems to end up as the stage, because of course I have to add the object to the stage for it to be added to the display list. Is there some way that I can either change the stage type in an MXML application to a MovieClip or is there some way to force a MovieClip wrapper to become the root of a display object?
View 1 RepliesIs it possible to create a display object in AS and take a screenshot of it as ByteArray or whatever without adding it to stage?
View 1 RepliesI want to remove Child from VBox , i have id of child , but i don't to have real object that i want to remove using removeChild function of VBox
View 5 Replies