RE: [flexcoders] Sleep / Blink Image

2007-06-03 Thread Alex Harui
Sorry, AS doesn't sleep.  To blink something, listen for "enterFrame"
events and change the visuals..

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Christopher Olsen
Sent: Sunday, June 03, 2007 6:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sleep / Blink Image

 

Is there a way to make flex sleep for a specified amount of miliseconds?

I'm trying to make an icon flash

or does anyone have any alternate solutions for this

 



Re: [flexcoders] Sleep / Blink Image

2007-06-03 Thread Harish Sivaramakrishnan

use flash.utils.Timer / setInterval() to call a method on timer.

On 6/4/07, Christopher Olsen <[EMAIL PROTECTED]> wrote:


  Is there a way to make flex sleep for a specified amount of miliseconds?

I'm trying to make an icon flash

or does anyone have any alternate solutions for this

 



Re: [flexcoders] click event handler of datagrid, make it fire on rows only

2007-06-03 Thread Harish Sivaramakrishnan

Listen to itemClick on datagrid, It fires only when an item of the datagrid
is clicked.

On 6/4/07, Swaroop C H <[EMAIL PROTECTED]> wrote:


   You can monitor MouseEvent.DOUBLE_CLICK event and then use
mouseEventToItemRenderer to fetch the item renderer at the mouse position.

If the item renderer is not present in the listItems[0] array, that mean
it is not part of the header i.e. it is rendering a data/row.



Regards,

Swaroop
 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Derrick Anderson
*Sent:* Monday, June 04, 2007 3:40 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] click event handler of datagrid, make it fire
on rows only



thanks that event does work better, but hopefully this can be expanded
upon- for instance, using ListEvent.CHANGE fires when the user uses arrow
keys to switch between records- in my case that will open a popup each
time.  it would be best if i could fire an event on dbl click of a row only,
how can i do this?

- Original Message 
From: EECOLOR <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, June 3, 2007 4:50:36 PM
Subject: Re: [flexcoders] click event handler of datagrid, make it fire on
rows only

You should listen to ListEvent.CHANGE.

From the documentation:

change - Dispatched when the selectedIndex or selectedItem property
changes as a result of user interaction.


Greetz Erik

 On 6/3/07, *Derrick Anderson* > wrote:

hi,  anyone know how i can get the 'click' property of the datagrid to
only fire when i click a row?  right now it fires even if you are clicking
on one of the headers
...









 --

Shape Yahoo! in your own image. Join our Network Research Panel 
today!

 



RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -

2007-06-03 Thread Alex Harui
You can't really blow things away in AS3 (or Java).  You kill all
references to them and they go away when garbage collected.  If you are
listening to the app model, it means the app model has a reference to
the event listener and thus it won't go away.  Use weak references or
clean up when removed from the display list.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Sunday, June 03, 2007 11:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Component still active, even know TitleWindow
it resides in, is deleted -

 

Hello All,

I have a WEIRD problem, and I am hoping you can all shed some light on
this.

I have a Popup TitleWindow which serves the purpose of displaying
details from a Master Grid. Among all the other controls housed within
the TitleWindow, I am using the  Component, which monitors
a Boolean Value residing in my ApplicationModel.

Once the user is finished looking at the Details, they must close the
Window. I am using the PopUpManager.removePopUp() method of closing the
TitleWindow, which should in essence, blow away the TitleWindow itself,
in addition to all the Controls that reside within it.

Even know the TitleWindow gets closed, I am still getting Trace Messages
outputted to my custom Debug Window (which demonstrates the fact, that
my ObserveValue Component is still active & functioning). A quick note,
I am tracing the output so that I can monitor my variables during
development of my app.

How is this possible??

I must get to the bottom of this ASAP, as this is causing some problems
with the rest of my application.

Thanks in advance for any help you can throw my way.

Mike

 



RE: [flexcoders] click event handler of datagrid, make it fire on rows only

2007-06-03 Thread Swaroop C H
You can monitor MouseEvent.DOUBLE_CLICK event and then use
mouseEventToItemRenderer to fetch the item renderer at the mouse position.

If the item renderer is not present in the listItems[0] array, that mean it
is not part of the header i.e. it is rendering a data/row.

 

Regards,

Swaroop

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Derrick Anderson
Sent: Monday, June 04, 2007 3:40 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] click event handler of datagrid, make it fire on
rows only

 

thanks that event does work better, but hopefully this can be expanded upon-
for instance, using ListEvent.CHANGE fires when the user uses arrow keys to
switch between records- in my case that will open a popup each time.  it
would be best if i could fire an event on dbl click of a row only, how can i
do this?

