[flexcoders] Re: Flash/Flex Compatibility with 64bit OS

2008-04-16 Thread kenny14390
Is anybody even aware of such an issue? Should I be worried?

--- In flexcoders@yahoogroups.com, "kenny14390" <[EMAIL PROTECTED]> wrote:
>
> I got this email from a user of my Flex applications...
> 
> --
> 
> Heh, I tried to log in today and it didn't work. I think I know what the
> problem is.
> It worked before when I was logging in with my laptop with runs 32bit
> XP. I
> run a 64 bit OS on my desktop and it doesn't work on it.
> It probably has to do with some compatibility issue with the 64 bit
flash
> player plugin.
> 
> --
> 
> Does anyone have any idea if there are any compatibility issues with a
> 64bit OS and flash player? Any solutions?
> 
> This person emailed me several times because he was having trouble
> registering an account through my Flex app. The problem seemingly went
> away after I registered his account for him, but now the errors are
> coming back - evidently because of hardware incompatibilities.
>




RE: [flexcoders] SWF generated by ant does not work

2008-04-16 Thread Gregor Kiddie
How are you linking in your style sheet?

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact [EMAIL PROTECTED]





[flexcoders] FYI: Getting mx:Text to wrap

2008-04-16 Thread arieljake
I have a DataGrid inside a page, and I didn't want to hard code the
width of the DataGrid, much less any of the columns inside of the
DataGrid.

One of the columns in the grid is a custom item renderer, a Canvas
with an Image next to a Text field for displaying a description. The
Image was constrained to 5 pixels from the left and 50 pixels wide.
The Text field was constrained to 60 pixels from the left and 5 pixels
from the right.

At first the Text field was not wrapping as many have asked/commented
on in this group. But I got it to wrap by replacing the right side
constraint with a binding on the width to the width of the parent
component (the Canvas) minus the width of the image minus the two 5
pixel padding values, so:

width="{this.width - theImg.width - 5 - 5}"

Now the Text field wraps properly.

Just to share.



RE: [flexcoders] newbie question

2008-04-16 Thread Gordon Smith
BTW, Timgerr asked essentially the same question early today in the
thread "Flex Compenents, how to make them talk". 

 

If your app is organized like this

 













 

then from MyForm's 

[flexcoders] How can a Line Chart pass data to a custom LineRenderer?

2008-04-16 Thread EddieBerman
I've got a Line Chart, and I've written a custom Line Renderer. I have 
some chart data to share with the Renderer (apart from the chart value 
data that's available in the Renderer by default), but I can't figure 
out how to either have the Line Chart pass it to the Line Renderer, or 
have the Line Renderer ask the Line Chart for it.

This is a new area for me and I'd appreciate any help here, even just 
pointing me to any existing reference material or discussion that so 
far as eluded my searches. 

Thanks in advance.



Re: [flexcoders] svg image not load through xml ???

2008-04-16 Thread Swamy Nathan
Thank you very much. I changed to Png format. Now its working fine.

On Wed, Apr 16, 2008 at 9:17 PM, gabriel montagné <
[EMAIL PROTECTED]> wrote:

>   On Wed, Apr 16, 2008 at 8:28 AM, Swamy Nathan <[EMAIL 
> PROTECTED]>
> wrote:
> > but am using the Scalable Vector Graphics (SVG) the image not loaded at
> run
> > time. how can i get the image.
> > and also i change the xml to
>
> Flex cannot load and display SVGs at runtime. You can only embed
> them (that is, you can have the compiler change it into a SWF shape
> that it can use _at compile time_). If you need to be able to load
> your images at runtime, you should convert them to some other
> supported format (GIF, JPEG, PNG or SWF).
>
> >  > name="flex" />
>
> Yeah, those @Embed instructions are for the compiler, not for the
> player, those won't help at runtime.
>
> --
> gabriel montagné láscaris comneno
> http://rojored.com
> t/506.8392.2040
>  
>



-- 
Thanks & Regards
Swaminathan. M


Re: [flexcoders] Firefox exposes https rpc-data in plugtmp

2008-04-16 Thread Rickard Dahlstrand

Tom Chiverton wrote:

On Wednesday 16 Apr 2008, rickarddahlstrand wrote:
  

I use HTTPService quite extensively and when I run my flex-app in
Firefox I suffer from slowdown after a couple of hours. I have tracked
this down to Firefox storing all XML-request I do as files in the
\Users\myname\AppData\Local\Temp\plugtmp-*\ directory. Even data
transfered over https.



At a guess, disable all your plugins and/or use a clean profile.
If that works, maybe you have a connection inspecting plugin installed ?
  
The plugin that causes this is Flash. ;) This behaviour is built into 
Firefox, I have tracked it down in the source.


My problem seems to be that I need to add a random number at the end of 
each request to avoid caching:


   statusRequest.url="https://server/stat.api.php?text="; + 
escape(s) + "&getlog=" + getlog + "&" + Math.random();

   statusRequest.send(getlog);

This however seems to mean that I get a new file in the 
plugtmp-directory for every request (which I do once every second). 
Running the app for an hour gives me 3600 files that firefox needs to 
remove when I close the app.


I have tried removing math.random, but then it works two times (with one 
file in the cache) and then firefox stops sending out requests. I have 
no idea why. This would solve one problem for me, but not the other.


Anyway, the problem is real. If you google on plugtmp you can see that 
people are using it to extract videos from youtube and music from 
pandora. Then go to any rpc-based Flexapp and have a look in the 
plugtmp-directory yourself.


Rickard.


RE: [flexcoders] Sort - findItem - compareFunction prob

2008-04-16 Thread ibo
Agh. How could I miss that. ive depended too much on IDE and its showing now 
that im using plain text editor :P. Thanks a bunch.

Alex Harui <[EMAIL PROTECTED]> wrote:   
  From the source code:  LAST_INDEX_MODE is the third param.
   
  /**
  *  Finds the specified object within the specified array (or the insertion
  *  point if asked for), returning the index if found or -1 if not.
  *  The ListCollectionView class findxxx() methods use 
  *  this method to find the requested item; as a general rule, it is 
  *  easier to use these functions, and not findItem() to find 
  *  data in ListCollectionView-based objects. 
  *  You call the findItem() method directly when writing a 
class
  *  that supports sorting, such as a new ICollectionView implementation.
  *
  *  @param items the Array within which to search.
  *  @param values Object containing the properties to look for (or
  *the object to search for, itself).
  *The object must consist of field name/value pairs, where
  *the field names are names of fields specified by the 
  *SortFields property, in the same order they 
  *are used in that property. 
  *You do not have to specify all of the fields from the 
  *SortFields property, but you 
  *cannot skip any in the order. 
  *Therefore, if the SortFields
  *properity lists three fields, you can specify its first
  *and second fields in this parameter, but you cannot 
specify 
  *only the first and third fields.
  *  @param mode String containing the type of find to perform.
  *   Valid values are
  * 
  *   ANY_INDEX_MODE Return any position that
  *   is valid for the values.
  *   FIRST_INDEX_MODE Return the position
  *   where the first occurrance of the values is found.
  *   LAST_INDEX_MODE Return the position
  *   where the
  *   last ocurrance of the specified values is found.
  * 
  *  @param returnInsertionIndex If the method does not find an item 
identified
  * by the values parameter, and this 
parameter
  * is true the findItem()
  * method returns the insertion point for the values,
  * that is the point in the sorted order where you 
should 
  * insert the item.
  *  @param compareFunction a comparator function to use to find the item.  
If 
  * you do not specify this parameter, the function uses 
  * the function determined by the Sort instance's 
  * compareFunction property, 
  * passing in the array of fields determined
  * by the values object and the current SortFields.
  *  @return int The index in the array of the found item.
  *If the returnInsertionIndex parameter is
  *  false and the item is not found, returns -1.
  *If the returnInsertionIndex parameter is
  *  true and the item is not found, returns
  *the index of the point in the sorted array where the 
values
  *  would be inserted.
  */
  public function findItem(items:Array,
   values:Object,
   mode:String,
   returnInsertionIndex:Boolean = false,
   compareFunction:Function = null):int
  {
   
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ibo
 Sent: Wednesday, April 16, 2008 8:13 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Sort - findItem - compareFunction prob
  
   
second arg?
 
 sort.findItem(forAddition[i], Sort.LAST_INDEX_MODE, true, compareTitles);
 
 The 2nd argument is a constant provided in Sort class. I used whats available. 
The other 2 options are : 
 
 Sort.LAST_INDEX_MODE
 Sort.ANY_INDEX_MODE
 
 Care to give a correct sample usage of Sort.findItem()? I cant find an example 
anywhere. Thanks.
 
 Alex Harui <[EMAIL PROTECTED]> wrote:
  You’re missing the second argument to findItem.
  
 
  
  
-
  
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ibo
 Sent: Wednesday, April 16, 2008 2:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Sort - findItem -! compareFunction prob
  
  
 
  
  Hi I'm having problem with sorting, the compiler says :
 

[flexcoders] Re: Flex Compenents, how to make them talk

2008-04-16 Thread timgerr
Thanks for the help you have taught me much.

Timgerr

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> By the way, why are you wrapping your  and  components
> inside es to put them into the ? This probably isn't
> necessary. The children of a ViewStack must be some kind of Container,
> and I'm guessing that Login and Register are subclasses of Container.
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Gordon Smith
> Sent: Wednesday, April 16, 2008 2:43 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Re: Flex Compenents, how to make them talk
> 
>  
> 
> A click handler in Login's 

Re: [flexcoders] Clipping of charts

2008-04-16 Thread Josh McDonald
I too am surprised that this can't be more easily done, it's something I get
asked for nearly every time we have a barchart.

-J

On Thu, Mar 13, 2008 at 2:14 AM, Brendan Meutzner <[EMAIL PROTECTED]>
wrote:

>   Maybe allowing them to change the vertical axis between Logarithmic and
> Linear might be an easier solution for this?
>
>
> Brendan
>
>
>
>
> On Wed, Mar 12, 2008 at 11:11 AM, Andrej van der Zee <[EMAIL PROTECTED]>
> wrote:
>
> >   Yes that's what I just did. I had to take some special
> > actions for the datatips since it should still give
> > the original values, and not the chopped ones.
> >
> > I am doing this to give the user the option through a
> > slider to set the X-axis so that the smaller bars
> > (which are "stacked" and composed of subbars) become
> > better visible. I my setup, sometimes it is just one
> > large bar that makes it hard to see the smaller
> > stacked ones.
> >
> > Cheers,
> > Andrej
> >
> > --- Brendan Meutzner <[EMAIL PROTECTED] >
> > wrote:
> >
> > > Just off the top of my head, I believe the cause of
> > > this is when the bar
> > > chart renderer goes to draw, it's getting NaN values
> > > because the transform
> > > methods used to get x,y position against axis values
> > > don't exist.
> > >
> > > My suggestion, if you "know" the maximum value of
> > > your axis, retool your
> > > dataProvider struct to reset the yField value of
> > > your series data to that
> > > maximum. That'd be the easiest way. Out of
> > > curiosity... why are you
> > > setting the maximum manually if it's causing this
> > > problem?
> > >
> > >
> > > Brendan
> > >
> > >
> > > On Wed, Mar 12, 2008 at 8:37 AM, mavdzee
> > > <[EMAIL PROTECTED] > wrote:
> > >
> > > > Hi,
> > > >
> > > > I noticed that if I have a BarChart and set the
> > > maximum manually to a
> > > > value smaller than some bars in the chart (and
> > > hence don't fit in the
> > > > chart), then these bars are completely dropped
> > > from the chart. Is
> > > > there an easy way to show these bars anyway and
> > > fill it to the
> > > > manually set maximum?
> > > >
> > > > Cheers,
> > > > Andrej
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Brendan Meutzner
> > > http://www.meutzner.com/blog/
> > >
> >
> > __
> > Sent from Yahoo! Mail.
> > The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html
> >
>
>
>
> --
> Brendan Meutzner
> http://www.meutzner.com/blog/
>  
>



-- 
"Therefore, send not to know For whom the bell tolls, It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Grid display question

2008-04-16 Thread Josh McDonald
Rendering entire custom rows counts as much hacking in my book ;-)

-J

