[flexcoders] client size graphs

2008-12-01 Thread Gregor Kiddie
 

 

 

 

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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

 

image001.gifimage002.gif

RE: [flexcoders] client size graphs

2008-12-01 Thread Gregor Kiddie
Doh... apologies, that's what comes of having a 'flex' team and a
'flexcoders' list tags...

 

Ignore all please!

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gregor Kiddie
Sent: 01 December 2008 08:35
To: flexcoders@yahoogroups.com
Subject: [flexcoders] client size graphs

 

 

 

 

 

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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

 

 

image001.gifimage002.gif

[flexcoders] Custom DataDescriptor calling remote service

2008-12-01 Thread Mark Carter

I'm writing a data descriptor for a tree representing some remote filesystem
hierarchy.

I want the data descriptor to call a remote service every time the user
opens an item. However, the data descriptor assumes synchronous retrieval of
children etc.

At the moment, I have to read in the entire hierarchy at once when the tree
is initialised. However, this is not appropriate because:

1. Its not scalable: this tree could get huge and so lead to an unacceptable
initialisation time
2. Changes (since initialisation) to the hierarchy are not reflected

Is it possible to write the DataDescriptor using asynchronous calls?
-- 
View this message in context: 
http://www.nabble.com/Custom-DataDescriptor-calling-remote-service-tp20768055p20768055.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Flex and SOAP 1.2

2008-12-01 Thread Jules Suggate
Hi, looking for *any* way to consume SOAP 1.2 webservices (esp. WCF
ones with binding type wsdlHttpBinding) without requiring us to
handcode any of the interfaces on the client side

That means: we want to give some tool a WSDL URL, and then can code
against the webservice with no further work required. Whether the WSDL
is parsed at compile-time or run-time is of lesser importance.

Code we can freely use and distribute is ideal, but we would consider
anything right now, such as WebORB or even an enterprise license to
LCDS. Anyone had any experience with WebORB/LCDS who can inform me
without doubt that one or other of them implements the whole SOAP 1.2
specification?

Thanks,
Jules


[flexcoders] [ANN]: Pimento Data Services integrate JPA/Hibernate with Flex/Flash

2008-12-01 Thread Jens Halm

Hello Flexcoders,

I'd like to announce the availability of Pimento Data Services, an
Open Source framework released under the Apache 2.0 license.

It offers management for persistent entities for Flex and Flash
Clients with the following features:

* Automatic import of JPA/Hibernate configuration

* AS3 EntityManager remote service based on Cinnamon and the binary
  AMF3 protocol

* Managed AS3 entities and client-side cache

* Guarantee that there is always only one instance representing a
  particular entity

* Sending only change sets on merge operations

* Managed primary key values when persisting new entities

* Support for inheritance, managed and optionally lazy associations
  and collections

* Perform JPAQL and Named Queries from the Client

* Server-side Interceptor Architecture (allows to observe all CRUD
  operations initiated from the client)

* Support for Pimento Integration Tests written in AS3, with
  automatic database population

* And much more...


You can download the first Release Candidate from:

http://www.spicefactory.org/pimento/download.php


Jens Halm
Spicefactory




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
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] Game Architecture

2008-12-01 Thread Fotis Chatzinikos
Hi, it depends on your game... Have not done one in flex, but I have made
flash versions in the past and a game socket server in java.

It actually depends on your game... If it is check backgammon (turn based
games) i Would go with RemoteObject calls which are probably the cheaper in
resources... I have not used JMS (messaging) so I do not know the related
overhead in comparison to plain old sockets...

Anybody else here that can throw some light on this? Flex AMF based
messaging or sockets?

PS: Flash 10 supposedly supports some kind if RTP protocol which at some
point will allow the creation of peer-to-peer applications, but all
references mention that it needs an adobe backend server that is not even in
the market yet. Maybe red5 will do so as well at some point? If you find
anything on this, let us know ;-)

Fotis

On Mon, Dec 1, 2008 at 9:35 AM, someguy7_7 [EMAIL PROTECTED] wrote:

   I am going to mess around and try to create a multi player online game
 with flex. Any thoughts on the best way to communicate the users
 actions back to the server? Remote Objects? Producer/Consumer
 Messaging? Morse Code?

 Thanks

  




-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],


[flexcoders] Re: getting the number of children in a grouping collection via the groupingFunction

2008-12-01 Thread djbrown_rotonews
one more time for help...

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

 i'm wanting to change the label of my groups in the 
AdvancedDataGrid, 
 and I see where that's exposed via the groupingFunction. What i'm 
 wanting to do is to modify it in such a way that it returns the 
 groupingField name itself, plus the number of children in that 
group.
 
 As an example, if I had the following data:
 
 DFW Jason
 DFW Darin
 DFW Bob
 ORD Peter
 ORD Juan
 
 I would want to the grid to display as follows:
 
 DFW (3)
 ORD (2)
 
 I'd like to indicate the number of children in each group without 
 having to add an explicity column via a SummaryRow etc..





[flexcoders] Array.split() to Vector.String Possible?

2008-12-01 Thread Brent Marshall
One thing I cannot find any documentation on is how to push a Split
direct to the Vector Class. Is it possible? 

//Results in VerifyError: Error #1033: Cpool entry 34 is wrong type.
var s:String = a,b,c;
var v:Vector.String = new Vector.String(s.split(,));

I can correctly set the data using a for each loop. Just wondering
if there's a way to skip a step. 

Are the speed benefits of using the Vector Class seen mostly when
accessing, or setting the data? 

Thanks for your help, 

Brent Marshall
http://www.eightlines.com/blog/



[flexcoders] Tree3D v2 in Flex?

2008-12-01 Thread shawnsvacha
Just curious if anyone is using Tree3D in Flex.  If so, how difficult
was it to get it working?  Alejandro (the creator) says it is a Flash
component.

Thanks,

Shawn



[flexcoders] Tree3D v2 in Flex?

2008-12-01 Thread shawnsvacha
Tried posting this earlier, but it doesn't look like it went through.

Has anyone had any success in porting Tree3D to Flex?  The developer
says it is a Flash component but doesn't know if it will work in Flex.

Thanks,

Shawn



[flexcoders] QTP Build Issue

2008-12-01 Thread Peter Dolukhanov
Hi,

I am having difficulties building a QTP-enabled application via the Ant 
mxmlc/compc tasks.

The structure of the project is a Library Project (Common.swc) and a Main Flex 
Application (Main.swf), which links to the Library Project.

Building the application using Flex Builder (including the four automation/QTP 
libraries) produces a SWF around 1.8MB is size, which is recognised by QTP.

Running the same build via an Ant script, produces a SWF around 1.1MB in size, 
which is not recognised by QTP as a Flex Application (only a
MacromediaFlashPlayerActiveX object).

Below are the four different builds and their results:

Flex Builder (No Automation)

Common.swc - 1.5MB
Main.swf - 1.1MB

Flex Builder (Automation)

Flex Compiler arguments:
-include-libraries automation/qtp.swc automation/automation.swc 
automation/automation_agent.swc automation/automation_dmv.swc

Common.swc - 2.8MB
Main.swf - 1.8MB - Recognised in QTP

Ant (No Automation)

compc output=Common\Common.swc include-classes=${compc.classes} 
include-file=${compc.assets}
 source-path path-element=Common\src /

 library-path dir=${libs.dir} append=true
  include name=*.swc /
 /library-path

/compc

mxmlc file=Main\Main.mxml output=Bin\Main.swf

 source-path path-element=Main\src /

 library-path dir=${libs.dir} append=true
  include name=*.swc /
 /library-path

 library-path file=Common\Common.swc  append=true/

/mxmlc

Common.swc - 1.5MB
Main.swf - 1.1MB

Ant (Automation)

compc output=Common\Common-automation.swc include-classes=${compc.classes} 
include-file=${compc.assets}

 source-path path-element=Common\src /

 library-path dir=${libs.dir} append=true
  include name=*.swc /
 /library-path

 include-libraries dir=${automation.dir} append=true
  include name=automation.swc /
  include name=automation_agent.swc /
  include name=automation_dmv.swc /
  include name=qtp.swc /
 /include-libraries

/compc

mxmlc file=Main\Main.mxml output=Bin\Main-automation.swf

 source-path path-element=Main\src /

 library-path dir=${libs.dir} append=true
  include name=*.swc /
 /library-path

 library-path file=Common\Common-automation.swc  append=true/

 include-libraries dir=${automation.dir} append=true
  include name=automation.swc /
  include name=automation_agent.swc /
  include name=automation_dmv.swc /
  include name=qtp.swc /
 /include-libraries

/mxmlc

Common-automation.swc - 2.8MB
Main-automation.swf - 1.1MB - Not recognised in QTP

I have successfully used Ant to build QTP-enabled applications in the past, 
although never with a linked SWC.

Am I doing something wrong, or is this potentially a bug with the Ant 
mxmlc/compc tasks?

Thanks,
Peter


[flexcoders] Re: HTML IN FLEX

2008-12-01 Thread langdonjared
You say you got this working in Air?  I cannot get it to work.  The 
image doesn't load.  Where did you put chart.png in your project 
structure?  Is in in src?  In the project root?  In the bin directory?  
I tried all with no luck.  Thanks.