- Original Message 
From: EECOLOR <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, June 3, 2007 4:50:36 PM
Subject: Re: [flexcoders] click event handler of datagrid, make it fire on
rows only

You should listen to ListEvent.CHANGE.

>From the documentation:

change - Dispatched when the selectedIndex or selectedItem property changes
as a result of user interaction.


Greetz Erik



On 6/3/07, Derrick Anderson mailto:[EMAIL PROTECTED]> > wrote:

hi,  anyone know how i can get the 'click' property of the datagrid to only
fire when i click a row?  right now it fires even if you are clicking on one
of the headers
...
 



 

 

 

  _  

Shape Yahoo! in your own image. Join
  our Network Research Panel today! 

 



[flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -

2007-06-03 Thread Mike Anderson
Hello All,

I have a WEIRD problem, and I am hoping you can all shed some light on
this.

I have a Popup TitleWindow which serves the purpose of displaying
details from a Master Grid.  Among all the other controls housed within
the TitleWindow, I am using the  Component, which monitors
a Boolean Value residing in my ApplicationModel.

Once the user is finished looking at the Details, they must close the
Window.  I am using the PopUpManager.removePopUp() method of closing the
TitleWindow, which should in essence, blow away the TitleWindow itself,
in addition to all the Controls that reside within it.

Even know the TitleWindow gets closed, I am still getting Trace Messages
outputted to my custom Debug Window (which demonstrates the fact, that
my ObserveValue Component is still active & functioning).  A quick note,
I am tracing the output so that I can monitor my variables during
development of my app.

How is this possible??

I must get to the bottom of this ASAP, as this is causing some problems
with the rest of my application.

Thanks in advance for any help you can throw my way.

Mike


[flexcoders] Re: Inverted charts

2007-06-03 Thread Sandeep Malik
Ya sure.

Here's a snapshot.

http://oss.oetiker.ch/rrdtool/

But I guess now that I think about it, all I need to do is plot the 
second line series with a negative value (so that it gets plotted 
below the x axis) and return the positive value in the labelFunction 
of Linear Axis (so that now a value 10 in second line series gets 
plotted at -10, however the label shows the value 10) This way I can 
have two y axes, one running upwards and one running downwards, 
pretty much what I wanted. Not sure but wil try with this approach. 
Lets see.

Regards,
Sandeep


--- In flexcoders@yahoogroups.com, "Brendan Meutzner" 
<[EMAIL PROTECTED]> wrote:
>
> Do you have an image or example of what you're trying to 
accomplish?  You're
> able to plot values in all 4 quadrants of the x/y axis both 
positive and
> negative, but it sounds like you want to render the axis and it's 
labels in
> the middle of your chart with a series above and below it... is 
that
> correct?
> 
> Brendan
> 
> 
> On 6/1/07, Sandeep Malik <[EMAIL PROTECTED]> wrote:
> >
> >   I have got a question for charting gurus:
> >
> > I want to plot two line series which use same horizontal axis 
but one
> > gets plotted above it (in +ve y axis) and other gets plotted 
below it
> > (-ve y direction). Any ideas how to do this?
> >
> > Regards,
> > Sandeep
> >
> >  
> >
> 
> 
> 
> -- 
> Brendan Meutzner
> Stretch Media - RIA Adobe Flex Development
> [EMAIL PROTECTED]
> http://www.stretchmedia.ca
>




Re: [flexcoders] Regular expression

2007-06-03 Thread shaun
rid_b80 wrote:
> Hi all,
> 
> In actionscript 3, is there any function that are able to check if the
> regular expression entered has the right syntax or not.

Sure! Its called a regular expression!

boom boom!
(sorry,  i just couldn't resist :)

> 
> I'm trying to make a page that allows user to define their own regular
> expression and i'm just trying to make sure that the expression that
> they enter is in the right format.
> 
> Thanks in advance,
> 
> Anthony
> 
> 


[flexcoders] Regular expression

2007-06-03 Thread rid_b80
Hi all,

In actionscript 3, is there any function that are able to check if the
regular expression entered has the right syntax or not.

I'm trying to make a page that allows user to define their own regular
expression and i'm just trying to make sure that the expression that
they enter is in the right format.

Thanks in advance,

Anthony



[flexcoders] Sleep / Blink Image

2007-06-03 Thread Christopher Olsen
Is there a way to make flex sleep for a specified amount of miliseconds?

I'm trying to make an icon flash

or does anyone have any alternate solutions for this



Re: [flexcoders] Chart snapshots

2007-06-03 Thread Doug McCune

This doesn't get you a 100% solution, but maybe it's good enough for you:
http://dougmccune.com/blog/2007/06/03/save-a-snapshot-image-of-a-flex-app-without-a-server/

It opens a popup window with a snapshot image of whatever Flex component you
specify. The user can then right click and copy or save. It doesn't work in
IE.

Doug

On 6/3/07, Brendan Meutzner <[EMAIL PROTECTED]> wrote:


  Andrew Trice has a great tutorial on this...


http://www.cynergysystems.com/blogs/page/andrewtrice?entry=flex_2_bitmapdata_tricks_and




On 6/3/07, simonjpalmer <[EMAIL PROTECTED]> wrote:
>
>   I have a requirement to be able to "copy and paste" a chart from my
> flex app to another application via the clipboard. The chart has to
> come exactly as it appears on the screen, almost like an
> alt-printscreen, but only the portion of the screen displaying the
> chart.
>
> Has anyone tried anything like this?
>
> I spotted a display object method called cacheAsBitmap which seems to
> be an optimisation for rendering, but I wondered if it was possible to
> get access to the display bitmap.
>
> Any clues?
>
>


--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca
 



Re: [flexcoders] Flex XML parsing E4X question

2007-06-03 Thread Peter Hall



Doesn't that work?


Peter



On 6/3/07, alexander.marktl <[EMAIL PROTECTED]> wrote:


  Hi,

I wanna parse a XML file like this:



http://www.example.com";>Huber
...



I have no problem parsing it, except of the href within the name tag.
My DataGrid looks like this:





...



 



Re: [flexcoders] click event handler of datagrid, make it fire on rows only

2007-06-03 Thread Derrick Anderson
thanks that event does work better, but hopefully this can be expanded upon- 
for instance, using ListEvent.CHANGE fires when the user uses arrow keys to 
switch between records- in my case that will open a popup each time.  it would 
be best if i could fire an event on dbl click of a row only, how can i do this?

- Original Message 
From: EECOLOR <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, June 3, 2007 4:50:36 PM
Subject: Re: [flexcoders] click event handler of datagrid, make it fire on rows 
only









  



You should listen to ListEvent.CHANGE.

>From the documentation:

change  - Dispatched when the selectedIndex or selectedItem property changes as 
a result of user interaction.


Greetz Erik





 

On 6/3/07, Derrick Anderson  wrote:

hi,  anyone know how i can get the 'click' property of the datagrid to only 
fire when i click a row?  right now it fires even if you are clicking on one of 
the headers















  
















   

Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.
http://autos.yahoo.com/carfinder/

Re: [flexcoders] Best way to set styles in actionscript?

2007-06-03 Thread EECOLOR

For custom styles I recommend you to add style metadata to the class like
this:

[Style(name="downloadIndicator", type="Class", inherit="no")]

This will give you code hinting in FlexBuilder for the component and in CSS
files aswell.


Greetz Erik


On 6/1/07, Mark Ingram <[EMAIL PROTECTED]> wrote:


That's brilliant - thanks Muzak!
(And thanks for the hint about URLs)

Mark



Re: [flexcoders] click event handler of datagrid, make it fire on rows only

2007-06-03 Thread EECOLOR

You should listen to ListEvent.CHANGE.


From the documentation:


change - Dispatched when the selectedIndex or selectedItem property changes
as a result of user interaction.


Greetz Erik


On 6/3/07, Derrick Anderson <[EMAIL PROTECTED]> wrote:


hi,  anyone know how i can get the 'click' property of the datagrid to
only fire when i click a row?  right now it fires even if you are clicking
on one of the headers
...






Re: [flexcoders] Making an individual Bar on a BarGraph stand out?

2007-06-03 Thread Brendan Meutzner

You'll need to use a custom renderer for your bar series items, and then
write conditionals within the renderer to display differently depending on
the value, or whatever affects the display you want.

Ely's got some great examples on his site...
http://demo.quietlyscheming.com/ChartSampler/app.html... specifically
Customization -> Per Column Colors... in the source
examples.customizing.SimpleRenderer.mxml and
examples.customizing.PerColumnFill.as


Brendan


On 6/1/07, abba_t <[EMAIL PROTECTED]> wrote:


  It seems simple probably is, but I have searched high and low and
probably have tried over one hundred different pieces of code but with
no luck. I can not seem to find a way to highlite one particular bar
on a bar graph. I can change the properties of the group of bars
(alpha, fill, width etc.) but I am trying to apply something to an
individual bar to make it appear highlited.

Any help would be greatly appreciated.


 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


Re: [flexcoders] Change Object Reference

2007-06-03 Thread Ralf Bokelberg

No, you are not alone. Maybe the content of my email just didn't come
across.
Kevin, is your example code complete?
r.

On 6/3/07, Alex Harui <[EMAIL PROTECTED]> wrote:


   Is it just me?  References don't need "unlinking".  The original
example should just work.   Kevin, can you post your code so we can see what
you're trying to do?





Re: [flexcoders] Inverted charts

2007-06-03 Thread Brendan Meutzner

Do you have an image or example of what you're trying to accomplish?  You're
able to plot values in all 4 quadrants of the x/y axis both positive and
negative, but it sounds like you want to render the axis and it's labels in
the middle of your chart with a series above and below it... is that
correct?

Brendan


On 6/1/07, Sandeep Malik <[EMAIL PROTECTED]> wrote:


  I have got a question for charting gurus:

I want to plot two line series which use same horizontal axis but one
gets plotted above it (in +ve y axis) and other gets plotted below it
(-ve y direction). Any ideas how to do this?

Regards,
Sandeep

 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


Re: [flexcoders] Chart snapshots

2007-06-03 Thread Brendan Meutzner

Andrew Trice has a great tutorial on this...


http://www.cynergysystems.com/blogs/page/andrewtrice?entry=flex_2_bitmapdata_tricks_and



On 6/3/07, simonjpalmer <[EMAIL PROTECTED]> wrote:


  I have a requirement to be able to "copy and paste" a chart from my
flex app to another application via the clipboard. The chart has to
come exactly as it appears on the screen, almost like an
alt-printscreen, but only the portion of the screen displaying the
chart.

Has anyone tried anything like this?

I spotted a display object method called cacheAsBitmap which seems to
be an optimisation for rendering, but I wondered if it was possible to
get access to the display bitmap.

Any clues?

 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


Re: [flexcoders] Flex XML parsing E4X question

2007-06-03 Thread Brendan Meutzner

Hey Alex,

Given an XML structure like so:

   [Bindable]
   private var myXML:XML = 
   
   http://www.example.com";>Huber
   
   
   http://www.example.com";>John
   
   
   http://www.example.com";>Bob
   
   ;

Your datagrid columns would look like this...




And you'd use a labelFunction like this...

private function myFunc(item:Object, column:DataGridColumn):String
{
   return [EMAIL PROTECTED];
}



Brendan

On 6/3/07, alexander.marktl <[EMAIL PROTECTED]> wrote:


  Hi,

I wanna parse a XML file like this:



http://www.example.com";>Huber
...



I have no problem parsing it, except of the href within the name tag.
My DataGrid looks like this:





...



 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


[flexcoders] click event handler of datagrid, make it fire on rows only

2007-06-03 Thread Derrick Anderson
hi,  anyone know how i can get the 'click' property of the datagrid to only 
fire when i click a row?  right now it fires even if you are clicking on one of 
the headers
...







 

Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

RE: [flexcoders] stage.stageWidth/stageHeight lies in standalone player?

2007-06-03 Thread Alex Harui
I think SAFlashPlayer might do a quick resize so if you check later it
has the right size.  Try tracing on "enterFrame" events.

 

In general, we do very little in the constructors.  There  is an INIT
method which is used to kick off real work.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of seriousbraincancer
Sent: Saturday, June 02, 2007 5:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] stage.stageWidth/stageHeight lies in standalone
player?

 

Hi all,

I'm trying to base some calculations on the stageHeight and
stageWidth, but I end up getting 636 and 464 every single time for
stageWidth and stageHeight (resp), no matter what parameters I give
for -default-size. I'm running the swf in the standalone player and
I've built it with the SDK.

When the swf loads, and it looks like the size I specify for
-default-size, but the actual values returned by those properties
don't match.

Here's a pared down example:

package {
import flash.display.Sprite;
public class Test extends Sprite {
function Test() {
trace([stage.stageWidth, stage.stageHeight]);
}
}
}

> mxmlc -default-size 200 200 Test.as

The trace output shows "636,464" when you run the resulting swf even
though the standalone player looks like it's 200x200.

Is this a bug in the standalone player?

 



RE: [flexcoders] Change Object Reference

2007-06-03 Thread Alex Harui
Is it just me?  References don't need "unlinking".  The original example
should just work.   Kevin, can you post your code so we can see what
you're trying to do?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jurgen Beck
Sent: Sunday, June 03, 2007 11:16 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Change Object Reference

 

Hey Kevin,

See if this makes sense in your configuration:


http://www.adobe.com/2006/mxml";
  
creationComplete="initApp()"
layout="vertical">



















You'll see objRef taking on the new object values and leaving obj1 alone
when you switch object assignments.

Jurgen

Kevin wrote: 

i couldn't get either of these solutions to work.  When I reset
the vo variable to nul (or new Object), it still modifies the object on
the model.  I could be doing something wrong, but for now, i decided to
instantiate an entirely new super class each time the vo changes.

 

I'll look into this a little more and see if I can do what I
want...

 

thanks, Kevin

 

 

 

 

On Jun 3, 2007, at 9:33 AM, Jurgen Beck wrote:





Rather than just assigning the model.someObject directly to the
vo object, you may first need to instantiate it with:

var vo:Object = new Object();

The assign the model.someObject to it:

vo = model.someObject;

When you then assign a different object to it, it should leave
model.someObject alone and just use the newly assigned object.

Jurgen

Kevin wrote:

This may be a simple question, but it's stumping me.

I have a component that contains a property (type
object) that holds 
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to
"unlink" the 
reference of vo to model.someObject, before I give it
another 
reference. How do I do that?

Thanks, Kevin

 

 

 



RE: [flexcoders] removeItemAt combined with getItemAt - Manipulating an arrayCollection

2007-06-03 Thread Alex Harui
You'd have to scan the arraycollection.  I wouldn't use an AC in a
filter function, I'd probably use an object map indexed by fieldTag so
you can remove faster.  The filter function should use for..in to
iterate the fields.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of michaelmatynka
Sent: Saturday, June 02, 2007 8:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] removeItemAt combined with getItemAt -
Manipulating an arrayCollection

 

