Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
Waiting on a server-side bugfix, so enjoy. Working example:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute

mx:Script
![CDATA[
import mx.collections.ArrayCollection;

[Bindable]
private var allProducts : Array = [
{
name: Datsun 120y,
value : 1000
},
{
name: Nissan 350Z,
value : 55000
},
{
name: Porsche GT3,
value : 325000
},
{
name: HSV Clubsport,
value : 7
},
{
name: Mercedes SLR,
value : 120
},
{
name: Lada Niva,
value : 75
},
{
name: Ford Falcon XY GTHO,
value : 375000
},
{
name: Batmobile,
value : 654321
},
{
name: Ford Falcon XA GTHO,
value : 220
}];

[Bindable]
private var filteredList : ArrayCollection = new
ArrayCollection(allProducts);

private function updateFilter() : void
{
filteredList.filterFunction = myFilterFunction;
filteredList.refresh();
}

private function myFilterFunction(item : Object) : Boolean
{
//trace(filter item  + item +  between  + min.value + 
and  + max.value);
return item.value = min.value  item.value = max.value;
}

]]
/mx:Script

mx:DataGrid horizontalCenter=0 verticalCenter=0 width=410
height=354 dataProvider={filteredList}
mx:columns
mx:DataGridColumn headerText=Car Name dataField=name/
mx:DataGridColumn headerText=Value dataField=value/
/mx:columns
/mx:DataGrid
mx:HSlider verticalCenter=-191 horizontalCenter=0 minimum=0
maximum=200 id=min liveDragging=true change=updateFilter()/
mx:HSlider verticalCenter=191 horizontalCenter=0 minimum=0
maximum=200 id=max liveDragging=true change=updateFilter()
value=200/
mx:Label text=Min textAlign=right width=117
horizontalCenter=-147 verticalCenter=-191/
mx:Label text=Max textAlign=right width=117
horizontalCenter=-147 verticalCenter=191/

/mx:Application


On Wed, Aug 6, 2008 at 3:57 PM, stinasius [EMAIL PROTECTED] wrote:

 hi if you dont mind could you clarify on the trace statement, am not
 sure i understand what you said or how to go about it. thanks


 

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






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

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


[flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread stinasius
hi josh nice example but how about using one slider with two thumbs?



RE: [flexcoders] Where are the AIR resources?

2008-08-06 Thread Gregor Kiddie
Be aware that the post Alex has referenced also states that it doesn't
work with modules, so you'll have to find a different solution if you
want to use them.

 

((And slightly off topic, but commenting on a comment by Alex earlier, I
still do not agree with that security restriction. If someone can
man-in-the-middle the swf you are downloading into an air app, someone
can do the same to the air file itself, making the restriction a bit
arbitrary))

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 05 August 2008 23:13
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Where are the AIR resources?

 

I'm sure there is a way to do that right now.  It might be a planned
feature for a future AIR release.  You can try it though.

 

This post:
http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.h
tml#more
http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.
html#more  implies that you can't and should use loadBytes instead.

 

-Alex

 



Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
Don't know, I imagine the first step will be building or locating a
dual-thumb slider :)

On Wed, Aug 6, 2008 at 4:42 PM, stinasius [EMAIL PROTECTED] wrote:

 hi josh nice example but how about using one slider with two thumbs?


 

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






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

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


[flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread stinasius
i managed to build a dual thumb slider that i pass on the filter
function. here is the code.

mx:HSlider x=0 y=240 id=priceSlider minimum=0
maximum=300 tickInterval=10 snapInterval=10
thumbCount=2 values=[0,300] tickColor=#ff
labels=[$0k,$300M] liveDragging=true width=182
change=filterGrid()/



Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
Shows how often I use the sliders. I didn't know you could use multiple
thumbs... This is not performant, you should be getting the max and min
within updateFilter() and sticking them in private vars, not in the filter
function itself... but you get the idea.

private function myFilterFunction(item : Object) : Boolean
{
return item.value =
Math.min(priceSlider.values[0],priceSlider.values[1])   item.value =
Math.max(priceSlider.values[0],priceSlider.values[1]);
}


On Wed, Aug 6, 2008 at 5:29 PM, stinasius [EMAIL PROTECTED] wrote:

 i managed to build a dual thumb slider that i pass on the filter
 function. here is the code.

 mx:HSlider x=0 y=240 id=priceSlider minimum=0
 maximum=300 tickInterval=10 snapInterval=10
 thumbCount=2 values=[0,300] tickColor=#ff
 labels=[$0k,$300M] liveDragging=true width=182
 change=filterGrid()/


 

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






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

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


Re: [flexcoders] ADG editable cells dataprovider

2008-08-06 Thread Carlos Rovira
The only one approach to that problem is to fill the dataprovider with data.
That's the way list components works. I found the same problem and I had to
go that way


2008/8/5 Josh Millstein [EMAIL PROTECTED]

   I have a ADG with a dataprovider that is set dynamically. I would like
 to
 be able to edit any of the cells in the datagrid but right now I can only
 edit cells that have information in them from the dataprovider. Problem is
 that when someone starts using my app there is no info in the dataprovider
 therefore not allowing me to click in the cells. I have the adg editable =
 true the colums editable = true , I put in some blank objects in the
 dataprovider, which is a half ass fix that is not going to work for other
 reasons. Does anybody know what I can do here to fix the issue?

 Thanks
 --
 [EMAIL PROTECTED] wolf%40wolffebrothers.com
 785-832-9154

  



[flexcoders] Remoting fails

2008-08-06 Thread Simon Bailey
Hi,

I have an app making a simple flash remoting call to CF and it works  
fine of multiple servers, runs in the local environment and returns a  
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the  
remoting call fails, no error message either, its as though it is not  
even leaving the app within the browser.  I presume firewall could be  
a problem but am unsure as to where to go on this one?  Any ideas  
anyone?

Cheers,

Simon


RE: [flexcoders] Remoting fails

2008-08-06 Thread Gregor Kiddie
Get some software that lets you see the responses like Charles or
Service Capture, that will give some more information on what's going
on.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails

 

Hi,

I have an app making a simple flash remoting call to CF and it works 
fine of multiple servers, runs in the local environment and returns a 
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the 
remoting call fails, no error message either, its as though it is not 
even leaving the app within the browser. I presume firewall could be 
a problem but am unsure as to where to go on this one? Any ideas 
anyone?

Cheers,

Simon

 



Re: [flexcoders] Remoting fails

2008-08-06 Thread Simon Bailey
Nice one Gregor I will give it a go.  I think the calls are leaving  
the swf just having trouble returning into the browser/swf!


On 6 Aug 2008, at 11:08, Gregor Kiddie wrote:


Get some software that lets you see the responses like Charles or  
Service Capture, that will give some more information on what’s going  
on.




Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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


Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk

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


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

Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails



Hi,

I have an app making a simple flash remoting call to CF and it works
fine of multiple servers, runs in the local environment and returns a
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the
remoting call fails, no error message either, its as though it is not
even leaving the app within the browser. I presume firewall could be
a problem but am unsure as to where to go on this one? Any ideas
anyone?

Cheers,

Simon







Re: [flexcoders] Remoting fails

2008-08-06 Thread Simon Bailey
I take that back I do not think they are leaving the browser, gonna  
try Charles...


On 6 Aug 2008, at 11:10, Simon Bailey wrote:

Nice one Gregor I will give it a go.  I think the calls are leaving  
the swf just having trouble returning into the browser/swf!



On 6 Aug 2008, at 11:08, Gregor Kiddie wrote:


Get some software that lets you see the responses like Charles or  
Service Capture, that will give some more information on what’s going  
on.




Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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


Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk

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


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

Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails



Hi,

I have an app making a simple flash remoting call to CF and it works
fine of multiple servers, runs in the local environment and returns a
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the
remoting call fails, no error message either, its as though it is not
even leaving the app within the browser. I presume firewall could be
a problem but am unsure as to where to go on this one? Any ideas
anyone?

Cheers,

Simon









[flexcoders] Who is using the Framework Caching?

2008-08-06 Thread thatstephen
Framework caching is potentially a useful way to reduce the download
required for each flex application. It doesn't benefit the user if
there are not many sites using it as the total download of the flex
app + framework as a seperate file is greater. 

I am working on some integration for a public site with a large Flex
element, in an experiment with our app a normal Flex release build
totalled 673k without framework caching and  426k with framework
caching. This is all very good, but the framework as an swf for
earlier Flash 9 player () users is 523k, that means the total download
for a user without the framework cached is 949k. This is 230k more
than if the framework cache is not enabled. 

Although it is good to help everybody out by using caching I would
like to know what proportion of users will benefit and therefore what
proportion of sites have implemented Framework caching. Does anyone
have a figure on this?

Thanks

  



[flexcoders] Can we record microphone input and save as mp3 in flex?

2008-08-06 Thread Jo Morano
Does flex allow recording microphone input and save it locally? I read a
comment somewhere saying you need Java components to do all that. The Java
comment might actually have been about a dynamic mike attached through an
mbox but I'm interested in that as well.

I can do so with Java, but I want to maximize flex/as in my examples.

Regards


[flexcoders] Re: need help urgent - multiple images printing

2008-08-06 Thread cyber_runners
Yeah, I don't know what to do ...

I think the image you added in your template is late to show than  print
job execution.
May be flex need delay or doEvent command ...
hehehe ... it's i think bro





[flexcoders] treeview samples

2008-08-06 Thread ganeshan_pa
Could anyone give me the links from where I can find various flex 
treeview samples?

Thanks in advance.
Gan



[flexcoders] Problem in Identfying Flash Objects in QTP 9.2

2008-08-06 Thread jp_bit2001
Hi,

We have a project to automate a flash player 9 application.

When we tried to record the actions performed on this application, it 
is showing as a MacromediaFlashplayerActiveX winobject.

It is identifying the entire application as a single object, instead 
as individual objects.

Could anyone help us in this...

We are using QTP 9.2 version with following add-in's installed in it.
a. ActiveX
b. Flex (installed as suggested by couple of forums)
c. Web
d. Visual Basic

The site we want to automate is www.pedigree.com

Thanks in advance.

JP




[flexcoders] simple arraycollection question

2008-08-06 Thread Richard Baker
I have a .as class extending arraycollection.

In the constructor I set up a webservice and listner to capture the
result in resultHandler

Ideally in resultHandler I'd do something like
  this=event.result;

but it doesn't work, so I am looping over the event.result, adding it
to the array collection like:

   this.addItem(event.result[i]);

can I assign the whole array collection in one go. Probably missing
something simple, but I just can't see it :(

Thx



RE: [flexcoders] Who is using the Framework Caching?

2008-08-06 Thread Gregor Kiddie
that means the total download
for a user without the framework cached is 949k

 

Only the first time, the second time they visit, they get the benefits.

I think what you've described is the hurdle that the majority of people
are coming to. The initial download appears to be much bigger, so they
veer away. So in the end, no-one caches it.

I don't know if Adobe have numbers on this (or even if they can get
numbers on this), but I'd imagine they'd be quite low.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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

 



Re: [flexcoders] Remoting fails

2008-08-06 Thread Simon Bailey
Odd, Charles seems to state that the crossdomain is failing however  
its temporarily open to * and still not working.  I have since also  
discovered that the company has previously had to add  proxyserver and  
proxyport params to access http calls.  So if remoting uses http then  
how the heck can you define these params within the remoting call and  
why would it be necessary from the hosted swf server?


On 6 Aug 2008, at 11:21, Simon Bailey wrote:

I take that back I do not think they are leaving the browser, gonna  
try Charles







[flexcoders] Flex with proxy server

2008-08-06 Thread walberleal
how can I establish a socket connection on a network using proxy server 
with flex 3???



[flexcoders] Re: simple arraycollection question

2008-08-06 Thread Michael VanDaniker
I haven't run this code, but I don't see why it wouldn't work:

this.source = event.result.source;

I personally prefer looping through the returned collection and
translating the raw objects into instances of a class I've defined. 
This allows for compile-time checking on anything you want to do with
the local copies, and it lets you add methods and properties to those
objects.

var o:SomeClass = new SomeClass(event.result[i]);
collection.addItem(o);

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

 I have a .as class extending arraycollection.
 
 In the constructor I set up a webservice and listner to capture the
 result in resultHandler
 
 Ideally in resultHandler I'd do something like
   this=event.result;
 
 but it doesn't work, so I am looping over the event.result, adding it
 to the array collection like:
 
this.addItem(event.result[i]);
 
 can I assign the whole array collection in one go. Probably missing
 something simple, but I just can't see it :(
 
 Thx





[flexcoders] Re: Can we subclass Application yet?

2008-08-06 Thread Amy
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Interesting. So either the documentation is very old, or 
[DefaultProperty]
 simply isn't inherited? Either way the docs could use updating. I'll 
put
 testing this onto my todo list :)

As you know, I'm not nearly the whiz kid you guys are, but is this 
discussion talking about working around a problem with 
childDescriptors?  I don't really have anything to add to the 
conversation, just trying to understand what is being said :-).

Thanks;

Amy



Re: [flexcoders] Who is using the Framework Caching?

2008-08-06 Thread Tom Chiverton
On Wednesday 06 Aug 2008, thatstephen wrote:
 for a user without the framework cached is 949k. This is 230k more
 than if the framework cache is not enabled.

Your users are already there, and if you've decided 673k can be sent quick 
enough, it's only a third or so more.
And, the more people who use this, the more chance your users will get the 
quicker versions.

All your users will benefit the 2nd time onwards, for instance.

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Cannot install latest Flex Builder 3.0 SDK Build 3.0.3.2490 from 7/15/08

2008-08-06 Thread Tom Chiverton
On Tuesday 05 Aug 2008, joseph_freemaker wrote:
 Any assistance would be appreciated.

The charting classes are not open source, so probably aren't in your download.

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: How do I show only part of an image?

2008-08-06 Thread nathanpdaniel
If you have a 64x64 image, you can set up a 16x16 mask:
mx:Image width='64' height='64' mask='{imageMask}' /
mx:Canvas id='imageMask' width='16' height='16' x='0' y='0' /

Then all you'd need to do is animate the canvas to relocate when you 
need it to.  Seems simple enough.. haha :D  You could also reverse 
it by moving the image rather than the mask.  

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

 are you able to use the mask?
 
 --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
 
  Let's say I have a 64x64 image, but I only want to display one 
 16x16 
  section of it. How would I do this? I tried playing with 
  img.transform.pixelBounds.offset(), but it didn't do anything.
  
  
  mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; 
  implements=mx.controls.listClasses.IDropInListItemRenderer
  
  mx:Script
  ![CDATA[
  override public function set data(value:Object):void
  {
  super.data = value;
  img.transform.pixelBounds.offset(6,6);
  }
  
  // Implement IDropInListItemRenderer
  private var m_listData:BaseListData;
  public function get listData():BaseListData {return m_listData;}
  public function set listData(value:BaseListData):void {m_listData 
= 
  value;}
  ]]
  /mx:Script
  
  mx:Image height=16 width=16 source=/images/a.gif id=img/
  
  /mx:VBox
 





[flexcoders] Returning value inside a nested functions event?

2008-08-06 Thread Berkay Unal
Hi Coders
I want to return a value from a handler function that is nested inside a
function. The scenario is to check the duplicate

Does anybody know how to achieve it?

public function checkDuplicate(email:String):Boolean {

var checkStmt:SQLStatement = new SQLStatement();

checkStmt.sqlConnection = conn;

var sql:String = select * from people where email = '[EMAIL PROTECTED]' ;

checkStmt.text = sql;

checkStmt.addEventListener(SQLEvent.RESULT, function(e:SQLEvent):Boolean {

var result:SQLResult = checkStmt.getResult();

Alert.show(result.data[0][name])

return true;

});

//checkStmt.addEventListener(SQLErrorEvent.ERROR, errorDBHandler);

checkStmt.execute();

}

-- 
Berkay UNAL
[EMAIL PROTECTED]


Re: [flexcoders] Remoting fails

2008-08-06 Thread Scott
I write .cfm files to test my code to ensure its working.  Perhaps
writing a quick .cfm to validate you can hit the coldfusion server would
help...?  That way you have better error reporting from the remote
components and can dump variables easily as well.

 

Regards,

  Scott

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: Wednesday, August 06, 2008 5:11 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails

 

Nice one Gregor I will give it a go.  I think the calls are leaving the
swf just having trouble returning into the browser/swf!

 

On 6 Aug 2008, at 11:08, Gregor Kiddie wrote:





 

Get some software that lets you see the responses like Charles or
Service Capture, that will give some more information on what's going
on.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails

 

Hi,

I have an app making a simple flash remoting call to CF and it works 
fine of multiple servers, runs in the local environment and returns a 
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the 
remoting call fails, no error message either, its as though it is not 
even leaving the app within the browser. I presume firewall could be 
a problem but am unsure as to where to go on this one? Any ideas 
anyone?

Cheers,

Simon

 

 

 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


[flexcoders] CRC

2008-08-06 Thread Scott
Does anyone know of a way to collect a CRC from a flex or air
application file?  I would like to verify that they are running the most
current version and the code I wrote as they hit my remote components.

 

Thanks

  Scott



Re: [flexcoders] Returning value inside a nested functions event?

2008-08-06 Thread Laurent Cozic
By definition an event handler shouldn't return a value, since no object can 
actually retrieve this value. You'll need to use some other way - perhaps you 
could save the result in a private variable inside you class, or have the event 
handler call another method. It depends on what you are trying to do.

 --
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com



- Original Message 
From: Berkay Unal [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 6, 2008 3:25:53 PM
Subject: [flexcoders] Returning value inside a nested functions event?


Hi Coders

I want to return a value from a handler function that is nested inside a 
function. The scenario is to check the duplicate

Does anybody know how to achieve it?

public function checkDuplicate( email:String) :Boolean {
var checkStmt:SQLStatem ent = new SQLStatement( );
checkStmt.sqlConnec tion = conn;
varsql:String = select * from people where email = '[EMAIL PROTECTED]' ; 
checkStmt.text = sql;
checkStmt.addEventL istener(SQLEvent .RESULT, function(e:SQLEvent) :Boolean {
var result:SQLResult = checkStmt.getResult ();
Alert.show(result. data[0][name])
returntrue;
});
//checkStmt. addEventListener (SQLErrorEvent. ERROR, errorDBHandler) ;
checkStmt.execute( );
}
-- 
Berkay UNAL
[EMAIL PROTECTED] com



  

Re: [flexcoders] Remoting fails

2008-08-06 Thread Scott
I just thought of something else...  Did you check the
services-config.xml to ensure outside access?

 

 Regards,

   Scott

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Wednesday, August 06, 2008 9:43 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails

 

I write .cfm files to test my code to ensure its working.  Perhaps
writing a quick .cfm to validate you can hit the coldfusion server would
help...?  That way you have better error reporting from the remote
components and can dump variables easily as well.

 

Regards,

  Scott

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: Wednesday, August 06, 2008 5:11 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails

 

Nice one Gregor I will give it a go.  I think the calls are leaving the
swf just having trouble returning into the browser/swf!

 

On 6 Aug 2008, at 11:08, Gregor Kiddie wrote:






 

Get some software that lets you see the responses like Charles or
Service Capture, that will give some more information on what's going
on.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails

 

Hi,

I have an app making a simple flash remoting call to CF and it works 
fine of multiple servers, runs in the local environment and returns a 
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the 
remoting call fails, no error message either, its as though it is not 
even leaving the app within the browser. I presume firewall could be 
a problem but am unsure as to where to go on this one? Any ideas 
anyone?

Cheers,

Simon

 

 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


[flexcoders] Re: Add a context menu to a menubar item

2008-08-06 Thread valdhor
Ok, I have created a custom itemRenderer which displays my context
menu perfectly.

Now, how do I get at the menu item data that the context menu came from.

IOW, I left click on my menu bar which drops down a menu; I then right
click on a menu item (Let's say it is Show some Cool Stuff) which
brings up my custom context menu. I then left click on my custom
context menu item. This generates a ContextMenuEvent.MENU_ITEM_SELECT
event which I have an eventListener for. The trouble is, there is
nothing in that event that lets me know what the original item was
that was right clicked on.


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

 Custom itemRenderer
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of valdhor
 Sent: Tuesday, August 05, 2008 9:05 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Add a context menu to a menubar item
 
 
 
 Either this is really easy and I've missed it or it's really quite
 difficult.
 
 I have a MenuBar that is created from an ArrayCollection that is
 returned from a RemoteObject call:
 
 mx:MenuBar id=menuBar itemClick=menuHandler(event)
 dataProvider={menuBarCollection} /
 
 How would I get at each item so I can add a context menu to each menu
 item?





Re: [flexcoders] Remoting fails

2008-08-06 Thread Simon Bailey
Hi Scott and thanks for the replies, I can hit it fine from a few  
different servers cross domains ( BTW this is using the old flash  
remoting for AS2 ) and this only seems an issue on this one particular  
network whilst the swf is in a browser, hence me thinking this is a  
firewall issue?


Apologise in advance for posting an AS2 related issue on this list,  
however i am sure most of the peeps here are like myself and have had  
fun in AS2 pre Flex :) so I thought why not ;)


On 6 Aug 2008, at 16:31, Scott wrote:


I just thought of something else…  Did you check the services- 
config.xml to ensure outside access?




 Regards,

   Scott



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

Sent: Wednesday, August 06, 2008 9:43 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails



I write .cfm files to test my code to ensure its working.  Perhaps  
writing a quick .cfm to validate you can hit the coldfusion server  
would help…?  That way you have better error reporting from the remote  
components and can dump variables easily as well.




Regards,

  Scott



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

Sent: Wednesday, August 06, 2008 5:11 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails



Nice one Gregor I will give it a go.  I think the calls are leaving  
the swf just having trouble returning into the browser/swf!




On 6 Aug 2008, at 11:08, Gregor Kiddie wrote:







Get some software that lets you see the responses like Charles or  
Service Capture, that will give some more information on what’s going  
on.




Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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


Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk

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


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

Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails



Hi,

I have an app making a simple flash remoting call to CF and it works
fine of multiple servers, runs in the local environment and returns a
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the
remoting call fails, no error message either, its as though it is not
even leaving the app within the browser. I presume firewall could be
a problem but am unsure as to where to go on this one? Any ideas
anyone?

Cheers,

Simon








--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





Re: [flexcoders] CRC

2008-08-06 Thread Ryan Gravener
I just keep a string of the version they are using, then compare that with
the server's version.  If they don't match, make them run the updater (air).

On Wed, Aug 6, 2008 at 10:45 AM, Scott [EMAIL PROTECTED] wrote:

Does anyone know of a way to collect a CRC from a flex or air
 application file?  I would like to verify that they are running the most
 current version and the code I wrote as they hit my remote components.



 Thanks

   Scott
  




-- 
Ryan Gravener
http://twitter.com/ryangravener


[flexcoders] Cairngorm goes Open Source

2008-08-06 Thread Rick Winscot
A friend of mine just forwarded me this... Which I think would be
interesting to anyone who uses, has used, or may use Cairngorm.

http://weblogs.macromedia.com/amcleod/archives/2008/08/cairngorm_moved.html

Rick Winscot




[flexcoders] Application's height property problem

2008-08-06 Thread guillaumeracine
Hi, i want to set the height of my application dynamically.
My app has a tree menu to the left and product thumbnails on the right.
I want to increase the height of the application depending on the
number of rows displayed in my product thumbnails. (The goal is to be
able to scroll with the browser instand of scrolling inside a VBox)

I have a appHeight property in my ModelLocator class.
This property is changed when the product's dataprovider change.

Here is the structure of my application

mx:Application ... height={modelLocator.appHeight }

  mx:HBox

mx:Tree height={this.height}.../mx:Tree
mx:VBox height={this.height}.../mx:VBox

  /mx:HBox

/mx:Application

This is the way i think it should work but it seems that i can't
acheive what i want with this...the height does not change at all and
i think there is a limit to the height of the application because if
my heigh is 2000 or 4000 i don't see any difference...

Please help!



[flexcoders] Event Phase clarification bubbling - please Diagram

2008-08-06 Thread djhatrick
Fellow FlexCoders...

I am sitting here having a debate on how the event phases works in
AS3. A couple of us have differing opinions of how events bubble, up
or down, inside or out. Maybe I've always been a little confused
exactly how bubbling works through the display object hierarchy, can
you clarify?..

(from the docs, complete with typo)

When an event occurs, it moves through the three phases of the event
flow: the capture phase, which flows from the top of the display list
hierarchy to the node just before the target node; the target phase,
which comprises the target node; and the bubbling phase, which flows
from the node subsequent to the target node back up the display list
hierarchy.

If I have 100 display Objects on the stage, is the top of the list
100, or is it 0?  And, isn't the word top, a little confusing, because
aren't the displayObjects actually containers? I bet if you work for
adobe, this is on a diagram on paper, would the docs team mind adding
it to the documentation, just because this really needs a visual aid.

So if you can clear this up, then I will understand how the event
phase works (and more importantly why it does not like in my current
situation).  What I want to achieve is have a nested child receive an
events from one of it's parents? Bubbling is not working, which is
odd, because, shouldn't the whole display list be traversed with
bubbling set to true, eventually?

The solution, I have used several times, is to add the listener to the
application object in Flex, but that seems hackish to me.

Thanks, for your time, because I really want to remove all doubt in
this area once and for all, since i have been working with as3 for
over 2 years now...

Patrick



[flexcoders] Error: Service was not found in the Cairngorm Services registry.

2008-08-06 Thread sk_acura
Hi All,

   I am using Cairngorm and UM Extensions and when i try get a
RemoteObject using the ServiceLocator i am getting the following Error..

[ERROR]

Here in LoginDelegate() and responder =[object Callbacks]
Error: Service USER_INFORMATION_SERVICE was not found in the Cairngorm
Services registry.
at
com.universalmind.cairngorm.business::ServiceLocator/findServiceByName()
at com.myapp.ui.desktop.business.login::LoginDelegate()
at com.myapp.ui.desktop.command::LoginCommand/doLogin()
at com.myapp.ui.desktop.command::LoginCommand/execute()
at com.adobe.cairngorm.control::FrontController/executeCommand()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent()
at com.universalmind.cairngorm.events::UMEvent/dispatch()
at DPALogin/checkCredentials()
at DPALogin/__userPassword_enter()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.controls::TextInput/keyDownHandler()
[/ERROR]

And i have Services.xml which defines the Services as listed below:
[XML]
service:ServiceLocator xmlns:mx=http://www.adobe.com/2006/mxml;
  xmlns:service=com.universalmind.cairngorm.business.* 
   mx:RemoteObject id=USER_INFORMATION_SERVICE  
destination=UserInformationFacade
/mx:RemoteObject
/service:ServiceLocator
[/XML]

 I didn't specify any methods as all the methods in the Service should
be accessible..

 I have placed this .xml File in the path
/src/com/myapp/ui/desktop/business/

  Where i am supposed to place this XML File ?? In the Source Code of
e UM Extensions or in Cairngorm i don't see a Class which is parsing
this XML File.

Thanks
Mars



Re: [flexcoders] Event Phase clarification bubbling - please Diagram

2008-08-06 Thread Scott Melby
Patrick -

Events bubble up the parental chain from the dispatcher.  So, your child 
will not ever catch an event that is dispatched by its parent (bubbling 
or non).  Conversely, parents will always catch bubbling events 
dispatched by their children.  This should also aid you in understanding 
why registering for the bubbling event out at the application level 
works.  Your dispatching component contains the application in its 
ancestry (parental chain), so eventually the event will bubble up to 
that level.

hth
Scott

djhatrick wrote:
 Fellow FlexCoders...

 I am sitting here having a debate on how the event phases works in
 AS3. A couple of us have differing opinions of how events bubble, up
 or down, inside or out. Maybe I've always been a little confused
 exactly how bubbling works through the display object hierarchy, can
 you clarify?..

 (from the docs, complete with typo)

 When an event occurs, it moves through the three phases of the event
 flow: the capture phase, which flows from the top of the display list
 hierarchy to the node just before the target node; the target phase,
 which comprises the target node; and the bubbling phase, which flows
 from the node subsequent to the target node back up the display list
 hierarchy.

 If I have 100 display Objects on the stage, is the top of the list
 100, or is it 0?  And, isn't the word top, a little confusing, because
 aren't the displayObjects actually containers? I bet if you work for
 adobe, this is on a diagram on paper, would the docs team mind adding
 it to the documentation, just because this really needs a visual aid.

 So if you can clear this up, then I will understand how the event
 phase works (and more importantly why it does not like in my current
 situation).  What I want to achieve is have a nested child receive an
 events from one of it's parents? Bubbling is not working, which is
 odd, because, shouldn't the whole display list be traversed with
 bubbling set to true, eventually?

 The solution, I have used several times, is to add the listener to the
 application object in Flex, but that seems hackish to me.

 Thanks, for your time, because I really want to remove all doubt in
 this area once and for all, since i have been working with as3 for
 over 2 years now...

 Patrick


   

-- 
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com
http://blog.fastlanesw.com




[flexcoders] Re: Selecting no color with ColorPicker

2008-08-06 Thread daddyo_buckeye
I see this thread is a bit dated, but I have the same question as
well. I'm trying to display the typical red slash option available in
most Adobe applications. I've scoured the docs and don't see any
option for this.

Sherm



[flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Tim Hoff

Yeah shoot, my bad.  Take the values property out of the tag.  Should
have said set the min to 0 and the max to 3,000,000 (like you have it. 
The values will lock the thumbs to those two positions (values) only.

-TH

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

 Shows how often I use the sliders. I didn't know you could use
multiple
 thumbs... This is not performant, you should be getting the max and
min
 within updateFilter() and sticking them in private vars, not in the
filter
 function itself... but you get the idea.

 private function myFilterFunction(item : Object) : Boolean
 {
 return item.value =
 Math.min(priceSlider.values[0],priceSlider.values[1])  item.value =
 Math.max(priceSlider.values[0],priceSlider.values[1]);
 }


 On Wed, Aug 6, 2008 at 5:29 PM, stinasius [EMAIL PROTECTED] wrote:

  i managed to build a dual thumb slider that i pass on the filter
  function. here is the code.
 
  mx:HSlider x=0 y=240 id=priceSlider minimum=0
  maximum=300 tickInterval=10 snapInterval=10
  thumbCount=2 values=[0,300] tickColor=#ff
  labels=[$0k,$300M] liveDragging=true width=182
  change=filterGrid()/
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups
  Links
 
 
 
 


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

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






[flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Tim Hoff

And go back to your original filterFunction:

if ( (city_cb.selectedLabel == All || item.city ==
city_cb.selectedLabel)  (lct_cb.selectedLabel == All ||
item.location == lct_cb.selectedLabel)  (item.value 
priceSlider.values[0]  item.value  priceSlider.values[1])
){
result=true;
}
return result;
}

priceSlider.values[300] doesn't exist.  Then as Alex suggests, walk
through the code with the debugger, or trace.

-TH

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


 Yeah shoot, my bad. Take the values property out of the tag. Should
 have said set the min to 0 and the max to 3,000,000 (like you have it.
 The values will lock the thumbs to those two positions (values)
only.

 -TH

 --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
 
  Shows how often I use the sliders. I didn't know you could use
 multiple
  thumbs... This is not performant, you should be getting the max and
 min
  within updateFilter() and sticking them in private vars, not in the
 filter
  function itself... but you get the idea.
 
  private function myFilterFunction(item : Object) : Boolean
  {
  return item.value =
  Math.min(priceSlider.values[0],priceSlider.values[1])  item.value
=
  Math.max(priceSlider.values[0],priceSlider.values[1]);
  }
 
 
  On Wed, Aug 6, 2008 at 5:29 PM, stinasius stinasius@ wrote:
 
   i managed to build a dual thumb slider that i pass on the filter
   function. here is the code.
  
   mx:HSlider x=0 y=240 id=priceSlider minimum=0
   maximum=300 tickInterval=10 snapInterval=10
   thumbCount=2 values=[0,300] tickColor=#ff
   labels=[$0k,$300M] liveDragging=true width=182
   change=filterGrid()/
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
 Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 






[flexcoders] Re: Event Phase clarification bubbling - please Diagram

2008-08-06 Thread djhatrick
bubble up the parental chain from the dispatcher, I think this
language makes it easier for me to visualize.

Thanks,
Patrick


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

 Patrick -
 
 Events bubble up the parental chain from the dispatcher.  So, your
child 
 will not ever catch an event that is dispatched by its parent (bubbling 
 or non).  Conversely, parents will always catch bubbling events 
 dispatched by their children.  This should also aid you in
understanding 
 why registering for the bubbling event out at the application level 
 works.  Your dispatching component contains the application in its 
 ancestry (parental chain), so eventually the event will bubble up to 
 that level.
 
 hth
 Scott
 
 djhatrick wrote:
  Fellow FlexCoders...
 
  I am sitting here having a debate on how the event phases works in
  AS3. A couple of us have differing opinions of how events bubble, up
  or down, inside or out. Maybe I've always been a little confused
  exactly how bubbling works through the display object hierarchy, can
  you clarify?..
 
  (from the docs, complete with typo)
 
  When an event occurs, it moves through the three phases of the event
  flow: the capture phase, which flows from the top of the display list
  hierarchy to the node just before the target node; the target phase,
  which comprises the target node; and the bubbling phase, which flows
  from the node subsequent to the target node back up the display list
  hierarchy.
 
  If I have 100 display Objects on the stage, is the top of the list
  100, or is it 0?  And, isn't the word top, a little confusing, because
  aren't the displayObjects actually containers? I bet if you work for
  adobe, this is on a diagram on paper, would the docs team mind adding
  it to the documentation, just because this really needs a visual aid.
 
  So if you can clear this up, then I will understand how the event
  phase works (and more importantly why it does not like in my current
  situation).  What I want to achieve is have a nested child receive an
  events from one of it's parents? Bubbling is not working, which is
  odd, because, shouldn't the whole display list be traversed with
  bubbling set to true, eventually?
 
  The solution, I have used several times, is to add the listener to the
  application object in Flex, but that seems hackish to me.
 
  Thanks, for your time, because I really want to remove all doubt in
  this area once and for all, since i have been working with as3 for
  over 2 years now...
 
  Patrick
 
 

 
 -- 
 Scott Melby
 Founder, Fast Lane Software LLC
 http://www.fastlanesw.com
 http://blog.fastlanesw.com





Re: [flexcoders] Event Phase clarification bubbling - please Diagram

2008-08-06 Thread Ralf Bokelberg
Here is a simple example, which demonstrates what the docs say


?xml version=1.0 encoding=utf-8?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
applicationComplete=main()

mx:Script
![CDATA[
public function main( args : Array = null ) : void
{
for each( var component in [this, hb1, hb2, b1, 
hb3])
{
component.addEventListener( 
MouseEvent.MOUSE_DOWN, logEvent, true );
component.addEventListener( 
MouseEvent.MOUSE_DOWN, logEvent, false );
}
}

private function logEvent( event : Event ) : void
{
trace( event.eventPhase, event.target, 
event.currentTarget );
}

private function traceBubbling( event : Event ) : void
{
trace(bubbling, event.target, 
event.currentTarget );
}
]]
/mx:Script

mx:HBox id=hb1 width=100% height=100%/
mx:HBox id=hb2
mx:Button id=b1

/mx:Button
/mx:HBox
mx:HBox id=hb3 width=100% height=100% visible=false/
/mx:Application

output
1 TestBubbling0.hb2.b1 TestBubbling0
1 TestBubbling0.hb2.b1 TestBubbling0.hb2
2 TestBubbling0.hb2.b1 TestBubbling0.hb2.b1
3 TestBubbling0.hb2.b1 TestBubbling0.hb2
3 TestBubbling0.hb2.b1 TestBubbling0

if you switch hb3 to visible, so it covers the button, the output is

1 TestBubbling0.hb3 TestBubbling0
2 TestBubbling0.hb3 TestBubbling0.hb3
3 TestBubbling0.hb3 TestBubbling0


So it is exactly like the docs say. The event goes down the parent
chain to the leaf (which is the top most visible thing) and then it
goes back up to the root.

Cheers
Ralf.

On Wed, Aug 6, 2008 at 6:21 PM, Scott Melby [EMAIL PROTECTED] wrote:
 Patrick -

 Events bubble up the parental chain from the dispatcher. So, your child
 will not ever catch an event that is dispatched by its parent (bubbling
 or non). Conversely, parents will always catch bubbling events
 dispatched by their children. This should also aid you in understanding
 why registering for the bubbling event out at the application level
 works. Your dispatching component contains the application in its
 ancestry (parental chain), so eventually the event will bubble up to
 that level.

 hth
 Scott

 djhatrick wrote:
 Fellow FlexCoders...

 I am sitting here having a debate on how the event phases works in
 AS3. A couple of us have differing opinions of how events bubble, up
 or down, inside or out. Maybe I've always been a little confused
 exactly how bubbling works through the display object hierarchy, can
 you clarify?..

 (from the docs, complete with typo)

 When an event occurs, it moves through the three phases of the event
 flow: the capture phase, which flows from the top of the display list
 hierarchy to the node just before the target node; the target phase,
 which comprises the target node; and the bubbling phase, which flows
 from the node subsequent to the target node back up the display list
 hierarchy.

 If I have 100 display Objects on the stage, is the top of the list
 100, or is it 0? And, isn't the word top, a little confusing, because
 aren't the displayObjects actually containers? I bet if you work for
 adobe, this is on a diagram on paper, would the docs team mind adding
 it to the documentation, just because this really needs a visual aid.

 So if you can clear this up, then I will understand how the event
 phase works (and more importantly why it does not like in my current
 situation). What I want to achieve is have a nested child receive an
 events from one of it's parents? Bubbling is not working, which is
 odd, because, shouldn't the whole display list be traversed with
 bubbling set to true, eventually?

 The solution, I have used several times, is to add the listener to the
 application object in Flex, but that seems hackish to me.

 Thanks, for your time, because I really want to remove all doubt in
 this area once and for all, since i have been working with as3 for
 over 2 years now...

 Patrick




 --
 Scott Melby
 Founder, Fast Lane Software LLC
 http://www.fastlanesw.com
 http://blog.fastlanesw.com

 



-- 
Ralf Bokelberg [EMAIL PROTECTED]
Flex  Flash Consultant based in Cologne/Germany


[flexcoders] Need Help with Modules

2008-08-06 Thread s20678
I have read couple of posts/presentations regarding Modules..But 
still I am not able to figure out the issue. I really appreciate if 
anyone can help me out here.  

I am getting ReferenceError: Error #1069: Property child not found on 
MyApp and there is no default value.
at HomePageView/loadChildView()
[E:\projects\web\intranet\intranet\flex\src\retail\dsd\src\HomePageVie
w.mxml:7]
at HomePageView/___HomePageView_Button1_click()
[E:\projects\web\intranet\intranet\flex\src\retail\dsd\src\HomePageVie
w.mxml:12]

Here is the code: [When I click 'childView' button in HomePageView 
module, I want ChildPageView to be loaded.]

MyApp.mxml

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* 
creationComplete=initApp()
mx:Script
![CDATA[
private function initApp():void {
module1.applicationDomain = 
ApplicationDomain.currentDomain;
module1.url=Module1.swf;
}
]]
/mx:Script
   mx:ViewStack id=myAppViewStack  width=100% height=100%  
 mx:ModuleLoader id=module1  width=100% height=100% /
 mx:ModuleLoader id=module2  width=100% height=100% /
  mx:ModuleLoader id=module3   width=100% 
height=100% /
  /mx:ViewStack
 /mx:Application

Module1.mxml

mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute width=100% height=100%  xmlns=* 
creationComplete=initApp()
 mx:ViewStack id=module1ViewStack borderStyle=solid 
width=100% height=100% 
 mx:ModuleLoader id=home  width=100% height=100% /
 mx:ModuleLoader id=child  width=100% height=100% /
 /mx:ViewStack
mx:Script
![CDATA[
   private function initApp():void {
home.applicationDomain = 
ApplicationDomain.currentDomain;
home.url=HomePageView.swf;
}
]]
/mx:Script
/mx:Module

HomePageView.mxml

?xml version=1.0 encoding=utf-8? 
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; width=100% 
height=100%
mx:Script
![CDATA[ 
import mx.core.Application;
private function loadChildView(){

Application.application.child.applicationDomain = 
ApplicationDomain.currentDomain;

Application.application.child.url=ChildPageView.swf;
}   
]]
/mx:Script
mx:Button label=Child View click=loadChildView() /
/mx:Module


Am I doing something wrong? I heard about having shared variables in 
Application..what are these. Can you please explain me how to resolve 
the error.



Re: [flexcoders] Who is using the Framework Caching?

2008-08-06 Thread Matt Chotin
We're not sharing how many folks out there have the RSL yet according to our 
survey, but it is growing.  I would definitely encourage turning the RSL on.

Matt


On 8/6/08 6:16 AM, Tom Chiverton [EMAIL PROTECTED] wrote:

On Wednesday 06 Aug 2008, thatstephen wrote:
 for a user without the framework cached is 949k. This is 230k more
 than if the framework cache is not enabled.

Your users are already there, and if you've decided 673k can be sent quick
enough, it's only a third or so more.
And, the more people who use this, the more chance your users will get the
quicker versions.

All your users will benefit the 2nd time onwards, for instance.

--
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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






Re: [flexcoders] Event Phase clarification bubbling - please Diagram

2008-08-06 Thread Jon Bradley

On Aug 6, 2008, at 12:48 PM, Ralf Bokelberg wrote:


for each( var component in [this, hb1, hb2, b1, hb3])


Hadn't seen that done before.

nice.

The only downside to the whole event bubbling hooplah is that all  
your components, and all your children need to extend EventDispatcher  
or some component that extends it. Otherwise, you have to manually  
handle the re-dispatching of the event your self, basically bubbling  
the event manually through the chain.


- jon

[flexcoders] theme color on combobox; is there no themeAlpha

2008-08-06 Thread flexaustin
So I have a combobox that I have styled using the flex style explorer,
but something is amiss. 

When you mouse over the combobox the border color flickers, well I
guess the theme color makes it look like it is flickering on mouseover. 

The border color seems to be fade from top to bottom so light to dark,
but when you mouseover then the themeColor takes over and changes the
color. I tried themeColor = null; but then when you mouse over the
combobox it removes the border completely. So before mouseover
combobox has border during mouseover no border (themeColor: = null). 

Is there a setting to remove mouseover? I don't want color or alpha
changes happening on mouseover at all. Their is a setting for use
roll over but when set to false it doesn't look like it changes anything.



[flexcoders] Flex Module issue

2008-08-06 Thread Christopher DUPONT
Why child is null in the first case ?

private function btnStatsClickHandler(event:Event):void
 {
 var module:IModuleInfo =
ModuleManager.getModule(com/test/module/pictureviewer/PictureViewer.swf\
);

 module.addEventListener(ModuleEvent.READY,
 function(event:ModuleEvent):void {
 var child:* = module.factory.create();
 trace(child:  + child);
 });

 module.load();
 }

RESULT:
[SWF]
D:\flexworkspace\test\bin\com\test\module\pictureviewer\PictureViewer.sw\
f - 50 612 bytes after decompression
child: null

private function btnStatsClickHandler(event:Event):void
 {
 var module:IModuleInfo =
ModuleManager.getModule(com/test/module/pictureviewer/PictureViewer.swf\
);

 module.addEventListener(ModuleEvent.READY,
 function(event:ModuleEvent):void {
 var child:PictureViewer = module.factory.create() as
PictureViewer;
 trace(child:  + child);
 });

 module.load();
 }

RESULT:
[SWF]
D:\flexworkspace\test\bin\com\test\module\pictureviewer\PictureViewer.sw\
f - 50 612 bytes after decompression
child: PictureViewer608


Re: [flexcoders] CRC

2008-08-06 Thread Scott
That's what I was doing, however I can't ensure that someone is
attaching to my remote component with their own function then.  I was
hoping to catch a value off of a crc check and use that as verification
to the remote object that it's really my code that's touching the CF
side.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ryan Gravener
Sent: Wednesday, August 06, 2008 10:38 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] CRC

 

I just keep a string of the version they are using, then compare that
with the server's version.  If they don't match, make them run the
updater (air).

On Wed, Aug 6, 2008 at 10:45 AM, Scott [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Does anyone know of a way to collect a CRC from a flex or air
application file?  I would like to verify that they are running the most
current version and the code I wrote as they hit my remote components.

 

Thanks

  Scott




-- 
Ryan Gravener
http://twitter.com/ryangravener http://twitter.com/ryangravener 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


Re: [flexcoders] Remoting fails

2008-08-06 Thread Scott
I wouldn't think it would be a firewall issue unless its on the remote
side and it has stateful packet inspection... It's all port 80 traffic,
so if you can browse to other sites then you can flash remote.

 

I had numerous issues with as2/flash remoting; so many that I dropped
developing in it about 1.5 years ago.  I picked up flex 3 builder and
have not experienced any server attaching issues since.  I'm starting to
do about 90% of my development in it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: Wednesday, August 06, 2008 10:37 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails

 

Hi Scott and thanks for the replies, I can hit it fine from a few
different servers cross domains ( BTW this is using the old flash
remoting for AS2 ) and this only seems an issue on this one particular
network whilst the swf is in a browser, hence me thinking this is a
firewall issue?

 

Apologise in advance for posting an AS2 related issue on this list,
however i am sure most of the peeps here are like myself and have had
fun in AS2 pre Flex :) so I thought why not ;)

 

On 6 Aug 2008, at 16:31, Scott wrote:





 

I just thought of something else...  Did you check the
services-config.xml to ensure outside access?

 

 Regards,

   Scott

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Wednesday, August 06, 2008 9:43 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails

 

I write .cfm files to test my code to ensure its working.  Perhaps
writing a quick .cfm to validate you can hit the coldfusion server would
help...?  That way you have better error reporting from the remote
components and can dump variables easily as well.

 

Regards,

  Scott

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: Wednesday, August 06, 2008 5:11 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] Remoting fails

 

Nice one Gregor I will give it a go.  I think the calls are leaving the
swf just having trouble returning into the browser/swf!

 

On 6 Aug 2008, at 11:08, Gregor Kiddie wrote:







 

Get some software that lets you see the responses like Charles or
Service Capture, that will give some more information on what's going
on.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Simon Bailey
Sent: 06 August 2008 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting fails

 

Hi,

I have an app making a simple flash remoting call to CF and it works 
fine of multiple servers, runs in the local environment and returns a 
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the 
remoting call fails, no error message either, its as though it is not 
even leaving the app within the browser. I presume firewall could be 
a problem but am unsure as to where to go on this one? Any ideas 
anyone?

Cheers,

Simon

 

 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean.


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean.

 

 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 


[flexcoders] Re: simple arraycollection question

2008-08-06 Thread Richard Baker
Ahh, yes, that does work. I was looping as you suggest, but the
collection change event was firing each time. Now that I think about
it I suppose the best ting to do would be to hook up the event
listener on the last addition to the ac? Or is there a better practice
out there somewhere?

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

 I haven't run this code, but I don't see why it wouldn't work:
 
 this.source = event.result.source;
 
 I personally prefer looping through the returned collection and
 translating the raw objects into instances of a class I've defined. 
 This allows for compile-time checking on anything you want to do with
 the local copies, and it lets you add methods and properties to those
 objects.
 
 var o:SomeClass = new SomeClass(event.result[i]);
 collection.addItem(o);
 
 --- In flexcoders@yahoogroups.com, Richard Baker bishbash64@ wrote:
 
  I have a .as class extending arraycollection.
  
  In the constructor I set up a webservice and listner to capture the
  result in resultHandler
  
  Ideally in resultHandler I'd do something like
