Re: [flexcoders] Alternative to Repeater

2006-01-07 Thread JesterXL





In a nutshell, DataSelector is a mixin.  A 
mixin adds methods and properties to a class at runtime.  Since you cannot 
do multiple inheritance in ActionScript, using a mixin is a way around 
that.  DataSelector adds dataProvider powers to a class:
 
DataSelector.initialize(YourClass);
 
Any class that utilizes DataSelector gets a length 
property.  DataSelector gives a class pretty much all the DataProvider 
methods (which are really proxies to the dataProvider it contains a reference 
to), length being one of them.  So:
 
yourComponent.length
 
is the same as:
 
yourComponent.dataProvider.length
 
 
Yes, modelChanged fires everytime you use a 
DataProvider method on a dataProvider or dataProvider component.
 
a = ["one", "two", "three"];
yourComponent.dataProvider = a;
 
a.addItem("cow"); // fires 
modelChanged
a.push("cheese"); // does not fire 
modelChanged
yourComponent.addItem("moo"); // fires 
modelChanged
 
ModelChanged actually has an object that is passed 
to it, the event object, that has information about what changed.  You can 
use a switch statement to know what changed, and how, and more intelligently 
draw your component.  A note; this is a fuoi$%(*)$% load of work.  If 
you don't believe me, go look in DataGrid.as.
 
So, to be lazy, I just ignore it and redraw 
everytime.  Keep in mind, even if you use the code above, it'll only redraw 
once:
- modelChanged fired for setting the 
dataProvider
- modelChanged fired for adding "cow" to 
it
- modelChagned fired for adding"moo" to 
it
 
Since I use a doLater, and only 1, it'll only 
redraw once per frame.
 
- Original Message - 
From: superabe superabe 

To: flexcoders@yahoogroups.com 
Sent: Saturday, January 07, 2006 11:38 AM
Subject: Re: [flexcoders] Alternative to Repeater

Thanks for the help.
Couple of question 
 
1 .What do you mean by - utilize Data Selector 
on that class ?
 
2. In the redrawForm method what does the value "length" 
represent. 
If it is the length of the dataProvider, am not clear how that 
was established
 
3. Does "modelChanged" fire every time the 
dataProvider changes? 
If so seems like it would redraw the entire form even if only 
one item in the array changed (say using addItem). 
Thanks,
 
- superabe 
On 1/7/06, JesterXL 
<[EMAIL PROTECTED]> 
wrote: 

  You basically do:
  - create a new abstract base class for your 
  component as ActionScript
  - utilize DataSelector on that class
  - extend that class in a new file
  - have the new file do something like 
  this
   
  function modelChanged()
  {
      
  cancelAllDoLaters();
      doLater(this, 
  "redrawForm");
  }
   
  function redrawForm()
  {
      
  canvas_mc.destroyAllChildren();
      var i:Number = 
  length;
      while(i--)
      {
          var 
  item:Object = getItemAt(i);
          
  canvas_mc.createChild(SomeComponent);
      }
  }
   
   
  What is happening here is whenever the 
  dataProvider changes, the form is redrawn.  It's only redrawn once per 
  frame in case dataProvider has 50 billion changes.
   
  If you see the createChild call for the canvas, 
  basically you could put in logic, say, to create images, and then call load on 
  them based on the url for the current item.
   
  Then, you can finally use that AS component as 
  MXML elsewhere.  Make sense?
  
   
   
  - Original Message - 
  From: superabe superabe 
  To: flexcoders@yahoogroups.com 
  Sent: Saturday, January 07, 2006 11:09 AM
  Subject: [flexcoders] Alternative to Repeater
   
  Is there an alternative to using a Repeater , that I could make use of in 
  my component (AS based).
  For e.g.
   
  Say I have a component called "Comp"
   
  Comp.mxml (Pseudo-code)
  ===
  
    
      
      public var dp:Array;
  
    
   
    
      
    
   
  
   
  Comp is used in Main.mxml and the dataprovider for Comp is set in 
  Main.mxml.
  Main also may add and remove items from the the dataprovider for Comp on 
  subsequent events.
   
  I would like to write Comp as an Actionscript class and avoid a Repeater 
  all together.
  I may be missing something really obvious, but how would I do that 
?
   
  TIA,
   
  - superabe
   
   
   
   --Flexcoders Mailing 
  ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  
  
  
  YAHOO! GROUPS LINKS 
  
 Visit your group "flexcoders" on the web.  
 To unsubscribe from this group, send an email 
to:  [EMAIL PROTECTED]  

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
  
  
  





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo!

Re: [flexcoders] how to use MovieClip / swc in flex???

2006-01-07 Thread JesterXL
To utilize MovieClips, embed in SWF's.  Give it a linkage name and:

Flex 1.5:
[Embed(source="your.swf", symbol="LinkageName")]
var yourSymbol:String;

attachMovie(yourSymbol, "mc", 0);

Flex 2:
[Embed(source="your.swf#LinkageName")]
var yourSymbol:Class;
var a:Class = new yourSymbol();
addChild(a);

To utilize SWC's, just place next to your Application.mxml file.

To import a class, treat like any class; import it.

- Original Message - 
From: "Jignesh M. Dodiya" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, January 07, 2006 6:50 PM
Subject: [flexcoders] how to use MovieClip / swc in flex???


Hi All,

how to use a movie clip in flex as we use in flash(like, keeping movie 
clip in library & doing attachMovie() function).i got to know that 
this can be done by converting movieclip in to swc.. but i m really 
confused how should i use swc in my flex application

