RE: [flexcoders] Combobox as itemrendere in Datagird

2008-04-24 Thread Alex Harui
I'm not sure what behaves abnormally means.

 

There was a bug where an additional ComboBox would appear below the DG.
That has been fixed in 3.0

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Parkash
Sent: Wednesday, April 23, 2008 10:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Combobox as itemrendere in Datagird

 

Hello friends ..

I am using Flex 2.0.1, i have one data grid with two coloumns. in the
first coloumn i have used combobox as item but it is not working
correctly as soon as visible area of grid fills up the combobox behaves
abnormally can u tell me if any one of had faced this problem .. or what
cud be the problem

 



[flexcoders] How to detect if hardware scaling is disabled?

2008-04-24 Thread tuomas.glad
Hi,

Is there anyway to detect is hardware scaling is enabled/disabled? I'm
getting weird results if I disable hardware scaling from player
preferences and try to go to fullscreen mode.

Thanks,
Tuomas



[flexcoders] Re: How to detect if hardware scaling is disabled?

2008-04-24 Thread tuomas.glad
--- In flexcoders@yahoogroups.com, tuomas.glad [EMAIL PROTECTED] wrote:

 Hi,
 
 Is there anyway to detect is hardware scaling is enabled/disabled? I'm
 getting weird results if I disable hardware scaling from player
 preferences and try to go to fullscreen mode.
 
 Thanks,
 Tuomas


I forgot to mention that I'm using Stage.fullScreenSourceRect.



[flexcoders] pieChart (callout) labels not redrawn on drill down

2008-04-24 Thread rleuthold
Hi,

I'm having a pieChart double click enabled, to get a drill down for the 
selected pieChart item. 
This drill down is displayed aside of the original chart.

The problem is, that the labels for the original chart disappear (or do not get 
redrawn) when 
the original chart gets double clicked the FIRST TIME. If you double click 
(whatever pieChart 
item)  again, the labels appear. Does anybody have an idea why this happens ?

thanks _rico



[flexcoders] PopUpButton as ItemEditor for DataGrid

2008-04-24 Thread Battershall, Jeff
I'm pushing the envelope in terms of how many editable fields are going
to fit within the available horizontal space. The issue is basically how
to open an itemeditor that is not constrained by the width of the
column.  

So I've been investigating having a text field popup when in editmode
that gives the user more space to edit, that will not be constrained by
the column width.  I've tried using a PopUpButton as the itemEditor and
having the text field in there, but what I'm seeing is that if you
doubleclick on the cell too quickly, an exception is thrown in
PopUpButton.as - it appears that the _popUp isn't yet defined.  If you
click more slowly, there's no issue.

I'm not that happy with the PopUpButton solution as the first thing the
user sees is the button and has to click again to open.  What I'd prefer
is simply to have the itemEditor popup on its own without further user
interaction.

Ironcially, I've got a another column working perfectly when editing a
list of items. But for some reason, my TextField editor popup is buggy
and I haven't been able to identify exactly why. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)


[flexcoders] Google or Yahoo Maps - Custom tile/image/background

2008-04-24 Thread Nirav Upadhyay
Hi,

I have researched lot in Google and Yahoo Maps.
I have found lots of things also.
But i want an advanced functionality in any of the Map technology.

I want to change tile/image/background of the Google/Yahoo Map from default
to anyone i want.
Means i can be able to change the background/tile/image to Car, Flower,
Person or anything from the default map image.
Can anybody help me if you have worked in this?

Thanks,
Nirav


RE: [flexcoders] Could the Flex Gurus shed some light on this behavior?

2008-04-24 Thread Rick Winscot
Mike,

 

From a performance point of view - you wouldn't want to be loading external
assets twice. It's good that you see this: load what you need. need what you
load. load it once. use it many times. What will help is to think more about
where that data ends up. accessing the raw data is always nice - but in Flex
you have all the visual data you need right in front of your eyes
(BitmapData). Once you've loaded your map use BitmapData (with matrix) to
push maga-map pixels to your mini-map. This will give you ultimate control
of sizing, key-holing, panning, etc.

 

Rick Winscot

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Wednesday, April 23, 2008 1:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Could the Flex Gurus shed some light on this behavior?

 

Hello All,

For the longest time, I've been wondering why 2 Loader Controls, are
unable to share the same content. Then again this may be by design, and
my lack of knowledge relating to Flex could be why I don't understand
this.

For example, I have a SWFLoader Control which comprises the majority of
my Application's desktop. It displays a loaded Map, in which users can
drag icons onto the desktop, pan, zoom, as well as many other functions.

I have a small navigator window that stays on top in a static position,
in which the same content displayed in the SWFLoader, also gets
displayed in the Navigator Control. The Navigator Control just gives
the user an indication of the Map portion being displayed in the main
window.

In order to avoid having to load the SWF File TWICE, I thought I could
set the content property of the Navigator Control, to the
SWFLoader.contentLoaderInfo.content property - but when I do this, the
loaded SWF disappears from the main screen, and appears in the small
Navigator Window.

Is this literally how things work in Flex? 2 data aware components
can share the same ArrayCollection for their dataProvider Property, but
2 graphical display components, cannot share the same content?

I would be grateful to hear the experts explanation on how this type of
thing works within Flex.

Thanks in advance for all your incredible help,

Mike

 

image001.jpgimage002.jpg

[flexcoders] ocnfusion over data services with flex3 standard

2008-04-24 Thread duncan mcmillan
Hi
I have recently upgraded from Flex2-Flex3 Beta to Flex3 standard, I'm now 
wanting to link with PHP classes using remoteObject components and have 
downloaded Weborb. I did have FDS with my Flex2.
Question is what do I need to connect to my PHP classes remotely and which is 
the best option?? Do I need Lifecycle or BlazeDS over and above my recently 
downloaded WebOrb?
Sorry but I'm really confused on what the best option is (and the cheapest).
Thanks in advance
Duncan


  ___ 
Yahoo! For Good. Give and get cool things for free, reduce waste and help our 
planet. Plus find hidden Yahoo! treasure 

http://green.yahoo.com/uk/earth-day/


[flexcoders] Slooooow Compare Editor in FB3

2008-04-24 Thread Dmitri Girski
Please vote on this bug:
https://bugs.adobe.com/jira/browse/FB-12492

This performance will not stand, man! :)

Cheers!



[flexcoders] Re: passing parameters to components

2008-04-24 Thread markgoldin_2000
Not sure about #1.
I will be ading dataGrids to the main container dynamically because 
it's not known how many will be at the design time. Can I just loop 
thru my data adding dataGrids to the main HBox one by one?

--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:

 1. Create the internal components in an override of createChildren
()
 
 In the main container, HBox, right?
 
  
 
 Write a component, say MultiDataGrid, that extends HBox (or Canvas, 
or
 Container). In MultiDataGrid, override createChildren() to create 
the
 internal stuff (DataGrids, VBoxes if necessary, etc.)
 
  
 
 2. Write a setter for the data
 Isn't it supposed to be on internal dataGrid class since same class 
 is used for each internal dataGrid?
 
  
 
 That depends on how you want to set data into the MultiDataGrid. If 
you
 want to just write
 
  
 
 mdg.dataProvider = ...;
 
  
 
 and have the data magically appear in the right DataGrids (which 
seems
 like the best approach), then you'd implement a 'dataProvider' 
property
 on MultiDataGrid.
 
  
 
 If that's not natural, you might decide that MultiDataGrid needs to
 publicly expose the fact that it has a bunch of DataGrids inside, 
and
 provide some way to access them. In that case, since each DataGrid
 already has a 'dataProvider' property, it wouldn't be necessary to
 override this unless the 'dataProvider' takes some weird form that
 DataGrid doesn't already understand. However, this isn't as good an
 approach, because the DataGrids won't get created until you add the
 MultiDataGrid to the display list, so you couldn't write code like
 
  
 
 var mdg:MultiDataGrid = new MultiDataGrid();
 
 mdg.getUpperDataGridAt(3).dataProvider = ...;
 
 
 3. In an override of commitProperties(), ..
 of an internal dataGrid class for the same reason as #2?
 
 
 
 If you go with approach where you create a 'dataProvider' property 
on
 MultiDataGrid, then the commitProperties() method of MultiDataGrid 
would
 handle taking the complete set of data which was specified for the
 entire MultiDataGrid and commiting various parts of it into the 
right
 individual DataGrid.
 
  
 
 Gordon Smith
 
 Adobe Flex SDK Team
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of markgoldin_2000
 Sent: Wednesday, April 23, 2008 2:28 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: passing parameters to components
 
  
 
 Alright, I see. But a bit more detail.
 1. Create the internal components in an override of createChildren
()
 In the main container, HBox, right?
 2. Write a setter for the data
 Isn't it supposed to be on internal dataGrid class since same class 
 is used for each internal dataGrid?
 3. In an override of commitProperties(), ..
 of an internal dataGrid class for the same reason as #2?
 
 Thanks a lot for help.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Gordon Smith gosmith@ wrote:
 
  Why Canvas? Why not a VBox to hold the two DataGrids?
  
  
  
  Or use a single horizontally-scrolling Canvas and put the 
DataGrids 
 at
  the correct locations. Then you don't need any HBoxes or VBoxes.
  
  
  
  In any case, you probably don't want to create the
  Canvases/VBoxes/DataGrids based on the data, because every time 
the 
 data
  changes you'll waste time getting rid of them and creating new 
 ones. If
  the number of columns (or an upper bound) is know, the normal 
 process is
  
  
  
  1. Create the internal components in an override of createChildren
()
  (after calling the supermethod).
  
  
  
  2. Write a setter for the data.
  
  
  
  3. In an override of commitProperties(), call the supermethod and 
 then
  stuff the internal components with the data. If necessary, hide 
 extra
  ones that aren't needed.
  
  
  
  Gordon Smith
  
  Adobe Flex SDK Team
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of markgoldin_2000
  Sent: Wednesday, April 23, 2008 1:56 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Re: passing parameters to components
  
  
  
  That's is going to be my next step.
  Loop thru my data and add canvas from left to right.
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  , Gordon Smith gosmith@ wrote:
  
   Why aren't you just using a horizontally-scrolling HBox?
   
   
   
   - Gordon
   
   
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
 40yahoogroups.com
  ] On
   Behalf Of markgoldin_2000
   Sent: Wednesday, April 23, 2008 1:43 PM
   To: 

Re: [flexcoders] Please help

2008-04-24 Thread Tom Chiverton
On Tuesday 22 Apr 2008, markgoldin_2000 wrote:
 How someone would design it? I am trying to use Timer to monitor
 setting for the internal dataGrid but that is not going well either.

Why not just attach an event listener for some event or other ? Or fire your 
own when your renderer is done if the framework doesn't have one you can use 
reliably.

-- 
Tom Chiverton
Helping to collaboratively enable advanced features
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: 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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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] Flex decoding soap complex objects in complex objects

2008-04-24 Thread jeff
On Wed, Apr 23, 2008 at 06:08:32PM -, christophertholen wrote:

 An example would be a returnobject, containing the status of a call, a
 description string and the result array of complex objects.

We use nested complex objects frequently and they seem to decode fine.  Some of 
our calls return structures that are nested nearly a dozen layers 
deep, with arrays appearing on multiple levels.

How are you calling the services, are you using the code generator?  Can you 
provide more information on the nature of the deserialization failure?

-Jeff


[flexcoders] passing parameters to eventlistener functions

2008-04-24 Thread netdeep

I need to pass a parameter to a function using actionscript.  However by 
default, all you can 
pass are events to the function called by an eventlistener.  I know this is 
easy to do in MXML, 
but can it be done in actionscript?  The documentation has this to say about it:

Because the second parameter of addEventListener() is a function, you cannot 
specify 
parameters of that function in the addEventListener() call. So, to pass 
additional parameters 
to the listener function, you must define them in the listener function and 
then call the final 
method with those parameters.

But what does it mean to call the final method with those parameters.  No 
examples are 
given.  Could someone give me a quick example of how this is done?





[flexcoders] Re: Flex decoding soap complex objects in complex objects

2008-04-24 Thread twcrone70
If you have control of the web service itself and no one is forcing
you to use SOAP you have other less complex, better performing options.

