[flexcoders] Re: From DataGrid to Clipboard and Excel

2013-01-19 Thread Tony Obermeit
This isn't exactly what you asked about but it's close.

I use the method below to copy selected rows to clipboard.  In this use I
have a tab character to separate the columns, elsewhere I provide the user
the choice between tab and comma with a separate dialog.

private function syncCopyToClipboard():void
{
// Separator used between Strings sent to clipboard
// to separate selected cells.
var separator:String = "\t";
if (syncComma.selected) separator = ",";

// The String sent to the clipboard
System.setClipboard(" ");
var dataString:String = "";
var n:int = dgSyncGroupMembers.selectedCells.length;
if (n == 0)
{
Alert.show("You have not selected any rows, to select
all rows: click on the first row, scroll to the bottom and shift click on
the last row. Otherwise, select specific rows before you press the copy to
clipboard button.");
}
for (var i:int = 0; i < n; i++)
{
var cell:Object = dgSyncGroupMembers.selectedCells[i];
var data:Object =
dgSyncGroupMembers.dataProvider[cell.rowIndex];
var nameField:String =
dgSyncGroupMembers.columns[0].dataField;
var valuField:String =
dgSyncGroupMembers.columns[1].dataField;
dataString = data[nameField] + separator +
data[valuField] + "\n" + dataString;
}

// Write dataString to the clipboard.
System.setClipboard(dataString);
}


[SPAM] [flexcoders] Re: how to open pdf, word file using flex

2010-05-21 Thread Tony


Hello!

I have come up with another solution to view .pdf and .doc files. I have 
described it in my blog: 
http://tgeorgiev.blogspot.com/2010/05/viewing-word-documents-with-flex.html The 
idea is to convert the .doc to .pdf, and the .pdf to .swf using pdf2swf and 
then you could write your own logic to display the file or use a library like 
FlexPaper.

Best,
Tony Georgiev

--- In flexcoders@yahoogroups.com, "k.sigiscar"  wrote:
>
> 
> 
> 
> Hi,
> 
> Yes, you need to create a PDF template with Adobe Livecycle Designer with the 
> relevant fields. Then your Flex app must send XML data to your PDF remote 
> object (residing on the LCDS Server) with the name of the XML nodes matching 
> those of the fields in the PDF template (for data binding).
> 
> I have written a number of recipes in the Flex Cookbook beta website about 
> PDF generation.
> 
> LCDS: Using the PDFResourceServlet to read the generated PDF 
> 
> http://cookbooks.adobe.com/post_LCDS__Using_the_PDFResourceServlet_to_read_the_gen-13726.html
> 
> 
> LCDS: Creating a PDF form with localized captions 
> 
> http://cookbooks.adobe.com/post_LCDS__Creating_a_PDF_form_with_localized_captions-13166.html
> 
> 
> LCDS: Displaying a datagrid in a generated PDF 
> 
> http://cookbooks.adobe.com/post_LCDS__Displaying_a_datagrid_in_a_generated_PDF-13886.html
> 
> 
> LCDS: Displaying pictures dynamically loaded by Flex in a generated PDF 
> 
> http://cookbooks.adobe.com/post_LCDS__Displaying_pictures_dynamically_loaded_by_Fl-13267.html
> 
> Best regards,
> Karl Sigiscar.
> 
> 
> --- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
> >
> > I just looked at it a little bit, and it appears to be a solution to a niche
> > problem, and does require a lot of server-side work, including a pre-built
> > PFD template of the Flex app without any data.
> > 
> >  
> > 
> > Tracy Spratt,
> > 
> > Lariat Services, development services available
> > 
> >   _  
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> > Behalf Of valdhor
> > Sent: Wednesday, December 23, 2009 11:18 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [SPAM] [flexcoders] Re: how to open pdf, word file using flex
> > 
> >  
> > 
> >   
> > 
> > http://www.adobe.
> > <http://www.adobe.com/devnet/flex/articles/portable_ria.html>
> > com/devnet/flex/articles/portable_ria.html looks cool. I haven't read
> > through it yet but will have to see if it really REQUIRES LCDS.
> > 
> > --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> > "vikranth4u"  wrote:
> > >
> > > Hi
> > > can anybody help me regarding how to write a code to open a pdf or doc
> > file using flex
> > >
> >
>




[flexcoders] re: Flex and Reporting

2009-06-04 Thread Tony Obermeit
If you have details of where to download this, I'd appreciate you forwarding
them to the list.  I found the code in google code but it seemed I had to
download each .mxml file individually.  I'd like to download the entire
source as one bundle.

I'm keen to use this as it appears to answer the printing questions I've
posted recently.  If anyone has working examples of printing a textarea
using FlexReport, I'd love to see the code.

Regards

Tony

You might wonna look at this:
http://www.kemelyon.com/bts/2008/01/14/flexreport/

I have not used it yet, but I am planning to use it for my current app.

Hth,
martin


[flexcoders] Re: Print examples?

2009-05-27 Thread Tony Obermeit
Thanks Rick, that helped.  I had not been adding the argument to addObject
that specified a scaling. (In this case i used MATCH_WIDTH).

However, I'm printing a text area and the scaling didn't do what I expected,
it just truncated anything that was wider than the page width.  What I'm
hoping for is a component that will wrap the text within a paragraph
according to the page width.  And be able to change / specify a single font.

Any further advice greatly appreciated.

Tony

If you want to print a sub-set of you text... You are going to need to
select the appropriate text ­ transfer to a temporary container and use the
temporary container as an argument for the PrintJob.addObject(). Remember
that in order to print what you see ­ you must see what to print. This is
essentially the context of the first paragraph in livedocs...

http://livedocs.adobe.com/flex/3/html/help.html?content=printing_3.html

Rick Winscot

On 5/23/09 4:17 AM, "Tony Obermeit"  wrote:


>
>
>
>
>
> I'm looking for examples of how to print a single paragraph of text in
flex
> where I can chose the font and rely on word wrap on page margins.  The few
> examples I've found show grids, anyone help really appreciated.
>
> tony
>
>
>
>>


[flexcoders] Print examples?

2009-05-23 Thread Tony Obermeit
I'm looking for examples of how to print a single paragraph of text in flex
where I can chose the font and rely on word wrap on page margins.  The few
examples I've found show grids, anyone help really appreciated.

tony


[flexcoders] Printing simple documents in flex

2009-05-21 Thread Tony Obermeit
I need to generate a fairly basic document in flex that is easy for the user
to print.  I don't consider generating a PDF to a new window / tab to be
easy in this context.

I've found reference to an open source api: Flex Report (
http://www.kemelyon.com/bts/) but the site hasn't been updated for a while.
The examples show there look quite good.

What I'd like to be able to do is create a document, add text to it
(selecting an overall font and size optionally), have the text automatically
wrap if the paragraph extends beyond the page margins and have a button that
says "print".

Any / all advise appreciated

Tony


[flexcoders] re: Books - Flex

2009-05-06 Thread Tony Obermeit
2 books that I've found to be a big help are:

Adobe Flex, Training from the Source, by Adobe Press

Programming Flex, O'Reilly, Kazoun and Lott

I basically learned flex by going through the Training from the Source book,
it teaches you, sort of tutorial style, how to build a multi media shopping
cart application

The programming flex book is useful as a more detailed reference

Also there is much free online documentation from Adobe themselves that is
great

Tony

Hi people,

My name's Gustavo and I'm new on Flex. I'd like to know your opinion about
good books I can buy.

Thank you!


[flexcoders] link colors in htmlText component

2009-04-30 Thread Tony Obermeit
When using the  within a mx:htmlText component, the link is not displayed
with the standard underline or blue color, anyone have technique for getting
links in the htmlcomponent to render like they would in a browser?


[flexcoders] Flex help system

2009-04-29 Thread Tony Obermeit
I've created a help page for my flex application which is a htmlText
component shown in a pop up.

As I was using flex builder and using the dynamic help option, it became
clear to me I need a more sophisticated help system within my flex
applications.

Any thing out there?


[flexcoders] Re: Flex Builder on Linux been scrapped ?

2009-04-29 Thread Tony Obermeit
 

>
> It is in the outline view. In an MXML file, click the green 'c' button
> to see the script methods. The default '<>' button will show the MXML
> tags. As best I understand there is no way to mix them.


Brilliant!  Thanks.


[flexcoders] Re: Flex Builder on Linux been scrapped ?

2009-04-29 Thread Tony Obermeit
>
> i just had a peak at IntelliJ's features & it doesn't seem to do cf--so its
>
> useless to me. if you do cf/java/flex/air i think it will be kind of hard
> to
> escape eclipse.


http://coldfusion-in-idea.blogspot.com/

There is a plug in for cold fusion for IntelliJ.  I also read on another
blog that the developers who work on cold fusion mostly use Intellij.  Not
sure if that is true or not.

I use Intellij for java / jsp / html / groovy and am thrilled with it.
Haven't tried it yet for flex but am tempted to.  What is missing in flex
builder for me is a pane that shows me the list of methods in my 
component.


[flexcoders] Re: flexcommon library 1.0 released

2009-04-28 Thread Tony Obermeit
 
<http://groups.yahoo.com/group/flexcoders/message/141850;_ylc=X3oDMTJ0Z2tmdGUyBF9TAzk3MzU5NzE1BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNDE4NTAEc2VjA2Rtc2cEc2xrA3Ztc2cEc3RpbWUDMTI0MDk0NDY0NQ-->
I
had the same problem in firefox and safari on mac. When I went to IE on
windows I was able to view the documentation.
tony


Posted by: "smitade" smit...@yahoo.com
>   
> smitade
> <http://profiles.yahoo.com/smitade> Tue Apr 28, 2009 5:46 am (PDT)
>
> Documentation link doesn't work for me - opens as html text in browser.
>


[flexcoders] Re: FLex with LDAP

2009-04-27 Thread Tony Obermeit
I integrate flex with ldap by using server side java.

Tony


[flexcoders] flex validator for form items dependent on each other

2009-04-27 Thread Tony Obermeit
I've used the  component and extended it with my own action
script code.  This has worked quite well for me when validating a single
form item.

Now I have two items that are dependent on each other.

Soft quota ( values allowed 3, 7, 10)

Hard quota (values allowed 3, 7 , 10)

But, the hard quota must always be equal too or larger than the soft quota.
I'd like to implement this in a validator.  How do i reference other items
in a validator?

thanks

Tony


[flexcoders] Re: Need Suggestions for Reporting In Flex Applications.

2009-04-20 Thread Tony Obermeit
If I generate a PDF on the server side, how do I display that within a flex
canvas, is there an  sort of component?

If I generate an excel document on the server side, how do I display that
within a flex canvas?

Tony


> Re: Need Suggestions for Reporting In Flex 
> Applications.<http://groups.yahoo.com/group/flexcoders/message/141272;_ylc=X3oDMTJ0aHFoNGxuBF9TAzk3MzU5NzE1BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxNDEyNzIEc2VjA2Rtc2cEc2xrA3Ztc2cEc3RpbWUDMTI0MDI0NzA5OA-->
>
Posted by: "valdhor" valdhorli...@embarqmail.com

>   valdhor <http://profiles.yahoo.com/valdhor>
>
Mon Apr 20, 2009 5:47 am (PDT)
>


There are any number of ways of exporting data. In my case I use PHP
extensively to generate excel spreadsheets (Google for code on how to do
this. If you can't find anything, I can post the code I use).


For Flex, a couple of things I know of off the top of my head...


AlivePDF - http://alivepdf.bytearray.org/

as3xls - http://code.google.com/p/as3xls/


A quick google search pulled up these...


[flexcoders] Using later SDKs with Flex 3

2009-04-03 Thread Tony Obermeit
Hi
I have a flex 3 licence but I see there is a flex 3.2 (and possibly later
sdk).

Will that work with my flex 3 flex builder?  Do I need to download a whole
new flexbuilder or just the sdk or do i have to pay more money to the good
folks at Adobe?


[flexcoders] Re: Making button in data grid invisible based on other columns in

2009-04-01 Thread Tony Obermeit
Thanks Tracy,

I tried that but it wasn't any better.

I get error Call to possibly undefined method isButtonVisible.

Tried making the function definition bindable (not sure if that makes sense)
but it wasn't successful.

I need to set the button to be visible or not on each row of the data grid.

Thanks


> Re: Making button in data grid invisible based on other columns in 
> 
>
Posted by: "Tracy Spratt" tspr...@lariatinc.com

>   nts333rd 
>
Wed Apr 1, 2009 12:36 am (PDT)
>
Use binding braces:
>

> visible="{isButtonVisible()}"
>

> However, if you do not pass in a variable that is bindable, the function
>
will fire only once.
>

> Tracy Spratt,
>

> Lariat Services, development services available
>

> _
>


[flexcoders] Making button in data grid invisible based on other columns in the data grid row

2009-04-01 Thread Tony Obermeit
I'm trying to control whether a button is rendered programmatically.


But the code below returns the following error:


Initializer for 'visible': cannot parse value of type Boolean from text
'isButtonVisible()'.


Please advise.



















private function isButtonVisible():Boolean{

return false;

}


[flexcoders] Any existing help systems for generating help for end users

2009-03-07 Thread Tony Obermeit
Anyone know of systems for generating help within a flex application? I tried 
searching for previous posts but help and system are such generic terms I got a 
huge number of matches that were about developer help.



[flexcoders] Newbie HELP

2008-12-08 Thread Tony
Ok.  I have been working through a Friends of Ed book called
Foundation Flex for Designers.  In chapter 8, the idea is to build a
external xml file controlled photo gallery.  Screen will be split
horizontally with one side being thumbnails of the larger pictures
stored externally to the application.  The other side (right side) is
supposed to display the targeted picture in full dimensions. I have
not got to the right side yet.  I am to the point where thumb nails
should be showing up in the thumbnail pane.  But I keep getting an
error upon runtime out of flex.  Can any one help???  I have put a zip
file in the files area of this group that contains a folder for the
picture assets and xml file plus all the flex files.  Can someone tell
me what I did wrong??

The next step will be to create a basic css file.  But my thumb nails
should still be showing up in the pane (or is it "pain").

respectfully,
Mini-me



[flexcoders] Accessing XML attribute through ArrayCollection

2008-03-24 Thread Tony Armstrong
Hello all,
I am using an ArrayCollection, outputted from an HTTPService. I wish
to access the 'id' attribute from an XML file. I've tried using the
e4x methods to no avail. I get an error:

"TypeError: Error #1010: A term is undefined and has no properties."

If I add the resultFormat="e4x" to the HTTPService, I get the error:

"Type Coercion failed: cannot convert [EMAIL PROTECTED] to
mx.collections.ArrayCollection."

Any help would be appreciated...

Here's a code snippet below:

[Target XML]
 
  

  weebls-stuff forums weebls-stuff forums
  http://forums.weebls-stuff.com/
  1-1-08
  true

  


[AS3 snippets]
...


function init()
{
  siteDataIn.send();
}

function siteHandler(event:ResultEvent):void
{
  sites = event.result.ma.sitelist.item;
}

function getSiteData(repeatData:MouseEvent):void
{
  ...
  var site:Object = repeatData.target.getRepeaterItem();
  trace(board.attribute(id)); <-- this is where things blow up!!!
}





...





RE: [flexcoders] Re: Problems with IE and refreshing data

2008-01-22 Thread Tony Fendall
I always add a dummy parameter to any requests, and
fill it with a random number.

This seems to get around any caching issues in most
cases.

-Tony
http://www.munkiihouse.com

--- Matt Chotin <[EMAIL PROTECTED]> wrote:

> The issue is if you have a test certificate for
> https, not necessarily a
> test server.  
> 
>  
> 
> It may be that IE simply isn't attempting to hit the
> server.  Can you
> try adding an additional dummy query parameter so
> the url changes?
> 
>  
> 
> Also check your server to see if you can adjust the
> cache settings on
> the page that is being returned.
> 
>  
> 
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Sherif Abdou
> Sent: Tuesday, January 22, 2008 5:06 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Problems with IE and
> refreshing data
> 
>  
> 
> Ya I think, I remb reading that somewhere that IE
> has some weird
> restrictions like that if it is a test server. I
> would wait on someone
> who knows more than me
> 
> - Original Message 
> From: markcavins <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Tuesday, January 22, 2008 6:59:32 PM
> Subject: [flexcoders] Re: Problems with IE and
> refreshing data
> 
> It is a test server. The request makes request to
> the live server but
> it is a test server. what would the restrictions be?
> 
> --- In [EMAIL PROTECTED] ups.com
> <mailto:flexcoders%40yahoogroups.com>
> , Sherif Abdou <[EMAIL PROTECTED] ..> wrote:
> >
> > is that a test server or online since IE has some
> restrictions if it
> is local
> > 
> > 
> > - Original Message 
> > From: markcavins 
> > To: [EMAIL PROTECTED] ups.com
> <mailto:flexcoders%40yahoogroups.com> 
> > Sent: Tuesday, January 22, 2008 4:56:04 PM
> > Subject: [flexcoders] Problems with IE and
> refreshing data
> > 
> > Hello,
> > 
> > I have this app that was refreshing data in
> development but now once I
> > deploy it to my server I am not getting the data
> to refresh in
> > IE(6/7). In FF every thing updates and resends to
> the server just
> > fine. Here is the code that makes it work.
> > 
> > the httpservice
> > 
> > Code:
> > 
> >  > result="onResult( event)" 
> > url="http://mysite. <http://mysite./>  net/info_
> wrapper.php?
> customer={customer. text}
> &username= {username. text}& password=
> {password. text}"
> > />
> > 
> >  labelField=" fleet"
> > left="35" right="15"
> > width="350" backgroundColor= "#00"
> color="#ff" fontSize="27"
> > borderColor= "#00" columnWidth= "315"
> rowHeight="50"
> > themeColor=" #808080" fontWeight=" bold"
> allowMultipleSelect
> ion="true" 
> > id="TileList1" height="0" y="202" x="178"/>
> > 
> > The Updater script
> > 
> > Code:
> > 
> > import mx.collections. XMLListCollectio n;
> > 
> > [Bindable]
> > private var _xlcMyListData: XMLListCollectio n;
> > 
> > private function onResult(Event: ResultEvent)
> :void {
> > var xmlResult:XML = XML(Event.result) ;
> > _xlcMyListData = new XMLListCollection( xmlResult.
> .asset);
> > }
> > 
> > The refresh button
> > Code:
> > 
> >  fillAlphas=" [1.0,
> > 1.0]" fillColors=" [#03, #03, #474545,
> #474545]"
> > borderColor= "#DCDEDF" click="tempXML. send();"/ >
> > 
> > Any Ideas?
> > 
> > 
> > 
> > 
> > 
> > 
>  _ _ _ _
> _ _
> > Looking for last minute shopping deals? 
> > Find them fast with Yahoo! Search. 
> http://tools. search.yahoo. com/newsearch/ category.
> php?category=
> shopping
>
<http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> 
> >
> 
>  
> 
>  
> 
> 
> 
> Never miss a thing. Make Yahoo your homepage.
>
<http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs>
>  
> 
>  
> 
> 



Re: [flexcoders] Re: Styling List ItemRenderers

2008-01-22 Thread Tony Fendall
What I normally do, is extend the list component and
add a bunch of public properties or styles to it.
eg. public var titleColor:uint;

Then in my item renderer class, I override the
commitProperties function, and in there grab the
properties and styles I need from the list.
eg.
var tmp:CustomList = this.owner.parent as CustomList;
this.setTitleColor( tmp.titleColor );

Hopefully that makes sense.

One other thing you might want to do if you use this
approach, is to cause the item renderers to re-request
their styling information if the styles change at
runtime. This can be done by adding a function to your
CustomList like this one (note, this funciton came
from inside a custom DataGrid of mine, but should be
easy to translate to other list types)

public function invalidateItemStyles():void
for (var rows:int = 0; rows < listItems.length;
rows++)
{
var rowArray:Array = listItems[rows];

for (var cols:int = 0; cols < rowArray.length; cols++)
{
var colItem:UIComponent = rowArray[cols] as
UIComponent;

if (colItem)
colItem.invalidateProperties(); // refresh
}
}
}


Hope that helps
-Tony
http://www.munkiihouse.com

--- "scott.royston" <[EMAIL PROTECTED]> wrote:

> I have the same item renderer in multiple lists, and
> want them to look different.  Is there 
> no way to do it on a per-list basis?
> 
> Also, I believe the type-selector gets overridden by
> the ListContentHolder, but I will 
> double check.
> 
> Thanks.
> 
> --- In flexcoders@yahoogroups.com, "Alex Harui"
> <[EMAIL PROTECTED]> wrote:
> >
> > Create a type-selector for your renderer class
> > 
> >  
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of scott.royston
> > Sent: Tuesday, January 22, 2008 1:21 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Styling List ItemRenderers
> > 
> >  
> > 
> > How can I style my itemrenderers in a List via
> CSS? Right now they seem
> > to be inheriting 
> > everything from the List component (via the
> ListContentHolder), which is
> > definitely not what I 
> > want.
> > 
> > Thanks
> >
> 
> 
> 
> 



Re: [flexcoders] Stylesheet to AS3 App?

2007-12-21 Thread Tony
cool.
thanks!
tony

On Dec 21, 2007 12:16 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>
>
> I wouldn't say it isn't possible, just very hard.  If you build a simple
> mx:Application with the MXMLC option –keep-generated-actionscript, you'll
> see how much code the compiler generates to get the styles working for you.
> You can certainly manually duplicate all of that yourself.
>
>
>
>  
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Tony
>  Sent: Friday, December 21, 2007 6:43 AM
>  To: flexcoders@yahoogroups.com
>  Subject: Re: [flexcoders] Stylesheet to AS3 App?
>
>
>
>
>
>
> so this is NOT possible?
>
>  for real?
>
>  tony
>
>  On Dec 20, 2007 10:29 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > That's the price you pay for not using mx:Application. It comes with lots
>  > of cool features such as css support for non-text components.
>  >
>  >
>  >
>  > 
>  >
>  >
>  > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
>  > Behalf Of Rastafari
>  > Sent: Thursday, December 20, 2007 2:13 PM
>  > To: flexcoders@yahoogroups.com
>  > Subject: [flexcoders] Stylesheet to AS3 App?
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > hi there.
>  >
>  > i can apply a stylesheet no problem, to a mxml application.
>  > however, in an as3 only application, i cant seem to figure out how
>  > to do this.
>  >
>  > i can TextFormat using a stylesheet, when its text, no problem.
>  >
>  > just cant figure out how to do it for the whole app. mainly i want a
>  > background
>  > gradient and some background alpha changes.
>  >
>  > thanks for any help
>  > tony
>  >
>  >
>
>  --
>  'Never have anything in your life that you can't walk out on in thirty
>  seconds flat, if you spot the heat coming around the corner'
>
>  robert deniro - heat (1995)
>
>  



-- 
'Never have anything in your life that you can't walk out on in thirty
seconds flat, if you spot the heat coming around the corner'

robert deniro - heat (1995)


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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> 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] Stylesheet to AS3 App?