Another thing is that how can i use the class in flex as we use in 
flash...i have my class to handle the movie clip , but not sure 
how to include or import the class in flexas what do in flash

hope for co-operation

thanx

jignesh







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




[flexcoders] how to use MovieClip / swc in flex???

2006-01-07 Thread Jignesh M. Dodiya
Hi All,

how to use a movie clip in flex as we use in flash(like, keeping movie 
clip in library & doing attachMovie() function).i got to know that 
this can be done by converting movieclip in to swc.. but i m really 
confused how should i use swc in my flex application

Another thing is that how can i use the class in flex as we use in 
flash...i have my class to handle the movie clip , but not sure 
how to include or import the class in flexas what do in flash

hope for co-operation

thanx

jignesh







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] how to convert string in to Byte array

2006-01-07 Thread Jignesh Dodiya



thanx for your quick co-operation
 
 
 jignesh 
On 1/6/06, Weyert de Boer <[EMAIL PROTECTED]> wrote:
Hmm, it also could be writeUTFBytes() (doesnt save the strnig length) you should try it out. Anyway the ByteArray-class in AS3 seems to have 
everything you need.--Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.com 



YAHOO! GROUPS LINKS 

 Visit your group "flexcoders" on the web.  
 To unsubscribe from this group, send an email to: 
[EMAIL PROTECTED]  
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



-- jignesh dodiya 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   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] Re: Flex2 :: Grid / drop-in cellrenderer / drag-drop / exception / bug?

2006-01-07 Thread Manish Jethani
On 1/5/06, Michael Hansen <[EMAIL PROTECTED]> wrote:

> Check out the example here:
>
> http://www.mindinteraction.com/bin/TestDataGrid2.html  (Note Flex2 app)
>
> >Drag an item to generate an exception.<

> Basically it's a drag enabled datagrid using drop-in cellrenderer. I'm unsure 
> if the exception
> is my fault or a bug. The docs on drop-in cell renderers is not that 
> exhaustive.

Looks like a bug.  I've logged it.