On Thu, Apr 17, 2008 at 12:40 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>I think folks are using DataGrids with renderers that contain other
> datagrids.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Josh McDonald
> *Sent:* Wednesday, April 16, 2008 7:37 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] Grid display question
>
>
>
> AFAIK, You can't do this with DataGrid without much hacking. You'll have
> to cook up something custom using Grid, or use AdvancedDataGrid (which I
> believe can do this, although I haven't done it).
>
> -J
>
> On Thu, Apr 17, 2008 at 9:29 AM, nathanpdaniel <[EMAIL PROTECTED]>
> wrote:
>
> So I have a DataGrid question, needing some input.
>
> I have a database set up with Clients and Accounts. There are X
> number of clients. Each client has Y number of Accounts. Client
> one can have an unlimited number of accounts and so on.
> When I load a DataGrid with Clients, I'm looking to have something
> similar to what you see in MS Access. In Access, if you have
> clients, and they're linked through a relationship to accounts. If
> you load Clients, there's a little + sign signifying more info, you
> expand that row, and rows pop up below showing Account rows
> associated with the current client.
> Sort of a visual below:
>
> Closed Row:
> + Client ID | Client Info | Notes
>
> Open Row:
> - Client ID | Client Info | Notes
> Account ID | Account Info | Client ID
> Account ID | Account Info | Client ID
>
> Hopefully this all makes sense and someone can point me in the
> direction I'm looking to go. Any help would be good! :D
>
> Thanks-
> Nathan D.
>
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls, It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>
>  
>



-- 
"Therefore, send not to know For whom the bell tolls, It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] VideoDisplay intelligent buffering?

2008-04-16 Thread Dennis Falling
Are there any tricks to make the VideoDisplay's buffering work a little
better?  The default behavior of simply waiting a number of seconds isn't
ideal because if it's a short video, this may be too long, and if it's a
long video, this may be too short.  If anyone has come up with a good way of
handling this, I'd love some advice.

Thanks!


Re: [flexcoders] File selection problem

2008-04-16 Thread Muzak
> Is there a way to select a file/several files and 
> read the contents without doing "round trips"?

nope, afraid not.

- Original Message - 
From: "dlpagefr" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, April 17, 2008 12:10 AM
Subject: [flexcoders] File selection problem


Hi,
When selecting files with a FileReference or FileReferenceList, I get 
an object or object array containing files.
The problem is that apart from uploading these files, there is nothing 
else I can seem to do with them.
2 examples:
1) images: I can select images and upload them to my webserver, but I 
cannot load these images into the flex applet and display them... 
unless I upload them to the server, then download them again.
2) Data files: I can select a file, but I cannot parse it's contents or 
process the data: I have to upload it to a server and download it 
again...
This does not seem the optimum method of programming and there has to 
be a better way. Uploading just to download again is a huge waste of 
bandwidth - and time. Is there a way to select a file/several files and 
read the contents without doing "round trips"?

Cheers,

Daniel





--
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] File selection problem

2008-04-16 Thread Tracy Spratt
This restriction is due to the security constraints of the Flash Player
running in a browser.

 

If you run your Flex app under AIR, you can access the local file
system.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dlpagefr
Sent: Wednesday, April 16, 2008 6:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] File selection problem

 

Hi,
When selecting files with a FileReference or FileReferenceList, I get 
an object or object array containing files.
The problem is that apart from uploading these files, there is nothing 
else I can seem to do with them.
2 examples:
1) images: I can select images and upload them to my webserver, but I 
cannot load these images into the flex applet and display them... 
unless I upload them to the server, then download them again.
2) Data files: I can select a file, but I cannot parse it's contents or 
process the data: I have to upload it to a server and download it 
again...
This does not seem the optimum method of programming and there has to 
be a better way. Uploading just to download again is a huge waste of 
bandwidth - and time. Is there a way to select a file/several files and 
read the contents without doing "round trips"?

Cheers,

Daniel

 



RE: [flexcoders] Sort - findItem - compareFunction prob

2008-04-16 Thread Alex Harui
>From the source code:  LAST_INDEX_MODE is the third param.

 

/**

*  Finds the specified object within the specified array (or the
insertion

*  point if asked for), returning the index if found or -1 if not.

*  The ListCollectionView class findxxx()
methods use 

*  this method to find the requested item; as a general rule, it is 

*  easier to use these functions, and not findItem() to
find 

*  data in ListCollectionView-based objects. 

*  You call the findItem() method directly when writing
a class

*  that supports sorting, such as a new ICollectionView
implementation.

*

*  @param items the Array within which to search.

*  @param values Object containing the properties to look for (or

*the object to search for, itself).

*The object must consist of field name/value pairs,
where

*the field names are names of fields specified by
the 

*SortFields property, in the same order
they 

*are used in that property. 

*You do not have to specify all of the fields from
the 

*SortFields property, but you 

*cannot skip any in the order. 

*Therefore, if the SortFields

*properity lists three fields, you can specify its
first

*and second fields in this parameter, but you cannot
specify 

*only the first and third fields.

*  @param mode String containing the type of find to perform.

*   Valid values are

* 

*   ANY_INDEX_MODE Return any position that

*   is valid for the values.

*   FIRST_INDEX_MODE Return the position

*   where the first occurrance of the values is
found.

*   LAST_INDEX_MODE Return the position

*   where the

*   last ocurrance of the specified values is found.

* 

*  @param returnInsertionIndex If the method does not find an item
identified

* by the values parameter, and this
parameter

* is true the
findItem()

* method returns the insertion point for the
values,

* that is the point in the sorted order where
you should 

* insert the item.

*  @param compareFunction a comparator function to use to find the
item.  If 

* you do not specify this parameter, the function
uses 

* the function determined by the Sort instance's 

* compareFunction property, 

* passing in the array of fields determined

* by the values object and the current SortFields.

*  @return int The index in the array of the found item.

*If the returnInsertionIndex parameter
is

*  false and the item is not found, returns
-1.

*If the returnInsertionIndex parameter
is

*  true and the item is not found, returns

*the index of the point in the sorted array where
the values

*  would be inserted.

*/

public function findItem(items:Array,

 values:Object,

 mode:String,

 returnInsertionIndex:Boolean = false,

 compareFunction:Function = null):int

{

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ibo
Sent: Wednesday, April 16, 2008 8:13 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Sort - findItem - compareFunction prob

 

second arg?

sort.findItem(forAddition[i], Sort.LAST_INDEX_MODE, true,
compareTitles);

The 2nd argument is a constant provided in Sort class. I used whats
available. The other 2 options are : 

Sort.LAST_INDEX_MODE
Sort.ANY_INDEX_MODE

Care to give a correct sample usage of Sort.findItem()? I cant find an
example anywhere. Thanks.

Alex Harui <[EMAIL PROTECTED]> wrote:

You're missing the second argument to findItem.

 





From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of ibo
Sent: Wednesday, April 16, 2008 2:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sort - findItem -! compareFunction prob

 

Hi I'm having problem with sorting, the compiler says :

error:

[mxmlc] C:\stephen\Main.mxml(51):  Error: Implicit coercion
of a value of type Boolean to an unrelated type String.
[mxmlc] insertionIndex =
sort.findItem(forAddition[i], Sort.
LAST_INDEX_MODE, true, compareTitles)

[flexcoders] File selection problem

2008-04-16 Thread dlpagefr
Hi,
When selecting files with a FileReference or FileReferenceList, I get 
an object or object array containing files.
The problem is that apart from uploading these files, there is nothing 
else I can seem to do with them.
2 examples:
1) images: I can select images and upload them to my webserver, but I 
cannot load these images into the flex applet and display them... 
unless I upload them to the server, then download them again.
2) Data files: I can select a file, but I cannot parse it's contents or 
process the data: I have to upload it to a server and download it 
again...
This does not seem the optimum method of programming and there has to 
be a better way. Uploading just to download again is a huge waste of 
bandwidth - and time. Is there a way to select a file/several files and 
read the contents without doing "round trips"?

Cheers,

Daniel



Re: [flexcoders] Re: A script has executed for longer than the default timeout period of 15 seconds

2008-04-16 Thread Daniel Gold
When I get large datasets back from the server that could trigger multiple
times, I add them to a WorkQueue which is a simple singleton class. It has
an Array of tasks and a timer that fires every 200ms, it pops the next task
off the Array and executes it. The Task object itself takes a Function and
an Arguments Array. Works exactly like CallLater except it allows non
UIComponents to defer work till the next frame. Pretty useful when you need
to break things up and the work can be paired down to a function call with
arguments.

I believe Alex Harui also had a Pseudo-Threading example on his blog:
http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html


On Wed, Apr 16, 2008 at 5:14 PM, Gordon Smith <[EMAIL PROTECTED]> wrote:

>Canvas is a subclass of UIComponent. If you break up your lengthy
> computation into shorter chunks, you can also schedule them with Timer.
>
>
>
> Gordon Smith
>
> Adobe Flex SDK Team
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *markgoldin_2000
> *Sent:* Wednesday, April 16, 2008 3:08 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: A script has executed for longer than the
> default timeout period of 15 seconds
>
>
>
> But I only can use callLater() if I have components based on
> UIComponent. I did not have any luck using it and my components are
> based basically on canvas.
>
> --- In flexcoders@yahoogroups.com , "Gaurav.
> Jain" <[EMAIL PROTECTED]> wrote:
> >
> > If you are compiling with mxmlc, even though the error message says
> 15
> > seconds, the time out actually happens after 60 seconds.
> >
> > Currently there is no way to increase it. You should break down your
> > code using callLater in order to give some CPU cycles to the player
> for
> > screen updates.
> >
> > Thanks,
> > Gaurav
> >
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
> [mailto:flexcoders@yahoogroups.com ] On
> > Behalf Of markgoldin_2000
> > Sent: Wednesday, April 16, 2008 5:49 PM
> > To: flexcoders@yahoogroups.com 
> > Subject: [flexcoders] A script has executed for longer than the
> default
> > timeout period of 15 seconds
> >
> > I am getting this error. At this point of my development I am not
> ready
> > to start optimazing code. Are there any options available to
> encrease
> > that time?
> >
> > Thanks
> >
> >
> > 
> >
> > --
> > 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
> >
>
>  
>


Re: [flexcoders] Advanced DataGrid row span

2008-04-16 Thread bprsofteng

I was hoping there might be a way to get it done using the advanced datagrid
in terms of its
ability to group, because i'd like to be able to sort and so forth. It may
just end up having to 
be a custom component in the datagrid and then a custom sort function.

--
create this kinds of table by your hand.
It's just some textfields and drawing some lines.
 

- Original Message 
To: flexcoders@yahoogroups.com
Sent: Friday, April 11, 2008 10:53:16 PM
Subject: [flexcoders] Advanced DataGrid row span


I'm looking to implement what is essentially a row span and col span.
Example in ASCII art:

id|r1|r2|
  |comb |
-
1 |a |b |
  |data |
-
2 |q |x |
  |data2|
-
Does anybody have any suggestions for going about this.
Many thanks,B
-- 
View this message in context: 
http://www.nabble.com/Advanced-DataGrid-row-span-tp16627851p16736035.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] Sort - findItem - compareFunction prob

2008-04-16 Thread ibo
second arg?

sort.findItem(forAddition[i], Sort.LAST_INDEX_MODE, true, compareTitles);

The 2nd argument is a constant provided in Sort class. I used whats available. 
The other 2 options are : 

Sort.LAST_INDEX_MODE
Sort.ANY_INDEX_MODE

Care to give a correct sample usage of Sort.findItem()? I cant find an example 
anywhere. Thanks.

Alex Harui <[EMAIL PROTECTED]> wrote:   
  You’re missing the second argument to findItem.
   
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ibo
 Sent: Wednesday, April 16, 2008 2:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Sort - findItem - compareFunction prob
  
   
Hi I'm having problem with sorting, the compiler says :
 
 error:
 
 [mxmlc] C:\stephen\Main.mxml(51):  Error: Implicit coercion of a value of 
type Boolean to an unrelated type String.
 [mxmlc] insertionIndex = sort.findItem(forAddition[i], 
Sort.
 LAST_INDEX_MODE, true, compareTitles);
 [mxmlc]
 
 compiler documentation says:
 
 * 1067
 * Implicit coercion of a value of type _ to an unrelated type _.  
 * You are attempting to cast an object to a type to which it cannot be 
