[flexcoders] First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread oneproofdk
I'm using AMFPHP 1.9B and have created a service called
inventory.getInventoryGroups - in the AMF service browser I see the
result just perfect. :
(mx.collections::ArrayCollection)#0
   filterFunction = (null)
   length = 5
   list = (mx.collections::ArrayList)#1
 length = 5
 source = (Array)#2
   [0] (Object)#3
 data = 1
 label = Moduler
   [1] (Object)#4
 data = 2
 label = Hylder
   [2] (Object)#5
 data = 3
 label = Skuffer
   [3] (Object)#6
 data = 4
 label = Hvidlakerede bakker
   [4] (Object)#7
 data = 5
 label = Andet
 uid = 42A87A93-37B2-1BCF-2D31-1E7CD7004C04
   sort = (null)
   source = (Array)#2

But when I try to use the result in Flex (I've modified the examples
from Adobe
http://www.adobe.com/devnet/flex/articles/flex2_amfphp.html, using a
RemotingConnection copied from the Adobe example.

The problem is, that I get an Object back from AMFPHP and I just cant
figure out how to use that ??

This is my AS snippet :
public var gateway : RemotingConnection;
 public function initApplication():void
 {
 gateway = new RemotingConnection( gwurl );
 gateway.call( inventory.getInventoryGroups, new
Responder(onResult, onFault));
 }
 public function onResult( result : Object ) : void
 {
 trace( result );
 selInventoryGroups.dataProvider = result as ArrayCollection;
 }
 public function onFault( fault : String ) : void
 {
 trace( fault );
 }

I'm trying to populate a simple ComboBox with the result ! What have I
done wrong  [:-/]  ?

BTW If I select result : ArrayCollection it returns an error Cant
convert Object to ArrayCollection

Thanks for your help,
Mark



[flexcoders] Re: Flash game ESC problem

2007-11-08 Thread helix206
Sory for the late reply.

Well, in my case, we are making games for kids, from age 7-11, and all 
games run in full screen. We dont want the kids to press escape and get 
MINIMAZED windows, we want to game to exit completly on ESC, or block 
ESC and expose an exit button in game just like all other games do. The 
main point here is to make Flash tehnoloty transparent.

The directX world wanted ALT+TAB blocked just to block users to get to 
windows while the game is running so it cant be easely cracked, or in 
MMORPG world, so that to pockets cant be sniffed easely. 

All those blocks are used to prevent bad people to do bad things to 
your software.



RE: [flexcoders] Deploying a Flex web app in a J2EE container from Eclipse(flex builder)

2007-11-08 Thread Gregor Kiddie
We use Ant to help build our application and deploy it onto our J2EE
server.

 

If you want a ready made solution, take a look at

 

http://code.google.com/p/antennae/

 

It may fit your needs.

 

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 mattmadhavan
Sent: 07 November 2007 21:32
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Deploying a Flex web app in a J2EE container from
Eclipse(flex builder)

 

Hello,
I am using flex builder 3.0 beta 2. When I create a java/Flex app I
would like to know if I can deploy it to a a J2EE server from within
the the flex builder.

Currently after I create a flex/java web app, I have to use MyEclipse
to add web capabilities and use my eclipse to deploy it.

I am sure there got to be a easier way to do this via FlexBuilder or
via eclipse WTP (Flex builder adds the WTP nature to the project
anyway!).

Any ideas please?

Thanks
Matt

 



[flexcoders] [ AIR ] Create files on local system possible ?

2007-11-08 Thread Adnan Doric
Hello,

I can read and write existing files on local system, but if I try to 
save (create) to a file that does non exist, I get the following error :

Error #3003: File or directory does not exist.

How to create a file on local system if it does not exists please ?

Thank you in advance,
Adnan


Re: [flexcoders] First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread Muzak
Use ObjectUtil.toString() to see what type the result really is in the Console, 
my guess is it's an Array though.

import mx.utils.ObjectUtil;

public function onResult( result:Object ):void {
trace(ObjectUtil.toString(result));
selInventoryGroups.dataProvider = new ArrayCollection(result as Array);
}


- Original Message - 
From: oneproofdk [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, November 08, 2007 10:38 AM
Subject: [flexcoders] First attemt at getting result back from AMFPHP - Why is 
it a Object


I'm using AMFPHP 1.9B and have created a service called
inventory.getInventoryGroups - in the AMF service browser I see the
result just perfect. :

I'm trying to populate a simple ComboBox with the result ! What have I
done wrong  [:-/]  ?

BTW If I select result : ArrayCollection it returns an error Cant
convert Object to ArrayCollection

Thanks for your help,
Mark




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


[flexcoders] First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread oneproofdk
Sorry if this is a double posting - but my first post never showed up ?

I am using AMFPHP 1.9B and have created a service
inventory.getInventoryGroups - when I test it in the AMF service
browser - it works fine and returns this result :
(mx.collections::ArrayCollection)#0
  filterFunction = (null)
  length = 5
  list = (mx.collections::ArrayList)#1
length = 5
source = (Array)#2
  [0] (Object)#3
data = 1
label = Moduler
  [1] (Object)#4
data = 2
label = Hylder
  [2] (Object)#5
data = 3
label = Skuffer
  [3] (Object)#6
data = 4
label = Hvidlakerede bakker
  [4] (Object)#7
data = 5
label = Andet
uid = 42A87A93-37B2-1BCF-2D31-1E7CD7004C04
  sort = (null)
  source = (Array)#2

In Flex I have been following the Adobe example
http://www.adobe.com/devnet/flex/articles/flex2_amfphp_03.html but
the result I keep getting back is not an array or arraycollection. (I
would have thought it was ArrayCollection, especially because that's
what is says in the ServiceBrowser)

Can one of you guys please help me out here ? Here's my AS code :
public var gateway : RemotingConnection;
public function initApplication():void
{
gateway = new RemotingConnection( gwurl );
gateway.call( inventory.getInventoryGroups, new
Responder(onResult, onFault));
}
public function onResult( result : Object ) : void
{
trace( result );
selInventoryGroups.dataProvider = result as 
ArrayCollection;
}
public function onFault( fault : String ) : void
{
trace( fault );
}

I'm tryng to use the result as a dataprovider for a combobox !

Thanks for any help you could give me.

Mark



[flexcoders] Flex 3 beta swf expiration

2007-11-08 Thread superabe superabe
Anybody from Adobe or otherwise, know if the swfs/swc we generate
today using the Flex 3 beta version (including the datavisualization
charts), will expire when the final versions ships ??
If it will, is there sufficient overlap between when the final version
will be availablle for purchase online and the expiration date ?

TIA

- superabe


RE: [flexcoders] [ AIR ] Create files on local system possible ?

2007-11-08 Thread Mike Chambers
Can you post your code?

Mike Chambers


Sent by GoodLink (www.good.com)


 -Original Message-
From:   Adnan Doric [mailto:[EMAIL PROTECTED]
Sent:   Thursday, November 08, 2007 03:59 AM Pacific Standard Time
To: flexcoders@yahoogroups.com
Subject:[flexcoders] [ AIR ] Create files on local system possible ?

Hello,

I can read and write existing files on local system, but if I try to 
save (create) to a file that does non exist, I get the following error :

Error #3003: File or directory does not exist.

How to create a file on local system if it does not exists please ?

Thank you in advance,
Adnan


[flexcoders] RSL Digests.

2007-11-08 Thread Gregor Kiddie
Checking out this page : 

http://livedocs.adobe.com/labs/flex3/html/help.html?content=rsl_08.html

 

We like this feature as it gives us a lot of control over which version
of a swf we can deliver to a client, but there is a couple of points the
article doesn't make clear.

 

Does the RSL get downloaded onto a user's machine before the digest is
checked? I wouldn't imagine so, as this would be a huge waste of
resources (especially for those of us tossing around massive swfs).

 

So, does the digest get checked against before, or after the RSL is
downloaded?

 

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]

 



[flexcoders] Re: Setting Chart LineSeries properties in ActionScript

2007-11-08 Thread cuddlygunchi
Thanks superabe! You're super :)

Cheers,
Aman

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

 these are style properties of the Series so try setStyle like so .
 
 var s:LineSeries  = new LineSeries();
 s.setStyle(legendMarkerRenderer, new ClassFactory
(CircleItemRenderer));
 
 - superabe
 
 On Nov 7, 2007 8:46 PM, cuddlygunchi [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  Hello,
 
   In MXML I can set the legendMarkerRenderer and showDataEffect for
   LineSeries.
 
   But I am creating my series in ActionScript and these properties 
are
   invalid for a series object created in AS.
 
   Could anyone please show me how to specify these properties for a
   LineSeries object created in AS.
 
   MXML:
   mx:LineSeries showDataEffect=... legendMarkerRenderer=.../
 
   AS:
   var ls:LineSeries = new LineSeries();
   ls.? = ?
 
   Many Thanks,
   Aman
 
   --- In flexcoders@yahoogroups.com, cuddlygunchi aman.thind@
   wrote:
   
Hello,
   
I have a LineChart and I would like to use the SeriesSlide 
effect.
   
If I create my LineSeries in mxml, I can specify the 
showDataEffect
   and
hideDataEffect for this.
mx:LineSeries showDataEffect=.../
   
However, I create my series dynamically in ActionScript and 
cannot
   find
the equivalent syntax:
   
var ls:LineSeries = new LineSeries();
ls.showDataEffect =... //invalid
   
How can I specify the effect for the LineSeries in AS?
   
Many Thanks,
Aman
   
 
 





[flexcoders] ExternalInterface.addCall

2007-11-08 Thread kaushal_bshah
I am loading one .SWF file into swfLoader, when Flash file is ready to 
work its callling one method of flex using ExternalInterface.call(), 
This same method I have registered with ExternalInterface.addCall() 
into Flex.

In my machine, this works successfully in Mozilla Firefox, while in 
IE6 its not working. But on other machine this works in both Mozilla 
and IE6.

plz help me.





[flexcoders] Problem adding a control to a container??

2007-11-08 Thread reflexactions
Given you have a container(outer) that contains another container
(inner) which itself contains a control that is large enough to force 
the scrollbars on in container inner i.e.

mx:VBox id=outer
mx:VBox height=300 id=inner
mx:DataGrid height=400 width=200/
/mx:VBox  
/mx:VBox

Then you run the following code (you can run it from appComplete)

inner.parent.removeChild(inner);
var lbl:Label = new Label();
lbl.text=HELLO WORLD
inner.addChild(lbl);
outer.addChild(inner);

The Label never appears, however change the height of inner (say just 
remove the height attribute) so the scrollbars dont come on, run 
again and Label appears.

Anyone seen this issue? 

It appears to me the problem is connected with setting the nestLevel 
on child controls. 

When you add the inner container back in it will try to set the 
nestLevel on all its children which is what we want for the Label 
becuase as it is newly created its nestLevel is 0 and it wont appear. 
However it uses rawChildren to iterate over the child objects and 
if the scrollbars are on the Label is not a raw child of the 
container, the contentPane is but it is a sprite so it is ignored by 
the container so Label never gets its nestLevel set.

The reason why the grid stays visible is because its nestLevel never 
got set to 0 when the container was removed because again the 
container ignored it.

Seems a prb in both FB2 and FB3.

tks



[flexcoders] Re: First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread oneproofdk
Hi and thanks for your reply.

Well - it showed me that Flex receives what AMF says it sends. Here's
the trace:
  serverInfo = (Object)#1
columnNames = (Array)#2
  [0] data
  [1] label
cursor = 1
id = 7257952bcaf0cee796b5bd243450930c
initialData = (Array)#3
  [0] (Array)#4
[0] 1
[1] Moduler
  [1] (Array)#5
[0] 2
[1] Hylder
  [2] (Array)#6
[0] 3
[1] Skuffer
  [3] (Array)#7
[0] 4
[1] Hvidlakerede bakker
  [4] (Array)#8
[0] 5
[1] Andet
serviceName = PageAbleResult
totalCount = 5
version = 1

The problem is that after I convert it into an arraycollection, it has
zero elements/length.

Why is that ?? 

Thanks for your time in this matter.

Best wishes,
Mark

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

 Use ObjectUtil.toString() to see what type the result really is in
the Console, my guess is it's an Array though.
 
 import mx.utils.ObjectUtil;
 
 public function onResult( result:Object ):void {
 trace(ObjectUtil.toString(result));
 selInventoryGroups.dataProvider = new ArrayCollection(result
as Array);
 }
 




Re: [flexcoders] Desde pagina Flex = mostrar archivo PDF (From Flex to PDF)

2007-11-08 Thread Ben Marchbanks
I suggest using a PDF library API for archive (PDF/A). Adobe LCDS, as I 
understand it, produces PDF/X or XML based PDF documents which while the 
implementation maybe easier the resulting PDF have certain limitations.

I recommend PDFlib as a robust PDF api with ability to produce more mainstream 
PDF format and allow many more opportunities for interactive features and 
annotations.


Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918

[EMAIL PROTECTED] wrote:
 
 
 
 Estimados Listeros:
 
 Tengo una aplicacion Web desarrollada con JavaServerFaces (JSF), y
 poco a poco voy incorporando paginas jsp que contienen aplicaciones
 Flex., por lo tanto, en todo lo nuevo que tengo que ir desarrollando,
 voy incorporando Flex a mis sistemas. Ahora bien, se me presento un
 problema.
 
 Tengo una pagina jsp, la cual esta integramente ocupada por una
 aplicacion Flex, la cual muestra un Datagrid con mucha información.
 El control Datagrid integro quiero imprimir, pero viendo (con mi poco
 conocimiento y tiempo) que PrintDataGrid y PrintJob son muy , pero muy
 rudimentarios, es que decidí agregar un boton Imprimir, el cual necesito
 que muestre un archivo PDF, que genero dinamicamnete con Java., con la
 información suministrada por el DataGrid de Flex.
 
 Como puedo hacer para mostrar el archivo PDF en Flex ?
 
 Muchas Gracias por todo
 
 Dios los Bendiga
 
 Pablo
 
 
 
 
 
 __
 Preguntá. Respondé. Descubrí.
 Todo lo que querías saber, y lo que ni imaginabas,
 está en Yahoo! Respuestas (Beta).
 ¡Probalo ya!
 http://www.yahoo.com.ar/respuestas http://www.yahoo.com.ar/respuestas
 
 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918


Re: [flexcoders] [ AIR ] Create files on local system possible ?

2007-11-08 Thread Jeffry Houser

  My first impulse is that this is an access issue.  When you specify 
'paths' the file you want to create, I believe it's a best practice to 
use the app-storage url.  ( I'm going from memory, so you may have to 
look up the specific syntax ).

Mike Chambers wrote:
 
 
 Can you post your code?
 
 Mike Chambers
 
 Sent by GoodLink (www.good.com)
 
 -Original Message-
 From: Adnan Doric [mailto:[EMAIL PROTECTED] 
 mailto:astronaute%40gmail.com]
 Sent: Thursday, November 08, 2007 03:59 AM Pacific Standard Time
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] [ AIR ] Create files on local system possible ?
 
 Hello,
 
 I can read and write existing files on local system, but if I try to
 save (create) to a file that does non exist, I get the following error :
 
 Error #3003: File or directory does not exist.
 
 How to create a file on local system if it does not exists please ?
 
 Thank you in advance,
 Adnan
 
 

-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com



[flexcoders] Loading Flex Components at runtime

2007-11-08 Thread Jehanzeb Musani
Hello,

I want to design a Flex Web Application that would
load features (flex components) hosted in different
SWF or SWC files at runtime. The prototype of that
application can be viewed on the url below.

http://80.227.133.21/FlexTestInternal/ApplicationLayoutManager.html

The actual application needs to call a webservice that
will return an xml. A sample xml is attached herewith.
The xml contains the layout description and the names
of feature (flex components) to be loaded. The layout
and features varies for different users.

I am thinking about deploying features in separate
SWF/SWC files so that only the required files will be
download at runtime. Can you please let me know the
following in this regard?

1. How can I package individual features in separate
SWF/SWF file using Flex Builder2.

2. How can I load the those separate SWF/SWC files at
runtime from the main SWF file?

3. In case of separate SWF/SWC files for features,
will the Flex library be included in every SWF/SWC
file?

I am also attaching the code of the prototype
application.

Regards,
Jehanzeb

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 creationComplete=OnApplicationInitialize()
 
 mx:Script
![CDATA[
import mx.containers.VBox;
import mx.containers.TabNavigator;
import mx.containers.Canvas;
import mx.controls.Label;
import mx.containers.HDividedBox;
import mx.containers.Panel;
import mx.containers.VDividedBox;
import mx.core.IContainer;
import mx.utils.StringUtil;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
private function OnApplicationInitialize() : void
{

this.ajaxServiceInvokerProxy.addEventListener(FaultEvent.FAULT, this.OnError);

this.ajaxServiceInvokerProxy.addEventListener(ResultEvent.RESULT, 
this.OnResultArrived);


this.ajaxServiceInvokerProxy.GetApplicationLayout.send();
}

private function OnError(event:FaultEvent) : void
{
var message:String;
message = StringUtil.substitute('Error Type: 
[0]. Error Message: [1].', A, B);
mx.controls.Alert.show(message, WebService 
Error);
}

private function OnResultArrived(event:ResultEvent) : 
void
{
var applicationLayout:String = 
event.result.toString();
var applicationLayoutXml:XML = new 
XML(applicationLayout);

this.LayoutPanels(applicationLayoutXml);
}

private function LayoutPanels(applicationLayoutXml:XML) 
: void
{
var panelList:Object = 
applicationLayoutXml.child(Pages);//.child(Pages).child(Page);//.Panels;
//panelList = panelList.child(Pages);
panelList = 
panelList.child(Page).child(Panels);

//mx.controls.Alert.show(panelList.toXMLString(), WebService Result);
//this.txtPanelList.text = 
panelList.toXMLString();

var panel:Panel = new Panel();
panel.percentWidth = 100;
panel.percentHeight = 100;
panel.title = Main Panel;
this.addChild(panel);

var panelXml:XML = null;
for each(panelXml in panelList.children())
{
if(panelXml.name() == HorizontalSplit)
{

this.ProcessHorizontalPanel(panel, panelXml);
}

else if(panelXml.name() == 
VerticalSplit)
{
   

[flexcoders] Loading Flex Components Dynamically at Runtime - 2

2007-11-08 Thread Jehanzeb Musani
Hello,

The link I mentioned in the previous email was not
correct. Please use the following link to view the
prototype application.

http://80.227.133.21/FlexTestExternal/ApplicationLayoutManager.html

Regards,
Jehanzeb

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: [flexcoders] Loading Flex Components at runtime

2007-11-08 Thread Jeffry Houser
I think this is what modules is designed for.

Jehanzeb Musani wrote:
 
 
 Hello,
 
 I want to design a Flex Web Application that would
 load features (flex components) hosted in different
 SWF or SWC files at runtime. The prototype of that
 application can be viewed on the url below.
 
 http://80.227.133.21/FlexTestInternal/ApplicationLayoutManager.html 
 http://80.227.133.21/FlexTestInternal/ApplicationLayoutManager.html
 
 The actual application needs to call a webservice that
 will return an xml. A sample xml is attached herewith.
 The xml contains the layout description and the names
 of feature (flex components) to be loaded. The layout
 and features varies for different users.
 
 I am thinking about deploying features in separate
 SWF/SWC files so that only the required files will be
 download at runtime. Can you please let me know the
 following in this regard?
 
 1. How can I package individual features in separate
 SWF/SWF file using Flex Builder2.
 
 2. How can I load the those separate SWF/SWC files at
 runtime from the main SWF file?
 
 3. In case of separate SWF/SWC files for features,
 will the Flex library be included in every SWF/SWC
 file?
 
 I am also attaching the code of the prototype
 application.
 
 Regards,
 Jehanzeb
 
 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com http://mail.yahoo.com
 
 

-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com



[flexcoders] Dynamically adding SQL to SQLAssember

2007-11-08 Thread changlim
Has anyone tired using
  SQLAssembler.addFillSQL(flex.data.config.NamedSQLSettings sqlSettings)
for dynamically adding sql statement for execution during fill?

I don't seem to be able to find any info on the net other than the one 
line mention of this API in the LCDS development doc.

Any help would be appreciated!

Thanks,
Chang



RE: [flexcoders] Re: Streaming bytes through a web service

2007-11-08 Thread Jehanzeb Musani
Hello Jeremy,

I am also a fledgling to Flex Application development.
I believe the problem you are facing (invalid xml) is
because of the redult type you have specified for the
flex webservice component. If you didn't specify the
result then by default flex assumes it's xml. Search
for WebService and resultFormat in Flex help to see
the possible values of resultFormat attribute.

It would be handy if you can provide the same code of
flex that you have using to call the webservice.

Hope this helps.

Regards,
Jehanzeb

--- Peter Farland [EMAIL PROTECTED] wrote:

 a) I'd use an HTTP sniffer to watch the HTTP traffic
 and look for the
 response. A free tool is Paros Proxy which can be
 easily configured to
 be used by IE as a proxy to show all HTTP traffic
 going through the
 browser.
 
 
 
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
 Behalf Of jeremyfstewart
 Sent: Wednesday, November 07, 2007 2:49 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Streaming bytes through a
 web service
 
 
 Actually I did a little more research into my issue,
 and so I wanted to
 add a further description:
 
 The web service is returning the image as an
 attachment, but when the
 flex application receives the response it says that
 it is invalid XML.
 The error reads:
 
 RPC Fault faultString=Error #1085: The element type
 053118D593A126E55F0D77CE1332B758 must be
 terminated by the matching
 end-tag /053118D593A126E55F0D77CE1332B758.
 faultCode=DecodingError faultDetail=null
 
 I have not been able to yet get the response to
 display so that I can
 actually see what is being returned by the web
 service, but I do know
 that we have a JSP application that is able to
 handle this web service
 and the attachment that is sent. I have seen that
 there are some bugs in
 the Flex Bug and Issue Management System around
 these areas, so I am not
 sure if I have hit a bug or something else has
 occurred.
 
 If anybody has any thoughts on:
 a) How I can d! ebug this issue? (For example,
 getting the response to
 show. I have tried using a ResultEvent and then the
 following
 expression: event.message.toString(), which will
 only show me a result
 once a web service without an attachment is called.)
 b) Is there a work around that I can do for this
 error?
 
 
 Thank you in advance,
 
 Jeremy
 
 
 --- In flexcoders@yahoogroups.com, jeremyfstewart
 [EMAIL PROTECTED]
 wrote:
 
  Hello,
  
  I am very new to Flex and Flash for that matter
 (only a day or two
  working with it), so I do not even know if what I
 am asking is
  possible. But I am hitting a web service that is
 returning byte array
  of an image that I want my flex application to
 stream and then
  display. Is this possible, and if so how?
  
  Just for clarification, we are trying to do a
 proof of concept and the
  reason that the content needs to stream for this
 test is that we! are
  trying to show how we can send content via the we!
 b servic e to
 multiple
  applications without each of the applications
 having to log into the
  host application (the web service does this for
 us). So in short,
  we do not have access to an URL for the content
 only the bytes that
  stream to us.
  
  I hope that was clear.
  
  Thank you for your help,
  
  Jeremy
 
  
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[flexcoders] response from web service contains an image attachment

2007-11-08 Thread jeremyfstewart
My application is hitting a web service that is returning the image as
an attachment, but when the flex application receives the response it
says that it is invalid XML. The error reads:

RPC Fault faultString=Error #1085: The element type
053118D593A126E55F0D77CE1332B758 must be terminated by the matching
end-tag /053118D593A126E55F0D77CE1332B758.
faultCode=DecodingError faultDetail=null

I have not been able to yet get the response to display so that I can
actually see what is being returned by the web service (see if it is
invalid or not), but I do know that we have a JSP application that is
able to handle this web service and the attachment that is sent. I have
seen that there are some bugs in the Flex Bug and Issue Management
System around these areas, so I am not sure if I have hit a bug or
something else has occurred.

If anybody has any thoughts on:
a) How I can debug this issue? (For example, getting the response to
show. I have tried using a ResultEvent and then the following
expression: event.message.toString(), which will only show me a result
once a web service without an attachment is called.)
b) Is there a work around that I can do for this error?

Oh I am using Flex 3 beta 2, the eclipse plugin.

Thank you in advance,

Jeremy


[flexcoders] Custom events and view states

2007-11-08 Thread vangop
i, need some help from the event guru.
I have several view states, each of them contain custom component,
which is subscribed to listen to my custom GenEvent.
When I click the button and change the view state, the components on
that state don't get the event!
private function onSidesChange():void{
switch(sides.value){
case 1:
currentState='';
break;
case 2:
currentState=2sides;
break;
default:
currentState=3sides;
break;
}
dispatchEvent(new GenEvent(config,GenEvent.TYPE));
}
It looks like the problem is that the components are not ready at the
moment the event is dispatched.. If I pass the event manually, like
with button click it works. What can be the workaround?
I tried to dispatch event in creationComplete handler of the parent
container (that is common for all 3 states), but it doesn't work. The
only solution I came up with is to put creationComplete handler inside
each container on the view state(but I have lots of them, which is ugly).






[flexcoders] How to bind a ProgressBar to an XML file loading process

2007-11-08 Thread Vladimir Stankovic
I have an XML file loaded like:

 

  mx:HTTPService id=studentService
url=data/{Fakulteti.selectedItem}.xml

result=studentServiceResultHandler(event)/ 

 

private function studentServiceResultHandler(event:ResultEvent):void

{

var students:ArrayCollection = event.result.catalog.student;

var temp:ArrayCollection = new ArrayCollection();

var cursor:IViewCursor = students.createCursor();

while (!cursor.afterLast)

{

var student:Student = new Student();

student.fill(cursor.current);

temp.addItem(student);

cursor.moveNext();

}

catalog = temp;

}

 

 

I can't figure out how to put the ProgressBar that will fill as the array
gets loaded with data from the XML.

 

Please help!!!

 

Thx in advance,

 

Vlada Stankovic



[flexcoders] binding handler called twice

2007-11-08 Thread vangop
Hello,
I have a form with options and below it a preview, which should
reflect the changes in options immediately, so the user could see what
it wold look like with this set of options.
The preview is a custom comp, and i send it events with the options
data (Value object) so that it could update accordingly.

The only solution I could come up with was to bind the form data to
this Config object, and then to dispatch the event with this Config
data. I tried first the change handler, but at the moment the handler
is called, the binding didn't occur.
I tried to listen to propertyChange event (binding default trigger)
but it didn't work at all.
Then I came to ChangeWatcher.
I have a form item - checkbox, and a custom class property bound to it.

mx:FormItem id=comItem
mx:CheckBox label=Allow Comments id=comments
selected=true/
mx:CheckBox label=Tree Comments id=treeComments/
/mx:FormItem
I have set up a Change watcher to pass the bound object when the
checkbox value is changed.
ChangeWatcher.watch(comments,selected,onBinding);
but my handler gets called twice, once when the event is a FlexEvent,
second when it's a MouseEvent..
I suppose It should get called only once.
If anyone knows a better solution on how to do what I want, i can use
it. But so far the watcher thing works, but the handler is called twice...



[flexcoders] LCDS, Hibernate, Destinations and Client Side Cacheing

2007-11-08 Thread christophers1228
Hello Everyone,

I have some questions about the technologies mentioned above.  Let's
say I had a relational database, I know this is a stretch :)  Or at
least it would seem so based on all the documentation and examples. 
If I had the following structure...

Company has many Employees. Each Employee has one Company.
Each Employee has many WorkOrders, a WorkOrder belongs to an Employee.
A WorkOrder has many Proposals, each Proposal beolongs to a WorkOrder.
Each Proposal has many LineItems, etc.

I'll provide some example configs at the bottom of my post.

Here are my questions.

1. Do I need a corresponding mx:DataService/ for each destination?
If I do a fill on getWorkOrdersForEmployee, I get the whole data model
for that employee (which is what I want)

2. If I set a CacheID for the DataService, I get an error saying that
nested Destinations are not supported.  Does this mean that If I used
relationships and complex data models, I can't use client side cacheing?

3. In Christophe's blog he mentions that the dataService first tries
to connect to the server before loading the data from the local
cache, But in the documentation it says the opposite is true
DataService instance always attempts to load any local data before
attempting to establish a connection and satisfy a fill() or getItem()
request.
Which one is it?

Thanks in advance, any clarification would be greatly appreciated. If
I'm completely off base it would be great if someone would let me
know, maybe i'm just approaching this all wrong :)

Here is an example Destination in my data-management-config.xml (I
included only the metadata section to keep example as short as possible)

destination id=hibernate-work-order
metadata
  identity property=id/
  one-to-many property=proposals destination=hibernate-proposal/
  many-to-one property=employee destination=hibernate-employee/
/metadata
/destination

I have the following hibernate mapping files.

WorkOrder.hbm.xml
Employee.hbm.xml
Proposal.hbm.xml
LineItem.hbm.xml
Company.hbm.xml

Here is an example of how they are mapped. (leaving out the columns)

hibernate-mapping
class name=WorkOrderVO table=work_orders catalog=somedb
many-to-one name=employee class=EmployeeVO fetch=select
   column name=employee_id /
/many-to-one
set name=proposals inverse=true
key
  column name=work_order_id not-null=true /
/key
one-to-many class=ProposalVO /
/set
query name=getAllFrom WorkOrderVO j/query
query name=getWorkOrdersForEmployeeFrom WorkOrderVO wo where
wo.employee.id = :employee/query
/class
/hibernate-mapping
 




[flexcoders] Problem with compiled swf (only working with debug version of flash player)

2007-11-08 Thread wardloockx
Hello,

I wrote an application but the problem is that it's only working when
you have the flash debug player. I use HTTPServices for my data and
when  people try to access it without the debug player, they can see
the application but get no data. Very weird. I try'd to recompile the
file with flex2 instead of 3 but this isn't working either.

Anybody had this problem before ?

Greets,
Ward



[flexcoders] Label not updating properly

2007-11-08 Thread bloodylag
Ok I have a label in my flex app.

mx:Label bottom=0 left=0 textAlign=center text=Start Date:
{dispDate} width=100% height=5% /

The dispDate is defined as

[Bindable]
public var dispDate:Date = new Date();

then in an init function I update the date through flashvars which
javascript is passing in a millisecond time.

dispDate.setTime(Application.application.parameters.startTime);

I can alert the dispDate and it shows the updated date, but the label
doesn't update and is just the current date...

how can I make it update.

thanks




[flexcoders] Re: Flex 2.0.1: itemRenderer won't get printed using PrintDataGrid

2007-11-08 Thread Phil Heinz
Hi Muzak,

Do you know of any way to apply the same logic, but as a MovieClip
instead of a Bitmap? I have a swf that loads in a SWFLoader and I want
to take the content of that loader (as a MovieClip) and duplicate it
so I can put it in the display list in other areas of my application
at the same time. The content of the SWFLoader needs to remain vector
so it can be zoomed effectively.

duplicateMovieClip doesn't exist any more and any attempt to assign
the completed content of one SWFLoader to another's source (so it
doesn't have to load it via http) removes that content from the first
component before moving it to the other.

Thanks for any insight you might have!

Phil



Re: [flexcoders] Label not updating properly

2007-11-08 Thread Scott Melby
I would bet that the binding just looks for changes to the value of 
dispDate not to changes in its attributes.  You should be able to verify 
this by setting your compiler to keep generated code, then go look 
through what it generates.  But, operating on this assumption, I would 
say your two options are to update your dispDate as follows

dispDate = new Date(Application.application.parameters.startTime)

or alternatively set it the way you are, then manually update your label 
with something like myLabel.invalidateDisplayList().


hth
Scott

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



bloodylag wrote:


Ok I have a label in my flex app.

mx:Label bottom=0 left=0 textAlign=center text=Start Date:
{dispDate} width=100% height=5% /

The dispDate is defined as

[Bindable]
public var dispDate:Date = new Date();

then in an init function I update the date through flashvars which
javascript is passing in a millisecond time.

dispDate.setTime(Application.application.parameters.startTime);

I can alert the dispDate and it shows the updated date, but the label
doesn't update and is just the current date...

how can I make it update.

thanks

 


[flexcoders] Re: Bouncing Focus in DataGrid

2007-11-08 Thread j_lentzz
Ok, I have a simple example.  When you run the app, click on the lower
right cell, the upper left cell with get focus first.  Thanks for all
the help.  John
*** DGTest.mxml ***
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute xmlns:n1=FAB_widgets/widgets

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

[Bindable]
protected var _listData:ArrayCollection = new
ArrayCollection([{name:'AA', phone:'555-555-1234',email:'BB'},

   {name:'BB', 
phone:'555-555-4321',email:'AA'}]);

private function 
fireEditEvent(event:DataGridEvent):void {
if (dg.itemEditorInstance is ComboBoxRenderer) {
//  event.preventDefault();

// copy selected value (data) from 
combobox to renderer 
var selData:String =
ComboBoxRenderer(event.currentTarget.itemEditorInstance).text;
var selData2:Object =
ComboBoxRenderer(event.currentTarget.itemEditorInstance).selectedItem;
if (selData2 != null) {

dg.editedItemRenderer.data[event.dataField] = selData2.data;
/*EXPENSIVE *///
dg.dataProvider.itemUpdated(event.itemRenderer.data);
}

dg.destroyItemEditor();
}   
}

protected function 
itemEditBeginHandler(event:DataGridEvent):void {
_listData[event.rowIndex].rowChanged = true;
dispatchEvent(new Event(change));
dg.invalidateList();
trace('itemEditBeginHandler - ListWithoutAdd');
}

]]
/mx:Script