BTW, in Beta 1 (when it's out), you should be able to bind to
'dataObject' instead of having to override the setter method.

Manish


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 





Re: RIch Text Editor (was RE: [flexcoders] Re: Beta Flex 2 release Date? Any one for a Guess)

2006-01-07 Thread Manish Jethani
On 1/6/06, Leif Wells <[EMAIL PROTECTED]> wrote:

(Trying to address a couple of your concerns...)

> Text Selection Not Holding After Formatting:
> When the user selects text, clicks the bold button the text is made
> bold.Then the text isn't selected. So if I want to apply italic to
> that same text I have to re-select it. Users hated it.
[snip]

The Flex 2 RichTextEditor doesn't have this problem.

> Native CSS-like output:
> In a lot of cases we lock down the use of fonts for our text entry
> (having access to 20 fonts is often a bad thing). I'd love to have the
> ability to store something like this in my database:
> This is my very first paragraph.
> If I can do that then I could apply CSS styling to the string and have
> it look great in the application. The problem is getting it into that
> format. On a project in 2004 I really had to do a lot of head standing
> to get it right. Having something better than getRichText() that
> returns a string with a lot of FONT tags in it would make our lives
> much better and save a ton of space in the database. getCSSText()?

Try this:

 
 

The text returned by 'htmlText' is well-formed XML and can be easily
modified using E4X [1]

[1]:http://labs.macromedia.com/wiki/index.php/ActionScript_3:resources:apis:E4X:overview

Manish


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: RIch Text Editor (was RE: [flexcoders] Re: Beta Flex 2 release Date? Any one for a Guess)

2006-01-07 Thread Manish Jethani
On 1/5/06, Benoit Hediard <[EMAIL PROTECTED]> wrote:

> Has anybody successfully used the Flex2 RichTextEditor in alpha release?
> I gave up, I found it impossible to use : it was full of focus bugs when
> used in a popup with accordion process.

A number of bugs have been fixed in the RichTextEditor since Alpha 1.

> Still using a plain TextArea... and waiting the beta to see if the problem
> is solved.

The RichTextEditor is nothing but a Panel containing a TextArea and
some formatting using the TextRange utility class.  It shouldn't be
that hard to create your own custom rich text editor in Flex 2.

Manish


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Alternative to Repeater

2006-01-07 Thread Jesse Warden
Well, only problem with Composition is it's now a black box; that can be
good or bad.  For example, if your class is the only one ever operating on
the custom Repeater, then sure, that's fine.  However, if you ever want to
expose those methods, you have to write proxy methods for them all
including re-doing all the getters and setters.

So, using a List in a form via composition is fine; you have buttons in
that form that add/delete items from the list.  From that point on,
however, no one else can ever interact with that lists data.

...unless you expose the dataProvider, or the dataProvider is public.  If
it is, you can only operate on that dataProvider via the dataProvider API.
 If that's ok with you, that's ok with me.  IF, however, you are building
a re-usable View, then that isn't very eloquent.  Just depends on how your
going to use it.  List for example can be extended if you want.  Most
people, however, use it via composition.


> Thanks. That make it a lot clearer.
>
> Although, am not sure I understand why you would use the mixin
> approach here  compared to using Composition.
> Are there any benefits of doing it this way as opposed to say:
>
> Embed a dataProvider inside "Comp.mxml"  and have the comp listen for and
> handle the modelChanged event of the DP ?
>
> TIA
>
> - superabe
>
>
>
>
>
> On 1/7/06, JesterXL <[EMAIL PROTECTED]> wrote:
>>
>>  *** resending, other one got lost in the ether I spose: 2:48pm
>> 1.7.2006***
>>
>> In a nutshell, DataSelector is a mixin.  A mixin adds methods and
>> properties to a class at runtime.  Since you cannot do multiple
>> inheritance
>> in ActionScript, using a mixin is a way around that.  DataSelector adds
>> dataProvider powers to a class:
>>
>> DataSelector.initialize(YourClass);
>>
>> Any class that utilizes DataSelector gets a length property.
>> DataSelector
>> gives a class pretty much all the DataProvider methods (which are really
>> proxies to the dataProvider it contains a reference to), length being
>> one of
>> them.  So:
>>
>> yourComponent.length
>>
>> is the same as:
>>
>> yourComponent.dataProvider.length
>>
>>
>> Yes, modelChanged fires everytime you use a DataProvider method on a
>> dataProvider or dataProvider component.
>>
>> a = ["one", "two", "three"];
>> yourComponent.dataProvider = a;
>>
>> a.addItem("cow"); // fires modelChanged
>> a.push("cheese"); // does not fire modelChanged
>> yourComponent.addItem("moo"); // fires modelChanged
>>
>> ModelChanged actually has an object that is passed to it, the event
>> object, that has information about what changed.  You can use a switch
>> statement to know what changed, and how, and more intelligently draw
>> your
>> component.  A note; this is a fuoi$%(*)$% load of work.  If you don't
>> believe me, go look in DataGrid.as.
>>
>> So, to be lazy, I just ignore it and redraw everytime.  Keep in mind,
>> even
>> if you use the code above, it'll only redraw once:
>> - modelChanged fired for setting the dataProvider
>> - modelChanged fired for adding "cow" to it
>> - modelChagned fired for adding"moo" to it
>>
>> Since I use a doLater, and only 1, it'll only redraw once per frame.
>> - Original Message - *From:* superabe
>> superabe<[EMAIL PROTECTED]>
>> *To:* flexcoders@yahoogroups.com
>>  *Sent:* Saturday, January 07, 2006 11:38 AM
>> *Subject:* Re: [flexcoders] Alternative to Repeater
>>
>>
>> Thanks for the help.
>> Couple of question
>>
>> 1 .What do you mean by - utilize Data Selector on that class ?
>>
>> 2. In the redrawForm method what does the value "length" represent.
>> If it is the length of the dataProvider, am not clear how that was
>> established
>>
>> 3. Does "modelChanged" fire every time the dataProvider changes?
>> If so seems like it would redraw the entire form even if only one item
>> in
>> the array changed (say using addItem).
>>
>> Thanks,
>>
>> - superabe
>>
>> On 1/7/06, JesterXL <[EMAIL PROTECTED]> wrote:
>> >
>> > You basically do:
>> > - create a new abstract base class for your component as ActionScript
>> > - utilize DataSelector on that class
>> > - extend that class in a new file
>> > - have the new file do something like this
>> >
>> > function modelChanged()
>> > {
>> > cancelAllDoLaters();
>> > doLater(this, "redrawForm");
>> > }
>> >
>> > function redrawForm()
>> > {
>> > canvas_mc.destroyAllChildren();
>> > var i:Number = length;
>> > while(i--)
>> > {
>> > var item:Object = getItemAt(i);
>> > canvas_mc.createChild(SomeComponent);
>> > }
>> > }
>> >
>> >
>> > What is happening here is whenever the dataProvider changes, the form
>> is
>> > redrawn.  It's only redrawn once per frame in case dataProvider has 50
>> > billion changes.
>> >
>> > If you see the createChild call for the canvas, basically you could
>> put
>> > in logic, say, to create images, and then call load on them based on
>> the url
>> > for the current item.
>> >
>> > Then, you can finally use that AS component as MXML elsewhere.  Make
>

Re: [flexcoders] Alternative to Repeater

2006-01-07 Thread superabe superabe



Thanks. That make it a lot clearer. 
Although, am not sure I understand why you would use the mixin approach here  compared to using Composition.
Are there any benefits of doing it this way as opposed to say:
 
Embed a dataProvider inside "Comp.mxml"  and have the comp listen for and handle the modelChanged event of the DP ?
 
TIA 
- superabe
 
 
 
 
On 1/7/06, JesterXL <[EMAIL PROTECTED]> wrote:


*** resending, other one got lost in the ether I spose: 2:48pm 1.7.2006 ***
 
In a nutshell, DataSelector is a mixin.  A mixin adds methods and properties to a class at runtime.  Since you cannot do multiple inheritance in ActionScript, using a mixin is a way around that.  DataSelector adds dataProvider powers to a class:

 
DataSelector.initialize(YourClass);
 
Any class that utilizes DataSelector gets a length property.  DataSelector gives a class pretty much all the DataProvider methods (which are really proxies to the dataProvider it contains a reference to), length being one of them.  So:

 
yourComponent.length
 
is the same as:
 
yourComponent.dataProvider.length
 
 
Yes, modelChanged fires everytime you use a DataProvider method on a dataProvider or dataProvider component.
 
a = ["one", "two", "three"];
yourComponent.dataProvider = a;
 
a.addItem("cow"); // fires modelChanged
a.push("cheese"); // does not fire modelChanged
yourComponent.addItem("moo"); // fires modelChanged
 
ModelChanged actually has an object that is passed to it, the event object, that has information about what changed.  You can use a switch statement to know what changed, and how, and more intelligently draw your component.  A note; this is a fuoi$%(*)$% load of work.  If you don't believe me, go look in 
DataGrid.as.
 
So, to be lazy, I just ignore it and redraw everytime.  Keep in mind, even if you use the code above, it'll only redraw once:
- modelChanged fired for setting the dataProvider
- modelChanged fired for adding "cow" to it
- modelChagned fired for adding"moo" to it
 
Since I use a doLater, and only 1, it'll only redraw once per frame.
- Original Message - 
From: superabe superabe 
To: flexcoders@yahoogroups.com 

Sent: Saturday, January 07, 2006 11:38 AM
Subject: Re: [flexcoders] Alternative to Repeater

 
Thanks for the help.
Couple of question 
 
1 .What do you mean by - utilize Data Selector on that class ?
 
2. In the redrawForm method what does the value "length" represent. 
If it is the length of the dataProvider, am not clear how that was established
 
3. Does "modelChanged" fire every time the dataProvider changes? 
If so seems like it would redraw the entire form even if only one item in the array changed (say using addItem). 
Thanks,
 
- superabe 
On 1/7/06, JesterXL <[EMAIL PROTECTED]
> wrote: 

You basically do:
- create a new abstract base class for your component as ActionScript
- utilize DataSelector on that class
- extend that class in a new file
- have the new file do something like this
 
function modelChanged()
{
    cancelAllDoLaters();
    doLater(this, "redrawForm");
}
 
function redrawForm()
{
    canvas_mc.destroyAllChildren();
    var i:Number = length;
    while(i--)
    {
        var item:Object = getItemAt(i);
        canvas_mc.createChild(SomeComponent);
    }
}
 
 
What is happening here is whenever the dataProvider changes, the form is redrawn.  It's only redrawn once per frame in case dataProvider has 50 billion changes.
 
If you see the createChild call for the canvas, basically you could put in logic, say, to create images, and then call load on them based on the url for the current item.
 
Then, you can finally use that AS component as MXML elsewhere.  Make sense?

 
 
- Original Message - 
From: superabe superabe 
To: flexcoders@yahoogroups.com 
Sent: Saturday, January 07, 2006 11:09 AM
Subject: [flexcoders] Alternative to Repeater
 
Is there an alternative to using a Repeater , that I could make use of in my component (AS based).
For e.g.
 
Say I have a component called "Comp"
 
Comp.mxml (Pseudo-code)
===

  
    
    public var dp:Array;

  
 
  
    
  
 

 
Comp is used in Main.mxml and the dataprovider for Comp is set in Main.mxml.
Main also may add and remove items from the the dataprovider for Comp on subsequent events.
 
I would like to write Comp as an Actionscript class and avoid a Repeater all together.
I may be missing something really obvious, but how would I do that ?
 
TIA,
 
- superabe
 
 
 
 --Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.com 


YAHOO! GROUPS LINKS 

 Visit your group "flexcoders" on the web.  
 To unsubscribe from this group, send an email to: 
 [EMAIL PROTECTED]  
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



--Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.com 


Re: [flexcoders] Alternative to Repeater

2006-01-07 Thread JesterXL






*** resending, other one got lost in the ether I 
spose: 2:48pm 1.7.2006 ***
 
In a nutshell, DataSelector is a mixin.  A 
mixin adds methods and properties to a class at runtime.  Since you cannot 
do multiple inheritance in ActionScript, using a mixin is a way around 
that.  DataSelector adds dataProvider powers to a class:
 
DataSelector.initialize(YourClass);
 
Any class that utilizes DataSelector gets a length 
property.  DataSelector gives a class pretty much all the DataProvider 
methods (which are really proxies to the dataProvider it contains a reference 
to), length being one of them.  So:
 
yourComponent.length
 
is the same as:
 
yourComponent.dataProvider.length
 
 
Yes, modelChanged fires everytime you use a 
DataProvider method on a dataProvider or dataProvider component.
 
a = ["one", "two", "three"];
yourComponent.dataProvider = a;
 
a.addItem("cow"); // fires 
modelChanged
a.push("cheese"); // does not fire 
modelChanged
yourComponent.addItem("moo"); // fires 
modelChanged
 
ModelChanged actually has an object that is passed 
to it, the event object, that has information about what changed.  You can 
use a switch statement to know what changed, and how, and more intelligently 
draw your component.  A note; this is a fuoi$%(*)$% load of work.  If 
you don't believe me, go look in DataGrid.as.
 
So, to be lazy, I just ignore it and redraw 
everytime.  Keep in mind, even if you use the code above, it'll only redraw 
once:
- modelChanged fired for setting the 
dataProvider
- modelChanged fired for adding "cow" to 
it
- modelChagned fired for adding"moo" to 
it
 
Since I use a doLater, and only 1, it'll only 
redraw once per frame.
- Original Message - 
From: superabe superabe 

To: flexcoders@yahoogroups.com 
Sent: Saturday, January 07, 2006 11:38 AM
Subject: Re: [flexcoders] Alternative to Repeater

Thanks for the help.
Couple of question 
 
1 .What do you mean by - utilize Data Selector 
on that class ?
 
2. In the redrawForm method what does the value "length" 
represent. 
If it is the length of the dataProvider, am not clear how that 
was established
 
3. Does "modelChanged" fire every time the 
dataProvider changes? 
If so seems like it would redraw the entire form even if only 
one item in the array changed (say using addItem). 
Thanks,
 
- superabe 
On 1/7/06, JesterXL 
<[EMAIL PROTECTED]> 
wrote: 

  You basically do:
  - create a new abstract base class for your 
  component as ActionScript
  - utilize DataSelector on that class
  - extend that class in a new file
  - have the new file do something like 
  this
   
  function modelChanged()
  {
      
  cancelAllDoLaters();
      doLater(this, 
  "redrawForm");
  }
   
  function redrawForm()
  {
      
  canvas_mc.destroyAllChildren();
      var i:Number = 
  length;
      while(i--)
      {
          var 
  item:Object = getItemAt(i);
          
  canvas_mc.createChild(SomeComponent);
      }
  }
   
   
  What is happening here is whenever the 
  dataProvider changes, the form is redrawn.  It's only redrawn once per 
  frame in case dataProvider has 50 billion changes.
   
  If you see the createChild call for the canvas, 
  basically you could put in logic, say, to create images, and then call load on 
  them based on the url for the current item.
   
  Then, you can finally use that AS component as 
  MXML elsewhere.  Make sense?
  
   
   
  - Original Message - 
  From: superabe superabe 
  To: flexcoders@yahoogroups.com 
  Sent: Saturday, January 07, 2006 11:09 AM
  Subject: [flexcoders] Alternative to Repeater
   
  Is there an alternative to using a Repeater , that I could make use of in 
  my component (AS based).
  For e.g.
   
  Say I have a component called "Comp"
   
  Comp.mxml (Pseudo-code)
  ===
  
    
      
      public var dp:Array;
  
    
   
    
      
    
   
  
   
  Comp is used in Main.mxml and the dataprovider for Comp is set in 
  Main.mxml.
  Main also may add and remove items from the the dataprovider for Comp on 
  subsequent events.
   
  I would like to write Comp as an Actionscript class and avoid a Repeater 
  all together.
  I may be missing something really obvious, but how would I do that 
?
   
  TIA,
   
  - superabe
   
   
   
   --Flexcoders Mailing 
  ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  
  
  
  YAHOO! GROUPS LINKS 
  
 Visit your group "flexcoders" on the web.  
 To unsubscribe from this group, send an email 
to:  [EMAIL PROTECTED]  

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
  
  
  





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an emai

Re: [flexcoders] Re: Slow Compile Times

2006-01-07 Thread Johannes Nel



the compiler does type checking so its what you expect. but i would never advise anybody to do this.On 1/7/06, Renaun Erickson <
[EMAIL PROTECTED]> wrote:Thats interesting,--- In 
flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:>> The less strict-typing you used in Flash MX 2004, the shortercompilation> would take.  I bet same holds true for Flex 
1.5.>> - Original Message -> From: "Renaun Erickson" <[EMAIL PROTECTED]>> To: > Sent: Saturday, January 07, 2006 12:01 PM
> Subject: [flexcoders] Re: Slow Compile Times>>> That is nice, is there anythig for Flex 1.5?>> --- In flexcoders@yahoogroups.com, Manish Jethani
> <[EMAIL PROTECTED]> wrote:> >> > On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:> > > As my applications get larger and more complex they time to compile> > > them go down.  What are the methods of keeping compile times
down?  Is> > > using swc's the best way?> >> > Flex 2 has incremental compilation:> >>
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc> > --> Flexcoders Mailing List> FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> Search Archives:http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links>--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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:http://docs.yahoo.com/info/terms/
-- j:pn 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   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] Re: Slow Compile Times

2006-01-07 Thread JesterXL
...of course, that's inverserly proportional to your debugging time.

- Original Message - 
From: "Renaun Erickson" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, January 07, 2006 2:22 PM
Subject: [flexcoders] Re: Slow Compile Times


Thats interesting,

--- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> The less strict-typing you used in Flash MX 2004, the shorter
compilation
> would take.  I bet same holds true for Flex 1.5.
>
> - Original Message - 
> From: "Renaun Erickson" <[EMAIL PROTECTED]>
> To: 
> Sent: Saturday, January 07, 2006 12:01 PM
> Subject: [flexcoders] Re: Slow Compile Times
>
>
> That is nice, is there anythig for Flex 1.5?
>
> --- In flexcoders@yahoogroups.com, Manish Jethani
> <[EMAIL PROTECTED]> wrote:
> >
> > On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> > > As my applications get larger and more complex they time to compile
> > > them go down.  What are the methods of keeping compile times
down?  Is
> > > using swc's the best way?
> >
> > Flex 2 has incremental compilation:
> >
>
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc
> >
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Slow Compile Times

2006-01-07 Thread Renaun Erickson
Thats interesting,

--- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> The less strict-typing you used in Flash MX 2004, the shorter
compilation 
> would take.  I bet same holds true for Flex 1.5.
> 
> - Original Message - 
> From: "Renaun Erickson" <[EMAIL PROTECTED]>
> To: 
> Sent: Saturday, January 07, 2006 12:01 PM
> Subject: [flexcoders] Re: Slow Compile Times
> 
> 
> That is nice, is there anythig for Flex 1.5?
> 
> --- In flexcoders@yahoogroups.com, Manish Jethani
> <[EMAIL PROTECTED]> wrote:
> >
> > On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> > > As my applications get larger and more complex they time to compile
> > > them go down.  What are the methods of keeping compile times
down?  Is
> > > using swc's the best way?
> >
> > Flex 2 has incremental compilation:
> >
>
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc
> >
> 
> 
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Slow Compile Times

