Problem with child tag - Could not resolve x to a component implementation.
Hello.
I am writing some chart component and got a problem setting property via child tag. Property is a custom class.
My directory structure:
Makefile oxcharts Session.vim stats.as stats.mxml stats.swf
./oxcharts:
ColumnChart.as MyTest.as
stats.mxml:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:oxcharts="oxcharts.*">
<oxcharts:ColumnChart id="myChart" showDataTips="true" width="600" height="310">
<oxcharts:test x="5"></oxcharts:test>
</oxcharts:ColumnChart>
</mx:Application>
ColumnChart.as:
package oxcharts {
public class ColumnChart extends UIComponent {
public var test:MyTest;
MyTest.as:
package oxcharts {
public class MyTest {
public var x:Number;
I got this error:
Error: Could not resolve <oxcharts:test> to a component implementation.
I guess something wrong with imports. Setting Number property via child tag works just fine.
I'm gonna give a clerear example, I hope it'll help you better understand what I mean let's say I have a custom class named Login:
package ec
[Bindable]
public class Login
public var ID:int;
public var Role:String;
public function Login()
And I need to use this class within MyAmazingCanvas, so my main app will be like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:oxcharts="ec.*">
<mx:Script>
<![CDATA[
import ec.Login;
[Bindable]
private var myLoginStatus:Login=new Login();
private function setLoginData():void{
myLoginStatus.ID=myID.text
myLoginStatus.Role=myRole.text;
]]>
</mx:Script>
<oxcharts:MyAmazingCanvas id="myCustomComp" myPublicNumber="323" LoginStatus="{myLoginStatus}" />
<mx:TextInput id="myID" />
<mx:TextInput id="myRole" />
<mx:Button id="setData" label="Set Data" click="setLoginData()" />
</mx:Application>
When I said at the top level I meant outside the scope of any function, altough is not a requierement, you can as well set it at a function level.
Similar Messages
-
Could not resolve Application to a component implementation.
Hi..
Am getting an error message Could not resolve <Application> to a component implementation. Am trying the following mxml code.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/08/25/saving-files-locally-using-the-filereference-classs-save-method-in-flash-player-10/ -->
<Application name="FileReference_save_test"
xmlns="http://ns.adobe.com/mxml/2009"
xmlns:mx="library:adobe/flex/halo"
xmlns:net="flash.net.*"
layout="flex.layout.BasicLayout"
creationComplete="init();">
<Script>
<![CDATA[
private function init():void {
textArea.text = describeType(FileReference).toXMLString();
private function btn_click(evt:MouseEvent):void {
fileReference.save(textArea.text, "describeType.txt");
]]>
</Script>
<Declarations>
<net:FileReference id="fileReference" />
</Declarations>
<mx:Panel id="panel"
width="500"
height="300"
verticalCenter="0"
horizontalCenter="0">
<mx:TextArea id="textArea"
editable="true"
width="100%"
height="100%" />
<mx:ControlBar horizontalAlign="right">
<Button id="btn"
label="Save Text"
click="btn_click(event);" />
</mx:ControlBar>
</mx:Panel>
</Application>..
Help plz..That's a different topic. Please mark this one as answered (by me ) and start a new topic.
If this post answers your question or helps, please mark it as such. -
Could not resolve br to a component implementation. ???
For some reason im getting an error:
Could not resolve <br> to a component implementation.
for this code which looks fine to me
<s:RichText styleName="blueBackLabel" width="100%" height="35">
<s:content>
mid-end review<br/>date
</s:content>
</s:RichText>Hi Balaji,
try to replace
by -
Could not resolve method to a component implementation
Hello,
I have created an action script class extending httpservice while using in mxml page i am trying to set some requests.
Example
<Utils:CustomHTTPService id="httpGetAllStations" url="Stations.aspx" method="POST" resultFormat="e4x"
result="httpGetAllStationsResultHandler(event)" fault="httpGetAllStationsFaultHandler(event)">
<Utils:request>
<method>{onMove}</method>
</Utils:request>
</Utils:CustomHTTPService>
but this line (<method>{onMove}</method>) throws error(Could not resolve <method> to a component implementation).
How can i resolve this?
Thanks in Advance.yeah, i know that
are you sure you have xmlns:mx="xmlns:mx="http://www.adobe.com/2006/mxml" -
Problems with 3.6 could not resolve s:ViewNavigatorApplication
Hi,
I'm trying to use 3.6 and not having any luck...
I have FB 4.7 (64-bit) on Windows.
I have downloaded from here; http://www.adobe.com/devnet/air/air-sdk-download.html
I have completed the steps here; http://helpx.adobe.com/flash-builder/kb/overlay-air-sdk-flash-builder.html
I have merged the sdk as I would have done for 3.5,3.4 etc.
Now, when I set the SDK to the 3.6 one, I get the error;
"Could not resolve <s:ViewNavigatorApplication> to a component implementation."
_MUST_ be something basic I'm doing wrong here!
Help!
GNow I'm confused.
The text link you mention states that Flex users should take the SDK version without the compiler. BUT....
the http://helpx.adobe.com/flash-builder/kb/overlay-air-sdk-flash-builder.html page says to download the SDK from
http://labs.adobe.com/downloads/asc2.html
but this page now redirects to:
http://helpx.adobe.com/air/kb/archived-air-sdk-version.html
which contains a large list of archived SDK's. So that help page never really says which version of the SDK to use - with or without the compiler. But other forum posts have implied its suppose to be the one with the compiler.
Now since we're overlaying the ...plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK folder that would make sense.
So my questions are:
Do we use the version with or without the compiler to do the overlay?
Can we get Adobe to update that help page to reflect what we're really suppose to do?
AND
Does Flash Builder use this overlaid AIR SDK with any selected Flex SDK as long as the project settings has the 'Include Adobe AIR libraries' checkbox selected?
What if I've configured the Apache 4.9.1 (Doesn't this have AIR SDK 3.4 embedded within it? - yeah I chose that option in the download installer) as my Flex SDK, then will the 'Include Adobe AIR libraries' checkbox still use the AIRSDK 3.6 I just overlaid?
Is it just me, or is this just getting more and more confusing? Can we perhaps get a AIR SDK combo box to go beside the Flex combo box and when we check the 'Include Adobe AIR libraries' then we can select the AIR SDK we want? And get a 'configure AIR SDKs...' link too? -
Could not resolve x to a component implementation problem
Hi,
I have run an example. The code is listed below:
[CODE]
package com.mydomain.components
import mx.controls.Label;
public class CircleLabel extends Label {
public var circleColor:uint = 0x000000;
public function CircleLabel(){
super();
override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
// Draw a circle around the label text
graphics.lineStyle(1, this.circleColor, 1.0);
graphics.drawEllipse(-5,-5,this.width+10,this.height+10);
[/CODE]
[CODE]
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:comps="com.mydomain.components.*"
backgroundColor="#FFFFFF" >
<mx:Panel title="CircleLabel Component" width="500"
height="90"
paddingTop="10" paddingLeft="10" paddingRight="10"
paddingBottom="10"
layout="horizontal">
<comps:CircleLabel text="Black Circle Label"
circleColor="0x000000" />
<mx:Spacer width="20" />
<comps:CircleLabel text="Red Circle Label"
circleColor="0xFF0000" />
</mx:Panel>
</mx:Application>
[/CODE]
I am using Flex Builder 2.0.1. These file are put in the same
Flex project and in the same folder. When I compilled them, there
was an error: Could not resolve <comps:CircleLabel> to a
component implementation.
Please help me to solve this problem.
Thank in advance,
Ducto be more clear CircleLabel component should be under
com/mydomain/components cirectory -
Fundamental Problem: ORA-12154: TNS:could not resolve service name
Hello,
I am faced with a fundamental problem:
ORA-12154: TNS:could not resolve service name
I can say with a high level of confidence that the TNSNAMES.ora configuration file is not the problem. My peer is using the exact same file with no issues. I am using the TOAD database utility to connect to the db host. Also, I have ORACLE_HOME defined and the file is located in /network/ADMIN.
Any ideas?Hello,
Make sure your toad looking into right tnsnames.ora; also try this from command line after adding following entry to your tnsnames.ora.
sqlplus username/password@ECDEV
ECDEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = rscdd01) --> you can try ipaddress of your server name as well
(PORT = 1521)
(SDU = 8192)
(CONNECT_DATA =
(SERVICE_NAME =ECDEV)
(INSTANCE_NAME=ECDEV)
)Edited by: OrionNet on Dec 23, 2008 2:22 PM -
Problem with Java Memory "Could not reserve enough space for object heap"
Hi gurus,
I am not an expert with Java´s configuration, and I have a situation that I don´t understand. First of all, I am working at Centos 6.2 with jdk_1.6 and Tomcat 7.
The problem is...
- If I run Tomcat with JAVA_OPTS="-Xmx128m"* (at catalina.sh) all works fine.
- If I run Tomcat with JAVA_OPTS="-Xmx512m"* (at catalina.sh) an error appears:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
This appear when I run java -version or when I try to stop Tomcat, and the Tomcat isn´t able to stop.
The strange thing is that my server has more than 200M free in physical memory. So, why Tomcat isn´t able to stop? and Why Java doesn´t use the free memory in my server?
Thanks in advanced.Hello EJP, thanks for your answer.
I have explained bad.
The server has 703M free when Tomcat is stopped. I had mentioned that my server has more than 200M free in physical memory when Tomcat is running with JAVA_OPTS="-Xmx512m", so I don´t understand why these errors appear.
Do you understand me?
Recently I have checked the swap memory, and it is disabled. In spite of swap memory is disabled I think java wouldn´t need this memory because it has free physical memory
Thanks again. -
Problem with FX (CS6) "Could not complete your request due to a program error."
This only happened after I got the master collection. FX effects in Photoshop CS6 do not work, at all. Attempting to use any of them result in the above quoted "Could not complete your request due to a program error."
I've trashed the prefs, uninstalled/reinstalled, updated drivers, REFORMATTED MY HARD DRIVE, contacted customer support, and about every other troubleshoot short of sacraficing a goat. No cigar.
Error log gives me the following:
" ..\..\sources\UPattern.cpp : 1670 : REQUIRE failed"
Same error, every time.
Windows 7, 64x
16gb DDR3
AMD FX(tm)-4100 Quad-Core Processor [3.61 GHz]
AMD Radeon HD 7800 Series
Not running this 'Suitcase' thing. At a complete loss.Removing the whole folder worked, which, is good enough for me. I think what happened was a finaggle with the install, as I already had PS installed when I overlayed the master collection on top of it, still doesn't explain it not working after the reformat, might have been linked to my backup/scratch disk in some fashion and broke it. I'm not quite sure how the problem persisted.
Don't install ps over ps, I guess ^^
Aha, it was Prefs.
Thank you! Greatly, been sitting on this problem for months now, no ammount of Googling would help. I can finally go back to work (that I've been sitting on this whole time). -
Problem with deploying : SDM could not start the J2EE cluster on the host .
Hello, All
I have following problem with deploying the aplication I get this messenger:
16/09/2008 07:59:44 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:
[001]Deployment aborted
Settings
SDM host : 192.168.0.14
SDM port : 50018
URL to deploy : file:/C:/DOCUME1/PENITU1/LOCALS~1/Temp/temp47114ZChangeRequestDatabase.ear
Result
=> deployment aborted : file:/C:/DOCUME1/PENITU1/LOCALS~1/Temp/temp47114ZChangeRequestDatabase.ear
Aborted: development component 'ZChangeRequestDatabase'/'local'/'LOKAL'/'0.2008.05.03.04.24.17'/'0':
SDM could not start the J2EE cluster on the host Jupiter! The online deployment is terminated. There is no cluster control instance running on host Jupiter which is described in SecureStorage . The instances, returned by MessageServer [MS host: Jupiter; MS port: 3901], are :|Name:JM_T1221612526745_0_penitus15 |Host:PENITUS15 |State:5|HostAddress:192.168.0.205||Name:JM_T1221612357814_0_Jupiter |Host:pfs |State:5|HostAddress:192.168.0.14||Name:JC_Jupiter_JTP_00 |Host:pfs |State:5|HostAddress:192.168.0.14|Please check if there is an appropriate running cluster instances.
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
Deployment exception : The deployment of at least one item aborted
I dont'n know How do I solver this error?
- I reviewed the virtual memory and I increase the virtual memory
- I restarted the server and the system
- I reviwed the parameter in the config tool --> cluster --> security storage it is OK
Any suggestion for solver this problem
Thanks
Regards
DSI found this messenger in Additional log information., Please si
17/09/2008 03:04:51 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] INFO:
[004]Additional log information about the deployment
<!LOGHEADER[START]/>
<!HELP[Manual modification of the header may cause parsing problem!]/>
<!LOGGINGVERSION[1.5.3.7185 - 630]/>
<!NAME[C:\usr\sap\JTP\JC00\SDM\program\log\sdmcl20080917200328.log]/>
<!PATTERN[sdmcl20080917200328.log]/>
<!FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %s: %m)]/>
<!ENCODING[Cp1252]/>
<!LOGHEADER[END]/>
Sep 17, 2008 1:04:40 PM Info: -
Starting deployment -
Sep 17, 2008 1:04:40 PM Info: Error handling strategy: OnErrorStop
Sep 17, 2008 1:04:40 PM Info: Prerequisite error handling strategy: OnPrerequisiteErrorStop
Sep 17, 2008 1:04:40 PM Info: Update strategy: UpdateAllVersions
Sep 17, 2008 1:04:40 PM Info: Starting deployment prerequisites:
Sep 17, 2008 1:04:40 PM Info: Loading selected archives...
Sep 17, 2008 1:04:40 PM Info: Loading archive 'C:\usr\sap\JTP\JC00\SDM\program\temp\temp62604ZIssueDatabase.ear'
Sep 17, 2008 1:04:41 PM Info: Selected archives successfully loaded.
Sep 17, 2008 1:04:41 PM Info: Actions per selected component:
Sep 17, 2008 1:04:41 PM Info: Initial deployment: Selected development component 'ZIssueDatabase'/'local'/'LOKAL'/'0.2008.04.17.10.53.03'/'0' will be deployed.
Sep 17, 2008 1:04:41 PM Info: Ending deployment prerequisites. All items are correct.
Sep 17, 2008 1:04:43 PM Error: Unable to compare host[Jupiter] and host[PENITUS15] Throwable: java.net.UnknownHostException Throwable message: PENITUS15: PENITUS15
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs: pfs
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
Sep 17, 2008 1:04:45 PM Info: Saved current Engine state.
Sep 17, 2008 1:04:45 PM Info: Starting: Initial deployment: Selected development component 'ZIssueDatabase'/'local'/'LOKAL'/'0.2008.04.17.10.53.03'/'0' will be deployed.
Sep 17, 2008 1:04:45 PM Info: SDA to be deployed: C:\usr\sap\JTP\JC00\SDM\root\origin\local\ZIssueDatabase\LOKAL\0\0.2008.04.17.10.53.03\temp62604ZIssueDatabase.ear
Sep 17, 2008 1:04:45 PM Info: Software type of SDA: J2EE
Sep 17, 2008 1:04:45 PM Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[PENITUS15] Throwable: java.net.UnknownHostException Throwable message: PENITUS15
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
Sep 17, 2008 1:04:45 PM Info: Starting cluster instance processes.
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[PENITUS15] Throwable: java.net.UnknownHostException Throwable message: PENITUS15
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
Sep 17, 2008 1:04:45 PM Error: Unable to compare host[Jupiter] and host[pfs] Throwable: java.net.UnknownHostException Throwable message: pfs
Sep 17, 2008 1:04:45 PM Error: An error occured while starting a cluster instance.
Sep 17, 2008 1:04:45 PM Error: There is no clutser control instance running on host Jupiter which is described in SecureStorage .
The instances, returned by MessageServer [MS host: Jupiter; MS port: 3901], are :
Name:JM_T1221672404781_2_penitus15
Host:PENITUS15
State:5
HostAddress:192.168.0.215
Name:JM_T1221679486171_0_Jupiter
Host:pfs
State:5
HostAddress:192.168.0.14
Name:JC_Jupiter_JTP_00
Host:pfs
State:5
HostAddress:192.168.0.14
Please check if there is an appropriate running cluster instances.
Sep 17, 2008 1:04:45 PM Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
Sep 17, 2008 1:04:45 PM Error: Aborted: development component 'ZIssueDatabase'/'local'/'LOKAL'/'0.2008.04.17.10.53.03'/'0':
SDM could not start the J2EE cluster on the host Jupiter! The online deployment is terminated.
There is no clutser control instance running on host Jupiter which is described in SecureStorage .
The instances, returned by MessageServer [MS host: Jupiter; MS port: 3901], are :
Name:JM_T1221672404781_2_penitus15
Host:PENITUS15
State:5
HostAddress:192.168.0.215
Name:JM_T1221679486171_0_Jupiter
Host:pfs
State:5
HostAddress:192.168.0.14
Name:JC_Jupiter_JTP_00
Host:pfs
State:5
HostAddress:192.168.0.14
Please check if there is an appropriate running cluster instances.
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).STARTUP_CLUSTER)
Sep 17, 2008 1:04:45 PM Info: Starting to save the repository
Sep 17, 2008 1:04:46 PM Info: Finished saving the repository
Sep 17, 2008 1:04:47 PM Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.
Sep 17, 2008 1:04:47 PM Error: -
At least one of the Deployments failed -
Any help will be well received about this problema
Thk
Regards
DS -
Problem with Language Import (could not create cofile)
Hi everybody
I'm trying to load the language pack "Spanish", but falls and gives me the following message
"could not create cofile"
Somebody could give me some indication on how to overcome this mistake, I've seen out there and some queries, but I have not overcome my problem!
I have created the "Transport System" and charged the language in "DEV Server," but I can not bring it to "test" if the attempt to import "TCode SMLT" gives me the error above.
thanksthis is action log!
@5B\QInformation@ Start import (state:initial)
@5B\QInformation@ ... system date: 23.08.2008 system time: 16:38:07
@5B\QInformation@ Version: 700.F.15
@5B\QInformation@ Step INIT ...
@5B\QInformation@ ... system date: 23.08.2008 system time: 16:38:07
@5B\QInformation@ ... configuration "Selective Language Import"
@5B\QInformation@ ... executed successfully
@5B\QInformation@ Step DISASSEMBLE ...
@5B\QInformation@ ... system date: 23.08.2008 system time: 16:38:07
@5B\QInformation@ ... do not overwrite data files and cofiles (settings)
@5C\QError@ Could not create cofile
@5B\QInformation@ Restart import (state:lc_disassemble)
@5B\QInformation@ ... system date: 23.08.2008 system time: 16:46:21
@5B\QInformation@ Step DISASSEMBLE ...
@5B\QInformation@ ... system date: 23.08.2008 system time: 16:46:21
@5B\QInformation@ ... do not overwrite data files and cofiles (settings)
@5C\QError@ Could not create cofile
@5B\QInformation@ Restart import (state:lc_disassemble)
@5B\QInformation@ ... system date: 23.08.2008 system time: 17:05:01
@5B\QInformation@ Step DISASSEMBLE ...
@5B\QInformation@ ... system date: 23.08.2008 system time: 17:05:01
@5B\QInformation@ ... do not overwrite data files and cofiles (settings)
@5C\QError@ Could not create cofile
Test in STMS
RFC connections Ok
Connection Test Ok
Transport Tool Ok
Transport Directory Ok
Check Transport Directory 24.08.2008 18:49:28
ECP System ECP
Transport Directory
bin
mts-sap\sapmnt\trans\bin
buffer
mts-sap\sapmnt\trans\buffer
cofiles
mts-sap\sapmnt\trans\cofiles
data
mts-sap\sapmnt\trans\data
log
mts-sap\sapmnt\trans\log
sapnames
mts-sap\sapmnt\trans\sapnames
tmp
mts-sap\sapmnt\trans\tmp -
Could not resolve to a component implementation
I'm using Flex Builder 2 Version 2.0.143459 (Geez, couldn't
you just make it 2.0.144?) and I am running Eclipse version 3.2.1
and I have Flex Charting 2 installed also.
Now, I downloaded the example for "dashboard" that has the
various graphs, and when I go and create these files and copy in
the contents into my eclipse project I get:
Could not resolve <AllRegions> to a component
implementation.
Could not resolve <RegionBreakdown> to a component
implementation.
Could not resolve <RegionDetail> to a component
implementation.
It seems to be something with the namespace? But what is the
solution? I've search these boards and people say uninstall Beta 1,
etc, but I am not running a Beta, AND this is a fresh install for
any Flex at all.
Thanks for any helpOK, I solved the problem -- it was a simple item that got
left out of the top <mx:Application tag
I needed to have xmlns="*" in there, and eclipse does not put
that there when you start a project!
Hopefully this helps someone in the future. -
Could not resolve fx:Script (or fx: Declarations to a component implementation
Hi,
I am trying to compile a file into swf using mxmlc in command line. When it is a very simple mxml, compile is successful. But when the file contaion the fx name space, I get a compile error like: could not resolve COMPONENT_NAME to a component implementation.
I have to be able to do this, without the help of Flash Builder because I am working on a project where I will need to generate swf files from mxml files which we generate the code of.
I tried it with SDK version 4.0.0., version 4.1.0 build 16076 and 4.5.0. build 20967. And I also tried it in 3 different computers. Note: Our notebooks has Windows 7 OS - locale:Turkish.
I read that this error is specific to some locales like Turkish here: http://forums.adobe.com/message/892431#892431, . But I couldnt find the solution.
Any suggestions?
The simple code I am trying to compile is(which is generated by Flash Builder 4 and can be compiled there):
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
</s:Application>Could you please file a bug at http://bugs.adobe.com/jira with sample code that fails to compile on a Turkish system, so that we can track this problem and fix it in a future release?
Gordon Smith
Adobe Flex SDK Team -
Error: "Could not resolve [public class] to a component implementation
Here's another clueless newbie question! :-(
I define a public class "DynamicTextArea" at the top of the file, and get the compiler error message "Could not resolve <DynamicTextArea> to a component implementation" at the bottom of the same file.
Clearly, I don't understand something very basic.
(The code between the commenrted asterisks was originally in a separate package file, which I couldn't get either mxmlc or FlexBuilder to find, so rather than fight that issue now, I moved it into the same file.)
Here's the file:
<?xml version="1.0" encoding="utf-8" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
>
<!--****************************************************************-->
<mx:Script>
<![CDATA[
import flash.events.Event;
import mx.controls.TextArea;
public class DynamicTextArea extends TextArea{
public function DynamicTextArea(){
super();
super.horizontalScrollPolicy = "off";
super.verticalScrollPolicy = "off";
this.addEventListener(Event.CHANGE, adjustHeightHandler);
private function adjustHeightHandler(event:Event):void{
trace("textField.getLineMetrics(0).height: " + textField.getLineMetrics(0).height);
if(height <= textField.textHeight + textField.getLineMetrics(0).height){
height = textField.textHeight;
validateNow();
override public function set text(val:String):void{
textField.text = val;
validateNow();
height = textField.textHeight;
validateNow();
override public function set htmlText(val:String):void{
textField.htmlText = val;
validateNow();
height = textField.textHeight;
validateNow();
override public function set height(value:Number):void{
if(textField == null){
if(height <= value){
super.height = value;
}else{
var currentHeight:uint = textField.textHeight + textField.getLineMetrics(0).height;
if (currentHeight<= super.maxHeight){
if(textField.textHeight != textField.getLineMetrics(0).height){
super.height = currentHeight;
}else{
super.height = super.maxHeight;
override public function get text():String{
return textField.text;
override public function get htmlText():String{
return textField.htmlText;
override public function set maxHeight(value:Number):void{
super.maxHeight = value;
]]>
</mx:Script>
<!--****************************************************************-->
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private var str:String = "This text will be long enough to trigger " +
"the TextArea to increase its height.";
private var htmlStr:String = "This <b>text</b> will be <font color='#00FF00'>long enough</font> to trigger " +
"the TextArea to increase its height.";
private function setLargeText():void{
txt1.text = str;
txt2.text = str;
txt3.text = str;
txt4.text = str;
txt5.htmlText = htmlStr;
txt6.htmlText = htmlStr;
txt7.htmlText = htmlStr;
txt8.htmlText = htmlStr;
]]>
</mx:Script>
<DynamicTextArea id="txt1" width="300" height="14"/>
<DynamicTextArea id="txt2" width="300" height="20"/>
<DynamicTextArea id="txt3" width="300" height="28"/>
<DynamicTextArea id="txt4" width="300" height="50"/>
<DynamicTextArea id="txt5" width="300" height="14"/>
<DynamicTextArea id="txt6" width="300" height="20"/>
<DynamicTextArea id="txt7" width="300" height="28"/>
<DynamicTextArea id="txt8" width="300" height="50"/>
<mx:Button label="Set Large Text" click="setLargeText();"/>
</mx:Application>
Thanks for any insight you can provide!
HarveyGordon:
As you've noted, there were multiple misunderstandings.
Some are due to references in the language which are different from uses in pre-existing languages.
Take "name spaces". They look like URLs but they're not. One of the first errors I made when starting Flex was to try to browse to http://www.adobe.com/2006/mxml. I figured that it would have some description of the language. But it didn't. In spite of LOOKING like a URL, it doesn't point to anything; it's really just an arbitrary magic incantation, like "Open Sesame".
But, then when I wanted to use my OWN namespace, I find that it's NOT arbitrary, and does have to point to something, but it's still not a URL. The "AHA" moment was when Michael told me that "*" means "look in this directory for a file with the name later named in an import statement, but not named here". And if the file was in subfolder "X" I'd have to use "X.*", while if it were a URL I'd use slash instead of dot, but never an asterisk.
When the language syntax is so contrary to the expectations of people coming from a declarative language or web programming background, I think it is important to explicitly address the differences and disabuse them of their preconceptions. I think the same should apply to the ways in which ActionScript differs from ECMAScript.
Another problem adding to my confusion is the habit of naming variables with the names of keywords but with capitalization changes. Not only does that set readers up for subtle "gotchas", but makes it unclear which names are truly arbitrary, and which are required by the compiler.
It might be a good idea to have a convention of an identifiable format for user variables. Many authors use names like myButton for that purpose.
It would also be helpful if printed text could simulate the syntax coloring of the better editors, or at least have more in-source comments saying exactly what each line does. (Or both)
Another aid to understanding would be to provide a reference to the alternative (MXML or AS) way of doing anything, whenever you demonstrate one of the ways.
I find that the emphasis on using FlexBuilder distracts from a sense of what is really going on behind the scenes. E,g.: If FlexBuilder automatically sets up the folder structure, I don't learn to do it myself. I like to work at the code level, so when something goes wrong I don't have to worry about what level it went wrong at.
Also, not everyone is willing to drop $600 or $250 BEFORE they've learned whether they even like Flex. Your tutorials are, by definition, addressed to newcomers who may well not yet have committed to the expense of FlexBuilder. So more emphasis on using mxmlc would be nice. It would also be helpful to discuss how to use local servers, like Tomcat, during the development stage.
Thanks for asking my opinion. I'm afraid that my 40 years of programming experience may make it harder for me to adapt to this new style of programming than it would be for a kid with a tabula rasa. But, it looks like it'll be fun once I get over the hump!
Harvey -
I am getting an error message "Could not resolve <Script>
to a component implementation." This is the code I am attempting to run, from
the tutorials offered by Adobe.
<Script>
{import mx.controls.Alert;}
</Script>
I've tried this without brackets, with <> symbols, around the import, and everytime I get an error. any suggestions? I'm brand new to flex, but for the most part find it rather simple to do. however, when i get an error it's impossible to figure out how to fix it!the <fx:Script> worked. Thanks!!
Maybe you are looking for
-
I have the newest version of itunes how do you transfer everything from my old 4s to my new iphone 5
-
Hi experts... Please ...SomeBody can help-me in this Questions ??? I need to pay to use the API JCO to make integration with SAP Systems and NO-SAP Systems ???? Or simply ....I enter in the marketPlace and download this API to use ??? Only this Frien
-
Compressor 4 not compressing the video, only audio.
Hi, I send my video to Compressor 4 from Final Cut Pro X for encoding into MPEG-2 for a DVD Compressor encodes the audio but fails on the video. Before sending my video to compressor I deleted all render files and re-rendered the video, doing that ma
-
Establishing Enterprise Users Under OracleAS 10gR3
I'm interested in establishing 10gR2 database users as "Schema-Independent Global Users" as identified in the Database Administrators Guide. The reason for this is that our web-based application currently uses the "One Big Application User Approach"
-
Really Weird Problem, IDK How to Fix
So just this morning i pulled out my MacBook like every morning to see whats up on the internet when for reason my computer starting having this little black box around whatever im active in. like right now its around the yellow - to minimize firefox