mx:DataGrid headerHeight=21 editable=true rowHeight = 30
id=dg dataProvider={_listData} visible=true  selectable=false
itemEditEnd=fireEditEvent(event)
itemEditBegin=itemEditBeginHandler(event)
mx:columns
mx:DataGridColumn dataField=name headerText=Name
itemEditor=ComboBoxRenderer itemRenderer=LabelWithDownArrow/
mx:DataGridColumn dataField=phone 
headerText=Phone/
mx:DataGridColumn dataField=email headerText=Email
itemEditor=ComboBoxRenderer itemRenderer=LabelWithDownArrow/
/mx:columns
/mx:DataGrid

/mx:Application

*** LabelWithDownArrow.as ***

package 
{

import mx.controls.Label;
import mx.events.FlexEvent;
import mx.controls.dataGridClasses.DataGridListData;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.controls.DataGrid;
import mx.collections.ArrayCollection;
import flash.display.Graphics;

public class LabelWithDownArrow extends Label
{

public function LabelWithDownArrow()
{
super();
addEventListener(mx.events.FlexEvent.SHOW, 
showEventHandler);
}


private function showEventHandler(e:FlexEvent):void {
trace('LabelWithDownArrow showEventHandler');
listData.label = 
data[DataGridListData(listData).dataField];

var cbr:ComboBoxRenderer;   // will contain 
renderer for this cell
var dgc:DataGridColumn; // will contain column 
info for the one
this cell is in
var columnArray:Array;  // columns of datagrid
var dg:DataGrid;// reference to 
grid containing this cell
var dp:ArrayCollection; // dataProvider of 
selected cell's comboBox
var dgld:DataGridListData = listData as 
DataGridListData;

if (dgld != null) { 
dg = DataGrid(listData.owner);
columnArray = dg.columns;

// iterate through columns to find one that 
matches to this cell
var columnArrayLen:int = columnArray.length;

   

Re: [flexcoders] [ AIR ] Create files on local system possible ?

2007-11-08 Thread Adnan Doric
Thank you I solved the problem by using file.url (file:///...).

I think there was an issue using nativepath I can't remember the right 
syntax I used (tried so many things), but reading from same path was 
possible.

Adnan

Mike Chambers wrote:
 Can you post your code?

 Mike Chambers


 Sent by GoodLink (www.good.com)


  -Original Message-
 From: Adnan Doric [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 03:59 AM Pacific Standard Time
 To:   flexcoders@yahoogroups.com
 Subject:  [flexcoders] [ AIR ] Create files on local system possible ?

 Hello,

 I can read and write existing files on local system, but if I try to 
 save (create) to a file that does non exist, I get the following error :

 Error #3003: File or directory does not exist.

 How to create a file on local system if it does not exists please ?

 Thank you in advance,
 Adnan

   



Re: [flexcoders] [ AIR ] Create files on local system possible ?

2007-11-08 Thread Mike Chambers
Yes, in general, you should not use native path (as that wont work  
across operating system).

If possible you should try and use some of the built in File APIs for  
creating the path to your files.

mike chambers

[EMAIL PROTECTED]

On Nov 8, 2007, at 6:03 AM, Adnan Doric wrote:

 Thank you I solved the problem by using file.url (file:///...).

 I think there was an issue using nativepath I can't remember the right
 syntax I used (tried so many things), but reading from same path was
 possible.

 Adnan

 Mike Chambers wrote:
  Can you post your code?
 
  Mike Chambers
 
 
  Sent by GoodLink (www.good.com)
 
 
  -Original Message-
  From: Adnan Doric [mailto:[EMAIL PROTECTED]
  Sent:   Thursday, November 08, 2007 03:59 AM Pacific Standard Time
  To: flexcoders@yahoogroups.com
  Subject:[flexcoders] [ AIR ] Create files on local system  
 possible ?
 
  Hello,
 
  I can read and write existing files on local system, but if I try to
  save (create) to a file that does non exist, I get the following  
 error :
 
  Error #3003: File or directory does not exist.
 
  How to create a file on local system if it does not exists please ?
 
  Thank you in advance,
  Adnan
 
 


 



Re: [flexcoders] Re: Flex 2.0.1: itemRenderer won't get printed using PrintDataGrid

2007-11-08 Thread Muzak
Here's one way of doing it:

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

 mx:Script
  ![CDATA[
   import mx.events.FlexEvent;
   import mx.controls.SWFLoader;

   private var swfContent:MovieClip;

   private function appInit():void {
trace(Application ::: appInit);
var swfReq:URLRequest = new URLRequest(_assets/test.swf);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
swfCompleteHandler);
loader.load(swfReq);
   }

   private function swfCompleteHandler(evt:Event):void {
trace(Application ::: swfCompleteHandler);
var t:LoaderInfo = evt.currentTarget as LoaderInfo;
this.swfContent = t.content as MovieClip;
trace(- target: +t)
trace(- content: +t.content);
var swf:SWFLoader = new SWFLoader();
swf.addEventListener(FlexEvent.UPDATE_COMPLETE, swfUpdateCompleteHandler);
swf.source = this.swfContent;
addChild(swf);
   }

   private function swfUpdateCompleteHandler(evt:Event):void {
trace(Application ::: swfUpdateCompleteHandler);
   }

  ]]
 /mx:Script

/mx:Application

Note that the loaded swf is not duplicated, but the loader content (which is a 
MovieClip) is assigned to the source property of an 
SWFLoader instance.

Another way would be to load the swf as Binary data using URLLoader, then use 
Loader.loadBytes() and display the Loader content in 
an Image or SWFLoader instance.

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

 mx:Script
  ![CDATA[
   import mx.core.UIComponent;

   import mx.events.FlexEvent;
   import mx.controls.SWFLoader;

   private var swfContent:MovieClip;

   private function appInit():void {
trace(Application ::: appInit);
var swfReq:URLRequest = new URLRequest(_assets/test.swf);
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
loader.load(swfReq);
   }

   private function loaderCompleteHandler(evt:Event):void {
trace(Application ::: loaderCompleteHandler);
var t:URLLoader = evt.currentTarget as URLLoader;
var ba:ByteArray = t.data as ByteArray;
trace(- target: +t)
trace(- data length: +ba.length);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
bytesLoaderCompleteHandler);
loader.loadBytes(ba);
   }

   private function bytesLoaderCompleteHandler(evt:Event):void {
trace(Application ::: bytesLoaderCompleteHandler);
copyImg.source = evt.currentTarget.content;
   }

  ]]
 /mx:Script

 mx:Image id=copyImg /

/mx:Application

regards,
Muzak

- Original Message - 
From: Phil Heinz [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, November 08, 2007 5:41 AM
Subject: [flexcoders] Re: Flex 2.0.1: itemRenderer won't get printed using 
PrintDataGrid


Hi Muzak,

Do you know of any way to apply the same logic, but as a MovieClip
instead of a Bitmap? I have a swf that loads in a SWFLoader and I want
to take the content of that loader (as a MovieClip) and duplicate it
so I can put it in the display list in other areas of my application
at the same time. The content of the SWFLoader needs to remain vector
so it can be zoomed effectively.

duplicateMovieClip doesn't exist any more and any attempt to assign
the completed content of one SWFLoader to another's source (so it
doesn't have to load it via http) removes that content from the first
component before moving it to the other.

Thanks for any insight you might have!

Phil




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


[flexcoders] Re: Security issue - Opening a new window

2007-11-08 Thread g07m5064
--- In flexcoders@yahoogroups.com, flexawesome [EMAIL PROTECTED] wrote:
I am sorry I didn't come out very clear. I am interested in an
implementation that allows a user to click on say a link button and a
new window is opened containing a pdf file. The pdf file has been
imported into a directory accessible to the application. 

 Did you put ur Flex on web and tried to open the PDF on ur local
laptop or desktop?
 
 If so, u can't do that
 
 --- In flexcoders@yahoogroups.com, g07m5064 g07m5064@ wrote:
 
  I tried using a  navigateToURL() method to open a pdf file in a new
  window. The file is stored in a local directory. I get the file not
  found message. I am not even sure if this is the method to use. Can
  someone please assist.
 





[flexcoders] Re: Security issue - Opening a new window

2007-11-08 Thread flexawesome
Did you put ur Flex on web and tried to open the PDF on ur local laptop or 
desktop?

If so, u can't do that

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

 I tried using a  navigateToURL() method to open a pdf file in a new
 window. The file is stored in a local directory. I get the file not
 found message. I am not even sure if this is the method to use. Can
 someone please assist.





Re: [flexcoders] Problem with compiled swf (only working with debug version of flash player)

2007-11-08 Thread Jehanzeb Musani
Hello,

I am not sure but I am making a wild guess. Did you
Http Service and flex files are deployed at the same
domain or not? If that's not the case then you must
deploy crossdomain.xml file on Http Service server.

Regards,
Jehanzeb

--- wardloockx [EMAIL PROTECTED] wrote:

 Hello,
 
 I wrote an application but the problem is that it's
 only working when
 you have the flash debug player. I use HTTPServices
 for my data and
 when  people try to access it without the debug
 player, they can see
 the application but get no data. Very weird. I try'd
 to recompile the
 file with flex2 instead of 3 but this isn't working
 either.
 
 Anybody had this problem before ?
 
 Greets,
 Ward
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[flexcoders] Re: Preserving Whitespace when parsing text into XML

2007-11-08 Thread esaltelli
Have you tried using xml.normalize()?  This should condense all of 
your text nodes into a single text node.


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

 I have some xml text that was saved to the server and then reloaded 
 back into the application.
 
 Some text nodes represent text entered previosuly in a TextArea 
 control and includes a number of trailing returns entered by the 
 users that I need to keep.
 
 This saved fine to the server and also when loaded back the text 
 string containing the whole xml show these nodes correctly with 
 multiple /r/n i.e.
 node
 Some Text
 \r\n
 \r\n
 /node
 
 
 But when I turn this into XML() in the application it strips all 
the 
 trailing /r/n i.e.
 nodeSomeText/node
 
 I have tried ignoreWhiteSpace but that doesnt achieve what I want, 
it 
 just adds lots of additional nodes throughout the doc instead of 
 leaving the \r\n within the node
 
 Any thoughts how to solve this





[flexcoders] Re: How to detect compiled Date Time by itself

2007-11-08 Thread flexawesome
is that possible? thanks 

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

 hey guys,
 
 Is there a way to detect compiled Date  Time by Flex swf itself? If so, I 
 could place a 
 TextField in Flex and show up the version. ( the text field reads the own 
 file information 
such 
 as last modify.. by itself )
 
 I don't need to change the version once I need to recompile and it has 
 abality to show up 
the 
 date/time
 
 Thanks





[flexcoders] Security issue - Opening a new window

2007-11-08 Thread g07m5064
I tried using a  navigateToURL() method to open a pdf file in a new
window. The file is stored in a local directory. I get the file not
found message. I am not even sure if this is the method to use. Can
someone please assist.



[flexcoders] Re: Flex 3 Custom Drag Proxies Broken?

2007-11-08 Thread rkettrey
It worked.  Not sure why, but thanks.

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

 Try setting width/height instead of calling setActualSize().
 
  
 
 If that doesn't work, make a small test case, file a bug and let me 
know
 the bug #.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of rkettrey
 Sent: Wednesday, November 07, 2007 8:33 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 3 Custom Drag Proxies Broken?
 
  
 
 I have a very simple app with a List that displays a custom drag 
 proxy. It works just fine in Flex 2, but in Flex 3 the custom drag 
 proxy does not show.
 
 I simply override the protected ListBase.dragImage getter to return 
 my custom drag image (I am pulling the image source out of the 
 currently selected row) like such:
 
 var renderer:CustomItemRenderer = 
 this.indexToItemRenderer(this.selectedIndex) as CustomItemRenderer;
 var actualImage:Image = renderer.thumbImage;
 var dragProxy:Image = new Image();
 
 dragProxy.source = actualImage.source;
 dragProxy.setActualSize(actualImage.width, actualImage.height);
 
 return dragProxy;
 
 I see the custom drag proxy moving around fine in Flex 2, but 
nothing 
 is drawn in Flex 3. I do get the drag indicator (red X when not 
over 
 a drop target), and when I drop the image it does show up. It is 
 just that the custom drag proxy does not show while dragging.
 
 Any ideas?





[flexcoders] Dragging - ListBase.dragImageOffsets?

2007-11-08 Thread rkettrey
ListBase defines two overrideable (protected) getters:

dragImage
dragImageOffsets

It looks to me like the design was to allow subclasses to override 
the drag image and the offset of it, which is great.  However, if you 
check out ListBase.dragStartHandler, it only ever looks at 
dragImage.  Shouldn't this line:

DragManager.doDrag(this, dragSource, event, dragImage,
   0, 0, 0.5, dragMoveEnabled);
 
actually be this line:

var pt:Point = dragImageOffsets;
DragManager.doDrag(this, dragSource, event, dragImage,
   pt.x, pt.y, 0.5, dragMoveEnabled);

I don't even see dragImageOffsets being used anywhere, so I am 
assuming it was a partially implement design.

Thoughts?



[flexcoders] Why is drawHighlightIndicator() called multiple times?

2007-11-08 Thread ben.clinkinbeard
When rolling over a DataGrid, drawHighlightIndicator() seems to get
called several times (6 or 7 usually) if the mouse is over any column
but the first. This is a problem when trying to animate the highlight.
Any explanation of why this happens and/or workarounds would be
appreciated.

Thanks,
Ben



[flexcoders] event or method called when TileList renderer becomes visible?

2007-11-08 Thread Charles Galpin
What event gets fired, or what method is called on a renderer when it  
comes into view on a tile list?  I have a custom renderer that changes  
how it draws itself based on a number of things, and everything works  
great except if I scroll it off screen, then scroll it back, it seems  
to have lost some of the information it uses to draw itself (but this  
info hasn't changed). I'm trying to figure out why this is happening  
(i think it might be getting recycled and when re-used isn't  
initializing) but wanted to also make sure what when the renderer  
becomes visible I can verify my assumptions (or make it redraw itself  
then).

thanks
charles



[flexcoders] Re: Streaming bytes through a web service

2007-11-08 Thread jeremyfstewart
Hello All,

Thank you very much for your help! As far as an HTTP sniffer, I have
used Firebug for Firefox and HTTPWatch for IE, but to no avail. I cannot
seem to find where the response is in the watch output. I prefer Firebug
for this type of debugging, so if somebody knows where I should be able
to find the XML response from the service, that would be great!

As far as the code, here it is (in fragments). Oh, you can tell that I
am just trying to modify the restaurant web service example from Adobe,
and I still have not changed some of the method nor function names
(http://www.adobe.com/devnet/flex/samples/restaurant/
http://www.adobe.com/devnet/flex/samples/restaurant/  ). If you pull
up that example, then the below code snippets are from
ServiceLocator.as, ReviewsList.mxml, and TokenResponder.as. I have
renamed some of the classes, but other than that, most of the code is
the same.:

Thank you!

Jeremy

// gets the instance of the service (ServiceLocator.as).

 public static function getBnxService():AbstractService
 {
if (bnxService == null) {
 var ws:WebService = new WebService();
//ws.wsdl =
http://flexapps.macromedia.com/ws/services/RestaurantWS?wsdl;;
 ws.wsdl =
http://bnx-int-next.temp.com/tempservice/services/TempService?wsdl;;
 /* if you want to use  your own WebService adjust the
following url
to match your setup and comment out the one above */
 //ws.wsdl =
http://{server.name}:{server.port}/{context.root}/services/RestaurantWS\
?wsdl;
 ws.useProxy = false;
 ws.showBusyCursor = true;
 ws.loadWSDL();
 bnxService = ws;

 }
 return bnxService;
 }
//
\
---

// Calling the service... this is from the mxml file that will render
the results (ReviewsList.mxml):
 private function initComp():void
 {
 service = BnxServiceLocator.getBnxService();
 addEventListener(focus, focusEventHandler);
 }


 public function set restaurant(restaurant:Object):void
 {
   // When the restaurant changes: retrieve the list of
reviews
   assets = null;
 _restaurant = restaurant;
 if (restaurant != null)
 {
//   
Alert.show(service.getMyFolderContents(0b7dea6680024809), does this
show);
 var token: AsyncToken =
AsyncToken(service.getFolderContents(0b7dea6680024809));
 // Specify that we want the 'getReviewsResult' function
to be called when the call completes.
 // See control.RestaurantService.as for details on how
the resultHandler token is used to invoke getReviewsResult.
 token.addResponder(new TokenResponder(getAssetsResult,
Error Retrieving Asset));
 }
 }

//
\
--


// The TokenResponder.as class:

package samples.restaurant
{

import mx.controls.Alert;
import mx.rpc.IResponder;
import mx.rpc.events.FaultEvent;

/**
  * A simple responder that will call the result function specified but
  * handles any fault by simply raising an Alert with the specified
title.
  */
public class TokenResponder implements IResponder
{
 private var resultHandler:Function;
 private var faultTitle:String;

 public function TokenResponder(result:Function,
faultTitle:String=null)
 {
 super();
 resultHandler = result;
 this.faultTitle = faultTitle;
 }
 public function result(data:Object):void
 {
 resultHandler(data);

 }

 public function fault(info:Object):void
 {
 //the info object from an AsyncToken is always a FaultEvent
 Alert.show(FaultEvent(info).fault.toString(), faultTitle);
 }

}

}


// finally back to the mxml for displaying the results
 private function getAssetsResult(event:ResultEvent):void
 {
 Alert.show(event.message.toString(),testing);
 //deserialize the anonymous review objects into
 //a strongly typed instance
 var temp:ArrayCollection = new ArrayCollection();
 var source:Array = ArrayUtil.toArray(event.result.source);
 Alert.show(source length:  + source.length,number of
assets);
 for (var i:int=0; i  source.length; i++)
 {
 //Review knows how to take an anonymous object
 //and copy the properties over
 temp.addItem(new Asset(source[i]));
 }
 assets = temp;
 }


//
\
-

// here is the xml for displaying the results --- ReviewsList.mxml

 !--
 The 

[flexcoders] Loading CSS files

2007-11-08 Thread emobilecat
Hi everyone, if I have two different .css files and I want to load
them at different times how do I implement that code in Flex 3.0 beta 2?

Thanks
Sal



[flexcoders] Re: Security issue - Opening a new window

2007-11-08 Thread g07m5064
I am sorry good people. I had spelling error in the path of my
directory. Problem solved


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

 --- In flexcoders@yahoogroups.com, flexawesome flexawesome@ wrote:
 I am sorry I didn't come out very clear. I am interested in an
 implementation that allows a user to click on say a link button and a
 new window is opened containing a pdf file. The pdf file has been
 imported into a directory accessible to the application. 
 
  Did you put ur Flex on web and tried to open the PDF on ur local
 laptop or desktop?
  
  If so, u can't do that
  
  --- In flexcoders@yahoogroups.com, g07m5064 g07m5064@ wrote:
  
   I tried using a  navigateToURL() method to open a pdf file in a new
   window. The file is stored in a local directory. I get the file not
   found message. I am not even sure if this is the method to use. Can
   someone please assist.
  
 





RE: [flexcoders] Why is drawHighlightIndicator() called multiple times?

2007-11-08 Thread Alex Harui
Which version?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben.clinkinbeard
Sent: Thursday, November 08, 2007 7:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Why is drawHighlightIndicator() called multiple
times?

 

When rolling over a DataGrid, drawHighlightIndicator() seems to get
called several times (6 or 7 usually) if the mouse is over any column
but the first. This is a problem when trying to animate the highlight.
Any explanation of why this happens and/or workarounds would be
appreciated.

Thanks,
Ben

 



RE: [flexcoders] Dragging - ListBase.dragImageOffsets?

2007-11-08 Thread Alex Harui
Please file a bug

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rkettrey
Sent: Thursday, November 08, 2007 7:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dragging - ListBase.dragImageOffsets?

 

ListBase defines two overrideable (protected) getters:

dragImage
dragImageOffsets

It looks to me like the design was to allow subclasses to override 
the drag image and the offset of it, which is great. However, if you 
check out ListBase.dragStartHandler, it only ever looks at 
dragImage. Shouldn't this line:

DragManager.doDrag(this, dragSource, event, dragImage,
0, 0, 0.5, dragMoveEnabled);

actually be this line:

var pt:Point = dragImageOffsets;
DragManager.doDrag(this, dragSource, event, dragImage,
pt.x, pt.y, 0.5, dragMoveEnabled);

I don't even see dragImageOffsets being used anywhere, so I am 
assuming it was a partially implement design.

Thoughts?

 



RE: [flexcoders] Flex 3 beta swf expiration

2007-11-08 Thread Matt Chotin
The SWFs themselves should not expire.

 

Matt

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of superabe superabe
Sent: Thursday, November 08, 2007 3:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 3 beta swf expiration

 

Anybody from Adobe or otherwise, know if the swfs/swc we generate
today using the Flex 3 beta version (including the datavisualization
charts), will expire when the final versions ships ??
If it will, is there sufficient overlap between when the final version
will be availablle for purchase online and the expiration date ?

TIA

- superabe

 



[flexcoders] Re: RemoteObject call does not get through if called by a Module

2007-11-08 Thread Robert Csiki

Thanks Jeff.

I added the extra debug patterns in LCDS, and made some progress
(actually I got things working), but I still need some answers.

First, it turned out the alias for
flex.messaging.messages.RemotingMessage is not registered in my Module.
so when my module's RemoteObject is sending out a RemotingMessage, and
because it has no alias the LCDS does not properly map it into a
flex.messaging.messages.RemotingMessage

Ok, now...one single line of code added into my Module's constructor has
fixed the whole problem. It is:

registerClassAlias(flex.messaging.messages.RemotingMessage,
mx.messaging.messages.RemotingMessage);

The first question is why do I need to manually register this class
alias for a Module? It is not required for the case the whole LCDS
communication is done from the Flex main application. Is there a way to
instruct the compiler to include this class alias registration at the
Module compilation time? Is this the only class that needs to be
explicitly registered in module to have things working, or I'll
encounter further issues as I'll progress with the development?

The second thing is the 2 messaging swcs (rpc.swc and fds.swc) have to
be linked as merged into code on my Module project (which is an
ActionScript project in FlexBuilder) otherwise the above statement will
throw an exception. So linking them as external won't work. Will that
be an issue? I remember you saying it's important having these libraries
linked as External to the module.. but as I said, some aliases are not
visible to my module and I already had to explicitly register one to
have things working..

Thanks, Robert


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

 This does seem strange. There are a few tricks you can use to get more
 details. On the server, the debug logging configuration is set via the
 WEB-INF/flex/services-config.xml file (set level=Debug and the
 pattern tags below control which patterns are logged). The
 Endpoint.* pattern will show the details of the serialization
process
 including the alias sent over from the player.



 The other thing that would be interesting is on the client side to
check
 the aliases registered for these Message classes. If the server
 responds with an instance of a class like
 mx.messaging.messages.AcknowledgeMessage and there is no alias for
that
 class in the SWF, it will come back as an Object and you get those
 type casting errors. There is the describeType call in the player
 apis which lists the info for a given class and the
 mx.utils.ObjectUtil.getClassInfo method uses that to return this info
in
 a form that is easier to use from ActionScript.



 When we build the swcs such as rpc.swc and fds.swc which include
message
 classes, we use a trick so that any swf that links against that swc
 should include versions of the message classes. Their aliases should
 also get registered at that time.



 I believe that aliases are visible across the player instance and not
 isolated for a module so it might be possible for a module to get
loaded
 that registers an alias for a class loaded via another domain. That is
 one reason it is important to ensure only the main swf links in the
 Message classes. The other swfs should treat those swcs as external
 libraries.



 Jeff



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Robert Csiki
 Sent: Wednesday, November 07, 2007 12:59 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: RemoteObject call does not get through if
 called by a Module





 I have the 2 SWC's linked to both projects: the main one and the
Module
 one (project's library path). Isn't it strange the client log reports
a
 message being sent that includes a destination (repositoryService),
 and an operation (isConnected) and the server simply says the
 destination is received as 'null' and it can't be resolved (also the
 operation is received as 'null')?? How can I get to see more debug
 details on the LCDS side? Looks like the message the client sends is
 losing its integrity on its way to the server? I'm lost here.

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Jeff Vroom jvroom@ wrote:
 
  When I have seen this before, the problem is because the LC DS swcs
  (rpc.swc and fds.swc) are being linked into a module and not the
main
  swf. It may be that if you put the RemoteObject references into the
  main swf, that by itself is enough to make those classes get linked
in
  there and so that is why it works. If you put some references to
those
  classes in the main swf, it may also just then work in the module
as
  well?
 
 
 
  Jeff
 
 
 
  
 
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ]
 On
  Behalf Of Robert Csiki
  Sent: Wednesday, November 07, 2007 12:12 PM
  To: flexcoders@yahoogroups.com 

[flexcoders] Help with ant build file for Flex needed.

2007-11-08 Thread lytvynyuk
Here is a piece of my build file. I want application build it using RSL.
I don't have any clear direction what to do. Basically I want to
simulate Library path tab option Framework linkage in Eclipse. How can I
modify existent build script to achieve desired result?

---
 target name=build depends=clean
 mkdir dir=${dist.dir}/
 mxmlc file=isp_flex.mxml output=${DEPLOY_DIR}/isp_flex.swf
 actionscript-file-encoding=UTF-8
 services=res/services-config.xml
 context-root=ISP
 static-rsls=false
 locale=en_US as3=true optimize=true
 load-config
filename=${FLEX_HOME}/frameworks/flex-config.xml/
 source-path path-element=${FLEX_HOME}/frameworks/
 compiler.library-path dir=${FLEX_HOME}/frameworks
append=true
 include name=libs /
 include name=../bundles/{locale} /
 /compiler.library-path
 /mxmlc
 /target
---



RE: [flexcoders] event or method called when TileList renderer becomes visible?

2007-11-08 Thread Alex Harui
Don't think there's an event for this.  TL normally doesn't recycle, it
re-creates every renderer from scratch.  It may recycle in next 3.0
beta.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Charles Galpin
Sent: Thursday, November 08, 2007 7:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] event or method called when TileList renderer
becomes visible?

 

What event gets fired, or what method is called on a renderer when it 
comes into view on a tile list? I have a custom renderer that changes 
how it draws itself based on a number of things, and everything works 
great except if I scroll it off screen, then scroll it back, it seems 
to have lost some of the information it uses to draw itself (but this 
info hasn't changed). I'm trying to figure out why this is happening 
(i think it might be getting recycled and when re-used isn't 
initializing) but wanted to also make sure what when the renderer 
becomes visible I can verify my assumptions (or make it redraw itself 
then).

thanks
charles

 



RE: [flexcoders] How to change highlight color?

2007-11-08 Thread Alex Harui
Search the forum archives.  There is no API, but some have faked
solutions.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yakov Fain
Sent: Thursday, November 08, 2007 8:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to change highlight color?

 

Hello,

We have a Flex TextInput component that uses a CSS with white text on
black background. When the user drags the mouse over the text or uses
Shift+Arrow key, I'd like to change the colors so the highlighted
portion of the text is shown in black on white background.

I wonder if anyone know an easy way to do this in Flex?

Thanks,
Yakov Fain

 



[flexcoders] Re: Why is drawHighlightIndicator() called multiple times?

2007-11-08 Thread ben.clinkinbeard
2.0.1 HF1


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

 Which version?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of ben.clinkinbeard
 Sent: Thursday, November 08, 2007 7:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Why is drawHighlightIndicator() called multiple
 times?
 
  
 
 When rolling over a DataGrid, drawHighlightIndicator() seems to get
 called several times (6 or 7 usually) if the mouse is over any column
 but the first. This is a problem when trying to animate the highlight.
 Any explanation of why this happens and/or workarounds would be
 appreciated.
 
 Thanks,
 Ben





[flexcoders] WebManiacs 2008 conference call for speakers extended to 11/30/20 07

2007-11-08 Thread Steve Drucker
Greetings everyone!
 
The call for papers for WebManiacs 2008 has been extended to Nov. 30.
 
The 3 day FLEX+AIR combined with 2 day CF+AIR conference will be held in
Washington DC, May 19-23rd.
 
The conference will have eight concurrent tracks, four of which will involve
hands-on training.
 
Please check out the conference at http://www.webmaniacsconference.com
http://www.webmaniacsconference.com  for more details and to submit a
topic!
 

Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / WebSense / Paperthin  Premier Consulting and Training
Partners
http://www.figleaf.com http://www.figleaf.com/ 
http://training.figleaf.com http://training.figleaf.com/ 



 
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/msgI
d=93102/stime=1194534520/nc1=4507179/nc2=3848640/nc3=4725792 
 



[flexcoders] Re: First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread Dave
You want to turn the result into an array collection then yyou have to
convert the object to array.

vyourVar=new ArrayCollection( ArrayUtil.toArray(response));

That will give you the array collection.


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

 Use ObjectUtil.toString() to see what type the result really is in
the Console, my guess is it's an Array though.
 
 import mx.utils.ObjectUtil;
 
 public function onResult( result:Object ):void {
 trace(ObjectUtil.toString(result));
 selInventoryGroups.dataProvider = new ArrayCollection(result
as Array);
 }
 
 
 - Original Message - 
 From: oneproofdk [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, November 08, 2007 10:38 AM
 Subject: [flexcoders] First attemt at getting result back from
AMFPHP - Why is it a Object
 
 
 I'm using AMFPHP 1.9B and have created a service called
 inventory.getInventoryGroups - in the AMF service browser I see the
 result just perfect. :
 
 I'm trying to populate a simple ComboBox with the result ! What have I
 done wrong  [:-/]  ?
 
 BTW If I select result : ArrayCollection it returns an error Cant
 convert Object to ArrayCollection
 
 Thanks for your help,
 Mark





[flexcoders] Re: First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread Dave
You need the Object to be an array collection then you need to convert:

yourVar=new ArrayCollection( ArrayUtil.toArray(response));/*response
being your returned object*/

I hope that helps


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

 I'm using AMFPHP 1.9B and have created a service called
 inventory.getInventoryGroups - in the AMF service browser I see the
 result just perfect. :
 (mx.collections::ArrayCollection)#0
filterFunction = (null)
length = 5
list = (mx.collections::ArrayList)#1
  length = 5
  source = (Array)#2
[0] (Object)#3
  data = 1
  label = Moduler
[1] (Object)#4
  data = 2
  label = Hylder
[2] (Object)#5
  data = 3
  label = Skuffer
[3] (Object)#6
  data = 4
  label = Hvidlakerede bakker
[4] (Object)#7
  data = 5
  label = Andet
  uid = 42A87A93-37B2-1BCF-2D31-1E7CD7004C04
sort = (null)
source = (Array)#2
 
 But when I try to use the result in Flex (I've modified the examples
 from Adobe
 http://www.adobe.com/devnet/flex/articles/flex2_amfphp.html, using a
 RemotingConnection copied from the Adobe example.
 
 The problem is, that I get an Object back from AMFPHP and I just cant
 figure out how to use that ??
 
 This is my AS snippet :
 public var gateway : RemotingConnection;
  public function initApplication():void
  {
  gateway = new RemotingConnection( gwurl );
  gateway.call( inventory.getInventoryGroups, new
 Responder(onResult, onFault));
  }
  public function onResult( result : Object ) : void
  {
  trace( result );
  selInventoryGroups.dataProvider = result as
ArrayCollection;
  }
  public function onFault( fault : String ) : void
  {
  trace( fault );
  }
 
 I'm trying to populate a simple ComboBox with the result ! What have I
 done wrong  [:-/]  ?
 
 BTW If I select result : ArrayCollection it returns an error Cant
 convert Object to ArrayCollection
 
 Thanks for your help,
 Mark





[flexcoders] Re: TabNavigator hide/show tabs

2007-11-08 Thread nasawebguy
Thanks Scott. I look it over some...very nice. But, I don't readily
see an option to programmatically close a specific tab. 


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

 You may be better off using the SuperTabBar 

http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html

 component from flexlib.
 
 hth
 Scott
 
 Scott Melby
 Founder, Fast Lane Software LLC
 http://www.fastlanesw.com
 
 
 
 nasawebguy wrote:
 
  I want to show/hide tabs based on user permissions. Permissions work
  fine on combo boxes, etc. But not tabs. What I do on the combos is
  simply set myCB.visible = true, if they have permissions to see it.
 
  I tried things like setting the tab canvas to true/false. Didn't do
  anything.
  I tried myTabCanvas.visible = false/true. Didn't do anything.
  I tried myTabNav.getChildAt(1).visible=false/true. Didn't do anything.
  I tried myTabNav.removeChildAt(2), etc. Didn't do anything.
 
  I know the permissions-side works because I use it with other
  component. I simple use an if/else to set visible= true/false.
 
  I have four tabs. MyTab, MyTeamTab,MySubRegionTab, MyRegionTab. If the
  user is team admin, he sees the team tab, etc. If the user is not an
  admin at all, they just see one MyTab.
 
  In general, I'm looking for what to fill in something like this..
  if (adminTeam == true) {
  show teamTab
  }
  else {
  don't show teamTab
  }
 
  Any suggestions?
 
  Also, does creationPolicy on the TabNavigator impact how this would
  work? If it does, what should it be set to? creationPolicy has bitten
  me before.:)
 
  Thanks,
  Don
 
 





[flexcoders] Problems using displayedMonth with a DateField

2007-11-08 Thread greenfishinwater
I have been using a DateField in my application that adds price data.
I noticed that when I added a second price that the visual calendar
part of the DateField when clicked would show the month and year of
the previous entered price start date. So I changed the application so
that when initialised the DateField attributes displatedMonth and
displayedYear were set to the current month and year.

My problem is that this does not work consistently. I have tracked it
in the debugger, the lines of code are always executed, but the values
sometimes don't change.

I have no idea how to resolve this.

Any suggestions?

Thanks Andrew



[flexcoders] Where is SQLAssembler source code?

2007-11-08 Thread changlim
Where can I get hold of the source code for 
flex.data.assemblers.SQLAssembler?

The LCDS says that the resources\samples\assemblers conontains source 
codes for both SQLAssembler and HibernateAssembler.  I only see 
HibernateAssembler.

I am trying to figure how to (via FDS configuration) dynamically add 
SQL statements just like in the case of HibernateAssembler's flex:hql.

Thanks,
Chang



Re: [flexcoders] Re: Flash game ESC problem

2007-11-08 Thread Troy Gilbert
 Well, in my case, we are making games for kids, from age 7-11, and all
 games run in full screen. We dont want the kids to press escape and get
 MINIMAZED windows, we want to game to exit completly on ESC, or block
 ESC and expose an exit button in game just like all other games do. The
 main point here is to make Flash tehnoloty transparent.

If you're making a web game, what you're wanting simply isn't possible
with Flash.

If you're making a standalone executable (using Flash as the engine),
then you can get the result you're wanting with a package like those
provided my MultiDMedia and other commercial projectors.

 The directX world wanted ALT+TAB blocked just to block users to get to
 windows while the game is running so it cant be easely cracked, or in
 MMORPG world, so that to pockets cant be sniffed easely.

Actually, that's not at all the reasons why ALT+TAB was blocked by
DirectX games. Handling the lost of focus used to be a pain under
DirectX and many developers simply chose to prevent it rather than
properly handle it. The latest versions of DirectX can optionally
handle all focus issues for the application transparently (at the
expense of memory usage), and under the latest MS OS's and DirectX I
don't think you can actually block ALT+TAB from working (I may be
wrong, though).

Troy.


[flexcoders] Deploying FLEX *.swf's and LCDS services on two separate servers

2007-11-08 Thread jfujita1
Hi,

I've been building and debugging my flex/LCDS application on my local
machine using Jrun to host my swf's and the LCDS messaging and Data
services that it subscribes to.  Now the application is almost done
and I'm thinking about deployment.  Due to performance concerns I'm
trying to separate the swf hosting and LCDS services on two different
servers. 

ie: I want one web application server (jrun or tomcat) to just host
the swf and assets.  I want another separate web application server to
run LCDS (via jrun or tomcat) and handle the RTMP and data management
assemblers.

The idea is that one server handles the load of hosting the
swf/application assets while the other server just concentrates on
processing/transmitting RTMP messages and managing data assemblers.  

My problem is that I can't figure out how to change the
compiler/server settings so that the compiled .swf files subscribe to
the LCDS services hosted on another server.  


I'd appreciate it if anybody with experience in this matter would be
kind enough to help.   



[flexcoders] issue with ContextMenu.hideBuiltInItems() not working when mouse is over an embe

2007-11-08 Thread Body Works Studio
Hi all. I am having a problem with the ContextMenu.hideBuiltInItems()
not working when the mouse is over an embedded image. I am calling
ContextMenu.hideBuiltInItems() by :

private function hideMenu ():void
{
var cmContextMenu:Object = new ContextMenu();
cmContextMenu.hideBuiltInItems();
}

and then in my mx:Application tag I have initialize=hideMenu()

This is removing the zoom play etc options for most of my app, but
when the mouse is over mx:Image tag the right click actually displays
the default contextMenu. 

Does anyone have any ideas?

thanks for your time

Jeff



[flexcoders] How to change highlight color?

2007-11-08 Thread Yakov Fain
Hello,

We have a Flex TextInput component that uses a CSS with white text on
black background. When the user drags the mouse over the text or uses
Shift+Arrow key, I'd like to change the colors so the highlighted
portion of the text is shown in black on white background.

I wonder if anyone know an easy way to do this in Flex?

Thanks,
Yakov Fain



[flexcoders] scroll

2007-11-08 Thread David Simpson
http://www.saatchi-gallery.co.uk/photographers/

Had someone done the same auto/continues scroll work in past as present at the 
top of the above mentioned link page?

If some one did that in Flex and he can provide some code help or any 
suggestions then that would be really appreciated.

Regards,

David 
([EMAIL PROTECTED])

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: [flexcoders] Re: How to detect compiled Date Time by itself

2007-11-08 Thread Samuel R. Neff

We have a Version.as file which gets updated through a build script when we
make a build so we get compiled time and SVN version number.  

HTH,

Sam 


---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flexawesome
Sent: Thursday, November 08, 2007 10:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to detect compiled Date  Time by itself

is that possible? thanks 

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

 hey guys,
 
 Is there a way to detect compiled Date  Time by Flex swf itself? If so, I
could place a 
 TextField in Flex and show up the version. ( the text field reads the own
file information 
such 
 as last modify.. by itself )
 
 I don't need to change the version once I need to recompile and it has
abality to show up 
the 
 date/time
 
 Thanks




[flexcoders] Re: Streaming bytes through a web service

2007-11-08 Thread jeremyfstewart
I think I am following what you are saying about setting the result
type, but I am unsure of how to set it. I see from the Flex 3 API
documentation that on the WebService you can set the Operation type, but
it is done through the mx:operation tag and not through the WebService
class itself (although their is a protected method initializeOpertion on
the WebService).

Is Flex like Java, where if I want to have access to that protected
method, then I need to create a class that extends the WebService and is
located in the same package structure?

Is this what you were thinking by the setting the result type? If so,
which type? Object?

mx:operation
Properties
concurrency=multiple|single|last
name=No default, required.
resultFormat=object|xml|e4x
makeObjectsBindable=false|true

Events
fault=No default.
result=No default.
/
If I do return it as an object, then do I need to write my own
attachments class that will know how to handle attachments?

Oh, I do not think I mentioned this yet, but I am using Flex 3 beta 2.

Thank you,

Jeremy



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

 Hello All,

 Thank you very much for your help! As far as an HTTP sniffer, I have
 used Firebug for Firefox and HTTPWatch for IE, but to no avail. I
cannot
 seem to find where the response is in the watch output. I prefer
Firebug
 for this type of debugging, so if somebody knows where I should be
able
 to find the XML response from the service, that would be great!

 As far as the code, here it is (in fragments). Oh, you can tell that I
 am just trying to modify the restaurant web service example from
Adobe,
 and I still have not changed some of the method nor function names
 (http://www.adobe.com/devnet/flex/samples/restaurant/
 http://www.adobe.com/devnet/flex/samples/restaurant/  ). If you pull
 up that example, then the below code snippets are from
 ServiceLocator.as, ReviewsList.mxml, and TokenResponder.as. I have
 renamed some of the classes, but other than that, most of the code is
 the same.:

 Thank you!

 Jeremy

 // gets the instance of the service (ServiceLocator.as).

  public static function getBnxService():AbstractService
  {
 if (bnxService == null) {
  var ws:WebService = new WebService();
 //ws.wsdl =
 http://flexapps.macromedia.com/ws/services/RestaurantWS?wsdl;;
  ws.wsdl =
 http://bnx-int-next.temp.com/tempservice/services/TempService?wsdl;;
  /* if you want to use  your own WebService adjust the
 following url
 to match your setup and comment out the one above */
  //ws.wsdl =

http://{server.name}:{server.port}/{context.root}/services/RestaurantWS\
\
 ?wsdl;
  ws.useProxy = false;
  ws.showBusyCursor = true;
  ws.loadWSDL();
  bnxService = ws;

  }
  return bnxService;
  }
 //

\
\
 ---

 // Calling the service... this is from the mxml file that will render
 the results (ReviewsList.mxml):
  private function initComp():void
  {
  service = BnxServiceLocator.getBnxService();
  addEventListener(focus, focusEventHandler);
  }


  public function set restaurant(restaurant:Object):void
  {
// When the restaurant changes: retrieve the list of
 reviews
assets = null;
  _restaurant = restaurant;
  if (restaurant != null)
  {
 //
 Alert.show(service.getMyFolderContents(0b7dea6680024809), does this
 show);
  var token: AsyncToken =
 AsyncToken(service.getFolderContents(0b7dea6680024809));
  // Specify that we want the 'getReviewsResult'
function
 to be called when the call completes.
  // See control.RestaurantService.as for details on
how
 the resultHandler token is used to invoke getReviewsResult.
  token.addResponder(new
TokenResponder(getAssetsResult,
 Error Retrieving Asset));
  }
  }

 //

\
\
 --


 // The TokenResponder.as class:

 package samples.restaurant
 {

 import mx.controls.Alert;
 import mx.rpc.IResponder;
 import mx.rpc.events.FaultEvent;

 /**
   * A simple responder that will call the result function specified
but
   * handles any fault by simply raising an Alert with the specified
 title.
   */
 public class TokenResponder implements IResponder
 {
  private var resultHandler:Function;
  private var faultTitle:String;

  public function TokenResponder(result:Function,
 faultTitle:String=null)
  {
  super();
  resultHandler = result;
  this.faultTitle = faultTitle;
  }
  public function result(data:Object):void
  {
  resultHandler(data);

  }

RE: [flexcoders] Problem adding a control to a container??

2007-11-08 Thread Alex Harui
If the label isn't offscreen below the DG, then file a bug.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of reflexactions
Sent: Thursday, November 08, 2007 1:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem adding a control to a container??

 

Given you have a container(outer) that contains another container
(inner) which itself contains a control that is large enough to force 
the scrollbars on in container inner i.e.

mx:VBox id=outer
mx:VBox height=300 id=inner
mx:DataGrid height=400 width=200/
/mx:VBox 
/mx:VBox

Then you run the following code (you can run it from appComplete)

inner.parent.removeChild(inner);
var lbl:Label = new Label();
lbl.text=HELLO WORLD
inner.addChild(lbl);
outer.addChild(inner);

The Label never appears, however change the height of inner (say just 
remove the height attribute) so the scrollbars dont come on, run 
again and Label appears.

Anyone seen this issue? 

It appears to me the problem is connected with setting the nestLevel 
on child controls. 

When you add the inner container back in it will try to set the 
nestLevel on all its children which is what we want for the Label 
becuase as it is newly created its nestLevel is 0 and it wont appear. 
However it uses rawChildren to iterate over the child objects and 
if the scrollbars are on the Label is not a raw child of the 
container, the contentPane is but it is a sprite so it is ignored by 
the container so Label never gets its nestLevel set.

The reason why the grid stays visible is because its nestLevel never 
got set to 0 when the container was removed because again the 
container ignored it.

Seems a prb in both FB2 and FB3.

tks

 



[flexcoders] Scrollbar on the left side of TextArea

2007-11-08 Thread Adnan Doric
Hello,

Is that possible in Flex ?
If yes can someone please provide an exemple, I can't find that property 
on TextArea so I will try to extend something :)

Thank you !
Adnan


[flexcoders] Updating DataGrid Item with Tomcat

2007-11-08 Thread Alex Birch
The DataGrid is so amazing. I may be abusing it, yet I would like to display
information to a user and let them update information. Ideally, I could call
a Servlet on a Tomcat server.

My question is how can I tell which DataRows have been updated by the user.
My hackneyed approach has been to try and clone a version of the original
data, then I was going to compare the data before calling a httpservice.
Unfortunately I haven't found a nice deep copy method to copy an array.

Any pointer to an example for updating an editable datagrid, then calling a
servlet (I've found many with the RemoteObject.)

Here is an example below.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
initialize=initApp()
mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.ICollectionView;
public var unmodifiedDataProvider:Object = null;
[Bindable]
private var modifiableDataProvider:mx.collections.ICollectionView =
null;

private function initApp():void{
this.statesHttpService.send();
}

 private function stateModelResult(event:ResultEvent):void {
 try{
 modifiableDataProvider = event.result.Requests.Request;
 unmodifiedDataProvider = new Object();
 for (var i:int = 0; i  modifiableDataProvider.length; i++)
   {
unmodifiedDataProvider[i] =
modifiableDataProvider[i].valueOf();
//Any deep copy method would be immeasurably appreciated
   }
 }
 catch (err:Error)
 {
 unmodifiedDataProvider = null;
 modifiableDataProvider = null;
 this.updateLinkButton.enabled = false;

 }
}

private function updateInformation():void {
  var object:Object;


  for (var i:int = 0; i  modifiableDataProvider.length; i++)
  {
  object = modifiableDataProvider[i];
  }
  }
]]

/mx:Script
mx:HTTPService id=statesHttpService method=get  url=
http://www.lifesabirch.org/target.xml;   result=stateModelResult(event) /
 mx:LinkButton x=463 y=85 id=updateLinkButton label=Update
click=updateInformation()/

mx:DataGrid x=66 y=115 id=requestDataGrid
dataProvider={modifiableDataProvider} width=95% height=95%
editable=true
   mx:columns
mx:DataGridColumn dataField=RequestID headerText=Order Number
editable=false /
mx:DataGridColumn dataField=Target headerText=Target
itemEditor=mx.controls.TextInput editorDataField=text editable=true /
mx:DataGridColumn dataField=Comments headerText=Comments
itemEditor=mx.controls.TextInput editorDataField=text editable=true /
   /mx:columns
   /mx:DataGrid
/mx:Application


-- 
~~
http://www.lifesabirch.org


[flexcoders] Re: How to detect compiled Date Time by itself

2007-11-08 Thread flexawesome
May I have the version.as file? 

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

 
 We have a Version.as file which gets updated through a build script when we
 make a build so we get compiled time and SVN version number.  
 
 HTH,
 
 Sam 
 
 
 ---
 We're Hiring! Seeking a passionate developer to join our team building Flex
 based products. Position is in the Washington D.C. metro area. If interested
 contact [EMAIL PROTECTED]
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of flexawesome
 Sent: Thursday, November 08, 2007 10:15 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: How to detect compiled Date  Time by itself
 
 is that possible? thanks 
 
 --- In flexcoders@yahoogroups.com, flexawesome flexawesome@ wrote:
 
  hey guys,
  
  Is there a way to detect compiled Date  Time by Flex swf itself? If so, I
 could place a 
  TextField in Flex and show up the version. ( the text field reads the own
 file information 
 such 
  as last modify.. by itself )
  
  I don't need to change the version once I need to recompile and it has
 abality to show up 
 the 
  date/time
  
  Thanks
 





Re: [flexcoders] Re: TabNavigator hide/show tabs

2007-11-08 Thread Scott Melby
Should be possible to remove child using something like the following.  
In fact I believe this should work with regular TabNavigator as well.


tabNav.removeChildAt(index);
tabNav.invalidateDisplayList();

hth
Scott

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



nasawebguy wrote:


Thanks Scott. I look it over some...very nice. But, I don't readily
see an option to programmatically close a specific tab.

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


 You may be better off using the SuperTabBar

http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html 
http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html


 component from flexlib.

 hth
 Scott

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



 nasawebguy wrote:
 
  I want to show/hide tabs based on user permissions. Permissions work
  fine on combo boxes, etc. But not tabs. What I do on the combos is
  simply set myCB.visible = true, if they have permissions to see it.
 
  I tried things like setting the tab canvas to true/false. Didn't do
  anything.
  I tried myTabCanvas.visible = false/true. Didn't do anything.
  I tried myTabNav.getChildAt(1).visible=false/true. Didn't do anything.
  I tried myTabNav.removeChildAt(2), etc. Didn't do anything.
 
  I know the permissions-side works because I use it with other
  component. I simple use an if/else to set visible= true/false.
 
  I have four tabs. MyTab, MyTeamTab,MySubRegionTab, MyRegionTab. If the
  user is team admin, he sees the team tab, etc. If the user is not an
  admin at all, they just see one MyTab.
 
  In general, I'm looking for what to fill in something like this..
  if (adminTeam == true) {
  show teamTab
  }
  else {
  don't show teamTab
  }
 
  Any suggestions?
 
  Also, does creationPolicy on the TabNavigator impact how this would
  work? If it does, what should it be set to? creationPolicy has bitten
  me before.:)
 
  Thanks,
  Don
 
 


 


[flexcoders] segments with out of range endpoints on LineSeries

2007-11-08 Thread ctkemper
Is there some way to get LineSeries to draw segments with out-of-range
endpoints, other than setting filterData=false ?

I have a LineChart with a DateTimeAxis that has its minimum and
maximum set so that not all data points are visible. As suggested in
messages 61005 and 62883, I set filterData=false so that LineSeries
segments are drawn in the chart area even if the endpoints are out of
range. But this causes two unwanted effects:

- data tips stop working (as described in message 65440)

- NaN or missing points are plotted on chart (with y value = max y
value in data provider).






[flexcoders] Re: Flex 2.0.1: itemRenderer won't get printed using PrintDataGrid

2007-11-08 Thread Phil Heinz
Muzak,

Thanks so much for your examples. I have it working using the
ByteArray method. I couldn't use the MovieClip example because it
still is moving a single copy from Loader to Loader, but with the
ByteArray, I can make multiple Loaders load the same ByteArray, and
they are separate unique instances.

Thanks again!

Phil



[flexcoders] Re: Vista, Eclipse 3.2.2 and a Microsoft Mouse

2007-11-08 Thread Paul Whitelock
Can't ... take it ... any ... more ... Aagg! 

I just ordered a Logitech mouse.



[flexcoders] Generic way to deep copy an ActionScript object?

2007-11-08 Thread Peter Connolly
ObjectUtil.copy() is pretty limited.  Isn't there a util class out
there that will do a deep copy of a user object?


RE: [flexcoders] Can't use an undefined conditional anymore?

2007-11-08 Thread Gordon Smith
 If they are uninitialized then they are null, 0 or false, depending on
the actual type. 
 
Or NaN, for an uninitialized Number.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Hall
Sent: Thursday, October 25, 2007 7:29 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Can't use an undefined conditional anymore?



Just to tie up the loose ends... if a variable has a type annotation
then undefined is an illegal value. Only untyped variables, or variables
typed as *, may be assigned with undefined. If they are uninitialized
then they are null, 0 or false, depending on the actual type. Your code
probably works because the value is actually null, and the == operator
does not differentiate between null and undefined (the === operator does
however make this distinction). 

see:
http://livedocs.adobe.com/flex/201/langref/specialTypes.html#*
http://livedocs.adobe.com/flex/201/langref/specialTypes.html#* 
http://livedocs.adobe.com/flex/201/langref/package.html#undefined
http://livedocs.adobe.com/flex/201/langref/package.html#undefined 

Peter



On 10/25/07, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  wrote: 

Nice - much more elegant - thanks alot



 if(foo) will give you the same result. basically if the
instance is there
 it'll work else it won't

 On 10/25/07, [EMAIL PROTECTED] mailto:tim%40e-smartz.com  
[EMAIL PROTECTED] mailto:tim%40e-smartz.com  wrote:

 Hi,

 I used to do conditionals based on undefined all the time in
AS 2. For
 example I would do a data look up and then cast the results
to a class
 called foo. Then I could do a conditional if (foo ==
undefined) // go
 and
 do whatever as the data ovbiously doesn't exist or has not
been
 recieved.
 Now in AS3 this method still works but I get a warning that
the class
 cannot be undefined and undefined will be type coerced into a
foo class.
 As I said it still wors so I'm not too fussed, but it's never
good to
 see
 warnings!

 Tim






 --
 j:pn
 \\no comment









 


[flexcoders] Development with Remote CF Server

2007-11-08 Thread phall121
I have a developer that normally develops with PHP.  I want him to be 
able to do some coding for us on an application that uses ColdFusion 
and a backend database that he doesn't have installed on his 
development machine.

Can I set up a second Destination and Channel in our app that will 
point the app to our CF Server/database, so that he can develop on our 
application without having to install ColdFusion or our database 
engine on his development box?

It seems like it should be possible.  But, I can't figure out the 
syntax for the Channel...what port to I point it to and what do I have 
to put on the server in order to let the app connect remotely during 
development?

Thx



RE: [flexcoders]Duplicate Image

2007-11-08 Thread Alex Harui
Var img:Image = new Image();

img.source = resizeGrip.source

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dorkie dork from dorktown
Sent: Thursday, November 08, 2007 1:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]Duplicate Image

 

I'm having a hard time figuring out how to duplicate an Image. Not a
bitmap. 

I have an image tag like this:
mx:Image x=10 y=10 source=images/resizeGrip.png id=resizeGrip/


How would I make duplicates, their own instances, of this image in code?


 



Re: [flexcoders] Flex 3 beta swf expiration

2007-11-08 Thread superabe superabe
Thanks for the reply. Thats good to know.

On Nov 8, 2007 12:35 PM, Matt Chotin [EMAIL PROTECTED] wrote:









 The SWFs themselves should not expire.



 Matt





 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of superabe superabe
  Sent: Thursday, November 08, 2007 3:28 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Flex 3 beta swf expiration







 Anybody from Adobe or otherwise, know if the swfs/swc we generate
  today using the Flex 3 beta version (including the datavisualization
  charts), will expire when the final versions ships ??
  If it will, is there sufficient overlap between when the final version
  will be availablle for purchase online and the expiration date ?

  TIA

  - superabe

  


[flexcoders] No debugging source code in FB3 beta 2

2007-11-08 Thread Randy Martin
The fact that FB3 beta 2 does not come with all the source code is driving
me crazy!! I can't run the debugger because invariably, somewhere during the
step-through, it comes to a point where it can't find the source code in the
framework.
 
When is this problem going to be resolved? I keep having to go back to FB
2.01 with sections of the code to debug it. It's a real pain in the ass.
 
~randy

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.503 / Virus Database: 269.15.24/1117 - Release Date: 11/7/2007
10:52 PM
 


[flexcoders] Security issue - Opening a new window

2007-11-08 Thread g07m5064
Hi, 
Whenever I try to access another application in domain I get this error:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2047:
Security sandbox violation: LocalConnection.send: rucus.net cannot access

I tried  Security.allowDomain('http://mathe.rucus.net/'); on the
application being accessed. However, this didn't do the trick. I also
did performed several refreshes on the application being accessed. It
seems that randomly after the refreshes I get the same error. Can
someone help please. 



RE: [flexcoders] Re: Dates and Months Problem

2007-11-08 Thread Gordon Smith
 Flex decided to be stupid like most programming languages and count
from zero
 
Actually, the ECMAScript committee -- and before that, the folks at
Mozilla who invented JavaScript -- made this decision long before Flex
existed. Adobe and the Flash and Flex teams are just trying to be
standards-compliant whereever that's appropriate.
 
- Gordon (who's been on vacation and is catching up on old email)



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason The Saj
Sent: Wednesday, October 03, 2007 10:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Dates and Months Problem



Because Flex decided to be stupid like most programming languages and
count from zero.

Which make for additional work and headache. I so miss ColdFusion's
date/time handling. It was beautiful. It was the way date/time should
be.

Of course, I also like counting from 1 instead of zero. And yes, I
understand memory arguments and advanced math arguments. But I believe
such crud should be handled by the compiler and low level languages.

You don't go and withdraw money from the bank and have a teller count
$0, $1, $2, $3,...$9. There are your $10 sir!

*shrug*

Yup, when I encountered that I was so annoyed. I had really hoped some
of the niceness of ColdFusion would rub off onto AS3. But alas, looks
like we're going the other route. *sighs*

- Jason

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

 Hello all, how you doing ^^
 
 I want to get the month we are by number.
 Can some one explain me why is flex saying the Month we are is 9
 (Setpember) day 1 ?
 
 
 trace(dataHoje.toDateString())
 trace(dataHoje.month)
 trace(dataHoje.monthUTC)
 trace(dataHoje.day)
 
 Mon Oct 1 2007
 9
 9
 1
 
 
 Thanks for all,
 Core




 


[flexcoders] Re: AFEFontManager

2007-11-08 Thread toofah_gm
Thanks to some excellent support from Adobe on this one we have been
able to work through this issue for now.  For details on this problem,
 refer to the bug: http://bugs.adobe.com/jira/browse/SDK-13352

Thanks Adobe!!!

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

 AFEFontManager uses the Adobe Font Engine which is our Java library for
 working with fonts.  The Managers are what the compiler uses to embed
 fonts.  We believe the AFEFontManager is a better implementation than
 Batik and handles more than JRE.  For example, this is the engine we
 need to support OpenType font embedding.  It was introduced as part of
 Flex 3.  So I would recommend trying to use AFEFontManager over the
 others.  We've even considered removing the Batik version but decided to
 leave it in just in case.
 
  
 
 Matt
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of toofah_gm
 Sent: Wednesday, November 07, 2007 2:05 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] AFEFontManager
 
  
 
 I logged the following bug about fonts rendering incorrectly:
 http://bugs.adobe.com/jira/browse/SDK-13352
 
 I got this response:
 This problem only happens with BatikFontManager. The fonts show up 
 correctly for both JREFontManager and AFEFontManager.
 
 I have tried Googling AFEFontManager as well as just trying to use
 it on my commandline, but have not had success. I have successfully
 used JREFontManager and it seems to fix the problem, but at what
 expense?
 
 Can anyone tell me more about this AFEFontManager and about
 FontManagers in general?
 
 I have a book building and rendering application and am very nervous
 about switching the FontManager that is being used. We need 100%
 consistency between what the customer sees when they click to order
 the book and what they see in the finished product. 
 
 If I switch FontManagers to fix the problems seen in European
 characters with BatikFontManager will I find other problems that I
 can't live with in the JREFontManager? And what is this
 AFEFontManager and how does it compare.
 
 Thanks for listening.
 
 Gary





RE: [flexcoders] Vista, Eclipse 3.2.2 and a Microsoft Mouse

2007-11-08 Thread Samuel R. Neff

You could try Eclipse 3.3.. I don't know of any changes why it would work in
one or the other, but I have a MS Wireless Natural Laser Mouse 7000 and
don't have problems with Eclipse scrolling (and I previously had a MS
Wireless Laser 6000 and similarly no problems).

I the past I had problems with a Logitech mouse not scrolling in MS Visual
Studio and in that situation the driver provided a basic and advanced
scrolling with an option to turn off advanced scrolling in some
applications.  However, I don't see anything like that in the Intellipoint
6.2 software.

I would recommend calling MS support--they may not help since problem is
only with Eclipse but in the past I've been pleasantly surprised with the
quality of MS hardware support (stress: hardware).

Good luck.

Sam


---
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Whitelock
Sent: Thursday, November 08, 2007 3:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Vista, Eclipse 3.2.2 and a Microsoft Mouse

My old mouse went to the big cheese factory in the sky and I replaced
it with a Microsoft Wireless Laser Mouse 8000. The problem is that the
scroll wheel does not scroll source code in Eclipse 3.2 (the scroll
wheel works in every application other than Eclipse).

I tried uninstalling the Microsoft IntelliPoint 6.2 driver reverting
to the generic mouse driver and scrolling began to work in Eclipse,
but the next time I booted my machine I was back to a having a
disfunctional scroll wheel.

I did some Googling and apparently there are other people with the
same problem (scroll wheel does not function with a Microsoft mouse in
Eclipse), but I haven't seen any solutions. Has anyone here had the
problem and found a workaround? It's a real pain not to be able to
scroll through my Flex code with the scroll wheel

Thanks!

Paul



Re: [flexcoders] Re: Flex 2.0.1: itemRenderer won't get printed using PrintDataGrid

2007-11-08 Thread Muzak
With the MovieClip route you can duplicate the MovieClip manually:
http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/display/duplicateDisplayObject.as

There's an optimized version in the LiveDocs comments, that duplicates child 
MovieClips recursively:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html

regards,
Muzak

- Original Message - 
From: Phil Heinz [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, November 08, 2007 10:27 PM
Subject: [flexcoders] Re: Flex 2.0.1: itemRenderer won't get printed using 
PrintDataGrid


Muzak,

Thanks so much for your examples. I have it working using the
ByteArray method. I couldn't use the MovieClip example because it
still is moving a single copy from Loader to Loader, but with the
ByteArray, I can make multiple Loaders load the same ByteArray, and
they are separate unique instances.

Thanks again!

Phil




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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


Re: [flexcoders] ScrollEvent.SCROLL -- what comes after?

2007-11-08 Thread Rick Schmitty
The 2nd option didnt move the tracking graphics for me and the first
option produced the same results: updateComplete placement was lagged
behind where the debug button places it.


Here is the traceoutput if you cant run it, my notes in **  The x,y
values is where I trace the variable p which is generated by the same
localToGlobal function


** movie done loading  **
update green
(x=200, y=200)
** next i scroll the container **
update green
(x=200, y=200)
update green
(x=193, y=200)
update green
(x=188, y=200)
** now I click the debug button a few seconds later and do not touch
anything else **
debug blue
(x=181, y=200)
** in this case updateComplete was 7 pixels off where the object
stopped actually scrolling **


On Nov 7, 2007 9:49 PM, Alex Harui [EMAIL PROTECTED] wrote:

 I didn't run it, but I think you're off a level.  Normally you either do:



 var p:Point=box.localToGlobal(new Point(box.width,box.height))



 or



 var p:Point=box.parent.localToGlobal(new
 Point(box.x+box.width,box.y+box.height))



 because 'local' is local to box or box.parent.



  


 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Rick Schmitty
  Sent: Wednesday, November 07, 2007 3:31 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] ScrollEvent.SCROLL -- what comes after?








 Am I using/understanding updateComplete correctly? If you run this
  sample file, scroll with the mousewheel or the scrollbars it will
  trace the scroll and updateComplete values. But if you hit the debug
  button it shows things arent the same. Sometimes within a few pixels
  othertimes up to 24 pixel difference

  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  mx:Script
  ![CDATA[
  private function update():void {
  trace(update green);
  var p:Point=box.localToGlobal(new Point(box.x+box.width,box.y+box.height))
  trace(p); // lower right corner of box
  canvas.graphics.clear();
  canvas.graphics.lineStyle(2,0x00ff00);
  canvas.graphics.drawCircle(p.x,p.y,4);
  }

  private function debug():void {
  trace(debug blue);
  var p:Point=box.localToGlobal(new Point(box.x+box.width,box.y+box.height))
  trace(p); // lower right corner of box
  canvas.graphics.lineStyle(2,0xff);
  canvas.graphics.drawCircle(p.x,p.y,4);
  }
  ]]
  /mx:Script

  mx:Canvas width=500 height=500 updateComplete=update()

  !-- object we want to track --
  mx:Canvas id=box backgroundColor=0xff backgroundAlpha=0.5
  width=200 height=200/

  !-- some large object to cause scrollbars --
  mx:Canvas width=800 height=800 backgroundColor=0xff
  backgroundAlpha=0.1/

  /mx:Canvas

  mx:Button label=debug click=debug() x=550/

  !-- just something on top of everything else to see the graphics --
  mx:Canvas id=canvas/

  /mx:Application

  On Nov 7, 2007 2:13 PM, Alex Harui [EMAIL PROTECTED] wrote:
  
  
  
  
  
  
  
  
  
   updateComplete
  
  
  
   
  
  
   From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
   Behalf Of Rick Schmitty
   Sent: Wednesday, November 07, 2007 1:42 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] ScrollEvent.SCROLL -- what comes after?
  
  
  
  
  
  
  
   From the docs it says At the time when this event is dispatched, the
   scrollbar has been updated to the new position, but the container's
   child objects have not been shifted to reflect the new scroll
   position. What should I be listening for when the container's child
   object have finished shifting?
  
   Thanks in advance!
  
  



  


[flexcoders] Re: Q: Issues generating AS proxy classes from WSDL

2007-11-08 Thread Adam Bradley
--- In flexcoders@yahoogroups.com, Adam Bradley
[EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
 
  
  Forgetting about Flex for a moment, I first tried loading your WSDL
  using Eclipse WTP 1.5.5 (based on Eclipse 3.2.2)'s Web Service
  Explorer and it reported 100s of errors and warnings. I'd
  independently try to use Axis's WSDL2Java tool first to see if that
  can generate Java proxy stubs for this WSDL and see what errors you
  get there.
 
 
 Peter,
 
 Just a quick followup, in addition to the wsdl there are three schema
 files. I've just tried the wsdl2java ant task and it worked without
issue.
 
 Adam


Update at http://bugs.adobe.com/jira/browse/FB-10541.

Fixed in latest build (hopefully available in beta3)
Adam



[flexcoders] Vista, Eclipse 3.2.2 and a Microsoft Mouse

2007-11-08 Thread Paul Whitelock
My old mouse went to the big cheese factory in the sky and I replaced
it with a Microsoft Wireless Laser Mouse 8000. The problem is that the
scroll wheel does not scroll source code in Eclipse 3.2 (the scroll
wheel works in every application other than Eclipse).

I tried uninstalling the Microsoft IntelliPoint 6.2 driver reverting
to the generic mouse driver and scrolling began to work in Eclipse,
but the next time I booted my machine I was back to a having a
disfunctional scroll wheel.

I did some Googling and apparently there are other people with the
same problem (scroll wheel does not function with a Microsoft mouse in
Eclipse), but I haven't seen any solutions. Has anyone here had the
problem and found a workaround? It's a real pain not to be able to
scroll through my Flex code with the scroll wheel

Thanks!

Paul

---
Paul Whitelock
Denver, Colorado



[flexcoders] Re: First attemt at getting result back from AMFPHP - Why is it a Object

2007-11-08 Thread oneproofdk
Hi Dave

Hmm - now I trace [object Object] - seem slike the same. Here's what I
did :
public function initApplication():void
{
gateway = new RemotingConnection( gwurl );
gateway.call( inventory.getInventoryGroups, new
Responder(onResult, onFault));
}
public function onResult( result : Object ) : void
{
var dp:ArrayCollection = new ArrayCollection(
ArrayUtil.toArray(result))
trace (dp);
selInventoryGroups.dataProvider = dp;

Alert.show(selInventoryGroups.dataProvider.length.toString());
}

This is very strange - does anybody have this example working ? There
gotta be something wrong in my setup ??

Thanks for your time :-)

Mark

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

 You need the Object to be an array collection then you need to convert:
 
 yourVar=new ArrayCollection( ArrayUtil.toArray(response));/*response
 being your returned object*/
 
 I hope that helps
 
 
 --- In flexcoders@yahoogroups.com, oneproofdk mark@ wrote:
 




[flexcoders] Re: Flex 2.0.1: DataGridColumn width expands to the longest string

2007-11-08 Thread handitan
Thx for the suggestion, Alex.

I will look into that.
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Given some string, call the DG's measureText method to get the pixel
 size.
 
  
 
 If horizontalScrollPolicy=on, the width should be honored.  
If  auto
 things are proportional so I would try making it non-resizable until
 creationComplete then flip it to be resizable.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of handitan
 Sent: Wednesday, November 07, 2007 5:51 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 2.0.1: DataGridColumn width expands to 
the
 longest string
 
  
 
 Hi all,
 
 I know that this issue has been brought several times in this forum 
 but as far as I read there's no solution to this yet.
 
 Basically, there are 2 things that I want to do:
 1. I would like the dataGridColumn width to expand to its longest 
 string. 
 2. This should only happen when the grid is displayed on the 1st 
time.
 
 Way that I was doing to tackle the issue:
 - I made a custom DataGridColumn that enables me to calculate the 
 longest string length (fyi,I don't know how to determine the pixel 
 size so I just use some number -- if you know how to get the pixel 
 size, please let me know) by inspecting the string whenever 
 itemToLabel function is called and assign that value to width.
 Unfortunately, the result is very messy. The column is not just 
 rendering correctly and you cannot resize the column anymore.
 
 Anyway, I would like to get some ideas on how you all would take 
this 
 issue.
 
 Thank you for reading!





Re: [flexcoders] scroll

2007-11-08 Thread Steve Hueners
http://blog.benstucki.net/?p=23

On 11/8/07, David Simpson [EMAIL PROTECTED] wrote:

   http://www.saatchi-gallery.co.uk/photographers/

 Had someone done the same auto/continues scroll work in past as present at
 the top of the above mentioned link page?

 If some one did that in Flex and he can provide some code help or any
 suggestions then that would be really appreciated.

 Regards,

 David
 ([EMAIL PROTECTED])

 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

  



[flexcoders] Re: TabNavigator hide/show tabs

2007-11-08 Thread nasawebguy
This seems to do the trick in my case...courtesy of 
flexcoder Cato Paus http://www.umbrellacorp.no and SearchCoders.
Different problem, but I modified it to meet my needs.

Not sure why this works...
target.getTabAt(i).visible= false;
and not the getChildAt, removeChildAt things I tried

but it does. I need to learn more about FlexEvent

here is my test code...my not be the most elegant, but it works!

I really appreciate all your help. I may try the other suggestions too
to see what works best.

Hope this helps someone else.

Don

mx:Script
![CDATA[
import mx.events.FlexEvent;
public var teamAdmin:String = No;
public var subRegionAdmin:String = No;
public var regionAdmin:String = No;

private function 

tabNavigatorCreatonCompleteHandler(event:FlexEvent):void{ 
// setup TabNavigator 
var target:TabNavigator = TabNavigator(event.target); 

for(var i:int = 1; i  target.numChildren; 
i++){ 
 if (teamAdmin == No  i == 1 ) {
target.getTabAt(i).visible= false;
 }
 
 if (subRegionAdmin == No  i == 2 ) {
target.getTabAt(i).visible= false;
 }
 
 if (regionAdmin == No  i == 3 ) {
target.getTabAt(i).visible= false;
 }

}
}
]]
/mx:Script

mx:TabNavigator 
creationComplete=tabNavigatorCreatonCompleteHandler(event) 
width=100% height=100% 

mx:Canvas id=t1 label=tab 1

/mx:Canvas
mx:Canvas id=t2 label=tab 2

/mx:Canvas
mx:Canvas id=t3 label=tab 3

/mx:Canvas
mx:Canvas id=t4 label=tab 4

/mx:Canvas

/mx:TabNavigator 





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

 Thanks Scott. I look it over some...very nice. But, I don't readily
 see an option to programmatically close a specific tab. 
 
 
 --- In flexcoders@yahoogroups.com, Scott Melby smelby@ wrote:
 
  You may be better off using the SuperTabBar 
 

http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html
 
  component from flexlib.
  
  hth
  Scott
  
  Scott Melby
  Founder, Fast Lane Software LLC
  http://www.fastlanesw.com
  
  
  
  nasawebguy wrote:
  
   I want to show/hide tabs based on user permissions. Permissions work
   fine on combo boxes, etc. But not tabs. What I do on the combos is
   simply set myCB.visible = true, if they have permissions to see it.
  
   I tried things like setting the tab canvas to true/false. Didn't do
   anything.
   I tried myTabCanvas.visible = false/true. Didn't do anything.
   I tried myTabNav.getChildAt(1).visible=false/true. Didn't do
anything.
   I tried myTabNav.removeChildAt(2), etc. Didn't do anything.
  
   I know the permissions-side works because I use it with other
   component. I simple use an if/else to set visible= true/false.
  
   I have four tabs. MyTab, MyTeamTab,MySubRegionTab, MyRegionTab.
If the
   user is team admin, he sees the team tab, etc. If the user is not an
   admin at all, they just see one MyTab.
  
   In general, I'm looking for what to fill in something like this..
   if (adminTeam == true) {
   show teamTab
   }
   else {
   don't show teamTab
   }
  
   Any suggestions?
  
   Also, does creationPolicy on the TabNavigator impact how this would
   work? If it does, what should it be set to? creationPolicy has
bitten
   me before.:)
  
   Thanks,
   Don
  
  
 





[flexcoders] binding event processing

2007-11-08 Thread Anton K
Hi all,
I want to catch binding events. I have object bound to UI, I want to do 
some actions when the binding occurs.
The documentation says flex dispatches propertyChange event. I tried to 
listen to it though addEventListener, but it didn't work. Anybody knows why?
Then I tried to use ChangeWatcher. Well it works, but the handler is 
called multiple times. Depending on the type of UI widget, this is a 
FlexEvent and then MouseEvent, or any other component specific event.
Any Idea why it is called twice?
Thanks


[flexcoders] How would you make a heat map?

2007-11-08 Thread Nate Pearson
I'm thinking about making a heat map overlay.  I'm not sure how to go
about it though.  Does anyone have any ideas?

Lets say you have a grid, the more points you have in one place the
more red it is in that place, less would be yellow, then green, then blue.

I don't know how I would code this though

Any help is appreciated.



Re: [flexcoders] Saving Duplicate Reference in Data Services - Hibernate

2007-11-08 Thread Kevin
I want to update a little on the problem we are having. It is still  
not resolved so any help would be much appreciated:


This all has to do with saving images to our database (as Base64  
Strings) in a class called ImageVO which hold image, title, tags, etc...


We have a contacts class (ContactVO) which holds two things related  
to images: 1) an defaultImage  2) an images collection


OUR JAVA CLASS
@ManyToOne
public ImageVO getDefaultImage() {
return defaultImage;
}

public void setDefaultImage(ImageVO defaultImage) {
this.defaultImage = defaultImage;
}
@ManyToMany(cascade = { CascadeType.ALL })
public SetImageVO getImages() {
return images;
}

public void setImages(SetImageVO images) {
this.images = images;
}

OUR OUR ACTIONSCRIPT CLASS

  [ArrayElementType(com.onefoot.dbocl.vo.misc.ImageVO)]
  public var images : ArrayCollection = new ArrayCollection();

  public var defaultImage : ImageVO;

OUR DESTINATION
(** notice we do not set up a separate destination for Images since  
we have no need to manage a separate list of all our images in the  
database. However, do we need a destination for every potential  
nested collection in our objects?  I hope not, but possibly this is  
the case.)


destination id=contacts
   adapter ref=java-dao /
properties
 use-transactionstrue/use-transactions
 sourceflex.data.assemblers.HibernateAnnotationsAssembler/ 
source

 scopeapplication/scope
 metadata
  identity property=id/
  many-to-many property=addresses destination=addresses/
 /metadata
 network
  session-timeout20/session-timeout
  paging enabled=false pageSize=10 /
  throttle-inbound policy=ERROR max-frequency=500/
  throttle-outbound policy=REPLACE max-frequency=500/
 /network
 server
  hibernate-entitycom.onefoot.dbocl.vo.contacts.ContactVO/ 
hibernate-entity

  fill-method
   namefill/name
   paramsjava.util.List/params
  /fill-method
  fill-configuration
   use-query-cachefalse/use-query-cache
   allow-hql-queriestrue/allow-hql-queries
  /fill-configuration
 /server
/properties
 /destination

OUR CODE
In our code we create an ImageVO (myNewImageVO using our bitmap to  
Base64 conversion) and then add that image to the contact's image  
list, we then want to add the same image as the default image.


contactVO.images.addItem(myNewImageVO);
contactVO.defaultImage = myNewImageVO;
//WE TRIED THIS AS WELL WITH NO SUCCESS...
//contactVO.defaultImage = contactVO.images.getItemAt(0) as ImageVO;

HERE IS WHAT IS HAPPENING
1) with the addItem call (line 1), Flex-Hibernate is adding the  
image row to the images table  adding an entry in the  
contacts_images table.  What we would expect!


2) when we then add the same image to the defaultImage property (line  
2) it adds it again to the database in a new row and then puts the  
key of that row in a the defaultImage_id column in contacts.   
Basically it seems it is not seeing that the image is the same image  
as the one added to the images collection...not desirable...