2006-01-07 Thread Renaun Erickson
Yes JVM 1.5 does help, I have been tested both JVM 1.4 and 1.5, also
some of the garabage collection settings or using different brands of
JVM make a difference in terms of Memory allocation speed, thus
compile times.

--- In flexcoders@yahoogroups.com, Johannes Nel <[EMAIL PROTECTED]> wrote:
>
> what jre are you using. 1.5 speeds it up a lot
> 
> 
> On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> >
> > That is nice, is there anythig for Flex 1.5?
> >
> > --- In flexcoders@yahoogroups.com, Manish Jethani
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> > > > As my applications get larger and more complex they time to
compile
> > > > them go down.  What are the methods of keeping compile times
down?  Is
> > > > using swc's the best way?
> > >
> > > Flex 2 has incremental compilation:
> > >
> >
> >
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc
> > >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> 
> 
> --
> j:pn
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Flex webservice to CFC

2006-01-07 Thread yaagcur

Try plain text (no quotes) - worked for me

> --- In flexcoders@yahoogroups.com, "kjlinboomer"
> <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> > 
> > I am trying to call a CF component from flex using mx:WebService.  I
> > am having trouble sending arguments to the component.  I get an "Array
> > of input arguments did not contain a required parameter at position 0"
> > error. I have tried putting the argument as a single quote as seen
> > below and in double quotes and as a flash var but they all return the
> > same error. If I use a component that requires no arguments then I get
> > a return value and it works fine.  Any help with this would be
> > very much appreciated.  Below is my mxml for the web service
> > declaration and below that is the CFC code both are in very simple
> > form as I am just trying to get this to work.
> > 
> > 
> >  >
wsdl="http://192.168.168.4:8500/keith/components/reportingNew.cfc?wsdl";
> > showBusyCursor="true">
> >   
> >   
> >   'test' 
> >   
> >
> > 
> > 
> > 
> > 
> > 
> >   
> >   
> > 
> > 
> > 
> >   
> > 
> > 
> > 
> > Thanks,
> > 
> > Keith
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: Slow Compile Times

