RE: [flexcoders] ActionScript Components

2005-04-22 Thread Stephen Gilson
Title: Message





Excuse me for the late reply, but you are coming across a 
known limitation when creating an MXML component that uses a container as its 
base tag. If you define the mxml component to contain a child, you cannot add a 
child to it when you use the tag. In order to be able to add children to 
panel.mxml, you must not define any children within the definition. Here's the 
doc on it:

http://livedocs.macromedia.com/flex/15/flex_docs_en/0455.htm 


Stephen


From: Erik Westra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 11:03 AMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] ActionScript 
Components

Well, flex is whining about subclassing mxml components 
wich have children with other mxml components containing 
children:

The component 
mx.controls.Button may not be used as a child of erik.extend.panel because the 
erik.extend.panel is a container with internal children.
[panel.mxml]
mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Button 
label="crazy" //mx:Panel

[panelSub.mxml]
panel xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="erik.extend.*"mx:Button label="yellow" 
//panel

Greetz 
Erik




From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 16:48To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

Can you be more specific? I don't have any 
problems sub-classes my MXML components.

- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 5:42 AM
Subject: RE: [flexcoders] ActionScript Components

A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: 
RE: [flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] ActionScript Components

2005-04-07 Thread Gordon Smith
Title: Message





It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  
  -Original Message-From: Matthew Shirey 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 9:33 
  AMTo: flexcoders@yahoogroups.comSubject: Re: 
  [flexcoders] ActionScript Components
  Wow, that's a great article. It seems that custom 
  components in ActionScript can get quite complex. Is it really the 
  recommended way to create custom components if you can? Creating them as 
  mxml + as files has been pretty easy up to this point, even if it is 
  abit messy. Is this more a matter of preference or are there 
  actual performance and possibly maintenance reasons for using pure 
  ActionScript for creating components?
  
  -- Matthew
  On Apr 6, 2005 8:27 AM, Stephen Gilson [EMAIL PROTECTED] 
  wrote: 
  
There 
are articles on the Macromedia web site that you can 
use:

Creating 
Advanced Components: http://www.macromedia.com/support/documentation/en/flex/1_5/createcomponents/index.html

Flex 
Component Basics -two part article 

 Part 1: http://www.macromedia.com/devnet/flex/articles/creating_comp.html
 Part 2: http://www.macromedia.com/devnet/flex/articles/creating_comp_pt2.html

Stephen 




From: Matthew Shirey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 05, 2005 8:09 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] 
ActionScript Components


Might someone point me in the direction of some good 
docs/examples of creating components using ActionScript. I have the 
RIA book and chapter 10 has some information, but its disappointingly 
sparse. Mostly I am interested in how to create a composite 
component. A component containing many other components. The 
examples I have seen so far simply extend a given component and alter its 
behavior.Right now I am creating all of my components in MXML 
with a separate file for their ActionScript. It's starting to get a 
bit messy for complex components. Any kind of a boot in 
the right direction would be helpful. Thanks!

-- Matthew

Yahoo! Groups Links

  To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
  Service. 







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] ActionScript Components

2005-04-07 Thread Erik Westra
Title: Message





A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: RE: 
[flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] ActionScript Components

2005-04-07 Thread Jose Lora
Title: Message










Not sure about that, Ive have a
hierarchy of custom mxml component where the children inherit behavior from
parents, so I think you can extend mxml components 











From: Erik Westra
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005
4:43 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ActionScript Components





A good reason to make pure actionscript
components is that they can be subclassed. 



When u create an mxml component, u cant
extends a custom mxml component wich has children.



Greetz Erik









From: Gordon
Smith [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 9:04
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] ActionScript
Components



It is essentially a matter of preference.
There are no performance differences that I know of.











I generally recommend
creatingcomponents in MXML because it makes several things easier, such
as creating internal subcomponents, laying them out, and assigning event
handlers to them.For example, if I was creating a LoginPanel, I would
certainly do it in MXML.











Can you explain what is a bit
messy about MXML components?











- Gordon














Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.












RE: [flexcoders] ActionScript Components

2005-04-07 Thread Erik Westra
Title: Message