[flexcoders] Open source question.. regarding Flex project 2007

2008-12-01 Thread bladev_devbla
Does anyone know how to solve this possible legal issue.

I created a website I wish to fully open source. The programmer and I
both own shared rights to code in our area's (mine: front, his:
functionality). Recently he has simply gone round me and published on
the front-end which was my section with regards to e.g. authorship,
copyright law here in the Netherlands. (he earns money off doing this
of course.. basically at my expense )

My question is.. 

Can I simply publish the whole project for developers 'open source' or
do I still need some kind of permission from him?? do I need it
anymore, at all, ever? 

We had no formal contracts, I see it this way; the trust has been
broken so I don't feel I need his permission anymore.. if at all, but
am curious what you all think.. 

Kind regards, Sam 





[flexcoders] Programatically scrolling to a newly created directory in the FileSystemTree

2008-12-01 Thread paulgrantgain
Hi

I am using the FileSystemTree component to view the filesystem. I have
a button below the tree which adds a new subdirectory to the currently
selected directory.

When there are too many subdirectories for the viewable area the new
subdirectory is added to the tree but is out of view. What is the best
approach to programatically scroll to the newly created subdirectory?

Regards

Paul





[flexcoders] Open in FLASH PLAYER

2008-12-01 Thread ew6014
Hi guys,

Can anyone tell me how to open flash player from flex builder 3  when
i click run instead of running firefox browser?

ive seen someone do it, but he did not show me how it was done.

please forgive me if this question has been asked before. wasnt sure
what keyword to use 

great thanks




[flexcoders] What exactly is an illegal cue point, how do I fix?

2008-12-01 Thread stephendricketts
I'm getting an error that says: illegal cue point: Time must be 
number and/or name must not be undefined or null.  Here is the line 
that sets the cue points.

pubVideo.cuePointManager.setCuePoints(actionVideo[0])

I've checked the actionVideo array and all entries have a valid time 
and name.  However, there are some times that are the same.  I 
thought they might be the problem so I add .1 to the time so there 
are no duplicates and it still gives the same error.

This error occurs in:
getCuePointIndex(cuePointArray:Array, closeIsOK:Boolean,time:Number, 
name:String,start:Number, len:Number):Number 

And here the time is NaN and name is null.

Are there any rules about setting cue points that I should know about 
that might give this error?

Many thanks!



Re: [flexcoders] Nulls in data binding chains

2008-12-01 Thread Michael Prescott
Thanks, Dave.  My only concern was that it would turn out not to be
supported behavior and might stop working in certain circumstances - before
I plough ahead and rely on it. :-)

Regards,

Michael

On Sun, Nov 30, 2008 at 11:33 AM, Dave Kong [EMAIL PROTECTED] wrote:

   I dont know any docs, but I think it happened to me a couple of times
 and the result is that the databinding simply does not fire for any changes
 after the null in the chain.

 Do a simple test app and try it out. it will be faster than you looking for
 the doc.


 On Fri, Nov 28, 2008 at 12:01 PM, Michael Prescott 
 [EMAIL PROTECTED] wrote:

   Is there any reference material that describes how Flex behaves when it
 encounters a null part way along a data binding chain?

 Michael


  



[flexcoders] AIR - Including an Image in mx:html using htmlText

2008-12-01 Thread langdonjared
How does one reference files like images when using an mx:html tag and
the htmlText property? Here's the basic idea:

private var strHtmlText:XML =
html
head
titleTest/title
/head
body
img width=100px height=100px alt=image src=foo.jpg /
/body
/html
...
mx:HTML width=800 height=800 htmlText={strHtmlText.toString()} /

This doesn't work. The image doesn't appear but the alt text does. I
tried playing with the value in the src attribute of the image object
in the html string to no avail. I tried app:foo.jpg, app:/foo.jpg,
app://foo.jpg, and /foo.jpg. I event tried @Embed(source='foo.jpg'). I
have copies of foo.jpg in the project root, the src directory, and in
bin-debug. Nothing works. I feel a bit silly posting this because it
must be obvious, but I've searched and searched for the answer with no
luck. Thanks.



[flexcoders] Is there a simple Flex/Flash component for making PayPal buy buttons and carts?

2008-12-01 Thread obrian_tom
Ideally, free.



[flexcoders] flex login popup help needed pleaseeeeeeeee

2008-12-01 Thread stinasius
hello guyz i am having a problem with the login form. i am using the
example of bruce phillps which can be found at this url
Login-System-For-A-Flex-Application-With-ColdFusion-Backend-Part-3--Custom-Login-Form-Component.htm.
here is where am confused: my custom login form is
called as a pop-up window from the main application while bruce's
example it is called through another custom component(hope you
understand what am saying),
anyhow my question is HOW CAN I HANDLE LOGIN SUCCESS THROUGH A POPUP
LOGIN FORM here is my code

upload_form.as

// ActionScript file
import mx.managers.PopUpManager;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import flash.events.Event;
private var fileRef:FileReference;
import mx.utils.ObjectUtil;
import mx.events.ValidationResultEvent;


  // Define private variable to hold the Member
//object returned by the CFC method
private var __member:Member;
   
   
// Define a getter method for the private variable.
public function get member():Member {

return __member;

}//end get member


/*Called automatically when the result is returned by the
CFC method getMemberByUserNameAndPassword
*/
public function
resultGetMemberByUserNameAndPassword(event:ResultEvent):void {

   //used for debugging - shows details about result
   //returned by the CFC method
   //Alert.show( ObjectUtil.toString(event.result) );
   
   /*result returned is a Member object
 cast the result returned to a Member class 
and assign it to our Member object*/
   __member = event.result as Member ;
   
   //remove text in the login input fields
   memUserName.text=;
   memPassword.text=;
   
   // Define event object, initialize it, then dispatch it.
   dispatchEvent(new Event(loginSuccess));
 
   
} //end function getMemberByUserNameAndPassword


/*
  automatically called if the CFC method call causes an error
*/  
private function
faultGetMemberByUserNameAndPassword(event:FaultEvent):void{

//Alert.show( ObjectUtil.toString(event.fault) );

//Alert.show(event.fault.faultString );

currentState = 'loginError';


}//end function faultGetMemberByUserNameAndPassword


