Monday, March 22, 2010

Flex mxmlc errorformat help

I had asked for some help with the output from the Flex mxmlc compiler
output and your responses got me a bunch closer. I have a few issues
remaining.

1st issue.

The Errors can be of 2 formats, one with col: and one without. I am
not certain how to conditionally check for it.
1. ...\factories\AfariaComponentFactory.as(29): col: 58 Error:
Implicit coercion
2. ..\factories\AfariaComponentFactory.as(29): Error: Implicit coercion

2nd issue, Warnings can also be listed, which should also follow the
same rules as the Error.

3rd issue, there can be a bunch of additional output before the
compiling begins.

The initial response I received used the following:
setlocal errorformat=
\%-GLoading\ configuration\ file,
\%E%f(%l):\ \ Error:\ %m,
\%W%f(%l):\ Warning:\ %m,
\%+C%.%#

To address the 1st and 2nd issues (col: 23) I changed it to:

setlocal errorformat=
\%-GLoading\ configuration\ file,
\%E%f(%l):\ col:\ %c\ Error:\ %m%Z,
\%W%f(%l):\ col:\ %c\ Warning:\ %m%Z,
\%+C%.%#


I wasn't sure how to address the 3rd issue.

When I look at the quickfix output, it appears on the last error
message (which incidently doesn't have the (col: 23 optional output) )
it is correctly picked up and I can click on the error and it takes me
to the source. All the other error messages are just text (sample at
bottom).

Here is the output from mxmlc with a bunch of preample before the
comipler kicks in:
*******************
flex.debug:

init:

flex.compile:
[echo] Ant home = c:\Jakarta\apache-ant-1.7.0
[echo] Flex home = C:\Programs\Adobe\FlexBuilder3\sdks\3.3.0
[echo] compile to = C:\src/bin-debug
[echo] debug flags set? => true
[echo] VERSION_NUMBER = 2.1.0
[echo] BUILD_NUMBER = 0008
[echo] INTERNAL Build = 2010.03.22.22.17.24
[mxmlc] Loading configuration file
C:\Programs\Adobe\FlexBuilder3\sdks\3.3.0\frameworks\flex-config.xml

[mxmlc] C:\src\factories\ProductComponentFactory.as(29): col: 58
Error: Implicit coercion of a value of type
myproj.constants:ProductComponent to an unrelated type
myproj.constants:PolicyType.
[mxmlc]
[mxmlc] productComponentVO.policyType =
ProductComponent.getType(xml.@PolicyTypeCode);
[mxmlc]
^
[mxmlc]
[mxmlc] C:\src\factories\ProductComponentFactory.as(32): col: 27
Error: Access of possibly undefined property policyTypeCode through a
reference with static type myproj.vo:ProductComponentVO.
[mxmlc]
[mxmlc] (productComponentVO.policyTypeCode == null
[mxmlc] ^
[mxmlc]
[mxmlc] C:\src\factories\ProductComponentFactory.as(33): col: 29
Error: Access of possibly undefined property policyTypeCode through a
reference with static type myproj.vo:ProductComponentVO.
[mxmlc]
[mxmlc] || productComponentVO.policyTypeCode == ""))
[mxmlc] ^
[mxmlc]
[mxmlc] C:\src\views\reports\Policies.mxml(64): Error: Access of
possibly undefined property policyType through a reference with static
type myproj.events:DevicePolicyDetailGetEvent.
[mxmlc]
[mxmlc] dpdge.policyType =
(policyGrid.selectedItem as DevicePolicyVO).policyType;
[mxmlc]
*******************


Here is the output show in the quick fix window:
*******************
|| flex.debug:
||
|| init:
||
|| flex.compile:
|| Ant home = c:\Jakarta\apache-ant-1.7.0
|| Flex home = C:\Programs\Adobe\FlexBuilder3\sdks\3.3.0
|| compile to = C:\/bin-debug
|| debug flags set? => true
|| VERSION_NUMBER = 2.1.0
|| BUILD_NUMBER = 0008
|| INTERNAL Build = 2010.03.22.22.15.59
|| Loading configuration file
C:\Programs\Adobe\FlexBuilder3\sdks\3.3.0\frameworks\flex-config.xml
|| C:\src\factories\ProductComponentFactory.as(29): col: 58 Error:
Implicit coercion of a value of type myproj.constants:ProductComponent
to an unrelated type myproj.constants:PolicyType.
||
|| productComponentVO.policyType =
ProductComponent.getType(xml.@PolicyTypeCode);
|| ^
||
|| C:\src\factories\ProductComponentFactory.as(32): col: 27 Error:
Access of possibly undefined property policyTypeCode through a
reference with static type myproj.vo:ProductComponentVO.
||
|| (productComponentVO.policyTypeCode == null
|| ^
||
|| C:\src\factories\ProductComponentFactory.as(33): col: 29 Error:
Access of possibly undefined property policyTypeCode through a
reference with static type myproj.vo:ProductComponentVO.
||
|| || productComponentVO.policyTypeCode == ""))
|| ^
||
\src\views\reports\Policies.mxml|64 error| Access of possibly
undefined property policyType through a reference with static type
myproj.events:DevicePolicyDetailGetEvent. dpdge.policyType =
(policyGrid.selectedItem as DevicePolicyVO).policyType; BUILD FAILED
C:\\build.xml:172: The following error occurred while executing this
line: C:\\build.xml:229: mxmlc task failed Total time: 25 seconds
*******************

You can see via the ||, that all the lines above the last are comments
(or unparsed).

Thanks in advance for any help you provide.

Dave

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: