[flexcoders] Emulating a failed validator

2008-05-23 Thread Josh McDonald
Guys,

Say I have a textInput, and I need to emulate the failure of a validator,
how do I go about it? I can't use the existing validator framework, because
the decision on whether or not that field is valid is based on a calculated
result rather than a simple validation of the textInput component itself.

Cheers,
-J

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

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


Re: [flexcoders] Populating Datagrid from Database

2008-05-23 Thread Fidel Viegas
On Fri, May 23, 2008 at 1:20 AM, kenny14390 [EMAIL PROTECTED] wrote:

 I am calling a PHP page, which reads my entire database and formats it
 to output as valid XML. How can I set this as the data provider for a
 Datagrid component? I know what the columns are, but not the number of
 rows nor the data (obviously).


Hi Kenny,

Have a look at the HTTPService component.


Fidel.


Re: [flexcoders] Image

2008-05-23 Thread Manish Jethani
On 5/22/08, Laith Juwaidah [EMAIL PROTECTED] wrote:

 Sorry, I copied the wrong line, it's giving the error on loader.mouseEnabled 
 = false;

You have to set mouseEnabled on the contentHolder object. See the
source of SWFLoader.

Manish


[flexcoders] Data Grid issue

2008-05-23 Thread jitendra jain
Hi Alex,

I read your blog : 
http://blogs.adobe.com/aharui/2008/03/datagrid_doubleclick_to_edit.html

Have u tried dispatching an itemEditEnd event with different 
DataGridEventReasons for submit and cancel ? Please let me know as iam facing 
the same problem. 

Thanks in advance.


  

Thanks,

with Regards,
Jitendra Jain
Software Engineer
91-9979960798
   

RE: [flexcoders] chart data change events

2008-05-23 Thread Sunil Bannur
When the dataprovider changes, each series's protected dataChanged
function gets called.

Also, you could access the chart's dataProvider as a ICollection and add
an event listener to it to keep track of the data changes.

 

Thanks

-Sunil

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of netdeep
Sent: Thursday, May 22, 2008 11:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] chart data change events

 

I need to capture an event for when the data is updated in a chart. I
take a snapshot of the 
chart and save it to a file. But when I do it via a custom event which I
fire myself, it fires the 
event and takes the screenshot before the update and so just snapshots
the previous state of 
the chart. And if I use FlexEvent.UPDATE_COMPLETE, it doesn't register a
change since what 
I am doing is adding data to the array which is the dataProvider for the
chart. I can't put an 
update event listener to the array itself since the array does not have
any way to reference 
back to it's chart. 

Any help would be greatly appreciated

 

image001.jpgimage002.jpg

Re: [flexcoders] Image

2008-05-23 Thread Laith Juwaidah
I'm getting confused, didn't we set loader to be contentHolder of Image in
the previous line?

On Fri, May 23, 2008 at 2:07 PM, Manish Jethani [EMAIL PROTECTED]
wrote:

   On 5/22/08, Laith Juwaidah [EMAIL PROTECTED] ljuwaidah%40gmail.com
 wrote:

  Sorry, I copied the wrong line, it's giving the error on
 loader.mouseEnabled = false;

 You have to set mouseEnabled on the contentHolder object. See the
 source of SWFLoader.

 Manish
  




-- 
Laith Juwaidah
http://www.ljuwaidah.org/
http://ljuwaidah.blogspot.com/


[flexcoders] Re: ScriptTimeOut Issue

2008-05-23 Thread Subeesh
Thanks Alex,

The setTimeout call in javascript solved the issue . 

Subeesh



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

 Hi Alex, 
 
 Thanks for your reply . But I am not sure what are you trying to 
 say . The error is thrown from flex , not from javascript , and how 
 cam i use the setTimeout from javascript.
 
 Subeesh
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Isn't there a setTimeout call in Javascript you can use to put up 
 the
  TextEditor?
  
   
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
  Behalf Of Subeesh
  Sent: Wednesday, May 21, 2008 8:45 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] ScriptTimeOut Issue
  
   
  
  Hi All, 
  
  I am opening an html popup with a TextEditor using javascript 
from 
 my 
  flex application . When the user fill in the textarea and click 
the 
  submit button in the Texteditor, javascript closes that window 
and 
  returns the value back to the flex .( using FABridge ) . The 
issue 
 is 
  that if the javascript window is used more than a minute a 
runtime 
  error (script is executed more than the default time out 
 period.)
  
  I set the scriptTimeout property to the maximum value ( 60 
 seconds ).
  
  When the javascript popup is closed , it is calling public 
metthod 
 in 
  thr flex application.
  
  Is there any workaround for this . What i want to achieve is to 
 keep 
  the external html window remain open as long as i wish and to 
call 
 a 
  method in the flex when it is closed.
  
  Thanks in advance 
  
  Subeesh
 





[flexcoders] XML to Object

2008-05-23 Thread gaurav1146
Hi,
 I am using a HTTPService which has resultFormat as e4x. I need to
convert the XML obtained to an ArrayCollection containing objects. I
tried this:

var ac:ArrayCollection = new ArrayCollection([(event.result.abc as
XML).children()]); 

This gives me an array collection of XML objects. But, I need an array
collection of Objects. Is there any ways I could get that.

Also, I cant use the resultFormat=object, as in my XML I have two
sets of Data. The first one needs an e4x format and for the second one
I need to get an ArrayCollection of Objects. 

Any help would be greatly appreciated.

Regards,
Gaurav



[flexcoders] Aamzon flash scrolly rotator

2008-05-23 Thread smccran
Hi all,

I found this the other day, its Amazons flash driven rotating Item 
picker

http://www.amazon.co.uk/b/ref=amb_link_62695165_1?
ie=UTF8node=10917681pf_rd_m=A3P5ROKL5A1OLEpf_rd_s=ilmpf_rd_r=0ACZ4V8
V6PJSJ3K5HGZTpf_rd_t=101pf_rd_p=187921591pf_rd_i=266239

I really like the functionality, and have been trying to work out how 
to build something similar for a slightly different purpose.

I'm guessing this is do-able in flex, but I don't really have the first 
idea of where to start!.

Anyone got any ideas?

Thanks
Shaun




[flexcoders] Interesting XML performance discovery

2008-05-23 Thread polestar11
Hi there

I'm busy crunching through xml data, stripping out nodes that don't
have children. Perhaps its not the best way to do things, but I use a
for loop that checks and deletes any item with no children. I've
always found XML delete tricky and to do this I reference the parent
which finds the child index and deletes the child.
On a file of 1+ items execution time is 600ms without the delete.
With the delete execution time is 52919ms!

I'm off to find another delete function ...

for each(span in body.span) {
if(span.children().length() == 0) {
delete span.parent().children()[span.childIndex()];
}
else {
[EMAIL PROTECTED] = SPAN_PREFIX + id++;
[EMAIL PROTECTED] = itemClicked('[EMAIL PROTECTED]', 
AIR.itemSelected);
[EMAIL PROTECTED] = span.attribute(class);
}
}



[flexcoders] Re: Interesting XML performance discovery

2008-05-23 Thread polestar11
... just discovered how terribly unoptimized code can be.

Changed the delete code snippet from the below example to the following:
delete body.children()[count]; // takes 53636ms
 
and then the following:
delete spans[count]; // takes 852ms

Obviously constructing a child array each time in the loop on a large
list of children is hugely inefficient. 



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

 Hi there
 
 I'm busy crunching through xml data, stripping out nodes that don't
 have children. Perhaps its not the best way to do things, but I use a
 for loop that checks and deletes any item with no children. I've
 always found XML delete tricky and to do this I reference the parent
 which finds the child index and deletes the child.
 On a file of 1+ items execution time is 600ms without the delete.
 With the delete execution time is 52919ms!
 
 I'm off to find another delete function ...
 
 for each(span in body.span) {
   if(span.children().length() == 0) {
   delete span.parent().children()[span.childIndex()];
   }
   else {
   [EMAIL PROTECTED] = SPAN_PREFIX + id++;
   [EMAIL PROTECTED] = itemClicked('[EMAIL PROTECTED]', 
 AIR.itemSelected);
   [EMAIL PROTECTED] = span.attribute(class);
   }
 }





[flexcoders] custom event not added

2008-05-23 Thread dnk
Hi there,

I have a controller that is adding my custom event listeners, but for  
some reason my event handler was not being fired.

My original code was (snippet):


(in controler)

//constructor
public function FlexbController()
{
//turn the key, start it up
addEventListener( FlexEvent.CREATION_COMPLETE, onInit );
}

private function onInit( event:Event ):void
{
//setup event listeners
/*systemManager is where event listener hangs out 
defines the  
relationship between event and handler*/

systemManager.addEventListener( 
GetNewsEvent.GET_NEWS_EVENT,  
handler_GetNewsEvent );
systemManager.addEventListener( 
AddNewsEvent.ADD_NEWS_EVENT,  
handler_AddNewsEvent );
 
systemManager.addEventListener( NewsDataLoadedEvent.NEWS_LOADED_EVENT,  
handler_NewsLoadedEvent );
getNewsData();

}

And I had trace statements in all of my handlers... this is how i  
noticed things were not working as they should.

SO I added a simple check like (in my FlexbController constructor):

if (systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,  
handler_GetNewsEvent ))
{
trace(true);
} else {
trace(false);
}


And I obviously am getting false.

Ideas?

dnk




Re: [flexcoders] custom event not added

2008-05-23 Thread Paul Andrews
addEventListener() does not return a value..

- Original Message - 
From: dnk [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, May 23, 2008 12:47 PM
Subject: [flexcoders] custom event not added


 Hi there,

 I have a controller that is adding my custom event listeners, but for
 some reason my event handler was not being fired.

 My original code was (snippet):


 (in controler)

 //constructor
 public function FlexbController()
 {
 //turn the key, start it up
 addEventListener( FlexEvent.CREATION_COMPLETE, onInit );
 }

 private function onInit( event:Event ):void
 {
 //setup event listeners
 /*systemManager is where event listener hangs out defines the
 relationship between event and handler*/

 systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
 handler_GetNewsEvent );
 systemManager.addEventListener( AddNewsEvent.ADD_NEWS_EVENT,
 handler_AddNewsEvent );

 systemManager.addEventListener( NewsDataLoadedEvent.NEWS_LOADED_EVENT,
 handler_NewsLoadedEvent );
 getNewsData();

 }

 And I had trace statements in all of my handlers... this is how i
 noticed things were not working as they should.

 SO I added a simple check like (in my FlexbController constructor):

 if (systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
 handler_GetNewsEvent ))
 {
 trace(true);
 } else {
 trace(false);
 }


 And I obviously am getting false.

 Ideas?

 dnk



 

 --
 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: filterFunction problems being had

2008-05-23 Thread bredwards358
I kind of see what you're getting at, I'm thinking the ArrayCollection
is probably not being returned as an associative array. I've
double-checked and the col variable is containing the value of what
I select in the comboBox yet value is not getting set equal to it so
yeah value = item[col] works. Going by your suggesting of checking the
field names, and all I had to do was make sure they matched and when
they did, the function as a whole worked. 

Thanks, once again a mundane detail ruins my day, lol. Oh well, all
part of the learning process.

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

 
 Hi Brian,
 
 The original example uses an associative array; which is an instance of
 the Object class.  Because the example creates it's ArrayCollection in
 code, value = item[col] works:
 
 dpRows = new ArrayCollection();
 var item:Object = new Object();
 item.type = Website;
 item.name = Expectal.com;
[EMAIL PROTECTED], bredwards358 bredwards358@
 wrote: item.url = http://www.expectal.com;;
 item.desc = Your Professional Flash Photo Gallery with Slideshow and
 Background Music;
 item.tags = Flash, Gallery, Slideshow, Music;
 dpRows.addItem(item);
 
 However, if you are loading your DataGrid's ArrayCollection from a
 database, it's probably not being returned in an associative array
 format.  If it is, check to make sure that the field names are exactly
 the same as the data values in the ComboBox ArrayCollection.  If it's
 not, you will probably have to re-write the code to be conditional.  You
 might also want to debug the col variable; to make sure that it
 contains a value.
 
 As a general recommendation, I would pay attention to naming
 conventions.  Filters and Sorts are two distinctly different functions
 that may be applied to an ArrayCollection. 
 (model.prodMaintData.filterFunction = sortProducts is confusing).  Also,
 I would stay away from using the word data in name/value pairs.  It
 works, but it's very close to being a reserved word in Flex.
 
 -TH



[flexcoders] Application crash due to Channel disconnected

2008-05-23 Thread Tuncay A.

Hi,

I hope some of you guys can help me.

I made my first company Flex application integrated into a webapplication
using Java Dataservice to communicate to backend.

On Windows machine it works properly. When deploying into a Linux machine it
crashes almost all time when the application either is launched or refreshed
in a browser (IE/Firefox). Using Adobe flex SDK 3.+ , DataService, Flash 9+
on client it doesn't help. 

The exception I get is:
---
[RPC Fault faultString=Channel disconnected
faultCode=Client.Error.DeliveryInDoubt faultDetail=Channel disconnected
before an acknowledgement was received]
at
mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at NetConnectionMessageResponder/channelDisconnectHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/disconnectSuccess()
at mx.messaging.channels::NetConnectionChannel/internalDisconnect()
at mx.messaging.channels::RTMPChannel/internalDisconnect()
at mx.messaging.channels::RTMPChannel/statusHandler()

I'm stuck and hope some can help.

-tuncay
-- 
View this message in context: 
http://www.nabble.com/Application-crash-due-to-Channel-disconnected-tp17316630p17316630.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Aamzon flash scrolly rotator

2008-05-23 Thread Farid SALAH

Le 23 mai 08 à 13:09, smccran a écrit :

 Hi all,

 I found this the other day, its Amazons flash driven rotating Item
 picker

 http://www.amazon.co.uk/b/ref=amb_link_62695165_1?
 ie
 =UTF8node=10917681pf_rd_m=A3P5ROKL5A1OLEpf_rd_s=ilmpf_rd_r=0ACZ4V8
 V6PJSJ3K5HGZTpf_rd_t=101pf_rd_p=187921591pf_rd_i=266239

 I really like the functionality, and have been trying to work out how
 to build something similar for a slightly different purpose.

 I'm guessing this is do-able in flex, but I don't really have the  
 first
 idea of where to start!.

 Anyone got any ideas?


Take a look here:

http://www.adobe.com/devnet/flex/samples/photo_explorer/

The carousel doesn't rotate fully but it should give you a good start !

Farid



[flexcoders] Force redraw of a Linechart as seen on livedocs ?

2008-05-23 Thread Farid SALAH

Hi all !

I'm trying to implement the code found here

http://livedocs.adobe.com/flex/3/html/charts_intro_7.html#225506

It's the last part with the multiple line series.

My problem is that I'm updating the series based on a request instead  
of populating it in the creationComplete()

The method described here is called on a resultEvent

public function initApp():void {
var wholist:Array = new Array();
for each(var property:XML in myXML.item.who) {
// Create an Array of unique names.
if (wholist[property] != property)
wholist[property] = property;
}

// Iterate over names and create a new series
// for each one.
for (var s:String in wholist) {
// Use all items whose name matches s.
var localXML:XMLList = myXML.item.(who==s);

// Create the new series and set its properties.
var localSeries:LineSeries = new LineSeries();
localSeries.dataProvider = localXML;
localSeries.yField = hours;
localSeries.xField = when;

// Set values that show up in dataTips and Legend.
localSeries.displayName = s;

// Back up the current series on the chart.
var currentSeries:Array = myChart.series;
// Add the new series to the current Array of series.
currentSeries.push(localSeries);
// Add the new Array of series to the chart.
myChart.series = currentSeries;
}

How can I redraw my line series, knowing that it's in a VBox in a  
ViewStack ?

I've been calling validateNow() on a bunch of components...


Thanks again

[flexcoders] how to set handle focus?

2008-05-23 Thread odiel_leon
Hi.

I have a panel, inside are some controls like buttons and texts 
fields.

I want that when click on any panel region(inside, border, title) set 
focus of my panel and aply some style, and when the panel loose focus 
change the style.

I know how to change the style.

In other hand,I have a eventListener on Mouse_Down event in the 
Panel, this function setStyle and setFocus to panel, also I have 
other eventListener on Focus_OUT, but when I click inside panel or 
border the focus_out trigger the event, thats no occur on the edit, 
and buttons controls.

Some help to solve this problem?

Thanks.



[flexcoders] Re: Any one have info as to how to setup an AdvancedDataGridHeaderRender?

2008-05-23 Thread valdhor
The best articles I have seen on renderers are on Alex Harui's blog
http://blogs.adobe.com/aharui/item_renderers/

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

 I'm looking for a walk through as to how to setup an 
 AdvanceddataGridHeaderRender. Any one know of one?





Re: [flexcoders] Re: Flash Player 10 is in prerelease!

2008-05-23 Thread Tom Chiverton
On Wednesday 21 May 2008, Muzak wrote:
 From what I can tell, that's the standalone version, not the FP browser
 plugin (at least the win version).

Ahh.
Oh well, there's a Linux plugin :-)

-- 
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] Re: Securely Interfacing Between Flex and Databases

2008-05-23 Thread Tom Chiverton
On Wednesday 21 May 2008, Battershall, Jeff wrote:
 Yes, but we're talking on YOUR network where you have WebScarab or other
 such tool installed.  It's not as though ALL your bank's transactions,
 regardless of intended recipient, are now visible to you.

No, of course not.
The OP asked /i/ can easily see the data of /my/ bank transfers (my emp.).

-- 
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] Flex 3, Coldfusion wizard and internal build errors

2008-05-23 Thread Tom Chiverton
On Thursday 22 May 2008, neonblue wrote:
 I am, is there an issue with that?  I can access the drive with no
 problems...

There would appear to be an issue with that, if it works locally... you don't 
have an on-demand virus scanner running, per-chance ?

-- 
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] Flash USB-API :)

2008-05-23 Thread Tom Chiverton
On Thursday 22 May 2008, Cato Paus wrote:
 I realy hope we can have USB communication in AIR and Flash Player :)

USB communication from a web site ? I think not... unless you want Joe Random 
reading all your data.
For AIR this makes more sense.

-- 
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: TittleWindow ControlBar not showing up

2008-05-23 Thread valdhor
From memory, the documentation says that the controlbar must be the
last child added to the window. You are adding the controlbar to an
Hbox that has already been added to the window.

Try adding the controlbar directly to the window as the last item to
be added.


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

 Hi Everyone,
 
 I'm trying to dynamically create dragable TitleWindows with
 ControlBars and the ControlBars are not showing up. At this point I am
 adding a label to the control bar. Eventually it will be an image.
 
 Thanks in Advance!
 
 Here's the code:
 
 ?xml version=1.0 encoding=utf-8?
 core:DashboardModuleBase
   xmlns:mx=http://www.adobe.com/2006/mxml;
   xmlns:core=com.arc90.dashboard.view.core.*
   xmlns:arcComps=com.arc90.flexlib.controls.*
   xmlns:comps=com.arc90.dashboard.view.components.* 
   layout=absolute
   creationComplete=facade.startup(this)
   
   mx:Script
   ![CDATA[
   import mx.controls.Button;
   import mx.containers.ControlBar;
   
   import com.arc90.dashboard.ApplicationFacade;
   import mx.events.DragEvent;
   import mx.events.FlexEvent;
   import mx.core.DragSource;
   import mx.managers.DragManager;
   import mx.containers.TitleWindow;
   import com.arc90.dashboard.view.components.DragWindow;
   import mx.events.CloseEvent;
   import mx.collections.ArrayCollection;
   import mx.containers.HBox;
   import mx.controls.Label;
   import mx.controls.TextInput;
   
   
   [Embed(source=/assets/icons/policyicon.png)]
 [Bindable]
 private var policyWidgetAddImage:Class;
 
 [Embed(source=/assets/icons/reporticon.png)]
 [Bindable]
 private var reportWidgetAddImage:Class;
 
 [Embed(source=/assets/icons/rssicon.png)]
 [Bindable]
 private var rssWidgetAddImage:Class;
 
 private var policyWidgetID:int = -1;
 private var reportWidgetID:int = -1;
 private var rssWidgetID:int = -1;
   
   private var policyWidgetsAC:ArrayCollection = new 
 ArrayCollection(); 
   private var reportWidgetsAC:ArrayCollection = new 
 ArrayCollection();
   private var rssWidgetAC:ArrayCollection = new 
 ArrayCollection();
   
// Function called by the canvas dragEnter event; 
 enables dropping
 private function doDragEnter(event:DragEvent):void 
 {
 DragManager.acceptDragDrop(Canvas(event.target));
 }
 
 // Variables used to hold the mouse pointer's location in
 the title bar.
 // Since the mouse pointer can be anywhere in the title
 bar, you have to 
 // compensate for it when you drop the panel. 
 public var xOff:Number;
 public var yOff:Number;
 
 // Function called by the Canvas dragDrop event; 
 // Sets the panel's position, 
 // dropping it in its new location.
 private function doDragDrop(event:DragEvent):void 
 {
   // Compensate for the mouse pointer's location 
 in the title bar.
   var tempX:int = event.currentTarget.mouseX - 
 xOff;
   event.dragInitiator.x = tempX;
   
   var tempY:int = event.currentTarget.mouseY - 
 yOff;
   event.dragInitiator.y = tempY;
   
   // Put the dragged panel on top of all other 
 components.
   
 canvas.setChildIndex(TitleWindow(event.dragInitiator),
 canvas.numChildren-1);
 }
 
 // creates the widgets config view and adds it to the
canvas.
 // this should happen in a widget creator file.
   private function 
 addWidgetClickHandler(event:MouseEvent):void{
 var dw:DragWindow = new DragWindow();
 var hbox:HBox = new HBox();
 var label:Label = new Label();
 var textField:TextInput = new TextInput();
 var controlBar:ControlBar = new ControlBar();
 
 var img:Image = new Image();
 img.source = rssWidgetAddImage;
 
 

[flexcoders] Re: Flex 3, Coldfusion wizard and internal build errors

2008-05-23 Thread neonblue
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 22 May 2008, neonblue wrote:
  I am, is there an issue with that?  I can access the drive with 
no
  problems...
 
 There would appear to be an issue with that, if it works 
locally... you don't 
 have an on-demand virus scanner running, per-chance ?
 
 -- 
 Tom Chiverton


No, I don't run virus scanning my my dev computers other than ClamAV 
(force scan). Call me crazy, but I don't use the dev computers 
for fun so I'm not at at risk for viruses.  If I need to browse 
the Internet for something then I use a VMWare session that gets 
reset to the initial snapshot when I shut it down)

I did find some articles on developing Flex2 on a remote CF server 
that pointed to an XML file modification.  However, I can't seem to 
find that file in Flex3.  The issue had something to do with the 
flex component looking at localhost vs. remote.  In fact, I ran into 
another post from you on houseoffusion.com which talked about 
copying the XML files locally.

I tried your suggestion on copying the XML files locally but that 
didn't seem to work either.



[flexcoders] Wipe effects with perElementOffset in State Transitions and RemoveChild

2008-05-23 Thread wavinboy31
Hi

Trying to use a wipe transition effect when changing states. I want to
use a perElementOffset so that the object wipes off and then gets
removed. I've already set wipe.showTarget to false,  but the component
performs the wipe and then flicks back on? I'm pretty sure my code is
solid, I can replace the wipe with a fade and it works fine. I'm
wondering if this is a bug? 

code-

mx:Sequence filter=remove targets={[b,c,d,e,can]} 
  mx:WipeDown  showTarget=false perElementOffset=300  /
  mx:RemoveChildAction perElementOffset=300 /   
/mx:Sequence  

Any suggestions?




[flexcoders] Re: Flash USB-API :)

2008-05-23 Thread Cato Paus
Hehe Totaly Agree with you on Joe Random, but I put my trust on Adobe 
to find a solution :) 

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

 On Thursday 22 May 2008, Cato Paus wrote:
  I realy hope we can have USB communication in AIR and Flash 
Player :)
 
 USB communication from a web site ? I think not... unless you want 
Joe Random 
 reading all your data.
 For AIR this makes more sense.
 
 -- 
 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] Re: chart data change events

2008-05-23 Thread netdeep

The problem with the events is that if I listen to changes in the array, I 
don't have access 
to the chart when the event fires.  You can't pass arguments to the event so 
the only thing 
it will know about is the array which fires it.  And as I said before, when I 
create custom 
events, I have to dispatch them myself and they never get called when I need 
them to, but 
are always late.

My best guess was to try FlexEvent.UPDATE_COMPLETE but that seems to never get 
fired 
when I simply append to the array which is the dataprovider for the axis.

So I'm unsure what to do with these suggestions.

Thanks, though!

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

 When the dataprovider changes, each series's protected dataChanged
 function gets called.
 
 Also, you could access the chart's dataProvider as a ICollection and add
 an event listener to it to keep track of the data changes.
 
  
 
 Thanks
 
 -Sunil
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of netdeep
 Sent: Thursday, May 22, 2008 11:25 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] chart data change events
 
  
 
 I need to capture an event for when the data is updated in a chart. I
 take a snapshot of the 
 chart and save it to a file. But when I do it via a custom event which I
 fire myself, it fires the 
 event and takes the screenshot before the update and so just snapshots
 the previous state of 
 the chart. And if I use FlexEvent.UPDATE_COMPLETE, it doesn't register a
 change since what 
 I am doing is adding data to the array which is the dataProvider for the
 chart. I can't put an 
 update event listener to the array itself since the array does not have
 any way to reference 
 back to it's chart. 
 
 Any help would be greatly appreciated






[flexcoders] Re: Aamzon flash scrolly rotator

2008-05-23 Thread valdhor
There are a number of these components around. Check these out:

http://www.afcomponents.com/components/3d_carousel_as3/
http://theflashblog.com/?p=293
http://blogs.digitalprimates.net/codeSlinger/index.cfm/2007/10/28/Max-Presentation
http://giles.roadnight.name/Carousel/Carousel.html



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

 Hi all,
 
 I found this the other day, its Amazons flash driven rotating Item 
 picker
 
 http://www.amazon.co.uk/b/ref=amb_link_62695165_1?
 ie=UTF8node=10917681pf_rd_m=A3P5ROKL5A1OLEpf_rd_s=ilmpf_rd_r=0ACZ4V8
 V6PJSJ3K5HGZTpf_rd_t=101pf_rd_p=187921591pf_rd_i=266239
 
 I really like the functionality, and have been trying to work out how 
 to build something similar for a slightly different purpose.
 
 I'm guessing this is do-able in flex, but I don't really have the first 
 idea of where to start!.
 
 Anyone got any ideas?
 
 Thanks
 Shaun





[flexcoders] Re: Add New Item to Datagrid

2008-05-23 Thread David C. Moody
Well I came in this morning and was beginning to start debugging and I
don't believe it but the stupid thing is working now?!?!?!?

Here's what my code ended up being:

private function generateObject():Object {
return { ap_trans:  }
}

private function isObjectEmpty(obj:Object):Boolean {
return obj.ap_trans == ;
}

private function gotCheckData(evt:ResultEvent):void {
ac = new NewEntryArrayCollection (evt.result as Array );
ac.factoryFunction = generateObject;
ac.emptyTestFunction = isObjectEmpty;
ckData.dataProvider = ac;
//ckData.dataProvider = evt.result;
}

Thanks for your help Alex, I really don't know what caused it to start
working this time, but it did.

-David

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

 Debug into it.  A breakpoint in makeRowsAndColumns and check the
 .collection to see what's in it.
 
  
 




[flexcoders] Parsing ISO8601 date

2008-05-23 Thread cesarerocchi
Hi,

AFAIU there is no support to parsing ISO8601 dates in Flex.

Does anybody have a clue or pointer to some library?

Thanks,

-c.

--
http://spreadingfunkyness.com/posty





[flexcoders] Center/Shrink To Fit

2008-05-23 Thread Richard Rodseth
I'm looking to find or create a  component which would scale (not
resize) its contents smaller if they were larger than this component's
bounds, and center them if they're smaller.  I could imagine
extensions to support expand to fit as well, but that's not needed
currently.

The contents can be a single child if that helps, or the full child
list of a container. I've done a bit of custom component development,
but would appreciate any suggestions/pointers for this scenario.

Thanks in advance.


[flexcoders] Re: Add New Item to Datagrid

2008-05-23 Thread David C. Moody
I did some more testing to figure out what was causing this to
work/not work.

What I found is that if the evt.result is a mysql/mysqli result set,
it fails to load data sent.  However if you put the mysql data into a
separate array, and return that array.  The data shows up.

However if you set the NewEntryArrayCollection up as so:
ac = new NewEntryArrayCollection (evt.result.source as Array );

It will accept a mysql/mysqli result set.

This has cost me 2 days, but now I know and now other people will know
as well.

HTH,
-David

--- In flexcoders@yahoogroups.com, David C. Moody [EMAIL PROTECTED] wrote:

 Well I came in this morning and was beginning to start debugging and I
 don't believe it but the stupid thing is working now?!?!?!?
 
 Here's what my code ended up being:
 
 private function generateObject():Object {
   return { ap_trans:  }
 }
 
 private function isObjectEmpty(obj:Object):Boolean {
   return obj.ap_trans == ;
 }
 
 private function gotCheckData(evt:ResultEvent):void {
   ac = new NewEntryArrayCollection (evt.result as Array );
   ac.factoryFunction = generateObject;
   ac.emptyTestFunction = isObjectEmpty;
   ckData.dataProvider = ac;
   //ckData.dataProvider = evt.result;
 }
 
 Thanks for your help Alex, I really don't know what caused it to start
 working this time, but it did.
 
 -David
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Debug into it.  A breakpoint in makeRowsAndColumns and check the
  .collection to see what's in it.
  
   
 





[flexcoders] Chart Using WebService

2008-05-23 Thread ajesing
Hello,

I am completely new to Flex, I am looking for a sample code for
building  a chart using a webservice.

Could someone kindly provide some example or a sample code?

I would really appreciate that.

Thanks a lot.





Re: [flexcoders] Emulating a failed validator

2008-05-23 Thread Charlie Griefer
On Thu, May 22, 2008 at 11:12 PM, Josh McDonald [EMAIL PROTECTED] wrote:
 Guys,

 Say I have a textInput, and I need to emulate the failure of a validator,
 how do I go about it? I can't use the existing validator framework, because
 the decision on whether or not that field is valid is based on a calculated
 result rather than a simple validation of the textInput component itself.

I believe you can use the textInput's errorString property.  just set
it to a (string) value.  You may also still be able to use the
existing validator framework.  the validator has an 'enabled' property
that you can toggle based on your calculated result.


-- 
A byte walks into a bar and orders a pint. Bartender asks him What's
wrong? Byte says Parity error. Bartender nods and says Yeah, I
thought you looked a bit off.


[flexcoders] Question regarding DataGrid

2008-05-23 Thread Kenny
Hello.

In the following code, I would like to be able to reference the data
field called fn from within the item renderer for the last column,
which contains the RollOverButton.

Can someone tell me how I can do this?

What I want to do is have the button be visible in some cases, but not
others.
  
Thanks!

Kenny

CODE BELOW
==

mx:DataGrid id=dgMediaHistory 
x=27
y=59
width=380
height=339
dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
resizableColumns=false
allowMultipleSelection=false
allowDragSelection=false
draggableColumns=false
change=historyChangeHandler()
mx:columns
mx:DataGridColumn headerText=Msg dataField=fn width=85/
mx:DataGridColumn headerText=Date dataField=whenplayed width=140/
mx:DataGridColumn headerText= width=30
mx:itemRenderer
mx:Component
comp:RollOverButton width=20 height=20 
 upImage={outerDocument.playImageUp} 
 overImage={outerDocument.playImageOver} 
 downImage={outerDocument.playImageDown} 
 click=outerDocument.playMedia()/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid



RE: [flexcoders] Re: How to extract data from XML

2008-05-23 Thread Tracy Spratt
Ok, you may have a namespace problem.  They can be a PITA.  I'm not an
expert and you should reveiw the docs/google if this doesn't work but
try putting this in the declarations section of your
app/component(instance scope level):

default xml namespace = http://www.w3.org/2005/Atom;; 

 

There is more stuff in the xmlns declaration in your sample xml:

feed xmlns=http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom 
...

 

I do not understand what that second part of the string is.  You might
have to include that as well in the default namespace declaration.

 

You can avoid the namespace issue if you use the node index to get a
node, but this is a very clunky way to do it.  To see, try:

Alert.show(myXML.children()[4].toXMLString())

 

XMLList always has 0-n xml nodes in it. (the result of an e4x expression
is never null)  If there is only one node, then many of the XML methods
will work on it the same as with XML.  But for clarity, if I know I want
to work with a single XML node then I do:

var myXMLList:XMLList = myXML.logo;

var xmlLogo:XML = myXMLList[0];

 

If just you do this below, you will get a datatype error:

var xmlLogo:XML = myXML.logo;  //even if that expression returns only a
single node.

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of wild.katana
Sent: Thursday, May 22, 2008 7:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to extract data from XML

 