1)  If you want to use XML, try using REST style web services or a
straight XML representation of your object and you can explicitly
control how you read/write the object(s),
2)  If you have some Ajax code that might call it also, you might
consider using JSON,
3)  But the best solution if your client is Flex and will most likely
always be Flex (in my opinion) is to use AMF.

I know that Flex supports SOAP web services but after working for a
while with fairly complex SOAP web services using Java tools but
having to play well with .NET generated solutions convinced me that
complexity for the sake of complexity (SOAP) is going to make your
life harder no matter what tools you use.

But I understand if you have some 'architect' or manager telling you
that you MUST use SOAP.  Been there...

$0.02

Good luck!

- Todd

--- In flexcoders@yahoogroups.com, christophertholen [EMAIL PROTECTED]
wrote:

 Hi,
 
 I am having trouble with the Flex decoding of complex soap objects.
 The mxml is validated and looks fine, but the object structure is
 quite complex and Flex seem to have a lot of trouble decoding the
 objects I send from the server.
 
 An example would be a returnobject, containing the status of a call, a
 description string and the result array of complex objects.
 
 The Flex SOAPdecoder does not seem to be able to decode the array of
 complex objects.
 
 
 Do you know if there is any solution to this?
 If there is not a solution, is it because having nested complex
 objects is not recommended for web services?
 Would a flat object layer be a better and faster solution even though
 it pollutes the server structure a lot?
 
 
 
 Thanks,
 Chris





[flexcoders] Re: How do I repaint?

2008-04-24 Thread Matt
Surely somebody can tell me how to force a repaint on a changed icon
for a LinkButton?

--- In flexcoders@yahoogroups.com, Matt [EMAIL PROTECTED] wrote:

 I am dynamically setting the 'icon' to a LinkButton using Ben Stucki's
 IconUtility and it works great when the link first gets loaded, but if
 I want to dynamically change the icon after it is displayed it doesn't
 refresh properly.
 
 If I add a line to displayLoader that calls
 component.styleChanged('icon') that seems to help a little...when I
 move my mouse over the link the icon will change to the correct one.
 I'm still missing a step I think. What else do I need to do in order
 to get it to completely redraw the LinkButton to display the new icon?
 
 Is there some way I can replicate the mouseover validation that occurs
 (since there is obviously something in there that's doing what I need)?





[flexcoders] Re: passing parameters to eventlistener functions

2008-04-24 Thread twcrone70
Create a custom event that has a field or fields that hold your
parameter(s).  When you create the event for dispatching you can then
add the parameter(s) and since that event is passed in to the handler
method, you will have the parameter(s) in the event instance.


package mypkg
{
   import flash.events.Event;

   /**
* Custom event that holds extra data.  Insipred by Cliff Hall's
PureMVC framework
* and usage of Notifications.
*  
* @author Todd Crone
*/
   public class CustomEvent extends Event
   {
  /**
   * The data associated with the event. 
   */
  public var body:Object;
  
  /**
   * Constructor.
   *  
   * @param type
   *The event type.
   * @param body
   *The body for this custom event.
   * @param bubbles
   *Whether or not this event bubbles up the component
hierarchy or not.
   * @param cancelable
   *Is this event cancelable by a listener.
   */
  public function CustomEvent( type:String, 
   body:Object, 
   bubbles:Boolean = false, 
   cancelable:Boolean = false )
  {
 super( type, bubbles, cancelable );
 
 this.body = body;
  }
  
   }
}



Hope this helps!

- Todd


--- In flexcoders@yahoogroups.com, netdeep [EMAIL PROTECTED] wrote:

 
 I need to pass a parameter to a function using actionscript. 
However by default, all you can 
 pass are events to the function called by an eventlistener.  I know
this is easy to do in MXML, 
 but can it be done in actionscript?  The documentation has this to
say about it:
 
 Because the second parameter of addEventListener() is a function,
you cannot specify 
 parameters of that function in the addEventListener() call. So, to
pass additional parameters 
 to the listener function, you must define them in the listener
function and then call the final 
 method with those parameters.
 
 But what does it mean to call the final method with those
parameters.  No examples are 
 given.  Could someone give me a quick example of how this is done?





[flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm

2008-04-24 Thread valdhor
Check the value of your listener function:

Application.application.repeatermovies.detailmovie.loaderCompleteHandler

The error says that this is null.



[flexcoders] Re: ocnfusion over data services with flex3 standard

2008-04-24 Thread valdhor
I have done very little with WebORB (All my stuff uses AMFPHP) but
they are very similar.

Either one is all you need to do remoting in Flex - no need for
BlazeDS, LCDS or anything else.

Set up your Value Objects (VO's) or Data Transfer Objects (DTO's)
(Whichever terminology feels better to you); create your service with
PHP; Create a RemoteObject in Flex and call a method on your service
(Optionally sending data) and Bob's your auntie.


--- In flexcoders@yahoogroups.com, duncan mcmillan [EMAIL PROTECTED] wrote:

 Hi
 I have recently upgraded from Flex2-Flex3 Beta to Flex3 standard,
I'm now wanting to link with PHP classes using remoteObject components
and have downloaded Weborb. I did have FDS with my Flex2.
 Question is what do I need to connect to my PHP classes remotely and
which is the best option?? Do I need Lifecycle or BlazeDS over and
above my recently downloaded WebOrb?
 Sorry but I'm really confused on what the best option is (and the
cheapest).
 Thanks in advance
 Duncan
 
 
   ___ 
 Yahoo! For Good. Give and get cool things for free, reduce waste and
help our planet. Plus find hidden Yahoo! treasure 
 
 http://green.yahoo.com/uk/earth-day/





[flexcoders] Re: AdvancedDataGrid preserve openItems after data update

2008-04-24 Thread sameerbhatt13
Can you post a sample in which the issues occurs?

- Sameer

--- In flexcoders@yahoogroups.com, rockstar77877 [EMAIL PROTECTED]
wrote:

 Scott and Jonese:
 
   I am currently trying to deal with the same issue.  I was 
 actually ALMOST there, but I think I have discovered a bug in Flex.  
 
 So the problem:  Keeping the AdvancedDataGrid nodes that were already 
 expanded, open after a filter and refresh (specifically 
 a 'GroupCollection' refresh).
 
 First, I got a nice array of objects containing the 'nodes' for the 
 grid nodes that were opened, adg.dataProvider.openNodes
 Next, I did the filter and gc.refresh().
 The final step was to iterate through all the nodes, find out which 
 ones had the same GroupLabel, and expand them 
 using adg.dataProvider.openNode(node:Object).
 
 This is where I ran into problems.  When I tried to re-open a node 
 using openNode, the node would expand, but the nodes below it would 
 not be in the right tree level (it seems as if they were stepping 
 down in level one by one, even though they were supposed to be all on 
 the same level below it).  Now here is a real kicker!  If I go to 
 click on anything in the grid after that, the display automatically 
 corrects itself!  So odd.
 
 If anyone has seen the same thing, or know what I'm even talking 
 about please let me know.  Thanks!
 
 rockstar   
 
 
 --- In flexcoders@yahoogroups.com, Eric Jones gigado@ wrote:
 
  Did you ever figure out how to do this?
  
  jonese
  
  
  --- In flexcoders@yahoogroups.com, smelbyfastlane smelby@ wrote:
  
   Hello - 
   
   I am using an AdvancedDataGrid to display data that is retrieved
   periodically from a HTTPService.  When handling the result event I
   parse the lastResult e4x into typed objects and put them into an
   ArrayCollection which is the source for a GroupingCollection as 
 laid
   out below.  After doing all of this I call groupedData.refresh() 
 to
   get my new data displayed.  All of this works fine, except that 
 after
   calling groupedData.refresh() my group nodes (in the grid) are all
   collapsed.  I have tried saving workItemsGrid.openItems into a 
 temp
   variable, then setting it back after calling refresh... but that 
 does
   not work.  I am guessing that this is due to the fact that my data
   provider has entirely different object instances than it had
   previously.  But, I am open to the idea that I just did it 
 incorrectly
   somehow.  Based on my thought that I have different objects in 
 the DP
   than I did before I figured I could just save off the value of
   GroupLabel for each openItem, call refresh(), then iterate over 
 the
   group objects and call  workItemsGrid.expandItem() for each that 
 has a
   GroupLabel that was previously open.  The problem with this 
 approach
   is that I have not yet been able to figure out how to iterate 
 over the
   groups.
   
   Any help in getting my previously open items to re-open is greatly
   appreciated.
   
   Thanks in advance
   Scott
   
   
   
   mx:AdvancedDataGrid id=workItemsGrid width=100%
   height=100%
   mx:dataProvider
  mx:GroupingCollection id=groupedData
   source={flatWorkItemsAC}
  mx:Grouping
   ...
  /mx:Grouping  
  /mx:GroupingCollection   
  /mx:dataProvider
   ...
   /mx:AdvancedDataGrid
  
 





Re: [flexcoders] passing parameters to components

2008-04-24 Thread Kevin
I am wondering why this is weird?  Could there be a case where  
someone wanted to have a write-only property?  I agree that it is  
pretty uncommon, but I am wondering if it problematic from an  
architecture standpoint?


- Kevin

On Apr 22, 2008, at 8:37 PM, Gordon Smith wrote:


(BTW, setters without getters are weird.)




Re: [flexcoders] Timer questions

2008-04-24 Thread Kevin
along these same lines, is there a reason to use a Timer vs a  
setTimeout call for simple timeout type events?


I recall the docs seeming to hint that a Timer is better, but I find  
the setTimeout event REALLY useful.


- Kevin



On Apr 22, 2008, at 11:48 PM, Alex Harui wrote:



Flex/Flash is single-threaded which means that nothing can keep the  
next line of code from running.




You won’t get a timer event until you finish your loop, and you  
don’t need to worry about calling stop() until you no longer want  
timer events.




From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000

Sent: Tuesday, April 22, 2008 8:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Timer questions



1. If I timer.start() in a loop will the loop be waiting for  
TimerEvent

to complete before it (loop) moves to next step?
2. Do I need to timer.stop() inside of TimerEvent handler to make sure
Flex processes that handler in a whole? What I mean is if a timer
interval is very small and handler processing takes longer then timer
interval then timer might interrupt it before it is complete.

Thanks for help.








Re: [flexcoders] Re: How to detect if hardware scaling is disabled?

2008-04-24 Thread Cole Joplin
Call Stage.displayState, which returns a string: fullscreen or normal

-- Cole


- Original Message 
From: tuomas.glad [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, April 24, 2008 1:58:37 AM
Subject: [flexcoders] Re: How to detect if hardware scaling is disabled?

--- In flexcoders@yahoogroups.com, tuomas.glad [EMAIL PROTECTED] wrote:

 Hi,
 
 Is there anyway to detect is hardware scaling is enabled/disabled? I'm
 getting weird results if I disable hardware scaling from player
 preferences and try to go to fullscreen mode.
 
 Thanks,
 Tuomas


I forgot to mention that I'm using Stage.fullScreenSourceRect.




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




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


RE: [flexcoders] PopUpButton as ItemEditor for DataGrid

2008-04-24 Thread Battershall, Jeff
Never mind - variable row heights is the way to go here. 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, April 24, 2008 7:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PopUpButton as ItemEditor for DataGrid


I'm pushing the envelope in terms of how many editable fields are going
to fit within the available horizontal space. The issue is basically how
to open an itemeditor that is not constrained by the width of the
column.  

So I've been investigating having a text field popup when in editmode
that gives the user more space to edit, that will not be constrained by
the column width.  I've tried using a PopUpButton as the itemEditor and
having the text field in there, but what I'm seeing is that if you
doubleclick on the cell too quickly, an exception is thrown in
PopUpButton.as - it appears that the _popUp isn't yet defined.  If you
click more slowly, there's no issue.

I'm not that happy with the PopUpButton solution as the first thing the
user sees is the button and has to click again to open.  What I'd prefer
is simply to have the itemEditor popup on its own without further user
interaction.

Ironcially, I've got a another column working perfectly when editing a
list of items. But for some reason, my TextField editor popup is buggy
and I haven't been able to identify exactly why. 

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)



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





[flexcoders] Can debug but Can't profile

2008-04-24 Thread João Fernandes
Hi,

for a few days already I'm totally unable to profile our applications 
but can debug them. I even switched to IE to avoid the Tab problem but 
no luck.When I launch the profile session the window never come up to 
pick the values.

Is there a good guide anywhere to check what can be failing?

I'm using 9.0.124 debug version in both browsers, Already tried with 
9.0.115 and still no luck.

My co-worker with 9.0.115 doesn't seem to have any problem.
-- 

João Fernandes

http://www.onflexwithcf.org
http://www.riapt.org
Portugal Adobe User Group (http://aug.riapt.org)



[flexcoders] Re: Changing DataProvider on HorizontalList component

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Are you expecting to see the new item because the HList isn't full of
 items yet, or are you expecting it to expand to show it.  It might not
 grow to show w/o calling invalidateSize()

The HList has no explicit size, so I am expecting it to grow.  I tried 
this suggestion, and also invalidateProperties(), but the logic still 
didn't run for the newly added loop.  I can look at the dataProvider in 
the variables window for allSolutions, and it has all of the items in 
it.  It just seems something gets stuck on the original dataProvider 
and it doesn't even _try_ to add the last itemRenderer.

Thanks;

Amy



[flexcoders] AIR HTML component - html tag / text selection

2008-04-24 Thread polestar11
Hi there

I'm trying to access selected html text from an HTML component in an
AIR app. I'm able to get selected text that excludes html tags by
calling a JS function: window.getSelection(). This excludes the HTML
tags though. 

I've tried using my HTML component's textSnapshot property this has a
charCount of zero.

Does anyone have good suggestions on how to get:
a) the parent tag or id of a selected piece of text either via AIR or JS
b) how to get the raw text of a selection (that includes tags) via AIR
or JS