2007-12-21 Thread Tony
so this is NOT possible?

for real?

tony

On Dec 20, 2007 10:29 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>
>
> That's the price you pay for not using mx:Application.  It comes with lots
> of cool features such as css support for non-text components.
>
>
>
>  
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rastafari
>  Sent: Thursday, December 20, 2007 2:13 PM
>  To: flexcoders@yahoogroups.com
>  Subject: [flexcoders] Stylesheet to AS3 App?
>
>
>
>
>
>
>
> hi there.
>
>  i can apply a stylesheet no problem, to a mxml application.
>  however, in an as3 only application, i cant seem to figure out how
>  to do this.
>
>  i can TextFormat using a stylesheet, when its text, no problem.
>
>  just cant figure out how to do it for the whole app. mainly i want a
> background
>  gradient and some background alpha changes.
>
>  thanks for any help
>  tony
>
>  



-- 
'Never have anything in your life that you can't walk out on in thirty
seconds flat, if you spot the heat coming around the corner'

robert deniro - heat (1995)


[flexcoders] apply style sheet to as3 - only application?

2007-12-20 Thread Tony
hi there.

i can apply a stylesheet no problem, to a mxml application.
however, in an as3 only application, i cant seem to figure out how
to do this.

i can TextFormat using a stylesheet, when its text, no problem.

just cant figure out how to do it for the whole app.  mainly i want a background
gradient and some background alpha changes.

thanks for any help
tony

-- 
'Never have anything in your life that you can't walk out on in thirty
seconds flat, if you spot the heat coming around the corner'

robert deniro - heat (1995)


[flexcoders] Re: Recovering from videodisplay errors? [Solved]

2007-11-21 Thread Tony
Ok, Here is the solution:
if (videoDisplay.state=="connectionError"){
  videoDisplay.close();
}
videoDisplay.play();

You could also listen for stateChange on the player checking for a
connection error and solve the issue at that time.  I think that is
the best way to go.


--- In flexcoders@yahoogroups.com, "Tony" <[EMAIL PROTECTED]> wrote:
>
> Anyone ever able to answer this?
> I am getting the dreaded connectionError! and cannot recover from it
also.
> 
> I can capture the error just fine. One the
> VideoDisplay.state="connectionError", you cannot get it to play again.
> 
> Anyone have a solution for this one.
> 
> Thanks,
> Tony
>



[flexcoders] Re: Recovering from videodisplay errors?

2007-11-21 Thread Tony
Anyone ever able to answer this?
I am getting the dreaded connectionError! and cannot recover from it also.

I can capture the error just fine. One the
VideoDisplay.state="connectionError", you cannot get it to play again.

Anyone have a solution for this one.

Thanks,
Tony

> Every once in a while the VideoDisplay goes into a disconnected state
> or a ConnectionError state. The player becomes unresponsive then and
> clicking on the next video doesnt play the next video either. How do I
> recover from such situations?
> 
> -- 
> Arpit Mathur
> Lead Software Engineer,
> Comcast Interactive Media
> ---
> post your flex tips on
> http://flextips.corank.com
>




Re: [flexcoders] Flickr: Sandbox issue with unavaiable.gif

2007-11-15 Thread Tony Alves

Interesting, because it does have a cross domain.
http://l.yimg.com/crossdomain.xml

Maybe it using http://l.yimg.com/www.flickr.com/ 
<http://l.yimg.com/www.flickr.com/images/photo_unavailable.gif> as the 
root of the domain.

Try to set up the |loadPolicyFile()| method for the above crossdomain.

Regards,
Tony

cisnky wrote:


SecurityError: Error #2122: Security sandbox violation

How do I get round the security violation for the unavaiable.gif, it
seems that server doesn't have a cross domain.

http://l.yimg.com/www.flickr.com/images/photo_unavailable.gif 
<http://l.yimg.com/www.flickr.com/images/photo_unavailable.gif>


I thought it would be a case of not making the call when the api
returned the url, but not the case because the server redirects to
that gif.

Cheers.

 


Re: [flexcoders] Converting app to use modules

2007-11-14 Thread Tony Alves

Scott,
I may get corrected on this one, but take it for what it is worth.
I thought you had to create an instance of manager classes in the main 
application even if you did not use them there.

So you would put something like the following into your MainView.mxml :
private var dragManager:DragManager;

I do this out of habit, but not sure if it solves anything.

HTH,
Tony


Scott Melby wrote:



I am converting my application to use Modules... so far most things are
working, but I have run into two errors that I have yet to work around.
I have pasted the parts of the code pertaining to modules below the 
message.


1) Sometimes a refresh of the browser window (I am setup for
deeplinking... so it returns to the selectedIndex) results in a Class
not found error where the Class that cannot be found is my Module class
for the module for the deep link selectedIndex. Stack trace is pasted
below.

2) I am also getting intermittent DragManager exceptions. I thought
that using the SharedCodeModule approach would resolve this... but I
must have done something wrong.

As always any help is appreciated.

Thanks
Scott

--- MainView.mxml ---

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

layout="absolute" xmlns:components="common.components.*"
creationComplete="init()" height="100%" width="100%"
paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0">





























--- SharedCodeModule.mxml ---

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






--- Module Class not found exception ---
Error: Class 'projectReportModule.ProjectReportModule' not found.
at _ProjectReportModule_mx_core_FlexModuleFactory/create()
at
mx.modules::ModuleLoader/moduleReadyHandler()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\modules\ModuleLoader.as:332]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
ModuleInfoProxy/moduleEventHandler()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1025]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
ModuleInfo/readyHandler()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\modules\ModuleManager.as:704]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::FlexModuleFactory/update()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:324]
at
mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:412]

--- TypeCoercion exception ---
TypeError: Error #1034: Type Coercion failed: cannot convert
mx.managers::[EMAIL PROTECTED] to mx.managers.IDragManager.
at mx.managers::DragManager$/get
impl()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\managers\DragManager.as:150]
at mx.managers::DragManager$/get
isDragging()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\managers\DragManager.as:185]
at
mx.controls.listClasses::ListBase/dragScroll()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:7083]
at Function/http://adobe.com/AS3/2006/builtin::apply 
<http://adobe.com/AS3/2006/builtin::apply>()

at ()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

 


Re: [flexcoders] Re: OT: Netiquette Question

2007-10-27 Thread Tony Alves
This is one of the most fun I have had on flexcoders in a long time.
I am on the floor rolling around and laughing so hard. (I have long arms 
for typing)

Gmail does help with a lot of the issues, that is why I changed to a 
gmail account a while back for my group emails.  I also switched to 
Thunderbird, because it had some straight forward threading options.

Anyway, keep up the funny comments.  I loved them.
Tony



Re: [flexcoders] Button inside a DataGridColumn..is it Possible?

2007-10-26 Thread Tony Alves

Hello Tarun,
It is definitely possible.  There are a lot of people with examples.
Check out Alex Harui's blog
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html

This would give you a start.

Regards,
Tony

tarun chandra wrote:


Hi

I was trying to find ways to put a button inside a dataGridColumn, so
that I can this button for each row. Can anyone kindly tell me if it
is possible, and maybe tell me how to do it.

Thank You,
Tarun

 


[flexcoders] Re: error in AIR application

2007-10-15 Thread Tony
Fixed, but still want to know what is happening in AIR that would not
be happening in Flex 2 application.

I initialized my binding variable to an instance of the object.

--- In flexcoders@yahoogroups.com, Tony Alves <[EMAIL PROTECTED]> wrote:
>
> I am getting an error on a line in my AIR application:
> ReferenceError: Error #1069: Property _bindings not found on 
> components.EmployeeListPanel and there is no default value.
> at 
>
mx.binding::BindingManager$/setEnabled()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\binding\BindingManager.as:65]
> 
> I am sure this is a timing issue, but it works using it in a Flex 
> builder 2 application.  Any thoughts?
> I am thinking that in the Air application all components are loaded 
> immediately.  Just a guess.
> I am using Flex 3 Beta 2
> 
> /**
>  *  Set isEnabled for all bindings associated with a document.
>  *
>  *  @param document The document that contains the bindings.
>  */
> public static function setEnabled(document:Object, 
> isEnabled:Boolean):void
> {
> *if (document && document._bindings)*
> {
> var bindings:Array = document._bindings as Array;
>
> for (var i:uint = 0; i < bindings.length; i++)
> {
> var binding:Binding = bindings[i];
> binding.isEnabled = isEnabled;
> }
> }
> }
>




[flexcoders] error in AIR application

2007-10-15 Thread Tony Alves

I am getting an error on a line in my AIR application:
ReferenceError: Error #1069: Property _bindings not found on 
components.EmployeeListPanel and there is no default value.
   at 
mx.binding::BindingManager$/setEnabled()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\binding\BindingManager.as:65]


I am sure this is a timing issue, but it works using it in a Flex 
builder 2 application.  Any thoughts?
I am thinking that in the Air application all components are loaded 
immediately.  Just a guess.

I am using Flex 3 Beta 2

   /**
*  Set isEnabled for all bindings associated with a document.
*
*  @param document The document that contains the bindings.
*/
   public static function setEnabled(document:Object, 
isEnabled:Boolean):void

   {
*if (document && document._bindings)*
   {
   var bindings:Array = document._bindings as Array;
  
   for (var i:uint = 0; i < bindings.length; i++)

   {
   var binding:Binding = bindings[i];
   binding.isEnabled = isEnabled;
   }
   }
   }



Re: [flexcoders] Re: Anyone seen this effect as Flex module - Accordion Menu

2007-09-21 Thread Tony Alves

Doug,
That is off the board.  Do you think it will be possible to get rid of 
the history tracking on it.
For some reason that always bothers me about the accordion, so I turn it 
off usually.

Still, nice job!  You rock dude.

Tony

Doug McCune wrote:


holla

http://dougmccune.com/flex/apple_accordion 
<http://dougmccune.com/flex/apple_accordion>


source will be coming soon, gotta do a little cleanup and write up a 
blog post. It uses a slightly modified Accordion component and some 
flexlib components.


Doug

On 9/20/07, *Mike Krotscheck* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


We did something very similar to this using a VBox and container
resizing. Basically, every other element is a clickresponsive
component that on rollover changes the height of the previous
container, with a resize effect added for good measure. Fairly
simple, should take a decent developer about 30 minutes to implement.

 


**Michael Krotscheck**

Senior Developer

   



**RESOURCE INTERACTIVE**

www.resource.com <http://www.resource.com>

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>



*From:* flexcoders@yahoogroups.com <http://ups.com> [mailto:
flexcoders@ <mailto:flexcoders@>yahoogroups.com
<http://yahoogroups.com>] *On Behalf Of *Michael Schmalle
*Sent:* Thursday, September 20, 2007 2:04 PM
*To:* flexcoders@yahoogroups.com <http://ups.com>
*Subject:* Re: [flexcoders] Re: Anyone seen this effect as Flex
module - Accordion Menu

 


Hi,

I also found another workaround for the rollover. I added a timer
to the dispatch method and it will wait the determined amount of
milliseconds before firing the open event.

This improves usability greatly.

Peace, Mike

On 9/20/07, *Michael Schmalle* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:

Hi,

I slapped this together. There are a lot of things that could be
improved but, you be the judge.

One thing is it doesn't quite 'slide' like the apple example does
but, that would be another component that used a canvas and funky
depth management.

Plus whenever you use rollOver, there are bound to be issues.
MouseDowns are much better but, this uses rollOver. For the time I
put into it about 1 1/2 hours it's close.

The Image is actually the content that could be whatever you want.
The gray part is the custom titleBar that was made with an inline
itemRenderer with the  tag.

http://www.teotigraphix.com/flexAssets/taskpanefx/AppleMenu.html
<http://www.teotigraphix.com/flexAssets/taskpanefx/AppleMenu.html>

The example was done with this product;

http://www.teotigraphix.com/components/containers/taskpanefx
<http://www.teotigraphix.com/components/containers/taskpanefx>

Peace, Mike

 