Hello All, great group here. Delighted to have stumbled upon it.

I have an arrayCollection which is used to pass info to a function which
filters an XMLList. 
The arrayCollection, in an ideal world, would change in size and content
based on user 
selections of a series of checkboxes. (i.e. check a box, and add another
filter criteria to 
the arrayCollection, uncheck the box and the criteria gets removed and
the filter rerun).

Here is the arrayCollection:
[Bindable]
public var fields:ArrayCollection = new ArrayCollection([{fieldTag:
"big", value:"t"}, 
{fieldTag: "small", value: "t"}]);

The function in this case would return all items whose node named "big"
AND "small" 
matched "t". 

How can I use removeItemAt and getItemAt in a function to pass in 1
argument to remove 
an element of the arrayCollection. Say for example I wanted to remove
the element whose 
fieldTag was "big" but I did not know where it was in the
arrayCollection. Something like 
this worked when the array was not multidimensional:

fields.removeItemAt(arr.getItemIndex("big");

I would love to put this mess to bed, can anyone shed some light on
this?

Thanks a bunch.

 



Re: [flexcoders] Change Object Reference

2007-06-03 Thread Jurgen Beck

Hey Kevin,

See if this makes sense in your configuration:


http://www.adobe.com/2006/mxml";
   creationComplete="initApp()"
   layout="vertical">

   
   

   
  
   

   
   
   text="{objRef.text}"/>

   
   
   
   
   

   
   
  



You'll see objRef taking on the new object values and leaving obj1 alone 
when you switch object assignments.


Jurgen

Kevin wrote:


i couldn't get either of these solutions to work.  When I reset the vo 
variable to nul (or new Object), it still modifies the object on the 
model.  I could be doing something wrong, but for now, i decided to 
instantiate an entirely new super class each time the vo changes.



I'll look into this a little more and see if I can do what I want...

thanks, Kevin




On Jun 3, 2007, at 9:33 AM, Jurgen Beck wrote:

Rather than just assigning the model.someObject directly to the vo 
object, you may first need to instantiate it with:


var vo:Object = new Object();

The assign the model.someObject to it:

vo = model.someObject;

When you then assign a different object to it, it should leave 
model.someObject alone and just use the newly assigned object.


Jurgen

Kevin wrote:


This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to "unlink" the
reference of vo to model.someObject, before I give it another
reference. How do I do that?

Thanks, Kevin





 


RE: [flexcoders] Re: Custom Attributes

2007-06-03 Thread Alex Harui
I saw an internal discussion that there may have been a bug.  I tried a
similar example in hotfix 2 and it worked for me so upgrade to hotfix 2
and give it a try there.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gary_mangum
Sent: Saturday, June 02, 2007 6:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Attributes

 

So, can something like this be done or not? I want to define a bunch
of constant values and pass them in as the value for a custom
attribute. Can I do this? I don't want to hard code these values.

Thanks!

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> There used to be warnings. I can't recall if we've gotten around them
> yet, but you still might be getting hit up by some initialization
thing.
> Try looking in your trace output, it might be a runtime warning.
> 
> 
> 
> Also dump out the value of that constant at various time. It might
> start out 0 and gets set to 2 during component instantiation.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of gary_mangum
> Sent: Friday, June 01, 2007 3:33 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Re: Custom Attributes
> 
> 
> 
> Thanks for your response!
> 
> I am not getting any compiler errors...should I be? Is it illegal to
> assign constant values to an attribute?
> 
> I am trying to create an attribute that is an integer "mask" and then
> use OR-ed together constants to pass in and set the attribute? Isn't
> this possible?
> I'd hate to hard code all of my attribute values to magic numbers if
> it is possible to use constants instead for readability and
> maintainability.
> 
> In my example, myComponent.xml is the class, not MyComponent. 
> 
> --- In flexcoders@yahoogroups.com


> , "Alex Harui"  wrote:
> >
> > Aren't you getting compiler warnings about binding to statics?
> > 
> > 
> > 
> > What is "myComponent"? "MyComponent" is the class, but "myComponent"
> > must be something else?
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com


> [mailto:flexcoders@yahoogroups.com


> ] On
> > Behalf Of gary_mangum
> > Sent: Friday, June 01, 2007 10:53 AM
> > To: flexcoders@yahoogroups.com 
 
> > Subject: [flexcoders] Re: Custom Attributes
> > 
> > 
> > 
> > Still haven't figured this one out...is this a bug in flex?
> > 
> > --- In flexcoders@yahoogroups.com
 
> 
> 
> > , "gary_mangum"  wrote:
> > >
> > > I am unsuccessfully trying to pass an integer constant to a custom
> > > integer attribute of a custom component. Confused yet? Here's an
> > > example of what I am trying to do:
> > > 
> > > Application:
> > > 
> > > http://www.adobe.com/2006/mxml
 
>  > 
> > 
 > > "
> width="700"
> > > height="250" borderStyle="solid" xmlns:ns1="*">
> > >  > > supportTypeMask="{myComponent.TYPE_MASK_TEXT}"/>
> > > 
> > > 
> > > MyComponent:
> > > 
> > > http://www.adobe.com/2006/mxml
 
>  > 
> > 
 > > ">
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > The public var supportTypeMask is never getting set for some
reason
> if
> > > I try to pass it one of the constants. If I pass "2" instead of
> > > "{myComponent.TYPE_MASK_TEXT}" it works great.
> > > 
> > > Any ideas about what I am doing wrong here?
> > > 
> > > Thanks for your help!
> > >
> >
>

 



RE: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG or... WIsh...

2007-06-03 Thread Alex Harui
Tried it in hotfix2, tooltip came up and editor did not lose focus.
Which player, browser, os?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nxzone
Sent: Friday, June 01, 2007 12:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tooltip in itemeditor of datagrid BUG or...
WIsh...

 

Enter more then 10 character in the email and rollover the textinput :)