Thanks 
Tracy
 



[flexcoders] newbie design question

2008-04-24 Thread Eric Cooper
I have been working in Flex for about 3 months now. I am writing a geometry 
tool that allows user to create 
points, line segments, circle and polygons, as well as constraints between 
these objects (e.g., distance, angle, 
perpendicular, etc.). Initially, I created a (subclass of) 
ApplicationControlBar and (a subclass) of Canvas. Tools in 
the app control bar and objects (by which I mean geometric shapes) in the 
canvas.

My canvas listeners for Event.RENDER and then, provided it's been told that 
something has changed, calls its 
draw() method - which, essentially, loops through objects, drawing them to the 
graphics object - after having 
cleared the graphics object. Similarly, the canvas listeners for various 
MouseEvents and KeyboardEvents, and 
traverses the list of objects doing hit tests.

This was okay until I needed to render text (for distances and angles). 
Apparently there are ways around that - 
by rendering text to a bitmap and adding bitmap to graphics command stack 
(though I have yet to actually get 
this working). There are other concerns that I have about my approach thus far.

But switching over to a model where each geometric object is a Sprite or a 
Shape raises some questions, too.

Currently, I can highlight points, edges and angles of polygons are the mouse 
moves over them. I have no idea 
how I would accomplish this with Sprite or Shape, as neither appears to have a 
draw() or paint() method... Would 
I need to add Shapes for selected look for each point, line segment, etc. and 
toggle visible property 
appropriately? Is this something that skins might be used for? If so, how?

I realize that this is a somewhat open-ended question, and I am hesitant asking 
it. I have done a fair amount of 
reading (books, blogs, docs), but I think that I am missing something here. If 
you have pointers or advice, I 
would be most grateful.

Thanks.
-Eric



[flexcoders] Flex Pop Out Window

2008-04-24 Thread gjessup1
I am looking for the ability top pop a panel, which is loaded as a 
module out of the browser to a new browser windows. (much like google 
chat within gmail).

Has anyone done anything like this or seen an example of how to do it.

Any info you could provide would be Great!!!

thanks,

greg



[flexcoders] Using 100% width on canvas? getting scrollbars?

2008-04-24 Thread Jason B
I've dug and not really found what I'm looking for
I get scrollbars on canvas when I try to use a width percentage verses
doing a absolute value.

While I'm unsure because any standard HTML document can use this and
it doesnt seem to be an issue?

Am i missing anything on this im a bit baffled on this portion 



[flexcoders] Re: Adobe Air HTML component and popups

2008-04-24 Thread Srinivas Annam
Hi Pablo,

   This is most probably a bug, which should be getting fixed in the 
upcoming release of AIR.

   You can get the full blog entry for this problem at 
http://srinivasannam.wordpress.com/

   Check the below code for a simple workaround.

?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
mx:HTML id=htmlComp width=100% height=100% 
location=http://www.adobe.com; complete=addEventListenersToLinks
(event)  /

mx:Script
![CDATA[

private function addEventListenersToLinks
(e:Event):void
{
var dom:Object = 
e.currentTarget.domWindow.document;
var links:Object = 
dom.getElementsByTagName(a);

for(var i:Number = 0; i  links.length; 
i++)
{
if(links[i].target.toLowerCase
() == _blank || links[i].target.toLowerCase() == _new)
links[i].onclick = 
linkClickHandler;
}
}

private function linkClickHandler(o:Object):void
{
navigateToURL(new URLRequest
(o.currentTarget.href),blank);
}
]]
/mx:Script
/mx:WindowedApplication

Thanks and Regards
Srinivas Annam

--- In flexcoders@yahoogroups.com, Pablo Godel [EMAIL PROTECTED] wrote:

 I am trying to use the HTML component to load an external website into
 an Adobe AIR app. It works fine, but if the website has a link or
 button that opens a popup window, the window never opens.
 
 Any idea if this is supported and how to solve the problem?
 
 Thanks
 Pablo





[flexcoders] Pop Out of Browser

2008-04-24 Thread gjessup1
I have written and a chat client for internal application support. I
would like to give it the functionality to be able to pop it out of
the browser (much like google chat). Has anyone done this or seen any
example code on the net on how to do this.

Any info someone could provide would be great! 

thanks

Greg



[flexcoders] history manager and deep linking

2008-04-24 Thread mt1_18
I am a bit confused on history manager and deep linking.  If I am
using deep linking in my application I know that
historyManagementEnabled will be set to false at the application
level.  However, will I still be able to have my custom components
implement mx.managers.IHistoryManagerClient  and manually register the
component with the HistoryManager?  Will that break deep linking?



[flexcoders] How to check if components have been created yet when creation policy is auto

2008-04-24 Thread ltkavanagh
Hi,

I am trying to checking if children of a viewstack have been created 
when the viewstack's creation policy is set to auto (as per default). 
I am getting a null pointer reference when trying to access a value on 
a component nested in a viewstasck.

I would assume i need to check if the children have been made first 
and if not call myViewStack.createComponentsFromDescriptors(true);

Does anyone know the way to check this?

Many Thanks

Luke



[flexcoders] Collapsible controls

2008-04-24 Thread Richard Rodseth
It seems to me that it's pretty common to need some UI that is
modeless (i.e. not in a pop-up) but easy to get out of the way to save
real estate.

I've seen the FlexStore (haven't studied the code in a while) , the
WindowShade in flexlib, and examples of programmatically dividing a
DividedBox. I like the latter, because when the collapsible UI is
expanded, the ability to resize is still valuable. Is it possible to
skin or otherwise customize the HDividedBox so that additional buttons
could be placed with the thumb?

Any other approaches that have worked well for any of you?


[flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  I'm pretty sure you're not lazy, which is why I'm suggesting that 
 you
  continue to spend time upgrading your skills at debugging.  As 
your
  applications reach a certain level of sophistication, good 
debugging
  skills are essential.  If someone had an example, they would 
 provide it,
  but your combination of HList/HBox/Repeater probably isn't common 
 enough
  for someone to have one handy.
 
 I notice you didn't step up to not stupid LOL.  Fair enough :-).
 
  I didn't reply to your other post as it seemed like this thread 
was
  covering both issues.  Recycling of renderers has bamboozled lots 
of
  folks and is usually the cause of problems with the list 
classes.   
 The
  HList probably isn't loading its first child several times, 
 although it
  will use the first dataprovider item to do some measurements 
before 
 it
  uses the item to tell a renderer to display it.  But the loop that
  generates the renderers for display has been quite thoroughly 
used 
 and
  doesn't use the first item twice.  I assume you've proven that the
  dataProvider doesn't have the first item in there twice.
 
 I've uploaded my source code as the most efficient way to show you 
 why I think that is happening 
 (ftp://ftp.magnoliamultimedia.com/src.zip).  If you get time to 
look 
 at it you may find some other explanation of why the trace on line 
27 
 of GridColumnSolution.mxml runs _twice_ for index zero, but only 
once 
 for the other itemrenderers.
 
  Anyway, you want to know if the renderer reports the right size.  
 Try
  something like
  
   
  
  override protected function measure():void
  
  {
  
  super.measure();
  
  trace(measured, measuredWidth, measuredHeight);
  
  }
 
 This looks right.
  
  override protected function updateDisplayList(w:Number, 
 h:Number):void
  
  {
  
  trace(udl, w, h);
  
  super.updateDisplayList(w, h)
  
  }
 
 This is completely wrong (10 and 4 vs. the measured 114 and 238), 
but 
 I don't know enough about why to be able to determine what that 
means.

OK, I did some more research, and it seems that this debugging step 
revealed that my feeling about what was happening is, in fact, 
correct.  The itemRenderer knows exactly how big it is, but the 
parent container is not allocating it enough space.

The question I have been asking all along is how do I convince the 
HorizontalList to rethink how much space it is giving my 
ItemRenderer?  Can anyone out there give me any hints on how to 
convince a parent container to grow to support the new size of its 
children?

It would also be really nice to get some hints on how to get the 
HorizontalList to load its first child only once, but I can live with 
the performance hit of having it load twice if there's no way to do 
this.

Thanks;

Amy



[flexcoders] Re: passing parameters to eventlistener functions

2008-04-24 Thread netdeep
Thanks for the reply Todd.  What about processing the event though?  For 
example if I 
have:

foo.addEventListener(MouseEvent.MOUSE_DOWN, processResult);

But I want to define processResult so that I can pass it a number or an object, 
how do I 
use Custom events?  The even I'm want to listen for is the moue down event.  
When I 
define this listener, I know the value I want to associate with that event.  
Later on, I won't 
know it so that when processResult gets called, it needs that extra parameter 
to work.  I'm 
a bit confused about how to use the custom event there, since I won't be the 
one 
dispatching it.



--- In flexcoders@yahoogroups.com, twcrone70 [EMAIL PROTECTED] wrote:

 Create a custom event that has a field or fields that hold your
 parameter(s).  When you create the event for dispatching you can then
 add the parameter(s) and since that event is passed in to the handler
 method, you will have the parameter(s) in the event instance.
 
 
 package mypkg
 {
import flash.events.Event;
 
/**
 * Custom event that holds extra data.  Insipred by Cliff Hall's
 PureMVC framework
 * and usage of Notifications.
 *  
 * @author Todd Crone
 */
public class CustomEvent extends Event
{
   /**
* The data associated with the event. 
*/
   public var body:Object;
   
   /**
* Constructor.
*  
* @param type
*The event type.
* @param body
*The body for this custom event.
* @param bubbles
*Whether or not this event bubbles up the component
 hierarchy or not.
* @param cancelable
*Is this event cancelable by a listener.
*/
   public function CustomEvent( type:String, 
body:Object, 
bubbles:Boolean = false, 
cancelable:Boolean = false )
   {
  super( type, bubbles, cancelable );
  
  this.body = body;
   }
   
}
 }
 
 
 
 Hope this helps!
 
 - Todd
 
 
 --- In flexcoders@yahoogroups.com, netdeep deepnet@ wrote:
 
  
  I need to pass a parameter to a function using actionscript. 
 However by default, all you can 
  pass are events to the function called by an eventlistener.  I know
 this is easy to do in MXML, 
  but can it be done in actionscript?  The documentation has this to
 say about it:
  
  Because the second parameter of addEventListener() is a function,
 you cannot specify 
  parameters of that function in the addEventListener() call. So, to
 pass additional parameters 
  to the listener function, you must define them in the listener
 function and then call the final 
  method with those parameters.
  
  But what does it mean to call the final method with those
 parameters.  No examples are 
  given.  Could someone give me a quick example of how this is done?
 






[flexcoders] Re: Collapsible controls

2008-04-24 Thread Dominic Pazula
I don't have any ideas, but I am very interested in something like 
this.  I was contemplating something very similar earlier today.

--- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] 
wrote:

 It seems to me that it's pretty common to need some UI that is
 modeless (i.e. not in a pop-up) but easy to get out of the way to save
 real estate.
 
 I've seen the FlexStore (haven't studied the code in a while) , the
 WindowShade in flexlib, and examples of programmatically dividing a
 DividedBox. I like the latter, because when the collapsible UI is
 expanded, the ability to resize is still valuable. Is it possible to
 skin or otherwise customize the HDividedBox so that additional buttons
 could be placed with the thumb?
 
 Any other approaches that have worked well for any of you?