On 9/20/07, *Tony Alves *<[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:

Now there is an example of why you should use flex over ajax.

oneproofdk wrote:


Hi Mike

Sounds good - if you dont mind the trouble - I'd love to see an
example on how to make the "Apple version"

Thanks for your reply though.

Mark






-- 
Teoti Graphix

http://www.teotigraphix.com <http://www.teotigraphix.com>

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

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




-- 
Teoti Graphix

http://www.teotigraphix.com <http://www.teotigraphix.com>

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

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


 


Re: [flexcoders] Re: Anyone seen this effect as Flex module - Accordion Menu

2007-09-20 Thread Tony Alves

Now there is an example of why you should use flex over ajax.

oneproofdk wrote:


Hi Mike

Sounds good - if you dont mind the trouble - I'd love to see an
example on how to make the "Apple version"

Thanks for your reply though.

Mark

 


Re: [flexcoders] caringorm architecture

2007-09-19 Thread Tony Alves

Did you not like any of these?
http://www.google.com/search?q=cairngorm+examples


seemaherein wrote:


Hi,

i have been asked to look at caringorm architecture usage for my
applications. I searched on net for tutorial but coudn't find a good
one.

If anybody has any tutorial, please send that across or if any online
tutorial is available, let me know the link.

Thanks
Seema

 


Re: [flexcoders] Can I use Flex to create flash widgets? that are embedded in HTML/JS web-app?

2007-09-18 Thread Tony Alves

Try this article by Ted Patrick:
http://www.onflex.org/ted/2007/08/fxwidget-flex-swf-swfobject-custom-html.php

Satish Kumar.M wrote:


I want to use Flex for creating chart widgets. and embed those widgets
in another HTML/JS web-app. Can I use Flex for that? I dont want to
create a full-blown Flex application.

The whole app is HTML/JS with embedded Flash widgets for charting..

Can some one point me to any example please, which show embedded Flex
in HTML/JS dominant app?

 


Re: [flexcoders] Re: Searching array for item

2007-09-17 Thread Tony Alves

I feel you buddy.  7days and average 10-14 hours here.
Glad to help out.  I may blog the example when I get time.

Regards,
Tony

candysmate wrote:


--- In flexcoders@yahoogroups.com 
<mailto:flexcoders%40yahoogroups.com>, Tony Alves <[EMAIL PROTECTED]> wrote:

>
> Type "Three" into the "Value" Text Input.
> You can put "id" in the "Value Name" TextInput, then type the numeric
> numbers in "Value".
> This allows a change of the column in the ArrayCollection you will be
> searching.
>

Got it. Very nice inddded. Many thanks for your time and trouble Tony.
Sorry for being slow off the mark earlier. 7 days a week coding is
slowly wearing me down.

best Graham

 


Re: [flexcoders] Re: Searching array for item

2007-09-17 Thread Tony Alves

Type "Three" into the "Value" Text Input.
You can put "id" in the "Value Name" TextInput, then type the numeric 
numbers in "Value".
This allows a change of the column in the ArrayCollection you will be 
searching.



candysmate wrote:


hey Graham,
Is the invoiceApprovalGrid Data Provider set to adviceApprovalCollection?

Yes Tony, it is.

Many thanks to Alex and yourself for your time and code. However,
inputting 'Three' in the name textInput did not cause the dataGrid to
show the highlight ob that item in the dataGrid in your code example.
maybe I'm missing something here?

I've not had enough coffee yet on a Monday morning to come around :)

 


Re: [flexcoders] Searching array for item

2007-09-16 Thread Tony Alves

Alex,
I have tried the method you suggest, but it did not act the way I 
wanted, because it forces me to create a sort on my ArrayCollection, 
which sorts my grid. 
I extended the datagrid to find the value I am looking for based on the 
value and the name of the value.  Let us know if you see a disadvantage 
to doing this.


http://example.3alves.com/superdatagrid/
right click to see the source:
http://example.3alves.com/superdatagrid/srcview/

Graham,
Wait for Alex to give the green light before you use this approach.  I 
have only used it with my ComboBox 's and am not sure if it is good 
practice.


Regards,
Tony

Alex Harui wrote:


Yeah, sorry, createCursor(), and findAny, findFirst, or findLast, 
which if they return true, leaves the cursor.current on the item found.


 



.

 


Re: [flexcoders] Searching array for item

2007-09-16 Thread Tony Alves
Is it createCursor(), Alex?

Alex Harui wrote:
>
> getItemIndex takes an item, which you can find() in a getCursor() on 
> the collection.
>
>  
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *candysmate
> *Sent:* Sunday, September 16, 2007 1:28 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Searching array for item
>
>  
>
> I wish to search an ArrayCollection for a match to the text in a
> textInput component and then set the selectedIndex of a dataGrid to
> the result.
>
> I tried:
>
> invoiceApprovalGrid.selectedIndex =
> adviceApprovalCollection.getItemIndex(approveAdviceNumber.text);
>
> without success. Any pointers most welcomed.
>
>  


Re: [flexcoders] Ruby on Rails Server and "Security error accessing url"

2007-09-12 Thread Tony Alves
Is the crossdomain.xml file in the root of admin.domain.com?

digitaljedis wrote:
>
> Hey Guys,
>
> I'm running my server through Media Temple while I develop my little
> applications before putting them onto dedicated servers and I'm
> running into a little problem.
>
> I've got the following code being used for connecting to Ruby on Rails
> through Flex: (actual domain removed)
>
> http://admin.domain.com/bars/list 
> "
> useProxy="false" method="GET"/>
>  url="http://admin.domain.com/bars/update 
> " useProxy="false"
> method="POST" result="listBars.send()"/>
>  url="http://admin.domain.com/bars/delete 
> " useProxy="false"
> method="POST" result="listBars.send()"/>
>  url="http://admin.domain.com/bars/create 
> " useProxy="false"
> method="POST" result="listBars.send()" contentType="application/xml">
> 
> -XML Stuff Here 
> 
> 
>
> This code works fine when pointing locally (ex: 127.0.0.1:3500) and
> all of the controllers and models online are working fine, I'm just
> getting the following error inside of Flex when opening my application
> online which is located at domain.com/flex-admin/:
>
> [RPC Fault faultString="Security error accessing url"
> faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
> at
> mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler
>  
> ()
> at mx.rpc::Responder/fault()
> at mx.rpc::AsyncRequest/fault()
> at private::DirectHTTPMessageResponder/securityErrorHandler()
> at
> flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
>
> I've setup my crossdomain.xml as generic as it possibly could be and I
> know it's a security risk, but I'm still learning Flex:
> 
> 
> 
>
> Does anyone have any tips for how to get this to work? I would much
> rather spend my time working on a Flex admin panel than just another
> PHP/SQL driven one.
>
> Thanks!
> -Nick
>
>  


Re: [flexcoders] Link in one tab that opens the sister tab

2007-09-08 Thread Tony Alves
I control my tabs like this from the container/application holding the tab.
myTab.selectedIndex=myTab.getChildIndex(sisterID);

This is how I control the tabs from within the children
var tn:TabNavigator = parent as TabNavigator;
tn.selectedIndex = 
tn.getChildIndex(tn.getChildByName("sisterID"));


its_llpj wrote:
>
> Is there a way to link from one tab to its sister tab?
>
> I have a datagrid within one tab and if the record is related to the
> sister tab I would like to have a link that when clicked will open the
> sister tab and show the related record. Is this possible?
>
> __


Re: [flexcoders] Re: NEW FLEX WEBSITE: ManureMail.com

2007-09-06 Thread Tony Alves
Randy,

I second that sentiment!  Flex kicks ass!
I am still struggling with the 100% Flex site structure.  Will it be too 
much out of the gate?  Will users get turned off everytime they see a 
site using flash/flex, because so many developers are going to use it 
when there was no need for it?  These are the unknowns.
I think your site is a good example of having a Full Flex solution.  
Little site content, lots of data centric needs (eCommerce).
Oh, the struggles of a web application developer.

Tony

Randy Cooper wrote:
>
> Brendan, DARN good question!!!
>
> 1) I wanted to build an entire site in Flex. Why? Same reason the guy
> climbed Everest - because it was there.
> 2) I had originally started the project in PHP and AJAX using a
> freebie template I'd found. Between getting bogged down in a mire of
> DIV tags and all kinds of issues setting up the checkout to go to
> authorize.net I finally had to give up on it for a while. (As you
> might guess manure doesn't pay the bills). Once I started with flex I
> was off to the races.
> 3) UI options galore! Without all of the AJAX/DIV/HTML nightmare
> associated with it. (Did I mention all of the IE vs. Firefox issues to
> test and deal with?
> 4) C'mon man! Flex is freaking cool!
>
> --- In flexcoders@yahoogroups.com 
> <mailto:flexcoders%40yahoogroups.com>, "Brendan Meutzner" <[EMAIL PROTECTED]>
> wrote:
> >
> > Curious why you chose Flex for this site...?
> >
> > Brendan
>
>
>
>  


[flexcoders] Determine the class of an event currentTarget

2007-09-01 Thread Tony Alves
How would I determine the class of an events "currentTarget"  ?
I want to do something like:
switch (event.currentTarget) {
case CreditCardValidator:
break;
case StringValidator:
break;
}

Does not work, but explains what I am looking for.
Anyone?

Tony


[flexcoders] Determine the class of an event currentTarget

2007-09-01 Thread Tony Alves
How would I determine the class of an events "currentTarget"  ?
I want to do something like:
switch (event.currentTarget) {
case CreditCardValidator:
break;
case StringValidator:
break;
}

Does not work, but explains what I am looking for.
Anyone?

Tony


[flexcoders] Re: image embed and scaling question

2007-09-01 Thread Tony
I handled it this way:
 http://www.adobe.com/2006/mxml"; layout="vertical">
 
 
--- In flexcoders@yahoogroups.com, grimmwerks <[EMAIL PROTECTED]> wrote:
>
> I've got an image that I want to have across the top - right now it's
> about 800x80; i'd like this to be pinned right/left and top with the
> height scaling to maintain the aspect ratio for the width --
>
> I've been fiddling, but it doesn't work; any suggestions?
>



[flexcoders] Re: Passing data between components

2007-09-01 Thread Tony
Have you seen my examples here?
http://blog.3alves.com/2007/08/accessing-values-across-components-in.html

Simplified examples, but might give you an idea of a couple of ways to
do it.

Tony

--- In flexcoders@yahoogroups.com, "nextadvantage" <[EMAIL PROTECTED]> wrote:
>
> Hi All;
> 
> I am a front end designer and am having issues trying to get view
> stack ID's from one component into a link bar in another component.
> 
> I have gone through many tutorials but need some help with this
> sample.. . I can't grasp how to get the data from the view
> stack id into the other component.
> 
> Can someone please show me some sample code how to do this, thanks...
>




Re: [flexcoders] Does anyone know what the cause of this problem is

2007-09-01 Thread Tony Alves
If using Flex Builder:
ctrl-shift-F
search the whole workspace for "_accountID".

Sherif Abdou wrote:
> Data binding will not be able to detect assignments to "_accountID".
>
> Data binding will not be able to detect assignments to 
> "_accountID".SalesBuilder/managersWebServiceManager.mxml
> line 100   
>
>
>
> I neither have an _accoundID property nor does my application go up to 
> 100. it goes to 50
>
> 
> Building a website is a piece of cake.
> Yahoo! Small Business gives you all the tools to get online. 
> 
>  
>
>  


Re: [flexcoders] flexbuilder memory

2007-08-31 Thread Tony Alves
Muzak,
That is the tip of the DAY !
I wish I would have asked this question 4 months ago.

Regards,
Tony

Muzak wrote:
>
> Get this Eclipse plugin to free up memory (automatic and forced GC):
> http://www.kyrsoft.com/opentools/stmemmon.html 
> <http://www.kyrsoft.com/opentools/stmemmon.html>
>
> regards,
> Muzak
>
> - Original Message -
> From: "Matt Chotin" <[EMAIL PROTECTED] <mailto:mchotin%40adobe.com>>
> To: mailto:flexcoders%40yahoogroups.com>>
> Sent: Friday, August 31, 2007 6:04 AM
> Subject: RE: [flexcoders] flexbuilder memory
>
> Hi,
>
> We are working hard on this for Flex Builder 3 right now. In the
> meantime I got some pointers from one of the engineers and have put them
> on my blog:
> http://weblogs.macromedia.com/mchotin/archives/2007/08/performance_tip.cfm 
> <http://weblogs.macromedia.com/mchotin/archives/2007/08/performance_tip.cfm>
>
> Matt
>
>
>
>  


Re: [flexcoders] addChild to UITextField?

2007-08-31 Thread Tony Alves
Jon,
Any way we can see the code on the way you did this?  I have a need for 
it, but it is on the back burner for now.  Any insight would be a world 
of help.

Thanks for any insight,
Tony

Jon Bradley wrote:
>
> Thanks for all your help on this guys. I finally figured it all out.  
> Jeez - took long enough. Now I just have to optimize it a bit.
>
>
> The end solution was to wrap it in UIComponent (dumb style 
> propagation). UIComponent is just beefy and way more than I need for 
> this, but it works so I'll live with it for now.
>
> All the work was worth it though, I have a relatively high quality 
> bitmap representation of text that can be rotated, scaled realtime by 
> an end user and I don't have to load a dang font to do it.   Finally.
>
> rock on!
>
> - jon
>
>
>  


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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> 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] Slow Memory Leak with PopUpManager and TitleWindow

2007-08-30 Thread Tony Alves
Unfortunately, this has all been said here and there are some extensive 
threads you can read about what you are talking about.
You can also go read Alex Harui's blog to learn more about what you are 
finding.
blogs.adobe.com/aharui

I know, because I brought the same thing up as you do now.

thegiffman wrote:
>
> Hi Folks,
>
> I've been hunting memory leaks in a large application for my company
> (shame on Adobe for not putting in an option for weak references in
> ChangeWatchers!) and have noticed something. If you use a binding or
> changeWatcher or standard event listener on a popUpWindow, you of course
> get a nasty memory leak. However
>


[flexcoders] Re: Flex 2 Training From the Source

2007-08-28 Thread Tony
Amy,

This may be your place.

Go for it!


--- In flexcoders@yahoogroups.com, "droponrcll" <[EMAIL PROTECTED]>
wrote:
>
> Is there a forum for discussing the examples in Flex 2 Training From 
> the Source?  I have some specific questions, but I don't want to 
> clutter up this forum with stupid newbie questions.
> 
> Thanks;
> 
> Amy
>




Re: [flexcoders] Making custom class data global

2007-08-26 Thread Tony Alves
Don,

I currently use a similar method of authenticating my users in Flex and 
store user access information.
My method might not be the best, but it works well for my configuration. 
I am using modules and other components that check login information.
Here it is:
I store all user data in an object that is a singleton.
I instantiate this class in the main application on initialization and 
set the data once there is a valid login.  I then access this class in 
any of my modules, components, etc throughout the application.  I have 
no problem with the binding, so far.
When the class is instantiated, you always go after the data in a 
getInstance method for the users data.  Every component now sees the 
same exact reference data.

I use this method, because my Flex applications may be authenticated 
already in another Flex application or Web Form and I have an 
initialization process in each application that checks for 
authentication the same exact way.  I extended Application to 
authenticate a user.  The process checks for a valid user login.  If the 
user is logged in already, a call is made to populate the user data into 
the singleton.  If not, the application loads a login module. Once a 
valid login is accomplished, the user data is populated.

There are plenty of examples out there of using a singleton class if you 
do not have one.

Regards,
Tony

donvoltz wrote:
>
> What is the best way to make the data in a custom class globally
> accessible to a multi-component application?
>
> I have a custom component called userlogin that consists of a form and
> connects to a database. When a user correctly logs in, the database
> returns a number of fields of data that I then use to fill the
> properties of a custom class called User, this instantiation of User
> is called currentUser typed as User.
>
> Another component called menuBar is an application control bar that
> allows for various selections based on the users site access level
> (stored in the custom User class) as well as the user name to show who
> is currently logged in.
>
> The problem I am having is how do I access the data stored within this
> custom class? I have set the class itself to Bindable with a metatag
> and also set currentUser to bindable, however, the menuBar component
> does not recognize this.
>
> I am at a loss of how to access this data. I guess I could create a
> custom event dispatcher and send this class data with an event and
> listen for this event in the menuBar component, however, this does not
> seem like the best idea. In this way I would need to store twice as
> much data and consume more resources. Is there another way to use this
> custom class data?
>
> Thanks for any help
>
> Don
>
> _
> .
>
>  


Re: [flexcoders] Re: AIR vs DLL vs. External code?

2007-08-26 Thread Tony Alves
Jeffry,
What about the updates in Flex Builder?  Updates check the internet.

I do agree that not all apps are connected to the internet.


Jeffry Houser wrote:
>
>
> Interesting perspective. I believe it is incorrect. I use many
> desktop applications that do not need /have connectivity. Flex Builder
> is one great example.
>
>   


Re: [flexcoders] Re: Using [Event...] in Custom Classes

2007-08-25 Thread Tony Alves
Ben,
I appologize.  I was way off on this one.  I made a bad assumption based 
on my ignorance.
Do you ever wish you could take back a post?  :)
Tony 

ben.clinkinbeard wrote:
>
> Event metadata is definitely not ignored in AS. Take a look at just
> about any class in the framework and you'll see plenty [Event] tags.
> It is there specifically to provide code hinting and support for
> binding in MXML.
>
> The problem here is that the code completion engine is offering class
> constants that don't exist. They seem to be based on the constant
> value, with some reformatting applied to convert to all uppercase and
> inserting underscores anywhere there is a lowercase next to uppercase.
> So MyEvtClass.FLY = "flyAway" appears in the completion list as
> MyEvtClass.FLY_AWAY
>
> Ben
>
> --- In flexcoders@yahoogroups.com 
> <mailto:flexcoders%40yahoogroups.com>, Tony Alves <[EMAIL PROTECTED]> wrote:
> >
> > Jurgen,
> > I believe the problem here is that you are setting up a metadata tag on
> > your class in actionscript which is not needed and I think it was said
> > that Event meta tags are ignored by the compiler in ActionScript
> > classes. Someone here can clear that up for us. I am not sure why,
> but
> > it is only needed on MXML when setting up an event. Because you are
> > extending your class as an EventDispatcher, you only just need to
> > dispatch the event you are setting up.
> >
> > package components
> > {
> > import flash.events.Event;
> > public class MyClass extends EventDispatcher
> > {
> > public static const MY_EVENT:String = "myEvent";
> >
> > private function myFunction():void
> > {
> > dispatchEvent(new Event(MyClass.MY_EVENT));
> > }
> > }
> > }
> >
> > THEN you can instantiate a MyClass variable and add an event listener:
> > var mine:MyClass = new MyClass();
> > mine.addEventListener(MyClass.MY_EVENT,someHandlerFunction);
> >
> > The code assist is trying to show you the events on the event
> dispatcher
> > and there really is just the two by default (activate and deactivate).
> > Don't ask me why though. I always set up my Event types as constant
> > vars on my class, so I know I need to access them off my class name.
> > This should work the same way for custom Events also.
> >
> > Maybe an adobe flex expert can explain this better than I, but that is
> > my understanding.
> >
> > Regards,
> > Tony
> >
> > P.S. ( you were borrowing (some call it hijacking) another thread and I
> > think it was getting missed.)
> >
> > Jurgen Wrote: >>>>>>>>>>>>>>>>>>>>>>>
> > There seems to be an issue using a custom class' event metadata in an
> > addEventListener statement. Here is an example:
> >
> > package com.example
> > {
> >
> > import flash.events.EventDispatcher;
> >
> > [Event(name="myEvent", type="flash.events.Event")]
> >
> > public class MyClass extends EventDispatcher
> > {
> >
> > // class code
> >
> > private function myFunction():void
> > {
> > dispatchEvent(new Event("myEvent"));
> > }
> >
> > }
> >
> > }
> >
> > When using an instance of that class and creating an addEventListener in
> > code (not using it with MXML tags) Flex Builder's code assist lists the
> > event, but splits it apart and shows it as Event.MY_EVENT.
> >
> > That of course throws a compiler error.
> >
> > Is this by design and how would we work with an event in a custom class
> > using the [Event...] metatag?
> >
> > I haven't checked to see if this is different with a custom event. I'll
> > check on that next, but I wanted to see if anyone has run into this
> > problem before.
> >
> > Thanks,
> >
> > Jurgen
> >
>
>  


Re: [flexcoders] Re: Using [Event...] in Custom Classes

2007-08-25 Thread Tony Alves
ok, I see your point.  I did not look at it that way. So, it is a bug then.