converted. This can happen if the class you are casting to is not in the 
inheritance chain of the object being cast. This error appears only when the 
compiler is running in strict mode.
 
 code:
 --
 private function compareTitles(itemA:MyObj, itemB:MyObj):int {
 var valueA:String = itemA.title;
 var valueB:String = itemB.title;
 return ObjectUtil.stringCompare(valueA, valueB);
 }
 ---
 // forAddition is pre-sorted from the backend
 var forAddition:ArrayCollection = ..some data..;
 
 ! // Check insertion index to maintain sorting order
 var sort:Sort = new Sort();
 var insertionIndex:int = 0;
 
 for (var i:int=0; i

Re: [flexcoders] Re: addEventListener and additional arguments?

2008-04-16 Thread Daniel Gold
Encapsulation is a good thing. The events themselves should hold all the
data you need about the action as Ben said above. If you create new custom
events you should make sure they have storage for all the properties any
listener would need to know about what triggered the event, etc. If there's
really something you need that isn't in the event you can make it a class
variable and have access to it from the handler, stuff like state variables
is a good example since you may be in a state where you don't need to take
any action.

On Wed, Apr 16, 2008 at 3:46 PM, ben.clinkinbeard <
[EMAIL PROTECTED]> wrote:

>   You probably don't need to send extra parameters anyways. You can
> inspect the event.target your handler receives to determine which
> button was clicked. (I am guessing that may be your intent in sending
> extra args as I remember doing stuff like that back in the AS1 days.)
> Suffice to say that any forking/special handling can/should be done in
> the handler rather than the initiator.
>
> HTH,
> Ben
>
>
> --- In flexcoders@yahoogroups.com , "Alex
> Harui" <[EMAIL PROTECTED]> wrote:
> >
> > You can call it anything you want. I call it strongly-typed languages
> > and a good event model, and they prevent me from having mysterious
> > hard-to-find errors because I mistyped a variable name, and allow me to
> > hook up more than one handler to the event.
> >
> >
> >
> > 
> >
> > From: flexcoders@yahoogroups.com  [mailto:
> flexcoders@yahoogroups.com ] On
> > Behalf Of Jason The Saj
> > Sent: Wednesday, April 16, 2008 11:54 AM
> > To: flexcoders@yahoogroups.com 
> > Subject: [flexcoders] Re: addEventListener and additional arguments?
> >
> >
> >
> > Okay then
> >
> > How do I do the simple act of "click" event call function and pass a
> > parameter value?
> >
> > This was easy in AS1/AS2/JS
> >
> > I could essentially just say...
> >
> > btnFoo.release = function (parameters){...}
> >
> > Now, it looks like i need to add an event listener. Then create a
> > custom event. All so I can pass a number to a function call.
> >
> > Um...can we say asinine?
> >
> > ***
> >
> > Please, some one show me a nice easy way.
> >
>
>  
>


RE: [flexcoders] newbie question

2008-04-16 Thread Tracy Spratt
Another convenient way to do a login is to use a modal popUp
TitleWindow.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of shaun
Sent: Wednesday, April 16, 2008 10:47 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie question

 

Hey Luke,

Luke Vanderfluit wrote:
> 
> I have a component that displays a form (currently in 
> selectedIndex 0), from this component I want the click to send me 
> to ViewStack.selectedIndex 1.
> 
> Is there something like parent.selectedIndex?
> Access the ViewStack (that contains the component as one of its 
> children) directly from the component doesnt work.
> 
> 
> 
> How would I do that?

If i understand correctly, off the top of my head you could do something

like:

//inside parent containing VS.
addEventListener("NextEvent", handleNext);

function handleNext(e:Event):void{
var c:MyFormComponent = e.currentTarget as MyFormComponent;
next(c);
}

function next(c:MyFormComponent){
//something.
myVs.selectedIndex < maxIndex ? myVs.selectedIndex++ : null ;
}

//inside child component within vs.
function handleClick(e:Event):void{
if (e.currentTarget == next)
dispatchEvent(new Event("NextEvent", true));
else
dispatchEvent(new Event("PreviousEvent", true));

}




HTH.
cheers,
- shaun

 



RE: [flexcoders] Sort - findItem - compareFunction prob

2008-04-16 Thread Alex Harui
You're missing the second argument to findItem.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ibo
Sent: Wednesday, April 16, 2008 2:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sort - findItem - compareFunction prob

 

Hi I'm having problem with sorting, the compiler says :

error:

[mxmlc] C:\stephen\Main.mxml(51):  Error: Implicit coercion of a
value of type Boolean to an unrelated type String.
[mxmlc] insertionIndex =
sort.findItem(forAddition[i], Sort.
LAST_INDEX_MODE, true, compareTitles);
[mxmlc]

compiler documentation says:

* 1067
* Implicit coercion of a value of type _ to an unrelated type _.  
* You are attempting to cast an object to a type to which it cannot be
converted. This can happen if the class you are casting to is not in the
inheritance chain of the object being cast. This error appears only when
the compiler is running in strict mode.

code:
--
private function compareTitles(itemA:MyObj, itemB:MyObj):int {
var valueA:String = itemA.title;
var valueB:String = itemB.title;
return ObjectUtil.stringCompare(valueA, valueB);
}
---
// forAddition is pre-sorted from the backend
var forAddition:ArrayCollection = ..some data..;

! // Check insertion index to maintain sorting order
var sort:Sort = new Sort();
var insertionIndex:int = 0;

for (var i:int=0; ihttp://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62
sR8HDtDypao8Wcj9tAcJ%20> 

 



Re: [flexcoders] newbie question

2008-04-16 Thread shaun
Hey Luke,

Luke Vanderfluit wrote:
> 
> I have a component that displays a form (currently in 
> selectedIndex 0), from this component I want the click to send me 
> to ViewStack.selectedIndex 1.
> 
> Is there something like parent.selectedIndex?
> Access the ViewStack (that contains the component as one of its 
> children) directly from the component doesnt work.
> 
> 
> 
> How would I do that?

If i understand correctly, off the top of my head you could do something 
like:


//inside parent containing VS.
addEventListener("NextEvent", handleNext);

function handleNext(e:Event):void{
  var c:MyFormComponent = e.currentTarget as MyFormComponent;
  next(c);
}

function next(c:MyFormComponent){
//something.
myVs.selectedIndex < maxIndex ? myVs.selectedIndex++ : null ;
}


//inside child component within vs.
function handleClick(e:Event):void{
   if (e.currentTarget == next)
dispatchEvent(new Event("NextEvent", true));
   else
dispatchEvent(new Event("PreviousEvent", true));

}





HTH.
cheers,
  - shaun








[flexcoders] Application from Database in Flex Builder 3

2008-04-16 Thread luke_lee1124
Hi, All, 
I just made my mind to move to flex builder 3.
I tried its new feature -  creating application from database.
It is good, but my question is: a data grid showing one table is not
enough, is there a simple way to create a data grid to display one
cross query or a view without writing php code myself?

Thanks 



RE: [flexcoders] mx.controls.Text control not autosizing -

2008-04-16 Thread Alex Harui
Children are sized by their parent, so you custom UIComponent will have
to setActualSize on the Text appropriately

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Wednesday, April 16, 2008 3:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx.controls.Text control not autosizing -

 

Hello All,

I know there's been some discussion recently, regarding TextFields and
having them grow automatically around their content. The TextInput and
TextArea Controls must be extended in order to get this type of
functionality - but what about the "Text" Control?

It's my understanding that the Text Control will automatically size
itself around it's content. In my case, I am not using the
mx.controls.Text inside a MXML Component, it's being added as a Child
inside of a Custom UIComponent.

Per the Flex 3.0 Documentation: "If you leave both the
width and the height unspecified, Flex calculates them
based on any explicit line breaks in the text, with no
wordwrapping within lines."

Is there something that I'm missing regarding this control?

Thank you all in advance for any advice on this,

Mike

 



RE: [flexcoders] Grid display question

2008-04-16 Thread Alex Harui
I think folks are using DataGrids with renderers that contain other
datagrids.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, April 16, 2008 7:37 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Grid display question

 

AFAIK, You can't do this with DataGrid without much hacking. You'll have
to cook up something custom using Grid, or use AdvancedDataGrid (which I
believe can do this, although I haven't done it).

-J

On Thu, Apr 17, 2008 at 9:29 AM, nathanpdaniel <[EMAIL PROTECTED]
 > wrote:

So I have a DataGrid question, needing some input.

I have a database set up with Clients and Accounts. There are X 
number of clients. Each client has Y number of Accounts. Client 
one can have an unlimited number of accounts and so on.
When I load a DataGrid with Clients, I'm looking to have something 
similar to what you see in MS Access. In Access, if you have 
clients, and they're linked through a relationship to accounts. If 
you load Clients, there's a little + sign signifying more info, you 
expand that row, and rows pop up below showing Account rows 
associated with the current client.
Sort of a visual below:

Closed Row:
+ Client ID | Client Info | Notes

Open Row:
- Client ID | Client Info | Notes
Account ID | Account Info | Client ID
Account ID | Account Info | Client ID

Hopefully this all makes sense and someone can point me in the 
direction I'm looking to go. Any help would be good! :D

Thanks-
Nathan D.




-- 
"Therefore, send not to know For whom the bell tolls, It tolls for
thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]   

 



Re: [flexcoders] Grid display question

2008-04-16 Thread Josh McDonald
AFAIK, You can't do this with DataGrid without much hacking. You'll have to
cook up something custom using Grid, or use AdvancedDataGrid (which I
believe can do this, although I haven't done it).

-J

On Thu, Apr 17, 2008 at 9:29 AM, nathanpdaniel <[EMAIL PROTECTED]> wrote:

>   So I have a DataGrid question, needing some input.
>
> I have a database set up with Clients and Accounts. There are X
> number of clients. Each client has Y number of Accounts. Client
> one can have an unlimited number of accounts and so on.
> When I load a DataGrid with Clients, I'm looking to have something
> similar to what you see in MS Access. In Access, if you have
> clients, and they're linked through a relationship to accounts. If
> you load Clients, there's a little + sign signifying more info, you
> expand that row, and rows pop up below showing Account rows
> associated with the current client.
> Sort of a visual below:
>
> Closed Row:
> + Client ID | Client Info | Notes
>
> Open Row:
> - Client ID | Client Info | Notes
> Account ID | Account Info | Client ID
> Account ID | Account Info | Client ID
>
> Hopefully this all makes sense and someone can point me in the
> direction I'm looking to go. Any help would be good! :D
>
> Thanks-
> Nathan D.
>
>  
>



-- 
"Therefore, send not to know For whom the bell tolls, It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Need help buying Flex licenses in US$ - Intl prices are highway robbery!

2008-04-16 Thread Josh McDonald
Just to clarify: I have converted from US$ to AU$, and the price is still
90% more to buy from Australia.

Also, I'm quite sure using a US address with a credit-card registered in
another country will not only fail, but probably put the card on a
blacklist.

-J

On Thu, Apr 17, 2008 at 12:28 PM, Gustavo Duenas <
[EMAIL PROTECTED]> wrote:

>   Use your credit card in the adobe website(US), International credit
> cards use the currency where they are buying,
> so in this case USD$, and ask a friend for his address in the US, just for
> purposes of billing.
> Sounds like cheating but before coming to the US, when I was living in
> South America, I bought software online using a
> friend mail address.
>
>
> I Hope it helps.
>
> Regards,
>
> Gustavo
> On Apr 16, 2008, at 10:16 PM, Vivian Richard wrote:
>
>
>
>Hi Josh. Sounds weired. But I guess whoever was helping you mixed up
>with Australian dollar verses USD. I do not believe that there is any
> way
>that Australian will pay 90% more unless there are any Australian
> tax!!!
>
>
>
>
> On Wed, Apr 16, 2008 at 5:28 PM, Peter Connolly <[EMAIL PROTECTED]>
> wrote:
>
> > That's really weird, given the state of our deflating US dollar.
> > Adobe, what's up???
> >
> >
> > On Wed, Apr 16, 2008 at 6:23 PM, Josh McDonald <[EMAIL 
> > PROTECTED]>
> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi guys,
> > >
> > > Can anybody point me to a reseller who sells Flex licenses in US$ to
> > non-US
> > > addressed credit cards? We don't want discs, we're not in Nigeria or
> > Russia,
> > > and all calls go to the same call centre in India, why the bloody hell
> > > should Australians pay 90% more for a 40 character string?
> > >
> > > -J
> > >
> > > --
> > > "Therefore, send not to know For whom the bell tolls, It tolls for
> > thee."
> > >
> > > :: Josh 'G-Funk' McDonald
> > > :: 0437 221 380 :: [EMAIL PROTECTED] 
> >
>
>
>
>  




-- 
"Therefore, send not to know For whom the bell tolls, It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Need help buying Flex licenses in US$ - Intl prices are highway robbery!

2008-04-16 Thread Gustavo Duenas
Use your credit card in the adobe website(US), International credit  
cards use the currency where they are buying,
so in this case USD$, and ask a friend for his address in the US,  
just for purposes of billing.
Sounds like cheating but before coming to the US, when I was living  
in South America, I bought software online using a

friend mail address.


I Hope it helps.

Regards,

Gustavo
On Apr 16, 2008, at 10:16 PM, Vivian Richard wrote:




   Hi Josh. Sounds weired. But I guess whoever was helping you  
mixed up
   with Australian dollar verses USD. I do not believe that there  
is any way
   that Australian will pay 90% more unless there are any  
Australian tax!!!






On Wed, Apr 16, 2008 at 5:28 PM, Peter Connolly  
<[EMAIL PROTECTED]> wrote:

That's really weird, given the state of our deflating US dollar.
Adobe, what's up???



On Wed, Apr 16, 2008 at 6:23 PM, Josh McDonald <[EMAIL PROTECTED]>  
wrote:

>
>
>
>
>
>
> Hi guys,
>
> Can anybody point me to a reseller who sells Flex licenses in US$  
to non-US
> addressed credit cards? We don't want discs, we're not in Nigeria  
or Russia,
> and all calls go to the same call centre in India, why the bloody  
hell

> should Australians pay 90% more for a 40 character string?
>
> -J
>
> --
> "Therefore, send not to know For whom the bell tolls, It tolls  
for thee."

>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]







Re: [flexcoders] Need help buying Flex licenses in US$ - Intl prices are highway robbery!

2008-04-16 Thread Vivian Richard
   Hi Josh. Sounds weired. But I guess whoever was helping you mixed up
   with Australian dollar verses USD. I do not believe that there is any way
   that Australian will pay 90% more unless there are any Australian tax!!!




On Wed, Apr 16, 2008 at 5:28 PM, Peter Connolly <[EMAIL PROTECTED]>
wrote:

>   That's really weird, given the state of our deflating US dollar.
> Adobe, what's up???
>
>
> On Wed, Apr 16, 2008 at 6:23 PM, Josh McDonald <[EMAIL 
> PROTECTED]>
> wrote:
> >
> >
> >
> >
> >
> >
> > Hi guys,
> >
> > Can anybody point me to a reseller who sells Flex licenses in US$ to
> non-US
> > addressed credit cards? We don't want discs, we're not in Nigeria or
> Russia,
> > and all calls go to the same call centre in India, why the bloody hell
> > should Australians pay 90% more for a 40 character string?
> >
> > -J
> >
> > --
> > "Therefore, send not to know For whom the bell tolls, It tolls for
> thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED] 
>  
>


Re: [flexcoders] newbie question

2008-04-16 Thread Luke Vanderfluit
Hi Gordon.


Gordon Smith wrote:
>>  How do I allow the user to navigate from one page to the next?
> 
>  
> 
> You'd generally use a ViewStack if the pages have little UI in common 
> with each other. Use states if they have a lot in common. You can also 
> mix and match, using a ViewStack for part of the screen, etc.
> 
> A ViewStack shows 1 of N of its child views. You change which child it 
> displays by setting its selectedChild or selectedIndex property.

Thanks very much for your reply...

I have a component that displays a form (currently in 
selectedIndex 0), from this component I want the click to send me 
to ViewStack.selectedIndex 1.

Is there something like parent.selectedIndex?
Access the ViewStack (that contains the component as one of its 
children) directly from the component doesnt work.



How would I do that?

Kind regards.
Luke.

> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
>  
> 
> 
> 
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Luke Vanderfluit
> *Sent:* Wednesday, April 16, 2008 5:49 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] newbie question
> 
>  
> 
> Hi.
> 
> Im relatively new to flex and am writing an application at work
> using flex! Yes!
> 
> I want to get a log in page working in flex.
> Doing this in html/jsp one would create a page, submit the page
> and (if credentials are good) move to the next page.
> 
> In flex, the concept of reloading pages is non-existent, I believe.
> So I know how to connect to a server from a flex client to test
> the user credentials...
> The question is:
> How do I allow the user to navigate from one page to the next?
> (I am currently using states. Is that the way?)
> 
> My submit button will call an actionscript function that will
> test the credentials, but it should also put the user into the
> next step of the application, what is the accepted way of doing this?
> 
> Thanks.
> Kind regards.
> 
> -- 
> Luke Vanderfluit
> Analyst / Web Programmer
> e3Learning.com.au
> 08 8221 6422
> 
> 