[flexcoders] newbie quistion

2008-04-24 Thread peterflexcoder
Hi All

I'm new here, I'm Peter from the Netherlands!

I need you help.
First i did'nt done anything yet in flex.
I know a bit actionscript 3.0

i want a little air application

with that application i can select in a combobox a link and that link open in 
the mx:html 
object. 

I have made a xml file with the name and the link. and it comes good in the 
combobox 
but i don't know how to set the selected link in a preferences file and open in 
the mx:html 
object.

the preferences file is because i want to make him smart and when its open the 
second 
time he must load the link i selected the first time.

How can i do this?
Do someone have a example or something like that?

Thanks in Advance!

Bye Peter from Amsterdam!





[flexcoders] http request dynamically generate Request params in MXML

2008-04-24 Thread Jason B
is it possible to dynamically handle http request items
meaning this example below

mx:HTTPService id=userRequest
url=http://10.108.111.6/blog/xml.php; useProxy=false method=POST
showBusyCursor=true
mx:request xmlns=
searchbox{searchbox.text}/searchbox
datestartbox{datestart.text}/datestartbox
dateendbox{dateend.text}/dateendbox
/mx:request
/mx:HTTPService   

Do i have to add one of these HTTP service tags every time i have an
object dynamically generated, like my datagrid is dynamically
generated so do i have to include a HTTP Service code for each grid
created or can i somehow do this dynamically too?

if your unclear please confirm



[flexcoders] Flex Camp Irvine - July 19th 2008

2008-04-24 Thread wenditurner
Looking at pulling together a Flex Camp Irvine, CA, US

Date:  Saturday, July 19th, 2008
Time:  10am - 5pm

Event
http://flexcampirvine.eventbrite.com/

If you are interested in helping organize Flex Camp Irvine, CA. email: 
[EMAIL PROTECTED]  

This will be a cost only day of coders sharing with coders, not for 
profit.

http://flex.org/camp/



[flexcoders] Re: How do I repaint?

2008-04-24 Thread Jason B
One work around is to just use action script to swap the image with an
image with height = 0 width=1 like a hidden gif icon used in old html
code for tables.
then reswap again with your new/same image so that you now have forced
flex to repaint it.

does that make sense?



--- In flexcoders@yahoogroups.com, Matt [EMAIL PROTECTED] wrote:

 Surely somebody can tell me how to force a repaint on a changed icon
 for a LinkButton?
 
 --- In flexcoders@yahoogroups.com, Matt matt@ wrote:
 
  I am dynamically setting the 'icon' to a LinkButton using Ben Stucki's
  IconUtility and it works great when the link first gets loaded, but if
  I want to dynamically change the icon after it is displayed it doesn't
  refresh properly.
  
  If I add a line to displayLoader that calls
  component.styleChanged('icon') that seems to help a little...when I
  move my mouse over the link the icon will change to the correct one.
  I'm still missing a step I think. What else do I need to do in order
  to get it to completely redraw the LinkButton to display the new icon?
  
  Is there some way I can replicate the mouseover validation that occurs
  (since there is obviously something in there that's doing what I
need)?
 