http://www.adobe.com/2006/mxml
 "
layout="absolute">


Christina Coenraets
[EMAIL PROTECTED] 



 





 










 



Re: [flexcoders] Change Object Reference

2007-06-03 Thread Ralf Bokelberg

Afaik this is not possible. I guess your example is incomplete, or ?
Cheers,
Ralf.


On 6/3/07, Kevin <[EMAIL PROTECTED]> wrote:


  This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to "unlink" the
reference of vo to model.someObject, before I give it another
reference. How do I do that?

Thanks, Kevin
 





--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35


[flexcoders] Re: Change Object Reference

2007-06-03 Thread apple_sky_2000



package yanggang.tstAS3.tstRefChain{
public class RefChain{
public static function main():void{
var model:Object = { someObject:{ name:"someObject"}};
var vo:Object = model.someObject;
vo = { name:"someNewObject" };
trace( model.someObject.name );
}
}
}

Guess what???

It prints someObject!!

Anything wrong Kevin plz??




--- In flexcoders@yahoogroups.com, Kevin <[EMAIL PROTECTED]> wrote:
>
> This may be a simple question, but it's stumping me.
> 
> I have a component that contains a property (type object) that holds  
> a reference to an VO on my model.
> 
> How to I "unlink" that reference?
> 
> For example, when I set the property:
> 
> var vo : Object = model.someObject;
> 
> I then do something like this:
> 
> vo = someNewObject;
> 
> This happens
> model.someObject get's set to someNewObject...
> 
> This is not what I want.  Therefore, I assume I have to "unlink" the  
> reference of vo to model.someObject, before I give it another  
> reference.  How do I do that?
> 
> Thanks, Kevin
>