this=event.result;
  
  but it doesn't work, so I am looping over the event.result, adding it
  to the array collection like:
  
 this.addItem(event.result[i]);
  
  can I assign the whole array collection in one go. Probably missing
  something simple, but I just can't see it :(
  
  Thx
 





[flexcoders] Snapping TextInput after Zoom Effect

2008-08-06 Thread Brandon Gamblin
I've got a combo box that, when altered, turns hides or unhides
certain elements in the form. However, to keep those items from
snapping in badly, I put a simple zoom effect on them.

So now I watch VBoxes shrink out of view, as others bounce into view.
It's a good effect, but I notice that the TextInput items seem to grow
to a certain width, then snap to their correct widths once the effect
is done. Is this unavoidable, or does it sound like I'm doing
something wrong?

Thanks for reading this, and I appreciate any help you can give.




[flexcoders] AMF Load Testing and open source

2008-08-06 Thread jbluedelta
Have a web based AMF flex app. 

Am looking for any open source tools that would help me capture
traffic and also any user interactions.



[flexcoders] Custom Events

2008-08-06 Thread rss181919
I have a custom component that is basically just a panel wrapper around 
a webservice and a datagrid populated by the webservice.  I want to be 
able to produce a bubbling effect where an itemSelect fires an internal 
handler and then and external handler on the parent of the custom 
component.  I have been successful at firing both the external and 
internal handlers but they both fire during the targeting phase and the 
order is external to internal and I want to reverse that order. What 
should the design of this look like?  I tried firing an handler off the 
itemSelect event and then in the handler creating a new event and 
dispatching that to an external handler but I can't seem to get that to 
work.



Re: [flexcoders] Remoting fails

2008-08-06 Thread Sherif Abdou
  You did restart the ColdFusion server right?- Original Message From: Scott [EMAIL PROTECTED]To: flexcoders@yahoogroups.comSent: Wednesday, August 6, 2008 12:56:18 PMSubject: Re: [flexcoders] Remoting failsI wouldn’t think it would be a
 firewallissue unless its on the remote side and it has stateful packet inspection… It’sall port 80 traffic, so if you can browse to other sites then you can flashremote.I had numerous issues with as2/flashremoting; so many that I dropped developing in it about 1.5 years ago. Ipicked up flex 3 builder and have not experienced any server attaching issuessince. I’m starting to do about 90% of my development in it. From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of Simon BaileySent: Wednesday, August 06, 200810:37 AMTo: [EMAIL PROTECTED] ups.comSubject: {Disarmed} Re:[flexcoders] Remoting failsHi Scott and thanks for the replies, I can hit it finefrom a fewdifferentservers cross domains ( BTWthis is usingthe old flash remoting for AS2 ) and this only
 seems an issue on this oneparticular network whilst the swf is in a browser, hence me thinking this is afirewall issue?Apologise in advance for posting an AS2 related issue on this list,however i am sure most of the peeps here are like myself and have had fun inAS2 pre Flex :) so I thought why not ;)On 6 Aug 2008, at 16:31, Scott wrote:I just thought of something else…Did you check the services-config. xml to ensure outside access?Regards, Scott From:[EMAIL PROTECTED] ups.com[mailto: [EMAIL PROTECTED] ups.com ]OnBehalf Of ScottSent:Wednesday, August 06, 2008 9:43 AMTo: [EMAIL PROTECTED] ups.comSubject:{Disarmed} Re: [flexcoders] RemotingfailsI write .cfm files to test my code toensure its
 working. Perhaps writing a quick .cfm to validate you can hitthe coldfusion server would help…? That way you have better errorreporting from the remote components and can dump variables easily as well.Regards, Scott From:[EMAIL PROTECTED] ups.com[mailto: [EMAIL PROTECTED] ups.com ]OnBehalf OfSimon BaileySent:Wednesday, August 06, 2008 5:11 AMTo: [EMAIL PROTECTED] ups.comSubject:{Disarmed} Re: [flexcoders] RemotingfailsNice one Gregor I will give it a go.I think the calls are leaving the swf just having trouble returning intothe browser/swf!On 6 Aug 2008, at 11:08, Gregor Kiddiewrote:Get some software that lets you see the responses like Charles orService Capture, that will give some more information on
 what’s going on.Gk.Gregor KiddieSenior DeveloperINPSTel: 01382564343Registered address: The Bread Factory, 1a Broughton Street , London SW8 3QJRegistered Number: 1788577Registered in the UKVisit our Internet Web site atwww.inps.co. ukThe information in this internet email isconfidential and is intended solely for the addressee. Access, copying orre-use of information in it by anyone else is not authorised. Any views oropinions presented are solely those of the author and do not necessarilyrepresent those of INPS or any of its affiliates. If you are not the intendedrecipient please contact is.helpdesk@ inps.co.uk From:[EMAIL PROTECTED] ups.com[mailto:flexcoders@ yahoogroups. com]OnBehalf
 OfSimon BaileySent:06 August 2008 10:53To: [EMAIL PROTECTED] ups.comSubject:[flexcoders] Remoting failsHi,I have an app making a simple flash remoting call to CF and it worksfine of multiple servers, runs in the local environment and returns aquery from ColdFusion as expected.Problem is as soon as my client deploys on their company network theremoting call fails, no error message either, its as though it is noteven leaving the app within the browser. I presume firewall could bea problem but am unsure as to where to go on this one? Any ideasanyone?Cheers,Simon--This message has been scanned for viruses anddangerous content byMailScanner,and isbelieved to be clean.--This message has been scanned for viruses
 anddangerous content byMailScanner,and isbelieved to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

  

[flexcoders] Re: Error: Service was not found in the Cairngorm Services registry.

2008-08-06 Thread sk_acura
Hi All,

   I did lot of testing and Still cannot figure out why the
ServiceLocator is unable to get the RemoteObjects..

  When i try to create a new Object using new
RemoteObject(SERVICE_NAME) it works. How ever the same code returns
null from my Delegate !

  My Services.mxml looks like
[CODE]
service:ServiceLocator xmlns:mx=http://www.adobe.com/2006/mxml;
   xmlns:service=com.universalmind.cairngorm.business.* 
mx:RemoteObject id=UserInformationFacade  
 destination=UserInformationFacade
 /mx:RemoteObject
/service:ServiceLocator
[/CODE]

And my remoting-config.xml is as listed below:

[CODE]
  destination id=UserInformationFacade
 properties
factoryspring/factory
sourceuserInformationFacade/source
 /properties
  /destination
[/CODE]


My Application has the following code for initializing the Services..

business:Services /

Here is the Code i have in my Delegate:

[CODE]
   public function LoginDelegate(responder:IResponder)
   {
 super(responder);
 trace(Here in LoginDelegate() and responder =+responder);
 // Initialize the Login Service..
 if(service==null){
var serviceLocator:ServiceLocator =
com.universalmind.cairngorm.business.ServiceLocator.getInstance();
trace(Service Locator =+serviceLocator+  Service
Name =+Services.LOGIN_SERVICE);
service =
serviceLocator.getRemoteObject(Services.LOGIN_SERVICE);
trace(Service from Service Locator =+service);
if(service==null){
trace(Geting the Service using the RemoteObject
+Services.LOGIN_SERVICE);
service =new RemoteObject(Services.LOGIN_SERVICE);
trace(Service =+service);
}
}
trace( service in LoginDelegate() =+service);

}
[/CODE]

  So here i am trying to get the RemoteObject first from the
ServiceLocator and if it returns null i am trying to create it
diretctly and it is giving null either way..



  How ever when i try to create it from my view it returns the Remote
Object..
[CODE]
 private function init():void {
//creating remote user information object
trace(Here in init() of Login.mxml);
userInformation= new RemoteObject(UserInformationFacade);
trace(UserInformation =+UserInformation);
 }
[/CODE]

in my flashlog.txt i have the trace log..

[LOG]
Here in Init()
Services =[object Services]
MyView =Login288
Here in init() of Login.mxml
UserInformation =[RemoteObject  destination=UserInformationFacade
channelSet=null]
Here in checkCredentials()
Here in LoginCommand
Event Type =LoginEvent
Here in doLogIn and event =[Event type=LoginEvent bubbles=true
cancelable=false eventPhase=2]
Here in LoginDelegate() and responder =[object Callbacks]
Service Locator =[object Services]  Service Name
=DPAUserInformationFacade
Service from Service Locator =null
Geting the Service using the RemoteObject UserInformationFacade
Service =null
 service in LoginDelegate() =null
Here before making a call on the Delegate
Here in login and service =null  userId =[tuser2]  password =[password]
 Unable to Find the Service and Service is NULL
LoginEvent Dispatched =true
[/LOG]

 Thanks for your help

Regards
Mars




[flexcoders] adding to default ContextMenu in flex app

2008-08-06 Thread Aaron Miller
Hello,

I am trying to figure out how to add an item to the default context menu
when someone right clicks inside the stage. I know I have to add a
ContextMenuItem to the ContextMenu.customItems properties, but I'm not sure
how to reference the default menu. Listening for a MouseEvent.RIGHT_CLICK in
the application scope only seems to be available for AIR. How would I go
about adding an item to the default menu?


Thanks!
~Aaron


Re: [flexcoders] AMF Load Testing and open source

2008-08-06 Thread dnk
service capture (have used - works great) http://kevinlangdon.com/serviceCapture/ 
 , or charles (have not used) http://www.charlesproxy.com/






On 6-Aug-08, at 11:23 AM, jbluedelta wrote:


Have a web based AMF flex app.

Am looking for any open source tools that would help me capture
traffic and also any user interactions.







RE: [flexcoders] Custom Events

2008-08-06 Thread Tracy Spratt
...firing an handler off the itemSelect event and then in the handler
creating a new event and dispatching that to an external handler

That is how I do it.  What didn't work?

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rss181919
Sent: Wednesday, August 06, 2008 2:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom Events

 

I have a custom component that is basically just a panel wrapper around 
a webservice and a datagrid populated by the webservice. I want to be 
able to produce a bubbling effect where an itemSelect fires an internal 
handler and then and external handler on the parent of the custom 
component. I have been successful at firing both the external and 
internal handlers but they both fire during the targeting phase and the 
order is external to internal and I want to reverse that order. What 
should the design of this look like? I tried firing an handler off the 
itemSelect event and then in the handler creating a new event and 
dispatching that to an external handler but I can't seem to get that to 
work. 

 



[flexcoders] Data caching dto's

2008-08-06 Thread flexaustin
I was wondering if anyone has done any caching of data in Flex? And if
so how did you do this?

I have an application that pulls in up to 500 items and converts them
to DTO's. The app then runs a routine, which generates objects based
on those dto's. The generation of objects is very memory intensive so
I need to reduce this to increase usability as right now the user has
to wait until all 500 objects are created.  I would like to be able to
generate say the first 10 objects based off the old data, if the data
hasn't changed since the last time the data was grab (via httpservice)
then run the routine to create the other 490 objects.

So sorting by saying N changed?...yes through out, N + 1
changed?no keep create object, N + 2 changed? yes through
out.N+10 stop.
Run...routine recreate the other 490 and stick them back in the
correct order.

Make sense?



[flexcoders] Re: simple arraycollection question

2008-08-06 Thread Michael VanDaniker
As you loop over the objects you can save them in an array instead of
in the collection.  When the array is finished being populated you can
set it to be the source on the collection.  That would result in only
one collection change event.

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

 Ahh, yes, that does work. I was looping as you suggest, but the
 collection change event was firing each time. Now that I think about
 it I suppose the best ting to do would be to hook up the event
 listener on the last addition to the ac? Or is there a better practice
 out there somewhere?
 
 --- In flexcoders@yahoogroups.com, Michael VanDaniker michael@
 wrote:
 
  I haven't run this code, but I don't see why it wouldn't work:
  
  this.source = event.result.source;
  
  I personally prefer looping through the returned collection and
  translating the raw objects into instances of a class I've defined. 
  This allows for compile-time checking on anything you want to do with
  the local copies, and it lets you add methods and properties to those
  objects.
  
  var o:SomeClass = new SomeClass(event.result[i]);
  collection.addItem(o);
  
  --- In flexcoders@yahoogroups.com, Richard Baker bishbash64@
wrote:
  
   I have a .as class extending arraycollection.
   
   In the constructor I set up a webservice and listner to capture the
   result in resultHandler
   
   Ideally in resultHandler I'd do something like
 this=event.result;
   
   but it doesn't work, so I am looping over the event.result,
adding it
   to the array collection like:
   
  this.addItem(event.result[i]);
   
   can I assign the whole array collection in one go. Probably missing
   something simple, but I just can't see it :(
   
   Thx
  
 





[flexcoders] Re: Custom Events

2008-08-06 Thread rss181919
I have listed my setup below.  
Results:
I have confirmed that the initialize event on the parent object adds 
the event.
Clicking the item on the grid, fires the internal handler and I have 
confirmed that it dispatches the custom event.  However, the parent 
event handler for the custom event does not fire.

My call to the custom component looks like this:

pdb:CategoriesPnl id=CategoriesPnl 
initialize=CategoriesPnl.CtgsPnlDG.addEventListener('dgItemClick', 
CtgsPnlDGItemClick);/pdb:CategoriesPnl

The eventhandler in the parent looks like this:

private function CtgsPnlDGItemClick(event:ListEvent):void
{Alert.show(event.eventPhase+'_external');}

The custom component looks like this:
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; 
label=Categories backgroundColor=#CC width=100% 
height=100% 
mx:Script
  ![CDATA[
  import flash.events.Event;
  import mx.collections.ArrayCollection;
  import mx.controls.DataGrid;
  import mx.controls.Alert;
  import mx.events.*
  import mx.events.ListEvent
  [Bindable] public var CtgsPnlAC:ArrayCollection = new 
ArrayCollection;
  private function CtgsPnlDGItemClick(event:ListEvent):void
  {
Alert.show('internal');
Alert.show('dispatch result'+dispatchEvent(new Event
(dgItemClick,true)).toString());
  }
  private function CtgsPnlDGRefresh():void
  {
CtgsPnlWebSvcVO.GetAllCategories();
  }
  ]]
/mx:Script
mx:Metadata
  [Event(name=dgItemClick, type=mx.events.ListEvent.ITEM_CLICK)]
/mx:Metadata
mx:WebService id=CtgsPnlWebSvcVO 
wsdl=http://support07:57773/csp/prtest/pdb.sl.WebServiceVO.cls?
WSDL=1
  mx:operation name=GetAllCategories resultFormat=object 
  fault=mx.controls.Alert.show(event.fault.faultString)
  result=CtgsPnlAC = event.result.Categories;
  /mx:operation
/mx:WebService
mx:DataGrid id=CtgsPnlDG height=100% 
dataProvider={CtgsPnlAC} 
initialize=CtgsPnlDGRefresh() 
itemClick=CtgsPnlDGItemClick(event)

  mx:columns
mx:DataGridColumn headerText=ID dataField=CtgId/
mx:DataGridColumn headerText=Key dataField=CtgKey/
  /mx:columns
/mx:DataGrid
/mx:Panel

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

 ...firing an handler off the itemSelect event and then in the 
handler
 creating a new event and dispatching that to an external handler
 
 That is how I do it.  What didn't work?
 
 Tracy




[flexcoders] help with flex 3 sdk (how could I....)

2008-08-06 Thread gduenas
Ok, once I've downloaded the flex3sdk, then ?
I was wondering if anyone of you guys know a tutorial about how to  
start creating
application with the flex sdk, and installing so forth, any given help  
would be
appreciated. I've tryied the adobe help, but it seems so obscure for  
me, any other ideas?
I'm very open.
I know that you have maybe heard of this a million time, well this is  
the million
one...help me out? would you?


Regards,


Gustavo Duenas



[flexcoders] Testing Internet Connection in Flex

2008-08-06 Thread nagaofthesea
Howdy-

Does anyone know of a way (AS3 or mx:CustomComponent) that tests if
the user's internet connection is live?

I have an application with error processing that needs to know if an
RPC failed because the user's connection is down...

Thanks!
Naga



RE: [flexcoders] Re: Custom Events

2008-08-06 Thread Tracy Spratt
Looks ok to me.

 

The event is bubbling, so try listening for the event at the Main app
level:

this.addEventListener('dgItemClick', CtgsPnlDGItemClick)

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rss181919
Sent: Wednesday, August 06, 2008 3:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Events

 

I have listed my setup below. 
Results:
I have confirmed that the initialize event on the parent object adds 
the event.
Clicking the item on the grid, fires the internal handler and I have 
confirmed that it dispatches the custom event. However, the parent 
event handler for the custom event does not fire.

My call to the custom component looks like this:

pdb:CategoriesPnl id=CategoriesPnl 
initialize=CategoriesPnl.CtgsPnlDG.addEventListener('dgItemClick', 
CtgsPnlDGItemClick);/pdb:CategoriesPnl

The eventhandler in the parent looks like this:

private function CtgsPnlDGItemClick(event:ListEvent):void
{Alert.show(event.eventPhase+'_external');}

The custom component looks like this:
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  
label=Categories backgroundColor=#CC width=100% 
height=100% 
mx:Script
![CDATA[
import flash.events.Event;
import mx.collections.ArrayCollection;
import mx.controls.DataGrid;
import mx.controls.Alert;
import mx.events.*
import mx.events.ListEvent
[Bindable] public var CtgsPnlAC:ArrayCollection = new 
ArrayCollection;
private function CtgsPnlDGItemClick(event:ListEvent):void
{
Alert.show('internal');
Alert.show('dispatch result'+dispatchEvent(new Event
(dgItemClick,true)).toString());
}
private function CtgsPnlDGRefresh():void
{
CtgsPnlWebSvcVO.GetAllCategories();
}
]]
/mx:Script 
mx:Metadata
[Event(name=dgItemClick, type=mx.events.ListEvent.ITEM_CLICK)]
/mx:Metadata
mx:WebService id=CtgsPnlWebSvcVO 
wsdl=http://support07:57773/csp/prtest/pdb.sl.WebServiceVO.cls?
http://support07:57773/csp/prtest/pdb.sl.WebServiceVO.cls? 
WSDL=1
mx:operation name=GetAllCategories resultFormat=object 
fault=mx.controls.Alert.show(event.fault.faultString)
result=CtgsPnlAC = event.result.Categories;
/mx:operation
/mx:WebService
mx:DataGrid id=CtgsPnlDG height=100% 
dataProvider={CtgsPnlAC} 
initialize=CtgsPnlDGRefresh() 
itemClick=CtgsPnlDGItemClick(event)

mx:columns
mx:DataGridColumn headerText=ID dataField=CtgId/
mx:DataGridColumn headerText=Key dataField=CtgKey/
/mx:columns
/mx:DataGrid
/mx:Panel

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

 ...firing an handler off the itemSelect event and then in the 
handler
 creating a new event and dispatching that to an external handler
 
 That is how I do it. What didn't work?
 
 Tracy

 



RE: [flexcoders] AMF Load Testing and open source

2008-08-06 Thread Dimitrios Gianninas
Do you simply want to see the traffic? or you want to record gestures and play 
them back?
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
jbluedelta
Sent: Wednesday, August 06, 2008 2:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AMF Load Testing and open source



Have a web based AMF flex app. 

Am looking for any open source tools that would help me capture
traffic and also any user interactions.



 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.



[flexcoders] List IconFunction with Button renderers

2008-08-06 Thread Amy
Hi all;

I'm trying to use an iconFunction with a TileList that has just a plain 
Jane unextended Button as its itemRenderers.  I'm trying to use the 
iconFunction to set the icon on the buttons, but it doesn't seem to me 
that the button is recieving the information from the ListBase.  I have 
verified that my iconFunction is returning a Class and that the 
ListBase is seeing that return.  Is the button component designed to be 
able to recieve and act on this information, or am I barking up the 
wrong tree here?

Thanks;

Amy



RE: [flexcoders] Flex Module issue

2008-08-06 Thread Alex Harui
The more interesting question is why the second one isn't.  Because all
of your references to the module are in temporary local variables, as
soon as you exit the click handler, the module is available for garbage
collection, and in the first case it got collected and the second it
didn't, but usually a module's arrival forces a gc.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Christopher DUPONT
Sent: Wednesday, August 06, 2008 10:34 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Module issue



Why child is null in the first case ?

private function btnStatsClickHandler(event:Event):void
{
var module:IModuleInfo =
ModuleManager.getModule(com/test/module/pictureviewer/PictureViewer.swf
);

module.addEventListener(ModuleEvent.READY, 
function(event:ModuleEvent):void {
var child:* = module.factory.create();
trace(child:  + child);
n! bsp;   });

module.load();
}

RESULT:
[SWF]
D:\flexworkspace\test\bin\com\test\module\pictureviewer\PictureViewer.sw
f - 50 612 bytes after decompression
child: null

private function btnStatsClickHandler(event:Event):void
{
var module:IModuleInfo =
ModuleManager.getModule(com/test/module/pictureviewer/PictureViewer.swf
);

module.addEventListener(ModuleEvent.READY, 
function(event:ModuleEv! ent):void {
nbs! p;   var child:PictureViewer =
module.factory.create() as PictureViewer;
trace(child:  + child);
});

module.load();
}

RESULT:
[SWF]
D:\flexworkspace\test\bin\com\test\module\pictureviewer\PictureViewer.sw
f - 50 612 bytes after decompression
child: PictureViewer608 

 


RE: [flexcoders] Need Help with Modules

2008-08-06 Thread Alex Harui
Modules are not applications.
 
Application.application is the application in MyApp.mxml



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of s20678
Sent: Wednesday, August 06, 2008 9:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Need Help with Modules



I have read couple of posts/presentations regarding Modules..But 
still I am not able to figure out the issue. I really appreciate if 
anyone can help me out here. 

I am getting ReferenceError: Error #1069: Property child not found on 
MyApp and there is no default value.
at HomePageView/loadChildView()
[E:\projects\web\intranet\intranet\flex\src\retail\dsd\src\HomePageVie
w.mxml:7]
at HomePageView/___HomePageView_Button1_click()
[E:\projects\web\intranet\intranet\flex\src\retail\dsd\src\HomePageVie
w.mxml:12]

Here is the code: [When I click 'childView' button in HomePageView 
module, I want ChildPageView to be loaded.]

MyApp.mxml

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  xmlns=* 
creationComplete=initApp()
mx:Script
![CDATA[
private function initApp():void {
module1.applicationDomain = 
ApplicationDomain.currentDomain;
module1.url=Module1.swf;
}
]]
/mx:Script
mx:ViewStack id=myAppViewStack width=100% height=100% 
mx:ModuleLoader id=module1 width=100% height=100% /
mx:ModuleLoader id=module2 width=100% height=100% /
mx:ModuleLoader id=module3 width=100% 
height=100% /
/mx:ViewStack
/mx:Application

Module1.mxml

mx:Module xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  
layout=absolute width=100% height=100% xmlns=* 
creationComplete=initApp()
mx:ViewStack id=module1ViewStack borderStyle=solid 
width=100% height=100% 
mx:ModuleLoader id=home width=100% height=100% /
mx:ModuleLoader id=child width=100% height=100% /
/mx:ViewStack
mx:Script
![CDATA[
private function initApp():void {
home.applicationDomain = 
ApplicationDomain.currentDomain;
home.url=HomePageView.swf;
}
]]
/mx:Script
/mx:Module

HomePageView.mxml

?xml version=1.0 encoding=utf-8? 
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  width=100% 
height=100%
mx:Script
![CDATA[ 
import mx.core.Application;
private function loadChildView(){

Application.application.child.applicationDomain = 
ApplicationDomain.currentDomain;

Application.application.child.url=ChildPageView.swf;
} 
]]
/mx:Script
mx:Button label=Child View click=loadChildView() /
/mx:Module

Am I doing something wrong? I heard about having shared variables in 
Application..what are these. Can you please explain me how to resolve 
the error.



 


RE: [flexcoders] Event Phase clarification bubbling - please Diagram

2008-08-06 Thread Alex Harui
FWIW, we didn't make up the event model.  It is based on the W3C spec
http://www.w3.org/TR/DOM-Level-3-Events/events.html which has a pretty
picture in it



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Wednesday, August 06, 2008 10:02 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Event Phase clarification bubbling - please
Diagram



On Aug 6, 2008, at 12:48 PM, Ralf Bokelberg wrote:


for each( var component in [this, hb1, hb2, b1, hb3])



Hadn't seen that done before.

nice.

The only downside to the whole event bubbling hooplah is that all your
components, and all your children need to extend EventDispatcher or some
component that extends it. Otherwise, you have to manually handle the
re-dispatching of the event your self, basically bubbling the event
manually through the chain.

- jon

 


RE: [flexcoders] Application's height property problem

2008-08-06 Thread Alex Harui
App height is bound by the stage size.  It sounds like you actually want
to change the player's object size in the browser which requires
javascript and ExternalInterface



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of guillaumeracine
Sent: Wednesday, August 06, 2008 9:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Application's height property problem



Hi, i want to set the height of my application dynamically.
My app has a tree menu to the left and product thumbnails on the right.
I want to increase the height of the application depending on the
number of rows displayed in my product thumbnails. (The goal is to be
able to scroll with the browser instand of scrolling inside a VBox)

I have a appHeight property in my ModelLocator class.
This property is changed when the product's dataprovider change.

Here is the structure of my application

mx:Application ... height={modelLocator.appHeight }

mx:HBox

mx:Tree height={this.height}.../mx:Tree
mx:VBox height={this.height}.../mx:VBox

/mx:HBox

/mx:Application

This is the way i think it should work but it seems that i can't
acheive what i want with this...the height does not change at all and
i think there is a limit to the height of the application because if
my heigh is 2000 or 4000 i don't see any difference...

Please help!



 


RE: [flexcoders] help with flex 3 sdk (how could I....)

2008-08-06 Thread Stephen Gilson
Hi,
 
Have you tried the Flex Getting Started site here:
http://learn.adobe.com/wiki/display/Flex/Getting+Started
 
Or the quick starts under the Getting Started tab on the Flex Dev
Center: http://www.adobe.com/devnet/flex/
 
Stephen



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2008 3:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] help with flex 3 sdk (how could I)



Ok, once I've downloaded the flex3sdk, then ?
I was wondering if anyone of you guys know a tutorial about how to 
start creating
application with the flex sdk, and installing so forth, any given help 
would be
appreciated. I've tryied the adobe help, but it seems so obscure for 
me, any other ideas?
I'm very open.
I know that you have maybe heard of this a million time, well this is 
the million
one...help me out? would you?

Regards,

Gustavo Duenas



 


RE: [flexcoders] Re: Add a context menu to a menubar item

2008-08-06 Thread Alex Harui
Keep track of rollover events?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Wednesday, August 06, 2008 8:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Add a context menu to a menubar item



Ok, I have created a custom itemRenderer which displays my context
menu perfectly.

Now, how do I get at the menu item data that the context menu came from.

IOW, I left click on my menu bar which drops down a menu; I then right
click on a menu item (Let's say it is Show some Cool Stuff) which
brings up my custom context menu. I then left click on my custom
context menu item. This generates a ContextMenuEvent.MENU_ITEM_SELECT
event which I have an eventListener for. The trouble is, there is
nothing in that event that lets me know what the original item was
that was right clicked on.

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

 Custom itemRenderer
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of valdhor
 Sent: Tuesday, August 05, 2008 9:05 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Add a context menu to a menubar item
 
 
 
 Either this is really easy and I've missed it or it's really quite
 difficult.
 
 I have a MenuBar that is created from an ArrayCollection that is
 returned from a RemoteObject call:
 
 mx:MenuBar id=menuBar itemClick=menuHandler(event)
 dataProvider={menuBarCollection} /
 
 How would I get at each item so I can add a context menu to each menu
 item?




 


RE: [flexcoders] Re: Can we subclass Application yet?

2008-08-06 Thread Alex Harui
We're discussing whether you can have an app template.  Suppose you
wanted every app you build to have a menubar at the top and controlbar
at the bottom.  If you just do
 
AmyAppTemplate.mxml
mx:Application
mx:MenuBar/
mx:ControlBar /
/mx:Application
 
You can't just use that in your next app like this:
 
amy:AmyAppTemplate xmlns:amy=* ... /
mx:Button/
mx:TextInput /
...
 
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Wednesday, August 06, 2008 6:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Can we subclass Application yet?



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

 Interesting. So either the documentation is very old, or 
[DefaultProperty]
 simply isn't inherited? Either way the docs could use updating. I'll 
put
 testing this onto my todo list :)

As you know, I'm not nearly the whiz kid you guys are, but is this 
discussion talking about working around a problem with 
childDescriptors? I don't really have anything to add to the 
conversation, just trying to understand what is being said :-).

Thanks;

Amy



 


RE: [flexcoders] Re: need help urgent - multiple images printing

2008-08-06 Thread Alex Harui
Printing is synchronous, and image loading isn't.  Normally you have to
pre-load all images before starting a print job.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cyber_runners
Sent: Tuesday, August 05, 2008 7:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: need help urgent - multiple images printing



Yeah, I don't know what to do ...

I think the image you added in your template is late to show than print
job execution.
May be flex need delay or doEvent command ...
hehehe ... it's i think bro



 


RE: [flexcoders] List IconFunction with Button renderers

2008-08-06 Thread Alex Harui
Button doesn't pick up icons for free when it is a renderer.  Good
subclassing challenge though!



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Wednesday, August 06, 2008 1:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] List IconFunction with Button renderers



Hi all;

I'm trying to use an iconFunction with a TileList that has just a plain 
Jane unextended Button as its itemRenderers. I'm trying to use the 
iconFunction to set the icon on the buttons, but it doesn't seem to me 
that the button is recieving the information from the ListBase. I have 
verified that my iconFunction is returning a Class and that the 
ListBase is seeing that return. Is the button component designed to be 
able to recieve and act on this information, or am I barking up the 
wrong tree here?

Thanks;

Amy



 


[flexcoders] help with flex 3 sdk (how could I....)

2008-08-06 Thread gduenas
anyone knows a good tutorial ( not the adobe one) to start developing  
with the flex sdk, what do I need and also how could I install that?

Regards,

Gustavo

P.s: my system is a mac g4 osx jaguar.



[flexcoders] Re: adding to default ContextMenu in flex app

2008-08-06 Thread Aaron Miller
Never mind, I figured it out. I am supposed to create a ContextMenu with the
options I want and assign it to the Application.contectMenu property.

Thanks anyways!
~Aaron

On Wed, Aug 6, 2008 at 12:01 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Hello,

 I am trying to figure out how to add an item to the default context menu
 when someone right clicks inside the stage. I know I have to add a
 ContextMenuItem to the ContextMenu.customItems properties, but I'm not sure
 how to reference the default menu. Listening for a MouseEvent.RIGHT_CLICK in
 the application scope only seems to be available for AIR. How would I go
 about adding an item to the default menu?


 Thanks!
 ~Aaron



[flexcoders] Re: DataServiceException

2008-08-06 Thread Geoffrey
I pass false to my begin() method and that stops the
DataServiceException from happening, but now nothing seems to happen
after I commit().  Here's a current code snippet:

  DataServiceTransaction dst = DataServiceTransaction.begin(false);
  dst.refreshFill(myTasks, null);
  dst.commit();

The destination parameter for refreshFill(), is that the same string
as the parameter I pass to the DataService constructor in ActionScript
and the name of the destination I set up in data-management-config.xml?
(i.e.
  __ds = new DataService(myTasks);
  destination id=myTasks
)

I would expect to get a hit on the fill() method in my Assembler after
the commit() is called, but I ain't gettin' nut'in.