RE: [flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Alex Harui
HorizontalList requires that all items be the same width and height.  At
startup, it measures the first one, and uses the measurements for
columnWidth and rowHeight.

 

If you're subclassing, you can set itemsNeedMeasurement=true and call
invalidateProperties to force a re-measure and new width/height.

 

I haven't looked at your code yet.  It's a busy week for me so I'll wait
to hear if you still need me to dig through it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Thursday, April 24, 2008 9:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tiny components when using callLater()

 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
 
  I'm pretty sure you're not lazy, which is why I'm suggesting that 
 you
  continue to spend time upgrading your skills at debugging. As 
your
  applications reach a certain level of sophistication, good 
debugging
  skills are essential. If someone had an example, they would 
 provide it,
  but your combination of HList/HBox/Repeater probably isn't common 
 enough
  for someone to have one handy.
 
 I notice you didn't step up to not stupid LOL. Fair enough :-).
 
  I didn't reply to your other post as it seemed like this thread 
was
  covering both issues. Recycling of renderers has bamboozled lots 
of
  folks and is usually the cause of problems with the list 
classes. 
 The
  HList probably isn't loading its first child several times, 
 although it
  will use the first dataprovider item to do some measurements 
before 
 it
  uses the item to tell a renderer to display it. But the loop that
  generates the renderers for display has been quite thoroughly 
used 
 and
  doesn't use the first item twice. I assume you've proven that the
  dataProvider doesn't have the first item in there twice.
 
 I've uploaded my source code as the most efficient way to show you 
 why I think that is happening 
 (ftp://ftp.magnoliamultimedia.com/src.zip
ftp://ftp.magnoliamultimedia.com/src.zip ). If you get time to 
look 
 at it you may find some other explanation of why the trace on line 
27 
 of GridColumnSolution.mxml runs _twice_ for index zero, but only 
once 
 for the other itemrenderers.
 
  Anyway, you want to know if the renderer reports the right size. 
 Try
  something like
  
  
  
  override protected function measure():void
  
  {
  
  super.measure();
  
  trace(measured, measuredWidth, measuredHeight);
  
  }
 
 This looks right.
 
  override protected function updateDisplayList(w:Number, 
 h:Number):void
  
  {
  
  trace(udl, w, h);
  
  super.updateDisplayList(w, h)
  
  }
 
 This is completely wrong (10 and 4 vs. the measured 114 and 238), 
but 
 I don't know enough about why to be able to determine what that 
means.

OK, I did some more research, and it seems that this debugging step 
revealed that my feeling about what was happening is, in fact, 
correct. The itemRenderer knows exactly how big it is, but the 
parent container is not allocating it enough space.

The question I have been asking all along is how do I convince the 
HorizontalList to rethink how much space it is giving my 
ItemRenderer? Can anyone out there give me any hints on how to 
convince a parent container to grow to support the new size of its 
children?

It would also be really nice to get some hints on how to get the 
HorizontalList to load its first child only once, but I can live with 
the performance hit of having it load twice if there's no way to do 
this.

Thanks;

Amy

 



RE: [flexcoders] Using 100% width on canvas? getting scrollbars?

2008-04-24 Thread Alex Harui
Flex uses % differently than HTML.  When you use %, the children are
measured and their sizes and positions dictate a minimum size of the
container.  If the container's parent won't let it have that size, it
will show scrollbars.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason B
Sent: Thursday, April 24, 2008 7:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using 100% width on canvas? getting scrollbars?

 

I've dug and not really found what I'm looking for
I get scrollbars on canvas when I try to use a width percentage verses
doing a absolute value.

While I'm unsure because any standard HTML document can use this and
it doesnt seem to be an issue?

Am i missing anything on this im a bit baffled on this portion 

 



[flexcoders] Re: passing parameters to eventlistener functions

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, netdeep [EMAIL PROTECTED] wrote:

 Thanks for the reply Todd.  What about processing the event 
though?  For example if I 
 have:
 
 foo.addEventListener(MouseEvent.MOUSE_DOWN, processResult);
 
 But I want to define processResult so that I can pass it a number 
or an object, how do I 
 use Custom events?  The even I'm want to listen for is the moue 
down event.  When I 
 define this listener, I know the value I want to associate with 
that event.  Later on, I won't 
 know it so that when processResult gets called, it needs that extra 
parameter to work.  I'm 
 a bit confused about how to use the custom event there, since I 
won't be the one 
 dispatching it.

OK, say that whatever the mouse is down on is a child of an 
itemRenderer that is representing an XML data source, and you want to 
get the node index of the XML node that is being represented.

private function myMouseDownListener(e:event):void{
   //assume for simplicity we know what was clicked
   //is always going to be a direct child of the renderer
   var parent:* = e.target.parent;
   var d:XML = parent.data;
   var nodeNum:int = d.childIndex();
}

Depending on what you are trying to do, you can usually extrapolate 
from the target of the event to what you need to know using the 
parent or the owner chain.

However, if you really feel the need to go with custom events, this 
is a good article I have found helpful:

http://www.adobe.com/devnet/flex/articles/graduating_pt2.html

HTH;

Amy



RE: [flexcoders] How to check if components have been created yet when creation policy is auto

2008-04-24 Thread Alex Harui
Try processedDescriptors=true on the children of the viewstack

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ltkavanagh
Sent: Thursday, April 24, 2008 2:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to check if components have been created yet
when creation policy is auto

 

Hi,

I am trying to checking if children of a viewstack have been created 
when the viewstack's creation policy is set to auto (as per default). 
I am getting a null pointer reference when trying to access a value on 
a component nested in a viewstasck.

I would assume i need to check if the children have been made first 
and if not call myViewStack.createComponentsFromDescriptors(true);

Does anyone know the way to check this?

Many Thanks

Luke

 



RE: [flexcoders] history manager and deep linking

2008-04-24 Thread Alex Harui
Registering should be ok, but nothing will be saved so it is a waste of
code.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mt1_18
Sent: Thursday, April 24, 2008 8:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] history manager and deep linking

 

I am a bit confused on history manager and deep linking. If I am
using deep linking in my application I know that
historyManagementEnabled will be set to false at the application
level. However, will I still be able to have my custom components
implement mx.managers.IHistoryManagerClient and manually register the
component with the HistoryManager? Will that break deep linking?

 



[flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 HorizontalList requires that all items be the same width and 
height.  At
 startup, it measures the first one, and uses the measurements for
 columnWidth and rowHeight.

Is there a way to get it to just use the first instance it creates, 
rather than creating it, destroying it, and creating it again?  The 
double creation is very expensive, since the object is so deeply 
nested.  Obviously, if the draw of the sub-objects doesn't happen, it 
can't figure out how big it needs to be, so even if I could tell the 
difference between a measurement draw and a real draw it would do 
me no good to defer the draw until the real draw.

 If you're subclassing, you can set itemsNeedMeasurement=true and 
call
 invalidateProperties to force a re-measure and new width/height.

Would that be on the itemRenderer or the HorizontalList?

 I haven't looked at your code yet.  It's a busy week for me so I'll 
wait
 to hear if you still need me to dig through it.

Naturally, I wouldn't have spent all this time on this if I didn't 
want to do it right, so ultimately I would like to get to the bottom 
of it.  But for now it is patched to work acceptably, so if you don't 
have time, you don't have time.

Thanks;

Amy



RE: [flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Alex Harui
It would be be considerable work to get the measuring renderer to be the
first renderer, because the first renderer changes as you scroll.

 

I don't think it should be destroyed, I think you may be seeing two
renderers (the measuring, and the first visible) that use the same data
object.  Like I said, if the number of items is the same in every
renderer, I would not use repeater since you don't really want to tear
down and recreate the repeater items.

 

Set itemsNeedMeasuremet on the HList.

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Thursday, April 24, 2008 10:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tiny components when using callLater()

 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 HorizontalList requires that all items be the same width and 
height. At
 startup, it measures the first one, and uses the measurements for
 columnWidth and rowHeight.

Is there a way to get it to just use the first instance it creates, 
rather than creating it, destroying it, and creating it again? The 
double creation is very expensive, since the object is so deeply 
nested. Obviously, if the draw of the sub-objects doesn't happen, it 
can't figure out how big it needs to be, so even if I could tell the 
difference between a measurement draw and a real draw it would do 
me no good to defer the draw until the real draw.

 If you're subclassing, you can set itemsNeedMeasurement=true and 
call
 invalidateProperties to force a re-measure and new width/height.

Would that be on the itemRenderer or the HorizontalList?

 I haven't looked at your code yet. It's a busy week for me so I'll 
wait
 to hear if you still need me to dig through it.

Naturally, I wouldn't have spent all this time on this if I didn't 
want to do it right, so ultimately I would like to get to the bottom 
of it. But for now it is patched to work acceptably, so if you don't 
have time, you don't have time.

Thanks;

Amy

 



RE: [flexcoders] AIR HTML component - html tag / text selection

2008-04-24 Thread Jim Hayes
I was casting around for that some weeks ago, I think the closest I got was 
overriding the onclick function in actionscript.
Of course that gets called for *any* click, but crucially the select ones will 
be in there, and give you a reference to the element selected, from which you 
can at least get innerhtml or outerhtml properties.

That project went to the bottom of the todo list before I resolved it to my 
satisfaction, however :(

I was looking for some kind of select event, really. It may well be there and 
I just missed it.

Perhaps it's worth seeing if there is a mail list or forum for webkit / safari 
? I'd imagine the inner workings are close if not identical.

(And I've love to know the answer if you find it!)


-Original Message-
From: flexcoders@yahoogroups.com on behalf of polestar11
Sent: Thu 24/04/2008 16:09
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AIR HTML component - html tag / text selection
 
Hi there

I'm trying to access selected html text from an HTML component in an
AIR app. I'm able to get selected text that excludes html tags by
calling a JS function: window.getSelection(). This excludes the HTML
tags though. 

I've tried using my HTML component's textSnapshot property this has a
charCount of zero.

Does anyone have good suggestions on how to get:
a) the parent tag or id of a selected piece of text either via AIR or JS
b) how to get the raw text of a selection (that includes tags) via AIR
or JS

Thanks 
Tracy
 



__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__winmail.dat

Re: [flexcoders] Re: Collapsible controls

2008-04-24 Thread Richard Rodseth
This looks quite promising:

http://vanderblog.typepad.com/blog/2008/03/collapsiblebo-1.html

On Thu, Apr 24, 2008 at 9:55 AM, Dominic Pazula [EMAIL PROTECTED] wrote:






 I don't have any ideas, but I am very interested in something like
  this. I was contemplating something very similar earlier today.

  --- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED]
  wrote:


  
   It seems to me that it's pretty common to need some UI that is
   modeless (i.e. not in a pop-up) but easy to get out of the way to save
   real estate.
  
   I've seen the FlexStore (haven't studied the code in a while) , the
   WindowShade in flexlib, and examples of programmatically dividing a
   DividedBox. I like the latter, because when the collapsible UI is
   expanded, the ability to resize is still valuable. Is it possible to
   skin or otherwise customize the HDividedBox so that additional buttons
   could be placed with the thumb?
  
   Any other approaches that have worked well for any of you?
  

  


RE: [flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Tracy Spratt
Repeater has some level of recycling if you set recycleChildren=true
(default is false).  This has a noticable effect on complex repeated
items.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Thursday, April 24, 2008 1:38 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Tiny components when using callLater()

 

It would be be considerable work to get the measuring renderer to be the
first renderer, because the first renderer changes as you scroll.

 

I don't think it should be destroyed, I think you may be seeing two
renderers (the measuring, and the first visible) that use the same data
object.  Like I said, if the number of items is the same in every
renderer, I would not use repeater since you don't really want to tear
down and recreate the repeater items.

 

Set itemsNeedMeasuremet on the HList.

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Thursday, April 24, 2008 10:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tiny components when using callLater()

 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 HorizontalList requires that all items be the same width and 
height. At
 startup, it measures the first one, and uses the measurements for
 columnWidth and rowHeight.

Is there a way to get it to just use the first instance it creates, 
rather than creating it, destroying it, and creating it again? The 
double creation is very expensive, since the object is so deeply 
nested. Obviously, if the draw of the sub-objects doesn't happen, it 
can't figure out how big it needs to be, so even if I could tell the 
difference between a measurement draw and a real draw it would do 
me no good to defer the draw until the real draw.

 If you're subclassing, you can set itemsNeedMeasurement=true and 
call
 invalidateProperties to force a re-measure and new width/height.

Would that be on the itemRenderer or the HorizontalList?

 I haven't looked at your code yet. It's a busy week for me so I'll 
wait
 to hear if you still need me to dig through it.

Naturally, I wouldn't have spent all this time on this if I didn't 
want to do it right, so ultimately I would like to get to the bottom 
of it. But for now it is patched to work acceptably, so if you don't 
have time, you don't have time.

Thanks;

Amy

 



[flexcoders] Button in DatGrid problem

2008-04-24 Thread markflex2007
Hi,

I add a buttin in datagrid.But why the button always fill the all
column width. I try to set it 20 but the column width is 100.
it always like 100 in the layout. why?

Thanks


Mark


mx:DataGrid id=dg1  dataProvider ={dp}
   
mx:columns
mx:DataGridColumn  width=100 headerText= 
 mx:itemRenderer
mx:Component   
   
   mx:Buttonlabel=Select it width=20
/ 
/mx:Component
/mx:itemRenderer

 /mx:DataGridColumn 
 
 mx:DataGridColumn headerText=names dataField=names
width=200 /
 mx:DataGridColumn headerText=sex dataField=sex
width=300 /
   
/mx:columns
/mx:DataGrid



Re: [flexcoders] Re: Collapsible controls

2008-04-24 Thread Doug McCune
btw, I'm hoping to roll that component together with the existing
WindowShade one in flexlib and get the combined component in the flexlib
project. One I find a free minute...

Doug

On Thu, Apr 24, 2008 at 10:58 AM, Richard Rodseth [EMAIL PROTECTED]
wrote:

   This looks quite promising:

 http://vanderblog.typepad.com/blog/2008/03/collapsiblebo-1.html


 On Thu, Apr 24, 2008 at 9:55 AM, Dominic Pazula [EMAIL 
 PROTECTED]dompazz%40yahoo.com
 wrote:
 
 
 
 
 
 
  I don't have any ideas, but I am very interested in something like
  this. I was contemplating something very similar earlier today.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Richard Rodseth [EMAIL PROTECTED]
  wrote:
 
 
  
   It seems to me that it's pretty common to need some UI that is
   modeless (i.e. not in a pop-up) but easy to get out of the way to save
   real estate.
  
   I've seen the FlexStore (haven't studied the code in a while) , the
   WindowShade in flexlib, and examples of programmatically dividing a
   DividedBox. I like the latter, because when the collapsible UI is
   expanded, the ability to resize is still valuable. Is it possible to
   skin or otherwise customize the HDividedBox so that additional buttons
   could be placed with the thumb?
  
   Any other approaches that have worked well for any of you?
  
 
 
  



[flexcoders] Re: Google or Yahoo Maps - Custom tile/image/background

2008-04-24 Thread Gus
 Means i can be able to change the background/tile/image to Car,
Flower,Person or anything from the default map image.

If I got this right maybe this could help you...
http://modestmaps.com/tutorial-actransit/

HTH
Gus



[flexcoders] adding design view feature for third-party component

2008-04-24 Thread Shigeru Nakagaki
Hi, FlexBuilder team.

in Flex version comparison chart
www.adobe.com/products/flex/upgrade

There is Design view extensibility for third-party products.
Is there any document about this?

In SWC of ilog's elixer, there are design.xml and design.swf for 
Design View feature of FlexBuilder. How can we create these files?


thanks

Shigeru Nakagaki
blog : shigeru-nakagaki.com



[flexcoders] Changing the background color of a DataGrid row

2008-04-24 Thread jlopes151
In Flex3 I want to set the background color of a data grid row. Can I 
do it?

Thanks for the Help.



[flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 It would be be considerable work to get the measuring renderer to be 
the
 first renderer, because the first renderer changes as you scroll.

Interesting.  Where does that measuring renderer go, then?
 
 I don't think it should be destroyed, I think you may be seeing two
 renderers (the measuring, and the first visible) that use the same 
data
 object.  Like I said, if the number of items is the same in every
 renderer, I would not use repeater since you don't really want to tear
 down and recreate the repeater items.
 
  
 
 Set itemsNeedMeasuremet on the HList.

I haven't subclassed HorizontalList.  Can I do that from within my HBox 
itemRenderer?  Or can I do that from the Application container?

Thanks;

Amy



[flexcoders] Having a problem scaling printed output

2008-04-24 Thread jlopes151
I have used every property of the FlexPrintJobScaleType class. The 
page prints but doesn't scale.

To tell the truth I did get it to scale once out of the 500+ tries.

I guess I Yahoo to loud and lost track of how I did it.

Thanks for any help.



[flexcoders] Re: Programmatic scrolling of a TileList?

2008-04-24 Thread djbrown_rotonews
any help out there?

--- In flexcoders@yahoogroups.com, djbrown_rotonews 
[EMAIL PROTECTED] wrote:

 anyone? :)
 
 --- In flexcoders@yahoogroups.com, djbrown_rotonews 
 djbrown_rotonews@ wrote:
 
  
  I've got a tile list component that I want to be able to scroll 
  through horizontally without the visual presence of the scroll 
 bars 
  themselves. I've got a set of arrows that the user can click on 
to 
  scroll through the items, but it's not quite working as desired.
  
  Basically, my itemRenderers are data grids, but I don't want the 
  user to be able to view just half a grid etc.. There might be 5 
  grids under the covers, but I want only 3 full ones to be 
 displayed 
  at any given time.
  
  I'm using the button controls to increment through the 
 selectedIndex 
  of the TileList itself, and then calling the scrollToIndex() 
 method 
  using the index, but it behave as desired:
  
  Default view:
  Grids 1, 2 and 3 visible
  User click to navigate to the right, so I'd want 
  Grids 2, 3 and 4 to be visible.
  
  The problem is that it's always displaying Grids 1, 2 and 3 up 
to 
  point where the selectedIndex is now Grid 4, and all I get 
 displayed 
  in Grid 4 (I'd want Grids 2, 3, and 4)
  
  I'm hoping that made some sense. will I need to extend the 
 TileList 
  class and mess around with the visible property for each 
renderer 
 as 
  well?
 





[flexcoders] Re: Changing the background color of a DataGrid row

2008-04-24 Thread valdhor
Yes. Check out itemRenderers. The best article on this is at
http://blogs.adobe.com/aharui/item_renderers/

--- In flexcoders@yahoogroups.com, jlopes151 [EMAIL PROTECTED] wrote:

 In Flex3 I want to set the background color of a data grid row. Can I 
 do it?
 
 Thanks for the Help.





[flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Repeater has some level of recycling if you set recycleChildren=true
 (default is false).  This has a noticable effect on complex repeated
 items.

You're completely right that it would have been less time-consuming to 
just switch to a Repeater and rewrite my itemRenderer to work from a 
repeater as soon as the problem appeared, but this is how you learn 
things :-).

Thanks;

Amy



[flexcoders] Re: Programmatic scrolling of a TileList?

2008-04-24 Thread valdhor
I have no idea but maybe the carousel at
http://giles.roadnight.name/components.cfm might give you some ideas.


--- In flexcoders@yahoogroups.com, djbrown_rotonews
[EMAIL PROTECTED] wrote:

 any help out there?
 
 --- In flexcoders@yahoogroups.com, djbrown_rotonews 
 djbrown_rotonews@ wrote:
 
  anyone? :)
  
  --- In flexcoders@yahoogroups.com, djbrown_rotonews 
  djbrown_rotonews@ wrote:
  
   
   I've got a tile list component that I want to be able to scroll 
   through horizontally without the visual presence of the scroll 
  bars 
   themselves. I've got a set of arrows that the user can click on 
 to 
   scroll through the items, but it's not quite working as desired.
   
   Basically, my itemRenderers are data grids, but I don't want the 
   user to be able to view just half a grid etc.. There might be 5 
   grids under the covers, but I want only 3 full ones to be 
  displayed 
   at any given time.
   
   I'm using the button controls to increment through the 
  selectedIndex 
   of the TileList itself, and then calling the scrollToIndex() 
  method 
   using the index, but it behave as desired:
   
   Default view:
   Grids 1, 2 and 3 visible
   User click to navigate to the right, so I'd want 
   Grids 2, 3 and 4 to be visible.
   
   The problem is that it's always displaying Grids 1, 2 and 3 up 
 to 
   point where the selectedIndex is now Grid 4, and all I get 
  displayed 
   in Grid 4 (I'd want Grids 2, 3, and 4)
   
   I'm hoping that made some sense. will I need to extend the 
  TileList 
   class and mess around with the visible property for each 
 renderer 
  as 
   well?
  
 





[flexcoders] Re: Changing the background color of a DataGrid row

2008-04-24 Thread jlopes151
--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 Yes. Check out itemRenderers. The best article on this is at
 http://blogs.adobe.com/aharui/item_renderers/
 
 --- In flexcoders@yahoogroups.com, jlopes151 jlopes151@ wrote:
 
  In Flex3 I want to set the background color of a data grid row. 
Can I 
  do it?
  
  Thanks for the Help.
 


Forgot mention that I only want to change the color of the first 
row, default the others. I'm worried if I setup a counter or 
firstrow var it will get reset when the next row is created. I'll 
take a look at the blog.

Thanks 



RE: [flexcoders] Button in DatGrid problem

2008-04-24 Thread Alex Harui
A renderer is always as wide as its column.  You can wrap it in another
layer if you want to center it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markflex2007
Sent: Thursday, April 24, 2008 11:05 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Button in DatGrid problem

 

Hi,

I add a buttin in datagrid.But why the button always fill the all
column width. I try to set it 20 but the column width is 100.
it always like 100 in the layout. why?

Thanks

Mark

mx:DataGrid id=dg1 dataProvider ={dp}

mx:columns
mx:DataGridColumn width=100 headerText= 
mx:itemRenderer
mx:Component 

mx:Button label=Select it width=20
/ 
/mx:Component
/mx:itemRenderer

/mx:DataGridColumn 

mx:DataGridColumn headerText=names dataField=names
width=200 /
mx:DataGridColumn headerText=sex dataField=sex
width=300 /

/mx:columns
/mx:DataGrid

 



RE: [flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Alex Harui
The measuring renderer is invisible, but on the display list and is held
onto in case of the need for future measuring.

 

itemsNeedMeasurement is protected so you can't access it from the
outside.  You might be able to trick it to being set to true by setting
a style like fontSize

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Thursday, April 24, 2008 11:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tiny components when using callLater()

 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 It would be be considerable work to get the measuring renderer to be 
the
 first renderer, because the first renderer changes as you scroll.

Interesting. Where does that measuring renderer go, then?

 I don't think it should be destroyed, I think you may be seeing two
 renderers (the measuring, and the first visible) that use the same 
data
 object. Like I said, if the number of items is the same in every
 renderer, I would not use repeater since you don't really want to tear
 down and recreate the repeater items.
 
 
 
 Set itemsNeedMeasuremet on the HList.

I haven't subclassed HorizontalList. Can I do that from within my HBox 
itemRenderer? Or can I do that from the Application container?

Thanks;

Amy

 



RE: [flexcoders] Re: Programmatic scrolling of a TileList?

2008-04-24 Thread Alex Harui
Setting horizontalScrollPosition might be better.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Thursday, April 24, 2008 11:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Programmatic scrolling of a TileList?

 

I have no idea but maybe the carousel at
http://giles.roadnight.name/components.cfm
http://giles.roadnight.name/components.cfm  might give you some ideas.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, djbrown_rotonews
[EMAIL PROTECTED] wrote:

 any help out there?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , djbrown_rotonews 
 djbrown_rotonews@ wrote:
 
  anyone? :)
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , djbrown_rotonews 
  djbrown_rotonews@ wrote:
  
   
   I've got a tile list component that I want to be able to scroll 
   through horizontally without the visual presence of the scroll 
  bars 
   themselves. I've got a set of arrows that the user can click on 
 to 
   scroll through the items, but it's not quite working as desired.
   
   Basically, my itemRenderers are data grids, but I don't want the 
   user to be able to view just half a grid etc.. There might be 5 
   grids under the covers, but I want only 3 full ones to be 
  displayed 
   at any given time.
   
   I'm using the button controls to increment through the 
  selectedIndex 
   of the TileList itself, and then calling the scrollToIndex() 
  method 
   using the index, but it behave as desired:
   
   Default view:
   Grids 1, 2 and 3 visible
   User click to navigate to the right, so I'd want 
   Grids 2, 3 and 4 to be visible.
   
   The problem is that it's always displaying Grids 1, 2 and 3 up 
 to 
   point where the selectedIndex is now Grid 4, and all I get 
  displayed 
   in Grid 4 (I'd want Grids 2, 3, and 4)
   
   I'm hoping that made some sense. will I need to extend the 
  TileList 
   class and mess around with the visible property for each 
 renderer 
  as 
   well?
  
 


 



[flexcoders] Re: Possible bug with Shape (or DisplayObject) when increasing the width (or scaleX)

2008-04-24 Thread alex
Just to make it short. 
Why when I change the width of a DisplayObject ( Shape) it changes its
X coordinate ? I understand that Flex will behind the scenes change
the scaleX of an object if width is changed and in certain cases
scaleX changes X coordinates but I though that only if you directly
change scaleX it will change X coordinate ?


--- In flexcoders@yahoogroups.com, alex [EMAIL PROTECTED] wrote:

 Hi
 
 I have a  custom class that extends Shape object on the
CartesianChart with DateTimeAxis .
 When I increase the width of the object, after certain point it will
change its x value by around 
 10 .
 For example object with width=1 start at x=500 i can increase it for
example until 
 width=420 but then at width=421 it will add 10 to x and on the
screen it looks like it a bit 
 off the tick mark . The same effect happen when I change scaleX so
at scaleX=840 it will 
 jump !
 Notice that it happens at width=421 or scaleX=840 factor of two
corellation.
 I get it programmatically in my software and also I can recreate it
with FlexSpy
 so it is no a bug in my code because FlexSpy will just change the
properties of the object and 
 not touch the code.
 This part of  code is loosely based on the Custom Flex Charts  by
Ely Greenfield

http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-examples-on-
 making-custom-flex-charts-simpler/ 
 (the custom content on the chart in basic drawing API )
 
 Thanks





[flexcoders] Newbie question: Removing text from textarea/disabling a character

2008-04-24 Thread khan.ibraheem
Hello,

I am using a textarea. I want to achieve 2 tasks:

1) Disable a particular character i.e. let suppose I dont want to
allow a certain character being shown(when it is typed) in the text area.

2) How can I remove some portion of the text from the textarea. I have
tried slice method but it hasnt worked.

Looking for help.

Thanks.



Re: [flexcoders] Button in DatGrid problem

2008-04-24 Thread Mark Shen
Please give me a simple demo, what another layer means?

Thanks

Mark

- Original Message 
From: Alex Harui [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, April 24, 2008 3:04:24 PM
Subject: RE: [flexcoders] Button in DatGrid problem








A renderer is always as wide as its
column.  You can wrap it in another layer if you want to center it.
   
 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of markflex2007
Sent: Thursday, April 24, 200811:05 AM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Button inDatGrid problem
 
  
 Hi,

I add a buttin in datagrid.But why the button always fill the all
column width. I try to set it 20 but the column width is 100.
it always like 100 in the layout. why?

Thanks

Mark

mx:DataGrid id=dg1 dataProvider ={dp}

mx:columns
mx:DataGridColumn width=100 headerText=  
mx:itemRenderer
mx:Component 

mx:Button label=Select it width=20
/ 
/mx:Component
/mx:itemRenderer

/mx:DataGridColumn  

mx:DataGridColumn headerText= namesdataField=names
width=200 /
mx:DataGridColumn headerText= sex dataField=sex
width=300 /

/mx:columns
/mx:DataGrid
 






!--

#ygrp-mkp{
border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;}
#ygrp-mkp hr{
border:1px solid #d8d8d8;}
#ygrp-mkp #hd{
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;}
#ygrp-mkp #ads{
margin-bottom:10px;}
#ygrp-mkp .ad{
padding:0 0;}
#ygrp-mkp .ad a{
color:#ff;text-decoration:none;}
--