/*Function is called automatically when the user makes
changes to any of the registration input fields
if all input fields are valid, the register btn is enabled
*/
private function validateRegistration():void {
var usernameResult:ValidationResultEvent =
userNameValidator.validate();
var passwordResult:ValidationResultEvent =
passwordValidator.validate();
var firstnameResult:ValidationResultEvent =
firstNameValidator.validate();
var lastnameResult:ValidationResultEvent =
lastNameValidator.validate();
var emailResult:ValidationResultEvent = emV.validate();
var phoneResult:ValidationResultEvent = phV.validate();
var photoResult:ValidationResultEvent = 
photoValidator.validate();
var zipResult:ValidationResultEvent = zipValidator.validate();  
var confirmResult:ValidationResultEvent = confirmPsV.validate();

if (usernameResult.type == ValidationResultEvent.VALID 
passwordResult.type == ValidationResultEvent.VALID ) {

   loginButton.enabled = true;


}

else if(usernameResult.type == ValidationResultEvent.VALID 

passwordResult.type == 
ValidationResultEvent.VALID 
firstnameResult.type == 
ValidationResultEvent.VALID 
lastnameResult.type == 
ValidationResultEvent.VALID 
emailResult.type == ValidationResultEvent.VALID 

phoneResult.type == ValidationResultEvent.VALID 

   

[flexcoders] [INFO] FLEX Effects slowing down with time

2008-12-01 Thread Whyves

Just wanted to pass on this bit of information as it may be very difficult to
find an answer for this on the web. Maybe it could help someone some day.

I was building an application that was using a Zoom flex effect when the
user would mouse over a UIComponent. It was working very well but I noticed
that it would become sluggish with time. The more the zoom effect was
activated, the slower it would become. I searched left and right for the
cause of this and I finally found the solution when I approached the problem
from a different angle. In my updateDisplayList function, I was drawing on
the canvas using some graphic methods. Basically, I was just drawing a
circle using the lineStyle(), beginFill() and drawCircle() methods. Nothing
new here. However, I also realized that I was not clearing up the canvas
using the clear() method before drawing. This was the problem! I suppose
that the flash plugin stores all drawing commands in a buffer and executes
them when it renders the scene. By not clearing the canvas first, I was
adding more drawing commands with each call to updateDisplayList ... and
with a tween, updateDisplayList is called many times!

Therefore, if you ever notice that your effects are slowing down with time,
make sure that you called graphics.clear() before drawing on the
UIComponent.%-|
-- 
View this message in context: 
http://www.nabble.com/-INFO--FLEX-Effects-slowing-down-with-time-tp20770945p20770945.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] What exactly is an illegal cue point, how do I fix?

2008-12-01 Thread Paul Andrews

- Original Message - 
From: stephendricketts [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, November 30, 2008 5:59 PM
Subject: [flexcoders] What exactly is an illegal cue point, how do I fix?


 I'm getting an error that says: illegal cue point: Time must be
 number and/or name must not be undefined or null.  Here is the line
 that sets the cue points.

 pubVideo.cuePointManager.setCuePoints(actionVideo[0])

 I've checked the actionVideo array and all entries have a valid time
 and name.  However, there are some times that are the same.  I
 thought they might be the problem so I add .1 to the time so there
 are no duplicates and it still gives the same error.

I have a feeling you might be adding .1 to a string..

 This error occurs in:
 getCuePointIndex(cuePointArray:Array, closeIsOK:Boolean,time:Number,
 name:String,start:Number, len:Number):Number

 And here the time is NaN and name is null.

 Are there any rules about setting cue points that I should know about
 that might give this error?

 Many thanks!


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links






RE: [flexcoders] Re: Crash of safari, firefox using XML.setChildren for XML in a XMLListCollection

2008-12-01 Thread Tracy Spratt
The docs are a bit misleading when it comes to XML.  Try using XML with
the tree, it works great.  

 

The warnings occur because most of the properties you deal with are
dynamic objects, which are not bindable.  Solve that by casting(object
as XML) or converting(XML(object)) the object to the underlying XML.

 

Do your nodes have unique id's?  That makes things simple.  

 

That is a very arcane way to delete a node.

 

Remind me, what was the problem using removeItemAt()?  Were you using it
with the selected nodes parent, and the selectedNodes child index?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of shauncutts
Sent: Friday, November 28, 2008 5:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Crash of safari, firefox using XML.setChildren
for XML in a XMLListCollection

 


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

 First, if you are using a tree, why have you chosen XMLListCollection
 instead of XML. For hierarchical data, XML is easier to work with than
 nested collections.

I thought an XMLListCollection was what you should use for a Tree
control -- like using an ArrayCollection with a DataGrid.


http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_8.htm
l#397087

If the Tree represents dynamically changing data, you should use
a collection, such as the standard ArrayCollection
http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection
.html  or XMLListCollection
http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollecti
on.html  object, as the data provider. 


 Next, you say, XML doesn't send notifications. Why do you say that?
 And exactly what do you mean? XML is bindable.

This is from:

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

If the Tree represents dynamically changing data, you should use a
collection, such as the standard ArrayCollection
http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection
.html  or XMLListCollection
http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollecti
on.html  object, as the data provider. 

It seems to be confirmed by the warning messages in the debugger I get
from the collections when I'm fooling around with the underlying XML.

 If you are using XML, then you delete a node using the delete
operator
 and an e4x expresaion:
 
 delete myXML.myNode.(myexpression)[0];

Ah ... thanks! I'll try this.
 
 NOTE: You cannot use a variable containing a reference to the node you
 want to delete, you must use the expression directly

Um... but this might be a hinderance. I'm trying to react to an event
generated from the Tree control (or rather a delete button, to delete
selected branch)... I get the node in tree.selectedChild.

Right now I'm getting the index of the child in the parent using
childIndex, going up to the parent, making a copy of all the children
*except* for the current child in a new XML List then setting the
children of the parent using setChildren -- this tends to crash when the
XML is in an XMLList which is the source of an XMLListCollection.

But when it doesn't crash, I'm calling validateNow() on the Tree, then
attempting to set the selectedChild to be the child of the XML before
the node I just deleted -- this doesn't always work though.

If anyone has any suggestions to replace this seemingly much to complex
process with one that works better, I'd be very grateful!

 The concept of an index seems inherently linear. I don't know how
one
 would implement it in a hierarchy. I have never been tempted to try to
 use it.

Um... well the Tree provides both selectedChild and selectedIndex... the
later could be a path in the tree to get to the node, for example. [
list of indexes -- one for the top level XMLList, then the child's index
in the parent down to the item selected.
 
Or on the other hand if this isn't supported, then probably the class
heirarchy should be reworked a little, get rid of selectedIndex for
Trees. (Not that I'm complaining -- flex is obviously lightyears better
than javascript.)



 



[flexcoders] Re: How to update menubar dataprovider

2008-12-01 Thread Amy
--- In flexcoders@yahoogroups.com, Fotis Chatzinikos 
[EMAIL PROTECTED] wrote:

 Would UI components automatically catch this?

Yes.  For more info
http://tinyurl.com/databinding



[flexcoders] Applying a dissolve effect to a TitleWindow

2008-12-01 Thread oneworld95
Hi. I've got a TitleWindow that needs to dissolve in when the user
clicks the Button that creates it. The TitleWindow is in the Help.mxml
file and looks like this,

?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=vertical width=400 height=300 showCloseButton=true
close=titleWindow_Close(event);
creationComplete=handleCreationComplete()

mx:Script
![CDATA[
import mx.managers.PopUpManager;

private function handleCreationComplete():void {
// Center the TitleWindow container 
// over the control that created it.
PopUpManager.centerPopUp(this);
}

private function titleWindow_Close(event:Event):void {
PopUpManager.removePopUp(this);
}
]]
/mx:Script
mx:HBox showEffect={dissolveIn} hideEffect={dissolveOut} 
 
mx:Button 
label=Cancel
click=titleWindow_Close(event);/ 
/mx:HBox 
mx:Dissolve id=dissolveOut duration=5000 alphaFrom=1.0
alphaTo=0.0/
mx:Dissolve id=dissolveIn duration=5000 alphaFrom=0.0
alphaTo=1.0/

/mx:TitleWindow

On the main Flex app, it calls the Help.mxml window like this,

private function showLogin():void {
// Create a non-modal TitleWindow container.
var helpWindow:TitleWindow = 
TitleWindow(PopUpManager.createPopUp(this, Help, true));
}

How do I apply an effect to this TitleWindow for when it's showing and
hiding? Thanks.

-Alex



[flexcoders] Re: Flex nested tree get data from mysql and php

2008-12-01 Thread Amy
--- In flexcoders@yahoogroups.com, timgerr [EMAIL PROTECTED] wrote:

 Amy, as always, you rock, that url was a good read.  My problem is I
 am not sure how many children I will have or what the structure will
 look like.  I am doing a tree so I can have n number of nodes or
 children, and I am not sure how to build the return object/array. 

Your app will probably perform better if you don't try to build the 
whole tree at once.

But you might want to google on recursion.  Essentially, the 
principle is to use a function that works on an object in such a way 
that if the object has children, the function will call itself again 
for each child.  That's not as difficult as it sounds, once you get 
your head around it--you just have to trust the recursion to do its 
thing and not force it.  Probably someone has even posted some 
recursive PHP examples.

Another way to approach it is to use the composite pattern and just 
populate the first level of objects, then once each object is 
instantiated it will start pulling down its own children and so on.  
This is sort of how I handle it, but I didn't make it where that 
always happens automatically so that if those resources are needed 
for something else the process can be interrupted.

Oh, and one last thing...if your database technology isn't set in 
stone, you might want to consider using SQL Server, because Shape 
queries are made for this.  AFAIK, other databases don't have 
anything that does this quite so nicely.

HTH;

Amy



Re: [flexcoders] Open source question.. regarding Flex project 2007

2008-12-01 Thread Samuel Colak

Sam,

(From another Sam in the Netherlands).

If i read your email correctly, at this moment the developed product  
is NOT open source but is intended to become such - as a result, you  
have significant

standing upon the subject.

If you'd like further information please give me a shout at sam.colak  
at me.com.


Wish you all the best.
Samuel


On Nov 30, 2008, at 2:36 AM, bladev_devbla wrote:


Does anyone know how to solve this possible legal issue.

I created a website I wish to fully open source. The programmer and I
both own shared rights to code in our area's (mine: front, his:
functionality). Recently he has simply gone round me and published on
the front-end which was my section with regards to e.g. authorship,
copyright law here in the Netherlands. (he earns money off doing this
of course.. basically at my expense )

My question is..

Can I simply publish the whole project for developers 'open source' or
do I still need some kind of permission from him?? do I need it
anymore, at all, ever?

We had no formal contracts, I see it this way; the trust has been
broken so I don't feel I need his permission anymore.. if at all, but
am curious what you all think..

Kind regards, Sam







Re: [flexcoders] Game Architecture

2008-12-01 Thread Samuel Colak

Depends on the number of simultaneous clients and the time-impact.

One note to take into account is security of the game - using sockets  
does
not scale in direct user to user communications unless limited to one  
or two.


Remote Objects work well but introduce security issues.

Quite often i use remoteobjects for informing of changes to the state  
of the system
and webservices to deal with secure stuff (rewards, purchasing and so  
on).


On Dec 1, 2008, at 8:35 AM, someguy7_7 wrote:


I am going to mess around and try to create a multi player online game
with flex. Any thoughts on the best way to communicate the users
actions back to the server? Remote Objects? Producer/Consumer
Messaging? Morse Code?

Thanks







[flexcoders] Re: Game Architecture

2008-12-01 Thread someguy7_7
Can you give me some more details on the security issues relating to
remote objects?

How do you notify the other client when one client has taken a turn
with remote objects? Have it poll the server constantly for updates?

Any thoughts on if using a consumer/producer messaging will be good or
not scaleable enough for the amount of calls?

Thanks

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

 Depends on the number of simultaneous clients and the time-impact.
 
 One note to take into account is security of the game - using sockets  
 does
 not scale in direct user to user communications unless limited to one  
 or two.
 
 Remote Objects work well but introduce security issues.
 
 Quite often i use remoteobjects for informing of changes to the state  
 of the system
 and webservices to deal with secure stuff (rewards, purchasing and so  
 on).
 
 On Dec 1, 2008, at 8:35 AM, someguy7_7 wrote:
 
  I am going to mess around and try to create a multi player online game
  with flex. Any thoughts on the best way to communicate the users
  actions back to the server? Remote Objects? Producer/Consumer
  Messaging? Morse Code?
 
  Thanks
 
 
 





Re: [flexcoders] Open in FLASH PLAYER

2008-12-01 Thread Tom Chiverton
On Sunday 30 Nov 2008, ew6014 wrote:
 Can anyone tell me how to open flash player from flex builder 3  when
 i click run instead of running firefox browser?

Click the little arrow next to the run button, choose 'run as Flex 
Application'.

-- 
Tom Chiverton
Helping to confidentially implement robust sexy scalable back-end 
design-patterns





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
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
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: getting the number of children in a grouping collection via the groupingFunction

2008-12-01 Thread Amy
--- In flexcoders@yahoogroups.com, djbrown_rotonews 
[EMAIL PROTECTED] wrote:

 one more time for help...
 
 --- In flexcoders@yahoogroups.com, djbrown_rotonews 
 djbrown_rotonews@ wrote:
 
  i'm wanting to change the label of my groups in the 
 AdvancedDataGrid, 
  and I see where that's exposed via the groupingFunction. What i'm 
  wanting to do is to modify it in such a way that it returns the 
  groupingField name itself, plus the number of children in that 
 group.
  
  As an example, if I had the following data:
  
  DFW Jason
  DFW Darin
  DFW Bob
  ORD Peter
  ORD Juan
  
  I would want to the grid to display as follows:
  
  DFW (3)
  ORD (2)
  
  I'd like to indicate the number of children in each group without 
  having to add an explicity column via a SummaryRow etc..
 


I don't have time to specifically look into your question, but you 
might find that some of the concepts illustrated in this example can 
be extrapolated to solve your problem:

http://flexdiary.blogspot.com/2008/09/groupingcollection-example-
featuring.html



[flexcoders] Re: Crash of safari, firefox using XML.setChildren for XML in a XMLListCollection

2008-12-01 Thread valdhor
The reason it is failing is because of the following line:

data.setChildren( new XMLList() );

You are passing the setChildren method a memory location of an empty list.

This should give an error rather than crashing the browser.


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

 Thanks... I'll file one.
 
 But... why is it failing? In my mind, this should delete the node b/
 from a b/ /a.
 




[flexcoders] flex plugin (on zend) - hide certain warnings

2008-12-01 Thread dnk
Hi there...

I was wondering if it was possible to hide certain warnings (in the  
problems pane) that are not relevant?

In my case I am using zend with the flex builder plugin and on  
every project, the HTML templates generated by the flex plugin show  
warnings about Undefined attribute name (IE bgcolor, etc). And I  
just would prefer if I could hide certain ones that I have already  
looked at. This would make it easier to notice when new ones pop up.

Thanks!

D





Re: [flexcoders] Array.split() to Vector.String Possible?

2008-12-01 Thread Brent Dearth
Fellow Brent ...

You need to use the Global Vector() function:

var blahVector:Vector.String = Vector.String(String(blah1 blah2
blah3).split( ));

More info: http://livedocs.adobe.com/flex/3/langref/package.html#Vector()



On Fri, Nov 28, 2008 at 10:28 PM, Brent Marshall
[EMAIL PROTECTED]wrote:

   One thing I cannot find any documentation on is how to push a Split
 direct to the Vector Class. Is it possible?

 //Results in VerifyError: Error #1033: Cpool entry 34 is wrong type.
 var s:String = a,b,c;
 var v:Vector.String = new Vector.String(s.split(,));

 I can correctly set the data using a for each loop. Just wondering
 if there's a way to skip a step.

 Are the speed benefits of using the Vector Class seen mostly when
 accessing, or setting the data?

 Thanks for your help,

 Brent Marshall
 http://www.eightlines.com/blog/

  



[flexcoders] Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread sailorsea21
Hi everyone, is it possible to export to Excel?

If I have a chart or a datagrid, is it possible to export it to 
Microsoft Excel?

Thanks.

-David.



RE: [flexcoders] Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread Dimitrios Gianninas
Yes and no.
 
1) You can send the data back to a server, have it generate the Excel file and 
send it back to the user's browser.
 
2) With Flash Player 10, you can save a file to the local PC...so generate a 
CSV file and Excel should open it assuming it is the default program for that 
file type.
 
Dimitrios Gianninas
RIA Developer Team Lead
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
sailorsea21
Sent: Monday, December 01, 2008 1:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 3 - Export to Microsoft Excel?



Hi everyone, is it possible to export to Excel?

If I have a chart or a datagrid, is it possible to export it to 
Microsoft Excel?

Thanks.

-David.



 

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

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



[flexcoders] Re: Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread nathanpdaniel
http://code.google.com/p/as3xls/

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

 Hi everyone, is it possible to export to Excel?
 
 If I have a chart or a datagrid, is it possible to export it to 
 Microsoft Excel?
 
 Thanks.
 
 -David.





Re: [flexcoders] Looking for what this[iscalled]

2008-12-01 Thread Dave Kong
If you define lung as a public field of the class Whale, then it is no
longer a dynamic property, it is declared with a strong type.  I don't
believe those objects created at runtime via abc.xyz or abc[xyz] has any
type associated with them, assuming xyz is not already declared as a field
of abc.

On Sun, Nov 30, 2008 at 2:01 PM, gabriel montagné [EMAIL PROTECTED]wrote:

   Hi.


 On Sun, Nov 30, 2008 at 10:11 AM, Dave Kong [EMAIL 
 PROTECTED]davekong%40gmail.com
 wrote:
  Isn't height the dynamic property of another dynamic property
  this[something] (which is equivalent to this.something)?

 I wouldn't exactly say it like that. Dynamically accessing a property of an
 object using the [] operator (as opposed to using the dot syntax) has some
 special implications, the most important being type checking, both at
 compile-time and at run-time.

 If you have something like,
 package
 {
 public class Whale
 {
 public var lung:Lung;
 }
 }

 the compiler will rightfully choke if you tried to do something like

 var humpback:Whale = new Whale();
 humpback.lung = new Gill();

 But it wouldn't be able to notice if you did it like this:
 humpback[lung] = new Gill();

 or
 humpback[leg] = new HairyLeg();

 There, you'd get your type coercion and property errors only until runtime.

 It does have its rightful uses, of course, and you might want to check
 about
 dynamic classes, etc. but you should be mindful about them.

 gabriel.

 --
 gabriel montagné láscaris comneno
 http://rojored.com
 t/506.8367.6794
  



[flexcoders] Re: Is there a simple Flex/Flash component for making PayPal buy buttons and carts?

2008-12-01 Thread Dave Kong
--- In flexcoders@yahoogroups.com, obrian_tom [EMAIL PROTECTED] wrote:

 Ideally, free.


I have a sample for paypal button here:
http://www.rividian.com/samples/paypal/button/paypal.html

no shopping cart tho.



[flexcoders] Modules and Sessions

2008-12-01 Thread Mike Oliver

We are planning on the following organization for an Application.

Base Application this will contain a scalable application with a canvas and
an Toolbar across the top.

The Application will be secured by user login in a popup form window.

The tool bar buttons will load modules in the canvas from separate Module
WebApps for ease of Maintenance and flexibility.

Before we get too far I wanted to ask this group if there are any gotchas
in our plan?  

Specifically, are we correct that the user session is based on that base
application and any modules that load will consistently use the user session
in the base application?

Are there any coding practices we need for the AMF in this model?

We assume the modules and the actionscript for those modules carry the user
session the same as if the module was loaded from the same root path as the
Base Application, right?

Just being cautious.

Ollie
-- 
View this message in context: 
http://www.nabble.com/Modules-and-Sessions-tp20774760p20774760.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Getting Its Function Name...

2008-12-01 Thread flexawesome
Hey There,

I was wondering if it's possible to get the function name inside the
block dynamically?

I am able to get the function name by static string, is there any method
I could use to retrieve the function name?

private function getConnection():void
{
trace(Calling getConnection()); // Calling getConnection()
trace(Calling  + getItsFunctionName());   // Calling
getConnection()
}

thank you


[flexcoders] WebService using a bindable hostname

2008-12-01 Thread fishburn_david
I have the following code:

[Bindable]
private var myServerHostPort:String = af arf;

!--wsdl={myServerHostPort}/channel.asmx?wsdl--
!--wsdl=http://localhost/mmo/channel.asmx?wsdl--
!--wsdl=@ContextRoot()/mmo/channel.asmx?wsdl--
 
  
mx:WebService 
id=channelList
concurrency=single
rootURL={afariaServerHostPort}
wsdl={myServerHostPort}/mmo/channel.asmx?wsdl
fault=faultHandler(event)
makeObjectsBindable=true
mx:operation 
name=GetChannelList 
makeObjectsBindable=true
concurrency=single
result=resultChannelListHandler(event)
mx:request xmlns=

transmitterAddress{wsTransmitterAddress}/transmitterAddress
channelFolder{wsChannelFolder}/channelFolder
/mx:request
/mx:operation
/mx:WebService

My application is defined as:
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
creationComplete=initializeApplication()
width=1100 height=800



In the debugger, I can see the initialApplication() function being called.

private function initializeApplication():void
{
trace('initializeApplication: myServerHostPort:'+myServerHostPort);
myServerHostPort = NetworkUtil.getServerURL();

trace('initializeApplication: myServerHostPort:'+myServerHostPort);
 
  
} 


In the debugger, I see the myServerHostPort = 'af arf', then it is
changed to something correct: http://localhost

After I hit F8, I get this fault reported:

faultDetail=Unable to load WSDL. If currently online, please verify
the URI and/or format of the WSDL (af arf/mmo/afaria/channel.asmx?wsdl)

You see here it is still using the original value instead of the one
set in the initializeApplication() function.


So 2 questions:

1.  Why is it even calling this WebService automatically?  I only want
to call it when I call it.  For some reason it is being called
during the initialization process and I don't want it to.

2.  Why is it using this old value?  If it is a [Bindable] variable it
should be using that.

3.  If someone can't offer a way to fix this, can you suggest
alternatives.

I have tried making the WebService calls via ActionScript myself to
bypass the issue, but the loadWSDL() never seems to complete and there
are no errors thrown.


public function initWebService():void 
{
CursorManager.setBusyCursor();
 

WS = new mx.rpc.soap.WebService();
 

//location of the Web Service Description
WS.wsdl = myServerHostPort+/channel.asmx?wsdl;
WS.endpointURI = myServerHostPort+/channel.asmx;
 

//GetChannelList is the WebService method we want to use
//and we want the results returned in the e4x XML format
 

WS.useProxy=false;
WS.requestTimeout=2;
 

WS.destination = GetChannelList;
//specify the function that will handle the results
//returned by the operation
WS.GetChannelList.addEventListener(result, resultChannelListHandler);
 

//specify the method that will handle any faults
WS.GetChannelList.addEventListener(fault, faultHandler);
 

//specify the method that will handle the
//the event of loading the WSDL
//once the WSDL is loaded we will call
//our method in the function loadHandler
WS.addEventListener(load, loadChannelListHandler);
 

//Load the WSDL for this WebService
WS.loadWSDL();
 

}//end function useWebService  
 

private function loadChannelListHandler(e:LoadEvent):void 
{
CursorManager.removeBusyCursor();
wsdlLoaded = true;
ta.text = wsdl loaded + \n\n;
}



Thanks for any feedback.

Dave




RE: [flexcoders] Getting Its Function Name...

2008-12-01 Thread Alex Harui
http://blogs.adobe.com/aharui/2007/10/debugging_tricks.html

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
flexawesome
Sent: Monday, December 01, 2008 11:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Getting Its Function Name...


Hey There,

I was wondering if it's possible to get the function name inside the block 
dynamically?

I am able to get the function name by static string, is there any method I 
could use to retrieve the function name?

private function getConnection():void
{
   trace(Calling getConnection()); // Calling getConnection()
   trace(Calling  + getItsFunctionName());   // Calling getConnection()
}

thank you



RE: [flexcoders] Modules and Sessions

2008-12-01 Thread Alex Harui
Assuming the main app and modules are built with the same version of Flex and 
served from the same domain you can share stuff between the main app and 
modules.  Otherwise, you'll have work to do, and some security issues to think 
about.  Read up on the marshall plan.

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike 
Oliver
Sent: Monday, December 01, 2008 11:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Modules and Sessions


We are planning on the following organization for an Application.

Base Application this will contain a scalable application with a canvas and
an Toolbar across the top.

The Application will be secured by user login in a popup form window.

The tool bar buttons will load modules in the canvas from separate Module
WebApps for ease of Maintenance and flexibility.

Before we get too far I wanted to ask this group if there are any gotchas
in our plan?

Specifically, are we correct that the user session is based on that base
application and any modules that load will consistently use the user session
in the base application?

Are there any coding practices we need for the AMF in this model?

We assume the modules and the actionscript for those modules carry the user
session the same as if the module was loaded from the same root path as the
Base Application, right?

Just being cautious.

Ollie
--
View this message in context: 
http://www.nabble.com/Modules-and-Sessions-tp20774760p20774760.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread Paul Kukiel
I use this method:

 

http://blog.kukiel.net/blog/2008/11/24/Flex-Data-grids-and-Excel

 

Paul.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sailorsea21
Sent: Monday, 1 December 2008 1:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 3 - Export to Microsoft Excel?

 

Hi everyone, is it possible to export to Excel?

If I have a chart or a datagrid, is it possible to export it to 
Microsoft Excel?

Thanks.

-David.

 



[flexcoders] Is there any Name -Value Pair concept for Arrays?

2008-12-01 Thread anuj181
Hi All
I am retrieving some data using HTTP from PostGres database. I would
be successfully able to put all the entries in UDN's in the list box
(using REST Calls). Now my requirement is that I need to display an
attribute name Friendly name which is already in the database as the
label (VISUAL entry ) in the list but when user performs different
operations like drag and drop, I need the complete string in form XML
to be send. So to make long story short I need to display friendly
name as list entries but behind the curtain that label have exact
complete value coming from the Database. Now is there any way that I
can tell my data provider (which is an Array in my case) that to
display just the specific attribute for the database and while doing
operation send the whole value.
Any links, examples and help will be appreciated.
Thanks
Anuj



[flexcoders] Re: Rendering Problem

2008-12-01 Thread valdhor
Check out this video from Chet Haase:

http://graphics-geek.blogspot.com/2008/09/video-sorted-details.html

He talks about turning off autoLayout which can cause flickering.

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

 Hello All,
 
 I have a very important question.
 
 What could be causing problems with rendering?! I have this
 application that every now and than flicks, the background goes white
 for a second than get back to normal. Its not really something in
 particular because that happens in a couple of components i create.
 
 One in particular that do pretty much the same as the date, opening a
 popup on the side, but everytime i open that i get this flickering
 problem.
 
 Any clue what could be causing that? i know its a very empty qustion
 but maybe someone might give me an idea what often causes flex to flick.
 
 thanks
 raf





[flexcoders] Re: Getting Its Function Name...

2008-12-01 Thread flexawesome
Awesome Alex!

It's a bit buggy , but helpful :)


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

 http://blogs.adobe.com/aharui/2007/10/debugging_tricks.html
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of flexawesome
 Sent: Monday, December 01, 2008 11:19 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Getting Its Function Name...
 
 
 Hey There,
 
 I was wondering if it's possible to get the function name inside the
block dynamically?
 
 I am able to get the function name by static string, is there any
method I could use to retrieve the function name?
 
 private function getConnection():void
 {
trace(Calling getConnection()); // Calling getConnection()
trace(Calling  + getItsFunctionName());   // Calling
getConnection()
 }
 
 thank you





Re: [flexcoders] Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread Mike Chabot
If you send the data to the server, create the Excel file there, then
send the result back to Flex, you will have the full power of the
numerous server-side Excel file creation methods at your disposal. If
you want the chart in Excel to look the same as it looks in Flex then
you might have to convert it to a bitmap first. Either that or
recreate the chart on the server. If all you need is a simple
copy/paste solution, then the method Paul mentioned would be easier to
implement.

-Mike Chabot

On Mon, Dec 1, 2008 at 1:13 PM, sailorsea21 [EMAIL PROTECTED] wrote:
 Hi everyone, is it possible to export to Excel?

 If I have a chart or a datagrid, is it possible to export it to
 Microsoft Excel?

 Thanks.

 -David.

 


[flexcoders] Debugging scrolling - minimum width

2008-12-01 Thread Richard Rodseth
Do any of the standard layout components (Application, Box, Canvas etc. have
a default size or minWidth that might be triggering a horizontal scrollbar
even when there appears to be plenty of room onscreen?

I have a rather complex and heavily-nested layout, some of which is
template-driven, and for the moment I want *no* scroll bars ever. I can
resize the window vertically to very small, but in the horizontal direction
a scrollbar appears much sooner than expected. i.e. the primitive
labels/buttons and the like are far from bumping into each other.

Any debugging tools or tips also welcome. eg. an inspector component I could
embed or popup that would let me navigate through the hierarchy and set
properties.

I am reluctant to go through the hierarchy setting scrollPolicy off, because
I think that tends to mask problems (by all means correct me if I'm wrong).


[flexcoders] how to play partially downloaded local flv file ?

2008-12-01 Thread cedvilleneuve
Hi,

I'm building a FLEX / AIR application that will need to download flv 
files to the local harddrive (files may be downloaded by parts), and 
as soon as enough of the video is stored locally, display the video 
in the GUI.

Currently my prototype uses a Stream to write the downloaded bytes to 
a file, and a FXVideo is used to play it. When enough bytes are 
stored on the local file, the source of the FXVideo is set to start 
playing the video.

The problem we encounter is the following:
- if we keep the stream open to write downloaded data, the FXVideo 
fails to open the video
- if we close the stream after each write, the FXVideo opens the 
video and starts playing it, but the application fails to reopen the 
stream to write next bytes.

Clearly this looks like a file lock issue, but I couldn't find any 
work arround or fix for it.

Anyone knows a way to do this ?



[flexcoders] Redirect from Alert

2008-12-01 Thread brucewhealton
Hello all,
I was wondering if you could explain some things or suggest
some options.  I have a page that opens in a new window and displays a
Flex form.  When the information is submitted and they click on
Submit, an Alert Box appears.  I want to have a way to take people
back to the main site, such as the index page.  Is there a way to
include a redirect with an Alert Box?
Or could there be some kind of way of handing the results of clicking
OK on the Alert box, so that when someone does click on that OK
button, it then redirects the person to a webpage?  In that scenario,
I guess what would be needed is an event listener for the Alert box
control.  

I have this form appearing on a page by itself because the background
gradient image doesn't look as good with the rest of the website
background.  However, I don't want to leave a person on the form page
when they finish submitting the form.  

I'm a bit embarrassed to say this but I'm not sure how to add a link
to such and such page from a flex application.  How would I add a
button or link on that page that would say, Click here to return to
the home page.  I want to put that into the Flex application.  

I do want to know how to do this.  However, as mentioned above, it
would be even better if when they click OK in the Alert Box, if it
would close that window that was opened and return them to the window
and web page where they were before they clicked on the link that
opened this page with the form.  Again, I want a way to not leave them
on this form page after they've submitted the form.
Thanks,
Bruce



Re: [flexcoders] Redirect from Alert

2008-12-01 Thread Guy Morton

Look at the docs for Alert. You can pass it a close handler.


On 02/12/2008, at 7:51 AM, brucewhealton wrote:


Hello all,
I was wondering if you could explain some things or suggest
some options. I have a page that opens in a new window and displays a
Flex form. When the information is submitted and they click on
Submit, an Alert Box appears. I want to have a way to take people
back to the main site, such as the index page. Is there a way to
include a redirect with an Alert Box?
Or could there be some kind of way of handing the results of clicking
OK on the Alert box, so that when someone does click on that OK
button, it then redirects the person to a webpage? In that scenario,
I guess what would be needed is an event listener for the Alert box
control.

I have this form appearing on a page by itself because the background
gradient image doesn't look as good with the rest of the website
background. However, I don't want to leave a person on the form page
when they finish submitting the form.

I'm a bit embarrassed to say this but I'm not sure how to add a link
to such and such page from a flex application. How would I add a
button or link on that page that would say, Click here to return to
the home page. I want to put that into the Flex application.

I do want to know how to do this. However, as mentioned above, it
would be even better if when they click OK in the Alert Box, if it
would close that window that was opened and return them to the window
and web page where they were before they clicked on the link that
opened this page with the form. Again, I want a way to not leave them
on this form page after they've submitted the form.
Thanks,
Bruce







[flexcoders] Re: Redirect from Alert

2008-12-01 Thread brucewhealton
As an additional clarification...
So, it is like this. 1) User is at regular html page and 2) User
clicks on link Contact Form Page - this page is based on a Flex
application.  It is surrounded by html, obviously, but mainly it is a
Flex application. 3) From within that Flex application, I want them to
be taken to the original page where they were in step #1.  Maybe when
they click OK to the Alert, they are automatically taken to that
page, or there is a link or button in the Flex application that takes
them back to where they were in step #1.
Note: With regard to step #2, the link  is defined with
target=_blank in the html.  So, I'm not sure if it would be possible
to close that windows when returning from the Flex application.


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

 Ok, but how do you add a link within a flex application?  I want a
 link or button to take the user from myflexpage.html to
 mynonflexpage.html - a link or button within the flex page to that
 page that doesn't have flex.
 Thanks,
 Bruce
 
 --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote:
 
  Look at the docs for Alert. You can pass it a close handler.
  
  
  On 02/12/2008, at 7:51 AM, brucewhealton wrote:
  
   Hello all,
   I was wondering if you could explain some things or suggest
   some options. I have a page that opens in a new window and