ben.clinkinbeard wrote:
>
> Event metadata is definitely not ignored in AS. Take a look at just
> about any class in the framework and you'll see plenty [Event] tags.
> It is there specifically to provide code hinting and support for
> binding in MXML.
>
> The problem here is that the code completion engine is offering class
> constants that don't exist. They seem to be based on the constant
> value, with some reformatting applied to convert to all uppercase and
> inserting underscores anywhere there is a lowercase next to uppercase.
> So MyEvtClass.FLY = "flyAway" appears in the completion list as
> MyEvtClass.FLY_AWAY
>
> Ben
>
> --- In flexcoders@yahoogroups.com 
> <mailto:flexcoders%40yahoogroups.com>, Tony Alves <[EMAIL PROTECTED]> wrote:
> >
> > Jurgen,
> > I believe the problem here is that you are setting up a metadata tag on
> > your class in actionscript which is not needed and I think it was said
> > that Event meta tags are ignored by the compiler in ActionScript
> > classes. Someone here can clear that up for us. I am not sure why,
> but
> > it is only needed on MXML when setting up an event. Because you are
> > extending your class as an EventDispatcher, you only just need to
> > dispatch the event you are setting up.
> >
> > package components
> > {
> > import flash.events.Event;
> > public class MyClass extends EventDispatcher
> > {
> > public static const MY_EVENT:String = "myEvent";
> >
> > private function myFunction():void
> > {
> > dispatchEvent(new Event(MyClass.MY_EVENT));
> > }
> > }
> > }
> >
> > THEN you can instantiate a MyClass variable and add an event listener:
> > var mine:MyClass = new MyClass();
> > mine.addEventListener(MyClass.MY_EVENT,someHandlerFunction);
> >
> > The code assist is trying to show you the events on the event
> dispatcher
> > and there really is just the two by default (activate and deactivate).
> > Don't ask me why though. I always set up my Event types as constant
> > vars on my class, so I know I need to access them off my class name.
> > This should work the same way for custom Events also.
> >
> > Maybe an adobe flex expert can explain this better than I, but that is
> > my understanding.
> >
> > Regards,
> > Tony
> >
> > P.S. ( you were borrowing (some call it hijacking) another thread and I
> > think it was getting missed.)
> >
> > Jurgen Wrote: >>>>>>>>>>>>>>>>>>>>>>>
> > There seems to be an issue using a custom class' event metadata in an
> > addEventListener statement. Here is an example:
> >
> > package com.example
> > {
> >
> > import flash.events.EventDispatcher;
> >
> > [Event(name="myEvent", type="flash.events.Event")]
> >
> > public class MyClass extends EventDispatcher
> > {
> >
> > // class code
> >
> > private function myFunction():void
> > {
> > dispatchEvent(new Event("myEvent"));
> > }
> >
> > }
> >
> > }
> >
> > When using an instance of that class and creating an addEventListener in
> > code (not using it with MXML tags) Flex Builder's code assist lists the
> > event, but splits it apart and shows it as Event.MY_EVENT.
> >
> > That of course throws a compiler error.
> >
> > Is this by design and how would we work with an event in a custom class
> > using the [Event...] metatag?
> >
> > I haven't checked to see if this is different with a custom event. I'll
> > check on that next, but I wanted to see if anyone has run into this
> > problem before.
> >
> > Thanks,
> >
> > Jurgen
> >
>
>  


[flexcoders] Using [Event...] in Custom Classes

2007-08-25 Thread Tony Alves
Jurgen,
I believe the problem here is that you are setting up a metadata tag on 
your class in actionscript which is not needed and I think it was said 
that Event meta tags are ignored by the compiler in ActionScript 
classes.  Someone here can clear that up for us.  I am not sure why, but 
it is only needed on MXML when setting up an event.  Because you are 
extending your class as an EventDispatcher, you only just need to 
dispatch the event you are setting up.

package components
{
import flash.events.Event;
public class MyClass extends EventDispatcher
{
public static const MY_EVENT:String = "myEvent";
   
private function myFunction():void
{
dispatchEvent(new Event(MyClass.MY_EVENT));
}
}
}

THEN you can instantiate a MyClass variable and add an event listener:
var mine:MyClass = new MyClass();
mine.addEventListener(MyClass.MY_EVENT,someHandlerFunction);

The code assist is trying to show you the events on the event dispatcher 
and there really is just the two by default (activate and deactivate).
Don't ask me why though.  I always set up my Event types as constant 
vars on my class, so I know I need to access them off my class name.
This should work the same way for custom Events also.

Maybe an adobe flex expert can explain this better than I, but that is 
my understanding.

Regards,
Tony

P.S. ( you were borrowing (some call it hijacking) another thread and I 
think it was getting missed.)

Jurgen Wrote: >>>>>>>>>>>>>>>>>>>>>>>
There seems to be an issue using a custom class' event metadata in an
addEventListener statement. Here is an example:

package com.example
{

import flash.events.EventDispatcher;

[Event(name="myEvent", type="flash.events.Event")]

public class MyClass extends EventDispatcher
{

// class code

private function myFunction():void
{
dispatchEvent(new Event("myEvent"));
}

}

}

When using an instance of that class and creating an addEventListener in
code (not using it with MXML tags) Flex Builder's code assist lists the
event, but splits it apart and shows it as Event.MY_EVENT.

That of course throws a compiler error.

Is this by design and how would we work with an event in a custom class
using the [Event...] metatag?

I haven't checked to see if this is different with a custom event. I'll
check on that next, but I wanted to see if anyone has run into this
problem before.

Thanks,

Jurgen


[flexcoders] Re: Overriding getters/setters getting compile error

2007-08-25 Thread Tony
Sorry, if it sounded like I meant it was a scoping problem. They just
cannot have the same name for compiler purposes.  I was just pointing
out that you had duplicate property names. Coming from the .NET world
this is very normal for me.  I should have just said "You have a
duplicate property name problem" :)

--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> Please pardon my jumping in here, but I think it may just be more a 
> case of duplicate names than scoping issues.  The compiler identifies 
> a getter function by its name, and the same with a variable.  If you 
> have both a getter and a variable named "widget", how would the 
> compiler be able to tell them apart and know when you wanted just the 
> variable as opposed to executing the getter function?  Prefixing 
> the "_" to the variable name is typical convention for mking the 
> variable and getter/setter distinguishable from each other 
> (e.g., "_widget" is the variable, "widget" is the getter/setter).
> 
> Doug
> 
> --- In flexcoders@yahoogroups.com, "Peter Connolly"  
> wrote:
> >
> > Thanks Tony, although I must admit that I don't understand why this 
> now
> > works.  Why can't the variable and the getter/setter methods be in 
> the same
> > scope?  I don't remember reading anything about that kind of 
> restriction...
> > 
> > 
> > On 8/23/07, Tony Alves  wrote:
> > >
> > >   Your private variable and getter/setter are in the same scope.
> > > try:
> > > private var _widget:String;
> > > override public function get widget():String {
> > > return _widget;
> > > }
> > > override public function set widget(value:String):void {
> > > _widget = value;
> > > }
> > > Peter Connolly wrote:
> > > >
> > > > I get the following compiler errors:
> > > >
> > > > 1021: Duplicate function definition Base.as <http://Base.as>
> > > > line 11
> > > > 1021: Duplicate function definition Base.as <http://Base.as>
> > > > line 14
> > > > 1023: Incompatible override Base.as <http://Base.as>
> > > > line 11
> > > > 1023: Incompatible override Base.as <http://Base.as>
> > > > line 14
> > > >
> > > > If my parent class is:
> > > >
> > > > package
> > > > {
> > > > public class Base
> > > > {
> > > > private var widget:String;
> > > >
> > > > public function Base(value:String = "base-level widget") {
> > > > trace("'Base.as <http://Base.as>' - value of widget is: "
> > > > + this.widget);
> > > > }
> > > >
> > > > public function get widget():String {
> > > > return this.widget;
> > > > }
> > > > public function set widget(value:String):void {
> > > > this.widget = value;
> > > > }
> > > > }
> > > > }
> > > >
> > > > and the class with overriden getters/setters is:
> > > >
> > > > package
> > > > {
> > > > public class OverridenClass extends Base
> > > > {
> > > > public function OverridenClass(value:String = "overriden
> > > > widget value") {
> > > > super(value);
> > > > trace("value of widget is: " + widget);
> > > > }
> > > >
> > > > override public function get widget():String {
> > > > return widget;
> > > > }
> > > > override public function set widget(value:String):void {
> > > > this.widget = value;
> > > > }
> > > >
> > > > }
> > > > }
> > > >
> > > > The lines that are highlighted are the ones marked as errors by 
> the
> > > > compiler under Hotfix3, Flex 2.0.1.
> > > >
> > > > I thought I was following the examples shown on p. 
> 135 "Overriding
> > > > getters and setters" in the Programming ActionScript 3.0 manual.
> > > >
> > > > Can anyone point out to me why this is not working?
> > > >
> > > > __._,_
> > > >
> > >  
> > >
> >
>




[flexcoders] Re: user configuration file

2007-04-12 Thread Tony Obermeit
For the flex application, the configuration of which URLs to access  
etc can come from a single, server side configuration.  That can be  
done however you need to with your server side language.  To pass  
these configuration values in to your swf file, you need to  
dynamically generate the html which calls your swf.  Make sure the  
generation creates javascript variables which have the configuration  
values.  The flex application can read these values. I don't recall  
the syntax to do this but there have been relatively recent posts  
that show how.

Tony

Posted by: "simonjpalmer" [EMAIL PROTECTED]   simonjpalmer
Thu Apr 12, 2007 6:33 am (PST)

check out flex sharedobject

--- In [EMAIL PROTECTED], "lruinelli" <[EMAIL PROTECTED]> wrote:
 >
 > Hello!
 >
 > I'm developing an application which need some configuration parameter
 > to run correctly. E.g. the url of servlet used change frequently (the
 > application is in develop!)...and I have to update every time all the
 > MXML file and recompile the application:-(
 > ...in desktop win application for this kind of configuration I  
usually
 > use somthing like file ".ini" where I put my configuration, wich are
 > loaded by the application:
 > e.g.
 > config.ini:
 > SERVLET_PATH=http://localhost:8080/servlethome/
 >
 > what is the flex-as best pratices for this kind of stuff?
 >
 >
 > thanks
 > Lorenzo
 >


[flexcoders] Re: User authentication

2007-04-05 Thread Tony Obermeit
I've been following this thread with great interest as I need to  
solve same issue.

My understanding is we can set credentials on the HttpService but I  
don't want this to be the username / password entered by the user,  
that is a separate layer.  I want to protect my calls to the  
HttpService even if the user has not logged in, an "anonymous"  
access.  But I don't see how a HTTPS connection solves my issue.   
HTTPS will ensure the communication between the client (browser /  
flash) and the http server is encrypted but it doesn't control what  
the client does with the data it gets back.  If I can implement the  
hashing or encryption logic mentioned in flash, doesn't that mean a  
hacker can implement the exact same code in javascript and then be  
able to access the same secure http call my flash application can?   
If the swf file includes the key used to hash / encrypt, then the swf  
file could be decompiled or otherwise inspected to find the key?

Thanks again guys for perservering with this thread.

Tony

Posted by: "André Rodrigues Pena" [EMAIL PROTECTED]   techbreak2
Thu Apr 5, 2007 2:37 pm (PST)

Thanks again for your help Ray and Peter..

I am actually a little lost. All I want is to guarantee that the user  
name
and password that will go from Flex HTTPService to my JSP web-service  
will
not be intercepted. And I'm also lost about how will I maintain the  
session
with the HTTPService. Cookies dont seem to be possible, URL rewriting is
possible mas I'll have to see how will I do that. At the moment of the
login, my service will have to pass me a key or something like that. (as
someone already mentioned) That I will use along with the other  
services...
I'm lost. lol

[flexcoders] Re: Flex Security Best Practices

2007-04-04 Thread Tony Obermeit
I'm interested in anything you find

One of the solutions I'm looking for is something that lets me set  
credentials on the HttpService object without hard coding the  
credentials in my swf file.

Tony

On 04/04/2007, at 4:07 PM, flexcoders@yahoogroups.com wrote:

> Flex Security Best PracticesPosted by: "supertodda"  
> [EMAIL PROTECTED]   supertoddaTue Apr 3, 2007 6:19 pm (PST)
> Hello,
>
> Are there any high level flex developers out there who have a response
> to this article on Ajax security with regards to flex?
>
> AJAX Apps Ripe Targets for JavaScript Hijacking
> http://www.eweek.com/article2/0,1895,2110554,00.asp
>
> Is Flex vulnerable to such types of attacks? Is there a Flex Security
> consortium, similar to the PHP security consortium that gives best
> practices regarding secure code and data requests?
>
> Thanks.



[flexcoders] Re: FlexBuilder Keyboard Not Responsive on the Mac

2007-04-03 Thread Tony Obermeit
I've got a 1.5ghz G4 powerbook with 1.5gb RAM and the first  
application I've used that made me think this machine is slow and  
needs upgrading is flexbuilder.

sometimes the keyboard doesn't keep up with my typing, etc.


Re: [flexcoders] Flex on a SmartPhone?

2007-03-29 Thread Tony
yea, ive googled and re-googled and cant seem to find
anything on this...i built a simple flash app and made it a 7.0
player app, and tried to load it up in my smartphone (motorola q)
and it wouldnt even load, so, again, i just dont know where
to start with this, but knowing that flex 2.0 requires fp9, it seems
like adobe needs to come up to speed on this...

tw

On 29 Mar 2007 07:24:43 -0700, Tom Chiverton
<[EMAIL PROTECTED]> wrote:
> On Thursday 29 Mar 2007, Cutter (Flex Related) wrote:
> > You would think that this should be possible, as a Flex app is basically
> > a Flash file on the front end.
>
> Flash lite != Flash
> There's a list of the bit's it's missing, but I can't find it at the mo.
>
> --
> Tom Chiverton
> Helping to confidentially disintermediate B2C customers
> on: http://thefalken.livejournal.com
>
> 
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England and 
> Wales under registered number OC307980 whose registered office address is at 
> St James's Court Brown Street Manchester M2 2JF.  A list of members is 
> available for inspection at the registered office. Any reference to a partner 
> in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by 
> the Law Society.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and may 
> be confidential or legally privileged.  If you are not the addressee you must 
> not read it and must not use any information contained in nor copy it nor 
> inform any person other than Halliwells LLP or the addressee of its existence 
> or contents.  If you have received this email in error please delete it and 
> notify Halliwells LLP IT Department on 0870 365 8008.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>


-- 
'Never have anything in your life that you can't walk out on in thirty
seconds flat, if you spot the heat coming around the corner'

robert deniro - heat (1995)


[flexcoders] Flex on a SmartPhone?

2007-03-29 Thread Tony

hola peeps.

is it possible, or should i bark up another
tree, to build small flex applications, that could
run on a SmartPhone or PocketPC running Windows
Mobile 5.0 and Flashlite 2.1

is there a way to convert a flex app's swfs into flashlite apps?

or am i simply crazy?

:) oh, and good morning all.

tw


[flexcoders] Re: Is anybody else getting duplicate messages?

2007-03-29 Thread Tony Obermeit
I can assure you that isn't the only explanation.  I posted my first  
question only once and it appeared twice.  I'm very sure I sent it  
only once.

Tony

On 29/03/2007, at 6:22 PM, flexcoders@yahoogroups.com wrote:

> Re: Is anybody else getting duplicate messages?Posted by: "Maury  
> Sword" [EMAIL PROTECTED]   maury.swordThu Mar 29,  
> 2007 12:42 am (PST)
> I believe people are posting messages multiple times. There can be
> quite a delay between the time a message is posted and it finally
> appears here on the list. I know I did this at first. Do messages
> from new members have to be approved by a moderator before they are
> posted ? After I made several valid posts this delay was much less.



[flexcoders] Re: Flex access to cookies

2007-03-28 Thread Tony Obermeit
Thanks a lot! :-) - any code snippets to guide me as to how to do  
that, or links to related examples?

Tony

Posted by: "Clint Tredway" [EMAIL PROTECTED]   clinttredway
Tue Mar 27, 2007 5:33 pm (PST)

pass in the cookie value thru the flashVars.

On 3/27/07, Tony Obermeit <[EMAIL PROTECTED]> wrote:
 >
 > I need to access the cookies already created in the browser in order
 > to determine if the user has been authenticated using oracle single
 > sign on.
 >
 > 1. Which flash object / class do I use to access the cookies?
 >
 > 2. Anyone have tips / code to share that they've used to authenicate
 > user with oracle sso?
 >
 > Thanks
 >
 > Tony
 >
 >



[flexcoders] Flex access to cookies

2007-03-27 Thread Tony Obermeit
I need to access the cookies already created in the browser in order  
to determine if the user has been authenticated using oracle single  
sign on.

1.  Which flash object / class do I use to access the cookies?

2. Anyone have tips / code to share that they've used to authenicate  
user with oracle sso?

Thanks

Tony


[flexcoders] Slideshow problem: Preloading a hidden image resets its visible property

2007-03-06 Thread Tony Wu
Hi I am creating a slideshow that display images from a RSS feed. It has
two images overlapping each other.  The logic is simple: When one image
is shown, I preload the next image in the hidden second image, then I
flip them on a timer with fade in/out effects.

The problem I have is: For the hidden image, although the image.visible
property is set to false. when preloading a new image 
image.load(newImageURL), the image will become visible (not hidden) -
although I can reset it to invisible right away, however, this produce a
quick screen flicker. I guess when loading anew  image,  Flex is
recreating a brand new object while discarding original properties.

How can I keep the image hidden? Or is there a better approach with
doing fade in/out in picture slideshow?

Thanks for your time and efforts.


http://www.adobe.com/2006/mxml";
layout="absolute" width="100%" height="100%" creationComplete="init()"
horizontalScrollPolicy="off" verticalScrollPolicy="off">





 
 
 
 
 
 


//=== here's the code for doing the preloading / flipping, all g are
global variables

 public function doTimerEvent(evt:TimerEvent):void {
 slideshow();
 }

 public function slideshow():void {

 if(!gImageInitialized) {  //== initialize for one time only
 imgCaption1 = loadNextImage(pictureImg);
 gPictureCaption = imgCaption1;
 gImageInitialized = true;
 }

 if(!gImageFlip) {   // now do the image flipping, we preload
the next picture so it's smooth
 gPictureCaption = imgCaption1;
 pictureImg.visible = true;
 pictureImg2.visible = false;
 imgCaption2 = loadNextImage(pictureImg2);
 } else {
 gPictureCaption = imgCaption2;
 pictureImg2.visible = true;
 pictureImg.visible = false;
 imgCaption1 = loadNextImage(pictureImg);
 }
 gImageFlip = !gImageFlip;

 }

 public function loadNextImage(imageObj:Object):String {
 gImageIndex++;
 if(gImageIndex>=gImageArray.length) gImageIndex = 1;
 var newImgSrc:String = gImageArray[gImageIndex].sizedURL;
 if(newImgSrc!="") {
 imageObj.load(newImgSrc);
 imageObj.visible = false;
 }
 return gImageArray[gImageIndex].caption;
 }




[flexcoders] Newbie question: Datagrid and a WS

2007-01-29 Thread Tony

hola peeps!

im a newbie, so please bear with me...


http://www.adobe.com/2006/mxml";
layout="vertical">
   http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl";>
   
   
   1
   
   
   
   
   
   
   
   
   
   


is my webservice tag, and the resulting dataProvider param of the
mx:datagrid tag, right?
im close on getting data into a datagrid from a WS, i just want to make
sure...
im getting the datagrid with no data in it??

thanks for all your help!
and hello, im a newbie, but learning fast :)

tony weeg
navtrak, inc.
[EMAIL PROTECTED]


RE: [flexcoders] file download doesnt work?

2006-12-12 Thread Tony Dulin