-- 
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422


Re: [flexcoders] Need help buying Flex licenses in US$ - Intl prices are highway robbery!

2008-04-16 Thread Peter Connolly
That's really weird, given the state of our deflating US dollar.
Adobe, what's up???


On Wed, Apr 16, 2008 at 6:23 PM, Josh McDonald <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> Hi guys,
>
> Can anybody point me to a reseller who sells Flex licenses in US$ to non-US
> addressed credit cards? We don't want discs, we're not in Nigeria or Russia,
> and all calls go to the same call centre in India, why the bloody hell
> should Australians pay 90% more for a 40 character string?
>
> -J
>
> --
> "Therefore, send not to know For whom the bell tolls, It tolls for thee."
>
>  :: Josh 'G-Funk' McDonald
>  :: 0437 221 380 :: [EMAIL PROTECTED] 


[flexcoders] Need help buying Flex licenses in US$ - Intl prices are highway robbery!

2008-04-16 Thread Josh McDonald
Hi guys,

Can anybody point me to a reseller who sells Flex licenses in US$ to non-US
addressed credit cards? We don't want discs, we're not in Nigeria or Russia,
and all calls go to the same call centre in India, why the bloody hell
should Australians pay 90% more for a 40 character string?

-J

-- 
"Therefore, send not to know For whom the bell tolls, It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] newbie question

2008-04-16 Thread Gordon Smith
> How do I allow the user to navigate from one page to the next?

 

You'd generally use a ViewStack if the pages have little UI in common
with each other. Use states if they have a lot in common. You can also
mix and match, using a ViewStack for part of the screen, etc.

 

A ViewStack shows 1 of N of its child views. You change which child it
displays by setting its selectedChild or selectedIndex property.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Luke Vanderfluit
Sent: Wednesday, April 16, 2008 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie question

 

Hi.

Im relatively new to flex and am writing an application at work 
using flex! Yes!

I want to get a log in page working in flex.
Doing this in html/jsp one would create a page, submit the page 
and (if credentials are good) move to the next page.

In flex, the concept of reloading pages is non-existent, I believe.
So I know how to connect to a server from a flex client to test 
the user credentials...
The question is:
How do I allow the user to navigate from one page to the next?
(I am currently using states. Is that the way?)

My submit button will call an actionscript function that will 
test the credentials, but it should also put the user into the 
next step of the application, what is the accepted way of doing this?

Thanks.
Kind regards.

-- 
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422

 



[flexcoders] newbie question

2008-04-16 Thread Luke Vanderfluit
Hi.

Im relatively new to flex and am writing an application at work 
using flex! Yes!

I want to get a log in page working in flex.
Doing this in html/jsp one would create a page, submit the page 
and (if credentials are good) move to the next page.

In flex, the concept of reloading pages is non-existent, I believe.
So I know how to connect to a server from a flex client to test 
the user credentials...
The question is:
How do I allow the user to navigate from one page to the next?
(I am currently using states. Is that the way?)

My submit button will call an actionscript function that will 
test the credentials, but it should also put the user into the 
next step of the application, what is the accepted way of doing this?

Thanks.
Kind regards.


-- 
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422


[flexcoders] Grid display question

2008-04-16 Thread nathanpdaniel
So I have a DataGrid question, needing some input.

I have a database set up with Clients and Accounts.  There are X 
number of clients.  Each client has Y number of Accounts.  Client 
one can have an unlimited number of accounts and so on.
When I load a DataGrid with Clients, I'm looking to have something 
similar to what you see in MS Access.  In Access, if you have 
clients, and they're linked through a relationship to accounts.  If 
you load Clients, there's a little + sign signifying more info, you 
expand that row, and rows pop up below showing Account rows 
associated with the current client.
Sort of a visual below:

Closed Row:
+ Client ID | Client Info | Notes

Open Row:
- Client ID | Client Info | Notes
Account ID | Account Info | Client ID
Account ID | Account Info | Client ID

Hopefully this all makes sense and someone can point me in the 
direction I'm looking to go.  Any help would be good! :D

Thanks-
Nathan D.




[flexcoders] My AIR installer does not include my icons

2008-04-16 Thread Andrew Wetmore
I have an AIR installer for the app we are developing. I have
specified four icons in the app xml file, and have put them in the
folder I have named. They are png's of the appropriate sizes. 

When I build the app, the icons are not used and never appear. What's
with that?

a



RE: [flexcoders] Intelligent ViewStack Children

2008-04-16 Thread Rick Winscot
Bruce,

 

Can you post an example? I'm skeptical - since the show event is tied to
object visibility. and if you aren't touching that explicitly it won't be
implicitly set by a parent. You must be setting the stage for your events to
propagate (something touching visibile=true) which would be hard to do with
a pre-packaged component.

 

Rick Winscot

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bruce Hopkins
Sent: Wednesday, April 16, 2008 11:26 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Intelligent ViewStack Children

 

Joshua,

I *just* solved this problem yesterday. All you need to do is add a listener
for the FlexEvent.SHOW event. Your callback method will always be called
when the ViewStack shows your child container.

Regards,

Bruce

On Mon, Apr 14, 2008 at 2:38 PM, joshua gatcke <[EMAIL PROTECTED]> wrote:

Does anyone know if it is possible for a component to know if it's 
'visible' or 'on screen' when it's inside a ViewStack without looking 
at the parent ViewStacks properties? I have a component and I need to 
to 'know' if it's actually in the showing viewstack child or in one of 
the hidden ones. I cannot look at the parent ViewStack because I will 
not know where or how this component is being used.

I looked through piles of documentation, not sure if I am just thick 
or something.

Any suggestions would rock the casbah, thanks in advance. 

 

 

<><>

Re: [flexcoders] Re: Intelligent ViewStack Children

2008-04-16 Thread Josh McDonald
Shit my bad, that's the first thing I would've tried, so I assumed you tried
and it didn't work. I've been following this thread coz it seemed like a
really interesting problem.

*slaps head*

-J

On Thu, Apr 17, 2008 at 7:24 AM, joshuagatcke <[EMAIL PROTECTED]> wrote:

>   this is amazing! no joke.
>
> Thanks Bruce!
>
>  
>



-- 
"Therefore, send not to know For whom the bell tolls, It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] Re: A script has executed for longer than the default timeout period of 15 seconds

2008-04-16 Thread Gordon Smith
Canvas is a subclass of UIComponent. If you break up your lengthy
computation into shorter chunks, you can also schedule them with Timer.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Wednesday, April 16, 2008 3:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: A script has executed for longer than the
default timeout period of 15 seconds

 

But I only can use callLater() if I have components based on 
UIComponent. I did not have any luck using it and my components are 
based basically on canvas.

--- In flexcoders@yahoogroups.com 
, "Gaurav. Jain" <[EMAIL PROTECTED]> wrote:
>
> If you are compiling with mxmlc, even though the error message says 
15
> seconds, the time out actually happens after 60 seconds. 
> 
> Currently there is no way to increase it. You should break down your
> code using callLater in order to give some CPU cycles to the player 
for
> screen updates.
> 
> Thanks,
> Gaurav
> 
> -Original Message-
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of markgoldin_2000
> Sent: Wednesday, April 16, 2008 5:49 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] A script has executed for longer than the 
default
> timeout period of 15 seconds
> 
> I am getting this error. At this point of my development I am not 
ready 
> to start optimazing code. Are there any options available to 
encrease 
> that time?
> 
> Thanks
> 
> 
> 
> 
> --
> 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] Re: A script has executed for longer than the default timeout period of 15 seconds

2008-04-16 Thread markgoldin_2000
But I only can use callLater() if I have components based on 
UIComponent. I did not have any luck using it and my components are 
based basically on canvas.

--- In flexcoders@yahoogroups.com, "Gaurav. Jain" <[EMAIL PROTECTED]> wrote:
>
> If you are compiling with mxmlc, even though the error message says 
15
> seconds, the time out actually happens after 60 seconds. 
> 
> Currently there is no way to increase it. You should break down your
> code using callLater in order to give some CPU cycles to the player 
for
> screen updates.
> 
> Thanks,
> Gaurav
> 
> -Original Message-
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of markgoldin_2000
> Sent: Wednesday, April 16, 2008 5:49 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] A script has executed for longer than the 
default
> timeout period of 15 seconds
> 
> I am getting this error. At this point of my development I am not 
ready 
> to start optimazing code. Are there any options available to 
encrease 
> that time?
> 
> Thanks
> 
> 
> 
> 
> --
> 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
>




RE: [flexcoders] A script has executed for longer than the default timeout period of 15 seconds

2008-04-16 Thread Gaurav. Jain
If you are compiling with mxmlc, even though the error message says 15
seconds, the time out actually happens after 60 seconds. 

Currently there is no way to increase it. You should break down your
code using callLater in order to give some CPU cycles to the player for
screen updates.

Thanks,
Gaurav

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Wednesday, April 16, 2008 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] A script has executed for longer than the default
timeout period of 15 seconds

I am getting this error. At this point of my development I am not ready 
to start optimazing code. Are there any options available to encrease 
that time?

Thanks




--
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





RE: [flexcoders] Re: Flex Compenents, how to make them talk

2008-04-16 Thread Gordon Smith
By the way, why are you wrapping your  and  components
inside es to put them into the ? This probably isn't
necessary. The children of a ViewStack must be some kind of Container,
and I'm guessing that Login and Register are subclasses of Container.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Wednesday, April 16, 2008 2:43 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Flex Compenents, how to make them talk

 

A click handler in Login's 

[flexcoders] A script has executed for longer than the default timeout period of 15 seconds

2008-04-16 Thread markgoldin_2000
I am getting this error. At this point of my development I am not ready 
to start optimazing code. Are there any options available to encrease 
that time?

Thanks



RE: [flexcoders] Re: Flex Compenents, how to make them talk

2008-04-16 Thread Gordon Smith
A click handler in Login's 

RE: [flexcoders] Click Lite: The right click now. But not now?

2008-04-16 Thread Gordon Smith
It works in MXML and not in AS3 because these are different languages
with different rules... one is declarative and one is procedural.

 

You obviously find the MXML syntax convenient... and that's why we
support it! But in a procedural language like AS3, when you pass Foo(2)
as a method parameter, it always means to evaluate the value Foo(2) and
pass that.

 

You can write either

 

btnFoo.addEventListener(MouseEvent.CLICK, Foo);

 

where Foo is a method that takes a single argument of type MouseEvent
and returns void

 

or use an anonymous function with the same signature

 

   btnFoo.addEventListener(MouseEvent.CLICK,
function(event:MouseEvent):void { ... });

 

As for wanting to pass an additional parameter to an event handler, this
simply isn't how the Flash Player works. When it calls your event
handler, it passes ONLY the event object that was passed to
dispatchEvent(). This may seem like a major restriction, but we had no
problem writing all the Flex components with this event model.

 

You can 

 

1. Access any data on the 'this' object if your event handler is a
method of a class.

2. Access any data on the event.target or event.currentTarget objects.

3. Put the data in the event object itself, either by subclassing or by
using DynamicEvent.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason The Saj
Sent: Wednesday, April 16, 2008 12:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Click Lite: The right click now. But not now?

 

Why does click work here?



But not here?

btnFoo.addEventListener(MouseEvent.CLICK,Foo(2));

Now, it's obviously Adobe has coded the button component to allow for
arguments to be passed via the click parameter. But we're not given
that same privilege when using just AS3.

But obviously, they must have already coded this functionality. I'd
rather not have to re-invent the horse. Any answers?

 



[flexcoders] Re: Flex Compenents, how to make them talk

2008-04-16 Thread timgerr
Lets say I have a Flex Component called test1.mxml and that 
component has a view stack. I then create another component called 
test2.mxml and I want to reference the view stack in test1.mxml, can 
I do that?

The problem is I want to change states so I have a component that is 
register.mxml and another one that says login.mxml.  So here I have 
a veiwStack on the main application for 


  









  



OK, so in the login.mxml I have a button that says register and when 
that is clicked I want to run this to change the state:
vsApp.selectedChild=vsScreenLogin.  I am unable to run this command 
from Login.mxml because login.mxml dosnt know about the main app.  
How can I pass information from a Flex component to the main 
application