Okay, first of all, thanks for all of your help, Tracy. 
I have checked the myXML variable with Alert.show(myXML) and it shows
what I pasted in the first post (that's where I got it). So I know
that myXML contains that. I tried doing
Alert.show(myXML.logo.toXMLString()) but it is still showing nothing.
I have read the documentation on using XML and tried many of the
things it says, but to no avail. One thing I don't wuite understand...
What is the difference between XML and XMLList? If the myXML.logo
returns an XMLList, then should I make a variable that contains it
first? Like 
var myXMLList:XMLList = myXML.logo;
Alert.show(myXMLList);
?
I will try that but let me know if that is what you were meaning or
not... Thanks again..

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

 First, did you trace or alert your XML in yur result handler? If you
 did not and are assuming you know what your xml looks like exactly, do
 that now.
 
 
 
 Second, when attempting to view XML, always use toXMLString() (search
 the archives for why):
 
 Alert.show(myXML.logo.toXMLString())
 
 
 
 Third, when writing e4x expressions, unless you are very certain of
 yourself, it is best to do it one step at a time, using temporary XML
 or XMLList variables as needed, and tracing the contained value using
 toXMLString(). Note that all e4x expressions(myXML.logo is one) return
 XMLList, not XML. The docs will show how to handle this.
 
 
 
 Fourth, review the XML class in the language Ref and the working with
 data cha[ter in the developers guide for an explanation on how to
work
 with XML. The link below is for Flex 2, but the XML stuff has not
 changed.
 
 http://livedocs.adobe.com/flex/2/docs/1910.html
http://livedocs.adobe.com/flex/2/docs/1910.html 
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of wild.katana
 Sent: Thursday, May 22, 2008 4:00 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] How to extract data from XML
 
 
 
 Hello, I have loaded an XML from a URL using URLLoader. Now that I
 have it in an object, how do I access individual parts of that data?
 The XML looks like this:
 feed xmlns=http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom
http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom  
 xmlns:openSearch=http://a9.com/-/spec/opensearchrss/1.0/
http://a9.com/-/spec/opensearchrss/1.0/ 
 http://a9.com/-/spec/opensearchrss/1.0/
http://a9.com/-/spec/opensearchrss/1.0/  
 xmlns:gml=http://www.opengis.net/gml http://www.opengis.net/gml
http://www.opengis.net/gml http://www.opengis.net/gml  
 xmlns:georss=http://www.georss.org/georss
http://www.georss.org/georss 
 http://www.georss.org/georss http://www.georss.org/georss  
 xmlns:media=http://search.yahoo.com/mrss/
http://search.yahoo.com/mrss/ 
 http://search.yahoo.com/mrss/ http://search.yahoo.com/mrss/  
 xmlns:yt=http://gdata.youtube.com/schemas/2007
http://gdata.youtube.com/schemas/2007 
 http://gdata.youtube.com/schemas/2007
http://gdata.youtube.com/schemas/2007  
 xmlns:gd=http://schemas.google.com/g/2005
http://schemas.google.com/g/2005 
 http://schemas.google.com/g/2005 http://schemas.google.com/g/2005 

 idhttp://gdata.youtube.com/feeds/api/videos
http://gdata.youtube.com/feeds/api/videos 
 

[flexcoders] How to run a sample from docs

2008-05-23 Thread markgoldin_2000
How can I open and run in Flex the following sample:
installation_dir\frameworks\javascript\fabridge 

found at:
http://livedocs.adobe.com/flex/3/html/help.html?
content=ajaxbridge_2.html

Thanks



[flexcoders] DataGrid placement

2008-05-23 Thread David C. Moody
Is there a particular way to place a user in a certain cell?

Like I have a check one one row, and if that check comes back invalid,
I want to place the user back in that cell.  If its valid I want the
user to go to the next cell.

A setFocus for a dataProvider is what I'm looking for I guess.

Thanks,
-David



[flexcoders] AIR Relative URL Requests

2008-05-23 Thread Robert Stehwien
I had a web based Flex app and I've extracted common code to use in an AIR
app.  The Web application makes HTTPService and source=XXX requests using
relative paths to the web application like this:
mx:HTTPService id=imagesXML
showBusyCursor=true
url=config/images.xml
resultFormat=e4x
result=onImagesLoaded(event)
fault=onLoadFault(event, imagesXML.url)/

mx:Image source=images/thumbnail.png
height=46 width=46 scaleContent=true
horizontalAlign=center
verticalAlign=middle/


[flexcoders] Restricting SWFLoader Content to its Dimensions

2008-05-23 Thread Aaron Miller
Hello,

I have a SWFLoader in my app that loads various SWF files created by
other developers. They are supposed to create them in the specified
dimensions, but I keep running into problems with them going outside
the bounds. Is there any way I can just clip the content in Flex to
ensure they don't interfere with any of the adjacent controls? I've
tried playing around with various properties in the SWFLoader class
but to no avail. Any advice will be greatly appreciated.


Thanks in advance!
~Aaron


[flexcoders] Re: XML to Object

2008-05-23 Thread Tim Hoff

Hi Gaurav,

This is kind of a pain, but you can convert XML to an ArrayCollection of
Objects like this:

public function result( event : Object ) : void
{
 public var abcAC : ArrayCollection = new ArrayCollection();
 var abcXMLList : XMLList = XMLList(XML(event.result).abc);

 for each(var abcNode:XML in abcXMLList)
 {
 var abc:Object = new Object();
 [EMAIL PROTECTED]();
 [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ();
 [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ();
 abcAC.addItem(abc);
 }



 abcXMLList = null;

}

-TH


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

 Hi,
 I am using a HTTPService which has resultFormat as e4x. I need to
 convert the XML obtained to an ArrayCollection containing objects. I
 tried this:

 var ac:ArrayCollection = new ArrayCollection([(event.result.abc as
 XML).children()]);

 This gives me an array collection of XML objects. But, I need an array
 collection of Objects. Is there any ways I could get that.

 Also, I cant use the resultFormat=object, as in my XML I have two
 sets of Data. The first one needs an e4x format and for the second one
 I need to get an ArrayCollection of Objects.

 Any help would be greatly appreciated.

 Regards,
 Gaurav





[flexcoders] Re: How to use WebServices in Flex 3?

2008-05-23 Thread JWOpitz
--- In flexcoders@yahoogroups.com, barry.beattie [EMAIL PROTECTED]
wrote:

  Well I prefer not to mess with the generated code, for the maintenance
  sake.
  
  Robert
 
 dumb question time...
 
 how do you guys usually manage the generated code when the webserver
 target moves from, say, development to a production environment and
 the soap address changes?
 
 (since part of the soap address is used in the generated code's
 package name and even the event types)
 
 
 refactor all the generated code via Flex Builder?
 generate it again when the WSDL changes?
 something else?


Something I did at a financial institute was to store the URLs in an
XML file.  I'd have a section for pred and a section for dev.  And I
would just comment them out for whatever environment was used.  Then I
would use AppCoreLib to load the xml and reference the keys in the
appCoreLib.business.Settings.getInstance().getURL(key) to
dynamically set the web service urls.






[flexcoders] Re: How to use WebServices in Flex 3?

2008-05-23 Thread JWOpitz
forgot to give the link - http://code.google.com/p/appcorelib/

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

  Well I prefer not to mess with the generated code, for the maintenance
  sake.
  
  Robert
 
 dumb question time...
 
 how do you guys usually manage the generated code when the webserver
 target moves from, say, development to a production environment and
 the soap address changes?
 
 (since part of the soap address is used in the generated code's
 package name and even the event types)
 
 
 refactor all the generated code via Flex Builder?
 generate it again when the WSDL changes?
 something else?





[flexcoders] Re: filterFunction problems being had

2008-05-23 Thread Tim Hoff
Yep, the devil is in the details.  Glad that you worked it out. :)

-TH

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

 I kind of see what you're getting at, I'm thinking the 
ArrayCollection
 is probably not being returned as an associative array. I've
 double-checked and the col variable is containing the value of 
what
 I select in the comboBox yet value is not getting set equal to it so
 yeah value = item[col] works. Going by your suggesting of checking 
the
 field names, and all I had to do was make sure they matched and when
 they did, the function as a whole worked. 
 
 Thanks, once again a mundane detail ruins my day, lol. Oh well, all
 part of the learning process.
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  
  Hi Brian,
  
  The original example uses an associative array; which is an 
instance of
  the Object class.  Because the example creates it's 
ArrayCollection in
  code, value = item[col] works:
  
  dpRows = new ArrayCollection();
  var item:Object = new Object();
  item.type = Website;
  item.name = Expectal.com;
 [EMAIL PROTECTED], bredwards358 bredwards358@
  wrote: item.url = http://www.expectal.com;;
  item.desc = Your Professional Flash Photo Gallery with Slideshow 
and
  Background Music;
  item.tags = Flash, Gallery, Slideshow, Music;
  dpRows.addItem(item);
  
  However, if you are loading your DataGrid's ArrayCollection from a
  database, it's probably not being returned in an associative array
  format.  If it is, check to make sure that the field names are 
exactly
  the same as the data values in the ComboBox ArrayCollection.  
If it's
  not, you will probably have to re-write the code to be 
conditional.  You
  might also want to debug the col variable; to make sure that it
  contains a value.
  
  As a general recommendation, I would pay attention to naming
  conventions.  Filters and Sorts are two distinctly different 
functions
  that may be applied to an ArrayCollection. 
  (model.prodMaintData.filterFunction = sortProducts is 
confusing).  Also,
  I would stay away from using the word data in name/value 
pairs.  It
  works, but it's very close to being a reserved word in Flex.
  
  -TH





RE: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS

2008-05-23 Thread Seth Hodgson
Hi Jay,

You could fork the endpoint code and build your own custom AMF filter chain to 
do something like this, but the problem remains that when you receive a single 
HTTP request, you have to return all your results in a single HTTP response. 
Say you have 3 batched calls with average execution times on the server of 
10ms, 6 seconds, and 50ms respectively. Even if you split these invocations out 
across concurrent threads in your custom AMF filter chain you'd still need to 
join on these threads, wait for them all to finish and then bundle the 3 
results back up in a single response. So you're not really buying yourself 
much..

Which is why I recommend a truly async approach where your initial call just 
queues a job(s) for async execution on the server and you use the messaging 
infrastructure to get the eventual result(s)/fault(s) back to your client.

Good luck,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of MyoT
Sent: Thursday, May 22, 2008 6:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS

Hi Seth,

This is awesome information. I didn't know player batch them up and
send in one post. I learned something today. I digged through Blaze
source code and found out that BatchProcessFilter is responsible for
processing those messages . I am wondering is there any way, I can
write our own batch process filter and plug that in instead of default
one. What I am thinking is to process those messages in parallel on
server then response to the client in one response. Basically, it
would cut down the time server has to wait to finish processing all
those messages sequentially.

Any thoughts or insight info would be appreciated.

Thanks,
Jay

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

 There is a single thread that advances through SWF frames and runs your
 ActionScript code and event handlers, but network calls are performed by
 separate background threads concurrently.
 
 In order to have calls processed concurrently on the server, they need
 to arrive as separate requests. In the case of AMF, if you make a series
 of calls quickly chances are good/excellent that the Player will batch
 them up and send them to the server in the body of a single HTTP POST.
 When this happens, the server must unpack them and process them serially
 and then pack the results for all these calls back up in the body of a
 single HTTP response. Because we're dealing with a single request and
 response, there's no way to send back results for individual calls
 separately. When these results get back to the browser and are passed
 back into the Player, they are dispatched to your ActionScript handling
 code as asynchronous events. There's not a good way to force calls to be
 sent as separate requests, and even if you could, browsers impose limits
 on the number of concurrent connections they'll open to a server, so
 this really isn't the right way to solve your scenario. Also, in the
 case of RTMP all traffic between the client and server happens over a
 single connection and is ordered serially.
 
 
 
 If you want to process calls/messages/data asynchronously on the server
 the proper way, it requires a bit of work on your part to accomplish at
 this point. Rather than running your current logic in your RemoteObject
 directly when it is invoked, you need to break that out into a Runnable
 class, and when you're invoked, create an instance of this class that
 packages up the incoming args and info about the client making the call
 and then submit that for asynchronous execution to a
 java.util.concurrent.Executor that you'd need to set up during server
 startup. Your remoting method could return a job id or just void once it
 has queued an instance of your Runnable with the Executor. On the client
 when you get a ResultEvent for your call you don't get the actual result
 - you just know that your invocation was successfully queued for
 asynchronous execution on the server. So the second half of the equation
 is how to get the result or fault generated when the Executor runs your
 Runnable back to the client. You need to take advantage of messaging in
 BlazeDS or LCDS to achieve this. In your client app, create a Consumer
 and subscribe to a destination you define that you can publish
 results/faults as AsyncMessages back to target clients from your
 Runnable. Your Consumer should subscribe to a subtopic that applies only
 to it, or use a selector expression. When your Runnable runs and
 generates the result or fault to return, you'd can create an
 AsyncMessage containing the result of fault info and publish it to this
 destination, using either a subtopic header, or some other message
 header that will be evaluated against the Consumer's selector expression
 such that the message is routed to the proper Consumer. That lets you
 return async results or faults to clients in a truly asynchronous
 manner.
 
 

[flexcoders] Re: XML to Object

2008-05-23 Thread Tim Hoff
Wow, don't know why the formatting messed up so much, but here's the 
rest of these lines:

[EMAIL PROTECTED]();
[EMAIL PROTECTED]();
[EMAIL PROTECTED]();

-TH

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

 
 Hi Gaurav,
 
 This is kind of a pain, but you can convert XML to an 
ArrayCollection of
 Objects like this:
 
 public function result( event : Object ) : void
 {
  public var abcAC : ArrayCollection = new ArrayCollection();
  var abcXMLList : XMLList = XMLList(XML(event.result).abc);
 
  for each(var abcNode:XML in abcXMLList)
  {
  var abc:Object = new Object();
  [EMAIL PROTECTED]();
  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] ();
  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] ();
  abcAC.addItem(abc);
  }
 
 
 
  abcXMLList = null;
 
 }
 
 -TH
 
 
 --- In flexcoders@yahoogroups.com, gaurav1146 gaurav1146@ wrote:
 
  Hi,
  I am using a HTTPService which has resultFormat as e4x. I need to
  convert the XML obtained to an ArrayCollection containing 
objects. I
  tried this:
 
  var ac:ArrayCollection = new ArrayCollection([(event.result.abc as
  XML).children()]);
 
  This gives me an array collection of XML objects. But, I need an 
array
  collection of Objects. Is there any ways I could get that.
 
  Also, I cant use the resultFormat=object, as in my XML I have 
two
  sets of Data. The first one needs an e4x format and for the 
second one
  I need to get an ArrayCollection of Objects.
 
  Any help would be greatly appreciated.
 
  Regards,
  Gaurav
 





[flexcoders] Re: XML to Object

2008-05-23 Thread Tim Hoff
Ok, maybe with spaces:

abc.Name = [EMAIL PROTECTED]();

-TH

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

 Wow, don't know why the formatting messed up so much, but here's 
the 
 rest of these lines:
 
 [EMAIL PROTECTED]();
 [EMAIL PROTECTED]();
 [EMAIL PROTECTED]();
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  
  Hi Gaurav,
  
  This is kind of a pain, but you can convert XML to an 
 ArrayCollection of
  Objects like this:
  
  public function result( event : Object ) : void
  {
   public var abcAC : ArrayCollection = new ArrayCollection();
   var abcXMLList : XMLList = XMLList(XML(event.result).abc);
  
   for each(var abcNode:XML in abcXMLList)
   {
   var abc:Object = new Object();
   abc.Name=abcNode.@();
   abc.Category=abcNode.@
  mailto:abc.Category=abcNode.@ ();
   abc.Topic=abcNode.@
  mailto:abc.Topic=abcNode.@ ();
   abcAC.addItem(abc);
   }
  
  
  
   abcXMLList = null;
  
  }
  
  -TH
  
  
  --- In flexcoders@yahoogroups.com, gaurav1146 gaurav1146@ 
wrote:
  
   Hi,
   I am using a HTTPService which has resultFormat as e4x. I need 
to
   convert the XML obtained to an ArrayCollection containing 
 objects. I
   tried this:
  
   var ac:ArrayCollection = new ArrayCollection([(event.result.abc 
as
   XML).children()]);
  
   This gives me an array collection of XML objects. But, I need 
an 
 array
   collection of Objects. Is there any ways I could get that.
  
   Also, I cant use the resultFormat=object, as in my XML I have 
 two
   sets of Data. The first one needs an e4x format and for the 
 second one
   I need to get an ArrayCollection of Objects.
  
   Any help would be greatly appreciated.
  
   Regards,
   Gaurav
  
 





[flexcoders] Re: XML to Object

2008-05-23 Thread Tim Hoff
Unbeleivable; last try: 

abc.Name
=
abcNode
[EMAIL PROTECTED]
.toString();

-TH

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

 Ok, maybe with spaces:
 
 abc.Name = [EMAIL PROTECTED]();
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  Wow, don't know why the formatting messed up so much, but here's 
 the 
  rest of these lines:
  
  abc.Name=abcNode.@();
  abc.Category=abcNode.@();
  abc.Topic=abcNode.@();
  
  -TH
  
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
   
   Hi Gaurav,
   
   This is kind of a pain, but you can convert XML to an 
  ArrayCollection of
   Objects like this:
   
   public function result( event : Object ) : void
   {
public var abcAC : ArrayCollection = new ArrayCollection();
var abcXMLList : XMLList = XMLList(XML(event.result).abc);
   
for each(var abcNode:XML in abcXMLList)
{
var abc:Object = new Object();
abc.Name=abcNode.@();
abc.Category=abcNode.@
   mailto:abc.Category=abcNode.@ ();
abc.Topic=abcNode.@
   mailto:abc.Topic=abcNode.@ ();
abcAC.addItem(abc);
}
   
   
   
abcXMLList = null;
   
   }
   
   -TH
   
   
   --- In flexcoders@yahoogroups.com, gaurav1146 gaurav1146@ 
 wrote:
   
Hi,
I am using a HTTPService which has resultFormat as e4x. I 
need 
 to
convert the XML obtained to an ArrayCollection containing 
  objects. I
tried this:
   
var ac:ArrayCollection = new ArrayCollection
([(event.result.abc 
 as
XML).children()]);
   
This gives me an array collection of XML objects. But, I need 
 an 
  array
collection of Objects. Is there any ways I could get that.
   
Also, I cant use the resultFormat=object, as in my XML I 
have 
  two
sets of Data. The first one needs an e4x format and for the 
  second one
I need to get an ArrayCollection of Objects.
   
Any help would be greatly appreciated.
   
Regards,
Gaurav
   
  
 





RE: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS

2008-05-23 Thread Seth Hodgson
Hi Tim,

Yeah, it's the same issue. With proxied calls though, it's a bit more 
complicated to solve. In the remoting case, your remote object method is 
generally just doing some local computation on the server and maybe hitting a 
database. It's simple to wrap this up in a Runnable and execute it 
asynchronously. In the case of the proxy service, we use the Apache HttpClient 
library to make proxied calls on your behalf, and this would be _much_ harder 
for you to wrap up in a Runnable to execute concurrently.

I'd like to see us support async mode for the proxy service as well as for the 
remoting service, and the proxy service itself should be updated to use NIO to 
support making proxied calls that don't tie up a server thread for the duration 
of the proxy request. Right now, in BlazeDS, because Servlet IO is blocking, 
when you make a proxy service call that hits our server the servlet request 
handler thread has to wait for the proxy request to return before it can 
return. So you tie up the thread for the duration of the call which could take 
awhile. 

Would you mind logging an enhancement request for async proxy service support 
in our bugbase?

Thanks,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim 
Stewart
Sent: Thursday, May 22, 2008 9:56 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or 
LCDS

Hi Seth, could you say whether this is similar to the limitation in LiveCycle / 
Blaze proxy service, which causes multiple web service calls to be queued and 
executed in sequence rather than simultaneously - and whether there could be a 
similar approach to working around this?
 
I have an application that calls several web services at startup, and the 
sequential vs. simultaneous thing really slows it down.
 
Regards Tim


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of MyoT
Sent: Friday, 23 May 2008 11:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS
Hi Seth,

This is awesome information. I didn't know player batch them up and
send in one post. I learned something today. I digged through Blaze
source code and found out that BatchProcessFilter is responsible for
processing those messages . I am wondering is there any way, I can
write our own batch process filter and plug that in instead of default
one. What I am thinking is to process those messages in parallel on
server then response to the client in one response. Basically, it
would cut down the time server has to wait to finish processing all
those messages sequentially.