3) HOWEVER, here is what is strange...
It then updates the row in the contacts_images table with the new id  
of this second image it has added, thus linking them all together  
like they should be. So ultimately, we have the structure we are  
after...but unfortunately, it doesn't remove the old image so now we  
have an orphaned image in the database.


(It is important to note that this same behavior happens when we make  
the two calls consecutive OR when we call them separately.  It is  
also important to note that doing this same process directly in Java  
(with Hibernate) works correctly without the duplicate image  
creation, so we are lead to believe there is something in the way we  
have set up Flex to work with Java  Hibernate that is causing this  
to behave this way.  Obviously, doing another complete insert of the  
image is wasteful since all that really needs to happen when one  
updates the defaultImage property is for a id to get saved in the  
contacts table...


If you have made it this far, thanks for reading and hopefully you  
can help us find out where we are going wrong with this stuff.  We  
have over 100 classes most of which include nested collections so  
this is going to be of great importance to us as we are developing.   
Also, if there is any documentation (other than the dev guide which  
is nice but seems incomplete) that give a more detailed description  
of each of the possible parameters in the data-management-config.xml,  
that would really help.  Are there docs for this?  We are finding it  
very hard to understand what to do in that document to get the  
behavior we are looking for. For example, what are the possible  
properties that can go inside the metadata tag?...


Thanks for your help with this!

- Kevin





On Nov 7, 2007, at 10:10 PM, Kevin wrote:

I am having a 

Re: [flexcoders] Re: TabNavigator hide/show tabs

2007-11-08 Thread Ralf Bokelberg
Use a Viewstack and a TabBar and
update the dataProvider of the TabBar
whenever the permissions change.
Cheers
Ralf.

On Nov 8, 2007 7:47 PM, Scott Melby [EMAIL PROTECTED] wrote:






  Should be possible to remove child using something like the following.  In
 fact I believe this should work with regular TabNavigator as well.

  tabNav.removeChildAt(index);
  tabNav.invalidateDisplayList();



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


  nasawebguy wrote:



 Thanks Scott. I look it over some...very nice. But, I don't readily
  see an option to programmatically close a specific tab.

  --- In flexcoders@yahoogroups.com, Scott Melby [EMAIL PROTECTED] wrote:
  
   You may be better off using the SuperTabBar
  

 http://flexlib.googlecode.com/svn/trunk/docs/flexlib/controls/SuperTabBar.html

   component from flexlib.
  
   hth
   Scott
  
   Scott Melby
   Founder, Fast Lane Software LLC
   http://www.fastlanesw.com
  
  
  
   nasawebguy wrote:
   
I want to show/hide tabs based on user permissions. Permissions work
fine on combo boxes, etc. But not tabs. What I do on the combos is
simply set myCB.visible = true, if they have permissions to see it.
   
I tried things like setting the tab canvas to true/false. Didn't do
anything.
I tried myTabCanvas.visible = false/true. Didn't do anything.
I tried myTabNav.getChildAt(1).visible=false/true. Didn't do anything.
I tried myTabNav.removeChildAt(2), etc. Didn't do anything.
   
I know the permissions-side works because I use it with other
component. I simple use an if/else to set visible= true/false.
   
I have four tabs. MyTab, MyTeamTab,MySubRegionTab, MyRegionTab. If the
user is team admin, he sees the team tab, etc. If the user is not an
admin at all, they just see one MyTab.
   
In general, I'm looking for what to fill in something like this..
if (adminTeam == true) {
show teamTab
}
else {
don't show teamTab
}
   
Any suggestions?
   
Also, does creationPolicy on the TabNavigator impact how this would
work? If it does, what should it be set to? creationPolicy has bitten
me before.:)
   