Well, flex is whining about subclassing mxml components 
wich have children with other mxml components containing 
children:

The component 
mx.controls.Button may not be used as a child of erik.extend.panel because the 
erik.extend.panel is a container with internal children.
[panel.mxml]
mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Button 
label="crazy" //mx:Panel

[panelSub.mxml]
panel xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="erik.extend.*"mx:Button label="yellow" 
//panel

Greetz 
Erik




From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 16:48To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

Can you be more specific? I don't have any 
problems sub-classes my MXML components.

- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 5:42 AM
Subject: RE: [flexcoders] ActionScript Components

A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: 
RE: [flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] ActionScript Components

2005-04-07 Thread JesterXL
Title: Message





That doesn't look like the correct way to do a 
namespace; I'm still learning the freedom of syntax, so bare with me. It 
appears your colliding your namespace with the mx one. Instead, make your 
own; where you have xmlns="erik.extend" I changed it to 
xmlns:ew="erik.extend".

Try that.


ew:panel xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:ew="erik.extend.*"mx:Button 
label="yellow" //ew:panel


- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 11:03 AM
Subject: RE: [flexcoders] ActionScript Components

Well, flex is whining about subclassing mxml components 
wich have children with other mxml components containing 
children:

The component 
mx.controls.Button may not be used as a child of erik.extend.panel because the 
erik.extend.panel is a container with internal children.
[panel.mxml]
mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Button 
label="crazy" //mx:Panel

[panelSub.mxml]
panel xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="erik.extend.*"mx:Button label="yellow" 
//panel

Greetz 
Erik




From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 16:48To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

Can you be more specific? I don't have any 
problems sub-classes my MXML components.

- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 5:42 AM
Subject: RE: [flexcoders] ActionScript Components

A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: 
RE: [flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] ActionScript Components

2005-04-07 Thread Erik Westra
Title: Message





Nope, same error. Im sure its a namespace problem. And yes, 
u can use "" (nothing) as a namespace. Usually i use the whole package path as 
namespace:

com.package:panel 
xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:com.package="com.package.*"/com.package:panel


Greetz Erik


From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 17:16To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

That doesn't look like the correct way to do a 
namespace; I'm still learning the freedom of syntax, so bare with me. It 
appears your colliding your namespace with the mx one. Instead, make your 
own; where you have xmlns="erik.extend" I changed it to 
xmlns:ew="erik.extend".

Try that.


ew:panel xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:ew="erik.extend.*"mx:Button 
label="yellow" //ew:panel


- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 11:03 AM
Subject: RE: [flexcoders] ActionScript Components

Well, flex is whining about subclassing mxml components 
wich have children with other mxml components containing 
children:

The component 
mx.controls.Button may not be used as a child of erik.extend.panel because the 
erik.extend.panel is a container with internal children.
[panel.mxml]
mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Button 
label="crazy" //mx:Panel

[panelSub.mxml]
panel xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="erik.extend.*"mx:Button label="yellow" 
//panel

Greetz 
Erik




From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 16:48To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

Can you be more specific? I don't have any 
problems sub-classes my MXML components.

----- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 5:42 AM
Subject: RE: [flexcoders] ActionScript Components

A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: 
RE: [flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] ActionScript Components

2005-04-07 Thread Matthew Shirey



I think things are a bit messy for many reasons. In this casebecause for each component I also have a separate action script file.Between that and having the actionscript embeded in the mxml files it seemed like the lesser of two evils. On top of that Flex Builder doesn't seem to manage its resources very well and performance declines rapidly when you have many files open. My current project is starting to have a lot of files. I have found that you just need to shut Flex Builder down at least half way through the day and restart it to clear the resources. I have been using Microsoft Visual Studio since it was version 1. I think its just that, in todays world of programming, I am used to things being a little more refined, organized, and working withmuch higher performance.