Any thoughts or insight info would be appreciated.

Thanks,
Jay

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

 There is a single thread that advances through SWF frames and runs your
 ActionScript code and event handlers, but network calls are performed by
 separate background threads concurrently.
 
 In order to have calls processed concurrently on the server, they need
 to arrive as separate requests. In the case of AMF, if you make a series
 of calls quickly chances are good/excellent that the Player will batch
 them up and send them to the server in the body of a single HTTP POST.
 When this happens, the server must unpack them and process them serially
 and then pack the results for all these calls back up in the body of a
 single HTTP response. Because we're dealing with a single request and
 response, there's no way to send back results for individual calls
 separately. When these results get back to the browser and are passed
 back into the Player, they are dispatched to your ActionScript handling
 code as asynchronous events. There's not a good way to force calls to be
 sent as separate requests, and even if you could, browsers impose limits
 on the number of concurrent connections they'll open to a server, so
 this really isn't the right way to solve your scenario. Also, in the
 case of RTMP all traffic between the client and server happens over a
 single connection and is ordered serially.
 
 
 
 If you want to process calls/messages/data asynchronously on the server
 the proper way, it requires a bit of work on your part to accomplish at
 this point. Rather than running your current logic in your RemoteObject
 directly when it is invoked, you need to break that out into a Runnable
 class, and when you're invoked, create an instance of this class that
 packages up the incoming args and info about the client making the call
 and then submit that for asynchronous execution to a
 java.util.concurrent.Executor that you'd need to set up during server
 startup. Your remoting method could return a job id or just void once it
 has queued an instance of your Runnable with the Executor. On the client
 when you get a ResultEvent for your call you don't get the actual result
 - you just know that your invocation was 

[flexcoders] Re: How to run a sample from docs

2008-05-23 Thread valdhor
The documentation on that page actually tells you:

To run the samples:

   1. Browse to the files found within the
installation_dir\frameworks\javascript\fabridge
   2. Place the src and samples folders side by side on any HTTP server.
   3. Open a web browser to
http://yourwebserver/samples/FABridgeSample.html and
samples/SimpleSample.html and follow the instructions there. Make sure
you access the samples through http:// URLs and not file:// URLs. The
Flash Player security sandbox prevents them from working correctly
when they are accessed as local files.



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

 How can I open and run in Flex the following sample:
 installation_dir\frameworks\javascript\fabridge 
 
 found at:
 http://livedocs.adobe.com/flex/3/html/help.html?
 content=ajaxbridge_2.html
 
 Thanks





Re: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS

2008-05-23 Thread Douglas Knudsen
Seth, where is this documented?   Been looking for info on if the player
batches calls up or not.  So it does, but only for AMF?

DK

On Thu, May 22, 2008 at 2:34 PM, Seth Hodgson [EMAIL PROTECTED] wrote:

There is a single thread that advances through SWF frames and runs your
 ActionScript code and event handlers, but network calls are performed by
 separate background threads concurrently.

 In order to have calls processed concurrently on the server, they need to
 arrive as separate requests. In the case of AMF, if you make a series of
 calls quickly chances are good/excellent that the Player will batch them up
 and send them to the server in the body of a single HTTP POST. When this
 happens, the server must unpack them and process them serially and then pack
 the results for all these calls back up in the body of a single HTTP
 response. Because we're dealing with a single request and response, there's
 no way to send back results for individual calls separately. When these
 results get back to the browser and are passed back into the Player, they
 are dispatched to your ActionScript handling code as asynchronous events.
 There's not a good way to force calls to be sent as separate requests, and
 even if you could, browsers impose limits on the number of concurrent
 connections they'll open to a server, so this really isn't the right way to
 solve your scenario. Also, in the case of RTMP all traffic between the
 client and server happens over a single connection and is ordered serially.



 If you want to process calls/messages/data asynchronously on the server the
 proper way, it requires a bit of work on your part to accomplish at this
 point. Rather than running your current logic in your RemoteObject directly
 when it is invoked, you need to break that out into a Runnable class, and
 when you're invoked, create an instance of this class that packages up the
 incoming args and info about the client making the call and then submit that
 for asynchronous execution to a java.util.concurrent.Executor that you'd
 need to set up during server startup. Your remoting method could return a
 job id or just void once it has queued an instance of your Runnable with the
 Executor. On the client when you get a ResultEvent for your call you don't
 get the actual result – you just know that your invocation was successfully
 queued for asynchronous execution on the server. So the second half of the
 equation is how to get the result or fault generated when the Executor runs
 your Runnable back to the client. You need to take advantage of messaging in
 BlazeDS or LCDS to achieve this. In your client app, create a Consumer and
 subscribe to a destination you define that you can publish results/faults as
 AsyncMessages back to target clients from your Runnable. Your Consumer
 should subscribe to a subtopic that applies only to it, or use a selector
 expression. When your Runnable runs and generates the result or fault to
 return, you'd can create an AsyncMessage containing the result of fault info
 and publish it to this destination, using either a subtopic header, or some
 other message header that will be evaluated against the Consumer's selector
 expression such that the message is routed to the proper Consumer. That lets
 you return async results or faults to clients in a truly asynchronous
 manner.



 This is actually something I'd like to see us bake into the product
 directly. Would one of you on the thread log an enhancement request here and
 the rest of you vote for it: https://bugs.adobe.com/blazeds/

 No promises because resourcing is always a juggle but lots of people ask
 for this, I'd like to see it happen, and your votes matter J



 Seth



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *MyoT
 *Sent:* Thursday, May 22, 2008 10:49 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS
 or LCDS



 If Flex (Flash) uses async request, does Single Threaded matter?

 I tried to have more than one channel, it doesn't help either.

 - Jay

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 twcrone70 [EMAIL PROTECTED] wrote:
 
  Your server code might be able to run things concurrently but unless I
  misread something, Flash is currently single threaded I believe. So
  actually sending the requests at the 'same time' is difficult if even
  possible.
 
  - Todd
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, MyoT
 bighead007us@ wrote:
  
   Hi There,
  
   I am wondering is there any way, you can make concurrent requests to
  one destination via
   RemoteObject over AMF.
  
   Basically, I want to issue multiple request of getItem operations to
  one destination. Currently,
   my command is making multiple async requests but RemoteObject
  doesn't seem to be calling
   server concurrently. Server got those request in sequential.
  
   Any help or pointer would help.
  
   Thanks in 

[flexcoders] Re: How to run a sample from docs

2008-05-23 Thread markgoldin_2000
Well, yes, but I want to get it open/run inside of Flex Builder so I 
can learn how it works.

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

 The documentation on that page actually tells you:
 
 To run the samples:
 
1. Browse to the files found within the
 installation_dir\frameworks\javascript\fabridge
2. Place the src and samples folders side by side on any HTTP 
server.
3. Open a web browser to
 http://yourwebserver/samples/FABridgeSample.html and
 samples/SimpleSample.html and follow the instructions there. Make 
sure
 you access the samples through http:// URLs and not file:// URLs. 
The
 Flash Player security sandbox prevents them from working correctly
 when they are accessed as local files.
 
 
 
 --- In flexcoders@yahoogroups.com, markgoldin_2000
 markgoldin_2000@ wrote:
 
  How can I open and run in Flex the following sample:
  installation_dir\frameworks\javascript\fabridge 
  
  found at:
  http://livedocs.adobe.com/flex/3/html/help.html?
  content=ajaxbridge_2.html
  
  Thanks
 





RE: [flexcoders] Question regarding DataGrid

2008-05-23 Thread Tracy Spratt
Should be data.fn;

 

Note, you must set this for every case, ie, always set the visibility on
data change.  Renderers are recycled and will not keep any state.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kenny
Sent: Friday, May 23, 2008 11:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question regarding DataGrid

 

Hello.

In the following code, I would like to be able to reference the data
field called fn from within the item renderer for the last column,
which contains the RollOverButton.

Can someone tell me how I can do this?

What I want to do is have the button be visible in some cases, but not
others.

Thanks!

Kenny

CODE BELOW
==

mx:DataGrid id=dgMediaHistory 
x=27
y=59
width=380
height=339
dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
resizableColumns=false
allowMultipleSelection=false
allowDragSelection=false
draggableColumns=false
change=historyChangeHandler()
mx:columns
mx:DataGridColumn headerText=Msg dataField=fn width=85/
mx:DataGridColumn headerText=Date dataField=whenplayed
width=140/
mx:DataGridColumn headerText= width=30
mx:itemRenderer
mx:Component
comp:RollOverButton width=20 height=20 
upImage={outerDocument.playImageUp} 
overImage={outerDocument.playImageOver} 
downImage={outerDocument.playImageDown} 
click=outerDocument.playMedia()/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid

 



[flexcoders] Re: AIR Relative URL Requests

2008-05-23 Thread Robert Stehwien
Sorry about the sending without the complete question.  The cat jumped on
the keyboard and managed to hit the gmail code to send the mail.

Anyway the question is this: Can I set the base URL for an AIR app so all
relative requests for an HTTPService, Image, Movie, etc go to the given
location?

On Fri, May 23, 2008 at 9:50 AM, Robert Stehwien [EMAIL PROTECTED]
wrote:

 I had a web based Flex app and I've extracted common code to use in an AIR
 app.  The Web application makes HTTPService and source=XXX requests using
 relative paths to the web application like this:
 mx:HTTPService id=imagesXML
 showBusyCursor=true
 url=config/images.xml
 resultFormat=e4x
 result=onImagesLoaded(event)
 fault=onLoadFault(event, imagesXML.url)/

 mx:Image source=images/thumbnail.png
 height=46 width=46 scaleContent=true
 horizontalAlign=center
 verticalAlign=middle/




Re: [flexcoders] Importing SWC Files in FLEX

2008-05-23 Thread anuj sharma
Hi Guys
I am just wondering if I am doing something wrong here. Iam a new member of
this list  and to the world of Flex and in the past i posted lots of
requests for helping me out but i did not get any reply at all. I am also
the member of Flash Coders list. I am just wondering if this list is
receiving my e-mails or not.
I would appreciate if someone will reply me, at least as a confirmation that
Flex coders are receiving my e-mails.
Thanks a lot for understanding this. i appreciate that.
Anuj

On Thu, May 22, 2008 at 2:53 PM, anuj181 [EMAIL PROTECTED] wrote:

   Hi
 Does anyone know how to import SWC file created in CS3 into Flex
 Project. I googled it and found lot of samples but in my case whenever
 i gave Library path, the swc file is not showing in my project' lib
 directory and when i manually move swc file it shows unknown icon on
 the file. Does anyone has any idea what's going on.
 Please help me out. All i need is to create few symobls/movies in CS3
 and want to use them in my Flex Project
 Thanks
 Anuj

  



[flexcoders] Tree node height problem on initial load

2008-05-23 Thread burttram
I have a component I'm developing to, among other things, accept an
XMLListCollection as a dataProvider (the data is being supplied via a
remote object call, which is why I've elected to extend a component to
handle the reopening /dragdrop, etc).

Best I can tell I've got working great, vice one issue that I just can't
seem to resolve.  Essentially, the first time the component loads it
shows the nodes in the tree at an apparently random height that is
significantly taller than what my normal tree node height should be. 
It would appear that the nodes are being spaced evenly across an
arbitrary height of the tree which is greater in height than the 100%
I've specified for the tree to take up inside it's container.

I've included a screenshot of the behavior here, the left-hand image is
the initial, jacked up state, and the right-hand image is the very same
component instance after the contents are loaded the second time:

http://www.2b-studios.com/xmlTreeView_Problem.png
http://www.2b-studios.com/xmlTreeView_Problem.png

Any help you guys might be able to provide would be so very much
appreciated, I've been beating my head against the wall on this for
hours now.

Thanks in advance,
Brian



RE: [flexcoders] Populating Datagrid from Database

2008-05-23 Thread Tracy Spratt
Here is a simple example.  It actually uses a Timer to poll the
HTTPService, but you can ignore that part.

http://www.cflex.net/showFileDetails.cfm?ObjectID=560

 

Also note that if your data is deeply nested in the xml nodes, you may
need to use labelFunction to display it.  There is an example of  using
labelFunction with XML on the same site above.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Fidel Viegas
Sent: Friday, May 23, 2008 2:32 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Populating Datagrid from Database

 

On Fri, May 23, 2008 at 1:20 AM, kenny14390 [EMAIL PROTECTED]
mailto:kenny14390%40yahoo.com  wrote:

 I am calling a PHP page, which reads my entire database and formats it
 to output as valid XML. How can I set this as the data provider for a
 Datagrid component? I know what the columns are, but not the number of
 rows nor the data (obviously).


Hi Kenny,

Have a look at the HTTPService component.

Fidel.

 



RE: [flexcoders] DataGrid placement

2008-05-23 Thread Tracy Spratt
DataGrid.editedItemPosition

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David C. Moody
Sent: Friday, May 23, 2008 11:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid placement

 

Is there a particular way to place a user in a certain cell?

Like I have a check one one row, and if that check comes back invalid,
I want to place the user back in that cell. If its valid I want the
user to go to the next cell.

A setFocus for a dataProvider is what I'm looking for I guess.

Thanks,
-David

 



[flexcoders] Re: Question regarding DataGrid

2008-05-23 Thread Kenny
Oh! Now see, I knew it would be something simple. :o)

Ok, so that helped me with another problem I was having elsewhere too,
so double thanks for that one!

I have read about the render handlers not keeping state, but I'm not
sure how to handle this situation. How can I set it for each case, as
you've instructed? I'm sure I've seen it somewhere before, but
honestly, it's quicker for me to ask here than to go look around the
web for it. ;o)

Thanks again!

Kenny

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

 Should be data.fn;
 
  
 
 Note, you must set this for every case, ie, always set the visibility on
 data change.  Renderers are recycled and will not keep any state.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Kenny
 Sent: Friday, May 23, 2008 11:24 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Question regarding DataGrid
 
  
 
 Hello.
 
 In the following code, I would like to be able to reference the data
 field called fn from within the item renderer for the last column,
 which contains the RollOverButton.
 
 Can someone tell me how I can do this?
 
 What I want to do is have the button be visible in some cases, but not
 others.
 
 Thanks!
 
 Kenny
 
 CODE BELOW
 ==
 
 mx:DataGrid id=dgMediaHistory 
 x=27
 y=59
 width=380
 height=339
 dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
 resizableColumns=false
 allowMultipleSelection=false
 allowDragSelection=false
 draggableColumns=false
 change=historyChangeHandler()
 mx:columns
 mx:DataGridColumn headerText=Msg dataField=fn width=85/
 mx:DataGridColumn headerText=Date dataField=whenplayed
 width=140/
 mx:DataGridColumn headerText= width=30
 mx:itemRenderer
 mx:Component
 comp:RollOverButton width=20 height=20 
 upImage={outerDocument.playImageUp} 
 overImage={outerDocument.playImageOver} 
 downImage={outerDocument.playImageDown} 
 click=outerDocument.playMedia()/
 /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid





[flexcoders] Re: Question regarding DataGrid

2008-05-23 Thread Kenny
I'm guessing it will involve the dataChange  event?

Kenny

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

 Oh! Now see, I knew it would be something simple. :o)
 
 Ok, so that helped me with another problem I was having elsewhere too,
 so double thanks for that one!
 
 I have read about the render handlers not keeping state, but I'm not
 sure how to handle this situation. How can I set it for each case, as
 you've instructed? I'm sure I've seen it somewhere before, but
 honestly, it's quicker for me to ask here than to go look around the
 web for it. ;o)
 
 Thanks again!
 
 Kenny
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Should be data.fn;
  
   
  
  Note, you must set this for every case, ie, always set the
visibility on
  data change.  Renderers are recycled and will not keep any state.
  
   
  
  Tracy
  
   
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of Kenny
  Sent: Friday, May 23, 2008 11:24 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Question regarding DataGrid
  
   
  
  Hello.
  
  In the following code, I would like to be able to reference the data
  field called fn from within the item renderer for the last column,
  which contains the RollOverButton.
  
  Can someone tell me how I can do this?
  
  What I want to do is have the button be visible in some cases, but not
  others.
  
  Thanks!
  
  Kenny
  
  CODE BELOW
  ==
  
  mx:DataGrid id=dgMediaHistory 
  x=27
  y=59
  width=380
  height=339
  dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
  resizableColumns=false
  allowMultipleSelection=false
  allowDragSelection=false
  draggableColumns=false
  change=historyChangeHandler()
  mx:columns
  mx:DataGridColumn headerText=Msg dataField=fn width=85/
  mx:DataGridColumn headerText=Date dataField=whenplayed
  width=140/
  mx:DataGridColumn headerText= width=30
  mx:itemRenderer
  mx:Component
  comp:RollOverButton width=20 height=20 
  upImage={outerDocument.playImageUp} 
  overImage={outerDocument.playImageOver} 
  downImage={outerDocument.playImageDown} 
  click=outerDocument.playMedia()/
  /mx:Component
  /mx:itemRenderer
  /mx:DataGridColumn
  /mx:columns
  /mx:DataGrid
 