Ideas?

Thanks,
 Geoff

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

 Yeah, I wish this stuff was easier to install and configure.   Too
bad this JTA stuff hasn't been picked up by servlet containers as part
of the core.
 
 To help debug this problem, here's the source for a .jsp file which
does the same thing we do.  Usually once this works,
DataServiceTransaction.begin(true) will work too:
 
 %@ page import=javax.transaction.UserTransaction %
 %@ page import=javax.naming.InitialContext %
 %@ page import=javax.naming.Context %
 body
 
 startbr
 %
 try
 {
 Context ctx = new InitialContext();
 
 String userTransactionJndi = java:comp/UserTransaction;
 String userSpecified = System.getProperty(UserTxJndiName);
 if (userSpecified != null)
 {
 userTransactionJndi = userSpecified;
 }
 UserTransaction userTransaction = (UserTransaction)
ctx.lookup(userTransactionJndi);
 if (userTransaction != null)
 {
 userTransaction.begin();
 out.println(begin ok!br);
 userTransaction.commit();
 out.println(commit ok!br);
 }
 else
 {
 out.println(returned null);
 }
 }
 catch (Exception ne)
 {
 out.println(ne.toString());
 }
 %
 
 done
 
 /body
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Geoffrey
 Sent: Monday, August 04, 2008 2:51 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: DataServiceException
 
 
 I just went through installing/configuring JTA using JOTM(which was
 not as straight forward as the docs say) with Tomcat.
 
 The bummer is that I can't debug into the DataServiceTransaction
 class... no source.
 
 I guess I could try passing false to the begin method, but I should
 be able to use JOTM.
 
 BTW, thanks for your help on that other LCDS issue.
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff
Vroom jvroom@ wrote:
 
  When you create a DataServiceTransaction, especially with true so
 it needs to start a JTA transaction, it is look in the JNDI namespace
 for the standard UserTransaction object i.e. new
 InitialContext().lookup(java:comp/UserTransaction). That call is
 not working... if you are not in a JEE container or Tomcat with JOTM
 installed that would explain it. You can try passing false to
 begin and that would avoid use of the JTA transaction manager.
 
  Jeff
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of Geoffrey
  Sent: Monday, August 04, 2008 1:31 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] DataServiceException
 
 
  I'm trying to create a DataServiceTransaction to push an update out to
  my DataService clients. I'm getting the below error when it tries to
  create the DataServiceTransaction.
 
  flex.data.DataServiceException: Unable to access UserTransaction in
  DataService.
  at
 

flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:855)
  at
 
flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:807)
  at
 
flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:270)
  at
 
flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:283)
  ...
 
  My code is:
  DataServiceTransaction dst = DataServiceTransaction.begin(true);
  dst.refreshFill(myTasks, null);
  dst.commit();
 
  Any ideas?
  Geoff
 





[flexcoders] Re: List IconFunction with Button renderers

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

 Button doesn't pick up icons for free when it is a renderer.  Good
 subclassing challenge though!

Hah! This project has been a baptism by fire in Flex.  I'll barely 
break a sweat :-p.

Thanks :-)



Re: [flexcoders] Cannot install latest Flex Builder 3.0 SDK Build 3.0.3.2490 from 7/15/08

2008-08-06 Thread Joseph Freemaker
Hi Tom,

Thanks.

Where do licensed users get the latest fixes or build for Flex3 + charting?

Joe



- Original Message 
From: Tom Chiverton [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 6, 2008 6:38:26 AM
Subject: Re: [flexcoders] Cannot install latest Flex Builder 3.0 SDK Build 
3.0.3.2490 from 7/15/08

On Tuesday 05 Aug 2008, joseph_freemaker wrote:
 Any assistance would be appreciated.

The charting classes are not open source, so probably aren't in your download.

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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




  

[flexcoders] Re: Custom Events

2008-08-06 Thread rss181919
I modified the call as follows:
pdb:CategoriesPnl id=CategoriesPnl initialize=CtgsPnlInit
(event);/pdb:CategoriesPnl

private function CtgsPnlInit(event:Event): void
  {
  this.addEventListener('dgItemClick', CtgsPnlDGItemClick)
  Alert.show(this.hasEventListener(dgItemClick).toString());
  }

Results:
1. On entering the custom panel at runtime, the alert return 'true' 
indicating that the listener was added to 'this'.
2. On selectItem call, the alert message ' dispatch result: true' and 
then the message 'internal' is displayed.  However, the alert 
message 'external' never displays (which should follow the 'internal' 
message).





RE: [flexcoders] CRC

2008-08-06 Thread Tim Rowe
Hardly secure considering they can just determine what the value should
be and pass you that.  If they're going to the trouble to do manual
calls like that, I wouldn't put them also being far off grabbing that
correct CRC.
 
Hasn't anyone learnt from how much the q3cdkey and ea-f1c checks failed
with this same kind of checking? :)
 
Tim Rowe
Software Engineer
carsales.com Ltd



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott
Sent: Thursday, 7 August 2008 3:50 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] CRC



That's what I was doing, however I can't ensure that someone is
attaching to my remote component with their own function then.  I was
hoping to catch a value off of a crc check and use that as verification
to the remote object that it's really my code that's touching the CF
side.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ryan Gravener
Sent: Wednesday, August 06, 2008 10:38 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: [flexcoders] CRC

I just keep a string of the version they are using, then compare that
with the server's version.  If they don't match, make them run the
updater (air).

On Wed, Aug 6, 2008 at 10:45 AM, Scott [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Does anyone know of a way to collect a CRC from a flex or air
application file?  I would like to verify that they are running the most
current version and the code I wrote as they hit my remote components.

Thanks

  Scott




-- 
Ryan Gravener
http://twitter.com/ryangravener http://twitter.com/ryangravener 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner http://www.mailscanner.info/ , and is

believed to be clean. 

 


RE: [flexcoders] Flex with proxy server

2008-08-06 Thread Tim Rowe
Oh, this will be fun :/
 
Tried establishing your connection to the proxy server yet, not the
destination endpoint?
 
Tim Rowe
Software Engineer
carsales.com Ltd



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of walberleal
Sent: Wednesday, 6 August 2008 10:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex with proxy server



how can I establish a socket connection on a network using proxy server 
with flex 3???



 


Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
Complete example with 2 thumbs (from the earlier example):

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute

mx:Script
![CDATA[
import mx.collections.ArrayCollection;

[Bindable]
private var allProducts : Array = [
{
name: Datsun 120y,
value : 1000
},
{
name: Nissan 350Z,
value : 55000
},
{
name: Porsche GT3,
value : 325000
},
{
name: HSV Clubsport,
value : 7
},
{
name: Mercedes SLR,
value : 120
},
{
name: Lada Niva,
value : 75
},
{
name: Ford Falcon XY GTHO,
value : 375000
},
{
name: Batmobile,
value : 654321
},
{
name: Ford Falcon XA GTHO,
value : 220
}];

[Bindable]
private var filteredList : ArrayCollection = new
ArrayCollection(allProducts);

private function updateFilter() : void
{
filteredList.filterFunction = myFilterFunction;
filteredList.refresh();
}

private function myFilterFunction(item : Object) : Boolean
{
return item.value =
Math.min(priceSlider.values[0],priceSlider.values[1])   item.value =
Math.max(priceSlider.values[0],priceSlider.values[1]);
}

]]
/mx:Script

mx:DataGrid horizontalCenter=0 verticalCenter=0 width=410
height=354 dataProvider={filteredList}
mx:columns
mx:DataGridColumn headerText=Car Name dataField=name/
mx:DataGridColumn headerText=Value dataField=value/
/mx:columns
/mx:DataGrid
!--mx:HSlider verticalCenter=-191 horizontalCenter=0 minimum=0
maximum=200 id=min liveDragging=true change=updateFilter()/
mx:HSlider verticalCenter=191 horizontalCenter=0 minimum=0
maximum=200 id=max liveDragging=true change=updateFilter()
value=200/
mx:Label text=Min textAlign=right width=117
horizontalCenter=-147 verticalCenter=-191/
mx:Label text=Max textAlign=right width=117
horizontalCenter=-147 verticalCenter=191/--

mx:HSlider horizontalCenter=0 verticalCenter=-200 id=priceSlider
minimum=0
maximum=300 tickInterval=10 snapInterval=10
thumbCount=2 values=[0,300] tickColor=#ff
labels=[$0k,$300M] liveDragging=true width=182
change=updateFilter()/

/mx:Application


On Thu, Aug 7, 2008 at 2:39 AM, Tim Hoff [EMAIL PROTECTED] wrote:


 And go back to your original filterFunction:

 if ( (city_cb.selectedLabel == All || item.city ==
 city_cb.selectedLabel)  (lct_cb.selectedLabel == All ||
 item.location == lct_cb.selectedLabel)  (item.value 
 priceSlider.values[0]  item.value  priceSlider.values[1])
 ){
 result=true;
 }
 return result;
 }

 priceSlider.values[300] doesn't exist.  Then as Alex suggests, walk
 through the code with the debugger, or trace.

 -TH

 --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote:
 
 
  Yeah shoot, my bad. Take the values property out of the tag. Should
  have said set the min to 0 and the max to 3,000,000 (like you have it.
  The values will lock the thumbs to those two positions (values)
 only.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
  
   Shows how often I use the sliders. I didn't know you could use
  multiple
   thumbs... This is not performant, you should be getting the max and
  min
   within updateFilter() and sticking them in private vars, not in the
  filter
   function itself... but you get the idea.
  
   private function myFilterFunction(item : Object) : Boolean
   {
   return item.value =
   Math.min(priceSlider.values[0],priceSlider.values[1])  item.value
 =
   Math.max(priceSlider.values[0],priceSlider.values[1]);
   }
  
  
   On Wed, Aug 6, 2008 at 5:29 PM, stinasius stinasius@ wrote:
  
i managed to build a dual thumb slider that i pass on the filter
function. here is the code.
   
mx:HSlider x=0 y=240 id=priceSlider minimum=0
maximum=300 tickInterval=10 snapInterval=10
thumbCount=2 values=[0,300] tickColor=#ff
labels=[$0k,$300M] liveDragging=true width=182
change=filterGrid()/
   
   

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

Re: [flexcoders] Re: Can we subclass Application yet?

2008-08-06 Thread Josh McDonald
I still stand by my original rant saying just use a component :)

mx:Application
  funk:FunkAppTemplate

!-- App controls --

  /funk:FunkAppTemplate
/mx:Application

I'm a big fan of using composition over inheritance when possible. Don't
treat mx:Application as your application, think of it as your bootloader,
the host for your application. IMHO Your template should inherit from
Container, not Application :)

-Josh

On Thu, Aug 7, 2008 at 6:51 AM, Alex Harui [EMAIL PROTECTED] wrote:

  We're discussing whether you can have an app template.  Suppose you
 wanted every app you build to have a menubar at the top and controlbar at
 the bottom.  If you just do

 AmyAppTemplate.mxml
 mx:Application
 mx:MenuBar/
 mx:ControlBar /
 /mx:Application

 You can't just use that in your next app like this:

 amy:AmyAppTemplate xmlns:amy=* ... /
 mx:Button/
 mx:TextInput /
 ...



  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Amy
 *Sent:* Wednesday, August 06, 2008 6:22 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: Can we subclass Application yet?

  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Interesting. So either the documentation is very old, or
 [DefaultProperty]
  simply isn't inherited? Either way the docs could use updating. I'll
 put
  testing this onto my todo list :)

 As you know, I'm not nearly the whiz kid you guys are, but is this
 discussion talking about working around a problem with
 childDescriptors? I don't really have anything to add to the
 conversation, just trying to understand what is being said :-).

 Thanks;

 Amy

 




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

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


[flexcoders] Multiple Builder instances / windows?

2008-08-06 Thread Josh McDonald
Hey guys,

Is there an easy way I can have multiple copies of Builder running at the
same time (with different workspaces)? This would really make my life
easier!

-Josh

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

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


Re: [flexcoders] Where are the AIR resources?

2008-08-06 Thread Steve Mathews
Ok, so after all this discussion (thank you by the way) I came to the
realization that what I needed to do is be running my Flex swf as trusted.
So I moved it and all my in-house created support swf to the app directory
so they are installed with the app. So far so good, as I already had support
for loading my resources from a different path by setting a var in the embed
code.

Now I have a new issue in that when you hit Esc in my Flex swf I call both a
ExternalInterface call and an fscommand to let the container know about it.
I had it working where my hosting html page was getting these calls, but now
it doesn't seem to be. I would have expected it the other way around where
as non-trusted the calls would get lost and as trusted they would work. Any
ideas?

On Tue, Aug 5, 2008 at 3:13 PM, Alex Harui [EMAIL PROTECTED] wrote:

  I'm sure there is a way to do that right now.  It might be a planned
 feature for a future AIR release.  You can try it though.

 This post:
 http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.html#more
  implies
 that you can't and should use loadBytes instead.

 -Alex

  --
  *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Steve Mathews
 *Sent:* Tuesday, August 05, 2008 2:58 PM
 *To:* flexcoders@yahoogroups.com

 *Subject:* Re: [flexcoders] Where are the AIR resources?

 Alex,

 Yes, it isn't an error, just the security dialog because my swf has
 -use-network=true but it is running locally. In theory I can compile a
 'local' version, but there are some webservices that I would like to consume
 even on the desktop. Also, I don't think telling the user to trust the
 app-storage folder is a good solution. You mention getting it into the same
 directory as the main swf. Can you expand on that comment?

 Thanks

 On Tue, Aug 5, 2008 at 11:09 AM, Alex Harui [EMAIL PROTECTED] wrote:

  You didn't say what error you are getting, but I'll bet it is that a
 localWithNetworking swf can't access local assets.

 Good thing we have that security check otherwise if you downloaded a
 spyware SWF, someone would be stealing your identity.
 So, no matter what, if you suck down SWF bits and launch them locally,
 please find a way to validate them against a man-in-the-middle attack.  We
 have a SHA library you can use.

 Once you truly trust the SWF bits, the next question is why your SWF needs
 network access.  If it doesn't, turn it off and you won't get warnings.  If
 it does need network access, I think your choices are to find a way load it
 into a trusted directory (users can opt to trust certain directories, or you
 somehow get it into the same directory as the main SWF), or proxy the
 network I/O or file system I/O through the main app.

 I don't think HTMLLoader or an intermediary HTML file is going to help.

 -Alex

  --
  *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Steve Mathews
 *Sent:* Tuesday, August 05, 2008 10:48 AM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Where are the AIR resources?

 Let me give some specific examples so hopefully we can get this to
 work.

 What I am creating is a player for a custom file type. The file is
 basically a zip (with different extension) that when opened is extracted to
 the app-storage location. This is just resources. Next I have a Flex based
 swf that can actually run with these resources. What I was thinking is that
 I could just copy this swf (and some others that it loads) into the
 app-storage directory and load it.

 So what I have started with is a Flex based AIR application that registers
 as the default for the file extension, loads the file and extracts it to the
 app-storage. After I copy (mannulay for now) the external Flex swf and an
 html page to the app-storage, I load the html into AIR using the HTMLLoader.
 Eventually I would like to be able to update the external swf and some of
 the other supporting swfs, so please keep that in mind when making
 recommendations.

 Thanks for the help,
 Steve



 On Mon, Aug 4, 2008 at 5:11 PM, Alex Harui [EMAIL PROTECTED] wrote:

  Just so I'm clear.  You have a AIR SWF based on Flex that is using
 HTMLLoader to load another Flex SWF off the web?  Are the two SWFs supposed
 to be able to communicate?  What error are you getting?

 FWIW, the Marshall Plan will allow an AIR/Flex SWF to load another Flex
 SWF off the web directly, but the loaded SWF will be untrusted and can't
 access AIR things like NativeWindow and the file system.

  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Jim Hayes
 *Sent:* Monday, August 04, 2008 4:58 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Where are the AIR resources?

  My understanding is that because I can't load Flex into Flex

 I missed that bit (and was unaware of that in any case, never tried it so
 far), so 

[flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Daniel Gold
I don't think I've seen anything like this before and maybe I'm just going
crazy.

I've got a class that extends TitleWindow, it has a few setters and some of
these can affect what the displayed title should be. These all use
invalidation flags and don't get fully committed until commitProperties. If
I call super.commitProperties() at the beginning of my commitProperties
function, and then change the title somewhere else in that function, the
title NEVER gets commited. I've stepped through the code and I really can't
see why. There are only two places in Panel.as that modify _titleChanged. I
see it getting flipped to true in the setter, then when commitProperties
gets around to executing, the flag is magically false?

Anyways, if I call super.commitProperties after I do all my work and
possibly modify the title, everything is fine, except it looks really whacky
because I've had it ingrained for years that you always call super class
functions at the beginning...

A subclass of TitleWindow as simple as this exhibits the behavior:

?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
width=400 height=300

mx:Script
![CDATA[

override protected function commitProperties():void
{
super.commitProperties();
title = ljsdflksjdflkj;
}

]]
/mx:Script
/mx:TitleWindow


[flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Tim Hoff

Hey Josh,

What's up with:

return item.value =
Math.min(priceSlider.values[0],priceSlider.values[1]) 
item.value =Math.max(priceSlider.values[0],priceSlider.values[1]);

You can avoid this by setting allowThumbOverlap=false.  Then just use:

return item.value = priceSlider.values[0]  item.value
=priceSlider.values[1);

-TH

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

 Complete example with 2 thumbs (from the earlier example):

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute

 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;

 [Bindable]
 private var allProducts : Array = [
 {
 name: Datsun 120y,
 value : 1000
 },
 {
 name: Nissan 350Z,
 value : 55000
 },
 {
 name: Porsche GT3,
 value : 325000
 },
 {
 name: HSV Clubsport,
 value : 7
 },
 {
 name: Mercedes SLR,
 value : 120
 },
 {
 name: Lada Niva,
 value : 75
 },
 {
 name: Ford Falcon XY GTHO,
 value : 375000
 },
 {
 name: Batmobile,
 value : 654321
 },
 {
 name: Ford Falcon XA GTHO,
 value : 220
 }];

 [Bindable]
 private var filteredList : ArrayCollection = new
 ArrayCollection(allProducts);

 private function updateFilter() : void
 {
 filteredList.filterFunction = myFilterFunction;
 filteredList.refresh();
 }

 private function myFilterFunction(item : Object) : Boolean
 {
 return item.value =
 Math.min(priceSlider.values[0],priceSlider.values[1])  item.value =
 Math.max(priceSlider.values[0],priceSlider.values[1]);
 }

 ]]
 /mx:Script

 mx:DataGrid horizontalCenter=0 verticalCenter=0 width=410
 height=354 dataProvider={filteredList}
 mx:columns
 mx:DataGridColumn headerText=Car Name dataField=name/
 mx:DataGridColumn headerText=Value dataField=value/
 /mx:columns
 /mx:DataGrid
 !--mx:HSlider verticalCenter=-191 horizontalCenter=0 minimum=0
 maximum=200 id=min liveDragging=true
change=updateFilter()/
 mx:HSlider verticalCenter=191 horizontalCenter=0 minimum=0
 maximum=200 id=max liveDragging=true change=updateFilter()
 value=200/
 mx:Label text=Min textAlign=right width=117
 horizontalCenter=-147 verticalCenter=-191/
 mx:Label text=Max textAlign=right width=117
 horizontalCenter=-147 verticalCenter=191/--

 mx:HSlider horizontalCenter=0 verticalCenter=-200
id=priceSlider
 minimum=0
 maximum=300 tickInterval=10 snapInterval=10
 thumbCount=2 values=[0,300] tickColor=#ff
 labels=[$0k,$300M] liveDragging=true width=182
 change=updateFilter()/

 /mx:Application


 On Thu, Aug 7, 2008 at 2:39 AM, Tim Hoff [EMAIL PROTECTED] wrote:

 
  And go back to your original filterFunction:
 
  if ( (city_cb.selectedLabel == All || item.city ==
  city_cb.selectedLabel)  (lct_cb.selectedLabel == All ||
  item.location == lct_cb.selectedLabel)  (item.value 
  priceSlider.values[0]  item.value  priceSlider.values[1])
  ){
  result=true;
  }
  return result;
  }
 
  priceSlider.values[300] doesn't exist. Then as Alex suggests,
walk
  through the code with the debugger, or trace.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Yeah shoot, my bad. Take the values property out of the tag.
Should
   have said set the min to 0 and the max to 3,000,000 (like you have
it.
   The values will lock the thumbs to those two positions (values)
  only.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
   
Shows how often I use the sliders. I didn't know you could use
   multiple
thumbs... This is not performant, you should be getting the max
and
   min
within updateFilter() and sticking them in private vars, not in
the
   filter
function itself... but you get the idea.
   
private function myFilterFunction(item : Object) : Boolean
{
return item.value =
Math.min(priceSlider.values[0],priceSlider.values[1]) 
item.value
  =
Math.max(priceSlider.values[0],priceSlider.values[1]);
}
   
   
On Wed, Aug 6, 2008 at 5:29 PM, stinasius stinasius@ wrote:
   
 i managed to build a dual thumb slider that i pass on the
filter
 function. here is the code.

 mx:HSlider x=0 y=240 id=priceSlider minimum=0
 maximum=300 tickInterval=10 snapInterval=10
 thumbCount=2 values=[0,300] tickColor=#ff
 labels=[$0k,$300M] liveDragging=true width=182
 change=filterGrid()/


 

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




   
   
--
Therefore, send not to know For whom the bell tolls. It tolls
for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
 
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  

Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
Coz it's a quick and nasty (but working) example, and I have zero knowledge
about the finer details of the slider controls :)

On Thu, Aug 7, 2008 at 9:28 AM, Tim Hoff [EMAIL PROTECTED] wrote:

  Hey Josh,

 What's up with:

 return item.value =
 Math.min(priceSlider.values[0],priceSlider.values[1]) 
 item.value =Math.max(priceSlider.values[0],priceSlider.values[1]);

 You can avoid this by setting allowThumbOverlap=false.  Then just use:

 return item.value = priceSlider.values[0]  item.value
 =priceSlider.values[1);

 -TH

 --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:
 
  Complete example with 2 thumbs (from the earlier example):
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 
  mx:Script
  ![CDATA[
  import mx.collections.ArrayCollection;
 
  [Bindable]
  private var allProducts : Array = [
  {
  name: Datsun 120y,
  value : 1000
  },
  {
  name: Nissan 350Z,
  value : 55000
  },
  {
  name: Porsche GT3,
  value : 325000
  },
  {
  name: HSV Clubsport,
  value : 7
  },
  {
  name: Mercedes SLR,
  value : 120
  },
  {
  name: Lada Niva,
  value : 75
  },
  {
  name: Ford Falcon XY GTHO,
  value : 375000
  },
  {
  name: Batmobile,
  value : 654321
  },
  {
  name: Ford Falcon XA GTHO,
  value : 220
  }];
 
  [Bindable]
  private var filteredList : ArrayCollection = new
  ArrayCollection(allProducts);
 
  private function updateFilter() : void
  {
  filteredList.filterFunction = myFilterFunction;
  filteredList.refresh();
  }
 
  private function myFilterFunction(item : Object) : Boolean
  {
  return item.value =
  Math.min(priceSlider.values[0],priceSlider.values[1])  item.value =
  Math.max(priceSlider.values[0],priceSlider.values[1]);
  }
 
  ]]
  /mx:Script
 
  mx:DataGrid horizontalCenter=0 verticalCenter=0 width=410
  height=354 dataProvider={filteredList}
  mx:columns
  mx:DataGridColumn headerText=Car Name dataField=name/
  mx:DataGridColumn headerText=Value dataField=value/
  /mx:columns
  /mx:DataGrid
  !--mx:HSlider verticalCenter=-191 horizontalCenter=0 minimum=0
  maximum=200 id=min liveDragging=true change=updateFilter()/
  mx:HSlider verticalCenter=191 horizontalCenter=0 minimum=0
  maximum=200 id=max liveDragging=true change=updateFilter()
  value=200/
  mx:Label text=Min textAlign=right width=117
  horizontalCenter=-147 verticalCenter=-191/
  mx:Label text=Max textAlign=right width=117
  horizontalCenter=-147 verticalCenter=191/--
 
  mx:HSlider horizontalCenter=0 verticalCenter=-200 id=priceSlider
  minimum=0
  maximum=300 tickInterval=10 snapInterval=10
  thumbCount=2 values=[0,300] tickColor=#ff
  labels=[$0k,$300M] liveDragging=true width=182
  change=updateFilter()/
 
  /mx:Application
 
 
  On Thu, Aug 7, 2008 at 2:39 AM, Tim Hoff [EMAIL PROTECTED] wrote:
 
  
   And go back to your original filterFunction:
  
   if ( (city_cb.selectedLabel == All || item.city ==
   city_cb.selectedLabel)  (lct_cb.selectedLabel == All ||
   item.location == lct_cb.selectedLabel)  (item.value 
   priceSlider.values[0]  item.value  priceSlider.values[1])
   ){
   result=true;
   }
   return result;
   }
  
   priceSlider.values[300] doesn't exist. Then as Alex suggests, walk
   through the code with the debugger, or trace.
  
   -TH
  
   --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
   
   
Yeah shoot, my bad. Take the values property out of the tag. Should
have said set the min to 0 and the max to 3,000,000 (like you have
 it.
The values will lock the thumbs to those two positions (values)
   only.
   
-TH
   
--- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:

 Shows how often I use the sliders. I didn't know you could use
multiple
 thumbs... This is not performant, you should be getting the max and
min
 within updateFilter() and sticking them in private vars, not in the
filter
 function itself... but you get the idea.

 private function myFilterFunction(item : Object) : Boolean
 {
 return item.value =
 Math.min(priceSlider.values[0],priceSlider.values[1])  item.value
   =
 Math.max(priceSlider.values[0],priceSlider.values[1]);
 }


 On Wed, Aug 6, 2008 at 5:29 PM, stinasius stinasius@ wrote:

  i managed to build a dual thumb slider that i pass on the filter
  function. here is the code.
 
  mx:HSlider x=0 y=240 id=priceSlider minimum=0
  maximum=300 tickInterval=10 snapInterval=10
  thumbCount=2 values=[0,300] tickColor=#ff
  labels=[$0k,$300M] liveDragging=true width=182
  change=filterGrid()/
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups
  Links

Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
FWIW, If I were building this for users, I'd still allow sliders to overlap
for ease-of-use purposes, but I'd fetch max and min on change rather than
every loop of the filter function ;-)

-Josh

On Thu, Aug 7, 2008 at 9:31 AM, Josh McDonald [EMAIL PROTECTED] wrote:

 Coz it's a quick and nasty (but working) example, and I have zero knowledge
 about the finer details of the slider controls :)


 On Thu, Aug 7, 2008 at 9:28 AM, Tim Hoff [EMAIL PROTECTED] wrote:

  Hey Josh,

 What's up with:

 return item.value =
 Math.min(priceSlider.values[0],priceSlider.values[1]) 
 item.value =Math.max(priceSlider.values[0],priceSlider.values[1]);

 You can avoid this by setting allowThumbOverlap=false.  Then just use:

 return item.value = priceSlider.values[0]  item.value
 =priceSlider.values[1);

 -TH





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

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


[flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Tim Hoff
No worries.  Actually, allowThumbOverlap=false is the default.  For 
me, allowing thumb overlap would purly depend on the use case.  My 
opinin is that it makes more sense to the user to not allow the right 
thumb to go past the left thumb and vice versa.  but, IMHO.  Good 
example.

-TH

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

 FWIW, If I were building this for users, I'd still allow sliders to 
overlap
 for ease-of-use purposes, but I'd fetch max and min on change 
rather than
 every loop of the filter function ;-)
 
 -Josh
 
 On Thu, Aug 7, 2008 at 9:31 AM, Josh McDonald [EMAIL PROTECTED] wrote:
 
  Coz it's a quick and nasty (but working) example, and I have zero 
knowledge
  about the finer details of the slider controls :)
 
 
  On Thu, Aug 7, 2008 at 9:28 AM, Tim Hoff [EMAIL PROTECTED] wrote:
 
   Hey Josh,
 
  What's up with:
 
  return item.value =
  Math.min(priceSlider.values[0],priceSlider.values[1]) 
  item.value =Math.max(priceSlider.values[0],priceSlider.values
[1]);
 
  You can avoid this by setting allowThumbOverlap=false.  Then 
just use:
 
  return item.value = priceSlider.values[0]  item.value
  =priceSlider.values[1);
 
  -TH
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Josh McDonald
The title property is simply a property that gets passed to the title
UIComponent in commitproperties. Timeline:

1. You call super.commitProperties()

2. super.commitProperties() sees that this._title hasn't changed since the
last commitProperties(). so doesn't set _myTitleComponent.title (or
_titleLabel.text, whatever, but you get the idea)

3. You change this.title to Boo!

4. super.set title() sets this._title = Boo!

5. super.set title() calls invalidateProperties()

6. Flex realises you're already inside this.commitProperties for the
instance in question, and ignores the invalidateProperties(). - If it
didn't, you'd get an endless loop.

Result: The title on screen doesn't get updated in this validate
properties phase.

Next time your commitProperties gets run, when you call this.title = Boo!
it checks, realises that this._title *already* equals Boo!, so it never
marks the _title property as changed, so super.commitProperties() never
bothers to update _myTitleComponent.title

Result: It *never* makes it to the screen.

-Josh

On Thu, Aug 7, 2008 at 9:25 AM, Daniel Gold [EMAIL PROTECTED] wrote:

  I don't think I've seen anything like this before and maybe I'm just
 going crazy.

 I've got a class that extends TitleWindow, it has a few setters and some of
 these can affect what the displayed title should be. These all use
 invalidation flags and don't get fully committed until commitProperties. If
 I call super.commitProperties() at the beginning of my commitProperties
 function, and then change the title somewhere else in that function, the
 title NEVER gets commited. I've stepped through the code and I really can't
 see why. There are only two places in Panel.as that modify _titleChanged. I
 see it getting flipped to true in the setter, then when commitProperties
 gets around to executing, the flag is magically false?

 Anyways, if I call super.commitProperties after I do all my work and
 possibly modify the title, everything is fine, except it looks really whacky
 because I've had it ingrained for years that you always call super class
 functions at the beginning...

 A subclass of TitleWindow as simple as this exhibits the behavior:

 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute width=400 height=300

 mx:Script
 ![CDATA[

 override protected function commitProperties():void
 {
 super.commitProperties();
 title = ljsdflksjdflkj;
 }

 ]]
 /mx:Script
 /mx:TitleWindow
 




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

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


Re: [flexcoders] Re: filtering a flex datagrid using a slider with two thumbs

2008-08-06 Thread Josh McDonald
It's probably just a personal preference. You're thinking max and min
thumbs, I'm thinking between foo and bar :)

I was just thinking about the use case where the user has min = 1000, max =
2000 and wants to set min=0, max=800 - without thumb overlapping, you've
gotta move the min thumb first, which may momentarily annoy the user if he
grabs the max thumb first and tries to set it to 800... A trivial thing,
however!

On Thu, Aug 7, 2008 at 9:35 AM, Tim Hoff [EMAIL PROTECTED] wrote:

 No worries.  Actually, allowThumbOverlap=false is the default.  For
 me, allowing thumb overlap would purly depend on the use case.  My
 opinin is that it makes more sense to the user to not allow the right
 thumb to go past the left thumb and vice versa.  but, IMHO.  Good
 example.

 -TH






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

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


Re: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Daniel Gold
it should have still updated on the next invalidation pass because in
Panel.as my call to set title sets _titleChanged = true, which should cause
that logic block to execute in the next commitProperties. Maybe I was off in
debugging and never hit another invalidation pass.