displays a
   Flex form. When the information is submitted and they click on
   Submit, an Alert Box appears. I want to have a way to take people
   back to the main site, such as the index page. Is there a way to
   include a redirect with an Alert Box?
   Or could there be some kind of way of handing the results of
clicking
   OK on the Alert box, so that when someone does click on that OK
   button, it then redirects the person to a webpage? In that scenario,
   I guess what would be needed is an event listener for the Alert box
   control.
  
   I have this form appearing on a page by itself because the
background
   gradient image doesn't look as good with the rest of the website
   background. However, I don't want to leave a person on the form page
   when they finish submitting the form.
  
   I'm a bit embarrassed to say this but I'm not sure how to add a link
   to such and such page from a flex application. How would I add a
   button or link on that page that would say, Click here to return to
   the home page. I want to put that into the Flex application.
  
   I do want to know how to do this. However, as mentioned above, it
   would be even better if when they click OK in the Alert Box, if it
   would close that window that was opened and return them to the
window
   and web page where they were before they clicked on the link that
   opened this page with the form. Again, I want a way to not leave
them
   on this form page after they've submitted the form.
   Thanks,
   Bruce
  
  
  
 





[flexcoders] Re: Redirect from Alert

2008-12-01 Thread brucewhealton
Ok, but how do you add a link within a flex application?  I want a
link or button to take the user from myflexpage.html to
mynonflexpage.html - a link or button within the flex page to that
page that doesn't have flex.
Thanks,
Bruce

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

 Look at the docs for Alert. You can pass it a close handler.
 
 
 On 02/12/2008, at 7:51 AM, brucewhealton wrote:
 
  Hello all,
  I was wondering if you could explain some things or suggest
  some options. I have a page that opens in a new window and displays a
  Flex form. When the information is submitted and they click on
  Submit, an Alert Box appears. I want to have a way to take people
  back to the main site, such as the index page. Is there a way to
  include a redirect with an Alert Box?
  Or could there be some kind of way of handing the results of clicking
  OK on the Alert box, so that when someone does click on that OK
  button, it then redirects the person to a webpage? In that scenario,
  I guess what would be needed is an event listener for the Alert box
  control.
 
  I have this form appearing on a page by itself because the background
  gradient image doesn't look as good with the rest of the website
  background. However, I don't want to leave a person on the form page
  when they finish submitting the form.
 
  I'm a bit embarrassed to say this but I'm not sure how to add a link
  to such and such page from a flex application. How would I add a
  button or link on that page that would say, Click here to return to
  the home page. I want to put that into the Flex application.
 
  I do want to know how to do this. However, as mentioned above, it
  would be even better if when they click OK in the Alert Box, if it
  would close that window that was opened and return them to the window
  and web page where they were before they clicked on the link that
  opened this page with the form. Again, I want a way to not leave them
  on this form page after they've submitted the form.
  Thanks,
  Bruce
 
 
 