RE: [flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS

2008-05-23 Thread Seth Hodgson
Right, only for AMF, and I'm not aware of any documentation on that. If
there was, it would be regarding NetConnection.call(...).

 

URLLoader doesn't do any batching - it just hands off HTTP requests to
the browser to send. But when using URLLoader, you need to be aware that
browsers impose connection limits to a single domain (a recommendation
in the HTTP 1.1 spec) so even there you end up in a pseudo-serial
situation with no direct control over whether requests will be sent
serially or concurrently. You can use CNAME hacks to circumvent this
(ie. Yahoo/Google maps downloading map tiles), but that's quite a bit
more complex to configure and deploy and your app needs to be hardcoded
to know about all your CNAMEs and to know when to use which for what
calls.

 

Our HTTPChannel, which uses URLLoader internally, serializes the
requests it sends to sync up with the behavior of the AMFChannel and
RTMPChannel and try to ensure that requests from the client to the
server have a consistent, expected order (very important for Data
Management).

 

Seth

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Douglas Knudsen
Sent: Friday, May 23, 2008 10:05 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Async Concurrent Requests with AMF for
BlazeDS or LCDS

 

Seth, where is this documented?   Been looking for info on if the player
batches calls up or not.  So it does, but only for AMF?

DK 

On Thu, May 22, 2008 at 2:34 PM, Seth Hodgson [EMAIL PROTECTED]
wrote:

There is a single thread that advances through SWF frames and runs your
ActionScript code and event handlers, but network calls are performed by
separate background threads concurrently.

In order to have calls processed concurrently on the server, they need
to arrive as separate requests. In the case of AMF, if you make a series
of calls quickly chances are good/excellent that the Player will batch
them up and send them to the server in the body of a single HTTP POST.
When this happens, the server must unpack them and process them serially
and then pack the results for all these calls back up in the body of a
single HTTP response. Because we're dealing with a single request and
response, there's no way to send back results for individual calls
separately. When these results get back to the browser and are passed
back into the Player, they are dispatched to your ActionScript handling
code as asynchronous events. There's not a good way to force calls to be
sent as separate requests, and even if you could, browsers impose limits
on the number of concurrent connections they'll open to a server, so
this really isn't the right way to solve your scenario. Also, in the
case of RTMP all traffic between the client and server happens over a
single connection and is ordered serially.

 

If you want to process calls/messages/data asynchronously on the server
the proper way, it requires a bit of work on your part to accomplish at
this point. Rather than running your current logic in your RemoteObject
directly when it is invoked, you need to break that out into a Runnable
class, and when you're invoked, create an instance of this class that
packages up the incoming args and info about the client making the call
and then submit that for asynchronous execution to a
java.util.concurrent.Executor that you'd need to set up during server
startup. Your remoting method could return a job id or just void once it
has queued an instance of your Runnable with the Executor. On the client
when you get a ResultEvent for your call you don't get the actual result
- you just know that your invocation was successfully queued for
asynchronous execution on the server. So the second half of the equation
is how to get the result or fault generated when the Executor runs your
Runnable back to the client. You need to take advantage of messaging in
BlazeDS or LCDS to achieve this. In your client app, create a Consumer
and subscribe to a destination you define that you can publish
results/faults as AsyncMessages back to target clients from your
Runnable. Your Consumer should subscribe to a subtopic that applies only
to it, or use a selector expression. When your Runnable runs and
generates the result or fault to return, you'd can create an
AsyncMessage containing the result of fault info and publish it to this
destination, using either a subtopic header, or some other message
header that will be evaluated against the Consumer's selector expression
such that the message is routed to the proper Consumer. That lets you
return async results or faults to clients in a truly asynchronous
manner.

 

This is actually something I'd like to see us bake into the product
directly. Would one of you on the thread log an enhancement request here
and the rest of you vote for it: https://bugs.adobe.com/blazeds/

No promises because resourcing is always a juggle but lots of people ask
for this, I'd like to see it happen, and your votes matter J

 

Seth

 

From: 

[flexcoders] Re: How to run a sample from docs

2008-05-23 Thread valdhor
If you have a look in the fabridge/samples/srcview directory you will
find app.mxml and EmptySwf.as. These work with the HTML files as well
as the Javascript file.


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

 Well, yes, but I want to get it open/run inside of Flex Builder so I 
 can learn how it works.
 
 --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
 
  The documentation on that page actually tells you:
  
  To run the samples:
  
 1. Browse to the files found within the
  installation_dir\frameworks\javascript\fabridge
 2. Place the src and samples folders side by side on any HTTP 
 server.
 3. Open a web browser to
  http://yourwebserver/samples/FABridgeSample.html and
  samples/SimpleSample.html and follow the instructions there. Make 
 sure
  you access the samples through http:// URLs and not file:// URLs. 
 The
  Flash Player security sandbox prevents them from working correctly
  when they are accessed as local files.
  
  
  
  --- In flexcoders@yahoogroups.com, markgoldin_2000
  markgoldin_2000@ wrote:
  
   How can I open and run in Flex the following sample:
   installation_dir\frameworks\javascript\fabridge 
   
   found at:
   http://livedocs.adobe.com/flex/3/html/help.html?
   content=ajaxbridge_2.html
   
   Thanks
  
 





[flexcoders] Issue with PopupButton in full screen

2008-05-23 Thread sudha_bsb
Hi,

I have an issue with popup button in full screen. I have a
horizontalList in the popup window of the popup button. In Normal
Screen mode the popup window comes up. But in Full Screen mode, the
popup window doesn't turnup. Once u came from full screen mode to
normal mode..even then the popup window doesn't show up.

I am using stage.fullScreenWidth and stage.fullScreenHeight for
changing the bounds of my application.( basically a flv player).

But when I use stage.width and stage.height for changing the bounds,
everything works fine. The popup window shows when u click on the
popup button.

I just want to know the difference between stage.width, stage.height
and stage.fullScreenWidth and stage.fullScreenHeight...and why is it
not able to show popup window when I use fullScreenWidth,
fullScreenHeight.

Please help...

The player is at...

http://tekkies.premapix.com/rambabu/flvplayer/MyVideoPlayer.html

Thanks,
Sudha.



[flexcoders] Re: Question regarding DataGrid

2008-05-23 Thread Kenny
I figured it out!! 

Thanks again for the help. :o)

Kenny


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

 Oh! Now see, I knew it would be something simple. :o)
 
 Ok, so that helped me with another problem I was having elsewhere too,
 so double thanks for that one!
 
 I have read about the render handlers not keeping state, but I'm not
 sure how to handle this situation. How can I set it for each case, as
 you've instructed? I'm sure I've seen it somewhere before, but
 honestly, it's quicker for me to ask here than to go look around the
 web for it. ;o)
 
 Thanks again!
 
 Kenny
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Should be data.fn;
  
   
  
  Note, you must set this for every case, ie, always set the
visibility on
  data change.  Renderers are recycled and will not keep any state.
  
   
  
  Tracy
  
   
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of Kenny
  Sent: Friday, May 23, 2008 11:24 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Question regarding DataGrid
  
   
  
  Hello.
  
  In the following code, I would like to be able to reference the data
  field called fn from within the item renderer for the last column,
  which contains the RollOverButton.
  
  Can someone tell me how I can do this?
  
  What I want to do is have the button be visible in some cases, but not
  others.
  
  Thanks!
  
  Kenny
  
  CODE BELOW
  ==
  
  mx:DataGrid id=dgMediaHistory 
  x=27
  y=59
  width=380
  height=339
  dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
  resizableColumns=false
  allowMultipleSelection=false
  allowDragSelection=false
  draggableColumns=false
  change=historyChangeHandler()
  mx:columns
  mx:DataGridColumn headerText=Msg dataField=fn width=85/
  mx:DataGridColumn headerText=Date dataField=whenplayed
  width=140/
  mx:DataGridColumn headerText= width=30
  mx:itemRenderer
  mx:Component
  comp:RollOverButton width=20 height=20 
  upImage={outerDocument.playImageUp} 
  overImage={outerDocument.playImageOver} 
  downImage={outerDocument.playImageDown} 
  click=outerDocument.playMedia()/
  /mx:Component
  /mx:itemRenderer
  /mx:DataGridColumn
  /mx:columns
  /mx:DataGrid
 





[flexcoders] Re: How to run a sample from docs

2008-05-23 Thread markgoldin_2000
I have created a project within this location, tried to run it but 
was getting an error at this line:
fab:FABridge xmlns:fab=bridge.* /

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

 If you have a look in the fabridge/samples/srcview directory you 
will
 find app.mxml and EmptySwf.as. These work with the HTML files as 
well
 as the Javascript file.
 
 
 --- In flexcoders@yahoogroups.com, markgoldin_2000
 markgoldin_2000@ wrote:
 
  Well, yes, but I want to get it open/run inside of Flex Builder 
so I 
  can learn how it works.
  
  --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
  
   The documentation on that page actually tells you:
   
   To run the samples:
   
  1. Browse to the files found within the
   installation_dir\frameworks\javascript\fabridge
  2. Place the src and samples folders side by side on any 
HTTP 
  server.
  3. Open a web browser to
   http://yourwebserver/samples/FABridgeSample.html and
   samples/SimpleSample.html and follow the instructions there. 
Make 
  sure
   you access the samples through http:// URLs and not file:// 
URLs. 
  The
   Flash Player security sandbox prevents them from working 
correctly
   when they are accessed as local files.
   
   
   
   --- In flexcoders@yahoogroups.com, markgoldin_2000
   markgoldin_2000@ wrote:
   
How can I open and run in Flex the following sample:
installation_dir\frameworks\javascript\fabridge 

found at:
http://livedocs.adobe.com/flex/3/html/help.html?
content=ajaxbridge_2.html

Thanks
   
  
 





[flexcoders] Re: Question regarding DataGrid

2008-05-23 Thread Tim Hoff

Hi Kenny,

Just for a little more background info that others may find beneficial. 
You can think of the data object as a single record (or row) in the
DataGrid's dataProvider (dataset).  Every column's itemRenderer in a
DataGrid has access to all of the fields in the record (data object);
regardless of the dataField that is set.  However, since itemRenderers
are recycled, you have to perform any conditional logic in the
itemRenderer's set data function.  This ensures that when the data is
changed, that the itemRenderer will be refreshed with the appropriate
state.  Inside the RollOverButton itemRenderer, you'll have to override
the set data method in script:

override public function set data(value:Object):void
{
 super.data = value;



 if (data != null)
 {
this.visible = (data.fn == showMe ? true : false);
 }

super.invalidateDisplayList();

}

Hope that this helps.

Cheers,
-TH

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

 I figured it out!!

 Thanks again for the help. :o)

 Kenny


 --- In flexcoders@yahoogroups.com, Kenny kennysphone@ wrote:
 
  Oh! Now see, I knew it would be something simple. :o)
 
  Ok, so that helped me with another problem I was having elsewhere
too,
  so double thanks for that one!
 
  I have read about the render handlers not keeping state, but I'm not
  sure how to handle this situation. How can I set it for each case,
as
  you've instructed? I'm sure I've seen it somewhere before, but
  honestly, it's quicker for me to ask here than to go look around the
  web for it. ;o)
 
  Thanks again!
 
  Kenny
 
  --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
  
   Should be data.fn;
  
  
  
   Note, you must set this for every case, ie, always set the
 visibility on
   data change. Renderers are recycled and will not keep any state.
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of Kenny
   Sent: Friday, May 23, 2008 11:24 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Question regarding DataGrid
  
  
  
   Hello.
  
   In the following code, I would like to be able to reference the
data
   field called fn from within the item renderer for the last
column,
   which contains the RollOverButton.
  
   Can someone tell me how I can do this?
  
   What I want to do is have the button be visible in some cases, but
not
   others.
  
   Thanks!
  
   Kenny
  
   CODE BELOW
   ==
  
   mx:DataGrid id=dgMediaHistory
   x=27
   y=59
   width=380
   height=339
  
dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
   resizableColumns=false
   allowMultipleSelection=false
   allowDragSelection=false
   draggableColumns=false
   change=historyChangeHandler()
   mx:columns
   mx:DataGridColumn headerText=Msg dataField=fn width=85/
   mx:DataGridColumn headerText=Date dataField=whenplayed
   width=140/
   mx:DataGridColumn headerText= width=30
   mx:itemRenderer
   mx:Component
   comp:RollOverButton width=20 height=20
   upImage={outerDocument.playImageUp}
   overImage={outerDocument.playImageOver}
   downImage={outerDocument.playImageDown}
   click=outerDocument.playMedia()/
   /mx:Component
   /mx:itemRenderer
   /mx:DataGridColumn
   /mx:columns
   /mx:DataGrid
  
 





[flexcoders] Automation libraries kill my app

2008-05-23 Thread Geoffrey
I'm trying to use FunFX(http://funfx.rubyforge.org/) to do some
automated testing of our GUI.  I noticed that after I add the
automation libraries to the compiler options of my main project, I can
no longer interact with various parts of the UI using the mouse.  This
includes textinput, textarea, buttons, numericstepper, etc.

I can tab to these controls, but I can not click on them to bring
focus to it.  Very odd.

I've added the libraries in the main project's Additional Compiler
Arguments property under Flex Compiler like so:
-include-libraries C:\flex-sdk\frameworks\libs\automation.swc
C:\flex-sdk\frameworks\libs\automation_agent.swc

Any thought?

 Geoff



[flexcoders] CSS inheritance?

2008-05-23 Thread Dennis Falling
I'm trying to find a cleaner way of doing css.  Right now I have a common
border style used frequently throughout my app, and a couple common
container styles (background, padding, width, etc.).  I'd like a way to have
the different container styles reference the border style, instead of
duplicating those values.  Does anyone know if there's a good way to do this
in flex's limited css?  Right now I'm just trying to find the least common
denominators and split those out to separate classes.

Thanks!


RE: [flexcoders] Application crash due to Channel disconnected

2008-05-23 Thread Seth Hodgson
Hi,

What version of Data Services are you using and what Linux distro? I'd suggest 
turning on server-side logging in services-config.xml, with at least the 
Endpoint.RTMP and Protocol.RTMP categories enabled. The RTMP connection between 
the client and server is closing while the client has an outstanding call in 
progress (hence the 'DeliveryInDoubt').

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tuncay 
A.
Sent: Friday, May 23, 2008 12:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Application crash due to Channel disconnected


Hi,

I hope some of you guys can help me.

I made my first company Flex application integrated into a webapplication
using Java Dataservice to communicate to backend.

On Windows machine it works properly. When deploying into a Linux machine it
crashes almost all time when the application either is launched or refreshed
in a browser (IE/Firefox). Using Adobe flex SDK 3.+ , DataService, Flash 9+
on client it doesn't help. 

The exception I get is:
---
[RPC Fault faultString=Channel disconnected
faultCode=Client.Error.DeliveryInDoubt faultDetail=Channel disconnected
before an acknowledgement was received]
at
mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
at DataListRequestResponder/fault()
at mx.rpc::AsyncRequest/fault()
at NetConnectionMessageResponder/channelDisconnectHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/disconnectSuccess()
at mx.messaging.channels::NetConnectionChannel/internalDisconnect()
at mx.messaging.channels::RTMPChannel/internalDisconnect()
at mx.messaging.channels::RTMPChannel/statusHandler()

I'm stuck and hope some can help.

-tuncay
-- 
View this message in context: 
http://www.nabble.com/Application-crash-due-to-Channel-disconnected-tp17316630p17316630.html
Sent from the FlexCoders mailing list archive at Nabble.com.
 


[flexcoders] question for cairngorm with .net webservice?

2008-05-23 Thread markflex2007
Hi,

I have a question how to pass VO(valuse object) from Flex to .net web 
service. I also need pass object back to flex with .net web service.

I am using framework now. Do you know where I can find a Demo how to do 
this things.

I do not have idea about the data match between .net and Flex.

Thanks a lot for your help.


Mark



[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
and but when I create an aspx page I get an error with the code
below... I don't use code behind and put it on one page and try to
access the page itself.  Do I need to access the page some other way
or modify code?  the RSS is an example feed, my RSS feeds will need a
variable ie... http://finance.yahoo.com/rss/headline?s=MSFT (the
ticker symbol will be the variable).

I am trying to access the feeds through Flex SWF.

Any suggestions?

The remote server returned an error: (404) Not Found.

Here is code

Craig


%@ Page Language=C# %
%@ Import Namespace=System.Xml %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