!--

#ygrp-sponsor #ygrp-lc{
font-family:Arial;}
#ygrp-sponsor #ygrp-lc #hd{
margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
#ygrp-sponsor #ygrp-lc .ad{
margin-bottom:10px;padding:0 0;}
--

!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
..bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-reco {
margin-bottom:20px;padding:0px;}
#ygrp-reco #reco-head {
font-weight:bold;color:#ff7900;}

#reco-grpname{
font-weight:bold;margin-top:10px;}
#reco-category{
font-size:77%;}
#reco-desc{
font-size:77%;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a{
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc{
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o{font-size:0;}
..MsoNormal{
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
..replbq{margin:4;}
--






  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

[flexcoders] Copying an Object

2008-04-24 Thread Lisa Lee
I'm sort of a newbie to Flex/ActionScript...can someone tell me the 
best way to copy an object to a new variable?  For example, I have a 
variable named obj1, datatyped as Object.  Let's say that I've set 
obj1.property1 = foo and obj1.property2 = bar.  Now I declare a 
variable named obj2, datatyped as Object.  I tried:  obj2 = obj1, but 
when I evaluate the variables at run time, obj2 evaluates to null.  Do 
I have to explicitly copy each property from obj1 to obj2, or is there 
a better/easier way to do this?  Hope that made sense.



[flexcoders] Strategies for Long Text and Images

2008-04-24 Thread Ethan Miller
Greetings -

I've been building a site that has long pages of text with lots of 
illustrative images. Dealing with text and images in an editorial 
layout fashion has been surprisingly cumbersome in Flex 
(especially given how easy it is to build elegant, stateful apps, 
and hence I'm wondering if I'm missing something. Thought 
I'd run my approach by folks her for a quick sanity check.

Here's what I need to achieve:

  - Pages with 12 - 20 long paragraphs of text

  - Most paragraphss preceded by a subhead of different 
  font  face/size color

  - Lots of interspersed images aligned left, center, and right
  with wrapping text (for left/right)

  - Inline text links

  - Embedded fonts

  - Flexible (stretchy) design

For reference see the site in progress at:  http://djethan.com/westwind/ .  
Click on 
Martial Arts then on History. Dismiss a coverflow error if you see it.

My plan had been to achieve this by having all the content be in 
TextAreas (set to editable and selectable = false) and then handling
the subheads, images, and links using htmlText and the supported 
html tags. Two things made this impractical:

  1. No way to center an image in htmlText!  The IMG tag does not 
support center as a value of the align property; wrapping an IMG 
in a P with ALIGN=center also fails as does setting the horizontalAlign 
of the TextArea (with all other text wrapped in P with align=left).

2. The supported html tags to not take a class attribute, nor do they 
respond to element selectors ie you can't use CSS to style them =(

These things being deal breakers I've fallen back on this approach:

VBox

  Label styleName=subhead/

  Text styleName=body
   htmlText

blah, blah, blah

IMG align=right

   blah, blah, blah

  IMG align=left 

   /htmlText  
  /Text

  Label styleName=subhead/

  Text styleName=body
   htmlText

blah, blah, blah

   /htmlText  
  /Text

  Canvas
   IMAGE horizontalCenter=0/
  /CANVAS


  Label styleName=subhead/

  Text styleName=body
   htmlText

blah, blah, blah

   /htmlText  
  /Text

/VBox

It's working but, seems heavy handed and slw - page loads 
have a noticeable lag.

Am I missing anything, better ways to do this?

thanks, ethan





[flexcoders] Style for Alert box?

2008-04-24 Thread markflex2007
Hi,

I have a class like ( .box1{...} ) in css file. I need the Alert use
the class box1.How to set the style name to Alert box.

Thanks

Mark



[flexcoders] Re: Using 100% width on canvas? getting scrollbars?

2008-04-24 Thread Jason B
but if the entire application including all componets are in % for
everything why would it still show scrollbars?




--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Flex uses % differently than HTML.  When you use %, the children are
 measured and their sizes and positions dictate a minimum size of the
 container.  If the container's parent won't let it have that size, it
 will show scrollbars.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Jason B
 Sent: Thursday, April 24, 2008 7:57 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Using 100% width on canvas? getting scrollbars?
 
  
 
 I've dug and not really found what I'm looking for
 I get scrollbars on canvas when I try to use a width percentage verses
 doing a absolute value.
 
 While I'm unsure because any standard HTML document can use this and
 it doesnt seem to be an issue?
 
 Am i missing anything on this im a bit baffled on this portion





Re: [flexcoders] Style for Alert box?

2008-04-24 Thread Derrick Anderson
you can apply the style to all alerts:

mx:Style
Alert
{
...
}
/mx:Style

or to a single alert:

mx:Style
.box1
{
...
}
/mx:Style

var alert:Alert;
alert=Alert.show(asdf);
alert.styleName=box1;

Derrick Anderson



On Thu, Apr 24, 2008 at 3:29 PM, markflex2007 [EMAIL PROTECTED]
wrote:

   Hi,

 I have a class like ( .box1{...} ) in css file. I need the Alert use
 the class box1.How to set the style name to Alert box.

 Thanks

 Mark

  



RE: [flexcoders] Button in DatGrid problem

2008-04-24 Thread Tracy Spratt
The simplest solution is to use an HBox, with horizontalAlign=center,
then put the button inside that.

 

But using containers in renderers can cause performance problems if you
have many renderers.  See Alex's blog for examples on how to write
lightweight renders.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Shen
Sent: Thursday, April 24, 2008 3:25 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Button in DatGrid problem

 

Please give me a simple demo, what another layer means?

Thanks

Mark

- Original Message 
From: Alex Harui [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, April 24, 2008 3:04:24 PM
Subject: RE: [flexcoders] Button in DatGrid problem

A renderer is always as wide as its column.  You can wrap it in another
layer if you want to center it.

 



From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com]
On Behalf Of markflex2007
Sent: Thursday, April 24, 2008 11:05 AM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Button in DatGrid problem

 

Hi,

I add a buttin in datagrid.But why the button always fill the all
column width. I try to set it 20 but the column width is 100.
it always like 100 in the layout. why?

Thanks

Mark

mx:DataGrid id=dg1 dataProvider ={dp}

mx:columns
mx:DataGridColumn width=100 headerText=  
mx:itemRenderer
mx:Component 

mx:Button label=Select it width=20
/ 
/mx:Component
/mx:itemRenderer

/mx:DataGridColumn  

mx:DataGridColumn headerText= names dataField=names
width=200 /
mx:DataGridColumn headerText= sex dataField=sex
width=300 /

/mx:columns
/mx:DataGrid

 

 



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
it now.
http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62
sR8HDtDypao8Wcj9tAcJ%20 

 



[flexcoders] Re: Newbie question: Removing text from textarea/disabling a character

2008-04-24 Thread valdhor
For 1 you would probably have to add an event listener for keydown,
see what key it was and then stop that keycode from reaching the textarea.

For 2, check out the following I found in the Help:

?xml version=1.0?
!-- textcontrols/TextRangeExample.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  mx:Script![CDATA[
 import mx.controls.textClasses.TextRange

 private function resetText():void
 {
textArea1.text = This is a test of the emergency broadcast
system. It is only a test.;
 }

 public function alterText():void
 {
// Create a TextRange object starting with the and ending at
the 
// first period. Replace it with new formatted HTML text.
var textRange1:TextRange = new TextRange(
textArea1, false, textArea1.text.indexOf(the, 0),
textArea1.text.indexOf(., 0)
);
textRange1.htmlText=iitalic HTML text/i

// Create a TextRange object with the remaining text.
// Select the text and change its formatting.
var textRange2:TextRange = new TextRange(
textArea1, true, textArea1.text.indexOf(It, 0),
textArea1.text.length-1
);
textRange2.color=0xFF00FF;
textRange2.fontSize=18;
textRange2.fontStyle = italic; // any other value turns
italic off
textRange2.fontWeight = bold; // any other value turns bold off
textArea1.setSelection(0, 0);
 }
  ]]/mx:Script

  mx:TextArea id=textArea1 fontSize=12 fontWeight=bold
width=100% height=100
 mx:text
This is a test of the emergency broadcast system. It is only a
test.
 /mx:text
  /mx:TextArea
  mx:HBox
mx:Button label=Alter Text click=alterText();/
mx:Button label=Reset click=resetText();/
  /mx:HBox
/mx:Application


--- In flexcoders@yahoogroups.com, khan.ibraheem [EMAIL PROTECTED]
wrote:

 Hello,
 
 I am using a textarea. I want to achieve 2 tasks:
 
 1) Disable a particular character i.e. let suppose I dont want to
 allow a certain character being shown(when it is typed) in the text
area.
 
 2) How can I remove some portion of the text from the textarea. I have
 tried slice method but it hasnt worked.
 
 Looking for help.
 
 Thanks.





[flexcoders] Arc, Bulge, Valley Pennant Text Warping Effects

2008-04-24 Thread shawn.makinson
I'm looking for someone with experience with applying these types of text 
effects to dynamic 
TextFields in Flash, but ultimately to be used in Flex. I'm assuming it would 
be done with 
Displacement maps, but am open to other methods. Please contact me if you are 
interested 
at shawn[at]squarefactor.com. Thanks.



[flexcoders] DateField: showing many days...

2008-04-24 Thread grimmwerks
Hey all

I've got an application I'm building that people are saving data to a  
db. I'd like to show what days there's data available -- ie 4/3 , 4/6,  
4/10, etc.

Is the DateField the correct componenet to use? I see how to set  
ranges but not specific dates...


[flexcoders] Re: Tiny components when using callLater()

2008-04-24 Thread Amy
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 The measuring renderer is invisible, but on the display list and is 
held
 onto in case of the need for future measuring.
 
  
 
 itemsNeedMeasurement is protected so you can't access it from the
 outside.  You might be able to trick it to being set to true by 
setting
 a style like fontSize

OK, thanks.  I'll try that :-).

-Amy



[flexcoders] Re: Programmatic scrolling of a TileList?

2008-04-24 Thread jmfillman
It sounds like you are on the right path, however, initially the 
scrollToIndex() is 1, correct?

Each button click should increment the scrollToIndex() by 1 (or -1 if 
moving left on the list), so instead of scrollToIndex() being 4 after 
the click, it should be 2. Next click, 3, etc

Just be careful to account for the total number in the index so you 
don't get an error by trying to go to index position of negative 1 
or, in this example, 5.

--- In flexcoders@yahoogroups.com, djbrown_rotonews 
[EMAIL PROTECTED] wrote:

 any help out there?
 
 --- In flexcoders@yahoogroups.com, djbrown_rotonews 
 djbrown_rotonews@ wrote:
 
  anyone? :)
  
  --- In flexcoders@yahoogroups.com, djbrown_rotonews 
  djbrown_rotonews@ wrote:
  
   
   I've got a tile list component that I want to be able to scroll 
   through horizontally without the visual presence of the scroll 
  bars 
   themselves. I've got a set of arrows that the user can click on 
 to 
   scroll through the items, but it's not quite working as desired.
   
   Basically, my itemRenderers are data grids, but I don't want 
the 
   user to be able to view just half a grid etc.. There might be 5 
   grids under the covers, but I want only 3 full ones to be 
  displayed 
   at any given time.
   
   I'm using the button controls to increment through the 
  selectedIndex 
   of the TileList itself, and then calling the scrollToIndex() 
  method 
   using the index, but it behave as desired:
   
   Default view:
   Grids 1, 2 and 3 visible
   User click to navigate to the right, so I'd want 
   Grids 2, 3 and 4 to be visible.
   
   The problem is that it's always displaying Grids 1, 2 and 3 up 
 to 
   point where the selectedIndex is now Grid 4, and all I get 
  displayed 
   in Grid 4 (I'd want Grids 2, 3, and 4)
   
   I'm hoping that made some sense. will I need to extend the 
  TileList 
   class and mess around with the visible property for each 
 renderer 
  as 
   well?
  
 





[flexcoders] Re: Programmatic scrolling of a TileList?

2008-04-24 Thread djbrown_rotonews
that's getting me tons closer to where I want to be, Alex. Thanks!

and that carousel component looks pretty cool too.

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Setting horizontalScrollPosition might be better.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of valdhor
 Sent: Thursday, April 24, 2008 11:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Programmatic scrolling of a TileList?
 
  
 
 I have no idea but maybe the carousel at
 http://giles.roadnight.name/components.cfm
 http://giles.roadnight.name/components.cfm  might give you some 
ideas.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , djbrown_rotonews
 djbrown_rotonews@ wrote:
 
  any help out there?
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , djbrown_rotonews 
  djbrown_rotonews@ wrote:
  
   anyone? :)
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , djbrown_rotonews 
   djbrown_rotonews@ wrote:
   

I've got a tile list component that I want to be able to 
scroll 
through horizontally without the visual presence of the 
scroll 
   bars 
themselves. I've got a set of arrows that the user can click 
on 
  to 
scroll through the items, but it's not quite working as 
desired.

Basically, my itemRenderers are data grids, but I don't want 
the 
user to be able to view just half a grid etc.. There might 
be 5 
grids under the covers, but I want only 3 full ones to be 
   displayed 
at any given time.

I'm using the button controls to increment through the 
   selectedIndex 
of the TileList itself, and then calling the scrollToIndex() 
   method 
using the index, but it behave as desired:

Default view:
Grids 1, 2 and 3 visible
User click to navigate to the right, so I'd want 
Grids 2, 3 and 4 to be visible.

The problem is that it's always displaying Grids 1, 2 and 3 
up 
  to 
point where the selectedIndex is now Grid 4, and all I get 
   displayed 
in Grid 4 (I'd want Grids 2, 3, and 4)

I'm hoping that made some sense. will I need to extend the 
   TileList 
class and mess around with the visible property for each 
  renderer 
   as 
well?
   
  
 





[flexcoders] describeType() question

2008-04-24 Thread Eric Cancil
I want to use describeType to lookup properties added at runtime - But it
doesnt seem to see them even tho though propertyIsEnumerable returns true
and I can see them defined in the debugger  I've never really used
describeType to look up dynamically added properties like this...am I
missing something?

Thanks,
Eric


[flexcoders] Grayscale Mask

2008-04-24 Thread Michael Wagner
Hi:
I would like to make a mask / effect  in Flex
to get from a.bmp using b.bmp as a mask to get c.bmp
using bitmap operations probably.

Do you know how it can be done?

Thanks,
Michael.
attachment: a.bmpattachment: b.bmpattachment: c.bmp

Re: [flexcoders] Copying an Object

2008-04-24 Thread Peter Connolly
Take a look at the copy() method in ObjectUtil:

http://livedocs.adobe.com/flex/2/langref/mx/utils/ObjectUtil.html#copy()


[flexcoders] Re: Newbie question: Removing text from textarea/disabling a character

2008-04-24 Thread wesley.petrowski
For #1, you can use the restrict property of TextArea.  It should do 
exactly what you need.

http://livedocs.adobe.com/flex/3/langref/mx/controls/TextArea.html#res
trict

--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 For 1 you would probably have to add an event listener for keydown,
 see what key it was and then stop that keycode from reaching the 
textarea.
 
 For 2, check out the following I found in the Help:
 
 ?xml version=1.0?
 !-- textcontrols/TextRangeExample.mxml --
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:Script![CDATA[
  import mx.controls.textClasses.TextRange
 
  private function resetText():void
  {
 textArea1.text = This is a test of the emergency broadcast
 system. It is only a test.;
  }
 
  public function alterText():void
  {
 // Create a TextRange object starting with the and ending 
at
 the 
 // first period. Replace it with new formatted HTML text.
 var textRange1:TextRange = new TextRange(
 textArea1, false, textArea1.text.indexOf(the, 0),
 textArea1.text.indexOf(., 0)
 );
 textRange1.htmlText=iitalic HTML text/i
 
 // Create a TextRange object with the remaining text.
 // Select the text and change its formatting.
 var textRange2:TextRange = new TextRange(
 textArea1, true, textArea1.text.indexOf(It, 0),
 textArea1.text.length-1
 );
 textRange2.color=0xFF00FF;
 textRange2.fontSize=18;
 textRange2.fontStyle = italic; // any other value turns
 italic off
 textRange2.fontWeight = bold; // any other value turns 
bold off
 textArea1.setSelection(0, 0);
  }
   ]]/mx:Script
 
   mx:TextArea id=textArea1 fontSize=12 fontWeight=bold
 width=100% height=100
  mx:text
 This is a test of the emergency broadcast system. It is 
only a
 test.
  /mx:text
   /mx:TextArea
   mx:HBox
 mx:Button label=Alter Text click=alterText();/
 mx:Button label=Reset click=resetText();/
   /mx:HBox
 /mx:Application
 
 
 --- In flexcoders@yahoogroups.com, khan.ibraheem khan.ibraheem@
 wrote:
 
  Hello,
  
  I am using a textarea. I want to achieve 2 tasks:
  
  1) Disable a particular character i.e. let suppose I dont want to
  allow a certain character being shown(when it is typed) in the 
text
 area.
  
  2) How can I remove some portion of the text from the textarea. I 