RE: [flexcoders] Is there any Name -Value Pair concept for Arrays?

2008-12-01 Thread Tracy Spratt
dataProviders do not display anything.  But whatever your display
component, there is a way to specify which property on the item you want
to display.

 

You say your dataProvider is an array.  Are you sure?  How are you
sure?  Are you using the work array in its purely technical sense, or
in a more generic sense, that includes associative array and
arrayCollection?

 

If it is an Array, what is it an array of? (dynamic objects, scalar
values, xml nodes?)

 

What is your resultFormat?

 

Have you inspected your data in the result handler function?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of anuj181
Sent: Monday, December 01, 2008 2:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Is there any Name -Value Pair concept for Arrays?

 

Hi All
I am retrieving some data using HTTP from PostGres database. I would
be successfully able to put all the entries in UDN's in the list box
(using REST Calls). Now my requirement is that I need to display an
attribute name Friendly name which is already in the database as the
label (VISUAL entry ) in the list but when user performs different
operations like drag and drop, I need the complete string in form XML
to be send. So to make long story short I need to display friendly
name as list entries but behind the curtain that label have exact
complete value coming from the Database. Now is there any way that I
can tell my data provider (which is an Array in my case) that to
display just the specific attribute for the database and while doing
operation send the whole value.
Any links, examples and help will be appreciated.
Thanks
Anuj

 