2006-01-07 Thread JesterXL
The less strict-typing you used in Flash MX 2004, the shorter compilation 
would take.  I bet same holds true for Flex 1.5.

- Original Message - 
From: "Renaun Erickson" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, January 07, 2006 12:01 PM
Subject: [flexcoders] Re: Slow Compile Times


That is nice, is there anythig for Flex 1.5?

--- In flexcoders@yahoogroups.com, Manish Jethani
<[EMAIL PROTECTED]> wrote:
>
> On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> > As my applications get larger and more complex they time to compile
> > them go down.  What are the methods of keeping compile times down?  Is
> > using swc's the best way?
>
> Flex 2 has incremental compilation:
>
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: Slow Compile Times

2006-01-07 Thread Johannes Nel



what jre are you using. 1.5 speeds it up a lot
On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
That is nice, is there anythig for Flex 1.5?--- In flexcoders@yahoogroups.com, Manish Jethani<[EMAIL PROTECTED]> wrote:>> On 1/7/06, Renaun Erickson <
[EMAIL PROTECTED]> wrote:> > As my applications get larger and more complex they time to compile> > them go down.  What are the methods of keeping compile times down?  Is> > using swc's the best way?
>> Flex 2 has incremental compilation:>http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc
>--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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:http://docs.yahoo.com/info/terms/
-- j:pn 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Re: Slow Compile Times

2006-01-07 Thread Renaun Erickson
That is nice, is there anythig for Flex 1.5?

--- In flexcoders@yahoogroups.com, Manish Jethani
<[EMAIL PROTECTED]> wrote:
>
> On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> > As my applications get larger and more complex they time to compile
> > them go down.  What are the methods of keeping compile times down?  Is
> > using swc's the best way?
> 
> Flex 2 has incremental compilation:
>
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Alternative to Repeater

2006-01-07 Thread superabe superabe



Thanks for the help.
Couple of question 
 
1 .What do you mean by - utilize Data Selector on that class ?
 
2. In the redrawForm method what does the value "length" represent. 
If it is the length of the dataProvider, am not clear how that was established
 
3. Does "modelChanged" fire every time the dataProvider changes? 
If so seems like it would redraw the entire form even if only one item in the array changed (say using addItem). 
Thanks,
 
- superabe 
On 1/7/06, JesterXL <[EMAIL PROTECTED]> wrote:

You basically do:
- create a new abstract base class for your component as ActionScript
- utilize DataSelector on that class
- extend that class in a new file
- have the new file do something like this
 
function modelChanged()
{
    cancelAllDoLaters();
    doLater(this, "redrawForm");
}
 
function redrawForm()
{
    canvas_mc.destroyAllChildren();
    var i:Number = length;
    while(i--)
    {
        var item:Object = getItemAt(i);
        canvas_mc.createChild(SomeComponent);
    }
}
 
 
What is happening here is whenever the dataProvider changes, the form is redrawn.  It's only redrawn once per frame in case dataProvider has 50 billion changes.
 
If you see the createChild call for the canvas, basically you could put in logic, say, to create images, and then call load on them based on the url for the current item.
 
Then, you can finally use that AS component as MXML elsewhere.  Make sense?

 
 
- Original Message - 
From: superabe superabe 
To: flexcoders@yahoogroups.com 
Sent: Saturday, January 07, 2006 11:09 AM
Subject: [flexcoders] Alternative to Repeater
 
Is there an alternative to using a Repeater , that I could make use of in my component (AS based).
For e.g.
 
Say I have a component called "Comp"
 
Comp.mxml (Pseudo-code)
===

  
    
    public var dp:Array;

  
 
  
    
  
 

 
Comp is used in Main.mxml and the dataprovider for Comp is set in Main.mxml.
Main also may add and remove items from the the dataprovider for Comp on subsequent events.
 
I would like to write Comp as an Actionscript class and avoid a Repeater all together.
I may be missing something really obvious, but how would I do that ?
 
TIA,
 
- superabe
 
 
 
 --Flexcoders Mailing ListFAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.com 


YAHOO! GROUPS LINKS 

 Visit your group "flexcoders" on the web.  
 To unsubscribe from this group, send an email to: 