Don't get me wrong, I love Flex. I started working with web applications using Perl on our Unixmachines. As bad as it was the weakest link was always that the end result was HTML.Flex is the solution the web has been waiting for all this time. I just find the development process and environmentmore than alittle lacking. It would help if the UI actually associated the AS file with the MXML file visually. Similar to the way ASP.NET does code-behind representations in the project explorer. Right now the best I can do is use the same root name for a components MXML and AS files so they appear next to each other in the file list. It would also be nice if the while editing the AS file, the editor had some knowlege of the MXML file it was linked to so that syntax highlighting and code completion would be aware of the objects on the MXML file. This is again a behavior that I am used to in Visual Studio.NET and find I miss while working in Flex Builder.

I would also like to see some sort of project management built into Flex Builder. It would be very nice if there was a way to create a new Flex project that would take care of creating all of the directory structure and placing all of the files that are needed to run a flex application. Right now there only seems to be two methods. Put all of your applications in one instance of the Flex Web Application or copy and modify the Flex.war file for each application, or some combination of both. These options are not very attractive. (Please correct me if I'm wrong here, I'd love to find that I have just overlooked something). It would also be nice if Flex Builder could then package and streamline the deployment process by creating a ready to deploy war file. I also use both JDeveloper from Oracle, and JBuilder from Borland as my java development environments. Both of these would be excellent examples of project and deployment management done well.

So when I say messy its not just one little thing. It's more an _expression_ of how I find the overall development process in Flex right now. During my last 12 years as a software developer I think I have used nearly every type of development environment out there. I really hope that Macromedia is working on improving not only the performance of flex builder, but also the feature list. If not, I realize that I am seriously spoiled by Microsoft's Visual Studio.NET, which is clearly my favorite. I am mentallyblocking out the days of programming in C in Unix where the only tools we had we all commandline based (my sympathy to those still doing that). So I know things could be much worse, but I also know how much better they can be. Since we are paying MUCH more for the product now, I think it only reasonable that the product also rise to our expectations. For our shop, Visual Studio.NET and the ASP.NET Server are _much_ cheaper than Flex and Flex Builder. I don't think my expectations are unreasonable for Flex. It has so much potential, I'd really like to see it go where I think it can.

-- Matthew

P.S. Sorry if this came out as a rant... it wasn't really meant to. flame away if you feel the need
On Apr 7, 2005 8:59 AM, Erik Westra [EMAIL PROTECTED] wrote:

Nope, same error. Im sure its a namespace problem. And yes, u can use  (nothing) as a namespace. Usually i use the whole package path as namespace:

com.package:panel xmlns:mx=http://www.macromedia.com/2003/mxml xmlns:com.package=com.package.*/com.package:panel


Greetz Erik


From: JesterXL [mailto:[EMAIL PROTECTED]] Sent: donderdag 7 april 2005 17:16 
To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript Components


That doesn't look like the correct way to do a namespace; I'm still learning the freedom of syntax, so bare with me. It appears your colliding your namespace with the mx one. Instead, make your own; where you have xmlns=erik.extend I changed it to xmlns:ew=erik.extend.

Try that.


ew:panel xmlns:mx=http://www.macromedia.com/2003/mxml xmlns:ew=erik.extend.*mx:Button label=yellow //ew:panel


- Original Message - 
From: Erik Westra 
To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 11:03 AM
Subject: RE: [flexcoders] ActionScript Components

Well, flex

RE: [flexcoders] ActionScript Components

2005-04-06 Thread Stephen Gilson





There are articles on the Macromedia web site that you can 
use:

Creating Advanced Components: http://www.macromedia.com/support/documentation/en/flex/1_5/createcomponents/index.html

Flex Component Basics -two part 
article 
 Part 1: http://www.macromedia.com/devnet/flex/articles/creating_comp.html
 Part 2: http://www.macromedia.com/devnet/flex/articles/creating_comp_pt2.html

Stephen 



From: Matthew Shirey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 8:09 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] ActionScript 
Components

Might someone point me in the direction of some good 
docs/examples of creating components using ActionScript. I have the RIA 
book and chapter 10 has some information, but its disappointingly sparse. 
Mostly I am interested in how to create a composite component. A component 
containing many other components. The examples I have seen so far simply 
extend a given component and alter its behavior.Right now I am 
creating all of my components in MXML with a separate file for their 
ActionScript. It's starting to get a bit messy for complex 
components. Any kind of a boot in the right direction would 
be helpful. Thanks!

-- 
Matthew







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.