have
  tried slice method but it hasnt worked.
  
  Looking for help.
  
  Thanks.
 





[flexcoders] Re: Copying an Object

2008-04-24 Thread Lisa Lee
Awesome!  That seems to be exactly what I was looking for.  Thanks 
Peter - you rock!  :-)

--- In flexcoders@yahoogroups.com, Peter Connolly [EMAIL PROTECTED] 
wrote:

 Take a look at the copy() method in ObjectUtil:
 
 http://livedocs.adobe.com/flex/2/langref/mx/utils/ObjectUtil.html#copy
()





[flexcoders] How to get image width/height ???

2008-04-24 Thread Jason The Saj
Approximate example

[Embed(source=images/myphoto.png)]
[Bindable]
public var MyPhoto:Class;

var myImage:Image = new Image();
myImage.source = MyPhoto;
trace(myImage.width);

For whatever reason, I just get 0. I've tried contentWidth,
maxWidth, explicitWidth.

I've tried callLater and then attempted to get the width.

Any advice or guidance would be greatly appreciated!

- Jason




Re: [flexcoders] How to get image width/height ???

2008-04-24 Thread Eric Cancil
image.addEventListener(Event.COMPLETE, onLoad);

private function onLoad(e:Event):void{
trace(image.contentHeight);
}

