[flexcoders] Merry christmas

2009-12-24 Thread Yesaya
Merry christmas and a happy new year from indonesia.



Re: [flexcoders] Merry christmas

2009-12-24 Thread Angelo Anolin
Merry Christmas to Everyone in this group.  A group which am very thankful 
because I learned a lot and still learning a lot more.

Happy Holidays.

Angelo





From: Yesaya yongha...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Thu, 24 December, 2009 16:48:49
Subject: [flexcoders] Merry christmas

  
Merry christmas and a happy new year from indonesia... ..


 


  

[flexcoders] Book example

2009-12-24 Thread yogesh patel
Hi,
 i want source code for page flipping like book.
 just like this(see the link)    
http://demos.blackberry.com/phone/na/us/gen/



Thanks  Regards,
Yogesh Patel



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

[flexcoders] advancedatagrid with different icon for each row in hierarchical fashion

2009-12-24 Thread adityanarayan.vaidya
Hi All,

I am using AdvanceDataGrid to display data in hierarchical fashion.The data is 
in the form of XML as follows.

data id=leafNode name=WS/
data id=parentB name=WW
data id=loading/
/data
data id=parentC name=SS
data id=loading/
/data
data id=parentD name=CS
data id=loading/
/data

I am using lazy loading concept in which I only load one level of hierarchy at 
a time.I insert the data id=loading/ tag as a child tag  for row which has 
children.This makes sure that the expand/collapse icon appears for this row.

I then use the itemOpen event of the advancedatagrid to fetch the children of 
the clicked item and replace the data id=loading/ with the children fetched 
for the clicked item.

I see that the icons displayed next to each expand/collapse are the same 
irrespective of hierarchy.

My requirement is that I want to set the icon (instead of folder and file which 
are show by default) depending on the data.The icon needs to be different for 
each row whether child or parent and will be governed by the data for that row.

I have tried using itemrenderer which shows the icon properly as follows.

mx:rendererProviders
  mx:AdvancedDataGridRendererProvider columnIndex=1
  mx:renderer
  mx:Component
mx:HBox
  mx:Text id=albumName
width=100%
selectable=false
text={da...@name}/
 mx:Image id=albumImage
height=45
source={da...@iconpath}/
/mx:HBox
  /mx:Component

  /mx:renderer
/mx:AdvancedDataGridRendererProvider
 /mx:rendererProviders

But the lazy loading of hierarchy no more works i.e. The itemOpen events just 
hangs and i dont know why it happens.

The following is the sample src -

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=400 height=300 
creationComplete=loadData()

