Flex :: Asdoc Throwing Errors For MXML Component That Includes A Separate .as File?
Jul 27, 2010
I have an MXML component that includes a .as file with
<fx:Script source="myfile.as" />
Running asdoc throws a whole bunch of errors like
"Error: The private attribute may be used only on class property definitions."
"Error: The public attribute can only be used inside a package."
Solution 1 is to move the AS code into the MXML file. Kind of defeats the objective of using external .as files for MXML components in the first place, so really a last resort option. Code inside a mxml file is messy (I really don't want logic mixed in with mxml), and would also require using the < !--- ---> asdoc syntax.
Solution 2 is to have the MXML component inherit from a normal class file. That would mean no private members in the base class, only internal (meaning a separate package for the component to be safe) or protected. This would make things tedious to say the least.
Are there any other work-arounds or possibly a beta/nightly version of asdoc that fixes the problem? I am using the Flex 4.1.0.16076 SDK, the "latest production quality release".
Update:Just tried using asdoc from the svn trunk, (4.5.0 rev. 16942) and the problem persists.
View 1 Replies
Similar Posts:
Jul 8, 2009
I'm having a nightmare - always at the last minute of the project Flash craps out...
I have stripped all the actionscript from the file, but the animated sprites cause the following error throughout the timeline (about 5/6 times) [url]...
I changed two main elements to buttons, then back to movie clips via the library panel and the properties window. Could this 'break' the objects?
View 1 Replies
Mar 25, 2011
Is it possible with ASDoc to include example MXML code in your comment?[code]
View 2 Replies
May 18, 2011
I've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.
What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?
if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?
View 1 Replies
Aug 12, 2009
A Flex components values are initlized by init methord. In an application flow, How to refresh a mxml component data value ; as init is callled at the start up it self only.
eg. of mxml componet may be as simple as button label or text as complex as repeater whose data provider is a web service ( means a fresh quesy should be made to pull the data and refresh the dataprovider of repeater )
View 3 Replies
Aug 7, 2010
i hav tried to covert .mxlml to .swc file using flex builder it's not working when i integrate with other application.. how to get .swc using SDK..
View 2 Replies
Aug 3, 2011
I have a canvas based component, so when I check the asdoc comments, they have inherited comments of Canvas. can we remove that inherited comments, and add our own AsDoc comments..
View 1 Replies
Feb 18, 2010
i'm trying to access an mxml component from my external as file. e.g
main.mxml:
[mx:text id="myText" />]
file.as:
var mainM:main = new main();
mainM.text.visible = true;
i get the following error:
[TypeError: Error #1009: Cannot access a property or method of a null object reference]
View 2 Replies
Aug 31, 2009
I'm trying componentize one of the pieces of UI in an AIR application that I'm developing in Flex. In this example, I want to display file information on a single line (which has an icon, some text/link and the size).
My code looks like this (component is called FileDisplay):
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="[URL]"><mx:Script>
<![CDATA[
public function set iconType(source:String):void {
this.ficon.source = source;
[Code] .....
However, when I do this, I get an error: Error #1009: Cannot access a property or method of a null object reference. This is because the child components of the FileDisplay are null (or at least they show up that way in the debugger). Am I supposed to be waiting for events indicating the child components were created? For now I can manually do everything in ActionScript in my main app (create a Canvas and add children to it) but how to separate the code more cleanly.
View 4 Replies
May 28, 2011
I am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :[code]which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
View 1 Replies
Aug 5, 2009
I'm trying to have a bullet Sprite remove itself from the stage once it is off the stage, but Flash keeps throwing #1009 errors at me. I've looked over the code several times and don't understand what's wrong.
Bullet code:
package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.*;
public class Bullet extends Sprite {
private var bullet_direction;
[Code] .....
Error message:
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Bullet/DestroyBullet()
at Bullet/BulletMovement()
View 4 Replies
Nov 7, 2009
What can I use to check if a movieclip has been added to the stage yet without flash throwing a bunch of errors at me? For example, I have a movieclip with the instance name(mcONE) on my stage. And I'm currently using this bit of code to check if it's on the stage
[Code]...
View 2 Replies
Mar 9, 2012
This is a project I'm working on for a simple demo tutorial application in Flex. I am using mxml pages. You can see to the left that I will have my main application and then other mxml files (In the Examples Package) as the examples that will be loaded into the main application mxml. How can I dynamically pull the value from the object in the list to load the child mxml file into the container that I have further down in the application?
View 1 Replies
Sep 3, 2009
I have two components. One is called "InsideComp" and one is called "OutsideComp". OutsideComp has InsideComp as one piece of its component, and in my main MXML file, I have embedded an instance of OutsideComp. How do I access a public variable of InsideComp within my main MXML file?In Actionscript, I could just do something like:OutsideComp.InsideComp.valToChange = 5; But I dont know how to do it in MXML. I know this is probably an easy question.
View 4 Replies
May 16, 2011
I have a method in CustomPanel.mxml and I need to use id which is available in Main.mxml. Below is my sample code
Main.mxml
<local:CustomDivideBox id="div1">
Custompanel.mxml[code]....
View 2 Replies
Jul 25, 2011
I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time placing it in the same scope. For example,
Application.mxml:
<Application>
<source="external.mxml"/>
[code].......
View 4 Replies
Jul 28, 2009
cannot get the comments to show in actionscript file when running asdoc.. is this a known bug?
[Bindable]
/** test comment */
public var currentSearchTextValue:String;
does not show anything in the generated documentation.
View 3 Replies
Sep 27, 2011
i have defined some functions in a component mxml file let us say addbutton() now i want to call this function in main mxml file.
View 2 Replies
Sep 21, 2009
I have two mxml files. one is main that is application tag mxml file and another is my mxml component file. I have a viewstack in my main mxml whose id is, say, "mainViewStack". Now I want to set selectedChild property of "mainViewStack" from my mxml component file. [code]...
View 4 Replies
May 11, 2011
how to use mxml component in another mxml component actionscipt code [code]but i am getting error saying "Type was not found or was not compile time constant:warning")
View 3 Replies
Feb 7, 2012
How can i click a button on an .mxml component to open a specific selectedItem on a spark List from another .mxml component!?
View 1 Replies
Oct 9, 2009
I have a datagrid in my mxml file, say, samp.mxml.
<mx:DataGrid id="taskDataGrid" dataProvider="{initDG}" variableRowHeight="true"
editable="true" width="100%" paddingBottom="1" paddingTop="1" height="55" >
<mx:columns>
[code].....
View 3 Replies
Dec 21, 2009
How do I say an MXML component is inside some package? Well, it's in a different folder... I know how to do it ActionScript... But when I do in MXML I don't declare the package explicitly because I don't know how, and when I call it to my application, it states that The prefix "package" for element "package:Component" is not bound.
View 2 Replies
Apr 6, 2010
I am confused with how component life cycle goes when component build in MXML. and if MXML calls methods automatically then how to call any method in life cycle explicitly.
View 1 Replies
Oct 22, 2010
Basically I am poping up the following component:
PopUpManager.centerPopUp(PopUpManager.createPopUp(this,RegionExperienceDetailPopUp,false));
I need to call RegionExperienceDetailPopUp.generateData(passIntArray);
What is the syntax to do this?
View 1 Replies
Dec 2, 2010
I am actually in the process of Architectural of our project. We have choosen Mate framework. The project is not so quite complex, but what advantages i would get over MXML when i choose Modules.
Main App - > Views - > Events - > Maps - > Services [PHP or Java]
When i come up with Modules based Architecture, it seems to be good but i doubt it should not end up with tight coupling and unwanted issues which may break the head later to solve.
Main APP - > Modules - > Module Interface -> Events - > Maps - > Services
[PHP or Java]
What advantages i do get if i choose Modules over MXML Component? What is the prefered and the best way to Architect an FlexApplication? Since the Application is going to communicate with Backend, do we need to make the frontend more complex?
View 3 Replies
Feb 12, 2011
In our flex application we have tabs at the main level and under it we have subview.e.g
Home / Tasks / Admin etc...
In one condition we have to click on a button and open a new tab, on this tab we have to add an existing mxml component and show it in the tab.We are using parsley as the framework. Inside the mxml component test.mxml(that is shown in the tab) i am configuring it with parsley using the tag.Now when i add the instance of this test.mxml i am getting an exception. I am deriving this test.mxml instance using teh parsley context
as
context.getObject(id of component) as DisplayObject and adding it to the tabNavigator...
But i am getting exception when i try to grab an instance of a view using parsley context. How do i get an instance of a view or component that is configure through parsley using the parslye context.Also the problem is occuring becuase of the view injection..because i get a parsley excepiton on startup of the application stating that there is some problem in the context.
View 1 Replies
Feb 16, 2011
i want to implement this.archive/flex/tourdeflex/web/#docIndex=1;illustIndex=0;sampleId=0)type of structure in my application.how can i display different component in differentparts.
View 3 Replies
Jun 30, 2011
I have my custom component and for example few Label. I want to pass to my component value which will be assign to label's id.[code]Error: {test} is not a valid identifier.
View 1 Replies
Aug 26, 2011
I'm using several custom MXML components in my Flex 4.5 application.They all use absolute coordinates to place Image, Label, Line, etc. components and are currently based on a spark.components.BorderContainer:
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer
xmlns:fx="http://ns.adobe.com/mxml/2009" [code]....
Then I've realized, that I probably don't have to use BorderContainer, because I don't draw/need any borders around my custom components.But I don't know, what to take instead of it.I've tried taking <mx:UIComponent> (and removing <s:Layout> tag above), but then I get the error:
'Image' declaration must be contained within the <Declarations> tag since it does not implement 'mx.core.IUIComponent'.
'Label' declaration must be contained within the <Declarations> tag since it does not implement 'mx.core.IUIComponent'.
Is there some simplest possible spark "container"? And do I need a "container" at all if I use (and want to use) absolute coordinates?
View 1 Replies