[EMAIL PROTECTED]  
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   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] Alternative to Repeater

2006-01-07 Thread JesterXL





You basically do:
- create a new abstract base class for your 
component as ActionScript
- utilize DataSelector on that class
- extend that class in a new file
- have the new file do something like 
this
 
function modelChanged()
{
    
cancelAllDoLaters();
    doLater(this, 
"redrawForm");
}
 
function redrawForm()
{
    
canvas_mc.destroyAllChildren();
    var i:Number = 
length;
    while(i--)
    {
        var 
item:Object = getItemAt(i);
        
canvas_mc.createChild(SomeComponent);
    }
}
 
 
What is happening here is whenever the dataProvider 
changes, the form is redrawn.  It's only redrawn once per frame in case 
dataProvider has 50 billion changes.
 
If you see the createChild call for the canvas, 
basically you could put in logic, say, to create images, and then call load on 
them based on the url for the current item.
 
Then, you can finally use that AS component as MXML 
elsewhere.  Make sense?
 
 
- Original Message - 
From: superabe superabe 

To: flexcoders@yahoogroups.com 
Sent: Saturday, January 07, 2006 11:09 AM
Subject: [flexcoders] Alternative to Repeater

Is there an alternative to using a Repeater , that I could make use of in 
my component (AS based).
For e.g.
 
Say I have a component called "Comp"
 
Comp.mxml (Pseudo-code)
===

  
    
    public var dp:Array;
 
  
 
  
    
  
 

 
Comp is used in Main.mxml and the dataprovider for Comp is set in 
Main.mxml.
Main also may add and remove items from the the dataprovider for Comp on 
subsequent events.
 
I would like to write Comp as an Actionscript class and avoid a Repeater 
all together.
I may be missing something really obvious, but how would I do that ?
 
TIA,
 
- superabe
 
 
 
 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Alternative to Repeater

2006-01-07 Thread superabe superabe



Is there an alternative to using a Repeater , that I could make use of in my component (AS based).
For e.g.
 
Say I have a component called "Comp"
 
Comp.mxml (Pseudo-code)
===

  
    
    public var dp:Array;
  
  
 
  
    
  
 

 
Comp is used in Main.mxml and the dataprovider for Comp is set in Main.mxml.
Main also may add and remove items from the the dataprovider for Comp on subsequent events.
 
I would like to write Comp as an Actionscript class and avoid a Repeater all together.
I may be missing something really obvious, but how would I do that ?
 
TIA,
 
- superabe
 
 
 
 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] MS SQL Server 2005

2006-01-07 Thread James
Good morning Everyone,

Here's the question for the day...

MS SQL Server does xml endpoints within SQL Server. Question one: Has anyone
gotten it to work with Flex, either 1.5 or 2? And if so, how? 

James




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Need help in tackling this event problem...

2006-01-07 Thread Weyert de Boer
Hmm, maybe it's the target:this in the dispatcht onConnect event of the 
ListenerXMLSocket. Ooh well, I will have to look into this now!


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Need help in tackling this event problem...

2006-01-07 Thread Weyert de Boer
Hi

>Impossible to do with anonymous objects.  However, if you make your event a 
>class, you have no problems.  This is enforced at runtime in AS3:
>
I am using it in my altered version of XMlSocket to communicate with 
MaxMSP in this class I am dispatching a connect-event to the listeners 
using:

// connect-event dispatch test
var eventObj:Object = {type:"connect", event:success};
dispatchEvent( eventObj );

I can tell you that when I use mx.data.binding.ObjectDumper.toString() I 
will see a target-variable which then includes the values of my 
MaxMSP-class which are all private variables and I don't want to have 
disclosed. Otherwise I would have made them public vars ;-)

The parts of the class:

class com.innerfuse.io.MaxMSP {
   
/**
 * EventDispatcher requirements
 */
private var dispatchEvent:Function;
var addEventListener:Function;
var removeEventListener:Function;

private var port: Number;  // the port number of the 
maxmsp server
private var address: String;// the ip address of the 
maxmsp server
private var server: ListenerXMLSocket;// event enabled XMLSocket
private var connectionStatus: Boolean = false;   // connectionStatus 
flag

public function onXmlConnectEvent(success) {
this.connectionStatus = false;
if ( success ) {
this.connectionStatus = true;
   
// connect-event dispatch test
var eventObj:Object = {type:"connect", event:success};
dispatchEvent( eventObj );
}
}

}

Yours,
Weyert de Boer



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Need help in tackling this event problem...

2006-01-07 Thread JesterXL
Impossible to do with anonymous objects.  However, if you make your event a 
class, you have no problems.  This is enforced at runtime in AS3:

class Event
{
private var test:String;

public var target:Object;
public var type:String;
}

var e:Event = new Event();
e.target = this;
e.type = "test";
dispatchEvent(e);

function onResult(event:Event):Void
{
trace(event.test); // won't compile
}


- Original Message - 
From: "Weyert de Boer" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, January 07, 2006 8:38 AM
Subject: Re: [flexcoders] Need help in tackling this event problem...


JesterXL wrote:

>Clearly your problem is your custom EventDispatcher.  The one that comes
>with Flex allows me to throw any custom arg I want at result handlers. 
>Find
>out why he's not keeping your event handlers.
>
>
Yes, EventDispatcher something I have issues with to understand. It
keeps sending data I don't want to the listeners such as private
variables of the class 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Need help in tackling this event problem...

2006-01-07 Thread Weyert de Boer
JesterXL wrote:

>Clearly your problem is your custom EventDispatcher.  The one that comes 
>with Flex allows me to throw any custom arg I want at result handlers.  Find 
>out why he's not keeping your event handlers.
>  
>
Yes, EventDispatcher something I have issues with to understand. It 
keeps sending data I don't want to the listeners such as private 
variables of the class 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Need help in tackling this event problem...

2006-01-07 Thread Dimitrios Gianninas





Hi,
 
The simplest solution is to implement commands 
:)
 
However, if you want to keep what you have, you will have 
to save the original event object in some global variable so that you 
can look it up once onResult() or onFault() are fired.
 
Dimitrios 
"Jimmy" Gianninas
RIA Developer
Optimal 
Payments Inc.
 


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of 
george_luiSent: Friday, January 06, 2006 9:37 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Need help in tackling 
this event problem...
Hi,Here's my scenerio:I have a view and it's 
corresponding ViewHelper.  There are twobuttons in the view.  If I 
hit button A, I want action X to occur.  IfI hit button B, I want 
action Y to occur.This is how I broadcast my event in this view when I 
hit these 
buttons.CommandEventBroadcaster.getInstance().broadcastEvent(SharkfinControl.EVENT_SAVE_FORM,   
{form: true}, this);We have a custom EventBroadcaster that we wrote to 
include theResponder object (the 'this' argument). It's also passing in a 
booleanflag here (form). In our case the ViewHelperimplements the 
Responder interface.  This is for the purposedecoupling the command 
from the Responder (ViewHelper).  In ourResponder we have the 
onFault(event) and onResult(event) methods inwhich we do 
post-command-execution stuff.The problem it seems for me is that I want 
to have some sort of flagthat would distinguish between executing action X 
or Y (the formboolean).  I can set a flag when broadcasting the 
event.  The commandclass has access to these flag in the event.  
However, on onResult()the intiall event parameters is lost.  It appears 
to be a new eventobject.  Therefore, the responder onFault(event) and 
onResult(event)have no notion of any flags that were set before the service 
call.Is there a solution that you might know of to address this?  
The basicgist of my problem is to retrieve any event attr in onResult() 
andonFault() that were sent on the event when it was intially 
broadcasted.TIA,George





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Flex 2.0 Form validation

2006-01-07 Thread Ken Bromberger










Hi! I am new to flex and I am working on using the
validators flex 2.0 includes.

 

I have set up a form and can submit data to my test database
using HTTPService and the request tags and return a result. When I add a string
validator to my code the form no longer submits the HTTPService request. If I remove
the stringValidator from my code the form works just fine. What am I missing on
this?? Is there a good resource with examples of how to implement validation? 

Thanks! – Ken

 

Here is my code:

 



 xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*">

 



   




 

 id="strV" source="{test1}" property="text" minLength="5"
valid="handleValid(event)" invalid="handleValid(event)"/>

 

   id="test" url="">http://localhost/xml/template/test.xml" method="POST" showBusyCursor="True">

     xmlns="">

  {test1.text}

  {test2.text}

       

  

 

   width="100%" height="100%">

     x="34" y="25">

     text="{test.result.root.tblTest.success}"/>

   label="Test Form"/>

   label="Test 1" id="test1_lbl">

     id="test1"/>  

  

   label="Test 2" id="test2_lbl">

     id="test2"/>

  

 

     label="Submit" id="sub_btn"
click="submitForm();" enabled="false"/>   

 

      

  

 



 

 

 

 









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   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] Need help in tackling this event problem...

2006-01-07 Thread JesterXL
Clearly your problem is your custom EventDispatcher.  The one that comes 
with Flex allows me to throw any custom arg I want at result handlers.  Find 
out why he's not keeping your event handlers.

- Original Message - 
From: "george_lui" <[EMAIL PROTECTED]>
To: 
Sent: Friday, January 06, 2006 9:37 PM
Subject: [flexcoders] Need help in tackling this event problem...


Hi,

Here's my scenerio:

I have a view and it's corresponding ViewHelper.  There are two
buttons in the view.  If I hit button A, I want action X to occur.  If
I hit button B, I want action Y to occur.

This is how I broadcast my event in this view when I hit these buttons.

CommandEventBroadcaster.getInstance().broadcastEvent(SharkfinControl.EVENT_SAVE_FORM,
   {form: true}, this);

We have a custom EventBroadcaster that we wrote to include the
Responder object (the 'this' argument). It's also passing in a boolean
flag here (form). In our case the ViewHelper
implements the Responder interface.  This is for the purpose
decoupling the command from the Responder (ViewHelper).  In our
Responder we have the onFault(event) and onResult(event) methods in
which we do post-command-execution stuff.

The problem it seems for me is that I want to have some sort of flag
that would distinguish between executing action X or Y (the form
boolean).  I can set a flag when broadcasting the event.  The command
class has access to these flag in the event.  However, on onResult()
the intiall event parameters is lost.  It appears to be a new event
object.  Therefore, the responder onFault(event) and onResult(event)
have no notion of any flags that were set before the service call.

Is there a solution that you might know of to address this?  The basic
gist of my problem is to retrieve any event attr in onResult() and
onFault() that were sent on the event when it was intially broadcasted.

TIA,
George







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Slow Compile Times

2006-01-07 Thread Manish Jethani
On 1/7/06, Renaun Erickson <[EMAIL PROTECTED]> wrote:
> As my applications get larger and more complex they time to compile
> them go down.  What are the methods of keeping compile times down?  Is
> using swc's the best way?

Flex 2 has incremental compilation:
http://labs.macromedia.com/wiki/index.php/Flex_Framework:tutorials:compiling_mxmlc


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/