Thanks for the help,
timgerr


--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> 
wrote:
>
> If you have
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> then in the Application's 

[flexcoders] Re: TabNavigator & scrollbar space - BUG ?

2008-04-16 Thread Ryan
I'm having the exact same problem. I have tried setting all my parent
objects to 100% height and also leaving the height out entirely. I
have no type of hard coded sizes in anything contained in the tab
navigator.

Thanks, 

Ryan 

--- In flexcoders@yahoogroups.com, "bobpardoe1959" <[EMAIL PROTECTED]> wrote:
>
> I have a TabNavigator and I add children to it in actionscript. Each
> child has its style set to top=2, bottom=2, left=2, right=2.
> 
> When displayed the tabnavigator has a 20ish pixel gap on bottom and on
> the right of the container area. Left and top are aligned correctly. 
> 
> It looks as if it is space reserved for scroll bars.
> 
> I have set the horizontalGap and verticalGap styles to be 0. I have
> turned off the horizontal and vertical scroll policies, but still it
> remains.
> 
> Is it me or is the Flex 3 measurement system less robust than Flex2 ?
> I seem to be having all sorts of issues relating to the runtime
> measurement of HBox and VBox components when sized by percent or styles.
> 
> Is anyone able explain what might be going on ?
> 
> Thanks
> 
> BOb
>




[flexcoders] Re: Intelligent ViewStack Children

2008-04-16 Thread joshuagatcke
this is amazing! no joke. 

Thanks Bruce!



[flexcoders] Re: Hide calendar for DateField

2008-04-16 Thread Oscar Cortes



Try something like this:



  The 'empty' skins will be applied to the internal downArrowButton in
the ComboBase class use for that calendar button.

   Regards,

Oscar

http://www.holaflex.com


--- In flexcoders@yahoogroups.com, "jack_freud" <[EMAIL PROTECTED]> wrote:
>
> I'm hoping to hide the icon as well, and reduce the size of the halo
> to just the size of the textbox area.
>
> Thanks
>
> --- In flexcoders@yahoogroups.com, "Alex Harui" aharui@ wrote:
> >
> > I would subclass, grab the "buttonDown" event at a high priority and
> > call stopImmediatePropagation
> >
> >
> >
> > 
> >
> > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of jack_freud
> > Sent: Wednesday, April 16, 2008 12:52 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Hide calendar for DateField
> >
> >
> >
> > Is it possible to hide the datefield's calendar? I couldn't find a
> > property. I tried hiding it with a little canvas but the halo to
> show
> > the control has focus extends off to the right where the icon for
> the
> > calendar is.
> >
> > Thanks!
> >
>




[flexcoders] mx.controls.Text control not autosizing -

2008-04-16 Thread Mike Anderson
Hello All,

I know there's been some discussion recently, regarding TextFields and
having them grow automatically around their content.  The TextInput and
TextArea Controls must be extended in order to get this type of
functionality - but what about the "Text" Control?

It's my understanding that the Text Control will automatically size
itself around it's content.  In my case, I am not using the
mx.controls.Text inside a MXML Component, it's being added as a Child
inside of a Custom UIComponent.

Per the Flex 3.0 Documentation: "If you leave both the
width and the height unspecified, Flex calculates them
based on any explicit line breaks in the text, with no
wordwrapping within lines."

Is there something that I'm missing regarding this control?

Thank you all in advance for any advice on this,

Mike


RE: [flexcoders] RegExp searching for [ and ], are they reserved? SOLVED

2008-04-16 Thread Gordon Smith
Ahah! I forgot that the RegExp escape character (i.e., backslash) is
also the AS3 String escape character and therefore requires double
escaping! That's really annoying, isn't it?

 

That's a good reason to use RegExp literal notation rather than a
pattern String passed to the constructor:

 

/abc/igm  <=> new RegExp("abc", "igm")

 

/\[abc\]/ <=> new RegExp("\\[abc\\]", "igm")

 

I didn't actually check that the second one is equivalent, but I'm
pretty sure it is.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Derrick Anderson
Sent: Wednesday, April 16, 2008 11:48 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] RegExp searching for [ and ], are they
reserved? SOLVED

 

i think i figured it out, the [ and ] characters have to be
double-escaped like so

new RegExp("\\[[^]*\\]","igm");

d.

On Wed, Apr 16, 2008 at 2:17 PM, Derrick Anderson
<[EMAIL PROTECTED]
 > wrote:

just bumping this one up there, it is critical for my app to do this and
I see no way past it.  anybody ever needed to find content with regex
that contained [] characters?

thanks,
d.

 

On Wed, Apr 16, 2008 at 10:01 AM, Derrick Anderson
<[EMAIL PROTECTED]
 > wrote:

hey i'm not a regex pro by far which is why i asked if my regex was
wrong- but taking your suggestion it still does not work- not sure why.
i've used the RegExr air app to test this and the simplest i can get it
is new RegExp("\[[^]*\]","igm");

this works when {} are used but not when [] is used, you can see in the
example below- it looks like escaping the [] is affecting the match
(although it works fine in the regex test tool).




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
















On Tue, Apr 15, 2008 at 4:33 PM, Gordon Smith <[EMAIL PROTECTED]
 > wrote:

I'm confused... why isn't your pattern something like "\[.*]\]" ? What's
going on with the ^ and the > ? What is supposed to match against
letters like E, m, p, l, etc.?

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com  ]
On Behalf Of Derrick Anderson
Sent: Tuesday, April 15, 2008 1:23 PM
To: flexcoders@yahoogroups.com  
Subject: Re: [flexcoders] RegExp searching for [ and ], are they
reserved?

 

i had tried escaping them, below i've pasted an example of my problem- 2
samples: 1 looking for [Employee First Name] and one looking for
{Employee First Name}  (curly braces vs square braces) and even though
the brackets are escaped, the regex with [ and ] only return the ending
].  do i have the regex wrong?


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
















On Tue, Apr 15, 2008 at 4:08 PM, Gordon Smith <[EMAIL PROTECTED]
 > wrote:

[ and ] are metacharacters in RegExp patterns. For example, "[abc]"
matches either "a", or 'b" or "c". To prevent this interpretation,
escape them with a backslash.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com  ]
On Behalf Of Derrick Anderson
Sent: Tuesday, April 15, 2008 12:49 PM
To: flexcoders@yahoogroups.com  
Subject: [flexcoders] RegExp searching for [ and ], are they reserved?

 

hey all,

i'm trying to do a replace on a string and replace anything in brackets
with something else.