script runat=server
void page_load(Object sender, EventArgs e)
{
string strOutput;

XmlDocument myXml = new XmlDocument();
myXml.Load(http://www.weather.gov/alerts/ak.rss;);

strOutput = myXml.OuterXml;

Response.ContentType = text/xml;
Response.Write(strOutput);
} 
/script






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

 An of course you can generalize this by passing an url to the aspx page
 from flex:
 
 var oRequest:Object = {url= www.whatever.com/example.xml};
 
 myHTTPRequest.send(oRequest);
 
  
 
 then in the aspx doing:
 
 myXml.Load(Request(url));
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of n0ctule
 Sent: Friday, August 03, 2007 9:11 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
  
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Nick Durnell nick@ wrote:
 
  Hi all,
  
  I've read here that in order to access RSS data in my Flex application
 
  (from sites with no crossdomain policy files) I will need to proxy the
 
  RSS data on the server which hosts the Flex application.
  
  I have seen links to PHP proxy scripts but does anyone have an ASP.NET
 
  equivalent?
  
  Thanks,
  
  Nick.
 
 
 Hi Nick
 
 Try this:
 
 %@ Page Language=C# Debug=true %
 %@ Import Namespace=System.Xml %
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(www.whatever.com/example.xml);
 
 strOutput = myXml.OuterXml;
 
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script





[flexcoders] Re: Importing SWC Files in FLEX

2008-05-23 Thread Danny Venier
Hi Anuj,

 

 

You can try  Import/FlexBuilder/Artwork and point to a swf or swc? 

 

Or..you can add a swc to your project by adding the swc to your project
properties build path. (use project/properties/FlexBuild Path and open the
Library path tab, then add swc.)

 

Not sure what environment you have set up or exactly what you're doing, or
trying to do, but try that, or review the docs again.

 

--Danny



[flexcoders] Help me understand how to manipulate dataProviders

2008-05-23 Thread bredwards358
After doing some research which consisted mainly of searching through
this forum, I noticed a mantra along the lines of manipulate the
dataProvider, not the controls it populates. It makes sense,
especially since without directly manipulating the primary key of the
very first entry in a database , it will read as 1, while the first
index of a dataGrid will read as 0. Right now, I have a mostly
finished AIR form which serves as a way of maintaining a product
table. The dataGrid's provider is an array collection built from the
results of a select statement. To get to the point I'd like some
assistance in streamlining some things to not onlt help this form, but
others in the application which will use the same data access
functionality. For starters, here's how I update data:
Assume that the first primary key in the very first entry of the
database has been edited to read as 0 after it was entered so it syncs
up with the dataGrid.selectedIndex property.

//Begins the proceedure to edit a currently existing item when the
edit button is clicked
public function newEdit():void
{
chosenMode = Edit;
currentState = Edit Item;
editColumn.visible = false;
deleteColumn.visible = false;
duplicateColumn.visible = false;
this.lblUniqueID.visible = false;
this.rbAll.visible = false;
this.rbBillable.visible = false;
this.rbNonBillable.visible = false;
try
{
var selectedItemIndex:int = adgProducts.selectedIndex;
//Uses another select statement to get the needed information and
passes the results into
//variables which populates the controls instead of an arrayCollection
dataManager.selectProdDataForEdit(selectedItemIndex);
this.lblUniqueID.text = model.editVarOne;
this.txtNewProductID.text = model.editVarTwo;
this.txtNewProductName.text = model.editVarThree;
this.txtNewBarcode.text = model.editVarFour;
this.txtNewUnit.text = model.editVarFive;
this.txtNewQuantity.text = model.editVarSix;
this.txtNewVendor.text = model.editVarSeven;
this.txtNewCost.text = model.editVarEight;
this.txtNewList.text = model.editVarNine;
this.chkNewBillable.selected = model.editVarBool;
this.lblCurrentStatus.text = Currently  + model.editVarEleven;
}
catch(ex:Error)
{
trace(ex.toString());
trace(ex.getStackTrace());
}
}
private function saveItem(mode:String):void//Differentiates between
whether you want to insert a new item or edit an existing one
{
switch(mode)
{
case Add_New: insertNew();
break;
case Edit: editItem();
break;
default: Alert.show(Cannot Determine State,State Unknown)
break;
}
}
//Actually edits an existing item when the save button is clicked
private function editItem():void
{//Takes the information from the controls and sets them equal to
global variables of the same type which
//are then passed into the function which performs the update
model.insertStringOne = this.txtNewProductID.text;
model.insertStringTwo = this.txtNewProductName.text;
model.insertStringThree = this.txtNewBarcode.text;
model.insertStringFour = this.txtNewVendor.text;
model.insertIntOne = parseInt(this.txtNewUnit.text);
model.insertIntTwo = parseInt(this.txtNewQuantity.text);
model.insertNumberOne = Number(this.txtNewCost.text);
model.insertNumberTwo = Number(this.txtNewList.text);
model.insertStringFive = this.cmbNewClass.selectedItem.toString();
model.insertBooleanOne = this.chkNewBillable.selected;
model.insertStringSix = this.cmbStatus.selectedLabel.toString();
model.insertIntThree = parseInt(this.lblUniqueID.text);

dataManager.updateProduct(model.insertStringOne,
model.insertStringTwo, model.insertStringThree, model.insertIntOne,
model.insertIntTwo, model.insertStringFour, model.insertNumberOne,
model.insertNumberTwo, model.insertStringFive,
model.insertBooleanOne, model.insertStringSix, model.insertNewDate,
model.insertIntThree);

cancelOperation();
//Refreshes the datagrid
refreshGrid();
}

What I want is to see if there's an easier way to do this via
accessing the ArrayCollection model.prodMaintData to get the values to
edit as opposed to going through another select statement as well as
some other things that might help. I don't totally understand the
functions associated with the ArrayCollection or at least what needs
to be passed into them to get what I need. Thanks in advance.

Brian Ross Edwards
Tech-Connect LLC



[flexcoders] Re: Question regarding DataGrid

2008-05-23 Thread Kenny
Thanks Tim. That's the code I'd seen before. (but was too lazy to go
look for g)

Here's how I accomplished it. A bit different, but it works. Any
comments on this would be appreciated.

Kenny

CODE
==

public function init():void { 
addEventListener(dataChange, handleDataChanged);
} 

private function handleDataChanged(event:Event):void
{
if (data.fn == 'Live')
{
theButton.visible = false;  
}
else
{
theButton.visible = true;
}
}






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

 
 Hi Kenny,
 
 Just for a little more background info that others may find beneficial. 
 You can think of the data object as a single record (or row) in the
 DataGrid's dataProvider (dataset).  Every column's itemRenderer in a
 DataGrid has access to all of the fields in the record (data object);
 regardless of the dataField that is set.  However, since itemRenderers
 are recycled, you have to perform any conditional logic in the
 itemRenderer's set data function.  This ensures that when the data is
 changed, that the itemRenderer will be refreshed with the appropriate
 state.  Inside the RollOverButton itemRenderer, you'll have to override
 the set data method in script:
 
 override public function set data(value:Object):void
 {
  super.data = value;
 
 
 
  if (data != null)
  {
 this.visible = (data.fn == showMe ? true : false);
  }
 
 super.invalidateDisplayList();
 
 }
 
 Hope that this helps.
 
 Cheers,
 -TH
 
 --- In flexcoders@yahoogroups.com, Kenny kennysphone@ wrote:
 
  I figured it out!!
 
  Thanks again for the help. :o)
 
  Kenny
 
 
  --- In flexcoders@yahoogroups.com, Kenny kennysphone@ wrote:
  
   Oh! Now see, I knew it would be something simple. :o)
  
   Ok, so that helped me with another problem I was having elsewhere
 too,
   so double thanks for that one!
  
   I have read about the render handlers not keeping state, but I'm not
   sure how to handle this situation. How can I set it for each case,
 as
   you've instructed? I'm sure I've seen it somewhere before, but
   honestly, it's quicker for me to ask here than to go look around the
   web for it. ;o)
  
   Thanks again!
  
   Kenny
  
   --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
   
Should be data.fn;
   
   
   
Note, you must set this for every case, ie, always set the
  visibility on
data change. Renderers are recycled and will not keep any state.
   
   
   
Tracy
   
   
   

   
From: flexcoders@yahoogroups.com
  [mailto:[EMAIL PROTECTED] On
Behalf Of Kenny
Sent: Friday, May 23, 2008 11:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question regarding DataGrid
   
   
   
Hello.
   
In the following code, I would like to be able to reference the
 data
field called fn from within the item renderer for the last
 column,
which contains the RollOverButton.
   
Can someone tell me how I can do this?
   
What I want to do is have the button be visible in some cases, but
 not
others.
   
Thanks!
   
Kenny
   
CODE BELOW
==
   
mx:DataGrid id=dgMediaHistory
x=27
y=59
width=380
height=339
   
 dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
resizableColumns=false
allowMultipleSelection=false
allowDragSelection=false
draggableColumns=false
change=historyChangeHandler()
mx:columns
mx:DataGridColumn headerText=Msg dataField=fn width=85/
mx:DataGridColumn headerText=Date dataField=whenplayed
width=140/
mx:DataGridColumn headerText= width=30
mx:itemRenderer
mx:Component
comp:RollOverButton width=20 height=20
upImage={outerDocument.playImageUp}
overImage={outerDocument.playImageOver}
downImage={outerDocument.playImageDown}
click=outerDocument.playMedia()/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid
   
  
 





RE: [flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Tracy Spratt
What do you see if you hit that aspx page directly from a browser?  You
can get better error reporting that way.

 

I don't see anything wrong, though I would have to verify that outerXML
was a property of XMLDocument.  Might have to get documentElement.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Craig
Sent: Friday, May 23, 2008 2:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ASP.NET RSS proxy?

 

Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
and but when I create an aspx page I get an error with the code
below... I don't use code behind and put it on one page and try to
access the page itself. Do I need to access the page some other way
or modify code? the RSS is an example feed, my RSS feeds will need a
variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
http://finance.yahoo.com/rss/headline?s=MSFT  (the
ticker symbol will be the variable).

I am trying to access the feeds through Flex SWF.

Any suggestions?

The remote server returned an error: (404) Not Found.

Here is code

Craig

%@ Page Language=C# %
%@ Import Namespace=System.Xml %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 

script runat=server
void page_load(Object sender, EventArgs e)
{
string strOutput;

XmlDocument myXml = new XmlDocument();
myXml.Load(http://www.weather.gov/alerts/ak.rss
http://www.weather.gov/alerts/ak.rss );

strOutput = myXml.OuterXml;

Response.ContentType = text/xml;
Response.Write(strOutput);
} 
/script

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

 An of course you can generalize this by passing an url to the aspx
page
 from flex:
 
 var oRequest:Object = {url= www.whatever.com/example.xml};
 
 myHTTPRequest.send(oRequest);
 
 
 
 then in the aspx doing:
 
 myXml.Load(Request(url));
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of n0ctule
 Sent: Friday, August 03, 2007 9:11 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Nick Durnell nick@ wrote:
 
  Hi all,
  
  I've read here that in order to access RSS data in my Flex
application
 
  (from sites with no crossdomain policy files) I will need to proxy
the
 
  RSS data on the server which hosts the Flex application.
  
  I have seen links to PHP proxy scripts but does anyone have an
ASP.NET
 
  equivalent?
  
  Thanks,
  
  Nick.
 
 
 Hi Nick
 
 Try this:
 
 %@ Page Language=C# Debug=true %
 %@ Import Namespace=System.Xml %
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(www.whatever.com/example.xml);
 
 strOutput = myXml.OuterXml;
 
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script


 



[flexcoders] Re: Question regarding DataGrid

2008-05-23 Thread Tim Hoff
Not always a purist, I'd say that if it works, cool.  Adding un-
necessary event listeners can sometimes effect application 
performance though.  Another .02.

-TH

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

 Thanks Tim. That's the code I'd seen before. (but was too lazy to go
 look for g)
 
 Here's how I accomplished it. A bit different, but it works. Any
 comments on this would be appreciated.
 
 Kenny
 
 CODE
 ==
 
 public function init():void { 
 addEventListener(dataChange, handleDataChanged);
 } 
 
 private function handleDataChanged(event:Event):void
 {
   if (data.fn == 'Live')
   {
   theButton.visible = false;  
   }
   else
   {
   theButton.visible = true;
   }
 }
 
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  
  Hi Kenny,
  
  Just for a little more background info that others may find 
beneficial. 
  You can think of the data object as a single record (or row) in 
the
  DataGrid's dataProvider (dataset).  Every column's itemRenderer 
in a
  DataGrid has access to all of the fields in the record (data 
object);
  regardless of the dataField that is set.  However, since 
itemRenderers
  are recycled, you have to perform any conditional logic in the
  itemRenderer's set data function.  This ensures that when the 
data is
  changed, that the itemRenderer will be refreshed with the 
appropriate
  state.  Inside the RollOverButton itemRenderer, you'll have to 
override
  the set data method in script:
  
  override public function set data(value:Object):void
  {
   super.data = value;
  
  
  
   if (data != null)
   {
  this.visible = (data.fn == showMe ? true : false);
   }
  
  super.invalidateDisplayList();
  
  }
  
  Hope that this helps.
  
  Cheers,
  -TH
  
  --- In flexcoders@yahoogroups.com, Kenny kennysphone@ wrote:
  
   I figured it out!!
  
   Thanks again for the help. :o)
  
   Kenny
  
  
   --- In flexcoders@yahoogroups.com, Kenny kennysphone@ wrote:
   
Oh! Now see, I knew it would be something simple. :o)
   
Ok, so that helped me with another problem I was having 
elsewhere
  too,
so double thanks for that one!
   
I have read about the render handlers not keeping state, but 
I'm not
sure how to handle this situation. How can I set it for each 
case,
  as
you've instructed? I'm sure I've seen it somewhere before, but
honestly, it's quicker for me to ask here than to go look 
around the
web for it. ;o)
   
Thanks again!
   
Kenny
   
--- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ 
wrote:

 Should be data.fn;



 Note, you must set this for every case, ie, always set the
   visibility on
 data change. Renderers are recycled and will not keep any 