Re: [flexcoders] Change Object Reference

2007-06-03 Thread Kevin
i couldn't get either of these solutions to work.  When I reset the  
vo variable to nul (or new Object), it still modifies the object on  
the model.  I could be doing something wrong, but for now, i decided  
to instantiate an entirely new super class each time the vo changes.


I'll look into this a little more and see if I can do what I want...

thanks, Kevin




On Jun 3, 2007, at 9:33 AM, Jurgen Beck wrote:

Rather than just assigning the model.someObject directly to the vo  
object, you may first need to instantiate it with:


var vo:Object = new Object();

The assign the model.someObject to it:

vo = model.someObject;

When you then assign a different object to it, it should leave  
model.someObject alone and just use the newly assigned object.


Jurgen

Kevin wrote:

This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to "unlink" the
reference of vo to model.someObject, before I give it another
reference. How do I do that?

Thanks, Kevin







Re: [flexcoders] Change Object Reference

2007-06-03 Thread Kevin

thanks.  I will try this and let you know if it works.

- kevin


On Jun 3, 2007, at 9:33 AM, Jurgen Beck wrote:

Rather than just assigning the model.someObject directly to the vo  
object, you may first need to instantiate it with:


var vo:Object = new Object();

The assign the model.someObject to it:

vo = model.someObject;