This does bring up a point about the invalidation mechanism however. Because
I really shouldn't know which properties are handled with invalidation flags
in a class I'm extending, I should always put the call to
super.commitProperties at the end of my commitProperties functions just in
case something in that function changes a property that calls
invalidateProperties. I definitely don't want to rely on another frame
calling invalidateProperties as it may never happen and I can't control when
it happens. What if a function call in commitProperties ends up dispatching
an event and some handler code executes that modifes title or some other
code handled by an invalidation flag. Only way to guarantee all those
changes are picked up is to call super after my code executes, which still
looks bizarre to me.

On Wed, Aug 6, 2008 at 6:44 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   The title property is simply a property that gets passed to the title
 UIComponent in commitproperties. Timeline:

 1. You call super.commitProperties()

 2. super.commitProperties() sees that this._title hasn't changed since the
 last commitProperties(). so doesn't set _myTitleComponent.title (or
 _titleLabel.text, whatever, but you get the idea)

 3. You change this.title to Boo!

 4. super.set title() sets this._title = Boo!

 5. super.set title() calls invalidateProperties()

 6. Flex realises you're already inside this.commitProperties for the
 instance in question, and ignores the invalidateProperties(). - If it
 didn't, you'd get an endless loop.

 Result: The title on screen doesn't get updated in this validate
 properties phase.

 Next time your commitProperties gets run, when you call this.title = Boo!
 it checks, realises that this._title *already* equals Boo!, so it never
 marks the _title property as changed, so super.commitProperties() never
 bothers to update _myTitleComponent.title

 Result: It *never* makes it to the screen.

 -Josh


 On Thu, Aug 7, 2008 at 9:25 AM, Daniel Gold [EMAIL PROTECTED] wrote:

  I don't think I've seen anything like this before and maybe I'm just
 going crazy.

 I've got a class that extends TitleWindow, it has a few setters and some
 of these can affect what the displayed title should be. These all use
 invalidation flags and don't get fully committed until commitProperties. If
 I call super.commitProperties() at the beginning of my commitProperties
 function, and then change the title somewhere else in that function, the
 title NEVER gets commited. I've stepped through the code and I really can't
 see why. There are only two places in Panel.as that modify _titleChanged. I
 see it getting flipped to true in the setter, then when commitProperties
 gets around to executing, the flag is magically false?

 Anyways, if I call super.commitProperties after I do all my work and
 possibly modify the title, everything is fine, except it looks really whacky
 because I've had it ingrained for years that you always call super class
 functions at the beginning...

 A subclass of TitleWindow as simple as this exhibits the behavior:

 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute width=400 height=300

 mx:Script
 ![CDATA[

 override protected function commitProperties():void
 {
 super.commitProperties();
 title = ljsdflksjdflkj;
 }

 ]]
 /mx:Script
 /mx:TitleWindow




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

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



Re: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Josh McDonald
After a quick poke around in Panel.as, it seems that what I described isn't
*exactly* what's going on, you might want to do some single-stepping to see
where it's going wrong. But the root probelm is the same, and the solution
isn't to put super.commitProperties() at the end of your method. You
shouldn't be setting any properties on super from within your
commitProperties(), it's a bad idea. I haven't seen your class, so I don't
know why you're setting title yourself, but let's say your class has a
user property, and you're setting title = user.firstName... In that case
you want to set this.title inside your this.set user() method rather than in
commitProperties().

-Josh

On Thu, Aug 7, 2008 at 10:07 AM, Daniel Gold [EMAIL PROTECTED] wrote:

  it should have still updated on the next invalidation pass because in
 Panel.as my call to set title sets _titleChanged = true, which should cause
 that logic block to execute in the next commitProperties. Maybe I was off in
 debugging and never hit another invalidation pass.

 This does bring up a point about the invalidation mechanism however.
 Because I really shouldn't know which properties are handled with
 invalidation flags in a class I'm extending, I should always put the call to
 super.commitProperties at the end of my commitProperties functions just in
 case something in that function changes a property that calls
 invalidateProperties. I definitely don't want to rely on another frame
 calling invalidateProperties as it may never happen and I can't control when
 it happens. What if a function call in commitProperties ends up dispatching
 an event and some handler code executes that modifes title or some other
 code handled by an invalidation flag. Only way to guarantee all those
 changes are picked up is to call super after my code executes, which still
 looks bizarre to me.

 On Wed, Aug 6, 2008 at 6:44 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   The title property is simply a property that gets passed to the title
 UIComponent in commitproperties. Timeline:

 1. You call super.commitProperties()

 2. super.commitProperties() sees that this._title hasn't changed since the
 last commitProperties(). so doesn't set _myTitleComponent.title (or
 _titleLabel.text, whatever, but you get the idea)

 3. You change this.title to Boo!

 4. super.set title() sets this._title = Boo!

 5. super.set title() calls invalidateProperties()

 6. Flex realises you're already inside this.commitProperties for the
 instance in question, and ignores the invalidateProperties(). - If it
 didn't, you'd get an endless loop.

 Result: The title on screen doesn't get updated in this validate
 properties phase.

 Next time your commitProperties gets run, when you call this.title =
 Boo! it checks, realises that this._title *already* equals Boo!, so it
 never marks the _title property as changed, so super.commitProperties()
 never bothers to update _myTitleComponent.title

 Result: It *never* makes it to the screen.

 -Josh


 On Thu, Aug 7, 2008 at 9:25 AM, Daniel Gold [EMAIL PROTECTED]wrote:

  I don't think I've seen anything like this before and maybe I'm just
 going crazy.

 I've got a class that extends TitleWindow, it has a few setters and some
 of these can affect what the displayed title should be. These all use
 invalidation flags and don't get fully committed until commitProperties. If
 I call super.commitProperties() at the beginning of my commitProperties
 function, and then change the title somewhere else in that function, the
 title NEVER gets commited. I've stepped through the code and I really can't
 see why. There are only two places in Panel.as that modify _titleChanged. I
 see it getting flipped to true in the setter, then when commitProperties
 gets around to executing, the flag is magically false?

 Anyways, if I call super.commitProperties after I do all my work and
 possibly modify the title, everything is fine, except it looks really whacky
 because I've had it ingrained for years that you always call super class
 functions at the beginning...

 A subclass of TitleWindow as simple as this exhibits the behavior:

 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute width=400 height=300

 mx:Script
 ![CDATA[

 override protected function commitProperties():void
 {
 super.commitProperties();
 title = ljsdflksjdflkj;
 }

 ]]
 /mx:Script
 /mx:TitleWindow




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

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


 




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

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


RE: [flexcoders] Where are the AIR resources?

2008-08-06 Thread Alex Harui
Where's the HTML page loaded from?  Domain security rules apply to that
too.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Mathews
Sent: Wednesday, August 06, 2008 4:20 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Where are the AIR resources?



Ok, so after all this discussion (thank you by the way) I came to the
realization that what I needed to do is be running my Flex swf as
trusted. So I moved it and all my in-house created support swf to the
app directory so they are installed with the app. So far so good, as I
already had support for loading my resources from a different path by
setting a var in the embed code.
 
Now I have a new issue in that when you hit Esc in my Flex swf I call
both a ExternalInterface call and an fscommand to let the container know
about it. I had it working where my hosting html page was getting these
calls, but now it doesn't seem to be. I would have expected it the other
way around where as non-trusted the calls would get lost and as trusted
they would work. Any ideas?


On Tue, Aug 5, 2008 at 3:13 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


I'm sure there is a way to do that right now.  It might be a
planned feature for a future AIR release.  You can try it though.
 
This post:
http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.h
tml#more
http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.
html#more  implies that you can't and should use loadBytes instead.
 
-Alex




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Steve Mathews

Sent: Tuesday, August 05, 2008 2:58 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  

Subject: Re: [flexcoders] Where are the AIR resources?




Alex,
 
Yes, it isn't an error, just the security dialog because my swf
has -use-network=true but it is running locally. In theory I can compile
a 'local' version, but there are some webservices that I would like to
consume even on the desktop. Also, I don't think telling the user to
trust the app-storage folder is a good solution. You mention getting it
into the same directory as the main swf. Can you expand on that comment?
 
Thanks


On Tue, Aug 5, 2008 at 11:09 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


You didn't say what error you are getting, but I'll bet
it is that a localWithNetworking swf can't access local assets.
 
Good thing we have that security check otherwise if you
downloaded a spyware SWF, someone would be stealing your identity.
So, no matter what, if you suck down SWF bits and launch
them locally, please find a way to validate them against a
man-in-the-middle attack.  We have a SHA library you can use.
 
Once you truly trust the SWF bits, the next question is
why your SWF needs network access.  If it doesn't, turn it off and you
won't get warnings.  If it does need network access, I think your
choices are to find a way load it into a trusted directory (users can
opt to trust certain directories, or you somehow get it into the same
directory as the main SWF), or proxy the network I/O or file system I/O
through the main app.
 
I don't think HTMLLoader or an intermediary HTML file is
going to help.
 
-Alex




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Steve Mathews

Sent: Tuesday, August 05, 2008 10:48 AM 

To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Where are the AIR resources?




Let me give some specific examples so hopefully we can
get this to work.
 
What I am creating is a player for a custom file type.
The file is basically a zip (with different extension) that when opened
is extracted to the app-storage location. This is just resources. Next I
have a Flex based swf that can actually run with these resources. What I
was thinking is that I could just copy this swf (and some others that it
loads) into the app-storage directory and load it.
 
So what I have started with is a Flex based AIR
application that registers as the default for the file extension, loads
the file and extracts it to the app-storage. After I copy (mannulay for
now) the 

RE: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Alex Harui
Man, you are strict!  There is no reason you can't do work in your
override before calling super.whatever()



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, August 06, 2008 5:25 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Must call super.commitProperties at END of
overrided commitProperties when extending TitleWindow?



After a quick poke around in Panel.as, it seems that what I described
isn't *exactly* what's going on, you might want to do some
single-stepping to see where it's going wrong. But the root probelm is
the same, and the solution isn't to put super.commitProperties() at the
end of your method. You shouldn't be setting any properties on super
from within your commitProperties(), it's a bad idea. I haven't seen
your class, so I don't know why you're setting title yourself, but let's
say your class has a user property, and you're setting title =
user.firstName... In that case you want to set this.title inside your
this.set user() method rather than in commitProperties().

-Josh


On Thu, Aug 7, 2008 at 10:07 AM, Daniel Gold [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


it should have still updated on the next invalidation pass
because in Panel.as my call to set title sets _titleChanged = true,
which should cause that logic block to execute in the next
commitProperties. Maybe I was off in debugging and never hit another
invalidation pass.

This does bring up a point about the invalidation mechanism
however. Because I really shouldn't know which properties are handled
with invalidation flags in a class I'm extending, I should always put
the call to super.commitProperties at the end of my commitProperties
functions just in case something in that function changes a property
that calls invalidateProperties. I definitely don't want to rely on
another frame calling invalidateProperties as it may never happen and I
can't control when it happens. What if a function call in
commitProperties ends up dispatching an event and some handler code
executes that modifes title or some other code handled by an
invalidation flag. Only way to guarantee all those changes are picked up
is to call super after my code executes, which still looks bizarre to
me.


On Wed, Aug 6, 2008 at 6:44 PM, Josh McDonald [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




The title property is simply a property that gets passed
to the title UIComponent in commitproperties. Timeline:

1. You call super.commitProperties()

2. super.commitProperties() sees that this._title hasn't
changed since the last commitProperties(). so doesn't set
_myTitleComponent.title (or _titleLabel.text, whatever, but you get the
idea)

3. You change this.title to Boo!

4. super.set title() sets this._title = Boo!

5. super.set title() calls invalidateProperties()

6. Flex realises you're already inside
this.commitProperties for the instance in question, and ignores the
invalidateProperties(). - If it didn't, you'd get an endless loop.

Result: The title on screen doesn't get updated in this
validate properties phase.

Next time your commitProperties gets run, when you call
this.title = Boo! it checks, realises that this._title *already*
equals Boo!, so it never marks the _title property as changed, so
super.commitProperties() never bothers to update _myTitleComponent.title

Result: It *never* makes it to the screen.

-Josh 


On Thu, Aug 7, 2008 at 9:25 AM, Daniel Gold
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  wrote:


I don't think I've seen anything like this
before and maybe I'm just going crazy.

I've got a class that extends TitleWindow, it
has a few setters and some of these can affect what the displayed title
should be. These all use invalidation flags and don't get fully
committed until commitProperties. If I call super.commitProperties() at
the beginning of my commitProperties function, and then change the title
somewhere else in that function, the title NEVER gets commited. I've
stepped through the code and I really can't see why. There are only two
places in Panel.as that modify _titleChanged. I see it getting flipped
to true in the setter, then when commitProperties gets around to
executing, the flag is magically false?

Anyways, if I call super.commitProperties after
I do all my work and possibly modify the title, everything is fine,
except it looks really whacky because I've had 

RE: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Alex Harui
Invalidation of the same phase while processing that phase is ignored



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Gold
Sent: Wednesday, August 06, 2008 5:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Must call super.commitProperties at END of
overrided commitProperties when extending TitleWindow?



it should have still updated on the next invalidation pass because in
Panel.as my call to set title sets _titleChanged = true, which should
cause that logic block to execute in the next commitProperties. Maybe I
was off in debugging and never hit another invalidation pass.

This does bring up a point about the invalidation mechanism however.
Because I really shouldn't know which properties are handled with
invalidation flags in a class I'm extending, I should always put the
call to super.commitProperties at the end of my commitProperties
functions just in case something in that function changes a property
that calls invalidateProperties. I definitely don't want to rely on
another frame calling invalidateProperties as it may never happen and I
can't control when it happens. What if a function call in
commitProperties ends up dispatching an event and some handler code
executes that modifes title or some other code handled by an
invalidation flag. Only way to guarantee all those changes are picked up
is to call super after my code executes, which still looks bizarre to
me.


On Wed, Aug 6, 2008 at 6:44 PM, Josh McDonald [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:




The title property is simply a property that gets passed to the
title UIComponent in commitproperties. Timeline:

1. You call super.commitProperties()

2. super.commitProperties() sees that this._title hasn't changed
since the last commitProperties(). so doesn't set
_myTitleComponent.title (or _titleLabel.text, whatever, but you get the
idea)

3. You change this.title to Boo!

4. super.set title() sets this._title = Boo!

5. super.set title() calls invalidateProperties()

6. Flex realises you're already inside this.commitProperties for
the instance in question, and ignores the invalidateProperties(). - If
it didn't, you'd get an endless loop.

Result: The title on screen doesn't get updated in this
validate properties phase.

Next time your commitProperties gets run, when you call
this.title = Boo! it checks, realises that this._title *already*
equals Boo!, so it never marks the _title property as changed, so
super.commitProperties() never bothers to update _myTitleComponent.title

Result: It *never* makes it to the screen.

-Josh 


On Thu, Aug 7, 2008 at 9:25 AM, Daniel Gold
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  wrote:


I don't think I've seen anything like this before and
maybe I'm just going crazy.

I've got a class that extends TitleWindow, it has a few
setters and some of these can affect what the displayed title should be.
These all use invalidation flags and don't get fully committed until
commitProperties. If I call super.commitProperties() at the beginning of
my commitProperties function, and then change the title somewhere else
in that function, the title NEVER gets commited. I've stepped through
the code and I really can't see why. There are only two places in
Panel.as that modify _titleChanged. I see it getting flipped to true in
the setter, then when commitProperties gets around to executing, the
flag is magically false?

Anyways, if I call super.commitProperties after I do all
my work and possibly modify the title, everything is fine, except it
looks really whacky because I've had it ingrained for years that you
always call super class functions at the beginning...

A subclass of TitleWindow as simple as this exhibits the
behavior:

?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=absolute width=400
height=300

mx:Script
![CDATA[

override protected function
commitProperties():void
{
super.commitProperties();
title = ljsdflksjdflkj;
}

]]
/mx:Script
/mx:TitleWindow






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

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

  1   2   >