state.



 Tracy



 

 From: flexcoders@yahoogroups.com
   [mailto:[EMAIL PROTECTED] On
 Behalf Of Kenny
 Sent: Friday, May 23, 2008 11:24 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Question regarding DataGrid



 Hello.

 In the following code, I would like to be able to reference 
the
  data
 field called fn from within the item renderer for the last
  column,
 which contains the RollOverButton.

 Can someone tell me how I can do this?

 What I want to do is have the button be visible in some 
cases, but
  not
 others.

 Thanks!

 Kenny

 CODE BELOW
 ==

 mx:DataGrid id=dgMediaHistory
 x=27
 y=59
 width=380
 height=339

  
dataProvider={svcGetMediaHistory.lastResult.dataset.mediahistory}
 resizableColumns=false
 allowMultipleSelection=false
 allowDragSelection=false
 draggableColumns=false
 change=historyChangeHandler()
 mx:columns
 mx:DataGridColumn headerText=Msg dataField=fn 
width=85/
 mx:DataGridColumn headerText=Date dataField=whenplayed
 width=140/
 mx:DataGridColumn headerText= width=30
 mx:itemRenderer
 mx:Component
 comp:RollOverButton width=20 height=20
 upImage={outerDocument.playImageUp}
 overImage={outerDocument.playImageOver}
 downImage={outerDocument.playImageDown}
 click=outerDocument.playMedia()/
 /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid

   
  
 





[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
That is what I see from the browser to the web page. I have not gotten
around to accessing it from within Flex application yet.
CS




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

 What do you see if you hit that aspx page directly from a browser?  You
 can get better error reporting that way.
 
  
 
 I don't see anything wrong, though I would have to verify that outerXML
 was a property of XMLDocument.  Might have to get documentElement.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 2:58 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
  
 
 Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
 and but when I create an aspx page I get an error with the code
 below... I don't use code behind and put it on one page and try to
 access the page itself. Do I need to access the page some other way
 or modify code? the RSS is an example feed, my RSS feeds will need a
 variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT  (the
 ticker symbol will be the variable).
 
 I am trying to access the feeds through Flex SWF.
 
 Any suggestions?
 
 The remote server returned an error: (404) Not Found.
 
 Here is code
 
 Craig
 
 %@ Page Language=C# %
 %@ Import Namespace=System.Xml %
 
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(http://www.weather.gov/alerts/ak.rss
 http://www.weather.gov/alerts/ak.rss );
 
 strOutput = myXml.OuterXml;
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  An of course you can generalize this by passing an url to the aspx
 page
  from flex:
  
  var oRequest:Object = {url= www.whatever.com/example.xml};
  
  myHTTPRequest.send(oRequest);
  
  
  
  then in the aspx doing:
  
  myXml.Load(Request(url));
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of n0ctule
  Sent: Friday, August 03, 2007 9:11 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Nick Durnell nick@ wrote:
  
   Hi all,
   
   I've read here that in order to access RSS data in my Flex
 application
  
   (from sites with no crossdomain policy files) I will need to proxy
 the
  
   RSS data on the server which hosts the Flex application.
   
   I have seen links to PHP proxy scripts but does anyone have an
 ASP.NET
  
   equivalent?
   
   Thanks,
   
   Nick.
  
  
  Hi Nick
  
  Try this:
  
  %@ Page Language=C# Debug=true %
  %@ Import Namespace=System.Xml %
  
  script runat=server
  void page_load(Object sender, EventArgs e)
  {
  string strOutput;
  
  XmlDocument myXml = new XmlDocument();
  myXml.Load(www.whatever.com/example.xml);
  
  strOutput = myXml.OuterXml;
  
  
  Response.ContentType = text/xml;
  Response.Write(strOutput);
  } 
  /script
 





RE: [flexcoders] Help me understand how to manipulate dataProviders

2008-05-23 Thread Tracy Spratt
Let me say this again, very clearly: Do not use the index of the
datagrid to identify records in the database.

 

Suppose someone deletes record 3 from the DB? The keys will then be
0,1,2,4,5...  When you put that in a data grid you will have:

Key  DGIndex

0  0

1  1

2  2

4  3  WRONG!

5  4  WRONG!



 

Also if the data gets sorted, you are totally screwed.

 

Instead, use the key propertry itself.  Make sure it is in the data
query you use to retrieve the data, and it will be in the selectedItem
object.

var selectedItemKEY:int = adgProducts.selectedItem.KEY;
dataManager.selectProdDataForEdit(selectedItemKEY);

 

But first, what does selectProdDataForEdit() do? 

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bredwards358
Sent: Friday, May 23, 2008 3:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help me understand how to manipulate dataProviders

 

After doing some research which consisted mainly of searching through
this forum, I noticed a mantra along the lines of manipulate the
dataProvider, not the controls it populates. It makes sense,
especially since without directly manipulating the primary key of the
very first entry in a database , it will read as 1, while the first
index of a dataGrid will read as 0. Right now, I have a mostly
finished AIR form which serves as a way of maintaining a product
table. The dataGrid's provider is an array collection built from the
results of a select statement. To get to the point I'd like some
assistance in streamlining some things to not onlt help this form, but
others in the application which will use the same data access
functionality. For starters, here's how I update data:
Assume that the first primary key in the very first entry of the
database has been edited to read as 0 after it was entered so it syncs
up with the dataGrid.selectedIndex property.

//Begins the proceedure to edit a currently existing item when the
edit button is clicked
public function newEdit():void
{
chosenMode = Edit;
currentState = Edit Item;
editColumn.visible = false;
deleteColumn.visible = false;
duplicateColumn.visible = false;
this.lblUniqueID.visible = false;
this.rbAll.visible = false;
this.rbBillable.visible = false;
this.rbNonBillable.visible = false;
try
{
var selectedItemIndex:int = adgProducts.selectedIndex;
//Uses another select statement to get the needed information and
passes the results into
//variables which populates the controls instead of an arrayCollection
dataManager.selectProdDataForEdit(selectedItemIndex);
this.lblUniqueID.text = model.editVarOne;
this.txtNewProductID.text = model.editVarTwo;
this.txtNewProductName.text = model.editVarThree;
this.txtNewBarcode.text = model.editVarFour;
this.txtNewUnit.text = model.editVarFive;
this.txtNewQuantity.text = model.editVarSix;
this.txtNewVendor.text = model.editVarSeven;
this.txtNewCost.text = model.editVarEight;
this.txtNewList.text = model.editVarNine;
this.chkNewBillable.selected = model.editVarBool;
this.lblCurrentStatus.text = Currently  + model.editVarEleven;
}
catch(ex:Error)
{
trace(ex.toString());
trace(ex.getStackTrace());
}
}
private function saveItem(mode:String):void//Differentiates between
whether you want to insert a new item or edit an existing one
{
switch(mode)
{
case Add_New: insertNew();
break;
case Edit: editItem();
break;
default: Alert.show(Cannot Determine State,State Unknown)
break;
}
}
//Actually edits an existing item when the save button is clicked
private function editItem():void
{//Takes the information from the controls and sets them equal to
global variables of the same type which
//are then passed into the function which performs the update
model.insertStringOne = this.txtNewProductID.text;
model.insertStringTwo = this.txtNewProductName.text;
model.insertStringThree = this.txtNewBarcode.text;
model.insertStringFour = this.txtNewVendor.text;
model.insertIntOne = parseInt(this.txtNewUnit.text);
model.insertIntTwo = parseInt(this.txtNewQuantity.text);
model.insertNumberOne = Number(this.txtNewCost.text);
model.insertNumberTwo = Number(this.txtNewList.text);
model.insertStringFive = this.cmbNewClass.selectedItem.toString();
model.insertBooleanOne = this.chkNewBillable.selected;
model.insertStringSix = this.cmbStatus.selectedLabel.toString();
model.insertIntThree = parseInt(this.lblUniqueID.text);

dataManager.updateProduct(model.insertStringOne,
model.insertStringTwo, model.insertStringThree, model.insertIntOne,
model.insertIntTwo, model.insertStringFour, model.insertNumberOne,
model.insertNumberTwo, model.insertStringFive,
model.insertBooleanOne, model.insertStringSix, model.insertNewDate,
model.insertIntThree);

cancelOperation();
//Refreshes the datagrid
refreshGrid();
}

What I want is to see if there's an easier way to do this via
accessing the ArrayCollection model.prodMaintData to get the 

RE: [flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Tracy Spratt
Do you control the server? Can you  turn on verbose errors?  That is in
the web.config file.

 

Can you debug the aspx page?  Step through in Visual Studio to see where
the error is.

 

If for some reason you can't do that, comment out all the code until you
get no error, uncomment a line,response.Write(here), hit the page in a
browser until you find where the error is.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Craig
Sent: Friday, May 23, 2008 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ASP.NET RSS proxy?

 

That is what I see from the browser to the web page. I have not gotten
around to accessing it from within Flex application yet.
CS

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

 What do you see if you hit that aspx page directly from a browser? You
 can get better error reporting that way.
 
 
 
 I don't see anything wrong, though I would have to verify that
outerXML
 was a property of XMLDocument. Might have to get documentElement.
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 2:58 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
 Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
 and but when I create an aspx page I get an error with the code
 below... I don't use code behind and put it on one page and try to
 access the page itself. Do I need to access the page some other way
 or modify code? the RSS is an example feed, my RSS feeds will need a
 variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
http://finance.yahoo.com/rss/headline?s=MSFT 
 http://finance.yahoo.com/rss/headline?s=MSFT
http://finance.yahoo.com/rss/headline?s=MSFT  (the
 ticker symbol will be the variable).
 
 I am trying to access the feeds through Flex SWF.
 
 Any suggestions?
 
 The remote server returned an error: (404) Not Found.
 
 Here is code
 
 Craig
 
 %@ Page Language=C# %
 %@ Import Namespace=System.Xml %
 
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd  
 
 script runat=server
 void page_load(Object sender, EventArgs e)
 {
 string strOutput;
 
 XmlDocument myXml = new XmlDocument();
 myXml.Load(http://www.weather.gov/alerts/ak.rss
http://www.weather.gov/alerts/ak.rss 
 http://www.weather.gov/alerts/ak.rss
http://www.weather.gov/alerts/ak.rss  );
 
 strOutput = myXml.OuterXml;
 
 Response.ContentType = text/xml;
 Response.Write(strOutput);
 } 
 /script
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  An of course you can generalize this by passing an url to the aspx
 page
  from flex:
  
  var oRequest:Object = {url= www.whatever.com/example.xml};
  
  myHTTPRequest.send(oRequest);
  
  
  
  then in the aspx doing:
  
  myXml.Load(Request(url));
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of n0ctule
  Sent: Friday, August 03, 2007 9:11 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Nick Durnell nick@ wrote:
  
   Hi all,
   
   I've read here that in order to access RSS data in my Flex
 application
  
   (from sites with no crossdomain policy files) I will need to proxy
 the
  
   RSS data on the server which hosts the Flex application.
   
   I have seen links to PHP proxy scripts but does anyone have an
 ASP.NET
  
   equivalent?
   
   Thanks,
   
   Nick.
  
  
  Hi Nick
  
  Try this:
  
  %@ Page Language=C# Debug=true %
  %@ Import Namespace=System.Xml %
  
  script runat=server
  void page_load(Object sender, EventArgs e)
  {
  string strOutput;
  
  XmlDocument myXml = new XmlDocument();
  myXml.Load(www.whatever.com/example.xml);
  
  strOutput = myXml.OuterXml;
  
  
  Response.ContentType = text/xml;
  Response.Write(strOutput);
  } 
  /script
 


 



[flexcoders] Very simple - Convert XML = ArrayCollection = DataProvider

2008-05-23 Thread flexawesome

I was trying to covert the XML file into ArracyCollection, but I had a 
problem for binding with DataGrid. It was showing the same record in 
twice on the DataGrid.

The sample file was simple


http://www.privatepaste.com/2c1WhD4jvj

Would you pls take a look?

Have a nice weekend



[flexcoders] Re: Very simple - Convert XML = ArrayCollection = DataProvider

2008-05-23 Thread Tim Hoff

Hi,

Your problem is that you have both items in the dataProvider
referenceing the same object.

Remove

private var authorObj:Object = new Object();

and add:

var authorObj:Object = new Object();

right above:

authorObj.name = author.name;

This will create a new object for each node in the XML.

-TH

p.s. sounds very familiar to a previous post today. :-)

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


 I was trying to covert the XML file into ArracyCollection, but I had a
 problem for binding with DataGrid. It was showing the same record in
 twice on the DataGrid.

 The sample file was simple


 http://www.privatepaste.com/2c1WhD4jvj

 Would you pls take a look?

 Have a nice weekend





[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
I did turn on the tracing and de-bugging where I could find it and it
gave the following information.
It highlighted Line 13 below in RED.
However, I can access this RSS feed just fine in a browser. I am running
this from within Visual Studio 2005 not on an actual web server, but I
do believe it simulates a web environment, (though I guess I'm not
sure).
Craig

Server Error in '/velocitytrading.net' Application.
\


The remote server returned an error: (404) Not Found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review

the stack trace for more information about the error and where it
originated in the code.

Exception Details: System.Net.WebException: The remote server returned
an error: (404) Not Found.

Source Error:


Line 11:
Line 12: XmlDocument myXml = new XmlDocument();
Line 13: myXml.Load(http://www.weather.gov/alerts/ak.rss;);  (THIS
SECTION WAS IN RED)
Line 14:
Line 15: strOutput = myXml.OuterXml;


Source File:
c:\Craig\VelocityTrading\Website\velocitytrading.net\RSS\yahoonews.aspx
Line: 13

Stack Trace:


[WebException: The remote server returned an error: (404) Not Found.]
System.Net.HttpWebRequest.GetResponse() +944
System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials) +124
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +117
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role,
Type ofObjectToReturn) +71
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +111
System.Threading.CompressedStack.runTryCode(Object userData) +54
   
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteed\
Cleanup(TryCode code,

CleanupCode backoutCode, Object userData) +0
System.Threading.CompressedStack.Run(CompressedStack compressedStack,
ContextCallback callback,

Object state) +174
System.Xml.XmlTextReaderImpl.OpenUrl() +264
System.Xml.XmlTextReaderImpl.Read() +104
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +403
System.Xml.XmlDocument.Load(XmlReader reader) +159
System.Xml.XmlDocument.Load(String filename) +114
ASP.rss_yahoonews_aspx.page_load(Object sender, EventArgs e) in

c:\Craig\VelocityTrading\Website\velocitytrading.net\RSS\yahoonews.aspx:\
13
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object
o, Object t, EventArgs e) +31
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +68
System.Web.UI.Control.OnLoad(EventArgs e) +88
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean

includeStagesAfterAsyncPoint) +3018




























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

 Do you control the server? Can you  turn on verbose errors?  That is
in
 the web.config file.



 Can you debug the aspx page?  Step through in Visual Studio to see
where
 the error is.



 If for some reason you can't do that, comment out all the code until
you
 get no error, uncomment a line,response.Write(here), hit the page in
a
 browser until you find where the error is.



 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 4:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?



 That is what I see from the browser to the web page. I have not gotten
 around to accessing it from within Flex application yet.
 CS

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  What do you see if you hit that aspx page directly from a browser?
You
  can get better error reporting that way.
 
 
 
  I don't see anything wrong, though I would have to verify that
 outerXML
  was a property of XMLDocument. Might have to get documentElement.
 
 
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Craig
  Sent: Friday, May 23, 2008 2:58 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
  Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
  and but when I create an aspx page I get an error with the code
  below... I don't use code behind and put it on one page and try to
  access the page itself. Do I need to access the page some other way
  or modify code? the RSS is an example feed, my RSS feeds will need a
  variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT  

[flexcoders] Re: ASP.NET RSS proxy?

2008-05-23 Thread Craig
Tracy, I did play with de-bugging a little more and this error came up
with I came to the line below - one line at a time.


The XML page cannot be displayed

Cannot view XML input using XSL style sheet.  Please correct the error
and then click the Refresh button, or try  again later.

Only one top level element is allowed in  an XML document. Error
processing resource  'http://localhost:1821/velocitytrading
div id=__asptrace
-^Any Ideas?
Craig







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

 Do you control the server? Can you  turn on verbose errors?  That is
in
 the web.config file.



 Can you debug the aspx page?  Step through in Visual Studio to see
where
 the error is.



 If for some reason you can't do that, comment out all the code until
you
 get no error, uncomment a line,response.Write(here), hit the page in
a
 browser until you find where the error is.



 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 4:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?



 That is what I see from the browser to the web page. I have not gotten
 around to accessing it from within Flex application yet.
 CS

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  What do you see if you hit that aspx page directly from a browser?
You
  can get better error reporting that way.
 
 
 
  I don't see anything wrong, though I would have to verify that
 outerXML
  was a property of XMLDocument. Might have to get documentElement.
 
 
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Craig
  Sent: Friday, May 23, 2008 2:58 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
  Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex 3.0
  and but when I create an aspx page I get an error with the code
  below... I don't use code behind and put it on one page and try to
  access the page itself. Do I need to access the page some other way
  or modify code? the RSS is an example feed, my RSS feeds will need a
  variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT
 http://finance.yahoo.com/rss/headline?s=MSFT  (the
  ticker symbol will be the variable).
 
  I am trying to access the feeds through Flex SWF.
 
  Any suggestions?
 
  The remote server returned an error: (404) Not Found.
 
  Here is code
 
  Craig
 
  %@ Page Language=C# %
  %@ Import Namespace=System.Xml %
 
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd  
 
  script runat=server
  void page_load(Object sender, EventArgs e)
  {
  string strOutput;
 
  XmlDocument myXml = new XmlDocument();
  myXml.Load(http://www.weather.gov/alerts/ak.rss
 http://www.weather.gov/alerts/ak.rss
  http://www.weather.gov/alerts/ak.rss
 http://www.weather.gov/alerts/ak.rss  );
 
  strOutput = myXml.OuterXml;
 
  Response.ContentType = text/xml;
  Response.Write(strOutput);
  }
  /script
 
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   An of course you can generalize this by passing an url to the aspx
  page
   from flex:
  
   var oRequest:Object = {url= www.whatever.com/example.xml};
  
   myHTTPRequest.send(oRequest);
  
  
  
   then in the aspx doing:
  
   myXml.Load(Request(url));
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of n0ctule
   Sent: Friday, August 03, 2007 9:11 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , Nick Durnell nick@ wrote:
   
Hi all,
   
I've read here that in order to access RSS data in my Flex
  application
  
(from sites with no crossdomain policy files) I will need to
proxy
  the
  
RSS data on the server which hosts the Flex application.
   
I have seen links to PHP proxy scripts but does anyone have an
  

[flexcoders] Amazon S3 + Flex Uploader // help!

2008-05-23 Thread artur_desig2dev
greetings..oh wise list.
my 1st post.

im trying to find a way ( a class/library ) to 
BATCH upload from FLEX using fileReference() to Amazon S3.

is there some code/samples one is kind enough to share that will
automatically via Keys - generate and attach 64-based policies,
signatures, etc.

and would this be easier to do in PHP? 
if so, why? and how?

any advice, direction, and code sharing would be immense.


thanks!

artur





Re: [flexcoders] Very simple - Convert XML = ArrayCollection = DataProvider

2008-05-23 Thread Sherif Abdou
public function displayauthor (authors:XMLList):void {
for each (var author:XML in authors) 
{
/ADD THIS, remove the Private one on top
var authorObj:Object = new Object();
authorObj.name = author.name;
authorObj.birthdate = author.birthdate;

collection.addItem( authorObj );
//trace(name:  + author.name +  -- birthdate:  + 
author.birthdate);
}
collection.refresh();
}


- Original Message 
From: flexawesome [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, May 23, 2008 3:23:02 PM
Subject: [flexcoders] Very simple - Convert XML = ArrayCollection = 
DataProvider



I was trying to covert the XML file into ArracyCollection, but I had a 
problem for binding with DataGrid. It was showing the same record in 
twice on the DataGrid.

The sample file was simple

http://www.privatep aste.com/ 2c1WhD4jvj

Would you pls take a look?

Have a nice weekend




  

[flexcoders] Back Button issues . . .

2008-05-23 Thread srieger_1
Hi All,

I am having an issue with the ViewStack when the user clicks the back
button. The browser takes them back a page however, my Flex
application doesn't recognize the change thus none of my links work on
the previous page. Let me give an example as that sounds confusing.

The user is viewing a page in my application. Lets call it page one.
On page one the user clicks a link to go to page 2. Now the user is
viewing page 2 and clicks the back button to go back to page 1. For
some reason the link to page 2 no longer works. I found if the user is
viewing page 2 and clicks a button or link that use flex code to
navigate to Page 1, anything besides the back button, then the links
on page 2 will work. Below is some sample code of how I am working
with the ViewStack Links and Buttons . . .

Thanks for any help you can offer .. . ..

private function showPage( pageNumber : Number ) : void
{
switch( pageNumber )
{
case (1) :
model.workflowState = ModelLocator.PAGE_1;
break;
case (2) :
model.workflowState = ModelLocator.PAGE_2;
break;
case (3) :
model.workflowState = ModelLocator.PAGE_3;
break;
}
}

public function getView( workflowState : Number ) : Container
{
switch( workflowState )
{
case ( ModelLocator.PAGE_1 ) :
return somePage1;

case ( ModelLocator.PAGE_2 ) :
return somePage2;

case ( ModelLocator.PAGE_3 ) :
return somePage3;
}

return pageError;
}

mx:ViewStack id=appView width=100% height=100%
selectedChild={getView( model.workflowState )}
historyManagementEnabled=true
view:Page1 id=somePage1 /
view:Page2 id=somePage2 /
view:Page3 id=somePage3 /
/mx:ViewStack


mx:Text styleName=linkText text=Link to Page 2
mouseChildren=false buttonMode=true useHandCursor=true
click=showPage(2)/
mx:Button label=Go to Page 1 click = showPage(1)/



[flexcoders]How do I tell if a component is in the Design View or in the browser?

2008-05-23 Thread dorkie dork from dorktown
In Flash there was a property called livePreview. Is there something that
will tell me my component is in the design view?

dorkie dork from dorktown


Re: [flexcoders] Emulating a failed validator

2008-05-23 Thread Josh McDonald
Mate you're a legend, they're both great ideas :) Just went with the
errorString for now, but next time (we're in a rush) I'll build an
AlwaysFailValidator or something and bind enabled.

-J

On Sat, May 24, 2008 at 1:07 AM, Charlie Griefer [EMAIL PROTECTED]
wrote:

   On Thu, May 22, 2008 at 11:12 PM, Josh McDonald [EMAIL 
 PROTECTED]dznuts%40gmail.com
 wrote:
  Guys,
 
  Say I have a textInput, and I need to emulate the failure of a validator,
  how do I go about it? I can't use the existing validator framework,
 because
  the decision on whether or not that field is valid is based on a
 calculated
  result rather than a simple validation of the textInput component itself.

 I believe you can use the textInput's errorString property. just set
 it to a (string) value. You may also still be able to use the
 existing validator framework. the validator has an 'enabled' property
 that you can toggle based on your calculated result.

 --
 A byte walks into a bar and orders a pint. Bartender asks him What's
 wrong? Byte says Parity error. Bartender nods and says Yeah, I
 thought you looked a bit off.
  




-- 
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: ASP.NET RSS proxy?

2008-05-23 Thread Craig
I am going to try to use the RSS PHP Proxy on this example...(below)
I am using the Flex3 code to load and parse the RSS files from the Flex3
documentation... it looks the same as most of the code from the
as3syndicationlib that is on Mike Chambers blog (also below).  This PHP
proxy looks fairly simple to implement along with the most of the same
code that I am using now, it skips ASP as a proxy, which I thought would
be the easiest route, but I am not finding a way to use ASP for RSS XML
proxy that has been done and can be easily re-produced and I do not want
to invent a new version of the wheel or in this case a new version of
the Toyota Prius ...

Thoughts and comments welcome.
PHP example:
http://www.infinitearray.com/experiments/feeder/srcview/index.html
rssfetch.php

Mike Chambers Blog
http://www.mikechambers.com/blog/2008/01/22/parsing-rss-20-feeds-in-acti\
onscript-3/

  [:))]



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

 Yes, something is returning HTML to you instead of XML.  At least the
 XML is not valid(not XHTML).  This looks like an error from the site