Dimitrios,

 import flash.net.*;

 Use the  sendToURL(urlRequest) command.

Tony D


Dimitrios Gianninas <[EMAIL PROTECTED]> wrote:  
   
Yup tried that too :) I've tried GET, POST and using the  servername, localhost 
and my direct IP, no go.
  
 If I call my servlet directly in a browser, the download  works like a charm:
 http://localhost:7001/billing/servlet/FileSvlt?operation=DOWNLOAD&fileID=5
  
 I'm sure its something very very small.., any kind of debug  I can turn on?
  
 Dimitrios  Gianninas
 RIA  Developer
 Optimal  Payments Inc.
  

  
-
 From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of Brian 
 Holmes
Sent: Tuesday, December 12, 2006 4:34 PM
To:  flexcoders@yahoogroups.com
Subject: RE: [flexcoders] file download  doesnt work?


 
   
Not Sure if this will work Dimitrios,
  But I seem to  remember having similar issues and reading  somewhere that the 
constructor of the Url Request expected a url as a  string.
  
  var  req:URLRequest = new  URLRequest("http://localhost: 7001/billing/  
servlet/FileSvlt ") ;
 req.method = URLRequestMethod.  GET;
 req.data =  new  URLVariables("operation=DOWNLOAD ");
 try {
   var fr:FileReference = new  FileReference( );
   fr.download( req );
 }
 catch( e:Error ) {
   trace( "Download error: " +  e.message );
 }

  
  
  
 I  double checked some code of mine and that's exactly how i got it working.  
Anyways, like I said, not sure if it will help,
 You probably have already tried it.
  
 Brian..

  
-
 From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of 
Dimitrios  Gianninas
Sent: Tuesday, December 12, 2006 2:22 PM
To:  flexcoders@yahoogroups.com
Subject: RE: [flexcoders] file  download doesnt work?


 
 Yup tried that too... I'm perplexed!
  
 Dimitrios  Gianninas
 RIA  Developer
 Optimal  Payments Inc.
  

  
-
 From: flexcoders@yahoogroups.com  [mailto:[EMAIL PROTECTED] On Behalf Of Valy  
Sivec
Sent: Tuesday, December 12, 2006 10:26 AM
To:  flexcoders@yahoogroups.com
Subject: Re: [flexcoders] file  download doesnt work?


 
   
 How about  changing reg.method="POST" instead GET?.

Valy



 -  Original Message 
From: Dimitrios Gianninas  <[EMAIL PROTECTED]>
To:  flexcoders@yahoogroups.com
Sent: Tuesday, December 12, 2006 9:28:40  AM
Subject: RE: [flexcoders] file download doesnt work?

  
 Ok I switch the code around a bit and it looks more like  this now:
  
 var req:URLRequest =  new URLRequest()  ;
 req.url  = "http://localhost:  7001/billing/ servlet/FileSvlt ";
 req.method =  URLRequestMethod. GET;
 req.data  = new  URLVariables("operation=DOWNLOAD ");
 try {
   var fr:FileReference = new  FileReference( );
   fr.download( req  );
 }
 catch( e:Error )  {
   trace( "Download error: " +  e.message );
 }
  
  
 But it still doesn't work, my Java servlet doesn't get  called at all. I have 
log messages in the service(), doGet() and doPost()  methods and I see nothing. 
My upload works like a charm.
  
  
 Dimitrios  Gianninas
 RIA  Developer
 Optimal  Payments Inc.
  

  
-
 From: [EMAIL PROTECTED] ups.com  [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of Dimitrios  Gianninas
Sent: Monday, December 11, 2006 3:15 PM
To:  [EMAIL PROTECTED] ups.com
Subject: [flexcoders] file download doesnt  work?


 
  
  I have the code below to download a file from my J2EE  server but it doesn't 
work. the dialog box to select the folder and file come  up, click OK and 
nothing happens.
 I see no  log on the server side, meaning it is not calling my servlet. Upload 
 works.
 Any ideas?
 var params:URLVariables = new URLVariables( );
 var  req:URLRequest = new URLRequest("http://localhost: 7001/billing/ 
servlet/FileSvlt  ");
 req.method = URLRequestMethod. GET;
 req.data = new URLVariables("operation=DOWNLOAD&fileId=2");
 
 var fr:FileReference =  new FileReference(  );
 fr.download( req, "bla.txt" );

  
 Dimitrios  Gianninas
 RIA  Developer
 Optimal  Payments Inc.
  
   AVISIMPORTANT
WARNING
   Ce messageélectronique et ses pièces jointes peuvent 
contenir des renseignementsconfidentiels, exclusifs ou légalement 
privilégiés destinés au seul usagedu destinataire visé. L’expéditeur 
original ne renonce à aucun privilègeou à aucun autre droit si le 
présent message a été transmisinvolontairement ou s’il est retransmis 
sans son autorisation. Si vousn’êtes pas le destinataire visé du 
présent message ou si vous l’avez reçupar erreur, veuillez cesser 
immédiatement de le lire et le supprimer,ainsi que toutes ses pièces 
jointes, de votre système. La lecture, ladistribution, la copie

[flexcoders] test 4

2006-12-07 Thread Tony




[flexcoders] Re: Total rows in a DataGrid

2006-11-02 Thread Tony Wu
Yes, that worked! It's so simple it pains me for not figuring it out
sooner.

Thanks very much!

--- In flexcoders@yahoogroups.com, "Iko Knyphausen" <[EMAIL PROTECTED]> wrote:
>
> Try dataProvider.length
>
> -Iko
>
> Hi, this is a newbie question:
>
> I have a data grid that base data from a HTTPService (RSS feed), which
> loaded OK.
>
> How do I find out how many total rows are in the DataGrid? (ie.
something
> like newsFeed.items.length etc.)
>
>  dataProvider="{externalNewsRSS.lastResult.rss.channel.item}"
> visible="false">
> 
>showDataTips="true"/>
> 
> 
>
> I searched documentation and forums but don't seem to find an answer.
Thanks
> for your help!
>
> Tony
>





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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

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



[flexcoders] Total rows in a DataGrid

2006-11-01 Thread Tony Wu



Hi, this is a newbie question:I have a data grid that base data from a HTTPService (RSS feed), which loaded OK.How do I find out how many total rows are in the DataGrid? (ie. something like newsFeed.items.length etc.)  I searched documentation and forums but don't seem to find an answer. Thanks for your help!Tony

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



RE: [flexcoders] A bit too ambitious?

2006-07-07 Thread Tony Pujals












Ambitious, yes! Appropriate, absolutely! Fun,
definitely! ;-)

 

I’m working on a Flex-based bliki front
end myself (PHP on the back end). Good luck!

 

-Tony



 

 

tony pujals| senior engineer | Yahoo!
Small Business

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id
tonypujals

 



 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of David Mendels
Sent: Friday, July 07, 2006 1:52
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] A bit
too ambitious?



 







Hi,

This is a great use of Flex.

Regards,
David 

> -Original Message-
> From: [EMAIL PROTECTED]ups.com

> [mailto:[EMAIL PROTECTED]ups.com]
On Behalf Of Sam
> Sent: Friday, July 07, 2006 4:05 PM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] A bit too ambitious?
> 
> Hi first of all let me preface this by saying that I am new 
> to Flex and programming in general and I have been using Flex 
> for about 2 weeks only I love it. :)
> 
> I have seen a couple of discussions here about the use of 
> Flex for "web pages" and how some say use it and some say 
> don't. I see where it can make a difference in some cases... 
> hence my question.
> 
> Is it a bit too ambitious to try and use Flex to create a 
> frontend to other software such as Wordpress, Drupal, Xoops, 
> Joomla! and the slew of other CMS that mainly rely on XHTML 
> and PHP for their front end?
> 
> I have made some progress with AMFPHP and remoting... but I 
> have only started so... I have not made it very far yet :) 
> 
> What's your opinion?
> 
> Sincerely,
> Sam
> 
> 
> 
> 
> 
>  Yahoo! Groups Sponsor 
> ~--> Great things are happening at Yahoo!

> Groups. See the new email design.
> http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
> --
> --~-> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 






__._,_.___





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








   



  




  
  
  YAHOO! GROUPS LINKS



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



  






__,_._,___






RE: [flexcoders] Flex2 :: The time has come to ... Push the Button :: Released

2006-06-28 Thread Tony Pujals










Awesome! Congratulations to the entire Adobe
team!

 

J

 

Tony



 

 

tony pujals| senior engineer | Yahoo!
Small Business

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id
tonypujals

 



 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Michael Schmalle
Sent: Tuesday, June 27, 2006 9:03
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2 :: The
time has come to ... Push the Button :: Released



 







Hello
all!

Good day at Adobe, Flex 2 is finally out of beta and a full fledged adult SDK!

I have some pretty good info on the release;

http://www.flex2components.com/f2cblog/2006/06/28/flex2-the-time-has-come-to-push-the-button-released/


Happy trails and lets get this thing implemented!

PS Might take a couple minutes for them to get their site tunned, but it's
here!

Peace, Mike






__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  






__,_._,___






RE: [flexcoders] Flash 8.5 Release -- Vote of Confidence

2006-04-13 Thread Tony Pujals










Hey, this wasn’t a troll! ;-)  No
one has any insight or opinion on this…?  Let me add that I’m extremely
pleased with beta 2 and at this point I’ve pretty much made up my mind to
use it for the project, but if Flash 8.5 ends up being significantly late (eg,
later than July), I will probably be roasted over coals…. So … if
anyone has any reason to believe that I’m being way too optimistic
(foolish), I’d really like to hear sooner than later.



 

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tony Pujals
Sent: Wednesday, April 12, 2006
11:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flash 8.5
Release -- Vote of Confidence



 

I’m starting a new short-term project (6 weeks) for
which we would like to use Flex 2. Realizing that it’s risky to bank on
it, I’m curious as to how many people feel confident that Adobe will
actually release Flash 8.5 in June.  We are simply not going to use Flex
1.5 any more, so the alternative is to not use Flex at all if 8.5 won’t
be available by June….

 

Thanks,

 

Tony

 

tony pujals| senior engineer | Yahoo!
Webhosting

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id
tonypujals

 

 









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





  




  
  
  YAHOO! GROUPS LINKS



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



  











[flexcoders] Flash 8.5 Release -- Vote of Confidence

2006-04-12 Thread Tony Pujals










I’m starting a new short-term project (6 weeks) for
which we would like to use Flex 2. Realizing that it’s risky to bank on
it, I’m curious as to how many people feel confident that Adobe will actually
release Flash 8.5 in June.  We are simply not going to use Flex 1.5 any
more, so the alternative is to not use Flex at all if 8.5 won’t be
available by June….

 

Thanks,

 

Tony

 

tony pujals| senior engineer | Yahoo!
Webhosting

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id
tonypujals

 

 









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





  




  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] RE: ExternalInterface and IFrame

2006-03-28 Thread Tony Pujals










Jeff, that’s awesome! I’ll have
to check to see if it works for Firefox. If it does, I’m going to be very
happy.

 

-Tony



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id
tonypujals

 



 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Battershall, Jeff
Sent: Tuesday, March 28, 2006
11:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] RE:
ExternalInterface and IFrame



 

Tony,

I was able to re-create the behavior you've noted,
but was able to get
the "disappearing Iframe" to stop in IE
when I added wmode=opaque to the
name-value pairs being passed to AC_FL_RunContent
in
index.template.html.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Tony Pujals
Sent: Sunday, March 26, 2006 10:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RE: ExternalInterface and
IFrame


I want to follow up and mention that I'm aware
FileRerence before I get
a lot of suggestions to use it ;-), but I had
other reasons why I wanted
to create a form within an iframe.

In any case, I'm particularly intrigued by the
idea of displaying
content in an iframe managed by an mxml component,
as C. Conraets & B.
Deitte have demonstrated in their articles. What I
did have working of
my page preview inside of a panel looked pretty awesome
-- but for now I
have to live with opening a separate browser
window.

I also forgot to mention that the FireFox
version does occasionally
display the iframe -- flickering like it's
updating umpteen times per
second.




-----Original Message-
From: Tony Pujals 
Sent: Sunday, March 26, 2006 7:10 PM
To: 'flexcoders@yahoogroups.com'
Subject: ExternalInterface and IFrame

I wanted to create an "dialog" as an
html form in an iframe rather than
opening a separate browser window for uploading
image files. I also
wanted to create an html page preview using an
iframe as well.

I spent an entire Sunday working at this and none
of my efforts have
succeeded satisfactorily. I researched the web and
came across Crostophe
Coenrats' article, and after modifying it for Flex
2 / AS3, I still
didn't get no satisfaction. A little more research
and I found Brian
Deitte's update for AS3 as well and tried his
solution, and still no
joy. I tried every variation I could think of,
working with fscommand,
navigateToURL, and of course, ExternalInterface.

It appears that it doesn't matter which strategy
you use. In all cases,
I came close to achieving what I wanted. The
problem even in the
simplest case is that clicking in the iframe, then
clicking outside of
it, causes the iframe to disappear until something
causes the iframe to
refresh with IE, and nada for FireFox (I'm using
IE 6 and FireFox
1.5.0.1 on Windows XP SP2, and of course, Flash
8.5).

Here's a distilled set of the code primarily based
on Conraets/Deitte's
work:


Test.mxml
=

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

  
    http://" />
    
    
  
  
  
    
  




iframe.js
=
function loadIFrame(id, uri) {
    var f =
document.getElementById(id);
    f.style.left = 20;
    f.style.top = 80;
    f.width = 400;
    f.height = 400;
    f.style.visibility =
"visible";
   
top.frames["testFrame"].location.href = "">
    // alert("loadIFrame:
" + id + ", " + uri);
}

function showIFrame(id){
    document.getElementById(id).style.visibility="visible";
    // alert("showIFrame:
" + id);
}

function hideIFrame(){
   
document.getElementById(id).style.visibility="hidden";
  //
alert("hideIFrame: " + id);
}

function moveIFrame(id, x, y, w, h) {
    var
frameRef=document.getElementById(id);
    frameRef.style.left = x;
    frameRef.style.top = y;
    frameRef.width = w;
    frameRef.height = h;
    // alert("moveIFrame:
" + id + " (" + x + ", " + y + width + ", "
+
height + ")"); }

// Ex: type in browser url bar:
// _javascript_:testIFrame("testFrame",
"http://www.cnn.com") function
testIFrame(id, uri) {
    var f =
document.getElementById(id);
    f.style.left = 10;
    f.style.top = 10;
    f.width = 400;
    f.height = 400;
    f.style.visibility =
"visible";
   
top.frames["testFrame"].location.href = "">
}




In the HTML wrapper (I modified
html-template/index.template.html)
===
(In the  element)




(At the end of the  element)


 
frameborder="0"
  
style="position:absolute;background-color:transparent;border:0px;visibil
ity:visible;">







The _javascript_ testIFrame function is there just
to demonstrate that
even with a completely empty application, like
this.

[flexcoders] RE: ExternalInterface and IFrame

2006-03-27 Thread Tony Pujals
I want to follow up and mention that I'm aware FileRerence before I get
a lot of suggestions to use it ;-), but I had other reasons why I wanted
to create a form within an iframe.

In any case, I'm particularly intrigued by the idea of displaying
content in an iframe managed by an mxml component, as C. Conraets & B.
Deitte have demonstrated in their articles. What I did have working of
my page preview inside of a panel looked pretty awesome -- but for now I
have to live with opening a separate browser window.

I also forgot to mention that the FireFox version does occasionally
display the iframe -- flickering like it's updating umpteen times per
second.

 


-Original Message-
From: Tony Pujals 
Sent: Sunday, March 26, 2006 7:10 PM
To: 'flexcoders@yahoogroups.com'
Subject: ExternalInterface and IFrame

I wanted to create an "dialog" as an html form in an iframe rather than
opening a separate browser window for uploading image files. I also
wanted to create an html page preview using an iframe as well.

I spent an entire Sunday working at this and none of my efforts have
succeeded satisfactorily. I researched the web and came across Crostophe
Coenrats' article, and after modifying it for Flex 2 / AS3, I still
didn't get no satisfaction. A little more research and I found Brian
Deitte's update for AS3 as well and tried his solution, and still no
joy. I tried every variation I could think of, working with fscommand,
navigateToURL, and of course, ExternalInterface.

It appears that it doesn't matter which strategy you use. In all cases,
I came close to achieving what I wanted. The problem even in the
simplest case is that clicking in the iframe, then clicking outside of
it, causes the iframe to disappear until something causes the iframe to
refresh with IE, and nada for FireFox (I'm using IE 6 and FireFox
1.5.0.1 on Windows XP SP2, and of course, Flash 8.5).

Here's a distilled set of the code primarily based on Conraets/Deitte's
work:


Test.mxml
=

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

  
http://"; />


  

  

  




iframe.js
=
function loadIFrame(id, uri) {
var f = document.getElementById(id);
f.style.left = 20;
f.style.top = 80;
f.width = 400;
f.height = 400;
f.style.visibility = "visible";
top.frames["testFrame"].location.href = uri;
// alert("loadIFrame: " + id + ", " + uri);
}

function showIFrame(id){
document.getElementById(id).style.visibility="visible";
// alert("showIFrame: " + id);
}

function hideIFrame(){
document.getElementById(id).style.visibility="hidden";
// alert("hideIFrame: " + id);
}

function moveIFrame(id, x, y, w, h) {
var frameRef=document.getElementById(id);
frameRef.style.left = x;
frameRef.style.top = y;
frameRef.width = w;
frameRef.height = h;
// alert("moveIFrame: " + id + " (" + x + ", " + y + width + ", " +
height + ")");
}

// Ex: type in browser url bar:
// javascript:testIFrame("testFrame", "http://www.cnn.com";)
function testIFrame(id, uri) {
var f = document.getElementById(id);
f.style.left = 10;
f.style.top = 10;
f.width = 400;
f.height = 400;
f.style.visibility = "visible";
top.frames["testFrame"].location.href = uri;
}




In the HTML wrapper (I modified html-template/index.template.html)
===
(In the  element)




(At the end of the  element)









The javascript testIFrame function is there just to demonstrate that
even with a completely empty application, like this...


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


...after you load the app in the browser, you can enter this in the url
bar:

javascript:testIFrame("testFrame", "http://www.cnn.com";)


...and still get weird behavior.



If Adobe provides robust iframe support, that would really, really be
awesome. What did actually work really whetted my appetite. This opens
the door to some very coolly hybrid UIs and I hope it is something they
can get fixed very soon. I know it would impress a lot of other people
at my own work


-Tony


 
tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id tonypujals
 



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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] ExternalInterface and IFrame

2006-03-27 Thread Tony Pujals
I wanted to create an "dialog" as an html form in an iframe rather than
opening a separate browser window for uploading image files. I also
wanted to create an html page preview using an iframe as well.