Thanks,
Don
   
   
  



  



-- 
Ralf Bokelberg [EMAIL PROTECTED]
Flex  Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35


[flexcoders] textarea continues automatic text scroll

2007-11-08 Thread david_nej
Hi Everyone!

Anyone has idea that how to add continues automatic text scroll feature 
to textarea? Any suggestions? 

Actually I am trying to build a news scroller in flex. so far I am able 
to read xml news file from server but I am struck at automatic 
continues scrolling of text inside of text area.

Any help would be appreciated.

--David



[flexcoders] Re: segments with out of range endpoints on LineSeries

2007-11-08 Thread ctkemper
I solved my problem by subclassing DateTimeAxis and overriding
filterCache() to include the datapoints just beyond the axis min and max.





[flexcoders] AS2 errors and code when debugging in Flex Builder

2007-11-08 Thread ninobronzed
I'm using a SWFLoader to load an AS2 Swf. When it loads I see my AS2
code in the call stack in the flex debugger...and errors are thrown. 

Is this expected?
I'm porting this code, which is just a SWFLoader loading an AS2 swf,
from an AIR App.
I didn't see those errors and AS2 code call stack in the AIR app.

Also, when I ran this as an AIR app, all relative urls in my AS2
swf were loaded relative to the AS2 swf. Now that I'm compiling a Flex
Application, I see security issues when it loads relative urls from
file://

I'm confused about what determines this.

Any help would be appreciated...



  1   2   >