When you then assign a different object to it, it should leave  
model.someObject alone and just use the newly assigned object.


Jurgen

Kevin wrote:

This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to "unlink" the
reference of vo to model.someObject, before I give it another
reference. How do I do that?

Thanks, Kevin







[flexcoders] Flex XML parsing E4X question

2007-06-03 Thread alexander.marktl
Hi,

I wanna parse a XML file like this:



   
  http://www.example.com";>Huber
  ...
   



I have no problem parsing it, except of the href within the name tag.
My DataGrid looks like this:


   
  
  
  ...
   
  



Re: [flexcoders] Change Object Reference

2007-06-03 Thread Jurgen Beck
Rather than just assigning the model.someObject directly to the vo 
object, you may first need to instantiate it with:


var vo:Object = new Object();

The assign the model.someObject to it:

vo = model.someObject;

When you then assign a different object to it, it should leave 
model.someObject alone and just use the newly assigned object.


Jurgen

Kevin wrote:


This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to "unlink" the
reference of vo to model.someObject, before I give it another
reference. How do I do that?

Thanks, Kevin

 


Re: [flexcoders] Change Object Reference

2007-06-03 Thread Michael Schmalle

Hi,

I would think that setting;

vo = null;

then

vo = someNewObject

would unlink the reference.

OR