I spent an entire Sunday working at this and none of my efforts have
succeeded satisfactorily. I researched the web and came across Crostophe
Coenrats' article, and after modifying it for Flex 2 / AS3, I still
didn't get no satisfaction. A little more research and I found Brian
Deitte's update for AS3 as well and tried his solution, and still no
joy. I tried every variation I could think of, working with fscommand,
navigateToURL, and of course, ExternalInterface.

It appears that it doesn't matter which strategy you use. In all cases,
I came close to achieving what I wanted. The problem even in the
simplest case is that clicking in the iframe, then clicking outside of
it, causes the iframe to disappear until something causes the iframe to
refresh with IE, and nada for FireFox (I'm using IE 6 and FireFox
1.5.0.1 on Windows XP SP2, and of course, Flash 8.5).

Here's a distilled set of the code primarily based on Conraets/Deitte's
work:


Test.mxml
=

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

  
http://"; />


  

  

  




iframe.js
=
function loadIFrame(id, uri) {
var f = document.getElementById(id);
f.style.left = 20;
f.style.top = 80;
f.width = 400;
f.height = 400;
f.style.visibility = "visible";
top.frames["testFrame"].location.href = uri;
// alert("loadIFrame: " + id + ", " + uri);
}

function showIFrame(id){
document.getElementById(id).style.visibility="visible";
// alert("showIFrame: " + id);
}

function hideIFrame(){
document.getElementById(id).style.visibility="hidden";
// alert("hideIFrame: " + id);
}

function moveIFrame(id, x, y, w, h) {
var frameRef=document.getElementById(id);
frameRef.style.left = x;
frameRef.style.top = y;
frameRef.width = w;
frameRef.height = h;
// alert("moveIFrame: " + id + " (" + x + ", " + y + width + ", " +
height + ")");
}

// Ex: type in browser url bar:
// javascript:testIFrame("testFrame", "http://www.cnn.com";)
function testIFrame(id, uri) {
var f = document.getElementById(id);
f.style.left = 10;
f.style.top = 10;
f.width = 400;
f.height = 400;
f.style.visibility = "visible";
top.frames["testFrame"].location.href = uri;
}




In the HTML wrapper (I modified html-template/index.template.html)
===
(In the  element)




(At the end of the  element)









The javascript testIFrame function is there just to demonstrate that
even with a completely empty application, like this...


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


...after you load the app in the browser, you can enter this in the url
bar:

javascript:testIFrame("testFrame", "http://www.cnn.com";)


...and still get weird behavior.



If Adobe provides robust iframe support, that would really, really be
awesome. What did actually work really whetted my appetite. This opens
the door to some very coolly hybrid UIs and I hope it is something they
can get fixed very soon. I know it would impress a lot of other people
at my own work


-Tony


 
tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id tonypujals
 



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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Extending MXML components (change from 1.5 to 2)

2006-03-23 Thread Tony Pujals











Thank you very much for the response –
you have no idea how timely it is for us internally. I’ve been a strong
advocate for Flex 2. Unfortunately, I can’t say more on a public list,
but I would be very interested in having a private dialog about some of the barriers
that are affecting our direction.

 

Best regards,

 

Tony

 



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id tonypujals

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Basil Hosmer
Sent: Thursday, March 23, 2006
6:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
Extending MXML components (change from 1.5 to 2)



 



Tony,

 

Yes, we absolutely intend to continue supporting extending MXML
with MXML, with the constraint that only one set of children be specified
anywhere in the chain of derived components or the component instantiation. 

 

What you’re seeing is a bug in beta 2 – the framework
incorrectly raises the “multiple sets of children in base and derived
components” error in cases where the superclass (A.mxml in your example)
in fact has no children.

 

This will be fixed for beta 3; the workaround in beta 2 is to
insert the following  code into the superclass, e.g. A.mxml:

 



/**

 * 
This namespace is used for undocumented APIs -- usually implementation

 * 
details -- which can't be private because they need to visible

 * 
to other classes.

 * 
APIs in this namespace are completely unsupported and are likely to

 * 
change in future versions of Flex.

 */

namespace
mx_internal = "http://www.adobe.com/2006/flex/mx/internal";

 

override
mx_internal function
setDocumentDescriptor(desc:mx.core.UIComponentDescriptor):void

{

  
if (mx_internal::_documentDescriptor &&
mx_internal::_documentDescriptor.properties.childDescriptors)

  
{

 
if (desc.properties.childDescriptors)

 
{


throw new Error("Multiple sets of visual children have been specified for
this component (base component definition and derived component
definition).");

 
}

  
}

  
else

  
{

 
mx_internal::_documentDescriptor = desc;

 
mx_internal::_documentDescriptor.document = this;

  
}

}



 

Basil

 









From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Tony Pujals
Sent: Wednesday, March 22, 2006
6:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Extending
MXML components (change from 1.5 to 2)



 



In Flex 1.5,
you could create an MXML component and then extend it with another custom
component. For example, this would work:

 



A.mxml









 

 



B.mxml





   




 

 



Test.mxml





   




 

 

 

 

How was this
useful? Well, for example, for an HTML page editor, we had an Element.mxml
component subclassed by ImageElement.mxml and TextElement.mxml.

 

This does not
work with any of the Flex 2 alpha/betas. Flash 8.5 displays this diagnostic:

 

Error:
Multiple sets of visual children have been specified for this component (base
component definition and derived component definition)

   
at
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::setDocumentDescriptor()

   
at A/initialize()

   
at B/initialize()

   
at
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::rawChildAdded()

   
at mx.core::UIComponent/addChildAt()

   
at mx.core::Container/addChild()

   
at mx.core::Container/createComponentFromDescriptor()

   
at mx.core::Container/createComponentsFromDescriptors()

   
at mx.core::Application/createComponentsFromDescriptors()

   
at mx.core::Container/mx.core:Container::createChildren()

   
at mx.core::UIComponent/initialize()

   
at mx.core::Container/initialize()

   
at mx.core::Application/initialize()

   
at flextest/initialize()

   
at mx.managers::SystemManager/::initializeChild()

   
at mx.managers::SystemManager/::initializeTopLevelWindow()

   
at mx.managers::SystemManager/::frameEndHandler()

 

 

 

It’s
not that the error message isn’t clear, per se, but since this is
different behavior, I’m curious …. Can you only extend mx
components but not you’re own, or this only possible with ActionScript
components and not mxml….?

 

Thanks,

 

Tony

 

 

tony pujals| senior engineer | Yahoo! SiteBuilder Express

p. 408.349.6284 | e. tonyp
* yahoo-inc * com | y!id tonypujals

 

 



 














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





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoder

[flexcoders] Extending MXML components (change from 1.5 to 2)

2006-03-22 Thread Tony Pujals











In Flex 1.5, you could create an MXML component and then
extend it with another custom component. For example, this would work:

 



A.mxml









 

 



B.mxml





    



 

 



Test.mxml





    



 

 

 

 

How was this useful? Well, for example, for an HTML page
editor, we had an Element.mxml component subclassed by ImageElement.mxml and
TextElement.mxml.

 

This does not work with any of the Flex 2 alpha/betas. Flash
8.5 displays this diagnostic:

 

Error: Multiple sets of visual children have been specified
for this component (base component definition and derived component definition)

    at
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::setDocumentDescriptor()

    at
A/initialize()

    at
B/initialize()

    at
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::rawChildAdded()

    at
mx.core::UIComponent/addChildAt()

    at
mx.core::Container/addChild()

    at
mx.core::Container/createComponentFromDescriptor()

    at
mx.core::Container/createComponentsFromDescriptors()

    at
mx.core::Application/createComponentsFromDescriptors()

    at
mx.core::Container/mx.core:Container::createChildren()

    at
mx.core::UIComponent/initialize()

    at
mx.core::Container/initialize()

    at
mx.core::Application/initialize()

    at
flextest/initialize()

    at
mx.managers::SystemManager/::initializeChild()

    at
mx.managers::SystemManager/::initializeTopLevelWindow()

    at
mx.managers::SystemManager/::frameEndHandler()

 

 

 

It’s not that the error message isn’t clear, per
se, but since this is different behavior, I’m curious …. Can you
only extend mx components but not you’re own, or this only possible with ActionScript
components and not mxml….?

 

Thanks,

 

Tony

 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id
tonypujals

 

 












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





  




  
  
  YAHOO! GROUPS LINKS



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



  









RE: >< [flexcoders] Starting a Project Now! FLEX 1.5 or 2.0?

2006-03-20 Thread Tony Pujals










Regarding the comment on Flash penetration
below, I don’t know how representative this is of the entire browser
market, but my experience with getting users to upgrade has been positive to
date. The other day I was giving a demo and speaking to a person over the phone
who was prompted to update his flash player version; he immediately did so
without problem, restarted his browser and within a moment was ready to proceed
with the demo.

 

Personally, I’ve never seen a user
balk when the browser prompted him/her to upgrade Flash. It certainly isn’t
the same proposition that updating the Java plugin is. I can’t speak
officially, but I don’t see upgrading to Flash 8.5 being a reason to be
reluctant to exploit the new player and all that Flex 2.0 brings to the table.
I have an impression that quite a few users never upgrade Flash for the same
reason they don’t upgrade Acrobat reader. They simple haven’t been
prompted to do so for any of the content they have accessed, or didn’t
feel the content was compelling enough to tempt them.

 

I’m sure some people might be put
off by it, and I realize there are admins out there who actively prohibit ActiveX
(and upgrades), but if it really is a huge showstopper, I’d really like
to hear some evidence of that. It would be good to factor that into our
internal decision making processes, but for now I would say that from an
engineering and product management perspective, we’re not the only ones
eagerly awaiting the 8.5 release.

 

My 2 cents only….

 



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id tonypujals

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richie Rich
Sent: Monday, March 20, 2006 9:51
AM
To: flexcoders@yahoogroups.com
Subject: Re: >< [flexcoders]
Starting a Project Now! FLEX 1.5 or 2.0?



 

Hello people,

Thanks for all the input on this topic. I am fine
with the Flash
Player 8.5 issue as I will be controlling access
to this first project
and can supply the users with the correct player.

The second project will not launch until the end
of the year at best.

Now as far as the "High" cost of
"FLEX". We are already a member of
the enterprise solutions and the development
program with Adobe and We
have already made the choice to partner with Adobe
on various other
software, So I do not think we should have a
problem with FES.

Although I would like to see a bundle created with
FES, Media Server2,
ColdFusion, and Breeze. LOL


Rich


--- In flexcoders@yahoogroups.com, Andriy Panas
<[EMAIL PROTECTED]> wrote:
>
> Hello all,
> 
>   Besides required * HIGH*
licensing cost of Flex 1.5 software, which is
> immediately "no-win" option for
most of independent developers and small
> software companies, what do you think about
penetration rate speed in
> the nearest future of Flash 8.5 player?
> 
>   ARE you all OK with a fact that
your Flex 2 based web application
> launched in the summer 2006 will require from
almost 90%-95% of your
potentials visitors to upgrade to
> Flash 8.5 player prior to the launch of your
web application?
> 
> 
> 
> -- 
> Best regards,
>  Andriy   
mailto:[EMAIL PROTECTED]
>












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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] Re: Muliple flex apps on tomcat

2006-03-16 Thread Tony Pujals










I second Dave’s recommendation
regarding pre-compilation. Our team ran into the same issues with OutOfMemoryErrors
thrown on our linux servers (never on any of the Windows machines). The
solution was to deploy pre-compiled SWFs.

 



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc * com | y!id tonypujals

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave Wolf
Sent: Wednesday, March 15, 2006
8:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Muliple
flex apps on tomcat



 

You can run many web apps
that serve SWF content.  However, I would
seriously avoid the JIT compilation in favor of
pre-compiling your SWF
files.  That SWF compiler leaks pretty
heavily in 1.5.  

In nay case, you should be able to do what you are
trying here.  I am
curious why you want to run these as seperate web
apps?  Whats the value?

I would really encourage you to look into
pre-compiling the SWFs.

-- 
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com

Email:  [EMAIL PROTECTED]
Office: 866-CYNERGY


--- In flexcoders@yahoogroups.com, Jeff Krueger
<[EMAIL PROTECTED]>
wrote:
>
> All,
>  
> I am trying to run
basically the same web app as two instances
on the same server.  So I have the same wars
but with different
web.xml for config and different db
connections.  But only one of the
apps will start, and when the other web is hit for
the first time I
get a out of memory error
>  
> 2006-03-15 19:30:28
StandardWrapperValve[FlexMxmlServlet]:
Servlet.service() for servlet FlexMxmlServlet
threw exception
> java.lang.OutOfMemoryError
> 
>  
> This is on tomcat 5 and I have the mem config
for it set to -Xms512m
-Xmx1536m
>  
> It won't even create the generated
files?  Can you run two flex apps
on one server?  Should they share
cache?  Should I not dup all the
flex parts for each app.  Both are are 100%
complete.
>  
> Any thoughts or help would be helpful.
>  
> Thanks
>  
> Jeff
>












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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] Flex 2 Style Explorer (beta)

2006-03-16 Thread Tony Pujals
Title: Re: [flexcoders] Flex 2 Style Explorer (beta)










Awesome! Thanks!

 



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc dot com | y!id tonypujals

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Baird
Sent: Wednesday, March 15, 2006
5:45 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 2
Style Explorer (beta)



 

Don’t you worry.
 I’m implementing “view source” into the “beta
2” version that will be released on the heels of Flex 2 beta 2.  

-Peter


On 3/15/06 6:48 PM, "Tony Pujals" <[EMAIL PROTECTED]> wrote:

I agree,
very, very nice. And it would be even nicer if the source code were available
as part of the download. Maybe if enough people post their comments on the
download page to indicate interest..?
 
-Tony
 


 
tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc dot com 
 | y!id tonypujals
 







From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of João Fernandes
Sent: Tuesday, March 14, 2006 9:00
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2
Style Explorer (beta)

Hi there, 
 
A very nice job, I just want to make a remark, In the panel option if you set
alpha = 1 so you can use highlight alphas, if you set border style = none you
can see a small white corner. Is this supposed to happen?
 
Regards,
 

João Fernandes
Sistemas
de Informação
Programador Informático
Cofina media

Avenida
João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel (+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED] 








From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Peter Baird
Sent: terça-feira, 14 de Março de
2006 16:38
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2 Style
Explorer (beta)

Just
wanted to let you that Flex 2 Style Explorer (beta) is available for download.
 The usual beta caveats apply.

Read more here:

http://weblogs.macromedia.com/mc/archives/2006/03/flex_2_style_ex.cfm


/ \®   PETER BAIRD
888/   \888
   User
Experience Consultant
88/
 /  \88    Adobe Consulting | Adobe
Systems, Inc
8/
 /8\  \8    275 Grove St. Newton, MA
/
 /888\  \    Office: 617.219.2126 |
Cell: 617.803.6804
  \8\   AIM:
pbaird00 | Y!IM: pbaird00




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


SPONSORED LINKS 


  Web site design development 
   Computer
software development 
   Software
design and development 
   
  Macromedia flex 
   Software
development best practice 
     









YAHOO! GROUPS LINKS 

 


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


 










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

  

 
 SPONSORED LINKS 
  
  Web site design development 
  Computer
software development 
  Software
design and development 
  
  Macromedia flex 
  Software
development best practice 

 
 







YAHOO! GROUPS LINKS 


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



 







 



/ \®   PETER BAIRD
888/   \888
   User
Experience Consultant
88/
 /  \88    Adobe Consulting | Adobe
Systems, Inc
8/
 /8\  \8    275 Grove St. Newton, MA
/
 /888\  \    Office: 617.219.2126 |
Cell: 617.803.6804
  \8\   AIM:
pbaird00 | Y!IM: pbaird00










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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] Flex 2 Style Explorer (beta)

2006-03-15 Thread Tony Pujals
Title: Flex 2 Style Explorer (beta)










I agree, very, very nice. And it would be
even nicer if the source code were available as part of the download. Maybe if
enough people post their comments on the download page to indicate interest..?

 

-Tony

 



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc dot com | y!id tonypujals

 



 









From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of João Fernandes
Sent: Tuesday, March 14, 2006 9:00
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2
Style Explorer (beta)



 

Hi there, 

 

A very nice job, I just want to make a
remark, In the panel option if you set alpha = 1 so you can use highlight
alphas, if you set border style = none you can see a small white corner. Is this supposed to happen?

 

Regards,

 



João Fernandes
Sistemas
de Informação

Programador
Informático
Cofina media

Avenida
João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel
(+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Baird
Sent: terça-feira, 14 de Março de
2006 16:38
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2 Style
Explorer (beta)



 

Just wanted to let
you that Flex 2 Style Explorer (beta) is available for download.  The
usual beta caveats apply.

Read more here:

http://weblogs.macromedia.com/mc/archives/2006/03/flex_2_style_ex.cfm


/ \®   PETER BAIRD
888/   \888
   User
Experience Consultant
88/
 /  \88    Adobe Consulting | Adobe
Systems, Inc
8/
 /8\  \8    275 Grove St. Newton, MA
/
 /888\  \    Office: 617.219.2126 |
Cell: 617.803.6804
  \8\   AIM:
pbaird00 | Y!IM: pbaird00




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





SPONSORED LINKS 




 
  
  Web
  site design development 
  
  
  Computer
  software development 
  
  
  Software
  design and development 
  
 
 
  
  Macromedia
  flex 
  
  
  Software
  development best practice 
  
  
   
  
 


 











YAHOO! GROUPS LINKS 

 


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


 



















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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] Re: Capture events a la the underlying transparent window from PopUpManager

2006-03-15 Thread Tony Pujals










Great suggestion, I’ll definitely
give it a shot on my end … much appreciated, thanks!

 



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc dot com | y!id tonypujals

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dopenhagen
Sent: Tuesday, March 14, 2006 4:13
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Capture
events a la the underlying transparent window from PopUpManager



 

Hi Everybody,

If its a hack, workaround or the way its suppose
to work does not 
matter as I have found a solution that works.

Just as the documentation for the PopUpManager
suggests, the solution 
is to put a independent layer underneath the layer
containing the 
components and then disable this layer. This
disabling will 
eventually intercept all user input and discard
them as it is 
disabled.

Thanks anyways for the help everybody.

Cheers,
Pedro