[flexcoders] Re: Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread aphexyuri
I just completed a project with this as a feature.
I looked at various options, and using server-sider excel generation
worked out to be the most powerful...providing you have BASIC PHP
knowledge, and a hosting option / local server with PHP  pear.
 
I used a combination of AMFPHP and PEAR Spreadshhet_Excel_Writer
package(http://pear.php.net/package/Spreadsheet_Excel_Writer). Easy to
use and sooo powerful. You have full customization of how the excel
doc  cells/column etc formatting turns out.

After generating your file, you can prompt the user for download.

Good luck

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

 If you send the data to the server, create the Excel file there, then
 send the result back to Flex, you will have the full power of the
 numerous server-side Excel file creation methods at your disposal. If
 you want the chart in Excel to look the same as it looks in Flex then
 you might have to convert it to a bitmap first. Either that or
 recreate the chart on the server. If all you need is a simple
 copy/paste solution, then the method Paul mentioned would be easier to
 implement.
 
 -Mike Chabot
 
 On Mon, Dec 1, 2008 at 1:13 PM, sailorsea21 [EMAIL PROTECTED] wrote:
  Hi everyone, is it possible to export to Excel?
 
  If I have a chart or a datagrid, is it possible to export it to
  Microsoft Excel?
 
  Thanks.
 
  -David.
 
 





RE: [flexcoders] Re: Redirect from Alert

2008-12-01 Thread Tracy Spratt
navigateToURL(), using _self.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of brucewhealton
Sent: Monday, December 01, 2008 4:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Redirect from Alert

 

Ok, but how do you add a link within a flex application? I want a
link or button to take the user from myflexpage.html to
mynonflexpage.html - a link or button within the flex page to that
page that doesn't have flex.
Thanks,
Bruce

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

 Look at the docs for Alert. You can pass it a close handler.
 
 
 On 02/12/2008, at 7:51 AM, brucewhealton wrote:
 
  Hello all,
  I was wondering if you could explain some things or suggest
  some options. I have a page that opens in a new window and displays
a
  Flex form. When the information is submitted and they click on
  Submit, an Alert Box appears. I want to have a way to take people
  back to the main site, such as the index page. Is there a way to
  include a redirect with an Alert Box?
  Or could there be some kind of way of handing the results of
clicking
  OK on the Alert box, so that when someone does click on that OK
  button, it then redirects the person to a webpage? In that scenario,
  I guess what would be needed is an event listener for the Alert box
  control.
 
  I have this form appearing on a page by itself because the
background
  gradient image doesn't look as good with the rest of the website
  background. However, I don't want to leave a person on the form page
  when they finish submitting the form.
 
  I'm a bit embarrassed to say this but I'm not sure how to add a link
  to such and such page from a flex application. How would I add a
  button or link on that page that would say, Click here to return to
  the home page. I want to put that into the Flex application.
 
  I do want to know how to do this. However, as mentioned above, it
  would be even better if when they click OK in the Alert Box, if it
  would close that window that was opened and return them to the
window
  and web page where they were before they clicked on the link that
  opened this page with the form. Again, I want a way to not leave
them
  on this form page after they've submitted the form.
  Thanks,
  Bruce
 
 
 


 



RE: [flexcoders] Re: Crash of safari, firefox using XML.setChildren for XML in a XMLListCollection

2008-12-01 Thread Tracy Spratt
I think the OP was attempting to delete all of the childern of a node by
assigning an empty XMLList.  While this seems reasonable, I do not
believe it will work, at least, I was unable to do it this way.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Monday, December 01, 2008 10:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Crash of safari, firefox using XML.setChildren
for XML in a XMLListCollection

 

The reason it is failing is because of the following line:

data.setChildren( new XMLList() );

You are passing the setChildren method a memory location of an empty
list.

This should give an error rather than crashing the browser.

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

 Thanks... I'll file one.
 
 But... why is it failing? In my mind, this should delete the node b/
 from a b/ /a.
 

 



Re: [flexcoders] Is there any Name -Value Pair concept for Arrays?

2008-12-01 Thread anuj sharma
Hi Tracy
Yes I have attached code to tell you exactly how I am doing this. I am
assigning an Array to my dataProvider and my array consists of XML Nodes. I
hope I answer all of your questions. I am putting array of XML Nodes as
dataProviders in List. I hope the code below will help you. Please let me
know how to solve the problem of displaying different entities as labels and
values in the List.
Thanks for all your help
Anuj

//MXML Code
mx:HTTPService id=devicesXML method=GET resultFormat=e4x
result=devicesXMLHandler(event) showBusyCursor=true
/mx:HTTPService

mx:List id=nvrsInPoolList allowMultipleSelection=true
dragMoveEnabled=true dragEnabled=true dropEnabled=true
y=105 x=17 height=462 width=294/

//Action Script Code

[Bindable]
private var devicesInList:Array=new Array();
[Bindable]
private var devicesList:XMLList;
[Bindable]
private var poolsList:XMLList;
[Bindable]
private var devicesCollection:XMLListCollection;


public function init()
{
devicesXML.url=http://121.0.30.6:8182/config/devices;;
devicesXML.useProxy=false;
}
private function devicesXMLHandler(event:ResultEvent):void
{
devicesList = event.result.device;
devicesCollection = new XMLListCollection(devicesList);

   //Checks every device
for each (var devicesInPool:* in devicesList) {
var deviceName:String = [EMAIL PROTECTED];
var label:[EMAIL PROTECTED];

devicesInList.push(deviceName);
}
nvrsInPoolList.dataProvider = devicesInList;
}

On Mon, Dec 1, 2008 at 1:24 PM, Tracy Spratt [EMAIL PROTECTED] wrote:

dataProviders do not display anything.  But whatever your display
 component, there is a way to specify which property on the item you want to
 display.



 You say your dataProvider is an array.  Are you sure?  How are you sure?
 Are you using the work array in its purely technical sense, or in a more
 generic sense, that includes associative array and arrayCollection?



 If it is an Array, what is it an array of? (dynamic objects, scalar values,
 xml nodes?)



 What is your resultFormat?



 Have you inspected your data in the result handler function?



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *anuj181
 *Sent:* Monday, December 01, 2008 2:48 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Is there any Name -Value Pair concept for Arrays?



 Hi All
 I am retrieving some data using HTTP from PostGres database. I would
 be successfully able to put all the entries in UDN's in the list box
 (using REST Calls). Now my requirement is that I need to display an
 attribute name Friendly name which is already in the database as the
 label (VISUAL entry ) in the list but when user performs different
 operations like drag and drop, I need the complete string in form XML
 to be send. So to make long story short I need to display friendly
 name as list entries but behind the curtain that label have exact
 complete value coming from the Database. Now is there any way that I
 can tell my data provider (which is an Array in my case) that to
 display just the specific attribute for the database and while doing
 operation send the whole value.
 Any links, examples and help will be appreciated.
 Thanks
 Anuj

  



[flexcoders] Re: Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread oneworld95
Take a look at this client-side Flex solution:
http://code.google.com/p/as3xls/

-Alex

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

 Hi everyone, is it possible to export to Excel?
 
 If I have a chart or a datagrid, is it possible to export it to 
 Microsoft Excel?
 
 Thanks.
 
 -David.





RE: [flexcoders] AIR - Including an Image in mx:html using htmlText

2008-12-01 Thread Jim Hayes
It works absolutely fine for me! Using the html string you have below in a bare 
bones mxml project.
Anything else you should mention?


-Original Message-
From: flexcoders@yahoogroups.com on behalf of langdonjared
Sent: Sun 30/11/2008 16:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AIR - Including an Image in mx:html using htmlText
 
How does one reference files like images when using an mx:html tag and
the htmlText property? Here's the basic idea:

private var strHtmlText:XML =
html
head
titleTest/title
/head
body
img width=100px height=100px alt=image src=foo.jpg /
/body
/html
...
mx:HTML width=800 height=800 htmlText={strHtmlText.toString()} /

This doesn't work. The image doesn't appear but the alt text does. I
tried playing with the value in the src attribute of the image object
in the html string to no avail. I tried app:foo.jpg, app:/foo.jpg,
app://foo.jpg, and /foo.jpg. I event tried @Embed(source='foo.jpg'). I
have copies of foo.jpg in the project root, the src directory, and in
bin-debug. Nothing works. I feel a bit silly posting this because it
must be obvious, but I've searched and searched for the answer with no
luck. Thanks.



__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__winmail.dat

[flexcoders] Re: Getting Its Function Name...

2008-12-01 Thread Amy
--- In flexcoders@yahoogroups.com, flexawesome [EMAIL PROTECTED] 
wrote:

 Awesome Alex!
 
 It's a bit buggy , but helpful :)

Not sure this is any less buggy, but here's a slightly different 
approach:
http://www.actionscript.org/forums/showthread.php3?t=86924



Re: [flexcoders] Re: Getting Its Function Name...

2008-12-01 Thread Josh McDonald
That'll only work in AS2 or dynamic AS3 objects, I think. But it's easy
enough to cook up the same thing using DesrcibeTypeCache.

-Josh

On Tue, Dec 2, 2008 at 9:36 AM, Amy [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, flexawesome [EMAIL PROTECTED]
 wrote:
 
  Awesome Alex!
 
  It's a bit buggy , but helpful :)

 Not sure this is any less buggy, but here's a slightly different
 approach:
 http://www.actionscript.org/forums/showthread.php3?t=86924


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 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.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


RE: [flexcoders] LCDS - Data Management Service Problem

2008-12-01 Thread Jeff Vroom
Hi Bart,

I don't remember all of the detail from the old flashlog you sent but have a 
theory as to what is happening.You are doing two operations - creating a 
new item and adding it to the managed list.  If those two operations get put 
into separate batches - i.e. so that we do the create first on one request to 
the server before it is added to the collection, the server does not 
immediately send that create to the other client.  It is not yet subscribed 
to that item.  When the second operation comes in - add the item to the 
collection, we push that add identity to collection operation to the other 
client first - it performs the insert but at this point only has the identity 
of the object.   When you access it, we throw the IPE, then fetch the related 
object.

This is not ideal obviously... since you have paging off there shouldn't be 
pending errors on that collection.It is of course an easy matter to just 
iterate through the list in your collection event handler once to be sure all 
of the data is fetched before doing your operation.   In this code you catch 
any IPE's that are thrown, then re-call your method in the IPE's responder.

It might also be a simple matter to make sure both of those changes go in the 
same batch.   In this case, it might simply be a matter of removing the 
explicit createItem call or setting autoCommit=false and just calling commit 
yourself after the end of the operation.   The createItem is not needed as 
adding the object to a managed collection will automatically create it... in 
fact, when you call createItem you are creating a detached instance.

I'm not sure why I thought this was fixed in 2.6 though maybe was thinking you 
were doing both of those operations in the same batch.After 2.6.1 was 
released I did get the bug fix in which suppresses IPEs altogether for 
non-paged collections until the related data is fetched.  We basically just 
delay the insert until the item is available, then send the collection event at 
that time.

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Besite 
- Bart
Sent: Monday, December 01, 2008 7:34 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] LCDS - Data Management Service Problem


I Forgot to mention the link from our previous conversation :

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg99657.html


a question for Jeff Vroom (or other livecycle experts out there..)

Hi Jeff,

A few months ago I had problems with the Data Management Service of Livecycle. 
The problem was
as follows :

- I have a managed collection of users
- on the server I use the AbstractAssembler approach to manage the collection
- on one of the clients I add a user (calling the createItem function of the 
DataService)
- on the clients I connect an event listener connected to the 
users-arraycollection (that gets called when the arraycollection users changes) 
:

users.addEventListener(CollectionEvent.COLLECTION_CHANGE, 
createLabels);

- The createLabels function simply adds buttons to an HBox

private function createLabels(event:CollectionEvent):void
{
hbox.removeAllChildren();

for(var i:int=0; i  users.length; i++)
{
var  user:User =  users.getItemAt(i) as User;
var button:Button = new Button();
button.label = user.name;

hbox.addChild(button);
}
}

- Now when I run my flex client, I always get the following error :

Error: Item requested is not available. A request for the item is now pending.

It shows that while users.length is equal to 2, I get the error above when I 
the application executes the statement users.getItemAt(1).

In our previous conversation (see link below), you said this was a bug in 
Livecycle 2.5 and that is was fixed in Livecycle 2.6,...  However,
we are currently using Livecycle 2.6.1 in combination with JBoss and the 
problem still exists ... Can you help us out ?

Thank in advance !
Bart Ronsyn


inline: image001.jpginline: image002.jpg

[flexcoders] Re: Debugging scrolling - minimum width

2008-12-01 Thread Richard Rodseth
I believe I have traced this to a stray component with visible and
includeInLayout set to false. But shouldn't Box etc ignore such components
when doing measurement?

On Mon, Dec 1, 2008 at 12:40 PM, Richard Rodseth [EMAIL PROTECTED] wrote:

 Do any of the standard layout components (Application, Box, Canvas etc.
 have a default size or minWidth that might be triggering a horizontal
 scrollbar even when there appears to be plenty of room onscreen?

 I have a rather complex and heavily-nested layout, some of which is
 template-driven, and for the moment I want *no* scroll bars ever. I can
 resize the window vertically to very small, but in the horizontal direction
 a scrollbar appears much sooner than expected. i.e. the primitive
 labels/buttons and the like are far from bumping into each other.

 Any debugging tools or tips also welcome. eg. an inspector component I
 could embed or popup that would let me navigate through the hierarchy and
 set  properties.

 I am reluctant to go through the hierarchy setting scrollPolicy off,
 because I think that tends to mask problems (by all means correct me if I'm
 wrong).



RE: [flexcoders] Is there any Name -Value Pair concept for Arrays?

2008-12-01 Thread Tracy Spratt
Skip the Array entirely.

 

Use the devicesCollection directly as the dataProvider:

nvrsInPoolList.dataProvider = devicesCollection;



Then do:

mx:List id=nvrsInPoolList
labelField=[EMAIL PROTECTED] .../

 

labelField tells List what to display.

 

Then nvrsInPoolList.selectedItem will contain the entire xml node and
you can access any value from it,

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of anuj sharma
Sent: Monday, December 01, 2008 4:27 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Is there any Name -Value Pair concept for
Arrays?

 

Hi Tracy 
Yes I have attached code to tell you exactly how I am doing this. I am
assigning an Array to my dataProvider and my array consists of XML
Nodes. I hope I answer all of your questions. I am putting array of XML
Nodes as dataProviders in List. I hope the code below will help you.
Please let me know how to solve the problem of displaying different
entities as labels and values in the List.
Thanks for all your help
Anuj

//MXML Code
mx:HTTPService id=devicesXML method=GET resultFormat=e4x
result=devicesXMLHandler(event) showBusyCursor=true
/mx:HTTPService

mx:List id=nvrsInPoolList allowMultipleSelection=true
dragMoveEnabled=true dragEnabled=true dropEnabled=true 
y=105 x=17 height=462 width=294/

//Action Script Code

[Bindable]
private var devicesInList:Array=new Array();
[Bindable]
private var devicesList:XMLList;
[Bindable]
private var poolsList:XMLList;
[Bindable]
private var devicesCollection:XMLListCollection; 


public function init()
{
devicesXML.url=http://121.0.30.6:8182/config/devices
http://121.0.30.6:8182/config/devices ;
devicesXML.useProxy=false;
}
private function devicesXMLHandler(event:ResultEvent):void
{
devicesList = event.result.device;
devicesCollection = new XMLListCollection(devicesList);

   //Checks every device
for each (var devicesInPool:* in devicesList) {
var deviceName:String = [EMAIL PROTECTED];
var label:[EMAIL PROTECTED];
   
devicesInList.push(deviceName);
}
nvrsInPoolList.dataProvider = devicesInList;
}


On Mon, Dec 1, 2008 at 1:24 PM, Tracy Spratt [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

dataProviders do not display anything.  But whatever your display
component, there is a way to specify which property on the item you want
to display.

 

You say your dataProvider is an array.  Are you sure?  How are you
sure?  Are you using the work array in its purely technical sense, or
in a more generic sense, that includes associative array and
arrayCollection?

 

If it is an Array, what is it an array of? (dynamic objects, scalar
values, xml nodes?)

 

What is your resultFormat?

 

Have you inspected your data in the result handler function?

 

Tracy

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of anuj181
Sent: Monday, December 01, 2008 2:48 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Is there any Name -Value Pair concept for Arrays?

 

Hi All
I am retrieving some data using HTTP from PostGres database. I would
be successfully able to put all the entries in UDN's in the list box
(using REST Calls). Now my requirement is that I need to display an
attribute name Friendly name which is already in the database as the
label (VISUAL entry ) in the list but when user performs different
operations like drag and drop, I need the complete string in form XML
to be send. So to make long story short I need to display friendly
name as list entries but behind the curtain that label have exact
complete value coming from the Database. Now is there any way that I
can tell my data provider (which is an Array in my case) that to
display just the specific attribute for the database and while doing
operation send the whole value.
Any links, examples and help will be appreciated.
Thanks
Anuj

 

 



RE: [flexcoders] Looking for what this[iscalled]

2008-12-01 Thread Gordon Smith
 I don't believe those objects created at runtime via ... abc[xyz] has any 
 type associated with them

That's not true. If you set

abc[xyz] = foo

then

abc[xyz] is String

should be true, whereas if you set

abc[xyz] = 3

then

abc[xyz] is int

should be true. The values you store have definite types at runtime, although 
at compile time the type of abc[xyz] is considered to be *.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dave 
Kong
Sent: Monday, December 01, 2008 10:42 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Looking for what this[iscalled]


If you define lung as a public field of the class Whale, then it is no longer a 
dynamic property, it is declared with a strong type.  I don't believe those 
objects created at runtime via abc.xyz or abc[xyz] has any type associated 
with them, assuming xyz is not already declared as a field of abc.
On Sun, Nov 30, 2008 at 2:01 PM, gabriel montagné [EMAIL 
PROTECTED]mailto:[EMAIL PROTECTED] wrote:

Hi.


On Sun, Nov 30, 2008 at 10:11 AM, Dave Kong [EMAIL 
PROTECTED]mailto:davekong%40gmail.com wrote:
 Isn't height the dynamic property of another dynamic property
 this[something] (which is equivalent to this.something)?
I wouldn't exactly say it like that. Dynamically accessing a property of an
object using the [] operator (as opposed to using the dot syntax) has some
special implications, the most important being type checking, both at
compile-time and at run-time.

If you have something like,
package
{
public class Whale
{
public var lung:Lung;
}
}

the compiler will rightfully choke if you tried to do something like

var humpback:Whale = new Whale();
humpback.lung = new Gill();

But it wouldn't be able to notice if you did it like this:
humpback[lung] = new Gill();

or
humpback[leg] = new HairyLeg();

There, you'd get your type coercion and property errors only until runtime.

It does have its rightful uses, of course, and you might want to check about
dynamic classes, etc. but you should be mindful about them.

gabriel.

--
gabriel montagné láscaris comneno
http://rojored.com
t/506.8367.6794