you
 are hitting.  Are you sure it is an RSS feed?  You will need to wrap
 that in a try catch block and handle the html error.

 Tracy



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Craig
 Sent: Friday, May 23, 2008 4:48 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ASP.NET RSS proxy?



 Tracy, I did play with de-bugging a little more and this error came up
 with I came to the line below - one line at a time.

 The XML page cannot be displayed

 Cannot view XML input using XSL style sheet. Please correct the error
 and then click the Refresh button, or try again later.

 

 Only one top level element is allowed in an XML document. Error
 processing resource 'http://localhost:1821/velocitytrading

 div id=__asptrace

 -^

 Any Ideas?
 Craig







 --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
 
  Do you control the server? Can you turn on verbose errors? That is
in
  the web.config file.
 
 
 
  Can you debug the aspx page? Step through in Visual Studio to see
 where
  the error is.
 
 
 
  If for some reason you can't do that, comment out all the code until
 you
  get no error, uncomment a line,response.Write(here), hit the page
in
 a
  browser until you find where the error is.
 
 
 
  Tracy
 
 
 
  
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
  Behalf Of Craig
  Sent: Friday, May 23, 2008 4:07 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: ASP.NET RSS proxy?
 
 
 
  That is what I see from the browser to the web page. I have not
gotten
  around to accessing it from within Flex application yet.
  CS
 
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   What do you see if you hit that aspx page directly from a browser?
 You
   can get better error reporting that way.
  
  
  
   I don't see anything wrong, though I would have to verify that
  outerXML
   was a property of XMLDocument. Might have to get documentElement.
  
  
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of Craig
   Sent: Friday, May 23, 2008 2:58 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com

   Subject: [flexcoders] Re: ASP.NET RSS proxy?
  
  
  
   Hey Tracy, this looks pretty easy, I am using ASP.NET with Flex
3.0
   and but when I create an aspx page I get an error with the code
   below... I don't use code behind and put it on one page and try to
   access the page itself. Do I need to access the page some other
way
   or modify code? the RSS is an example feed, my RSS feeds will need
a
   variable ie... http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT
   http://finance.yahoo.com/rss/headline?s=MSFT
  http://finance.yahoo.com/rss/headline?s=MSFT  (the
   ticker symbol will be the variable).
  
   I am trying to access the feeds through Flex SWF.
  
   Any suggestions?
  
   The remote server returned an error: (404) Not Found.
  
   Here is code
  
   Craig
  
   %@ Page Language=C# %
   %@ Import Namespace=System.Xml %
  
   !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd  
  
   script runat=server
   void page_load(Object sender, EventArgs e)
   {
   string strOutput;
  
   XmlDocument myXml = new XmlDocument();
   myXml.Load(http://www.weather.gov/alerts/ak.rss
  

[flexcoders] Re: Center/Shrink To Fit

2008-05-23 Thread Richard Rodseth
Is there a way to set the scale of a component without triggering
invalidateSize() ?

My initial effort to create a ScaleToFit component involved setting
scaleX and scaleY in updateDisplayList. But that results in some
recursion. Perhaps this is the wrong place to set the scale.

I notice that SWFLoader uses a DisplayObject as a content holder, but
my attempts to cast this to DisplayObject before setting the
property didn't help - the UIComponent version of set scaleX is
still invoked.


On Fri, May 23, 2008 at 7:37 AM, Richard Rodseth [EMAIL PROTECTED] wrote:
 I'm looking to find or create a  component which would scale (not
 resize) its contents smaller if they were larger than this component's
 bounds, and center them if they're smaller.  I could imagine
 extensions to support expand to fit as well, but that's not needed
 currently.

 The contents can be a single child if that helps, or the full child
 list of a container. I've done a bit of custom component development,
 but would appreciate any suggestions/pointers for this scenario.

 Thanks in advance.



[flexcoders] flex certification

2008-05-23 Thread Gustavo Duenas
any ideas about a good book to start studying for the flex  
certification?
and also where should I get the test to be certified?

Regards,


Gustavo Duenas


Re: [flexcoders] Amazon S3 + Flex Uploader // help!

2008-05-23 Thread Peter Connolly
Take a look at the Salsa sample application.  It's an AIR app that
manages files on Amazon S3.


Re: [flexcoders] Parsing ISO8601 date

2008-05-23 Thread Josh McDonald
YMMV :)

//ISO date format - SOAP

static public const ISO_DATE : RegExp =
/^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2})(\.[0-9]+){0,1}(.*)$/
;


//Parses ISO dates (from SOAP etc) - probably only works with valid ISO
dates, innit.

static public function parseIso(dateStr : String) : Date {

 /* trace(parseIso( + dateStr + )); */


 if (dateStr == null) return null;


 //Asplode input


 var matches : Array = dateStr.match(ISO_DATE);

 if(matches == null || matches.length  5) {

trace(dateStr +  is not a valid ISO date, buddy.);

return null;

}

 var datePart : String = matches[1];

var timePart : String = matches[2];

var msPart : String = matches[3];

var timeZone : String = matches[4];

 /* trace(datePart = \ + datePart + \);

trace(timePart = \ + timePart + \);

trace(msPart = \ + msPart + \);

trace(timeZone = \ + timeZone + \); */



//Reassemble into a string flex's built-in parse can grok

 var newString : String = datePart.replace(-,/).replace(-,/);

newString +=  ;

newString += timePart;

newString +=  ;

newString += GMT + timeZone.replace(Z,-00:00).replace(:,);

 /* trace (New string =  + newString); */

 var d : Date = parse(newString);


 /* trace(flex's parse of  + newString +  led to  + d + , setting ms);
*/

 if (d != null)

d.milliseconds = parseInt(timePart.substr(1,3));

 /* trace(final parse of  + dateStr +  led to  + d); */

 return d;

}

On Sat, May 24, 2008 at 12:26 AM, cesarerocchi [EMAIL PROTECTED]
wrote:

   Hi,

 AFAIU there is no support to parsing ISO8601 dates in Flex.

 Does anybody have a clue or pointer to some library?

 Thanks,

 -c.

 --
 http://spreadingfunkyness.com/posty

  




-- 
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] Parsing ISO8601 date

2008-05-23 Thread Josh McDonald
FYI The parse(Date) method just calls Flex's built in parser and returns
null if the result's no good.
-J

On Sat, May 24, 2008 at 10:41 AM, Josh McDonald [EMAIL PROTECTED] wrote:

 YMMV :)

 //ISO date format - SOAP

 static public const ISO_DATE : RegExp =
 /^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2})(\.[0-9]+){0,1}(.*)$/
 ;


 //Parses ISO dates (from SOAP etc) - probably only works with valid ISO
 dates, innit.

 static public function parseIso(dateStr : String) : Date {

  /* trace(parseIso( + dateStr + )); */


  if (dateStr == null) return null;


  //Asplode input


  var matches : Array = dateStr.match(ISO_DATE);

  if(matches == null || matches.length  5) {

 trace(dateStr +  is not a valid ISO date, buddy.);

 return null;

 }

  var datePart : String = matches[1];

 var timePart : String = matches[2];

 var msPart : String = matches[3];

 var timeZone : String = matches[4];

  /* trace(datePart = \ + datePart + \);

 trace(timePart = \ + timePart + \);

 trace(msPart = \ + msPart + \);

 trace(timeZone = \ + timeZone + \); */



 //Reassemble into a string flex's built-in parse can grok

  var newString : String = datePart.replace(-,/).replace(-,/);

 newString +=  ;

 newString += timePart;

 newString +=  ;

 newString += GMT + timeZone.replace(Z,-00:00).replace(:,);

  /* trace (New string =  + newString); */

  var d : Date = parse(newString);


  /* trace(flex's parse of  + newString +  led to  + d + , setting
 ms); */

  if (d != null)

 d.milliseconds = parseInt(timePart.substr(1,3));

  /* trace(final parse of  + dateStr +  led to  + d); */

  return d;

 }

 On Sat, May 24, 2008 at 12:26 AM, cesarerocchi [EMAIL PROTECTED]
 wrote:

   Hi,

 AFAIU there is no support to parsing ISO8601 dates in Flex.

 Does anybody have a clue or pointer to some library?

 Thanks,

 -c.

 --
 http://spreadingfunkyness.com/posty

  




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

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




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

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


[flexcoders] AIR capabilities

2008-05-23 Thread Josh McDonald
Hey guys,
Apologies if this is an FAQ but I can't seem to find straight answers via
google.

I'm about to start work on an app, and I'd prefer to use AIR over Swing or
JavaFX - I'm just wondering exactly what capabilities you get on top of Flex
with AIR besides file read/write. Specifically, a few of the following
things:

   - Can I get http response bodies when I get a 500 from a remote server?
   - Can I make http requests other than GET and POST?
   - If not, can I open a socket?

If I can't do any of that, are there plans to allow AIR apps to be Java with
a Flex / Flash UI and some sort of nice communication layer between them? Is
there a third party solution that does this?

-J

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

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


Re: [flexcoders] custom event not added

2008-05-23 Thread dnk
ok, well that explains that part, however either my event is not  
added, or my event handler is never called. My trace statements never  
show up


So I guess I  still am wondering if anyone has any ideas

dnk



On 23-May-08, at 4:56 AM, Paul Andrews wrote:


addEventListener() does not return a value..

- Original Message -
From: dnk [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, May 23, 2008 12:47 PM
Subject: [flexcoders] custom event not added

 Hi there,

 I have a controller that is adding my custom event listeners, but  
for

 some reason my event handler was not being fired.

 My original code was (snippet):


 (in controler)

 //constructor
 public function FlexbController()
 {
 //turn the key, start it up
 addEventListener( FlexEvent.CREATION_COMPLETE, onInit );
 }

 private function onInit( event:Event ):void
 {
 //setup event listeners
 /*systemManager is where event listener hangs out defines the
 relationship between event and handler*/

 systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
 handler_GetNewsEvent );
 systemManager.addEventListener( AddNewsEvent.ADD_NEWS_EVENT,
 handler_AddNewsEvent );

  
systemManager.addEventListener( NewsDataLoadedEvent.NEWS_LOADED_EVENT,

 handler_NewsLoadedEvent );
 getNewsData();

 }

 And I had trace statements in all of my handlers... this is how i
 noticed things were not working as they should.

 SO I added a simple check like (in my FlexbController constructor):

 if (systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
 handler_GetNewsEvent ))
 {
 trace(true);
 } else {
 trace(false);
 }


 And I obviously am getting false.

 Ideas?

 dnk



 

 --
 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] custom event not added

2008-05-23 Thread Josh McDonald
What's the event dispatch code look like?

On Sat, May 24, 2008 at 11:01 AM, dnk [EMAIL PROTECTED] wrote:

   ok, well that explains that part, however either my event is not added,
 or my event handler is never called. My trace statements never show up

 So I guess I  still am wondering if anyone has any ideas

 dnk



 On 23-May-08, at 4:56 AM, Paul Andrews wrote:

 addEventListener() does not return a value..

 - Original Message -
 From: dnk [EMAIL PROTECTED] d.k.emaillists%40gmail.com
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Sent: Friday, May 23, 2008 12:47 PM
 Subject: [flexcoders] custom event not added

  Hi there,
 
  I have a controller that is adding my custom event listeners, but for
  some reason my event handler was not being fired.
 
  My original code was (snippet):
 
 
  (in controler)
 
  //constructor
  public function FlexbController()
  {
  //turn the key, start it up
  addEventListener( FlexEvent.CREATION_COMPLETE, onInit );
  }
 
  private function onInit( event:Event ):void
  {
  //setup event listeners
  /*systemManager is where event listener hangs out defines the
  relationship between event and handler*/
 
  systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
  handler_GetNewsEvent );
  systemManager.addEventListener( AddNewsEvent.ADD_NEWS_EVENT,
  handler_AddNewsEvent );
 
  systemManager.addEventListener( NewsDataLoadedEvent.NEWS_LOADED_EVENT,
  handler_NewsLoadedEvent );
  getNewsData();
 
  }
 
  And I had trace statements in all of my handlers... this is how i
  noticed things were not working as they should.
 
  SO I added a simple check like (in my FlexbController constructor):
 
  if (systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
  handler_GetNewsEvent ))
  {
  trace(true);
  } else {
  trace(false);
  }
 
 
  And I obviously am getting false.
 
  Ideas?
 
  dnk
 
 
 
  
 
  --
  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: Very simple - Convert XML = ArrayCollection = DataProvider

2008-05-23 Thread flexawesome
right, I didn't aware of it

thanks you all of you have a nice long weekend

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

 public function displayauthor (authors:XMLList):void {
 for each (var author:XML in authors) 
 {
 /ADD THIS, remove the Private one on top
 var authorObj:Object = new Object();
 authorObj.name = author.name;
 authorObj.birthdate = author.birthdate;
 
 collection.addItem( authorObj );
 //trace(name:  + author.name +  -- 
birthdate:  + author.birthdate);
 }
 collection.refresh();
 }
 
 
 - Original Message 
 From: flexawesome [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, May 23, 2008 3:23:02 PM
 Subject: [flexcoders] Very simple - Convert XML = ArrayCollection 
= DataProvider
 
 
 
 I was trying to covert the XML file into ArracyCollection, but I 
had a 
 problem for binding with DataGrid. It was showing the same record 
in 
 twice on the DataGrid.
 
 The sample file was simple
 
 http://www.privatep aste.com/ 2c1WhD4jvj
 
 Would you pls take a look?
 
 Have a nice weekend





[flexcoders] Re: Async Concurrent Requests with AMF for BlazeDS or LCDS

2008-05-23 Thread MyoT
Jira issue has been created for this:
https://bugs.adobe.com/jira/browse/BLZ-184

Please vote if you want it get fixed.  Thanks everyone.


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

 Right, only for AMF, and I'm not aware of any documentation on that. If
 there was, it would be regarding NetConnection.call(...).
 
  
 
 URLLoader doesn't do any batching - it just hands off HTTP requests to
 the browser to send. But when using URLLoader, you need to be aware that
 browsers impose connection limits to a single domain (a recommendation
 in the HTTP 1.1 spec) so even there you end up in a pseudo-serial
 situation with no direct control over whether requests will be sent
 serially or concurrently. You can use CNAME hacks to circumvent this
 (ie. Yahoo/Google maps downloading map tiles), but that's quite a bit
 more complex to configure and deploy and your app needs to be hardcoded
 to know about all your CNAMEs and to know when to use which for what
 calls.
 
  
 
 Our HTTPChannel, which uses URLLoader internally, serializes the
 requests it sends to sync up with the behavior of the AMFChannel and
 RTMPChannel and try to ensure that requests from the client to the
 server have a consistent, expected order (very important for Data
 Management).
 
  
 
 Seth
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Douglas Knudsen
 Sent: Friday, May 23, 2008 10:05 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: Async Concurrent Requests with AMF for
 BlazeDS or LCDS
 
  
 
 Seth, where is this documented?   Been looking for info on if the player
 batches calls up or not.  So it does, but only for AMF?
 
 DK 
 
 On Thu, May 22, 2008 at 2:34 PM, Seth Hodgson [EMAIL PROTECTED]
 wrote:
 
 There is a single thread that advances through SWF frames and runs your
 ActionScript code and event handlers, but network calls are performed by
 separate background threads concurrently.
 
 In order to have calls processed concurrently on the server, they need
 to arrive as separate requests. In the case of AMF, if you make a series
 of calls quickly chances are good/excellent that the Player will batch
 them up and send them to the server in the body of a single HTTP POST.
 When this happens, the server must unpack them and process them serially
 and then pack the results for all these calls back up in the body of a
 single HTTP response. Because we're dealing with a single request and
 response, there's no way to send back results for individual calls
 separately. When these results get back to the browser and are passed
 back into the Player, they are dispatched to your ActionScript handling
 code as asynchronous events. There's not a good way to force calls to be
 sent as separate requests, and even if you could, browsers impose limits
 on the number of concurrent connections they'll open to a server, so
 this really isn't the right way to solve your scenario. Also, in the
 case of RTMP all traffic between the client and server happens over a
 single connection and is ordered serially.
 
  
 
 If you want to process calls/messages/data asynchronously on the server
 the proper way, it requires a bit of work on your part to accomplish at
 this point. Rather than running your current logic in your RemoteObject
 directly when it is invoked, you need to break that out into a Runnable
 class, and when you're invoked, create an instance of this class that
 packages up the incoming args and info about the client making the call
 and then submit that for asynchronous execution to a
 java.util.concurrent.Executor that you'd need to set up during server
 startup. Your remoting method could return a job id or just void once it
 has queued an instance of your Runnable with the Executor. On the client
 when you get a ResultEvent for your call you don't get the actual result
 - you just know that your invocation was successfully queued for
 asynchronous execution on the server. So the second half of the equation
 is how to get the result or fault generated when the Executor runs your
 Runnable back to the client. You need to take advantage of messaging in
 BlazeDS or LCDS to achieve this. In your client app, create a Consumer
 and subscribe to a destination you define that you can publish
 results/faults as AsyncMessages back to target clients from your
 Runnable. Your Consumer should subscribe to a subtopic that applies only
 to it, or use a selector expression. When your Runnable runs and
 generates the result or fault to return, you'd can create an
 AsyncMessage containing the result of fault info and publish it to this
 destination, using either a subtopic header, or some other message
 header that will be evaluated against the Consumer's selector expression
 such that the message is routed to the proper Consumer. That lets you
 return async results or faults to clients in a truly asynchronous
 manner.
 
  
 
 This is actually something I'd like to see us bake into 

  1   2   >