--- In flexcoders@yahoogroups.com,
"dopenhagen" <[EMAIL PROTECTED]> 
wrote:
>
> Hi Everybody,
> 
> Thanks for your help.
> However, before I raise the white flag I jsut
want to make I am not 
> missing anything...
> 
> Excempt from the documentation for the
UIObject mouseDown event:
> 
> "...The event will only be broadcast by
the component if the mouse 
is 
> not also over a child of the component that
has a mouseDown 
listener, 
> or the component is not obscured by another
component with a 
> mouseDown listener..."
> 
> They way I interpret that is that it should
not propagate if
> there is a handler registered?
> 
> Please let me know if I am minunderstanding
anyting ?
> 
> Best regards,
> Pedro
> 
> --- In flexcoders@yahoogroups.com,
"Gordon Smith"  wrote:
> >
> > Like Manish, I'm also rusty now on 1.5,
but my recollection is 
the 
> same:
> > Setting event.bubbles = false in your
Panel's mouseDown handler 
> should
> > prevent it from bubbling up the parent
chain.
> > 
> > And if this doesn't work and we can't
figure out how to prevent 
the
> > bubbling, then you could put protection
code in the ancestors' 
mouse
> > handlers to check whether event.target
is what you expect it to 
be.
> > 
> > In Flex 2.0, you can use event.stopPropagation()
or
> > event.stopImmediatePropagation() to
prevent the bubbling. The 
> difference
> > is that stopPropagation() will allow the
remaining handlers on 
the 
> same
> > object to execute.
> > 
> > - Gordon
> > 
> > 
> > -Original Message-
> > From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of Manish Jethani
> > Sent: Monday, March 13, 2006 8:09 AM
> > To: flexcoders@yahoogroups.com
> > Subject: Re: [flexcoders] Re: Capture
events a la the underlying
> > transparent window from PopUpManager
> > 
> > On 3/13/06, dopenhagen
 wrote:
> > 
> > > Sorry, no - its actually the
opposite I am trying to achieve. 
> Where
> > the
> > > underlying layers do not recieve
the event.
> > >
> > > Part of my MXML:
> > >
> > > 
> > [snip]
> > 
> >
>
mouseDown="this.shoppingcartViewHelper.onMouseDown
(event)"
> > [snip]
> > 
> > > The questions is how do I get this
panel to capture all mouse-
> events
> > > and NOT bubble them on to the lower
layers?
> > 
> > Sorry, I really don't remember how this
worked in Flex 1.5, but 
can
> > you try setting event.bubbles to false
(in the mouseDown handler)?
> > 
> > Manish
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: 
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com

> > Yahoo! Groups Links
> >
>












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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] Re: Capture events a la the underlying transparent window from PopUpManager

2006-03-13 Thread Tony Pujals










I basically posted the same question on
2/14/06 (“Mouse Event Filtering”) and nobody was able to provide a
solution.

 

I found this link that explained the
grisly situation with Flash event capturing (http://senocular.com/flash/tutorials/buttoncapturing/).
I had to move on for a while working on a rich text editor that worked around
Flash’s also grisly text selection timing problems (which you have to
deal with if you want to implement something like a text styles toolbar, and
you want to refresh the selected text, but need to do it after Flash finishes
its updating several frames later).

 

Anyway, I’m working on a slight
variation of the delegation method discussed in the article, but I’m not happy
that I have to do something that the framework should be doing for me, which is
checking to see if a mouse event occurs within the bounds of the topmost
component of a container’s children, and invoking the mouse handler
there.

 

If I come up with a reliable and generic
enough solution, I’ll be happy to post it … but it would be nice if
someone with experience/knowledge in this area could at least indicate if this
is a problem that has been addressed with Flex 2.0….

 

-Tony



 

 

tony pujals| senior engineer | Yahoo!
SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id
tonypujals

 



 









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani
Sent: Monday, March 13, 2006 8:09
AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re:
Capture events a la the underlying transparent window from PopUpManager



 

On 3/13/06, dopenhagen
<[EMAIL PROTECTED]> wrote:

> Sorry, no - its actually the opposite I am
trying to achieve. Where the
> underlying layers do not recieve the event.
>
> Part of my MXML:
>
> 
[snip]

>
mouseDown="this.shoppingcartViewHelper.onMouseDown(event)"
[snip]

> The questions is how do I get this panel to
capture all mouse-events
> and NOT bubble them on to the lower layers?

Sorry, I really don't remember how this worked in
Flex 1.5, but can
you try setting event.bubbles to false (in the
mouseDown handler)?

Manish








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











RE: [flexcoders] Actionscripting and dispatching Events

2006-02-16 Thread Tony Pujals
Without looking at your code or knowing specifically where the references 
stored in currentGroup originated ... I would nevertheless suspect that you are 
working with Flex 1.5 and having an issue with the "this is not this this"  
scoping problem. You might want to read these:

http://www.macromedia.com/devnet/flash/articles/eventproxy.html
http://www.erikbianchi.com/archives/flash_platform/


Essentially, when you are adding your event listeners, add a delegate to ensure 
that on callback the listener will be using the correct scope when 
dereferencing the event parameters.

Where you might have code like this:

  controller.addEventListener("changeGroup", function(event) {
// warning: grp may be in wrong scope...
var grp = event.group;
// do something...
  });

Change it to this:

  controller.addEventListener("changeGroup",
  mx.utils.Delegate.create(this, function(event) {

var grp = event.group;
// do something...
  }));
  


Or if your code looked like this:



  controller.addEventListener("changeGroup", callbackFunc);

  
Change it to this:

  var callbackDelegate;
  ...

  callbackDelegate = mx.utils.Delegate.create(this, callbackFunc);

  controller.addEventListener("changeGroup", callbackDelegate);
  ...

  Controller.removeEventListener("changeGroup", callbackDelegate);



Good luck.

-Tony


tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sauro, 
Nick
Sent: Thursday, February 16, 2006 10:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Actionscripting and dispatching Events

Hey coders, I am running into a problem with dispatching events in AS.

I have an EventDispatcher as part of a Controller object I created.  This 
EventDispatcher has 3 filter objects registered as listeners for a certain 
event.  Now, when I fire that event, I fire it like so:

eventDispatcher.dispatchEvent({type:"changeGroup", group:currentGroup});

Now currentGroup is another object of type Group, and has an associative array 
of arrays in it of different pieces of data used by the different filters.  

Now,through tracing, when before I dispatch this event, the object is 
intact(all its fields are there with no undefines), but when I dispatch the 
event, and trace its properties on the filter side, I'm getting undefined.  
I've tried this via casting to Group object, as well as just leaving it in its 
Object state.   In particular, an array inside the array is coming up as 
undefined.
The weird part of it is, on the filter side, when I trace the array's length, 
its there, but when I attempt to do anything else to it after that initial 
trace call, its all undefined. 

Am I doing anything blatantly wrong?

Many Thanks

Nick


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


SPONSORED LINKS 
Web site design development 
Computer software development 
Software design and development 
Macromedia flex 
Software development best practice 



YAHOO! GROUPS LINKS 

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





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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Re: Mouse Event Filtering

2006-02-16 Thread Tony Pujals
Hi Matt, 

Yeah, I mention below that I tried this and got a partial solution to my 
problem. The issue is that once I do that, ALL the events are blocked and I 
don't know the correct way to ensure that the toolbar buttons themselves get 
passed mouse clicks But if the solution lies in pursuing this direction, 
then thanks for the tip.

-Tony

tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt 
Chotin
Sent: Wednesday, February 15, 2006 10:57 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Mouse Event Filtering

Can you try assigning onPress to the component, I think that's how we've gotten 
our blockers to work in the past.

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tony 
Pujals
Sent: Wednesday, February 15, 2006 3:33 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Mouse Event Filtering

Yes, that's exactly the similarity -- but an obscured component should not even 
have to be aware of a toolbar component above it. It should not receive a 
mouseDown event if the component above is handling it. It's only my toolbar 
canvas that seems to allow events to "pass through" to the TextArea below it -- 
the toolbar buttons don't.

As far as code, I'll create a streamlined example that should make it a little 
easier to see what I'm talking about  Thanks again, Doug.



tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug 
Lowder
Sent: Wednesday, February 15, 2006 3:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Mouse Event Filtering

Yeah, it's possible this is something entirely different from my 
situation, but I think there is still the similarity that an 
obscured ocmponent is acting as if it's not obscured.

Can you post some code?


--- In flexcoders@yahoogroups.com, "Tony Pujals" <[EMAIL PROTECTED]> wrote:
>
> Hey Doug - thanks for the input. This is a link to a screenshot 
that may help clear up the issue:
> http://www.geocities.com/tonypujals/eventcapture.jpg
> 
> What the screenshot shows is that I dragged the toolbar over the 
TextArea component. Then, I dragged the toolbar just a little bit 
again ... which resulted in the highlighted text that you see 
displayed. In other words, the toolbar isn't handling events from 
other components when it shouldn't - the opposite is happening: 
other components are receiving events I don't want them to. When I 
mouse down and drag the toolbar, I want it to move without events 
propagating to components below it. I want the toolbar events to be 
consumed when they act upon the toolbar.
> 
> Also, what the picture doesn't show since Windows doesn't capture 
it in screenshots is that the mouse cursor over the toolbar is an i-
beam cursor - which is what it should be when over text, but not 
over the toolbar. It is only an i-beam when it is not specifically 
over one of the toolbar buttons, just the toolbar gradient 
background Canvas.
> 
> Rather than using mouse handlers for the toolbar, I tried 
overriding the onMouseXXX methods of MovieClip in the hope perhaps 
that this would prevent some superclass behavior which forwards the 
mouse events to further processing, but it didn't help
> 
> Argh...
> 
> 
> 
> tony pujals| senior engineer | Yahoo! SiteBuilder Express
> p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Lowder
> Sent: Wednesday, February 15, 2006 12:41 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Mouse Event Filtering
> 
> I should have pointed out I was talking specifically about the 
> custom floating toolbar you mentioned in point 2 of your original 
> post.  It seems to me your toolbar is handling events from other 
> components when it shouldn't.  Try putting the event.target test 
> into your toolbar code; no need to put it into any other 
components.
> 
> Doug
> 
> --- In flexcoders@yahoogroups.com, "Tony Pujals"  wrote:
> >
> > Thanks for the tip, Doug ... the only problem is that I want the 
> toolbar to be a generic component that doesn't require any 
specially 
> awareness from other components in the form. I don't want to 
mandate 
> that other programmers have to modify their event-handling code 
just 
> to accommodate my

RE: [flexcoders] Re: Mouse Event Filtering

2006-02-15 Thread Tony Pujals
Yes, that's exactly the similarity -- but an obscured component should not even 
have to be aware of a toolbar component above it. It should not receive a 
mouseDown event if the component above is handling it. It's only my toolbar 
canvas that seems to allow events to "pass through" to the TextArea below it -- 
the toolbar buttons don't.

As far as code, I'll create a streamlined example that should make it a little 
easier to see what I'm talking about  Thanks again, Doug.



tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug 
Lowder
Sent: Wednesday, February 15, 2006 3:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Mouse Event Filtering

Yeah, it's possible this is something entirely different from my 
situation, but I think there is still the similarity that an 
obscured ocmponent is acting as if it's not obscured.

Can you post some code?


--- In flexcoders@yahoogroups.com, "Tony Pujals" <[EMAIL PROTECTED]> wrote:
>
> Hey Doug - thanks for the input. This is a link to a screenshot 
that may help clear up the issue:
> http://www.geocities.com/tonypujals/eventcapture.jpg
> 
> What the screenshot shows is that I dragged the toolbar over the 
TextArea component. Then, I dragged the toolbar just a little bit 
again ... which resulted in the highlighted text that you see 
displayed. In other words, the toolbar isn't handling events from 
other components when it shouldn't - the opposite is happening: 
other components are receiving events I don't want them to. When I 
mouse down and drag the toolbar, I want it to move without events 
propagating to components below it. I want the toolbar events to be 
consumed when they act upon the toolbar.
> 
> Also, what the picture doesn't show since Windows doesn't capture 
it in screenshots is that the mouse cursor over the toolbar is an i-
beam cursor - which is what it should be when over text, but not 
over the toolbar. It is only an i-beam when it is not specifically 
over one of the toolbar buttons, just the toolbar gradient 
background Canvas.
> 
> Rather than using mouse handlers for the toolbar, I tried 
overriding the onMouseXXX methods of MovieClip in the hope perhaps 
that this would prevent some superclass behavior which forwards the 
mouse events to further processing, but it didn't help
> 
> Argh...
> 
> 
> 
> tony pujals| senior engineer | Yahoo! SiteBuilder Express
> p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Lowder
> Sent: Wednesday, February 15, 2006 12:41 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Mouse Event Filtering
> 
> I should have pointed out I was talking specifically about the 
> custom floating toolbar you mentioned in point 2 of your original 
> post.  It seems to me your toolbar is handling events from other 
> components when it shouldn't.  Try putting the event.target test 
> into your toolbar code; no need to put it into any other 
components.
> 
> Doug
> 
> --- In flexcoders@yahoogroups.com, "Tony Pujals"  wrote:
> >
> > Thanks for the tip, Doug ... the only problem is that I want the 
> toolbar to be a generic component that doesn't require any 
specially 
> awareness from other components in the form. I don't want to 
mandate 
> that other programmers have to modify their event-handling code 
just 
> to accommodate my toolbar weirdness  I'm a little surprised 
this 
> has turned out to be so challenging. Since I know various 
components 
> provided by Macromedia (such as Button) do behave correctly, I 
guess 
> that there is a 'standardized' way to implement this
> > 
> > 
> > 
> > tony pujals| senior engineer | Yahoo! SiteBuilder Express
> > p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals
> > 
> > 
> > From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of Doug Lowder
> > Sent: Wednesday, February 15, 2006 11:02 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Mouse Event Filtering
> > 
> > Tony, I had a similar problem in Flex 1.5 with a custom 
> TitleWindow 
> > component that was receiving events from objects underneath it.  
> > Never did find out exactly why that was happening; non-100% 
alpha 
> > value, perhaps?  Anyway, I solved it by wrapping a simple check 
> > around the even

RE: [flexcoders] Re: Mouse Event Filtering

2006-02-15 Thread Tony Pujals
Hey Doug - thanks for the input. This is a link to a screenshot that may help 
clear up the issue:
http://www.geocities.com/tonypujals/eventcapture.jpg

What the screenshot shows is that I dragged the toolbar over the TextArea 
component. Then, I dragged the toolbar just a little bit again ... which 
resulted in the highlighted text that you see displayed. In other words, the 
toolbar isn't handling events from other components when it shouldn't - the 
opposite is happening: other components are receiving events I don't want them 
to. When I mouse down and drag the toolbar, I want it to move without events 
propagating to components below it. I want the toolbar events to be consumed 
when they act upon the toolbar.

Also, what the picture doesn't show since Windows doesn't capture it in 
screenshots is that the mouse cursor over the toolbar is an i-beam cursor - 
which is what it should be when over text, but not over the toolbar. It is only 
an i-beam when it is not specifically over one of the toolbar buttons, just the 
toolbar gradient background Canvas.

Rather than using mouse handlers for the toolbar, I tried overriding the 
onMouseXXX methods of MovieClip in the hope perhaps that this would prevent 
some superclass behavior which forwards the mouse events to further processing, 
but it didn't help

Argh...



tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug 
Lowder
Sent: Wednesday, February 15, 2006 12:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Mouse Event Filtering

I should have pointed out I was talking specifically about the 
custom floating toolbar you mentioned in point 2 of your original 
post.  It seems to me your toolbar is handling events from other 
components when it shouldn't.  Try putting the event.target test 
into your toolbar code; no need to put it into any other components.

Doug

--- In flexcoders@yahoogroups.com, "Tony Pujals" <[EMAIL PROTECTED]> wrote:
>
> Thanks for the tip, Doug ... the only problem is that I want the 
toolbar to be a generic component that doesn't require any specially 
awareness from other components in the form. I don't want to mandate 
that other programmers have to modify their event-handling code just 
to accommodate my toolbar weirdness  I'm a little surprised this 
has turned out to be so challenging. Since I know various components 
provided by Macromedia (such as Button) do behave correctly, I guess 
that there is a 'standardized' way to implement this
> 
> 
> 
> tony pujals| senior engineer | Yahoo! SiteBuilder Express
> p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Lowder
> Sent: Wednesday, February 15, 2006 11:02 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Mouse Event Filtering
> 
> Tony, I had a similar problem in Flex 1.5 with a custom 
TitleWindow 
> component that was receiving events from objects underneath it.  
> Never did find out exactly why that was happening; non-100% alpha 
> value, perhaps?  Anyway, I solved it by wrapping a simple check 
> around the event handler that makes sure the target property of 
the 
> event is the current object: 
> 
> if (event.target == this) { // handle the event... }
> 
> It might be worth trying that somewhere, like in a delegate for 
the 
> mouseMove event or in handleEvent().
> 
> Hope that's of some help.
> 
> Doug
> 
> 
> --- In flexcoders@yahoogroups.com, "Tony Pujals"  wrote:
> >
> > Well, the Flash asdocs really don't make this clear, but I 
> initially had a suspicion that overriding a handler instead of 
> registering a listener might be the answer. I didn't pursue that 
> direction right away because the method signatures don't return a 
> Boolean or some other value to indicate that an event was handled 
> and no further processing is wanted.
> > 
> > In any case, I was able to achieve the glass pane effect that I 
> wanted this morning with the following code:
> > 
> > 
> >   options = { width: "100%", height: "100%"};
> >   Canvas(createChild(Canvas, "_glassPane", options));
> >   _glassPane.setStyle("backgroundColor", "#FF00FF");
> >   _glassPane.alpha = 0;
> >   _glassPane.visible = false;
> > 
> >   MovieClip(_glassPane).onPress = function() {}
> > 
> > 
> > All of the above was required: without a backgroundColor b

RE: [flexcoders] Re: Mouse Event Filtering

2006-02-15 Thread Tony Pujals
Thanks for the tip, Doug ... the only problem is that I want the toolbar to be 
a generic component that doesn't require any specially awareness from other 
components in the form. I don't want to mandate that other programmers have to 
modify their event-handling code just to accommodate my toolbar weirdness  
I'm a little surprised this has turned out to be so challenging. Since I know 
various components provided by Macromedia (such as Button) do behave correctly, 
I guess that there is a 'standardized' way to implement this



tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug 
Lowder
Sent: Wednesday, February 15, 2006 11:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Mouse Event Filtering

Tony, I had a similar problem in Flex 1.5 with a custom TitleWindow 
component that was receiving events from objects underneath it.  
Never did find out exactly why that was happening; non-100% alpha 
value, perhaps?  Anyway, I solved it by wrapping a simple check 
around the event handler that makes sure the target property of the 
event is the current object: 

if (event.target == this) { // handle the event... }

It might be worth trying that somewhere, like in a delegate for the 
mouseMove event or in handleEvent().

Hope that's of some help.

Doug


--- In flexcoders@yahoogroups.com, "Tony Pujals" <[EMAIL PROTECTED]> wrote:
>
> Well, the Flash asdocs really don't make this clear, but I 
initially had a suspicion that overriding a handler instead of 
registering a listener might be the answer. I didn't pursue that 
direction right away because the method signatures don't return a 
Boolean or some other value to indicate that an event was handled 
and no further processing is wanted.
> 
> In any case, I was able to achieve the glass pane effect that I 
wanted this morning with the following code:
> 
> 
>   options = { width: "100%", height: "100%"};
>   Canvas(createChild(Canvas, "_glassPane", options));
>   _glassPane.setStyle("backgroundColor", "#FF00FF");
>   _glassPane.alpha = 0;
>   _glassPane.visible = false;
> 
>   MovieClip(_glassPane).onPress = function() {}
> 
> 
> All of the above was required: without a backgroundColor being 
set, events weren't captured at all; The alpha, of course, was to 
make the glass pane actually invisible (there maybe other properties 
beside backgroundColor that also work for causing events to get 
caught, but I haven't experimented). The visible property -- once a 
backgroundColor property is set -- is what enables and disables the 
event capturing.
> 
> 
> However, for the toolbar that I also wanted to capture events so 
the text component below doesn't receive them, this is not yet a 
complete solution because it also prevents the child components (the 
toolbar buttons) from getting any events either. I've written some 
code to iterate the child components, but I don't know what to pass 
to them -- it seems intrinsically wrong that the toolbar needs to 
become an event manager from its onPress handler:
> 
> // doesn't work -- onPress doesn't have event parameter anyway...
> 
> MovieClip(this).onPress = mx.utils.Delegate.create(this, function
(event) {
>   var comp : UIObject = null;
>   for (var i : Number = 0; i < childDescriptors.length; i++) {
> comp = getChildAt(i);
> if (hitTest(comp)) {
>   comp.handleEvent(event);
> }
>   }
> });
> 
> (Incidentally, if there is some other more appropriate way for 
iterating child components, I'd appreciate hearing about it).
> 
> So Flash/Flex gurus ... what am I missing here...? Thanks!
> 
> Tony
> 
> tony pujals| senior engineer | Yahoo! SiteBuilder Express
> p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals
> 
> 
> From: Tony Pujals 
> Sent: Wednesday, February 15, 2006 7:43 AM
> To: 'flexcoders@yahoogroups.com'
> Subject: RE: [flexcoders] Mouse Event Filtering
> 
> Sorry, I don't know if this works in the Flex 2 beta, but I should 
have specified that we're working with Flex 1.5 at Yahoo. 
Unfortunately, EventDispatcher states:
> 
>     function addEventListener(eventType:String, 
eventListener):Void
>     {
>     // Note: In the future, we may add 
a third parameter,
>     // useCapture:Boolean, to be 
compliant with the
>     // DOM Level 3 Events spec,
>  

RE: [flexcoders] Mouse Event Filtering

2006-02-15 Thread Tony Pujals
Well, the Flash asdocs really don't make this clear, but I initially had a 
suspicion that overriding a handler instead of registering a listener might be 
the answer. I didn't pursue that direction right away because the method 
signatures don't return a Boolean or some other value to indicate that an event 
was handled and no further processing is wanted.

In any case, I was able to achieve the glass pane effect that I wanted this 
morning with the following code:


options = { width: "100%", height: "100%"};
Canvas(createChild(Canvas, "_glassPane", options));
_glassPane.setStyle("backgroundColor", "#FF00FF");
_glassPane.alpha = 0;
_glassPane.visible = false;

MovieClip(_glassPane).onPress = function() {}


All of the above was required: without a backgroundColor being set, events 
weren't captured at all; The alpha, of course, was to make the glass pane 
actually invisible (there maybe other properties beside backgroundColor that 
also work for causing events to get caught, but I haven't experimented). The 
visible property -- once a backgroundColor property is set -- is what enables 
and disables the event capturing.


However, for the toolbar that I also wanted to capture events so the text 
component below doesn't receive them, this is not yet a complete solution 
because it also prevents the child components (the toolbar buttons) from 
getting any events either. I've written some code to iterate the child 
components, but I don't know what to pass to them -- it seems intrinsically 
wrong that the toolbar needs to become an event manager from its onPress 
handler:

// doesn't work -- onPress doesn't have event parameter anyway...

MovieClip(this).onPress = mx.utils.Delegate.create(this, function(event) {
  var comp : UIObject = null;
  for (var i : Number = 0; i < childDescriptors.length; i++) {
comp = getChildAt(i);
if (hitTest(comp)) {
  comp.handleEvent(event);
}
  }
});

(Incidentally, if there is some other more appropriate way for iterating child 
components, I'd appreciate hearing about it).

So Flash/Flex gurus ... what am I missing here...? Thanks!

Tony

tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals


From: Tony Pujals 
Sent: Wednesday, February 15, 2006 7:43 AM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Mouse Event Filtering

Sorry, I don't know if this works in the Flex 2 beta, but I should have 
specified that we're working with Flex 1.5 at Yahoo. Unfortunately, 
EventDispatcher states:

    function addEventListener(eventType:String, eventListener):Void
    {
    // Note: In the future, we may add a third 
parameter,
    // useCapture:Boolean, to be compliant with the
    // DOM Level 3 Events spec,
    // 
http://www.w3.org/TR/DOM-Level-3-Events/events.html.
    .
    .
    .

This would have been very convenient if it were implemented. Nevertheless, 
Button and other components do seem able to capture the event. Is this a 
question for one of the Flash lists (any recommendation to which list I should 
post this question)?

Thanks, Matt - if you or anyone else has any other ideas, I'd really love to 
hear them

-Tony



tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt 
Chotin
Sent: Tuesday, February 14, 2006 9:45 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Mouse Event Filtering

you want to add your mouse event listener with useCapture set to true
and then call stopPropagation on the event in your handler (I think).  I
believe that will prevent it from moving further down the hierarchy.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tony Pujals
Sent: Tuesday, February 14, 2006 5:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Mouse Event Filtering

There are two variations to my question, but they should share a common
solution:

1) I want to create a "glass pane" - ie, a transparent layer that can
capture/consume mouse events without allowing the event to bubble to a
component below it. I've tried to achieve this effect with a transparent
Canvas, but the component below it (eg, a TextArea), also catches the
event.

2) I have a floating toolbar that extends Canvas. I don't want to use
the PopUpManager because of issues with the FocusManager and TextArea
that cau

RE: [flexcoders] Mouse Event Filtering

2006-02-15 Thread Tony Pujals










Sorry, I don’t know if this works in
the Flex 2 beta, but I should have specified that we’re working with Flex
1.5 at Yahoo. Unfortunately, EventDispatcher states:

 

    function addEventListener(eventType:String,
eventListener):Void

    {

    // Note: In
the future, we may add a third parameter,

    //
useCapture:Boolean, to be compliant with the

    // DOM
Level 3 Events spec,

    //
http://www.w3.org/TR/DOM-Level-3-Events/events.html.

    .

    .

    .

 

This would have been very convenient if it were
implemented. Nevertheless, Button and other components do seem able to capture
the event. Is this a question for one of the Flash lists (any recommendation to
which list I should post this question)?

 

Thanks, Matt – if you or anyone else
has any other ideas, I’d really love to hear them

 

-Tony

 



 

 



tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com |
y!id tonypujals











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Tuesday, February 14, 2006
9:45 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Mouse
Event Filtering



 

you want to add your mouse
event listener with useCapture set to true
and then call stopPropagation on the event in your
handler (I think).  I
believe that will prevent it from moving further
down the hierarchy.

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Tony Pujals
Sent: Tuesday, February 14, 2006 5:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Mouse Event Filtering

There are two variations to my question, but they
should share a common
solution:

1) I want to create a "glass pane" - ie,
a transparent layer that can
capture/consume mouse events without allowing the
event to bubble to a
component below it. I've tried to achieve this
effect with a transparent
Canvas, but the component below it (eg, a
TextArea), also catches the
event.

2) I have a floating toolbar that extends Canvas.
I don't want to use
the PopUpManager because of issues with the
FocusManager and TextArea
that causes text to be selected incorrectly when
focus is returned after
focus was transferred to a toolbar button. If the
toolbar is floating
above the TextArea component, the cursor changes
to an ibeam. If I click
down on the toolbar to drag it, the toolbar drags,
but the TextArea also
gets the events, causing text to become selected.
I want the toolbar to
consume the mouse events occurring on it without
any further event
bubbling.


Since the toolbar has a mouseMove handler that
allows me to drag it, I
can drag even by pressing mouse down on a toolbar
button. I guess the
toolbar as parent is receiving and handling the
mousedown, even though
the mouse down event is also propagating to its
child button component
as well (I actually do not want this behavior
either, but I suppose I
can solve this easily enough with hitTest). But
what is really
interesting is that the event stops there if it's
caught by the button
-- the TextArea below the toolbar doesn't get the
event in this case. So
something about a Button or its superclasses makes
it special, but the
difference isn't apparent to me in the AS source
provided with Flex.

Any insight is appreciated. Thanks!

-Tony



tony pujals| senior engineer | Yahoo! SiteBuilder
Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com |
y!id tonypujals





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

Yahoo! Groups Links















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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



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



  











[flexcoders] Mouse Event Filtering

2006-02-14 Thread Tony Pujals
There are two variations to my question, but they should share a common
solution:

1) I want to create a "glass pane" - ie, a transparent layer that can
capture/consume mouse events without allowing the event to bubble to a
component below it. I've tried to achieve this effect with a transparent
Canvas, but the component below it (eg, a TextArea), also catches the
event.

2) I have a floating toolbar that extends Canvas. I don't want to use
the PopUpManager because of issues with the FocusManager and TextArea
that causes text to be selected incorrectly when focus is returned after
focus was transferred to a toolbar button. If the toolbar is floating
above the TextArea component, the cursor changes to an ibeam. If I click
down on the toolbar to drag it, the toolbar drags, but the TextArea also
gets the events, causing text to become selected. I want the toolbar to
consume the mouse events occurring on it without any further event
bubbling.


Since the toolbar has a mouseMove handler that allows me to drag it, I
can drag even by pressing mouse down on a toolbar button. I guess the
toolbar as parent is receiving and handling the mousedown, even though
the mouse down event is also propagating to its child button component
as well (I actually do not want this behavior either, but I suppose I
can solve this easily enough with hitTest). But what is really
interesting is that the event stops there if it's caught by the button
-- the TextArea below the toolbar doesn't get the event in this case. So
something about a Button or its superclasses makes it special, but the
difference isn't apparent to me in the AS source provided with Flex.

Any insight is appreciated. Thanks!

-Tony

 
 
tony pujals| senior engineer | Yahoo! SiteBuilder Express
p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals
 
 



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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] event bubbling Flex 1.5

2005-11-23 Thread Tony Pujals










I just wanted to follow up in case my last
post wasn’t totally clear. JesterXL said:

 

> > I usually do:
> >
> > dispatchEvent({type:
"someEvent", target: this});



What I wanted to make sure I pointed out is
that Flex will set the target property to ‘this’ (the object calling
dispatchEvent) when the event gets broadcast, overwriting any value you may set.
So although this actually shows up in some of the doc examples, don’t do
it, it doesn’t work – it may have “seemed” to work, but
only coincidentally because ‘this’ is generally what you want.

 

You know, I also find the behavior not
exactly intuitive because of semantic reasons. If you think of ‘target’
as meaning the component upon which an event occurred, then this value should
be preserved up the chain; in any case, I think target is a poor naming choice.
An event broadcaster is a ‘source,’ like in Java, or something
along those lines. For a listener receiving a notification, source ought to
point to the broadcasting object, even if it is just a middle link in what is a
chain of listeners. Target should be a value that refers to a component and is
set only once and preserved up the chain Or something along these lines….

 

;-)

 



Tony

 

tony pujals| senior engineer | Yahoo!
SiteBuilder

p. 408.349.6284 | e. [EMAIL PROTECTED] |
y!id tonypujals



 









From: Tony Pujals 
Sent: Wednesday, November 23, 2005
11:06 AM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] event
bubbling Flex 1.5



 

So funny – this thread just caught my
eye because I just had to deal with the very same issue.

 

When you call dispatchEvent, the target
property is always overridden. Although I have seen a few erroneous examples,
the docs tell you not to set the target property in the event object because it
will be explicitly set to refer to the object that is dispatching the event.
Therefore, the original “target” will be lost.

 

I bubble up my events through chaining (for
example, a ThemeManager that propagates theme changes that propagates scheme
changes that propagates individual style (font and color) changes), but I
preserve the original event with a rootEvent property. The chain of handlers
continue to add this property to the new event that is getting dispatched up
the chain, preserving the value that each listener receives.

 

I should point out that athough preserving
the original event is useful, each listener in the chain generally needs to add
other context aside from just “bubbling” up the original event. The
ultimate listener can’t do much with the rootEvent object (eg, a font
style), without the additional context added by the listeners in the change
(for example, current theme : page title scheme : new font style).

 

-Tony

 



 

tony pujals| senior engineer | Yahoo!
SiteBuilder

p. 408.349.6284 | e. [EMAIL PROTECTED] |
y!id tonypujals



 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Douglas Knudsen
Sent: Wednesday, November 23, 2005
10:37 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] event
bubbling Flex 1.5



 