mx:Script
![CDATA[
import mx.events.AdvancedDataGridEvent;
import mx.collections.HierarchicalData;
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
  
   
  
[Bindable]
private var _data : XMLList;
[Bindable]
private var _xml : XML = datum/;
private static var _loadingIndicator:XML = data/;

private var _clickedNode:XML;

public function loadData() : void {
  var test: testCommand = new testCommand();
  test.setCallbacks(getEventsHandleResult,
  getEventsHandleFault);
  test.getData();
}
  
private function getEventsHandleFault(e:FaultEvent):void {
 
}
  
private function getEventsHandleResult(res:ResultEvent):void {
  
  var ac:ArrayCollection = ArrayCollection(res.result);

  _loadingindicat...@id = 'Loading...';
  _loadingindicat...@loaddata = 'true';

  for each (var foo:Test in ac) {
var _newNode:XML = data/;
_newno...@id = foo.eventHandle.toString();
_newno...@name = foo.cellName.toString();
_newno...@iconpath = foo.iconPath.toString();

if (foo.hasChildren.toString() == true) {
  _newNode.appendChild(_loadingIndicator);
}
_xml.appendChild(_newNode);
  }

  _data = new XMLList(_xml.data);
  adg.dataProvider = new HierarchicalData(_data);
   }
   
   private function fetchChildren(res:ResultEvent):void {
 var ac:ArrayCollection = ArrayCollection(res.result);
 _xml = datum/
 
 _loadingindicat...@id = 'Loading...';
 _loadingindicat...@loaddata = 'true';

 for each (var foo:NGPEventVO in ac) {
   var _newNode:XML = data/;
   _newno...@id = foo.eventHandle.toString();
   _newno...@name = foo.cellName.toString();
   _newno...@iconpath = foo.iconPath.toString();

   if (foo.hasChildren.toString() == true) {
 _newNode.appendChild(_loadingIndicator);
   }
   _xml.appendChild(_newNode);

 }
 
 _clickedNode.replace(data, _xml.data);
   }
   
   private function onItemOpen(event : AdvancedDataGridEvent):void
   {

 var children : XMLList = 
 XML( event.itemRenderer.data).children();

 if ( children.length() == 1 
   children[...@loaddata == true ) {

   _clickedNode = XML(event.itemRenderer.data);

   var test : Test = new Test();
   test.setCallbacks(fetchChildren,getEventsHandleFault);
   test.getData();
 }
   }
]]
/mx:Script


[flexcoders] Re: Book example

2009-12-24 Thread valdhor
Two that I know of...

http://www.rubenswieringa.com/blog/flex-book-component-beta

http://demo.quietlyscheming.com/book/app.html

--- In flexcoders@yahoogroups.com, yogesh patel mailtoyogeshpa...@... wrote:

 Hi,
  i want source code for page flipping like book.
  just like this(see the link)    
 http://demos.blackberry.com/phone/na/us/gen/
 
 
 
 Thanks  Regards,
 Yogesh Patel
 
 
 
   The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
 http://in.yahoo.com/





Re: [flexcoders] Merry christmas

2009-12-24 Thread Ivan Wang
Best wishes from China, to all you guys.

Happy Year, FLEXCODERS!

  - Original Message - 
  From: Angelo Anolin 
  To: flexcoders@yahoogroups.com 
  Sent: Thursday, December 24, 2009 6:30 PM
  Subject: Re: [flexcoders] Merry christmas




  Merry Christmas to Everyone in this group.  A group which am very thankful 
because I learned a lot and still learning a lot more.

  Happy Holidays.

  Angelo




--
  From: Yesaya yongha...@gmail.com
  To: flexcoders@yahoogroups.com
  Sent: Thu, 24 December, 2009 16:48:49
  Subject: [flexcoders] Merry christmas


  Merry christmas and a happy new year from indonesia... ..






  

[flexcoders] Air window not getting focus

2009-12-24 Thread chenyang3
Merry Christmas.
I have just noticed a wierd thing about the focus cursor on a textarea in an 
Air Window component. Everything is fine when I'm testing it in flex builder, 
but after making a release build and installing it, when I open a window, the 
focus cursor in the textarea disappears (the border still exists), I have 
checked other air applications that have a window with textarea in it and found 
the same issue. Is this a bug with AIR or is it just my system?

Thank you have a merry christmas.

Regards,
Yang



[flexcoders] Re: Localizing Flex App Demos

2009-12-24 Thread seanmcmonahan
I found this quite useful: 
http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization

Currently supporting an app that is in English, German and French using the 
method described in that article.

--- In flexcoders@yahoogroups.com, s_hernandez01 s_hernande...@... wrote:

 Does anyone know any links that demos and gives a tutorial of an API from 
 google, yahoo, or whoever on localizing a flex app with many languages?
 
 -Sal





RE: [SPAM] [flexcoders] Re: Localizing Flex App Demos

2009-12-24 Thread Tracy Spratt
Yes, I am using this as well.  It is built-in to Flex, no third party stuff
needed.  Sal, why did you refer to google and Yahoo?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of seanmcmonahan
Sent: Thursday, December 24, 2009 4:05 PM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Re: Localizing Flex App Demos

 

  

I found this quite useful: http://labs.
http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_
Localization
adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization

Currently supporting an app that is in English, German and French using the
method described in that article.

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
s_hernandez01 s_hernande...@... wrote:

 Does anyone know any links that demos and gives a tutorial of an API from
google, yahoo, or whoever on localizing a flex app with many languages?
 
 -Sal






[flexcoders] Using URLLoader with AsyncToken

2009-12-24 Thread Karthik Kailash
Hi all,

I was trying to retrieve binary data over HTTP for my Flex application, and
was running into some stumbling blocks. HTTPService did not seem to deal
with binary data well, people said to use URLLoader. But URLLoader does not
have the nice AsyncToken/IResponder interface that HTTPService provides.

So, I did some searching and could not find anyone extending URLLoader to
provide this kind of functionality. I went ahead and took a stab at it
myself:  http://pastebin.com/d7369d0e0 http://pastebin.com/d7369d0e0

Basically it wraps a URLLoader and an AsyncToken, and maps the COMPLETE,
IO_ERROR, and SECURITY_ERROR events from URLLoader to results/faults that
get raised on the AsyncToken.

Basic usage:

var tidbitLoader:AsyncURLLoader = new AsyncURLLoader();


tidbitLoader.dataFormat = URLLoaderDataFormat.BINARY;





var asyncToken:AsyncToken = tidbitLoader.load(new
URLRequest(http://localhost/SampleTidbit.swf;));





asyncToken.addResponder(this);





public function result(resultEvent:Object):void


{


trace(result);


}





public function fault(faultEvent:Object):void 


{


var fault:FaultEvent = faultEvent as FaultEvent;


trace(fault:  + fault.toString());


}







Is this the right way to approach the problem? Are there existing solutions?
I would love to hear feedback.

Thanks,

Karthik

 

Karthik Kailash | Product

SocialVision, Online Television Becomes a Social Experience

CELL . 408.768.7704  | WEB . www.socialvisioninc.com | FACEBOOK .
http://www.facebook.com/socialvision facebook.com/socialvision | TWITTER .
http://twitter.com/socialvision twitter.com/socialvision



RE: [Spam] RE: [flexcoders] Using Cairngorm and how to display a Popup from aCommand

2009-12-24 Thread Vaibhav Seth

Hi,

Thanks for the appreciation.
Yups you have got it right. But in you statement:

then I have the problem of getting that function reference over into the
2nd CairngormEvent, which isn't created and fired until the Web Service
responder is called

I think you are talking about dispatching an event from the command or Sequence 
Command type of thing.

For that scenario, you can pass on that function reference to the the 2nd 
Cairngorm Event also.
You can keep that parameter in the Event also. So that you always does not need 
to worry about it.
And Function reference is in terms of instance of the command. If your command 
gets fired again before it returns you the result for the last executed method, 
even then you are safe.

Keeping the view reference in the model have pros and cons. I will not prefer 
that way, simply because it breaks the encapsulation, view gets publicly 
exposed as the Model is a singleton class.

But there is no hard and fast rule as well.. :) 

Thanks,
Vaibhav Seth.




 EMAILING FOR THE GREATER GOOD
Join me

To: flexcoders@yahoogroups.com
From: n...@middleweek.co.uk
Date: Tue, 22 Dec 2009 16:03:43 +
Subject: Re: [Spam] RE: [flexcoders] Using Cairngorm and how to display a   
Popup from aCommand


















 



  



  
  
  Nice post and thanks for replying...

I understand your first solution, I think it's similar to a ChangeWatcher 
approach... but I'm a bit lost with the 2nd approach...


In my circumstance, I have a button in my view that fires a Flash CLICK event, 
the view-mediator Handles it and fires a CairngormEvent, which invokes a 
CairngormCommand to call a Web Service to fetch some data. The data is loaded 
asynchronously and passed into a new CairngormEvent which then fires a 
CairngormCommand, this Command unpacks the data and if it's all gravy, it will 
update the model and the fetched data is displayed on the current View. If the 
data contains Fault event info then I need to show a custom PopUp component...



I think, you're 2nd solution is storing a private or public function from 
inside the View on the CairngormEvent that is fired to reference it later... If 
I've got that right, then I have the problem of getting that function reference 
over into the 2nd CairngormEvent, which isn't created and fired until the Web 
Service responder is called... Which I believe is completely detached from the 
original CairngormEvent/ Command.



I guess I could put the function ref on the model as a central repository but I 
could also just stick a reference to the View on the model and use that 
reference in the CairngormCommand and call PopUpManager.createPopup...




What are your thoughts cause I'm a bit lost :)


Cheers,
nick





2009/12/21 Vaibhav Seth vaibhav.s...@live.com

















 



  



  
  
  


hi,


Well that's a good question for the starters. Please go through my below blog. 
Hope you will get some thing out from there.

http://groups.adobe.com/posts/ffa987b8a4






Thanks,
Vaibhav Seth.






 









  

[flexcoders] [help needed] display data in tile window component..(flex + amfphp)

2009-12-24 Thread hanx_gen3

hello all, I'm new to flex and google maps..and trying to create an
application which store places data into the database. I'm using
AMFPHP services to manipulate the data..

I have succeeded populating marker trough the data I've stored and
now
I'm planning to make like this: when user click the marker, it's
popup
a tile window component which contain the detail (or more data) of the
clicked marker/place… The tile window component popup correctly but
the problem is the data of clicked marker display the same data values
on any clicked marker ..
so how to display the right data values on each clicked marker?…
here is my code :

// to retrieve data from amfphp result //
private function getResultHandler(re:ResultEvent):void{
var res:Array = re.result as Array;
resultData= new ArrayCollection(res);
}

// populate marker to map //
public function addMarker(event:Event):void{
var markersCount:int = resultData.length;
var i:Number;
for (i=0; i  markersCount; i++) {
var name:String = resultData[i][`name'];
var address:String = resultData[i][`address'];
var type:String = resultData[i][`type'];
var latlng:LatLng = new LatLng(resultData[i][`lat'],
resultData[i]
[`long']);
var marker:Marker = createMarker(latlng, name, address, type);
infoWin.myarray.addItemAt({name:resultData[i][`name'],
address:resultData[i][`address'],
type:resultData[i][`type']},i);
map.addOverlay(marker);
}
}

// create marker //
public function createMarker(latlng:LatLng, name:String,
address:String, type:String): Marker {
var marker:Marker = new Marker(latlng, new MarkerOptions
({iconOffset: new Point(-16, -32)}));
var html:String =  + name + 
Alamat:  + address

Tipe: type;
marker.addEventListener(MapMouseEvent.ROLL_OVER,
function(e:MapMouseEvent):void { marker.openInfoWindow(new
InfoWindowOptions
({contentHTML:html}));
});
marker.addEventListener(MapMouseEvent.ROLL_OUT,
function(e:MapMouseEvent):void { marker.closeInfoWindow(); });
marker.addEventListener(MapMouseEvent.CLICK,showInfo); return marker; }
// show tile window component popup //
public function showInfo(event:MapMouseEvent):void {
var infoWin:detailInfoWin = new detailInfoWin();
PopUpManager.addPopUp(infoWin,panel1,false);
PopUpManager.centerPopUp(infoWin);
var i:Number;
}

// and here is my custom component //
![CDATA[
import mx.collections.ArrayCollection;
import mx.managers.PopUpManager;
[Bindable] public var myarray:ArrayCollection = new
ArrayCollection([{name:,
address:, type:}]);
public var i:Number;
]]

I'm also using info window to show less data inside info window
tooltip when user rollover the marker..and it's works fine…

so, is there any way to make the data show correctly in the tile window
component of clicked marker/place…please help me…thanks
before