You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by piotrz <pi...@gmail.com> on 2017/03/06 20:43:20 UTC

[FlexJS] Cannot use my custom UIBase type class in mxml

Hi,

I'm not sure what I'm doing wrong but I was trying to extend my class by
another class UIBase type and usit in mxml. 

class MyBaseClass extends UIBase {}

class MyCustomClass extends MyBaseClass {}

<my:MyCustomClass /> - I got an error:  

"This tag could not be resolved to an ActionScript class. It will be
ignored."

Am I doing something wrong ?

Piotr





-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-custom-UIBase-type-class-in-mxml-tp60179.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by piotrz <pi...@gmail.com>.
I was trying to fix build, but it seems that I will need some help. Tomorrow
my time I will push branch with changes in MDL and in FlexTeamPage_MDL
example. 

If someone could take a look. 

Thanks,
Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-custom-UIBase-type-class-in-mxml-tp60179p60181.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by piotrz <pi...@gmail.com>.
Josh!

Ahh! That was so stupid :) I was to tired! :) Thank you! That was it! :)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-custom-UIBase-type-class-in-mxml-tp60179p60193.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by Josh Tynjala <jo...@gmail.com>.
In the FlexJS SDK, the source path for each project is usually
src/main/flex instead of simply src. It looks like you accidentally have it
set to src, so main.flex is incorrectly being added to the package name. I
think MaterialIconWithFontAwesome is supposed to be in the itemRenderers
package and not the main.flex.itemRenderers package.

- Josh

On Mon, Mar 6, 2017 at 3:09 PM, piotrz <pi...@gmail.com> wrote:

> That's pointing to the folder which contains two files:
>
> xmlns:itemrenderers="main.flex.itemRenderers.*"
>
> MemberItemRenderer
> MaterialIconWithFontAwesome
>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-
> development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-
> custom-UIBase-type-class-in-mxml-tp60179p60191.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by Alex Harui <ah...@adobe.com>.
I think you might have the wrong package structure?

The examples are generally set up with sources in src/main/flex, not in
src.  That's a relatively recent change.  So the package for
MaterialIconWithFontAwesome is probably just "itemRenderers" and the usage
in MXML is probably:

xmlns:itemrenderers="itemRenderers.*"


HTH,
-Alex

On 3/6/17, 3:09 PM, "piotrz" <pi...@gmail.com> wrote:

>That's pointing to the folder which contains two files:
>
>xmlns:itemrenderers="main.flex.itemRenderers.*"
>
>MemberItemRenderer
>MaterialIconWithFontAwesome
>
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-
>custom-UIBase-type-class-in-mxml-tp60179p60191.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by piotrz <pi...@gmail.com>.
That's pointing to the folder which contains two files:

xmlns:itemrenderers="main.flex.itemRenderers.*"

MemberItemRenderer
MaterialIconWithFontAwesome

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-custom-UIBase-type-class-in-mxml-tp60179p60191.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by Alex Harui <ah...@adobe.com>.
What is the xmlns:itemrenderers set to?

Thanks,
-Alex

On 3/6/17, 2:42 PM, "piotrz" <pi...@gmail.com> wrote:

>It's probably correct and I did changes in MDL which seems to silly.
>
>I've introduced IMaterialIconBase - empty interface
>
><mdl:materialIcon> - Now this tag is IMaterialIconBase.
>
>I've created in FlexTeamPage_MDL example class [1] and I used it [2] and I
>ended up with errors. [3]
>
>[1] https://paste.apache.org/TBqg
>[2] https://paste.apache.org/i9oS
>[3] https://paste.apache.org/VTwE
>
>Piotr
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-
>custom-UIBase-type-class-in-mxml-tp60179p60189.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by piotrz <pi...@gmail.com>.
It's probably correct and I did changes in MDL which seems to silly.

I've introduced IMaterialIconBase - empty interface 

<mdl:materialIcon> - Now this tag is IMaterialIconBase. 

I've created in FlexTeamPage_MDL example class [1] and I used it [2] and I
ended up with errors. [3]

[1] https://paste.apache.org/TBqg
[2] https://paste.apache.org/i9oS
[3] https://paste.apache.org/VTwE

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-custom-UIBase-type-class-in-mxml-tp60179p60189.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by Alex Harui <ah...@adobe.com>.

On 3/6/17, 1:55 PM, "piotrz" <pi...@gmail.com> wrote:

>Alex,
>
>I know about that. But let's leave for a moment above problems. I was
>started to change things cause in FlexTeamPage_MDL example we are getting
>following error. I've paste also code which causes it.
>
> <mdl:materialIcon> - This tag has type MaterialIconBase and FontAwesome
>is
>some different type. Both extends UIBase. Earlier compilator didn't faile
>cause of this - Not sure what has changed.

Are you using the develop branch or dual?

The error in [1] looks correct to me.  Button has a property called
"materialIcon" that is of type "MaterialIconBase".  FontAwesomeIcon
extends UIBase, not MaterialIconBase.

HTH,
-Alex

>
>[1] https://paste.apache.org/2Rf4
>
>Piotr


Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by piotrz <pi...@gmail.com>.
Alex,

I know about that. But let's leave for a moment above problems. I was
started to change things cause in FlexTeamPage_MDL example we are getting
following error. I've paste also code which causes it. 

 <mdl:materialIcon> - This tag has type MaterialIconBase and FontAwesome is
some different type. Both extends UIBase. Earlier compilator didn't faile
cause of this - Not sure what has changed.

[1] https://paste.apache.org/2Rf4

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-custom-UIBase-type-class-in-mxml-tp60179p60184.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Cannot use my custom UIBase type class in mxml

Posted by Alex Harui <ah...@adobe.com>.
What is "my" set to?

For classes in a SWC, we typically put them in a manifest, and "my"
references the URI mapping for the manifest.
For classes not in a manifest, "my" has to point to the package.

HTH,
-Alex

On 3/6/17, 12:43 PM, "piotrz" <pi...@gmail.com> wrote:

>Hi,
>
>I'm not sure what I'm doing wrong but I was trying to extend my class by
>another class UIBase type and usit in mxml.
>
>class MyBaseClass extends UIBase {}
>
>class MyCustomClass extends MyBaseClass {}
>
><my:MyCustomClass /> - I got an error:
>
>"This tag could not be resolved to an ActionScript class. It will be
>ignored."
>
>Am I doing something wrong ?
>
>Piotr
>
>
>
>
>
>-----
>Apache Flex PMC
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Cannot-use-my-
>custom-UIBase-type-class-in-mxml-tp60179.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.