helps to actually attach the
file, eh?  sorry about the traffic...I
need some of that coffee now too Jesse.

DK

On 11/23/05, Douglas Knudsen
<[EMAIL PROTECTED]> wrote:
> lol!
>
> Ok, I attached a sample in a zip, hope it
stays attached.  In it I
> have a A, B, C as an example of this thread
discussion.  You can see
> that the final capture of the event in A loses
the original target.
> upon a suggestion elsewhere, I tried
'chaining' the events by catching
> the event in B and re-dispatching it. 
This still messed with the
> target property of the event object. 
Seems have to add this as a
> extra property in the original event.
>
> Jeff, looking at your evenmanger class now to
see if I can use this.
>
> DK
>
> On 11/23/05, JesterXL
<[EMAIL PROTECTED]> wrote:
> > ...er, sorry, C.  2nd cup of coffee
hasn't kicked in...
> >
> > - Original Message -
> > From: "JesterXL"
<[EMAIL PROTECTED]>
> > To: <flexcoders@yahoogroups.com>
> > Sent: Wednesday, November 23, 2005 12:09
PM
> > Subject: Re: [flexcoders] event bubbling
Flex 1.5
> >
> >
> > I usually do:
> >
> > dispatchEvent({type:
"someEvent", target: this});
> >
> > Where this points to the component
dispatching the event.  So, if A wants to
> > know who dispatched the event:
> >
> > function someEvent(o)
> > {
> > trace(o.target);
// this is A
> > }
> >
> > - Original Message -
> > From: "Douglas Knudsen"
<[EMAIL PROTECTED]>
> > To: <flexcoders@yahoogroups.com>
> > Sent: Wednesday, November 23, 2005 11:52
AM
> > Subject: Re: [flexcoders] event bubbling
Flex 1.5

RE: [flexcoders] event bubbling Flex 1.5

2005-11-23 Thread Tony Pujals










So funny – this thread just caught my
eye because I just had to deal with the very same issue.

 

When you call dispatchEvent, the target
property is always overridden. Although I have seen a few erroneous examples,
the docs tell you not to set the target property in the event object because it
will be explicitly set to refer to the object that is dispatching the event.
Therefore, the original “target” will be lost.

 

I bubble up my events through chaining (for
example, a ThemeManager that propagates theme changes that propagates scheme
changes that propagates individual style (font and color) changes), but I
preserve the original event with a rootEvent property. The chain of handlers continue
to add this property to the new event that is getting dispatched up the chain,
preserving the value that each listener receives.

 

I should point out that athough preserving
the original event is useful, each listener in the chain generally needs to add
other context aside from just “bubbling” up the original event. The
ultimate listener can’t do much with the rootEvent object (eg, a font
style), without the additional context added by the listeners in the change (for
example, current theme : page title scheme : new font style).

 

-Tony

 



 

tony pujals| senior engineer | Yahoo! SiteBuilder

p. 408.349.6284 | e. [EMAIL PROTECTED] |
y!id tonypujals



 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Douglas Knudsen
Sent: Wednesday, November 23, 2005
10:37 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] event
bubbling Flex 1.5



 

helps to actually attach the file, eh?  sorry about the
traffic...I
need some of that coffee now too Jesse.

DK

On 11/23/05, Douglas Knudsen
<[EMAIL PROTECTED]> wrote:
> lol!
>
> Ok, I attached a sample in a zip, hope it
stays attached.  In it I
> have a A, B, C as an example of this thread
discussion.  You can see
> that the final capture of the event in A
loses the original target.
> upon a suggestion elsewhere, I tried
'chaining' the events by catching
> the event in B and re-dispatching it. 
This still messed with the
> target property of the event object. 
Seems have to add this as a
> extra property in the original event.
>
> Jeff, looking at your evenmanger class now to
see if I can use this.
>
> DK
>
> On 11/23/05, JesterXL <[EMAIL PROTECTED]>
wrote:
> > ...er, sorry, C.  2nd cup of coffee
hasn't kicked in...
> >
> > - Original Message -
> > From: "JesterXL"
<[EMAIL PROTECTED]>
> > To: <flexcoders@yahoogroups.com>
> > Sent: Wednesday, November 23, 2005 12:09
PM
> > Subject: Re: [flexcoders] event bubbling
Flex 1.5
> >
> >
> > I usually do:
> >
> > dispatchEvent({type:
"someEvent", target: this});
> >
> > Where this points to the component
dispatching the event.  So, if A wants to
> > know who dispatched the event:
> >
> > function someEvent(o)
> > {
> > trace(o.target);
// this is A
> > }
> >
> > - Original Message -
> > From: "Douglas Knudsen"
<[EMAIL PROTECTED]>
> > To: <flexcoders@yahoogroups.com>
> > Sent: Wednesday, November 23, 2005 11:52
AM
> > Subject: Re: [flexcoders] event bubbling
Flex 1.5
> >
> >
> > drat!  I read your blog entry on
this too, forgot about  it.  Ok, in
> > my scenario below, I have A catching the
event dispatched in C.  But
> > the target in the event still points to
B the middleman.  I need A to
> > be able to be able to reference C in the
event.  Is the only way to
> > add a reference to C in the event
dispatch in C?
> >
> > DK
> >
> > On 11/23/05, JesterXL
<[EMAIL PROTECTED]> wrote:
> > > It IS supported:
> > > http://www.jessewarden.com/archives/2005/11/event_bubbling.html
> > >
> > > - Original Message -
> > > From: "Douglas Knudsen"
<[EMAIL PROTECTED]>
> > > To: <flexcoders@yahoogroups.com>
> > > Sent: Wednesday, November 23, 2005
11:29 AM
> > > Subject: [flexcoders] event
bubbling Flex 1.5
> > >
> > >
> > > not supportted I know, how to work
around?.  Say I have 3 components
> > > A,B, and C.  B is a child of A
and C is a child of B, each child among
> > > children possibly.   Now,
if C fires an event called fooEvent, I can
> > > get A to catch it, but the
event.target points to B not C.  The way I
> > > worked around this was in B I
caught the event then re-broadcast it so
> > > that A could catch it.  In the
re-broadcast I added a reference to C
> > > in the event.  How else can I
'bubble' up an event?
&g

  1   2   >