so [this] word would get replaced, however in the regex tester at
gskinner this works fine (it's flex based regex test tool) but in my
local code- i always get unexpected results when my regex expression has
brackets in it.

private var mergeRE:RegExp = new RegExp("\[[^>]*?]","igm");

is there another escape character i need to use, why does flash have a
problem searching for [ and ] in regex?

thanks,
d.

 

 

 

 

 



[flexcoders] Sort - findItem - compareFunction prob

2008-04-16 Thread ibo
Hi I'm having problem with sorting, the compiler says :

error:

[mxmlc] C:\stephen\Main.mxml(51):  Error: Implicit coercion of a value of 
type Boolean to an unrelated type String.
[mxmlc] insertionIndex = sort.findItem(forAddition[i], Sort.
LAST_INDEX_MODE, true, compareTitles);
[mxmlc]

compiler documentation says:

* 1067
* Implicit coercion of a value of type _ to an unrelated type _.  
* You are attempting to cast an object to a type to which it cannot be 
converted. This can happen if the class you are casting to is not in the 
inheritance chain of the object being cast. This error appears only when the 
compiler is running in strict mode.

code:
--
private function compareTitles(itemA:MyObj, itemB:MyObj):int {
var valueA:String = itemA.title;
var valueB:String = itemB.title;
return ObjectUtil.stringCompare(valueA, valueB);
}
---
// forAddition is pre-sorted from the backend
var forAddition:ArrayCollection = ..some data..;

// Check insertion index to maintain sorting order
var sort:Sort = new Sort();
var insertionIndex:int = 0;

for (var i:int=0; i

[flexcoders] Re: Screenshot, someone?

2008-04-16 Thread jtgrassie
Hmm.

Take a look at Shu...

http://shu-player.com


--- In flexcoders@yahoogroups.com, "Oscar Cortes" <[EMAIL PROTECTED]> wrote:
>
> 
> 
>Look at the MapCache example in this page :
> http://labs.adobe.com/technologies/air/samples/
> 
> 
>I think it has that functionality
> 
>Regards,
> 
> Oscar
> 
> http://www.holaflex.com 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "peterflexcoder" 
> wrote:
> >
> >
> > I forget to tell that it is for a air application :(
> >
> >
> > --- In flexcoders@yahoogroups.com, "peterflexcoder" peterflexcoder@
> wrote:
> > >
> > > Hi All,
> > >
> > > i have a window and with a button i want to make a screenshot from
> that window
> > > How can i make that, or have someone a example
> > >
> > > Thanks in advance,
> > > Peter
> > >
> >
>




[flexcoders] Re: Flex Compenents, how to make them talk

2008-04-16 Thread timgerr
If I have 2 components, how can they share data?  If I want to 
reference somthing on the other component, how can I do that.

Thanks,
timgerr



[flexcoders] Re: Screenshot, someone?

2008-04-16 Thread Oscar Cortes


   Look at the MapCache example in this page :
http://labs.adobe.com/technologies/air/samples/


   I think it has that functionality

   Regards,

Oscar

http://www.holaflex.com 



--- In flexcoders@yahoogroups.com, "peterflexcoder" <[EMAIL PROTECTED]>
wrote:
>
>
> I forget to tell that it is for a air application :(
>
>
> --- In flexcoders@yahoogroups.com, "peterflexcoder" peterflexcoder@
wrote:
> >
> > Hi All,
> >
> > i have a window and with a button i want to make a screenshot from
that window
> > How can i make that, or have someone a example
> >
> > Thanks in advance,
> > Peter
> >
>




Re: [flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread Troy Gilbert
> Here's a gallery of the default cursors for Windows (IE & Firefox) for
>  the various CSS properties:

Yeah, I've seen that one and various others. But they're screen
captures from actual apps, and I don't know what the legal issues may
be (however minor).

For now, I just grabbed the ones Adobe provided (I just needed an
open/closed hand) in their Flex Interface Guidelines example, Pan and
Zoom.

BTW, does anyone at Adobe know where you guys got those from? Just
re-created them from a screen capture or similar?

Troy.


[flexcoders] Re: Screenshot, someone?

2008-04-16 Thread peterflexcoder

I forget to tell that it is for a air application :(


--- In flexcoders@yahoogroups.com, "peterflexcoder" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
> i have a window and with a button i want to make a screenshot from that window
> How can i make that, or have someone a example
> 
> Thanks in advance,
> Peter
>





[flexcoders] Screenshot, someone?

2008-04-16 Thread peterflexcoder
Hi All,

i have a window and with a button i want to make a screenshot from that window
How can i make that, or have someone a example

Thanks in advance,
Peter



[flexcoders] Re: BlazeDS/LCDS on Glassfish (TomcatLoginCommand issue)

2008-04-16 Thread cyberscriptnet
That worked! Thanks a lot!

I'll submit a patch of the tomcat valve to the BlazeDS project. It would be 
great to see 
Glassfish fully supported.

--- In flexcoders@yahoogroups.com, "meteatamel" <[EMAIL PROTECTED]> wrote:
>
> Instead of server="Glassfish", can you try server="all" and let us
> know if there's anything different?
> 
> thanks,
> Mete
> 
> --- In flexcoders@yahoogroups.com, "cyberscriptnet"  wrote:
> >
> > Hi,
> > 
> > I've been using BlazeDS/LCDS on Glassfish without issues until now.
> I'm attempting to 
> > enable custom authentication using TomcatLoginCommand
> > 
> > In order for Tomcat valves to work with Glassfish I had to make
> modifications to 
> > TomcatValve4150 described here:
> > http://wiki.glassfish.java.net/Wiki.jsp?page=FaqTomcatValveConversion
> > 
> > That compiled and deployed without problems, I even added logging
> code to verify the 
> > valve is executed each request.
> > 
> > My final issue is when I execute ro.setCredentials(u,p) I get the
> following error on the 
> > server:
> > "External login command required. Please check your security
> configuration."
> > 
> > I have also verified that TomcatLoginCommand.doAuthentication is not
> being executed.
> > 
> > My security configuration is:
> > 
> > 
> >  class="flex.messaging.security.TomcatLoginCommand" 
> > server="Glassfish"/>
> > 
> > Custom
> > 
> > salesPerson
> > 
> > 
> > 
> > 
> > Has anyone been able to get custom authentication working with
> Glassfish?
> > 
> > Thanks!
> > 
> > Ryan Campbell
> >
>





[flexcoders] Re: addEventListener and additional arguments?

2008-04-16 Thread ben.clinkinbeard
You probably don't need to send extra parameters anyways. You can
inspect the event.target your handler receives to determine which
button was clicked. (I am guessing that may be your intent in sending
extra args as I remember doing stuff like that back in the AS1 days.)
Suffice to say that any forking/special handling can/should be done in
the handler rather than the initiator.

HTH,
Ben


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> You can call it anything you want.  I call it strongly-typed languages
> and a good event model, and they prevent me from having mysterious
> hard-to-find errors because I mistyped a variable name, and allow me to
> hook up more than one handler to the event.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason The Saj
> Sent: Wednesday, April 16, 2008 11:54 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: addEventListener and additional arguments?
> 
>  
> 
> Okay then
> 
> How do I do the simple act of "click" event call function and pass a
> parameter value?
> 
> This was easy in AS1/AS2/JS
> 
> I could essentially just say...
> 
> btnFoo.release = function (parameters){...}
> 
> Now, it looks like i need to add an event listener. Then create a
> custom event. All so I can pass a number to a function call. 
> 
> Um...can we say asinine?
> 
> ***
> 
> Please, some one show me a nice easy way.
>




[flexcoders] Re: Well, that does me absolutely no good....unless you can show me how to do th

2008-04-16 Thread valdhor
This doesn't appear to be documented anywhere (Well, I can't find it)
but this works:


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









--- In flexcoders@yahoogroups.com, "Jason The Saj" <[EMAIL PROTECTED]> wrote:
>
> 
> http://www.adobe.com/2006/mxml";>
>  
> 
> 
>  
>  
> 
> 
> 
> 
> 
>




RE: [flexcoders] other ways to read html content inside flex

2008-04-16 Thread Alex Harui
The TextField does some limited HTML.  There is a third-party that can
render HTML in AS.  I've posted a prototype that does something like
that on my blog (blogs.adobe.com)

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gustavo Duenas
Sent: Wednesday, April 16, 2008 11:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] other ways to read html content inside flex

 


Hi Coders.

There is other pro! ven method to read html content rather than
i-frames?

I couldn't find my way there something in the code th! at I 've just
don't get it, so I know there should be other way to do this.

any ideas?

 

Regards

 

 

Gus tavo




 

 





 

 



RE: [flexcoders] Re: addEventListener and additional arguments?

2008-04-16 Thread Alex Harui
You can call it anything you want.  I call it strongly-typed languages
and a good event model, and they prevent me from having mysterious
hard-to-find errors because I mistyped a variable name, and allow me to
hook up more than one handler to the event.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason The Saj
Sent: Wednesday, April 16, 2008 11:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: addEventListener and additional arguments?

 

Okay then

How do I do the simple act of "click" event call function and pass a
parameter value?

This was easy in AS1/AS2/JS

I could essentially just say...

btnFoo.release = function (parameters){...}

Now, it looks like i need to add an event listener. Then create a
custom event. All so I can pass a number to a function call. 

Um...can we say asinine?

***

Please, some one show me a nice easy way. 

 



RE: [flexcoders] Well, that does me absolutely no good....unless you can show me how to do this!

2008-04-16 Thread Alex Harui
That should generate a compile error since there is no .width property
on foo (because it is an int).

 

I'm guessing you really wanted:

 

private function clickHandler(event:MouseEvent,arg1):void
{
trace(event.target);
DisplayObject(event.target).width = DisplayObject(event.target).width *
arg1;

}



 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason The Saj
Sent: Wednesday, April 16, 2008 11:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Well, that does me absolutely no goodunless
you can show me how to do this!

 


http://www.adobe.com/2006/mxml
 ">











 



[flexcoders] Re: Hide calendar for DateField

2008-04-16 Thread jack_freud
I'm hoping to hide the icon as well, and reduce the size of the halo 
to just the size of the textbox area.

Thanks

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I would subclass, grab the "buttonDown" event at a high priority and
> call stopImmediatePropagation
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of jack_freud
> Sent: Wednesday, April 16, 2008 12:52 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Hide calendar for DateField
> 
>  
> 
> Is it possible to hide the datefield's calendar? I couldn't find a 
> property. I tried hiding it with a little canvas but the halo to 
show 
> the control has focus extends off to the right where the icon for 
the 
> calendar is.
> 
> Thanks!
>




RE: [flexcoders] Click Lite: The right click now. But not now?

2008-04-16 Thread Alex Harui
In MXML, click="Foo(2)" really generates the following code:

 

private function btnFoo_clickHandler(event:MouseEvent):void

{

Foo(2);

}

btnFoo.addEventListener(MouseEvent.CLICK, btnFoo_clickHandler);

 

What you tried to do in AS was set the listener to be the result of a
call to Foo(2)

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason The Saj
Sent: Wednesday, April 16, 2008 12:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Click Lite: The right click now. But not now?

 

Why does click work here?



But not here?

btnFoo.addEventListener(MouseEvent.CLICK,Foo(2));

Now, it's obviously Adobe has coded the button component to allow for
arguments to be passed via the click parameter. But we're not given
that same privilege when using just AS3.

But obviously, they must have already coded this functionality. I'd
rather not have to re-invent the horse. Any answers?

 



[flexcoders] Re: BlazeDS/LCDS on Glassfish (TomcatLoginCommand issue)

2008-04-16 Thread meteatamel
Instead of server="Glassfish", can you try server="all" and let us
know if there's anything different?

thanks,
Mete

--- In flexcoders@yahoogroups.com, "cyberscriptnet" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I've been using BlazeDS/LCDS on Glassfish without issues until now.
I'm attempting to 
> enable custom authentication using TomcatLoginCommand
> 
> In order for Tomcat valves to work with Glassfish I had to make
modifications to 
> TomcatValve4150 described here:
> http://wiki.glassfish.java.net/Wiki.jsp?page=FaqTomcatValveConversion
> 
> That compiled and deployed without problems, I even added logging
code to verify the 
> valve is executed each request.
> 
> My final issue is when I execute ro.setCredentials(u,p) I get the
following error on the 
> server:
> "External login command required. Please check your security
configuration."
> 
> I have also verified that TomcatLoginCommand.doAuthentication is not
being executed.
> 
> My security configuration is:
> 
> 
>  server="Glassfish"/>
> 
>   Custom
> 
> salesPerson
> 
> 
> 
> 
> Has anyone been able to get custom authentication working with
Glassfish?
> 
> Thanks!
> 
> Ryan Campbell
>




RE: [flexcoders] Hide calendar for DateField

2008-04-16 Thread Alex Harui
I would subclass, grab the "buttonDown" event at a high priority and
call stopImmediatePropagation

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jack_freud
Sent: Wednesday, April 16, 2008 12:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Hide calendar for DateField

 

Is it possible to hide the datefield's calendar? I couldn't find a 
property. I tried hiding it with a little canvas but the halo to show 
the control has focus extends off to the right where the icon for the 
calendar is.

Thanks!

 



[flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread dave_defusion
Here's a gallery of the default cursors for Windows (IE & Firefox) for
the various CSS properties:

http://webdesign.about.com/od/styleproperties/ig/CSS-Cursors-Gallery/


--- In flexcoders@yahoogroups.com, "dave_defusion" <[EMAIL PROTECTED]>
wrote:
>
> Yeah it'd be nice if we could get hold of them and then maybe we could 
> put together a cross browser/cross OS facade for using the default
> custom cursors that are defined in CSS 2 - at least that way they
> wouldn't stand out too much.
> 
> --- In flexcoders@yahoogroups.com, "Troy Gilbert" 
> wrote:
> >
> > >  On that thought I was just wondering if it was possible to use the
> > >  ExternalInterface to do this? By maybe setting a classname on the
> > >  Flash object via JavaScript... hm
> > 
> > Already tried that (there's another thread where I raise this issue).
> > The Flash Player dictates it's own cursor and CSS doesn't seem to
> > apply. I thought it was a brilliant idea for a hack, though!
> > 
> > I was wondering if anyone knew of an "official" source of browser
> > cursors, say what Firefox uses across platforms (though they just may
> > be the native equivalents). CSS references always contain example
> > images, but I'm unsure about just snagging those for legal reasons.
> > Googling didn't really provide anything useful.
> > 
> > Troy.
> >
>




[flexcoders] question about working with SessionIDs and FDS

2008-04-16 Thread Body Works Studio
Hello all.

we are still using fds.swc in our with current customer installs. One
customer needs us to use sessionIDs on server calls. We have updated
all the remoteObject calls, but I am having issues with the
DataServices.fill command. is there a way to dynamically insert the
server's sessionID into the fill command?

Currently we keep the sessionID inside a userSession object which is
bound to the modelLocator for easy access. 

Any advice would be a big help.

thanks

Jeff



[flexcoders] Hi there,

2008-04-16 Thread Jason The Saj
I dealt with this issue on my blog pretty extensively..

http://thesaj.wordpress.com/2008/02/12/the-nightmare-that-is-_blank-part-ii-help/

Here is an example of what I implemented for the browsers I was
testing for (IE, Firefox, Safari, Opera on PC/Mac)
http://www.easternstorm.net/sassie/example2/example2-swfobject2.html

Note - in my personal usage, I broke up the example into two classes.
One for browser detection and one for _blank issues.

Note, there are a few caveats:
> allowScriptAccess needs to be set to "always"
> wmode needs to be set to either "transparent" or "opaque"

- Jason




[flexcoders] Hide calendar for DateField

2008-04-16 Thread jack_freud
Is it possible to hide the datefield's calendar? I couldn't find a 
property. I tried hiding it with a little canvas but the halo to show 
the control has focus extends off to the right where the icon for the 
calendar is.

Thanks!



[flexcoders] BlazeDS/LCDS on Glassfish (TomcatLoginCommand issue)

2008-04-16 Thread cyberscriptnet
Hi,

I've been using BlazeDS/LCDS on Glassfish without issues until now. I'm 
attempting to 
enable custom authentication using TomcatLoginCommand

In order for Tomcat valves to work with Glassfish I had to make modifications 
to 
TomcatValve4150 described here:
http://wiki.glassfish.java.net/Wiki.jsp?page=FaqTomcatValveConversion

That compiled and deployed without problems, I even added logging code to 
verify the 
valve is executed each request.

My final issue is when I execute ro.setCredentials(u,p) I get the following 
error on the 
server:
"External login command required. Please check your security configuration."

I have also verified that TomcatLoginCommand.doAuthentication is not being 
executed.

My security configuration is:




Custom

salesPerson




Has anyone been able to get custom authentication working with Glassfish?

Thanks!

Ryan Campbell



[flexcoders] Redirects and popup blockers

2008-04-16 Thread thirtyfivemph
I've been wrestling with this and can't find a solution that seems to
work as consistently as what others have found...

I've got an embeddable version of my app (think YouTube video) and
want the user to be able to click on a button in the app and be sent
to our site (just like they clicked on a link on a webpage). I don't
care if it pops up a new window (target="_blank") or replaces the
current (target="_top").

My problem is that whichever I choose seems to trigger the popup
blocker in different situations on different browsers. Is there a good
universal way to give the user a link inside of Flex that functions
equivalently (when clicked) to a link on the surrounding webpage?

Troy.




Re: [flexcoders] Passing query vars to debug url?

2008-04-16 Thread Troy Gilbert
> Go menu, Run, Run, Other.  Select the app you want to work with. Uncheck
> "UseDefault", and add your parameters to the Debug line.  Apply, then debug.

I remembered that dialog right after I posted... and made the changes
exactly as you described. Thanks.

> I would like a way to have multiple startup configurations for the same app,
> but have not found how to do that.  Maybe creating a wrapper for each
> configuration would wok.

You can do that, actually... when I ran across this dialog previously
I had unintentionally created some additional debug configurations...
can't remember how I did it, but there should be somewhere in the UI
that you can add a new configuration (and it then appears in the list
along-side each app).

Troy.


[flexcoders] Click Lite: The right click now. But not now?

2008-04-16 Thread Jason The Saj
Why does click work here?




But not here?

btnFoo.addEventListener(MouseEvent.CLICK,Foo(2));

Now, it's obviously Adobe has coded the button component to allow for
arguments to be passed via the click parameter.  But we're not given
that same privilege when using just AS3.

But obviously, they must have already coded this functionality. I'd
rather not have to re-invent the horse. Any answers?



[flexcoders] Well, that does me absolutely no good....unless you can show me how to do this!

2008-04-16 Thread Jason The Saj

http://www.adobe.com/2006/mxml";>
 


 
 








[flexcoders] Re: addEventListener and additional arguments?

2008-04-16 Thread Jason The Saj
Okay then

How do I do the simple act of "click" event call function and pass a
parameter value?

This was easy in AS1/AS2/JS

I could essentially just say...

btnFoo.release = function (parameters){...}


Now, it looks like i need to add an event listener. Then create a
custom event. All so I can pass a number to a function call. 

Um...can we say asinine?

***

Please, some one show me a nice easy way. 




Re: [flexcoders] RegExp searching for [ and ], are they reserved? SOLVED

2008-04-16 Thread Derrick Anderson
i think i figured it out, the [ and ] characters have to be double-escaped
like so

new RegExp("\\[[^]*\\]","igm");

d.

On Wed, Apr 16, 2008 at 2:17 PM, Derrick Anderson <
[EMAIL PROTECTED]> wrote:

> just bumping this one up there, it is critical for my app to do this and I
> see no way past it.  anybody ever needed to find content with regex that
> contained [] characters?
>
> thanks,
> d.
>
>
> On Wed, Apr 16, 2008 at 10:01 AM, Derrick Anderson <
> [EMAIL PROTECTED]> wrote:
>
> > hey i'm not a regex pro by far which is why i asked if my regex was
> > wrong- but taking your suggestion it still does not work- not sure why.
> > i've used the RegExr air app to test this and the simplest i can get it is
> > new RegExp("\[[^]*\]","igm");
> >
> > this works when {} are used but not when [] is used, you can see in the
> > example below- it looks like escaping the [] is affecting the match
> > (although it works fine in the regex test tool).
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute">
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > />
> > 
> > 
> >
> > On Tue, Apr 15, 2008 at 4:33 PM, Gordon Smith <[EMAIL PROTECTED]> wrote:
> >
> > >I'm confused... why isn't your pattern something like "\[.*]\]" ?
> > > What's going on with the ^ and the > ? What is supposed to match against
> > > letters like E, m, p, l, etc.?
> > >
> > >
> > >
> > > Gordon Smith
> > >
> > > Adobe Flex SDK Team
> > >
> > >
> > >  --
> > >
> > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
> > > *On Behalf Of *Derrick Anderson
> > > *Sent:* Tuesday, April 15, 2008 1:23 PM
> > > *To:* flexcoders@yahoogroups.com
> > > *Subject:* Re: [flexcoders] RegExp searching for [ and ], are they
> > > reserved?
> > >
> > >
> > >
> > > i had tried escaping them, below i've pasted an example of my problem-
> > > 2 samples: 1 looking for [Employee First Name] and one looking for 
> > > {Employee
> > > First Name}  (curly braces vs square braces) and even though the brackets
> > > are escaped, the regex with [ and ] only return the ending ].  do i have 
> > > the
> > > regex wrong?
> > >
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute">
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > On Tue, Apr 15, 2008 at 4:08 PM, Gordon Smith <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > [ and ] are metacharacters in RegExp patterns. For example, "[abc]"
> > > matches either "a", or 'b" or "c". To prevent this interpretation, escape
> > > them with a backslash.
> > >
> > >
> > >
> > > Gordon Smith
> > >
> > > Adobe Flex SDK Team
> > >
> > >
> > >  --
> > >
> > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
> > > *On Behalf Of *Derrick Anderson
> > > *Sent:* Tuesday, April 15, 2008 12:49 PM
> > > *To:* flexcoders@yahoogroups.com
> > > *Subject:* [flexcoders] RegExp searching for [ and ], are they
> > > reserved?
> > >
> > >
> > >
> > > hey all,
> > >
> > > i'm trying to do a replace on a string and replace anything in
> > > brackets with something else.
> > >
> > > so [this] word would get replaced, however in the regex tester at
> > > gskinner this works fine (it's flex based regex test tool) but in my local
> > > code- i always get unexpected results when my regex expression has 
> > > brackets
> > > in it.
> > >
> > > private var mergeRE:RegExp = new RegExp("\[[^>]*?]","igm");
> > >
> > > is there another escape character i need to use, why does flash have a
> > > problem searching for [ and ] in regex?
> > >
> > > thanks,
> > > d.
> > >
> > >
> > >
> > >  
> > >
> >
> >
>


RE: [flexcoders] Passing query vars to debug url?

2008-04-16 Thread Tracy Spratt
Go menu, Run, Run, Other.  Select the app you want to work with. Uncheck
"UseDefault", and add your parameters to the Debug line.  Apply, then
debug.

 

I would like a way to have multiple startup configurations for the same
app, but have not found how to do that.  Maybe creating a wrapper for
each configuration would wok.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thirtyfivemph
Sent: Wednesday, April 16, 2008 1:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Passing query vars to debug url?

 

Is there a way to specify some query-vars to be passed into the URL
I'm debugging inside of Flex Builder?

Right now, I click debug and get this URL in the browser:

http://localhost/app.swf&debug=true
 

I'd like it to be this:

http://localhost/app.swf&debug=true&id=35
 

If I just type that in, the debugger detaches (because the page
reloads), etc...

Surely this is possible...?

Troy.

 



[flexcoders] other ways to read html content inside flex

2008-04-16 Thread Gustavo Duenas


Hi Coders.
There is other proven method to read html content rather than i-frames?
I couldn't find my way there something in the code that I 've just  
don't get it, so I know there should be other way to do this.

any ideas?

Regards


Gustavo







RE: [flexcoders] Re: AIR: Forcing a file to be opened By OS Default Application

2008-04-16 Thread Battershall, Jeff
Understandably Adobe is feeling rather conservative about this sort of
thing.  The last thing we as developers would want is an abuse of the
AIR runtime which sullies its reputation.  So we're getting a certain
sandbox to play in.  

However, opening a document file such as a word doc, pdf or excel
spreadsheet is a normal every day activity.  The OS and the user already
have responsibility to ensure that they are not accessing malicious
content. IMO, letting AIR have a somewhat larger sandbox by passing to
the OS a request to open files would be a huge step forward and make the
user experience significantly better.

For example, the AIR application I just built downloads data
entitlements to a user's machine.  Once downloaded, the user needs to
navigate to that directory using the OS to open the files.  It would be
nice to not requre all that additional work on the part of the user.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of aphexyuri
Sent: Wednesday, April 16, 2008 12:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR: Forcing a file to be opened By OS Default
Application


Jeff,
We've been looking into it as well. Maybe the following links could give
you some more help:
http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integra
tion-proof-of-concept/

and

http://www.mikechambers.com/blog/2008/01/22/commandproxy-its-cool-but-is
-it-a-good-idea/

It's a long shot & a workaround...something adobe really needs to
address soon!

--- In flexcoders@yahoogroups.com, "Battershall, Jeff"
<[EMAIL PROTECTED]> wrote:
>
> Steve,
> 
> In the scenario I'm envisioning, I am not thinking that AIR would be 
> starting the program itself but the OS would, as it would in response 
> to a double click on a file name in Windows Explorer. But if it can't 
> be done, it can't be done.
> 
> Jeff
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> On Behalf Of Cutter (Flex Related)
> Sent: Wednesday, April 16, 2008 10:32 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] AIR: Forcing a file to be opened By OS 
> Default Application
> 
> 
> According to a talk that Ben Forta gave here in Nashville, not long
> before product launch, the AIR sandbox strictly prohibits access to 
> other programs on a system.
> 
> Steve "Cutter" Blades
> Adobe Certified Professional
> Advanced Macromedia ColdFusion MX 7 Developer 
> _ http://blog.cutterscrossing.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
>





--
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





RE: [flexcoders] Calling http services in separate file

2008-04-16 Thread Tracy Spratt
Implement this as data model, using a bindable singleton.  Keep the
result data in that object.

 

Implement public properties and methods to control the functionality.
Bind the UI to the model's properties.

 

I just used this technique for the first time myself, and it rocks.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ghus32
Sent: Wednesday, April 16, 2008 12:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Calling http services in separate file

 

Hello Everyone,

I want to clean up my code and put all of my http services in a 
separate mxml file..

how would I call these at runtime??

Thanks

 



Re: [flexcoders] RegExp searching for [ and ], are they reserved?

2008-04-16 Thread Derrick Anderson
just bumping this one up there, it is critical for my app to do this and I
see no way past it.  anybody ever needed to find content with regex that
contained [] characters?

thanks,
d.

On Wed, Apr 16, 2008 at 10:01 AM, Derrick Anderson <
[EMAIL PROTECTED]> wrote:

> hey i'm not a regex pro by far which is why i asked if my regex was wrong-
> but taking your suggestion it still does not work- not sure why.  i've used
> the RegExr air app to test this and the simplest i can get it is new
> RegExp("\[[^]*\]","igm");
>
> this works when {} are used but not when [] is used, you can see in the
> example below- it looks like escaping the [] is affecting the match
> (although it works fine in the regex test tool).
>
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute">
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
>  />
>  />
> 
> 
>
> On Tue, Apr 15, 2008 at 4:33 PM, Gordon Smith <[EMAIL PROTECTED]> wrote:
>
> >I'm confused... why isn't your pattern something like "\[.*]\]" ?
> > What's going on with the ^ and the > ? What is supposed to match against
> > letters like E, m, p, l, etc.?
> >
> >
> >
> > Gordon Smith
> >
> > Adobe Flex SDK Team
> >
> >
> >  --
> >
> > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Derrick Anderson
> > *Sent:* Tuesday, April 15, 2008 1:23 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* Re: [flexcoders] RegExp searching for [ and ], are they
> > reserved?
> >
> >
> >
> > i had tried escaping them, below i've pasted an example of my problem- 2
> > samples: 1 looking for [Employee First Name] and one looking for {Employee
> > First Name}  (curly braces vs square braces) and even though the brackets
> > are escaped, the regex with [ and ] only return the ending ].  do i have the
> > regex wrong?
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute">
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > />
> > 
> > 
> >
> > On Tue, Apr 15, 2008 at 4:08 PM, Gordon Smith <[EMAIL PROTECTED]> wrote:
> >
> > [ and ] are metacharacters in RegExp patterns. For example, "[abc]"
> > matches either "a", or 'b" or "c". To prevent this interpretation, escape
> > them with a backslash.
> >
> >
> >
> > Gordon Smith
> >
> > Adobe Flex SDK Team
> >
> >
> >  --
> >
> > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Derrick Anderson
> > *Sent:* Tuesday, April 15, 2008 12:49 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] RegExp searching for [ and ], are they reserved?
> >
> >
> >
> > hey all,
> >
> > i'm trying to do a replace on a string and replace anything in brackets
> > with something else.
> >
> > so [this] word would get replaced, however in the regex tester at
> > gskinner this works fine (it's flex based regex test tool) but in my local
> > code- i always get unexpected results when my regex expression has brackets
> > in it.
> >
> > private var mergeRE:RegExp = new RegExp("\[[^>]*?]","igm");
> >
> > is there another escape character i need to use, why does flash have a
> > problem searching for [ and ] in regex?
> >
> > thanks,
> > d.
> >
> >
> >
> >  
> >
>
>


[flexcoders] Re: Custom Cursors causing slowdown

2008-04-16 Thread dave_defusion
Yeah it'd be nice if we could get hold of them and then maybe we could 
put together a cross browser/cross OS facade for using the default
custom cursors that are defined in CSS 2 - at least that way they
wouldn't stand out too much.

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> >  On that thought I was just wondering if it was possible to use the
> >  ExternalInterface to do this? By maybe setting a classname on the
> >  Flash object via JavaScript... hm
> 
> Already tried that (there's another thread where I raise this issue).
> The Flash Player dictates it's own cursor and CSS doesn't seem to
> apply. I thought it was a brilliant idea for a hack, though!
> 
> I was wondering if anyone knew of an "official" source of browser
> cursors, say what Firefox uses across platforms (though they just may
> be the native equivalents). CSS references always contain example
> images, but I'm unsure about just snagging those for legal reasons.
> Googling didn't really provide anything useful.
> 
> Troy.
>




Re: [flexcoders] Collections with common source

2008-04-16 Thread Richard Rodseth
Thanks.

I also have a couple of cases involving stacked column series, where I
wonder if I should build a custom implementation of IList or
ICollectionView.

eg. the raw data has an integer (representing an enum). There is a
column series for each enum value.

I can either use the filter technique to make a data provider
corresponding to  each value of the enum. Or I can have a single
custom collection which returns an object with a property for each
value of the enum, and use yField. Any experience reports on the
relative efficiency of these two approaches would be much appreciated.

I find myself wishing collections supported a mapper function in
addition to a filter function.

On Wed, Apr 16, 2008 at 10:42 AM, Daniel Gold <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> I've used that approach many times. Store the data in a central model, views
> each have a local ArrayCollection with a filterFunction and the source set
> to the data in the model.
>
>
>
> On Wed, Apr 16, 2008 at 12:37 PM, Richard Rodseth <[EMAIL PROTECTED]>
> wrote:
>
> >
> >
> >
> >
> >
> >
> > Hi
> >
> > I'm working on a dashboard where several charts share common data. I
> > was thinking that each chart series could have a data provider which
> > is a collection with a filter function, and I could set the source
> > array of these collections to the same array. Sound reasonable?
> >
> > Thanks
> >
>
>  


[flexcoders] Re: PopUpButton issue

2008-04-16 Thread handitan
Doing it on "addedToStage" event somehow doesn't work well for my 
app. My app kept on crashing due to a null popUp.

Instead of doing it on "addedToStage", I did in "removedFromStage" 
event.
This prevents the crashing problem completely.

Waiting for Flex3 HotFix.

--- In flexcoders@yahoogroups.com, Scott Melby <[EMAIL PROTECTED]> wrote:
>
> I have a PopUpButton on which I am setting a Menu as the popUp 
> property.  I have found that the popUp attribute is being nulled 
when 
> the PopUpButton is removed from the stage... which causes my button 
to 
> not function properly when added back to the stage.  I traced the 
issue 
> to the following code in PopUpButton.as which appears to be 
incorrect.  
> In this code the _popUp member (backing for the popUp setters and 
> getters) is nulled.
> 
> private function removedFromStageHandler(event:Event):void
> {
> // Ensure we've unregistered ourselves from PopupManager, 
else
> // we'll be leaked.
> if (_popUp) {
> PopUpManager.removePopUp(_popUp);
> _popUp = null;
> }
> }
> 
> To workaround this issue I had to listen for the addedToStage event 
in 
> my view that uses this component and re-set the popUp property each 
time 
> as follows.
> 
> /**
>  * Called each time this view is added to the stage.  
We 
> need this to work
>  * around an issue where the PopUpButton has a null 
popUp
>  * property each time it has been removed from the 
stage.
>  */
> public function handleAddedToStage():void{
>if(this.createButton != null && this._buttonMenu != 
null){
>   this.createButton.popUp = _buttonMenu;
>}
> }
> 
> 
> Has anybody else seen this?  Can somebody please let me know if 
this is 
> a bug in the toolkit?  The workaround works fine... but seems like 
it 
> should not be necessary.
> 
> Thanks
> Scott
> 
> -- 
> Scott Melby
> Founder, Fast Lane Software LLC
> http://www.fastlanesw.com
>




Re: [flexcoders] Dynamically Resizing

2008-04-16 Thread Clint Tredway
use percentWidth and percentHieght

On Wed, Apr 16, 2008 at 12:46 PM, meltonianweb <[EMAIL PROTECTED]> wrote:

>   Greetings,
> I'm new to flex coding and what I'm trying to do with my current
> project is automatically resize panes (canvases?) by mouse actions
> like mouseover. I need to use percentages because I want the total
> width to be 100% regardless of the browser size. I've written an
> actionscript module and I'm trying to use ObjectName.width, but it
> only takes a number as an argument. This is probably a silly question
> and the answer is probably easy.
> Thanks a bunch for all your help.
> Mel
>
>  
>



-- 
http://grumpee.instantspot.com/blog


[flexcoders] Re: with itemRenderer

2008-04-16 Thread Tracy Spratt
If you use the default code, you are stuck with the default behavior.

But go on and implement the handlers yourself.  It is really pretty 
easy once you get the hang of it, and you have complete control over 
what happens and when, and how it looks. I just did this a few days 
ago.

There are good examples in the docs.  Below is one of my handlers as 
an example.
Tracy

  private function onDragOverProjContacts(event:DragEvent):void {
if (event.dragSource.hasFormat("items")) {
  event.preventDefault();
  var dgDragInit:DataGrid = DataGrid(event.dragInitiator);
  if (dgDragInit.id == "dgProjUsers")  { 
DragManager.showFeedback(DragManager.MOVE);
DragManager.acceptDragDrop(DataGrid
(event.currentTarget));
  }
  else if (dgDragInit.id == "dgSiteContacts")  {  //ADD from 
site contacts
if (noDuplicate(event.dragSource))  {
  DragManager.showFeedback(DragManager.COPY);
  DragManager.acceptDragDrop(DataGrid(event.currentTarget));
}
else {
  DragManager.showFeedback(DragManager.NONE); 
}  
  }
} 
  }//onDragOverProjContacts 



[flexcoders] Dynamically Resizing

2008-04-16 Thread meltonianweb
Greetings,
I'm new to flex coding and what I'm trying to do with my current
project is automatically resize panes (canvases?) by mouse actions
like mouseover. I need to use percentages because I want the total
width to be 100% regardless of the browser size. I've written an
actionscript module and I'm trying to use ObjectName.width, but it
only takes a number as an argument. This is probably a silly question
and the answer is probably easy.
Thanks a bunch for all your help.
Mel



Re: [flexcoders] Re: with itemRenderer

2008-04-16 Thread Derrick Anderson
check out this post

http://blog.flexmonkeypatches.com/2008/03/24/nested-item-renderers-with-scrollbars-and-drag-and-drop-enabled-scroll-dont-drag-please/

it describes a similar problem and i think it might help with what you are
trying to do.  the idea is to use stopImmediatePropogation() to not trigger
the drag of the main list from the item renderer.

d.

On Wed, Apr 16, 2008 at 1:22 PM, tchredeemed <[EMAIL PROTECTED]> wrote:

>   problem is that im not implementing the drag, the List is
>
>
> --- In flexcoders@yahoogroups.com , "Douglas
> Knudsen" <[EMAIL PROTECTED]> wrote:
> >
> > try capturing whether a drag can occur based on a mouseOver maybe. eg,
> > onMouserOver set canDrag = true if NOT over the footer. Then in your
> drag
> > handler check this to see if drag is allowed or not. This technique I
> use
> > usually to make sure the user clicks on the actual object to be dragged,
> but
> > not outside the object.
> >
> > DK
> >
> > On Wed, Apr 16, 2008 at 9:43 AM, tchredeemed <[EMAIL PROTECTED]> wrote:
> >
> > > any ideas?
> > >
> > >
> > > --- In flexcoders@yahoogroups.com 
> > >  40yahoogroups.com>,
> > > "tchredeemed"  wrote:
> > > >
> > > > I have a list that has an itemRenderer.
> > > >
> > > > The footer of the itemRenderer can be dragged up or down in order to
> > > show/hide data.
> > > >
> > > > I want to be able to drag that without triggering the dragHandler
> for
> > > the list.
> > > >
> > > > In other words, I want to be able to drag an item from anywhere
> except
> > > the footer to move
> > > it
> > > > inside the list, but if i drag from the footer, i do not want it to
> > > trigger.
> > > >
> > > > Any ideaS?
> > > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > Douglas Knudsen
> > http://www.cubicleman.com
> > this is my signature, like it?
> >
>
>  
>


Re: [flexcoders] A Question about Cairngorm?

2008-04-16 Thread Rich Rodecker
It's really just a few steps:

   1. Have your commands implement mx.rpc.IResponder, and define result
   and fault methods in the command.
   2. Call the service directly from the execute() method of the command.
   3. When you call the service, it returns an ASyncToken, and you can
   set the Command to act as the responder by setting token.addResponder(this).

So your command class will look something like this:

import mx.rpc.AsyncToken;

import mx.rpc.IResponder;


 public class InitAppCommand implements ICommand, IResponder

{

public function InitAppCommand(event:CairngormEvent)

{

 }


 public function execute(event:CairngormEvent):void

{

 var service:* = ServiceLocator.getInstance().getRemoteObject( "myService" )
;

 var token:AsyncToken = service.someMethod();

token.addResponder(this);

 }

 public function result(data:Object):void

{

}

 public function fault(info:Object):void

{

}

 }


On Wed, Apr 16, 2008 at 10:33 AM, markflex2007 <[EMAIL PROTECTED]>
wrote:

>   Hi,
>
> I work with Cairngorm for couple months. I use delegate to connect
> with Server and use command to get the data from delegate. Now the
> delegate file and command file are separate files.
>
> Somebody told me I can combine delegate with command so I do not need
> to build so many file.
>
> Do you know some demo online to do this? so I see how to do this.
>
> Thanks for your help.
>
> Mark
>
>  
>


[flexcoders] Re: Flex Compenents, how to make them talk

2008-04-16 Thread Tracy Spratt
Below is a discussion of inter-component communication.  I never 
polished it up, but it will be some value anyway.

Tracy

Communicating between Components:

Note: for "loose coupling" use events.  But that is another topic.
A non-trivial flex application is "component" based. While all of the 
built-in controls are components, the question of communicating 
between components most often arises when you are using a custom 
component. A custom component, whether implemented in mxml or 
ActionScript, has its own "scope". Within that component (Application 
is a component too!), all sibling child controls share the same 
scope, so you can refer to controls by their id.  If the controls
(components) have public properties or methods, you can reference 
those members directly through the id:



Ok, so far, its a "duh" right?

When you use custom components in a Flex app, at run time they make a 
document object model hierarchy (DOM).  Each subcomponent has its own 
scope and code within that component can't *directly* reference the 
member properties or methods of its sibling subcomponents.

So again, within a component, code can reference children  directly, 
as in the example above.  But there are two other cases inherent in a 
hierarchy.  You might want to reference "up", to get to public 
members of the parent, grandparent, etc, or 'down", to get to 
a "grandchild".

Accessing members in the parent:
On an ordinary component DOM, you can reference the parent component 
using the .parent property.  Say that a control with id="textinput1" 
exists in the parent of the current component.  then you could do:


Accessing members in the main application:
Components can be nested, sometimes very deeply.  If the reference 
you want is all the way at the top-level, main application (the one 
with the  tag), you could do 
{parent.parent.parent.textinput1.text}, but you would have to count 
the component levels just right.  Instead, you can use 
Application.application to get to that scope:

You can shoretn this style of reference by importing 
mx.core.Application, and assigning Application.application to a 
variable, like _app, the doing (_app.textinput1.text)

Accessing components of a child component ("grandchildren"):
Say that in this case, a child component has the TextInput control 
you want to reference.  First, make sure the child component has an 
id:

Then, in the same scope (the same component/file that 
contains "mycc1" above) you can say:


Accessing a nested component:
As mentioned above you can go "up" the hierarchy 
using "parent.parent...".  You can also go "down" the hirearchy using 
id references:


Additional notes:
If you are using SWFLoader to load an entire Application, you can 
reference the immediate parent application using "parentDocument".  
You can also use Application.application to reach the main app, as 
shown above.

Accessing members of an application loaded by SWFLoader is a bit more 
complicated.  See the example here:
http://www.cflex.net/showFileDetails.cfm?ObjectID=690




Re: [flexcoders] Collections with common source

2008-04-16 Thread Daniel Gold
I've used that approach many times. Store the data in a central model, views
each have a local ArrayCollection with a filterFunction and the source set
to the data in the model.

On Wed, Apr 16, 2008 at 12:37 PM, Richard Rodseth <[EMAIL PROTECTED]>
wrote:

>   Hi
>
> I'm working on a dashboard where several charts share common data. I
> was thinking that each chart series could have a data provider which
> is a collection with a filter function, and I could set the source
> array of these collections to the same array. Sound reasonable?
>
> Thanks
>  
>


[flexcoders] Re: combobox

2008-04-16 Thread Tracy Spratt
Huh?

Use a few more words, please.

Tracy

--- In flexcoders@yahoogroups.com, "Marwan" <[EMAIL PROTECTED]> wrote:
>
> How can I bind my "day" combobox using for operator ??
> 
>  
> 
> thanks
>




[flexcoders] Re: Bind to Dynamic Component or Panel

2008-04-16 Thread Tracy Spratt
I would instead advise that when you create the child, you place a 
reference to it in some kind of dictionary structure, like an array, 
an associative array(object), or dictionary.

Use that reference to access public members, add event listeners, etc.

You will not need to worry about where it is in the dom. 

Tracy


--- In flexcoders@yahoogroups.com, "gjessup1" <[EMAIL PROTECTED]> wrote:
>
> Oscar, 
> Thanks for that. That is basically exactly what I needed. The one
> problem I am running into is that I want my panels to be only 3 wide
> on the page and I have 12 entries in the DB. So I am creating a 
page 3
> panels wide and 4 panels down.
> 
> To do this I create a new HBOX every 3rd Panel.
> 
> so I need a way to figure out which HBOX the panel is in. Then I 
can do 
> HBOX3.getChildByName("My Panel") 
> 
> The way I am starting to do this is by creating an array collection
> that keeps the Panel Names and the childIndex for the HBOX and the 
Panel.
> 
> What would be nice is if you had a Canvas and and it didn't matter 
how
> many levels deep the panel was (i.e the panel had a global bindable 
name) 
> Then you could do Canvas.getChildByName.
> 
> I can post code if that doesn't make sense.
>




[flexcoders] Re: Building XML out of an Array Collection

2008-04-16 Thread Tracy Spratt
Depending on the dot net webservice, you might only need to change 
your resultFormat="e4x".  Try that before you start doing this 
manually.

I am consuming dot net webservices this way.  The WS code 
response.writes a DataTable, and .net serializes it into XML 
automatically.  What you get in flex is a bit messy, with a lot of 
type info, but your data will be at 

Tracy


--- In flexcoders@yahoogroups.com, "Nate Pearson" <[EMAIL PROTECTED]> 
wrote:
>
> I gotcha!  So what about adding children to that xml node?  Do you
> treat it just like a string or something?  so If I wanted to add a
> child to that node would it be something like this:
> 
> var newNode:XML =   yourCollection[n]["id"]}>
> 
> newNode = newNode +   yourCollection[n]["id"]}/>
> 
> I thought I saw some method called append in xml.  I was hoping I
> could create XMLNode(s) and do something like newNode.append
(myNewXMLNode)
> 
> thanks for responding so fast!
> 
> 
> --- In flexcoders@yahoogroups.com, "Jim Hayes"  wrote:
> >
> > You can write the values straight into the xml notation using 
curly
> > brackets : something like
> >  
> > var newNode:XML =  > yourCollection[n]["id"]}/>
> >  
> > not sure I have the arrayCollection syntax correct, but hopefully 
you
> > can see what I mean?
> >  
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> > Behalf Of Nate Pearson
> > Sent: 16 April 2008 16:59
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Building XML out of an Array Collection
> >  
> > I'm trying to change an array collection of typed objects from 
a .NET
> > webservice into XML.
> > 
> > My array collection is like this:
> > 
> > myNode{
> > label:String
> > id:int
> > children:ArrayCollection
> > }
> > 
> > The items in the children array collection are more of "myNode".
> > 
> > I want to put it into xml so it looks like this:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I always work with arraycollections and never with xml, but this
> > situation requires it. I just need to know how to start. I can 
loop
> > through my arraycollection tree if I just know how to do a node 
or two.
> > 
> > THANKS! :)
> > 
> > Nate
> >  
> > 
> > 
__
> > 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.
> > 
__
> >
>




[flexcoders] Collections with common source

2008-04-16 Thread Richard Rodseth
Hi

I'm working on a dashboard where several charts share common data. I
was thinking that each chart series could have a data provider which
is a collection with a filter function, and I could set the source
array of these collections to the same array. Sound reasonable?

Thanks


[flexcoders] A Question about Cairngorm?

2008-04-16 Thread markflex2007
Hi,

I work with Cairngorm for couple months. I use delegate to connect
with Server and use command to get the data from delegate. Now the
delegate file and command file are separate files.

Somebody told me I can combine delegate with command so I do not need
to build so many file.

Do you know some demo online to do this? so I see how to do this.

Thanks for your help.


Mark



  1   2   >