vo = new Object();

then

vo = someNewObject

Peace, Mike


On 6/3/07, Kevin <[EMAIL PROTECTED]> wrote:


  This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want. Therefore, I assume I have to "unlink" the
reference of vo to model.someObject, before I give it another
reference. How do I do that?

Thanks, Kevin
 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Change Object Reference

2007-06-03 Thread Kevin
This may be a simple question, but it's stumping me.

I have a component that contains a property (type object) that holds  
a reference to an VO on my model.

How to I "unlink" that reference?

For example, when I set the property:

var vo : Object = model.someObject;

I then do something like this:

vo = someNewObject;

This happens
model.someObject get's set to someNewObject...

This is not what I want.  Therefore, I assume I have to "unlink" the  
reference of vo to model.someObject, before I give it another  
reference.  How do I do that?

Thanks, Kevin


Re: [flexcoders] summing a value in an arrayCollection?

2007-06-03 Thread Jurgen Beck

Need to correct (add) one line. Forgot to add the cursor.moveNext():

var cursor:IViewCursor = myAC.createCursor();
var sumPop:int = 0;

var myObject:Object;
while (!cursor.afterLast) {
   myObject = cursor.current;
   sumPop += myObject.population;
   cursor.moveNext();

}



Jurgen Beck wrote:


Hi Todd,

One of the ways would be to traverse your ArrayCollection with a cursor:

var cursor:IViewCursor = myAC.createCursor();
var sumPop:int = 0;
var myObject:Object;
while (!cursor.afterLast) {
myObject = cursor.current;
sumPop += myObject.population;
}

Jurgen

todd_geist wrote:


Hello,

Very new here. Trying to get some of the basics. I have datagrid
that is populated with the following arrayColleciton










How do I go about getting the sum of the population?

Thanks in advance for any advice.

Todd

 


[flexcoders] removeItemAt combined with getItemAt - Manipulating an arrayCollection

2007-06-03 Thread michaelmatynka
Hello All, great group here.  Delighted to have stumbled upon it.

I have an arrayCollection which is used to pass info to a function which 
filters an XMLList.  
The arrayCollection, in an ideal world, would change in size and content based 
on user 
selections of a series of checkboxes.  (i.e.  check a box, and add another 
filter criteria to 
the arrayCollection, uncheck the box and the criteria gets removed and the 
filter rerun).

Here is the arrayCollection:
[Bindable]
public var fields:ArrayCollection = new ArrayCollection([{fieldTag: "big", 
value:"t"}, 
{fieldTag: "small", value: "t"}]);

The function in this case would return all items whose node named "big" AND 
"small" 
matched "t".  

How can I use removeItemAt and getItemAt in a function to pass in 1 argument to 
remove 
an element of the arrayCollection.  Say for example I wanted to remove the 
element whose 
fieldTag was "big"  but I did not know where it was in the arrayCollection.  
Something like 
this worked when the array was not multidimensional:

fields.removeItemAt(arr.getItemIndex("big");

I would love to put this mess to bed, can anyone shed some light on this?

Thanks a bunch.



[flexcoders] Image click handler

2007-06-03 Thread Cesare Rocchi
Hello everybody,

I am experimenting with Flex.
I started from official examples, from Adobe. 
Particularly this one: http://www.adobe.com/devnet/flex/quickstart/httpservice/


Looking at the demo I thought it would have been nicer to have the picture of 
page open when the picture itself, and not the link button below, is clicked.
I noticed that 


Compiled (no error) and tested. I click on the image and it does not happen 
anything. Link button still works.
Isn't the same action fired from 2 different 'places' in the ui?
Looks very very strange to me. 
Any idea?

ps. I tested other functions on image click (e.g. Alert.show('hello')). They 
work. What's wrong? Is the event considered in a different way?

Thanks in advance,

-c.




   

Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

[flexcoders] Chart snapshots

2007-06-03 Thread simonjpalmer
I have a requirement to be able to "copy and paste" a chart from my
flex app to another application via the clipboard.  The chart has to
come exactly as it appears on the screen, almost like an
alt-printscreen, but only the portion of the screen displaying the
chart.  

Has anyone tried anything like this?

I spotted a display object method called cacheAsBitmap which seems to
be an optimisation for rendering, but I wondered if it was possible to
get access to the display bitmap.

Any clues?



Re: [flexcoders] summing a value in an arrayCollection?

2007-06-03 Thread Roman Protsiuk

Just another option:

var total : Number = 0;
for each (var obj : Object in myAC) {
   total += obj.population;
}

R.

On 6/3/07, Jurgen Beck <[EMAIL PROTECTED]> wrote:


   Hi Todd,

One of the ways would be to traverse your ArrayCollection with a cursor:

var cursor:IViewCursor = myAC.createCursor();
var sumPop:int = 0;
var myObject:Object;
while (!cursor.afterLast) {
myObject = cursor.current;
sumPop += myObject.population;
}

Jurgen

todd_geist wrote:

 Hello,

Very new here. Trying to get some of the basics. I have datagrid
that is populated with the following arrayColleciton










How do I go about getting the sum of the population?

Thanks in advance for any advice.

Todd

   



[flexcoders] Set size of the SWF application depending on parameters

2007-06-03 Thread jairokan
Hi,
Here's an example:
package com.mypackage { [SWF(width="320", height="470",
backgroundColor="#FF9966")]  public class MainApplication extends
Sprite { public function MainApplication() {
addChild(childObjectInSamePackage); } } }  The first line
after package declaration sets the Width and  Height of the swf file.  I
have a Utils class with static variables, for example Utils.width and
Utils.height. I tried to use these variables in that declaration but I
have compile time error. I'm trying this: [SWF(width=Utils.width,
height=Utils.height, backgroundColor="#FF9966")] But it doesn't compile.
Any suggestions how to set up these two parameters with variables?

Regards
Jamal