On Thu, Apr 24, 2008 at 5:32 PM, Jason The Saj [EMAIL PROTECTED]
wrote:

   Approximate example

 [Embed(source=images/myphoto.png)]
 [Bindable]
 public var MyPhoto:Class;

 var myImage:Image = new Image();
 myImage.source = MyPhoto;
 trace(myImage.width);

 For whatever reason, I just get 0. I've tried contentWidth,
 maxWidth, explicitWidth.

 I've tried callLater and then attempted to get the width.

 Any advice or guidance would be greatly appreciated!

 - Jason

  



RE: [flexcoders] describeType() question

2008-04-24 Thread Tracy Spratt
Perhaps describeType is only for implemented properties?  You can use
for..in loops on dynamically added properties.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Eric Cancil
Sent: Thursday, April 24, 2008 4:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] describeType() question

 

I want to use describeType to lookup properties added at runtime - But
it doesnt seem to see them even tho though propertyIsEnumerable returns
true and I can see them defined in the debugger  I've never really
used describeType to look up dynamically added properties like this...am
I missing something?

Thanks,
Eric

 



[flexcoders] more richtext editor -- resize the toolbar...

2008-04-24 Thread grimmwerks
So I'm removing buttons from the toolbar in the RTE - is there ways of  
resizing the container so that it's not a big gaping height? 


RE: [flexcoders] more richtext editor -- resize the toolbar...

2008-04-24 Thread Alex Harui
The source is an MXML file.  For the third time, I will suggest you copy
and modify it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of grimmwerks
Sent: Thursday, April 24, 2008 3:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] more richtext editor -- resize the toolbar...

 

So I'm removing buttons from the toolbar in the RTE - is there ways of 
resizing the container so that it's not a big gaping height? 

 



RE: [flexcoders] describeType() question

2008-04-24 Thread Alex Harui
That's correct, describeType is only for non-dynamic properties.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Thursday, April 24, 2008 2:56 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] describeType() question

 

Perhaps describeType is only for implemented properties?  You can use
for..in loops on dynamically added properties.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Eric Cancil
Sent: Thursday, April 24, 2008 4:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] describeType() question

 

I want to use describeType to lookup properties added at runtime - But
it doesnt seem to see them even tho though propertyIsEnumerable returns
true and I can see them defined in the debugger  I've never really
used describeType to look up dynamically added properties like this...am
I missing something?

Thanks,
Eric

 



RE: [flexcoders] Re: Possible bug with Shape (or DisplayObject) when increasing the width (or scaleX)

2008-04-24 Thread Alex Harui
Width is tied to scaleX on flash.*.* objects.  UIComponent breaks that
dependency somewhat.

 

Why it moves x depends on how the other code works.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of alex
Sent: Thursday, April 24, 2008 12:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Possible bug with Shape (or DisplayObject)
when increasing the width (or scaleX)

 

Just to make it short. 
Why when I change the width of a DisplayObject ( Shape) it changes its
X coordinate ? I understand that Flex will behind the scenes change
the scaleX of an object if width is changed and in certain cases
scaleX changes X coordinates but I though that only if you directly
change scaleX it will change X coordinate ?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, alex [EMAIL PROTECTED] wrote:

 Hi
 
 I have a custom class that extends Shape object on the
CartesianChart with DateTimeAxis .
 When I increase the width of the object, after certain point it will
change its x value by around 
 10 .
 For example object with width=1 start at x=500 i can increase it for
example until 
 width=420 but then at width=421 it will add 10 to x and on the
screen it looks like it a bit 
 off the tick mark . The same effect happen when I change scaleX so
at scaleX=840 it will 
 jump !
 Notice that it happens at width=421 or scaleX=840 factor of two
corellation.
 I get it programmatically in my software and also I can recreate it
with FlexSpy
 so it is no a bug in my code because FlexSpy will just change the
properties of the object and 
 not touch the code.
 This part of code is loosely based on the Custom Flex Charts  by
Ely Greenfield

http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-example
s-on-
http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-exampl
es-on- 
 making-custom-flex-charts-simpler/ 
 (the custom content on the chart in basic drawing API )
 
 Thanks


 



RE: [flexcoders] Button in DatGrid problem

2008-04-24 Thread Alex Harui
A centered renderer example can be found here:
http://blogs.adobe.com/aharui/2007/04/more_thinking_about_item_rende.htm
l

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Shen
Sent: Thursday, April 24, 2008 12:25 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Button in DatGrid problem

 

Please give me a simple demo, what another layer means?

Thanks

Mark

- Original Message 
From: Alex Harui [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, April 24, 2008 3:04:24 PM
Subject: RE: [flexcoders] Button in DatGrid problem

A renderer is always as wide as its column.  You can wrap it in another
layer if you want to center it.

 



From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com]
On Behalf Of markflex2007
Sent: Thursday, April 24, 2008 11:05 AM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Button in DatGrid problem

 

Hi,

I add a buttin in datagrid.But why the button always fill the all
column width. I try to set it 20 but the column width is 100.
it always like 100 in the layout. why?

Thanks

Mark

mx:DataGrid id=dg1 dataProvider ={dp}

mx:columns
mx:DataGridColumn width=100 headerText=  
mx:itemRenderer
mx:Component 

mx:Button label=Select it width=20
/ 
/mx:Component
/mx:itemRenderer

/mx:DataGridColumn  

mx:DataGridColumn headerText= names dataField=names
width=200 /
mx:DataGridColumn headerText= sex dataField=sex
width=300 /

/mx:columns
/mx:DataGrid

 

 



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
it now.
http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62
sR8HDtDypao8Wcj9tAcJ%20 

 



Re: [flexcoders] Re: Copying an Object

2008-04-24 Thread Peter Connolly
As an additional note, when using ObjectUtil.copy() with your own
user-defined classes (i.e., not Object, ObjectProxy,...), you may have
to use [RemoteClass] metadata or the registerClassAlias() method.

The problem is that ...when an object is deserialized from AMF, it
does not automatically get created as a class instance. The object
might have all of the properties of a class instance, but it will not
be a true class instance unless the AMF packet includes type
information about the object.  The type information gets added to AMF
in one of two ways:
- Using the {RemoteClass] metadata tag.
- Using the registerClassAlias() method.
...

I found this out the hard way.

pc


[flexcoders] Relating series and axes

2008-04-24 Thread Richard Rodseth
I'm a little unclear how one associates multiple series to the same
axis, when there are multiple axes present.

With secondVerticalAxis (or whatever it was called) deprecated, it
appears that the axis definitions must go inside a series definition.
But now I want yet another series to refer to the same axis. Do I just
put the axis under an arbitrary series, and then refer to it by id in
the other series, or do I define an axis for each series, but only
reference a subset of them in the mx:verticalAxisRenderers tag?

Thanks!


RE: [flexcoders] How to check if components have been created yet when creation policy is auto

2008-04-24 Thread Gordon Smith
A simple null check tells you whether they've been created or not.

 

But you should avoid writing your app in this way. Instead,you should
pull data into components as they get created, such as by writing an
'initialize' handler on that component.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ltkavanagh
Sent: Thursday, April 24, 2008 2:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to check if components have been created yet
when creation policy is auto

 

Hi,

I am trying to checking if children of a viewstack have been created 
when the viewstack's creation policy is set to auto (as per default). 
I am getting a null pointer reference when trying to access a value on 
a component nested in a viewstasck.

I would assume i need to check if the children have been made first 
and if not call myViewStack.createComponentsFromDescriptors(true);

Does anyone know the way to check this?

Many Thanks

Luke

 



RE: [flexcoders] Timer questions

2008-04-24 Thread Gordon Smith
setTimeout() is considered the old way and Timer the new way,
although I don't think setTimeout() has been officially deprecated.
Timer is considered better because it is more object-oriented and
event-oriented, which are hallmarks of AS3 programming.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Thursday, April 24, 2008 6:56 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Timer questions

 

along these same lines, is there a reason to use a Timer vs a
setTimeout call for simple timeout type events?

 

I recall the docs seeming to hint that a Timer is better, but I find the
setTimeout event REALLY useful.

 

- Kevin

 

 

 

On Apr 22, 2008, at 11:48 PM, Alex Harui wrote:





 

Flex/Flash is single-threaded which means that nothing can keep the next
line of code from running.

 

You won't get a timer event until you finish your loop, and you don't
need to worry about calling stop() until you no longer want timer
events.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Tuesday, April 22, 2008 8:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Timer questions

 

1. If I timer.start() in a loop will the loop be waiting for TimerEvent 
to complete before it (loop) moves to next step?
2. Do I need to timer.stop() inside of TimerEvent handler to make sure 
Flex processes that handler in a whole? What I mean is if a timer 
interval is very small and handler processing takes longer then timer 
interval then timer might interrupt it before it is complete.

Thanks for help.

 

 

 

 



RE: [flexcoders] passing parameters to components

2008-04-24 Thread Gordon Smith
Technically, there is no problem in AS3 with writing a setter without a
getter to implement a write-only property. But I consider write-only
properties to be poor API design. Being able to set something -- but not
ask later what it was you set -- is weird. If I need to know the value
that I set, I shouldn't have to store it myself.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Thursday, April 24, 2008 6:53 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] passing parameters to components

 

I am wondering why this is weird?  Could there be a case where someone
wanted to have a write-only property?  I agree that it is pretty
uncommon, but I am wondering if it problematic from an architecture
standpoint?

 

- Kevin

 

On Apr 22, 2008, at 8:37 PM, Gordon Smith wrote:





(BTW, setters without getters are weird.)

 

 



Re: [flexcoders] more richtext editor -- resize the toolbar...

2008-04-24 Thread grimmwerks

Yeesh -- sorry Alex :P


On Apr 24, 2008, at 6:29 PM, Alex Harui wrote:

The source is an MXML file.  For the third time, I will suggest you  
copy and modify it.


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]  
On Behalf Of grimmwerks

Sent: Thursday, April 24, 2008 3:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] more richtext editor -- resize the toolbar...

So I'm removing buttons from the toolbar in the RTE - is there ways of
resizing the container so that it's not a big gaping height?






  1   2   >