[flexcoders] FlexBuilder on 64bit machine any good?

2008-12-15 Thread Ralf Bokelberg
Hi guys

I'm in the process of choosing a new machine to be placed under my
christmas tree :). I wonder, if anybody has some experiences with 64
bit machines and FlexBuilder? Does it run at all? What is the
performance like? Does it make use of lots of RAM?

Cheers
Ralf.


Re: [flexcoders] Re: Multi-dimensional arrays in a DataGrid

2008-12-15 Thread Simon Bailey

Hi Tim,

In a nut shell I have rows of prices and timeslots like a timetable?   
Each timeslot is represented by a checkbox which is either hidden or  
shown.


Keep on hitting brick walls on this one!

Cheers,

Simon

On 15 Dec 2008, at 02:57, Tim Hoff wrote:


Hi Simon.

Depends on what you want to do with the data. If you're de-normalizing
it, a DataGrid's labelFunction can give you access to child arrays
(better if they are ArrayCollections or XML). If you want to represent
the data in a hierarchical manner, you can use the AdvancedDataGrid;
instead of the OLAPDataGrid.
-TH

--- In flexcoders@yahoogroups.com, Simon Bailey si...@... wrote:

 Hi,

 Str8 forward question here, is a multi-dimensional array gonna  
work in

 a datagrid and if so any suggestions how without using OLAPDataGrid?

 var masterTaskList:Array = new Array();
 masterTaskList[0] = [wash dishes, take out trash];
 masterTaskList[1] = [wash dishes, pay bills];
 masterTaskList[2] = [wash dishes, dentist, wash dog];
 masterTaskList[3] = [wash dishes];
 masterTaskList[4] = [wash dishes, clean house];
 masterTaskList[5] = [wash dishes, wash car, pay rent];
 masterTaskList[6] = [mow lawn, fix chair];

 Cheers,

 Simon








[flexcoders] Re: Loading .fxg with Actionscript - got it :-)

2008-12-15 Thread Mic
displayGroup = new Group();
var source2 : comp.FlowerPower2 = new comp.FlowerPower2();
displayGroup.addItem(source2);
addItem(displayGroup);

--- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote:

 comp:FlowerPower2 id=image1 / from comp/FlowerPower2.fxg is the
 MXML way of doing things  how is it done in Actionscript?
 
 private var group:Group;
 group = new Group();
 group.addItem(FlowerPower2.fxg must plug in here);
 addChild(group);
 
 TIA,
 
 Mic.





Re: [flexcoders] Re: Loading .fxg with Actionscript - got it :-)

2008-12-15 Thread Nate Beck
Awesome!!  I've been trying to figure that out.

On Mon, Dec 15, 2008 at 12:30 AM, Mic chigwel...@yahoo.com wrote:

   displayGroup = new Group();
 var source2 : comp.FlowerPower2 = new comp.FlowerPower2();
 displayGroup.addItem(source2);
 addItem(displayGroup);

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Mic
 chigwel...@... wrote:
 
  comp:FlowerPower2 id=image1 / from comp/FlowerPower2.fxg is the
  MXML way of doing things  how is it done in Actionscript?
 
  private var group:Group;
  group = new Group();
  group.addItem(FlowerPower2.fxg must plug in here);
  addChild(group);
 
  TIA,
 
  Mic.
 

  



[flexcoders] Re: BadPaddingException using RTMPS

2008-12-15 Thread taze170171
Hello Jeff!

Thank you for your answer. We are using LCDS 2.6.1. and Flex SDK 3.2.

Best regards,
Taze

--- In flexcoders@yahoogroups.com, Jeff Vroom jvr...@... wrote:

 Are you running the released version of 2.6?   There was a bug in 
RTMPS in that version which is fixed in a hotfix or in 2.6.1 that 
might cause this type of error intermittently.
 
 Jeff
 
 From: flexcoders@yahoogroups.com 
[mailto:flexcod...@yahoogroups.com] On Behalf Of taze170171
 Sent: Friday, December 12, 2008 5:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] BadPaddingException using RTMPS
 
 
 Hello!
 
 We are using AIR, LCDS (running on a JBoss) and an RTMPS connection.
 Sometimes we get the following exception, when the AIR client tries
 to connect to the server:
 
 [Flex]Thread[my-rtmps-SocketServer-WorkerThread-88,5,jboss] failed 
to
 read Connection 'xxx' or process the data; Connection is in
 the 'Handshaking' state and will be forced closed.
 javax.net.ssl.SSLHandshakeException: Invalid padding
 at com.sun.net.ssl.internal.ssl.Alerts.getSSLException
 (Alerts.java:150)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal
 (SSLEngineImpl.java:1417)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord
 (SSLEngineImpl.java:874)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord
 (SSLEngineImpl.java:787)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap
 (SSLEngineImpl.java:663)
 at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:566)
 at flex.messaging.socketserver.SSLConnection.handshake
 (SSLConnection.java:301)
 at flex.messaging.socketserver.Connection$ConnectionReader.run
 (Connection.java:761)
 at
 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Work
 er.runTask(ThreadPoolExecutor.java:665)
 at
 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Work
 er.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:595)
 
 Caused by: javax.crypto.BadPaddingException: Padding length invalid:
 244
 at com.sun.net.ssl.internal.ssl.CipherBox.removePadding
 (CipherBox.java:442)
 at com.sun.net.ssl.internal.ssl.CipherBox.decrypt
(CipherBox.java:290)
 at com.sun.net.ssl.internal.ssl.InputRecord.decrypt
 (InputRecord.java:153)
 at com.sun.net.ssl.internal.ssl.EngineInputRecord.decrypt
 (EngineInputRecord.java:238)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord
 (SSLEngineImpl.java:856)
 ... 8 more
 
 Can anybody help?
 
 Thanks in advance,
 Taze





[flexcoders] Re: flex login popup help needed pleaseeeeeeeee

2008-12-15 Thread stinasius
please guys am stuck. can someone please give an example of a cfc with
hard coded username and password and show how to hook it up to my
login form and authenticate the user so that if there is login success
the viewstack child changes to admin. pleaseee i have read
through all the tutorials concerning flex/cf authentication and they
are not clear. help me guys.



[flexcoders] Cocomo

2008-12-15 Thread Rich Tretola
InsideRIA is looking for contributors to write or screen cast about their
experiences with Cocomo. If you are interested, please contact me at
rtret...@oreilly.com.

Thanks,
Rich Tretola
http://www.insideria.com
http://blog.everythingflex.com


[flexcoders] Disable Flash Player Settings Panel

2008-12-15 Thread vinayakvijay_v
Hello.
am vinu.

Need Help,
I am developing a Audio recorder Widget using FMS and Flex . The size
of  the widget should be small.
But the problem is that when i access the mic. the flash player
settings window does not appear because of the small size of my Widget
. Any workaround to get mic without displaying the settings. The
Widget need min 250X150 size to display the settings ,but i need to
build it 200X100.

please help me if u can.

thanks in advance,
vinu.



Re: [flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Johannes Nel
when creating an install you can include files which get dumped in the
application directory. then on first time startup you use the file api to
copy it over. no you should not write info in the application directory as
permissions can be an issue, but copying from there is pretty simple.
I have an ant script which manages the packaging of air apps on my CI box,
will go and dig it out in a bit.

On Mon, Dec 15, 2008 at 3:36 PM, Jim Boone j...@jim-boone.com wrote:

   I read what you say, but I don't know how to do that. How do I include
 it as part of the install? How do I copy it over? Does the AIR install
 include some sort of scripting?

 Also, on doing more research, I have found that it is not wise to
 include files that I am talking about in app-storage and that perhaps
 the user directory is more appropriate.

 http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Johannes Nel johannes@...
 wrote:

 
  include it in the application directory as part of the instal and
 copy it
  over if it does not exist.
 
  On Mon, Dec 15, 2008 at 5:22 AM, Jim Boone j...@... wrote:
 
   Hi,
  
   I am new to AIR and I am writing an application that needs access to a
   new SQLite database when the user first launches the application. I
   have considered two options. I could create an empty SQlite database
   and include it in the app-storage directory when the application
   installed or I could include an SQL schema file in app-storage and
   create the database when the user launches the app. Either way, I want
   to be able to include an file the the application directory at install
   time. I have researched how to do this with no luck. Does anyone know
   how I can accomplish this? Thanks!
  
   Jim
  
  
  
 
 
 
  --
  j:pn
  \\no comment
 

  




-- 
j:pn
\\no comment


Re: [flexcoders] Adobe air group?

2008-12-15 Thread Tom Chiverton
On Sunday 14 Dec 2008, Jim Hayes wrote:
 apollocod...@yahoogroups.com mailto:apollocoders%40yahoogroups.com
 It's fairly quiet though.

Most recent posts for at least one reply, however.
I think it's just good signal-to-noise :-)

-- 
Tom Chiverton
Helping to assertively differentiate customized high-end ubiquitous compelling 
methodologies





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
“partner” to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



Re: [flexcoders] Adobe AIR Installer has encountered a problem

2008-12-15 Thread Tom Chiverton
On Friday 12 Dec 2008, michael_corbridge wrote:
 Adobe AIR Installer has encountered a problem and needs to close.  We
 are sorry for the inconvenience.

If you get that running an app, could you be missing an update to the AIR 
runtime ? It's meant to auto update, but maybe you need to give it a bit of a 
poke ?

-- 
Tom Chiverton
Helping to ambassadorially introduce integrated customized attention-grabbing 
eyeballs





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
“partner” to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



[flexcoders] Keyboard shortcuts and SuperTabNav

2008-12-15 Thread linko27
Hi!

I am trying to use keyboard shortcuts within a Tab in my SuperTabNav.
The Problem is that I did not get the focus when I click into my
Tab-Component. The Tab is a VBox and implements the
mx.managers.IFocusManagerComponent.
 
Code looks something like this:

mx:VBox 
xmlns:mx=http://www.adobe.com/2006/mxml; 
width=100% height=100%
focusEnabled=true
implements=mx.managers.IFocusManagerComponent
keyUp=handleKeyboardEvent(event)
...

Thanks!
Ron

  



RE: [flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Jim Hayes
If you're using flexbuilder to package, then probably the easiest way is
to check copy non embedded files to output folder in project |
properties | flex compiler,
But I find this to be a bit messy at times.
If not, then you can kind of cheat. When you publish your .air file, it
will offer you the choice of files to include in the archive.
If you click back at this point then you have the opportunity (outside
of flexbuilder) to copy any files you need to the bin-release folder
that gets temporarily created as part of the publishing operation. Back
in flexbuilder, click next again and you'll be back in the stage where
you can specify files to include, but now you'll have the opportunity to
select the files you just copied to bin-release.
 
This, however, gets old pretty quickly! 
 
I now have an ant build script that packages everything up for me,
without having to think / remember to copy certain files.
 
I'm not sure if my script is generic enough or even clear enough to be
much help to anyone though, to be honest I found it quite hard work to
get it all working from a nil level of ant knowledge/experience.
If there's anything specific you need to ask on that, however, then I'll
do my best (Though I'm sure many people on the list are better qualified
than myself in that respect).
 
In regard of copying it over, you'll need to check if the file is there
when the app starts, and copy it if not. There's not any scripting in
the Air installer itself.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jim Boone
Sent: 15 December 2008 13:36
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I include a file in the AIR app-storage
directory at install time?
 
I read what you say, but I don't know how to do that. How do I include
it as part of the install? How do I copy it over? Does the AIR install
include some sort of scripting?

Also, on doing more research, I have found that it is not wise to
include files that I am talking about in app-storage and that perhaps
the user directory is more appropriate.

http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html
http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html 

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Johannes Nel johannes@...
wrote:

 include it in the application directory as part of the instal and
copy it
 over if it does not exist.
 
 On Mon, Dec 15, 2008 at 5:22 AM, Jim Boone j...@... wrote:
 
  Hi,
 
  I am new to AIR and I am writing an application that needs access to
a
  new SQLite database when the user first launches the application. I
  have considered two options. I could create an empty SQlite database
  and include it in the app-storage directory when the application
  installed or I could include an SQL schema file in app-storage and
  create the database when the user launches the app. Either way, I
want
  to be able to include an file the the application directory at
install
  time. I have researched how to do this with no luck. Does anyone
know
  how I can accomplish this? Thanks!
 
  Jim
 
  
 
 
 
 
 -- 
 j:pn
 \\no comment

 

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

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

[flexcoders] Re: DataGrid column wise display

2008-12-15 Thread Amy
--- In flexcoders@yahoogroups.com, ssudhaiyer ssudhai...@... wrote:

 Hi,
 
 I'm trying to display a table that has the column header and the first
 column as static data. Since I receive the data column wise, and there
 is no sensible way to reformat the data row wise, is there anyway I
 can use the datagrid to render column wise? 
 
 This does not feel like a uncommon requirement. Is there someone who
 has tried something like this before? Please advise.

You might be able to get it to work with an OLAP datagrid.



Re: [flexcoders] Disable Flash Player Settings Panel

2008-12-15 Thread Nate Beck
That's a tough problem that I've had to deal with before.  Here is what I
figured out.

   - You widget MUST be 216 x 140 (some people will argue you can do 215
   wide, but in my testing sometimes that causes issues)
   - The main issue that you will run into is... When the player window is
   too small, the settings panel will either 1) not show up at all OR 2) Show
   up clipped and in some browsers which will not register mouse events to the
   player
   - You cannot disable the settings panel.

Here are a couple of workarounds that I figured out:

   - The widget needs to be 216 x 140 ONLY when you're asking for permission
   to the microphone.  If you have control of Javascript on the page, you can
   change the size of the flash object on the page temporarily while you show
   the settings panel.
   - You can use Security.showSettings(SecurityPanel.PRIVACY); to control
   when you want the settings panel to show up.
   - Using the Security.showSettings method is helpful because there is a
   Remember button on that panel.  If the user chooses Remember, then you
   never have to show the Settings panel again.
   - The Microphone status events get dispatched when a user changes a
   Microphone setting within the settings panel.
   ( _mic.addEventListener(StatusEvent.STATUS, onMicStatus); )
   - On your Microphone class, the muted property will tell you if you
   have access to the microphone or not.

Hope this helps,
Nate

On Mon, Dec 15, 2008 at 1:50 AM, vinayakvijay_v vinayakvija...@yahoo.comwrote:

   Hello.
 am vinu.

 Need Help,
 I am developing a Audio recorder Widget using FMS and Flex . The size
 of the widget should be small.
 But the problem is that when i access the mic. the flash player
 settings window does not appear because of the small size of my Widget
 . Any workaround to get mic without displaying the settings. The
 Widget need min 250X150 size to display the settings ,but i need to
 build it 200X100.

 please help me if u can.

 thanks in advance,
 vinu.

  



[flexcoders] Re: Loading network SWFs from SWF hosted on filesystem (SWF is not a loadable module

2008-12-15 Thread hughesmatt78
My sandbox type is local-trusted.  According to the Flash Security
white paper, local-trusted has *at least* the priviledges of
local-with-networking.

localWithNetwork: This SWF file is a local file and has not been
trusted by the user, but it was 
published with a networking designation. This SWF may communicate with
the Internet but may not 
read from local data sources. 
 localTrusted: This SWF file is a local file and has been trusted by
the user, using either the 
Settings Manager or a FlashPlayerTrust configuration file. This SWF
file may both read from local 
data sources and communicate with the Internet. 


I did change it to local-with-networking, but I get the same error:


Finished loading crossdomain.
?xml version=1.0?
cross-domain-policy
allow-access-from domain=* /
/cross-domain-policy


[SWF] /SimpleModuleProject.swf - 574,981 bytes after decompression
*** Security Sandbox Violation ***
SecurityDomain
'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swf'
tried to access incompatible context 'http://localhost/crossdomain.xml'
*** Security Sandbox Violation ***
SecurityDomain
'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swf'
tried to access incompatible context 'http://localhost/crossdomain.xml'
Failed to load module
SWF is not a loadable module




Any ideas?




--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Check your sandboxType.  I'll bet it is local-trusted and not
local-with-networking.
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of hughesmatt78
 Sent: Saturday, December 13, 2008 11:33 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Loading network SWFs from SWF hosted on
filesystem (SWF is not a loadable module
 
 
 I'm trying so far in vain to load a module from a network domain from
 a SWF that was loaded via the filesystem. Every time I try and load
 the module, I get the following error:
 
 SWF is not a loadable module.
 
 I have seen this same problem discussed elsewhere on FlexCoders and
 other blogs but I am getting very conflicting views. Some people say
 this kind of module loading is not supported
 (http://www.nabble.com/Problems-using-Flex-modules-td15188446.html)
 but the Adobe Flash Player 9 Security white paper clearly indicate it
 is possible:
 
 A SWF file may also call Security.allowDomain() with the wildcard
 parameter * to allow any domain.
 This is necessary to allow a local-with-networking SWF file to
 cross-script a network SWF file.
 
 Anyway, off to the example project I created. Here are two very basic
 mxmls.
 
 TestApplication.mxml -- (loaded via file system, this attempts to load
 a simple module hosted at localhost)
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical initialize=init()
 mx:Script
 ![CDATA[
 import mx.events.ModuleEvent;
 private function init() : void
 {
 Security.allowDomain(localhost);
 
 Security.loadPolicyFile(http://localhost/crossdomain.xml;);
 
 var loader:URLLoader = new URLLoader();
 loader.addEventListener(Event.COMPLETE, function(event
 : Event) {
 trace(Finished loading crossdomain.);
 trace(loader.data);
 });
 loader.load(new
 URLRequest(http://localhost/crossdomain.xml;));
 }
 
 private function erroredOut(event : ModuleEvent) : void
 {
 trace(event.errorText);
 }
 
 private function loadIt() : void
 {
 loaderOfModules.url = http://localhost/SimpleModule.swf;;
 }
 ]]
 /mx:Script
 
 mx:Button click=loadIt() label=Load module from localhost /
 
 !-- Sandbox type reads local-trusted --
 mx:Text text={Security.sandboxType} /
 mx:ModuleLoader id=loaderOfModules width=100% height=500
 error=erroredOut(event)
 applicationDomain={ApplicationDomain.currentDomain}/
 /mx:Application
 
 SimpleModule.mxml (the module hosted at localhost)
 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml;
 initialize=Security.allowDomain('*') 
 mx:Text text=Hi there /
 /mx:Module
 
 And the crossdomain.xml file hosted at localhost. (Although according
 to some Adobe docs, this file is not even needed to do crossscripting,
 only for loading data.)
 ?xml version=1.0?
 cross-domain-policy
 allow-access-from domain=* /
 /cross-domain-policy
 
 Note that I can get this example to work fine if I host the
 Application SWF from one network domain and load the module from
 another network domain without changing a thing. I only get the error
 when the loading SWF is hosted on the filesystem. Also note that the
 Application.swf is in a folder designated as locally trusted and I
 confirm this by looking at the Security.sandboxType variable at runtime.
 
 I am using Flex 3 and running this with Flash Player 9 debugger version.
 
 So my questions are:
 
 * Is this scenario even supported? If not, what's with the
 documentation I quoted from Adobe above? If yes, what am I missing?
 * And do crossdomain.xml files even used 

[flexcoders] Command Proxy

2008-12-15 Thread flexaustin
I asked this in an earlier post, but hoping Alex can ask Mike Chambers
about the status of the Apollo + Command Proxy project he started. 
Does anyone know if Command Proxy access is available in Adobe AIR? 

When Mike created his project he said that he had hopes for command
proxy access, when AIR 1.5 came out.  Do we have this access yet?





[flexcoders] adding an event listener (in MX:Button) to pass a parameter and an Event Object

2008-12-15 Thread tom s
I have a button defined in Flex that passes a parameter to a function when
clicked
MX:Button id=someButton click=fooFunction(barParameter)/

But I want to know the id of the button that triggered the event whilst
executing fooFunction.
I know that if I register an event listener in AS then I can:

someButton.addEventListener(MouseEvent.CLICK, fooFunction)

(As I will be able to get at it via the target of the Event)

But how do I setup the event listening (in AS or MXML) so that I can both
pass a parameter AND know the target?

thanks

tom


Re: [flexcoders] adding an event listener (in MX:Button) to pass a parameter and an Event Object

2008-12-15 Thread Jake Churchill
pass event to your function as well.  It is of type MouseEvent and is 
already available to the click parameter, just needs to be passed in 
like this:


MX:Button id=someButton click=fooFunction(event,barParameter)/

tom s wrote:


I have a button defined in Flex that passes a parameter to a function 
when clicked



MX:Button id=someButton click=fooFunction(barParameter)/

But I want to know the id of the button that triggered the event 
whilst executing fooFunction. 
I know that if I register an event listener in AS then I can:


someButton.addEventListener(MouseEvent.CLICK, fooFunction)

(As I will be able to get at it via the target of the Event) 

But how do I setup the event listening (in AS or MXML) so that I can 
both pass a parameter AND know the target?


thanks

tom


 


[flexcoders] Creating an URL to a subsection of UI

2008-12-15 Thread ozziegt
I have a pretty complicated UI with 2-3 layers of tab-like navigation.
So imagine if you will, a top level menu of 3-4 items, and then under
each of those another submenu of a few items. I want to be able to
create an URL to point to one of those subitems. Is there any way to
do this in flex?

Currently what I am planning on doing is taking an url parameter which
specifies the destination and then using that to manipulate the UI and
show the page I need to show. But I wanted to make sure there wasn't a
built-in or better way to do it.

Thanks



Re: [flexcoders] Creating an URL to a subsection of UI

2008-12-15 Thread Nate Beck
Check out:
http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Deep_Linking
Cheers,
Nate

On Mon, Dec 15, 2008 at 7:53 AM, ozziegt osman.ul...@gmail.com wrote:

   I have a pretty complicated UI with 2-3 layers of tab-like navigation.
 So imagine if you will, a top level menu of 3-4 items, and then under
 each of those another submenu of a few items. I want to be able to
 create an URL to point to one of those subitems. Is there any way to
 do this in flex?

 Currently what I am planning on doing is taking an url parameter which
 specifies the destination and then using that to manipulate the UI and
 show the page I need to show. But I wanted to make sure there wasn't a
 built-in or better way to do it.

 Thanks

  



[flexcoders] Re: Multi-dimensional arrays in a DataGrid

2008-12-15 Thread Tim Hoff

Ok, so do you want to show only one row for each price; with the
time-slots all shown in a certain column (labelFunction or custom
itemRenderer).  Or, do you want to show a new row for each time-slot as
well (AdvancedDataGrid)?

-TH

--- In flexcoders@yahoogroups.com, Simon Bailey si...@... wrote:

 Hi Tim,

 In a nut shell I have rows of prices and timeslots like a timetable?
 Each timeslot is represented by a checkbox which is either hidden or
 shown.

 Keep on hitting brick walls on this one!

 Cheers,

 Simon

 On 15 Dec 2008, at 02:57, Tim Hoff wrote:

  Hi Simon.
 
  Depends on what you want to do with the data. If you're
de-normalizing
  it, a DataGrid's labelFunction can give you access to child arrays
  (better if they are ArrayCollections or XML). If you want to
represent
  the data in a hierarchical manner, you can use the AdvancedDataGrid;
  instead of the OLAPDataGrid.
  -TH
 
  --- In flexcoders@yahoogroups.com, Simon Bailey simon@ wrote:
  
   Hi,
  
   Str8 forward question here, is a multi-dimensional array gonna
  work in
   a datagrid and if so any suggestions how without using
OLAPDataGrid?
  
   var masterTaskList:Array = new Array();
   masterTaskList[0] = [wash dishes, take out trash];
   masterTaskList[1] = [wash dishes, pay bills];
   masterTaskList[2] = [wash dishes, dentist, wash dog];
   masterTaskList[3] = [wash dishes];
   masterTaskList[4] = [wash dishes, clean house];
   masterTaskList[5] = [wash dishes, wash car, pay rent];
   masterTaskList[6] = [mow lawn, fix chair];
  
   Cheers,
  
   Simon
  
 
 
 






RE: [flexcoders] FlexBuilder on 64bit machine any good?

2008-12-15 Thread Ashish
Yes. More RAM is necessary for Flex. At least 2 GB.

 

Best,

Ashish

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Darrin Kay
Sent: Monday, December 15, 2008 4:23 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] FlexBuilder on 64bit machine any good?

 

I have a 64 bit laptop, and Flex builder runs as a 32bit app.  It still runs
like a rock star but it does not take full advantage of the 64bit.

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ralf Bokelberg
Sent: Monday, December 15, 2008 3:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FlexBuilder on 64bit machine any good?

 

Hi guys

I'm in the process of choosing a new machine to be placed under my
christmas tree :). I wonder, if anybody has some experiences with 64
bit machines and FlexBuilder? Does it run at all? What is the
performance like? Does it make use of lots of RAM?

Cheers
Ralf.

 

image001.jpgimage002.jpg

[flexcoders] Re:FlexBuilder on 64bit machine any good?

2008-12-15 Thread Deniz Davutoglu
Hi, 
I use flex builder in 64 bit Linux. it improve performance by twice 
Strongly I suggest it. It crashes less than 32 bit and works faster.

Deniz



Re: [flexcoders] Re:FlexBuilder on 64bit machine any good?

2008-12-15 Thread Nate Beck
Ooooh Deniz, that sounds tempting.

On Mon, Dec 15, 2008 at 8:35 AM, Deniz Davutoglu d...@7ist.com wrote:

   Hi,
 I use flex builder in 64 bit Linux. it improve performance by twice
 Strongly I suggest it. It crashes less than 32 bit and works faster.

 Deniz

  



[flexcoders] Re: flex login popup help needed pleaseeeeeeeee

2008-12-15 Thread valdhor
I find it hard to believe you have read through all the tutorials
concerning flex/cf authentication and they are not clear.

I do not know ColdFusion. I have never used ColdFusion. I use PHP.
Nevertheless, I downloaded and installed the Developer version of
ColdFusion 8.0.1.

I did a google search for Flex ColdFusion Tutorial and on the first
page found these links:

http://www.adobe.com/devnet/coldfusion/articles/adobetv_cfpwrdflex.html
http://flexcf.com/home
http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectI\
D=618
http://coldfusion.sys-con.com/node/256076

I watched the video by Ben Forta at the first link (I did not even look
at the other three links).

This video walks you through setting up a CRUD application with
Flex/ColdFusion. It can automatically add a login screen which I did.
Once everything is set up, you can run this app and it will popup a
login window. You can input anything you want in this window and it will
log you in (By changing states).

Now, it was a matter of a few minutes perusing other files to figure out
a little bit about the language and I then changed the login function in
the Auth.cfc file (Located in the components/cfgenerated/managers
directory).

The original code was:

cffunction name=login access=remote returntype=boolean
  cfreturn true
/cffunction

And I modified it to:
cffunction name=login access=remote returntype=boolean
 cfargument name=useremail required=true /
 cfargument name=password required=true /
 cfif (arguments.useremail EQ a...@b.com) AND (arguments.password EQ
xyz)
 cfreturn true
 cfelse
 cfreturn false
 /cfif
/cffunction

There you have your hard coded username and password.

It seems to me that if I can figure this out without having touched
ColdFusion before then someone who uses ColdFusion could have done it in
about two minutes.

I don't like to be snarky but maybe programming is not your Forte?


HTH



Steve


--- In flexcoders@yahoogroups.com, stinasius stinas...@... wrote:

 please guys am stuck. can someone please give an example of a cfc with
 hard coded username and password and show how to hook it up to my
 login form and authenticate the user so that if there is login success
 the viewstack child changes to admin. pleaseee i have read
 through all the tutorials concerning flex/cf authentication and they
 are not clear. help me guys.




[flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Jim Boone
I read what you say, but I don't know how to do that. How do I include
it as part of the install? How do I copy it over? Does the AIR install
include some sort of scripting?

Also, on doing more research, I have found that it is not wise to
include files that I am talking about in app-storage and that perhaps
the user directory is more appropriate.

http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html


--- In flexcoders@yahoogroups.com, Johannes Nel johannes@...
wrote:

 include it in the application directory as part of the instal and
copy it
 over if it does not exist.
 
 On Mon, Dec 15, 2008 at 5:22 AM, Jim Boone j...@... wrote:
 
Hi,
 
  I am new to AIR and I am writing an application that needs access to a
  new SQLite database when the user first launches the application. I
  have considered two options. I could create an empty SQlite database
  and include it in the app-storage directory when the application
  installed or I could include an SQL schema file in app-storage and
  create the database when the user launches the app. Either way, I want
  to be able to include an file the the application directory at install
  time. I have researched how to do this with no luck. Does anyone know
  how I can accomplish this? Thanks!
 
  Jim
 
   
 
 
 
 
 -- 
 j:pn
 \\no comment





[flexcoders] Test-driven development in Flex

2008-12-15 Thread Errol Thompson
I am fairly new to Flex but have a reasonable amount of experience with
test-driven development in Java and .NET.
 
I have been told that test-driving Flex development is not possible. I am
not convinced as I have been told similar things on other projects in the
past and then proven that they are possible.
 
I am wondering:
 
1) How many people actually use a testing framework (FlexUnit, Fluint,
FUnit, AsUnit) when doing Flex development?
 
2) Does using a testing framework change the way that you structure your
Flex applications?
 
3) How many use test-driven development with the Cairngorm framework?
 
-
Errol Thompson
Kiwi-ET Computing Education Research
Wellington, New Zealand
Phone: +64 21 210 1662
E-Mail: kiwiet (at) acm.org
kiwiet (at) computer.org
Web: www.thompsonz.net
-




RES: [flexcoders] Custom event--please help me

2008-12-15 Thread Luciano Manerich Junior
Because the events are dispatched in the MainApp. Your BasePanel dont
receive the event.


Application

  +  MainApp

 + BasePanel


The event is dispatched on the MainApp layer, so, even using bubbles you
wont get the event, cause the bubbles goes up.

You could try to add the listener on the Application layer, and use
bubbles, or, use the observer pattern, create a singleton class to
dispatch the event, and add the listener on it.
 

-Mensagem original-
De: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] Em
nome de lorenzo.boaro
Enviada em: segunda-feira, 15 de dezembro de 2008 10:09
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Custom event--please help me

Hi

i've a problem..anibody can help me?

i created this class:

public class CompleteEvent extends Event
{
private var array:ArrayCollection

public function CompleteEvent(type:String,
array:ArrayCollection)
{
super(type);
this.array = array;
}

public override function clone():Event {
return new CompleteEvent(type, array);
}
}

the main class create the array through a socket connection within the
socket listeners for Socket.DATA...in the method listeners dispatch the
event...

[Event(name=newEvent, type=CompleteEvent)]

public class MainApp{

socket.addEventListeners(ProgressEvent.SOCKET_DATA, socketData); ...
private function socketData(event:Event):void {

...some code to create array from server data...
//dispatch event
var dipsatcher:EventDispatcher = new EventDispatcher();
var ev:CompleteEvent = new CompleteEvent(newEvent, array);

dispatcher.dispatchEvent(ev);
  }
}

and this other class listens for the event

public class BasePanel extends Panel
{

private function dataEventHandler():void {
trace(Array retrieved);
}

public function BasePanel()
{
super();
this.addEventListener(newEvent,
dataEventHandler);
}
}

but not working the BasePanel class doesn't listen for the event..

thanks a lot 

Regards
Lorenzo




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





RE: [flexcoders] Re: Disable Runtime Binding Warnings

2008-12-15 Thread Tracy Spratt
Hmm, that normally works to stop those warnings.  Maybe Flex is not
recognizing @title as XML.

 

One solution would be to pass the entire node into your custom component
and pull out the attribute in there.  This has other advantages, such as
making the entire item available in a event handler without recourse to
getRepeterItem().

spr:SubsectionText xmlArea={XML(ar1.currentItem)} /

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of stoff0
Sent: Monday, December 15, 2008 5:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Disable Runtime Binding Warnings

 

ar1 is a repeater. sorry, should have been more thorough with my
example:

[Bindable] private var _areas:XMLList;

mx:Repeater id=ar1 dataProvider={_areas}
spr:SubsectionText text={XML(ar1.currentItem)@title} /
/mx:Repeater

nope, i don't care if any changes ever get picked up in this case.
although, the crazy thing is changes do get picked up (i've tried this
before). 

i am positive the warning is coming from this line (and many other
lines like it).

i also want to mention that i have definitely thought of putting this
an arraylist and/or making custom data model out of the xml, but it
seems kind of ridiculous when all of the data is right there. yeah,
i'll get introspection, but i'll also end up with a ton more code and
a bigger hassle to maintain.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui aha...@... wrote:

 What is ar1? What is currentItem? Are you sure that line is the
one kicking the warning? Do you care that if @title does change that
your code may not pick it up?
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
]
On Behalf Of stoff0
 Sent: Sunday, December 14, 2008 9:22 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Disable Runtime Binding Warnings
 
 
 this doesn't seem to take away the warnings. for instance, the warning
 i'm getting is this:
 
 warning: unable to bind to property 'title' on class 'XML' (class is
 not an IEventDispatcher)
 
 doing this:
 
 spr:SubsectionText text={XML(ar1.currentItem)@title} width=100%
/
 
 makes no difference as compared to this:
 
 spr:SubsectionText text={ar1.currentit...@title} width=100% /
 
 (spr is a custom component i made)
 
 either way, there should be away to just disable these warnings. the
 code is performing fine otherwise.
 
 anyone have any ideas?
 
 --- In
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com,
Tracy Spratt tspratt@ wrote:
 
  Those warnings are correctable.
 
 
 
  Wrap the node expression, which is probably currentItem or data, or
  selectedItem which are objects, in the XML() function.
 
 
 
  text={XML(myDG.selectedItem).myNode.text()}
 
 
 
  Tracy
 
 
 
  
 
  From:
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com]
On
  Behalf Of stoff0
  Sent: Tuesday, December 09, 2008 7:58 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Disable Runtime Binding Warnings
 
 
 
  Is there anyway to stop binding warnings (or all warnings from being
  logged to the console)? I've tried to turn off warnings with
compiler
  arguments like:
 
  -compiler.show-binding-warnings=false
  -warnings=false
 
  I also tried unchecking enable warnings checkbox in flex builder.
 
  It looks like none of these have an effect on runtime warnings
  (warnings that get logged to the console)
 
  For some background the reason I'm attempting this is because I'm
  getting about 200 warnings on some xml binding and it's really
slowing
  things down for me and probably everyone with the debug player.
 
  Thanks!
 


 



[flexcoders] Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread ozziegt
I feel kind of stupid asking this, but I have been beating my head
against the wall and I know I am missing something obvious.

I created a sample app here (you can view source on it):
http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar

You will notice there are no URL parameters being reported by the
application. The code is pretty basic, so I don't know what I am
missing. This is a brand new sample app...I created it, added a few
lines of code, and that is it. Any ideas? 

Thanks

private function showParams():void
{
var params:Object = Application.application.parameters;
var s:String = Params: \n;
params.runtime = added in code;
for (var key:String in params)
{
s += key +: + params[key] + \n;
}
txt.text = s;
}



Re: [flexcoders] Re: Multi-dimensional arrays in a DataGrid

2008-12-15 Thread Simon Bailey

Hey Tim,

Think I have cracked it (thanks to your earlier reply), so in response  
to your questions it's the prior option and I opted for using a  
labelFunction.  I had constructed my ArrayCollection of time slots to  
accommodate a second ArrayCollection, so its within the labelFunction  
that I now loop through this second AC and set the hidden or show  
value on the label.  Then within the renderer I pick u on this label  
and use that to determine visibility.


Cheers Tim,

Simon

On 15 Dec 2008, at 15:59, Tim Hoff wrote:



Ok, so do you want to show only one row for each price; with the
time-slots all shown in a certain column (labelFunction or custom
itemRenderer). Or, do you want to show a new row for each time-slot as
well (AdvancedDataGrid)?

-TH

--- In flexcoders@yahoogroups.com, Simon Bailey si...@... wrote:

 Hi Tim,

 In a nut shell I have rows of prices and timeslots like a timetable?
 Each timeslot is represented by a checkbox which is either hidden or
 shown.

 Keep on hitting brick walls on this one!

 Cheers,

 Simon

 On 15 Dec 2008, at 02:57, Tim Hoff wrote:

  Hi Simon.
 
  Depends on what you want to do with the data. If you're
de-normalizing
  it, a DataGrid's labelFunction can give you access to child arrays
  (better if they are ArrayCollections or XML). If you want to
represent
  the data in a hierarchical manner, you can use the  
AdvancedDataGrid;

  instead of the OLAPDataGrid.
  -TH
 
  --- In flexcoders@yahoogroups.com, Simon Bailey simon@ wrote:
  
   Hi,
  
   Str8 forward question here, is a multi-dimensional array gonna
  work in
   a datagrid and if so any suggestions how without using
OLAPDataGrid?
  
   var masterTaskList:Array = new Array();
   masterTaskList[0] = [wash dishes, take out trash];
   masterTaskList[1] = [wash dishes, pay bills];
   masterTaskList[2] = [wash dishes, dentist, wash dog];
   masterTaskList[3] = [wash dishes];
   masterTaskList[4] = [wash dishes, clean house];
   masterTaskList[5] = [wash dishes, wash car, pay rent];
   masterTaskList[6] = [mow lawn, fix chair];
  
   Cheers,
  
   Simon
  
 
 
 








RE: [flexcoders] FlexBuilder on 64bit machine any good?

2008-12-15 Thread Mike Anderson
I've had pretty good luck with it so far -

I have it running on 3 different laptops and 1 desktop PC - ALL are
64-bit Operating Systems.  I should say that 2 machines are running
Vista x64 and 2 are running XP x64 Edition.

One weird part when running on Vista (if you are using ColdFusion) is
configuring IIS - it's fairly involved and can be frustrating.  Lots of
articles on the net though regarding how to set it up.  One cool thing
too, is Adobe has a 64-bit version of ColdFusion - so it takes advantage
of all the RAM.  My laptops are all limited to 4 gigs of RAM, but my
desktop has 8 gigs.  I am still using my previous FlexBuilder.ini file,
which of course specifies all the RAM preferences.

As far as I know (at least in my case) FlexBuilder and/or Eclipse is
still only 32-bit, so they are still bound to the 32-bit limitations.

Overall - I had good luck with it.

Mike

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ralf Bokelberg
Sent: Monday, December 15, 2008 2:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FlexBuilder on 64bit machine any good?

Hi guys

I'm in the process of choosing a new machine to be placed under my
christmas tree :). I wonder, if anybody has some experiences with 64 bit
machines and FlexBuilder? Does it run at all? What is the performance
like? Does it make use of lots of RAM?

Cheers
Ralf.



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





Re: [flexcoders] Re: flex login popup help needed pleaseeeeeeeee

2008-12-15 Thread Tom Chiverton
On Monday 15 Dec 2008, stinasius wrote:
 please guys am stuck. can someone please give an example of a cfc

Tracy already explained how to do it, and you didn't follow that advice.
Why would anyone else offer further help ?

-- 
Tom Chiverton
Helping to appropriately utilize eyeballs





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
“partner” to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



[flexcoders] mxml compiler on linux

2008-12-15 Thread Deniz Davutoglu
Hi Everyone,
I try to build some app which use mxml compiler. in windows everything
is ok when I compile .as file with mxmlc it creates swf file,  but in
Linux  when I try to compile same .as file wit mxmlc it cast me error
command not found. I checked all permissions and ownership are ok.
Does any one have experience to use sdk in linux?

thanks
Deniz




Re: [flexcoders] Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread Nate Beck
I don't believe Flash natively reads URL parameters from the browsers query
string.
However, here are a few ways you can do it:

   - Write a javascript (or serverside) method that takes the browsers query
   string and the passes them in as flashvars.
   - You CAN add a query string directly to the embed code, (ex
   UrlParams.swf?foo=bar), Those will be treated as flashvars as well.
   - If you have javascript access on the page, add an ExternalInterface
   call which will return the query string to your swf.

Hope that helps,
Nate

On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@gmail.com wrote:

   I feel kind of stupid asking this, but I have been beating my head
 against the wall and I know I am missing something obvious.

 I created a sample app here (you can view source on it):
 http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar

 You will notice there are no URL parameters being reported by the
 application. The code is pretty basic, so I don't know what I am
 missing. This is a brand new sample app...I created it, added a few
 lines of code, and that is it. Any ideas?

 Thanks

 private function showParams():void
 {
 var params:Object = Application.application.parameters;
 var s:String = Params: \n;
 params.runtime = added in code;
 for (var key:String in params)
 {
 s += key +: + params[key] + \n;
 }
 txt.text = s;
 }

  



RE: [flexcoders] FlexBuilder on 64bit machine any good?

2008-12-15 Thread Darrin Kay
I have a 64 bit laptop, and Flex builder runs as a 32bit app.  It still runs
like a rock star but it does not take full advantage of the 64bit.

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ralf Bokelberg
Sent: Monday, December 15, 2008 3:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FlexBuilder on 64bit machine any good?

 

Hi guys

I'm in the process of choosing a new machine to be placed under my
christmas tree :). I wonder, if anybody has some experiences with 64
bit machines and FlexBuilder? Does it run at all? What is the
performance like? Does it make use of lots of RAM?

Cheers
Ralf.

 



[flexcoders] Re: Custom event--please help me

2008-12-15 Thread nathanleewei
BasePanel uses another EventDispatcher instance which is inherit from 
UIComponent.


So U can try 
var basePanel:BasePanel = your BasePanel instance;
basePanel.dispatchEvent(ev); 

instead 

var dipsatcher:EventDispatcher = new EventDispatcher();
dispatcher.dispatchEvent(ev);

And U should have a look at;
http://tech.groups.yahoo.com/group/flexcoders/message/66101
http://www.helihobby.com/html/alon_desingpattern.html
also CairngormEventDispatcher


--- In flexcoders@yahoogroups.com, lorenzo.boaro lore...@... 
wrote:

 Hi
 
 i've a problem..anibody can help me?
 
 i created this class:
 
 public class CompleteEvent extends Event
   {
   private var array:ArrayCollection
 
   public function CompleteEvent(type:String, 
array:ArrayCollection)
   {
   super(type);
   this.array = array;
   }
 
   public override function clone():Event {
   return new CompleteEvent(type, array);
   }
 }
 
 the main class create the array through a socket connection within 
the
 socket listeners for Socket.DATA...in the method listeners dispatch
 the event...
 
 [Event(name=newEvent, type=CompleteEvent)]
 
 public class MainApp{
 
 socket.addEventListeners(ProgressEvent.SOCKET_DATA, socketData);
 ...
 private function socketData(event:Event):void {
 
 ...some code to create array from server data...
   //dispatch event
 var dipsatcher:EventDispatcher = new EventDispatcher();
 var ev:CompleteEvent = new CompleteEvent(newEvent, array);
 
 dispatcher.dispatchEvent(ev);
   }
 }
 
 and this other class listens for the event
 
 public class BasePanel extends Panel
   {
 
   private function dataEventHandler():void {
   trace(Array retrieved);
   }
 
   public function BasePanel()
   {
   super();
   this.addEventListener(newEvent, 
dataEventHandler);
   }
 }
 
 but not working the BasePanel class doesn't listen for the event..
 
 thanks a lot 
 
 Regards 
 Lorenzo






Re: [flexcoders] mxml compiler on linux

2008-12-15 Thread Maciek Sakrejda
It looks like mxmlc is not in your path. Try running 'which mxmlc' from
a terminal--that will tell you where it is if it *is* in your path (and
just won't print anything if it isn't). If it's not, set your PATH=
$PATH:$FLEX_HOME/bin, where $FLEX_HOME is the full path to your Flex sdk
(e.g., if you have FB3-alpha4 installed, it's under sdks/3.0.0).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Deniz Davutoglu d...@7ist.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mxml compiler on linux
Date: Mon, 15 Dec 2008 19:03:23 +0200

Hi Everyone,
I try to build some app which use mxml compiler. in windows everything
is ok when I compile .as file with mxmlc it creates swf file, but in
Linux when I try to compile same .as file wit mxmlc it cast me error
command not found. I checked all permissions and ownership are ok.
Does any one have experience to use sdk in linux?

thanks
Deniz




 




[flexcoders] Re: Disable Runtime Binding Warnings

2008-12-15 Thread stoff0
ar1 is a repeater. sorry, should have been more thorough with my example:

 [Bindable] private var _areas:XMLList;

  mx:Repeater id=ar1 dataProvider={_areas}
spr:SubsectionText text={XML(ar1.currentItem)@title} /
  /mx:Repeater

nope, i don't care if any changes ever get picked up in this case.
although, the crazy thing is changes do get picked up (i've tried this
before). 

i am positive the warning is coming from this line (and many other
lines like it).

i also want to mention that i have definitely thought of putting this
an arraylist and/or making custom data model out of the xml, but it
seems kind of ridiculous when all of the data is right there. yeah,
i'll get introspection, but i'll also end up with a ton more code and
a bigger hassle to maintain.

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 What is ar1?  What is currentItem?  Are you sure that line is the
one kicking the warning?  Do you care that if @title does change that
your code may not pick it up?
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of stoff0
 Sent: Sunday, December 14, 2008 9:22 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Disable Runtime Binding Warnings
 
 
 this doesn't seem to take away the warnings. for instance, the warning
 i'm getting is this:
 
 warning: unable to bind to property 'title' on class 'XML' (class is
 not an IEventDispatcher)
 
 doing this:
 
 spr:SubsectionText text={XML(ar1.currentItem)@title} width=100% /
 
 makes no difference as compared to this:
 
 spr:SubsectionText text={ar1.currentit...@title} width=100% /
 
 (spr is a custom component i made)
 
 either way, there should be away to just disable these warnings. the
 code is performing fine otherwise.
 
 anyone have any ideas?
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com,
Tracy Spratt tspratt@ wrote:
 
  Those warnings are correctable.
 
 
 
  Wrap the node expression, which is probably currentItem or data, or
  selectedItem which are objects, in the XML() function.
 
 
 
  text={XML(myDG.selectedItem).myNode.text()}
 
 
 
  Tracy
 
 
 
  
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On
  Behalf Of stoff0
  Sent: Tuesday, December 09, 2008 7:58 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Disable Runtime Binding Warnings
 
 
 
  Is there anyway to stop binding warnings (or all warnings from being
  logged to the console)? I've tried to turn off warnings with compiler
  arguments like:
 
  -compiler.show-binding-warnings=false
  -warnings=false
 
  I also tried unchecking enable warnings checkbox in flex builder.
 
  It looks like none of these have an effect on runtime warnings
  (warnings that get logged to the console)
 
  For some background the reason I'm attempting this is because I'm
  getting about 200 warnings on some xml binding and it's really slowing
  things down for me and probably everyone with the debug player.
 
  Thanks!
 





RE: [flexcoders] Test-driven development in Flex

2008-12-15 Thread Gregor Kiddie
1. We use FlexUnit for our development (well, a tweaked version of
FlexUnit) and I'm in the process of adding FlexCover to that. We use
test first as a guiding principle when writing code.

2. Our general architecture and therefore designs are geared to helping
us test the business logic that is written.

3. We've pulled way back from Cairngorm and rolled our own, one of the
contributing decisions for this was the problems in testing Cairngorm
apps.

 

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 is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Errol Thompson
Sent: 15 December 2008 16:49
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Test-driven development in Flex

 

I am fairly new to Flex but have a reasonable amount of experience with
test-driven development in Java and .NET.

 

I have been told that test-driving Flex development is not possible. I
am not convinced as I have been told similar things on other projects in
the past and then proven that they are possible.

 

I am wondering:

 

1) How many people actually use a testing framework (FlexUnit, Fluint,
FUnit, AsUnit) when doing Flex development?

 

2) Does using a testing framework change the way that you structure your
Flex applications?

 

3) How many use test-driven development with the Cairngorm framework?

 

-
Errol Thompson
Kiwi-ET Computing Education Research
Wellington, New Zealand
Phone: +64 21 210 1662
E-Mail: kiwiet (at) acm.org
kiwiet (at) computer.org
Web: www.thompsonz.net http://www.thompsonz.net 
-

 



[flexcoders] Custom event--please help me

2008-12-15 Thread lorenzo.boaro
Hi

i've a problem..anibody can help me?

i created this class:

public class CompleteEvent extends Event
{
private var array:ArrayCollection

public function CompleteEvent(type:String, 
array:ArrayCollection)
{
super(type);
this.array = array;
}

public override function clone():Event {
return new CompleteEvent(type, array);
}
}

the main class create the array through a socket connection within the
socket listeners for Socket.DATA...in the method listeners dispatch
the event...

[Event(name=newEvent, type=CompleteEvent)]

public class MainApp{

socket.addEventListeners(ProgressEvent.SOCKET_DATA, socketData);
...
private function socketData(event:Event):void {

...some code to create array from server data...
//dispatch event
var dipsatcher:EventDispatcher = new EventDispatcher();
var ev:CompleteEvent = new CompleteEvent(newEvent, array);

dispatcher.dispatchEvent(ev);
  }
}

and this other class listens for the event

public class BasePanel extends Panel
{

private function dataEventHandler():void {
trace(Array retrieved);
}

public function BasePanel()
{
super();
this.addEventListener(newEvent, dataEventHandler);
}
}

but not working the BasePanel class doesn't listen for the event..

thanks a lot 

Regards 
Lorenzo



RE: [flexcoders] Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread Tracy Spratt
Yes, as nate says.  Remember, you are callling an *html* file.  Html is
dumb unless you code in javascript.  Here are some snippets that you can
add to the html wrapper that pass querystring parameers into Flex.

First, declare a variable to hold the params:
var _sPassedUrlParms = new String(document.location).split('?')[1];
//Get any passed-in querystring parms
 Then, pass that into the Flex app:
  AC_FL_RunContent(
  src, Coalesce,
  ...
  flashvars, _sPassedUrlParms, 
  ...
  );



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Nate Beck
Sent: Monday, December 15, 2008 12:06 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Application.application.parameters doesn't
hold GET query parameters

I don't believe Flash natively reads URL parameters from the browsers
query string.  

However, here are a few ways you can do it:
*   Write a javascript (or serverside) method that takes the
browsers query string and the passes them in as flashvars.
*   You CAN add a query string directly to the embed code, (ex
UrlParams.swf?foo=bar), Those will be treated as flashvars as well.
*   If you have javascript access on the page, add an
ExternalInterface call which will return the query string to your swf.
Hope that helps,
Nate

On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@gmail.com wrote:
I feel kind of stupid asking this, but I have been beating my head
against the wall and I know I am missing something obvious.

I created a sample app here (you can view source on it):
http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar

You will notice there are no URL parameters being reported by the
application. The code is pretty basic, so I don't know what I am
missing. This is a brand new sample app...I created it, added a few
lines of code, and that is it. Any ideas? 

Thanks

private function showParams():void
{
var params:Object = Application.application.parameters;
var s:String = Params: \n;
params.runtime = added in code;
for (var key:String in params)
{
s += key +: + params[key] + \n;
}
txt.text = s;
}

 


[flexcoders] Auto-scrolling of selectable Text controls

2008-12-15 Thread Michael Prescott
If you have a Text field with selectable text, it's possible to scroll the
content by clicking on the text and dragging downwards.  This leaves (in one
simple case I've made) the top line of text obscured, and an apparent blank
line at the bottom.

Is there any way to prevent this without making the text non-selectable?

Michael


[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread ozziegt
Well, the documentation sure says so: 

http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters

I had it working with swfobject using the getQueryParamValue function
in JS. I think I my just stick with that, and use swfaddress for my
deep linking. Still would like to know what is up with the
documentation though. All my web searches seem to imply that it just
supposed to work.

Thanks

--- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote:

 I don't believe Flash natively reads URL parameters from the
browsers query
 string.
 However, here are a few ways you can do it:
 
- Write a javascript (or serverside) method that takes the
browsers query
string and the passes them in as flashvars.
- You CAN add a query string directly to the embed code, (ex
UrlParams.swf?foo=bar), Those will be treated as flashvars as well.
- If you have javascript access on the page, add an ExternalInterface
call which will return the query string to your swf.
 
 Hope that helps,
 Nate
 
 On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote:
 
I feel kind of stupid asking this, but I have been beating my head
  against the wall and I know I am missing something obvious.
 
  I created a sample app here (you can view source on it):
  http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
 
  You will notice there are no URL parameters being reported by the
  application. The code is pretty basic, so I don't know what I am
  missing. This is a brand new sample app...I created it, added a few
  lines of code, and that is it. Any ideas?
 
  Thanks
 
  private function showParams():void
  {
  var params:Object = Application.application.parameters;
  var s:String = Params: \n;
  params.runtime = added in code;
  for (var key:String in params)
  {
  s += key +: + params[key] + \n;
  }
  txt.text = s;
  }
 
   
 





[flexcoders] Re: Preserve state in TitleWindow - mxml bind problems

2008-12-15 Thread dfrank76
The state remains if the field does not contain an mxml bind.  For 
example, this droplist below will keep the same state after close.  
I'm just wondering why the mxml binds come back in overpowering 
whatever the user entered and how to stop it.  Is it possible to 
disconnect an mxml bind?  

   mx:FormItem label=Static droplist
mx:ComboBox id=combo2 width=100% labelField=label
mx:Array
mx:Object label=original1/
mx:Object label=original2/
/mx:Array

/mx:ComboBox
/mx:FormItem 

--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Let me see if I can explain it (And someone else can correct me if I
 am wrong).
 
 In your application you create the loginForm:
 
 public var login:MyLoginForm = new MyLoginForm();
 
 then with the button you add it to the display list:
 
 PopUpManager.addPopUp(login, this, true);
 
 When you close the popup:
 
 PopUpManager.removePopUp(this);
 
 Flex removes it from the Display List. Note that the loginForm 
object
 still exists (It is in the login variable). When you click the 
button
 again Flex puts the popup back on the display list and displays it.
 Anything a user has added to textinputs will still be there. There 
is
 no logic to save the state of combo boxes (Or check boxes or radio
 buttons...) so they will default back to the first item in the list.
 
 What you would need to do is add logic to save the state of these
 controls on the click of the close button and then re-instate these
 saved states when re-opening the loginForm.
 
 
 HTH
 
 
 Steve
 
 
 --- In flexcoders@yahoogroups.com, dfrank76 dfrankson@ wrote:
 
  I am loading data in a popup title window and then I'd like to 
reuse 
  that title window instance with all the loaded data an user input 
data 
  any time the user clicks the button to pop it up.  I'm having 
trouble 
  with bound fields...
  
  I implemented it using an instance of a custom TitleWindow that is 
  referenced from the main app, and then use addPopup/removePopup to 
  show/display it.  In the example below, click the button to pop up 
the 
  TitleWindow.  Type any text into the TextInput.  Then in the 
ComboBx 
  either select original2 from the dropdown or click to change the 
  dataProvider.  Close the popup and reopen and you will see that 
the 
  text you entered into popup is still there, but any change made to 
the  
  combo box has been wiped out.  
  
  Is this a bug?  If this is how it is supposed to work, can someone 
  walk me through why it works this way?  Why are the mxml binds 
  refreshed when the underlying data they are bound to did not 
change?  
  Why are the mxml binds wiping out the user entered changes?  Is 
there 
  any way to prevent this bind refresh from happening?
  
  
  
  Below is the simplified example:
  
  ?xml version=1.0?
  !-- MyLoginForm.mxml --
  mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
  
  mx:Script
  ![CDATA[
  import mx.managers.PopUpManager;
  
  [Bindable] private var provider1:XML = XMLrecord 
  label=original1/record label=original2//XML;
  [Bindable] private var provider2:XML = XMLrecord 
  label=new1/record label=new2//XML;
  
  private function swapProviders():void {
  combo1.dataProvider = provider2.record;
  }
  ]]
  /mx:Script
  
  mx:Form
  mx:FormItem label=Text field test
  mx:TextInput id=text1 width=100%/
  /mx:FormItem 
  mx:FormItem label=Bound droplist
  mx:ComboBox id=combo1 width=100% 
  dataProvider={provider1.record} labelField=@label/
  /mx:FormItem 
  /mx:Form
  mx:HBox 
  mx:Button click=swapProviders(); label=Swap data 
  providers/ 
  mx:Button label=Close 
  click=PopUpManager.removePopUp(this);/ 
  /mx:HBox 
  /mx:TitleWindow
  
  
  ?xml version=1.0?
  !-- Main.mxml --
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  
  mx:Script
  ![CDATA[
  import mx.managers.PopUpManager;
  import MyLoginForm;
  
  public var login:MyLoginForm = new MyLoginForm();
  
  private function showLogin():void {
  PopUpManager.addPopUp(login, this, true);
  }
  ]]
  /mx:Script
  
  mx:VBox width=300 height=300  
  mx:Button click=showLogin(); label=Login/
  /mx:VBox
  /mx:Application
 






Re: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread Nate Beck
I think you're just misreading the documentation.  It's exactly as I
described before:
There are two sources of parameters: the query string of the Application's
URL, and the value of the FlashVars HTML parameter (this affects only the
main Application).

Within the query string of the application's URL... UrlParams.swf?foo=bar
The application's URL, not the web page URL where the flash file is being
embedded.

and

FlashVars

On Mon, Dec 15, 2008 at 9:14 AM, ozziegt osman.ul...@gmail.com wrote:

   Well, the documentation sure says so:


 http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters

 I had it working with swfobject using the getQueryParamValue function
 in JS. I think I my just stick with that, and use swfaddress for my
 deep linking. Still would like to know what is up with the
 documentation though. All my web searches seem to imply that it just
 supposed to work.

 Thanks


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nate
 Beck n...@... wrote:
 
  I don't believe Flash natively reads URL parameters from the
 browsers query
  string.
  However, here are a few ways you can do it:
 
  - Write a javascript (or serverside) method that takes the
 browsers query
  string and the passes them in as flashvars.
  - You CAN add a query string directly to the embed code, (ex
  UrlParams.swf?foo=bar), Those will be treated as flashvars as well.
  - If you have javascript access on the page, add an ExternalInterface
  call which will return the query string to your swf.
 
  Hope that helps,
  Nate
 
  On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote:
 
   I feel kind of stupid asking this, but I have been beating my head
   against the wall and I know I am missing something obvious.
  
   I created a sample app here (you can view source on it):
   http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
  
   You will notice there are no URL parameters being reported by the
   application. The code is pretty basic, so I don't know what I am
   missing. This is a brand new sample app...I created it, added a few
   lines of code, and that is it. Any ideas?
  
   Thanks
  
   private function showParams():void
   {
   var params:Object = Application.application.parameters;
   var s:String = Params: \n;
   params.runtime = added in code;
   for (var key:String in params)
   {
   s += key +: + params[key] + \n;
   }
   txt.text = s;
   }
  
  
  
 

  



Re: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread Nate Beck
That didn't come out how I wanted it to.  Let's try again.
I can see how the documentation can be confusing.  When they say, Within
the query string of the application's URL, they simply mean the URL
pointing to the flash file itself.  (ex:
http://foobar.com/UrlParams.swf?foo=bar)

Yea, that's much nicer.


On Mon, Dec 15, 2008 at 10:02 AM, Nate Beck n...@tldstudio.com wrote:

 I think you're just misreading the documentation.  It's exactly as I
 described before:
 There are two sources of parameters: the query string of the
 Application's URL, and the value of the FlashVars HTML parameter (this
 affects only the main Application).

 Within the query string of the application's URL... UrlParams.swf?foo=bar
 The application's URL, not the web page URL where the flash file is being
 embedded.

 and

 FlashVars

 On Mon, Dec 15, 2008 at 9:14 AM, ozziegt osman.ul...@gmail.com wrote:

   Well, the documentation sure says so:


 http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters

 I had it working with swfobject using the getQueryParamValue function
 in JS. I think I my just stick with that, and use swfaddress for my
 deep linking. Still would like to know what is up with the
 documentation though. All my web searches seem to imply that it just
 supposed to work.

 Thanks


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nate
 Beck n...@... wrote:
 
  I don't believe Flash natively reads URL parameters from the
 browsers query
  string.
  However, here are a few ways you can do it:
 
  - Write a javascript (or serverside) method that takes the
 browsers query
  string and the passes them in as flashvars.
  - You CAN add a query string directly to the embed code, (ex
  UrlParams.swf?foo=bar), Those will be treated as flashvars as well.
  - If you have javascript access on the page, add an ExternalInterface
  call which will return the query string to your swf.
 
  Hope that helps,
  Nate
 
  On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote:
 
   I feel kind of stupid asking this, but I have been beating my head
   against the wall and I know I am missing something obvious.
  
   I created a sample app here (you can view source on it):
   http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
  
   You will notice there are no URL parameters being reported by the
   application. The code is pretty basic, so I don't know what I am
   missing. This is a brand new sample app...I created it, added a few
   lines of code, and that is it. Any ideas?
  
   Thanks
  
   private function showParams():void
   {
   var params:Object = Application.application.parameters;
   var s:String = Params: \n;
   params.runtime = added in code;
   for (var key:String in params)
   {
   s += key +: + params[key] + \n;
   }
   txt.text = s;
   }
  
  
  
 

  





[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread valdhor
This message may help:

http://tech.groups.yahoo.com/group/flexcoders/message/112989


HTH



Steve


--- In flexcoders@yahoogroups.com, ozziegt osman.ul...@... wrote:

 I feel kind of stupid asking this, but I have been beating my head
 against the wall and I know I am missing something obvious.
 
 I created a sample app here (you can view source on it):
 http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
 
 You will notice there are no URL parameters being reported by the
 application. The code is pretty basic, so I don't know what I am
 missing. This is a brand new sample app...I created it, added a few
 lines of code, and that is it. Any ideas? 
 
 Thanks
 
 private function showParams():void
 {
   var params:Object = Application.application.parameters;
   var s:String = Params: \n;
   params.runtime = added in code;
   for (var key:String in params)
   {
   s += key +: + params[key] + \n;
   }
   txt.text = s;
 }





[flexcoders] Re: Auto-scrolling of selectable Text controls

2008-12-15 Thread Michael VanDaniker
I've run into this before. It appears to be a bug with leading. If you
set it to zero, this won't happen, but the lines of text will be a
little too close together.  You can probably monkey patch it.

--- In flexcoders@yahoogroups.com, Michael Prescott
michael.r.presc...@... wrote:

 If you have a Text field with selectable text, it's possible to
scroll the
 content by clicking on the text and dragging downwards.  This leaves
(in one
 simple case I've made) the top line of text obscured, and an
apparent blank
 line at the bottom.
 
 Is there any way to prevent this without making the text non-selectable?
 
 Michael





[flexcoders] Re: Preserve state in TitleWindow - mxml bind problems

2008-12-15 Thread valdhor
I don't believe you need to disconnect an mxml bind.

Here is a quick and dirty example:

main.mxml
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
 mx:Script
 ![CDATA[
 import customcomponents.MyForm;

 private var comboBoxState:String = ;
 private var myForm:MyForm = new MyForm();

 private function createForm():void
 {
 if(comboBoxState.length  0)
 {
 myForm.comboBoxState = comboBoxState;
 }
 addChild(myForm);
 }

 public function saveAndRemoveForm(comboBoxState:String):void
 {
 this.comboBoxState = comboBoxState;
 this.removeChild(myForm);
 }
 ]]
 /mx:Script
 mx:Button label=Create Form click=createForm()/
/mx:Application

customcomponents.MyForm
?xml version=1.0 encoding=utf-8?
mx:FormItem label=Static droplist
xmlns:mx=http://www.adobe.com/2006/mxml;
 creationComplete=onCreationComplete()
 mx:Script
 ![CDATA[
 import mx.core.Application;

 public var comboBoxState:String = ;

 private function onCreationComplete():void
 {
 if(comboBoxState.length  0)
 {
 combo2.selectedItem = comboBoxState;
 }
 }

 private function onButtonClick():void
 {

Application.application.saveAndRemoveForm(combo2.selectedLabel);
 }
 ]]
 /mx:Script
 mx:ComboBox id=combo2 width=100% labelField=label
prompt=Select
 mx:Array
 mx:Object label=original1/
 mx:Object label=original2/
 /mx:Array
 /mx:ComboBox
 mx:Button label=Save click=onButtonClick()/
/mx:FormItem


--- In flexcoders@yahoogroups.com, dfrank76 dfrank...@... wrote:

 The state remains if the field does not contain an mxml bind.  For
 example, this droplist below will keep the same state after close.
 I'm just wondering why the mxml binds come back in overpowering
 whatever the user entered and how to stop it.  Is it possible to
 disconnect an mxml bind?

mx:FormItem label=Static droplist
 mx:ComboBox id=combo2 width=100% labelField=label
  mx:Array
   mx:Object label=original1/
   mx:Object label=original2/
  /mx:Array

 /mx:ComboBox
 /mx:FormItem

 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  Let me see if I can explain it (And someone else can correct me if I
  am wrong).
 
  In your application you create the loginForm:
 
  public var login:MyLoginForm = new MyLoginForm();
 
  then with the button you add it to the display list:
 
  PopUpManager.addPopUp(login, this, true);
 
  When you close the popup:
 
  PopUpManager.removePopUp(this);
 
  Flex removes it from the Display List. Note that the loginForm
 object
  still exists (It is in the login variable). When you click the
 button
  again Flex puts the popup back on the display list and displays it.
  Anything a user has added to textinputs will still be there. There
 is
  no logic to save the state of combo boxes (Or check boxes or radio
  buttons...) so they will default back to the first item in the list.
 
  What you would need to do is add logic to save the state of these
  controls on the click of the close button and then re-instate these
  saved states when re-opening the loginForm.
 
 
  HTH
 
 
  Steve
 
 
  --- In flexcoders@yahoogroups.com, dfrank76 dfrankson@ wrote:
  
   I am loading data in a popup title window and then I'd like to
 reuse
   that title window instance with all the loaded data an user input
 data
   any time the user clicks the button to pop it up.  I'm having
 trouble
   with bound fields...
  
   I implemented it using an instance of a custom TitleWindow that is
   referenced from the main app, and then use addPopup/removePopup to
   show/display it.  In the example below, click the button to pop up
 the
   TitleWindow.  Type any text into the TextInput.  Then in the
 ComboBx
   either select original2 from the dropdown or click to change the
   dataProvider.  Close the popup and reopen and you will see that
 the
   text you entered into popup is still there, but any change made to
 the
   combo box has been wiped out.
  
   Is this a bug?  If this is how it is supposed to work, can someone
   walk me through why it works this way?  Why are the mxml binds
   refreshed when the underlying data they are bound to did not
 change?
   Why are the mxml binds wiping out the user entered changes?  Is
 there
   any way to prevent this bind refresh from happening?
  
  
  
   Below is the simplified example:
  
   ?xml version=1.0?
   !-- MyLoginForm.mxml --
   mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
  
   

RE: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread Alex Harui
You should be able to use BrowserManager instead of altering your HTML.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of valdhor
Sent: Monday, December 15, 2008 10:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Application.application.parameters doesn't hold GET 
query parameters


This message may help:

http://tech.groups.yahoo.com/group/flexcoders/message/112989

HTH

Steve

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
ozziegt osman.ul...@... wrote:

 I feel kind of stupid asking this, but I have been beating my head
 against the wall and I know I am missing something obvious.

 I created a sample app here (you can view source on it):
 http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar

 You will notice there are no URL parameters being reported by the
 application. The code is pretty basic, so I don't know what I am
 missing. This is a brand new sample app...I created it, added a few
 lines of code, and that is it. Any ideas?

 Thanks

 private function showParams():void
 {
 var params:Object = Application.application.parameters;
 var s:String = Params: \n;
 params.runtime = added in code;
 for (var key:String in params)
 {
 s += key +: + params[key] + \n;
 }
 txt.text = s;
 }




RE: [flexcoders] Re: Disable Runtime Binding Warnings

2008-12-15 Thread Alex Harui
So uncomment that line or change it to return a known bindable variable and see 
if the warning goes away.  I would have thought the error would have @title 
instead of title in it.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of stoff0
Sent: Monday, December 15, 2008 2:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Disable Runtime Binding Warnings


ar1 is a repeater. sorry, should have been more thorough with my example:

[Bindable] private var _areas:XMLList;

mx:Repeater id=ar1 dataProvider={_areas}
spr:SubsectionText text={XML(ar1.currentItem)@title} /
/mx:Repeater

nope, i don't care if any changes ever get picked up in this case.
although, the crazy thing is changes do get picked up (i've tried this
before).

i am positive the warning is coming from this line (and many other
lines like it).

i also want to mention that i have definitely thought of putting this
an arraylist and/or making custom data model out of the xml, but it
seems kind of ridiculous when all of the data is right there. yeah,
i'll get introspection, but i'll also end up with a ton more code and
a bigger hassle to maintain.

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 What is ar1? What is currentItem? Are you sure that line is the
one kicking the warning? Do you care that if @title does change that
your code may not pick it up?

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of stoff0
 Sent: Sunday, December 14, 2008 9:22 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Disable Runtime Binding Warnings


 this doesn't seem to take away the warnings. for instance, the warning
 i'm getting is this:

 warning: unable to bind to property 'title' on class 'XML' (class is
 not an IEventDispatcher)

 doing this:

 spr:SubsectionText text={XML(ar1.currentItem)@title} width=100% /

 makes no difference as compared to this:

 spr:SubsectionText text={ar1.currentit...@title} width=100% /

 (spr is a custom component i made)

 either way, there should be away to just disable these warnings. the
 code is performing fine otherwise.

 anyone have any ideas?

 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
Tracy Spratt tspratt@ wrote:
 
  Those warnings are correctable.
 
 
 
  Wrap the node expression, which is probably currentItem or data, or
  selectedItem which are objects, in the XML() function.
 
 
 
  text={XML(myDG.selectedItem).myNode.text()}
 
 
 
  Tracy
 
 
 
  
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
On
  Behalf Of stoff0
  Sent: Tuesday, December 09, 2008 7:58 PM
  To: 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Disable Runtime Binding Warnings
 
 
 
  Is there anyway to stop binding warnings (or all warnings from being
  logged to the console)? I've tried to turn off warnings with compiler
  arguments like:
 
  -compiler.show-binding-warnings=false
  -warnings=false
 
  I also tried unchecking enable warnings checkbox in flex builder.
 
  It looks like none of these have an effect on runtime warnings
  (warnings that get logged to the console)
 
  For some background the reason I'm attempting this is because I'm
  getting about 200 warnings on some xml binding and it's really slowing
  things down for me and probably everyone with the debug player.
 
  Thanks!
 




Re: [flexcoders] Lazy loading trees

2008-12-15 Thread Samuel Neff
How much data do you really need to load in the tree?  If it's only a
thousand or so records, while that may be a lot to some, it's fine to load
at once and forget lazy loading.  If the data is sent to client via AMF then
the size over the wire isn't that big either, and most likely the additional
impact on the server is minimized by doing one bigger call instead of lots
of small calls.  The user also gets a better experience through a more
responsive UI.
Additionally, trees are not as supportive with lazy loading data as other
controls.  See this post which coincidentally is from the day before you
posted your question.
http://blogs.adobe.com/aharui/2008/12/tree_and_lazy_or_paged_data_1.html

And lazy loading the data brings in more complexity which makes it harder to
develop, test, and maintain.  If you can avoid the headache that's better.

HTH,

Sam

-
We're Hiring! Seeking passionate Flex or C# developer in the Washington D.C.
Contact care...@blinemedical.com


On Mon, Dec 8, 2008 at 9:04 PM, dandante danda...@dandante.com wrote:

 Hello,

 I have a Tree control and I want to load each node's children in lazy
 fashion--that is, when
 the user expands a node, I want to fetch that node's children from the
 server. (there is way
 too much data to populate the entire tree ahead of time).

 I've looked around and the closest I came to a solution is this old post:
 http://www.mail-archive.com/flexcoders@yahoogroups.com/msg62360.html

 This code works, but it seems that it will only modify the children of the
 root nodes. It isn't
 clear how to expand this code to work with a deep tree.

 Does anyone have ideas on that, specifically, or on other approaches to
 this problem?
 Thanks




Re: [flexcoders] Command Proxy

2008-12-15 Thread Mike Chambers
You can still use a command proxy architecture with Adobe AIR 1.5 in  
the same way you could use it with previous versions of Adobe AIR.

It is just a proof of concept, so I havent really done any additional  
work on it (besisde, c# / .net development is not much fun on Mac).

You can grab the source from here:

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

and find more info here:

http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integration-proof-of-concept/

Does that answer your question?

mike chambers

m...@adobe.com

On Dec 15, 2008, at 7:38 AM, flexaustin wrote:

 I asked this in an earlier post, but hoping Alex can ask Mike Chambers
 about the status of the Apollo + Command Proxy project he started.
 Does anyone know if Command Proxy access is available in Adobe AIR?

 When Mike created his project he said that he had hopes for command
 proxy access, when AIR 1.5 came out. Do we have this access yet?




RE: [flexcoders] Re: Loading network SWFs from SWF hosted on filesystem (SWF is not a loadable module

2008-12-15 Thread Alex Harui
Typically, you want to test in local-trusted instead of local-with-networking 
and use relative paths to all assets (and have those assets in the local 
filesystem).  Then when you deploy those files to a server in the same folder 
configuration, everything should just work.

If you use an absolute path, then in local-trusted it is seen as a foreign 
domain, and by default modules will not work unless you set the 
SecurityDomain.currentDomain on the module loader.  However, that will still 
set up a different topology of trust than when you deploy and the loading app 
is on the same server as the module.

So, only use absolute paths  if you'll always be loading the module from a 
different domain.  There might be issues using SecurityDomain.currentDomain in 
local-trusted sandboxes.  You can sometimes get yourself into configurations 
that can only be tested while deployed and served over http:

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of hughesmatt78
Sent: Monday, December 15, 2008 7:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Loading network SWFs from SWF hosted on filesystem 
(SWF is not a loadable module


My sandbox type is local-trusted. According to the Flash Security
white paper, local-trusted has *at least* the priviledges of
local-with-networking.

localWithNetwork: This SWF file is a local file and has not been
trusted by the user, but it was
published with a networking designation. This SWF may communicate with
the Internet but may not
read from local data sources.
localTrusted: This SWF file is a local file and has been trusted by
the user, using either the
Settings Manager or a FlashPlayerTrust configuration file. This SWF
file may both read from local
data sources and communicate with the Internet.


I did change it to local-with-networking, but I get the same error:

Finished loading crossdomain.
?xml version=1.0?
cross-domain-policy
allow-access-from domain=* /
/cross-domain-policy

[SWF] /SimpleModuleProject.swf - 574,981 bytes after decompression
*** Security Sandbox Violation ***
SecurityDomain
'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf'
tried to access incompatible context 'http://localhost/crossdomain.xml'
*** Security Sandbox Violation ***
SecurityDomain
'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf'
tried to access incompatible context 'http://localhost/crossdomain.xml'
Failed to load module
SWF is not a loadable module

Any ideas?

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 Check your sandboxType. I'll bet it is local-trusted and not
local-with-networking.

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of hughesmatt78
 Sent: Saturday, December 13, 2008 11:33 AM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Loading network SWFs from SWF hosted on
filesystem (SWF is not a loadable module


 I'm trying so far in vain to load a module from a network domain from
 a SWF that was loaded via the filesystem. Every time I try and load
 the module, I get the following error:

 SWF is not a loadable module.

 I have seen this same problem discussed elsewhere on FlexCoders and
 other blogs but I am getting very conflicting views. Some people say
 this kind of module loading is not supported
 (http://www.nabble.com/Problems-using-Flex-modules-td15188446.html)
 but the Adobe Flash Player 9 Security white paper clearly indicate it
 is possible:

 A SWF file may also call Security.allowDomain() with the wildcard
 parameter * to allow any domain.
 This is necessary to allow a local-with-networking SWF file to
 cross-script a network SWF file.

 Anyway, off to the example project I created. Here are two very basic
 mxmls.

 TestApplication.mxml -- (loaded via file system, this attempts to load
 a simple module hosted at localhost)
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=vertical initialize=init()
 mx:Script
 ![CDATA[
 import mx.events.ModuleEvent;
 private function init() : void
 {
 Security.allowDomain(localhost);

 Security.loadPolicyFile(http://localhost/crossdomain.xml;);

 var loader:URLLoader = new URLLoader();
 loader.addEventListener(Event.COMPLETE, function(event
 : Event) {
 trace(Finished loading crossdomain.);
 trace(loader.data);
 });
 loader.load(new
 URLRequest(http://localhost/crossdomain.xml;));
 }

 private function erroredOut(event : ModuleEvent) : void
 {
 trace(event.errorText);
 }

 private function loadIt() : void
 {
 loaderOfModules.url = 

[flexcoders] Re: How do I include a file in the AIR app-storage directory at install time?

2008-12-15 Thread Jim Boone
Thank you both for your tips. I think I will just embed the SQL
statements into the application and not go through the hassles that
you both speak of.  I think this will be cleaner from a deployment
perspective.

Jim

--- In flexcoders@yahoogroups.com, Jim Hayes j...@... wrote:

 If you're using flexbuilder to package, then probably the easiest way is
 to check copy non embedded files to output folder in project |
 properties | flex compiler,
 But I find this to be a bit messy at times.
 If not, then you can kind of cheat. When you publish your .air file, it
 will offer you the choice of files to include in the archive.
 If you click back at this point then you have the opportunity (outside
 of flexbuilder) to copy any files you need to the bin-release folder
 that gets temporarily created as part of the publishing operation. Back
 in flexbuilder, click next again and you'll be back in the stage where
 you can specify files to include, but now you'll have the opportunity to
 select the files you just copied to bin-release.
  
 This, however, gets old pretty quickly! 
  
 I now have an ant build script that packages everything up for me,
 without having to think / remember to copy certain files.
  
 I'm not sure if my script is generic enough or even clear enough to be
 much help to anyone though, to be honest I found it quite hard work to
 get it all working from a nil level of ant knowledge/experience.
 If there's anything specific you need to ask on that, however, then I'll
 do my best (Though I'm sure many people on the list are better qualified
 than myself in that respect).
  
 In regard of copying it over, you'll need to check if the file is there
 when the app starts, and copy it if not. There's not any scripting in
 the Air installer itself.
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Jim Boone
 Sent: 15 December 2008 13:36
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: How do I include a file in the AIR app-storage
 directory at install time?
  
 I read what you say, but I don't know how to do that. How do I include
 it as part of the install? How do I copy it over? Does the AIR install
 include some sort of scripting?
 
 Also, on doing more research, I have found that it is not wise to
 include files that I am talking about in app-storage and that perhaps
 the user directory is more appropriate.
 
 http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html
 http://blogs.adobe.com/simplicity/2008/06/dont_write_to_app_dir.html 
 




RE: [flexcoders] Re: Anything other than a JS alert can delay a window close?

2008-12-15 Thread Seth Hodgson
HTTP session timeout at the server is the only sure-fire way to detect a client 
has left. Catching Javascript events at the client and attempting to notify the 
server may shortcut this process _when_ it works - but it provides no 
guarantees that it will. Even if your Javascript is able to put a request onto 
the network or get Flash to issue a request via ExternalInterface before the 
browser closes, the notification over the network could be lost, for instance 
if an intermediate router crashes.

Depending on the behavior of your app, you can shorten this time interval by 
lowering your session timeout in web.xml.

If you're trying to detect the client leaving specific pages this is more 
difficult with HTTP because your connection (i.e. session) spans all the 
pages of your site that are loaded in the browser process. When the session 
times out, you could treat this as a leave for all pages the client has 
viewed during its session.

For RTMP (not available in BlazeDS) because we're dealing with a stateful 
connection (unlike HTTP where connections are stateless) as soon as the RTMP 
connection closes when the user closes their browser or navigates away from a 
page containing your Flex app, we detect that and you can respond to this event 
on the server.

In this case, if different pages contain individual swfs that you're tracking, 
as soon as the client leaves a page and the connection closes you can track 
that directly.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of valdhor
Sent: Wednesday, December 10, 2008 5:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Anything other than a JS alert can delay a window 
close?

Another idea...

How about setting up a timer in Flex to poll the server. If the server
does not receive the poll in a certain amount of time then the client
has disconnected and you can write the data to the database.

It may work even better with BlazeDS (I don't know this - I'm kinda
hoping it works). Hopefully you can tell if a client disconnects from
something they have subscribed to via RTMP. Does anyone know?




[flexcoders] Textarea, why the blue border?

2008-12-15 Thread cox.blair
Everyone,

Why is there a blue border shown when using a textarea and it has been
clicked on? To show it is in focus? Great, but why? 

How can this be removed? No, switching to Gumbo is not an option.

How would you display a few paragraphs of text within you
applications? Dis the designers of Flex believe it would never be used
to show more than a couple lines of type?

Thanks.



RE: [flexcoders] Re: BadPaddingException using RTMPS

2008-12-15 Thread Seth Hodgson
Hi Taze,

Do these errors only occur during the SSL handshake (you can look for 
SSLHandshakeException in your stack traces)?
Are you using a CA certificate or a self-signed cert, and what algorithm, etc.?
Also, do you know if this is happening for connections from AIR clients running 
on Windows, Mac, Linux?

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of taze170171
Sent: Monday, December 15, 2008 12:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BadPaddingException using RTMPS

Hello Jeff!

Thank you for your answer. We are using LCDS 2.6.1. and Flex SDK 3.2.

Best regards,
Taze

--- In flexcoders@yahoogroups.com, Jeff Vroom jvr...@... wrote:

 Are you running the released version of 2.6? There was a bug in
RTMPS in that version which is fixed in a hotfix or in 2.6.1 that
might cause this type of error intermittently.

 Jeff

 From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of taze170171
 Sent: Friday, December 12, 2008 5:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] BadPaddingException using RTMPS


 Hello!

 We are using AIR, LCDS (running on a JBoss) and an RTMPS connection.
 Sometimes we get the following exception, when the AIR client tries
 to connect to the server:

 [Flex]Thread[my-rtmps-SocketServer-WorkerThread-88,5,jboss] failed
to
 read Connection 'xxx' or process the data; Connection is in
 the 'Handshaking' state and will be forced closed.
 javax.net.ssl.SSLHandshakeException: Invalid padding
 at com.sun.net.ssl.internal.ssl.Alerts.getSSLException
 (Alerts.java:150)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal
 (SSLEngineImpl.java:1417)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord
 (SSLEngineImpl.java:874)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord
 (SSLEngineImpl.java:787)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap
 (SSLEngineImpl.java:663)
 at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:566)
 at flex.messaging.socketserver.SSLConnection.handshake
 (SSLConnection.java:301)
 at flex.messaging.socketserver.Connection$ConnectionReader.run
 (Connection.java:761)
 at

edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Work
 er.runTask(ThreadPoolExecutor.java:665)
 at

edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Work
 er.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:595)

 Caused by: javax.crypto.BadPaddingException: Padding length invalid:
 244
 at com.sun.net.ssl.internal.ssl.CipherBox.removePadding
 (CipherBox.java:442)
 at com.sun.net.ssl.internal.ssl.CipherBox.decrypt
(CipherBox.java:290)
 at com.sun.net.ssl.internal.ssl.InputRecord.decrypt
 (InputRecord.java:153)
 at com.sun.net.ssl.internal.ssl.EngineInputRecord.decrypt
 (EngineInputRecord.java:238)
 at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord
 (SSLEngineImpl.java:856)
 ... 8 more

 Can anybody help?

 Thanks in advance,
 Taze



[flexcoders] Re: Textarea, why the blue border?

2008-12-15 Thread Tim Hoff

selectable=false

-TH

--- In flexcoders@yahoogroups.com, cox.blair blair@... wrote:

 Everyone,

 Why is there a blue border shown when using a textarea and it has been
 clicked on? To show it is in focus? Great, but why?

 How can this be removed? No, switching to Gumbo is not an option.

 How would you display a few paragraphs of text within you
 applications? Dis the designers of Flex believe it would never be used
 to show more than a couple lines of type?

 Thanks.






RE: [flexcoders] Textarea, why the blue border?

2008-12-15 Thread Alex Harui
Because.

Our design/usability folks think that is best.

You should use Text, not TextArea for non-editable text.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of cox.blair
Sent: Monday, December 15, 2008 11:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Textarea, why the blue border?


Everyone,

Why is there a blue border shown when using a textarea and it has been
clicked on? To show it is in focus? Great, but why?

How can this be removed? No, switching to Gumbo is not an option.

How would you display a few paragraphs of text within you
applications? Dis the designers of Flex believe it would never be used
to show more than a couple lines of type?

Thanks.



Re: [flexcoders] Textarea, why the blue border?

2008-12-15 Thread Blair Cox
Well there you go, I was using the wrong component. Thanks!

-- 
Blair 





From: Alex Harui aha...@adobe.com
Reply-To: flexcoders@yahoogroups.com
Date: Mon, 15 Dec 2008 11:45:56 -0800
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Conversation: [flexcoders] Textarea, why the blue border?
Subject: RE: [flexcoders] Textarea, why the blue border?

 
 

Because.
 
Our design/usability folks think that is ³best².
 
You should use Text, not TextArea for non-editable text.
 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of cox.blair
Sent: Monday, December 15, 2008 11:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Textarea, why the blue border?
 

Everyone,

Why is there a blue border shown when using a textarea and it has been
clicked on? To show it is in focus? Great, but why?

How can this be removed? No, switching to Gumbo is not an option.

How would you display a few paragraphs of text within you
applications? Dis the designers of Flex believe it would never be used
to show more than a couple lines of type?

Thanks.

 
 




[flexcoders] Re: Loading network SWFs from SWF hosted on filesystem (SWF is not a loadable module

2008-12-15 Thread hughesmatt78
How could I use relative URLs when I am purposely loading from a
different domain.  Again, I need to run the Application SWF from the
filesystem and load the module from http://localhost (or some other
domain).

As far as setting the SecurityDomain.currentDomain, I have tried doing
that, only to get this error:

SecurityError: Error #2142: Security sandbox violation: local SWF
files cannot use the LoaderContext.securityDomain property.
file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swf
was attempting to load http://localhost/SimpleModuleProject.swf.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at
ModuleInfo/load()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:431]
at
ModuleInfoProxy/load()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:986]





--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Typically, you want to test in local-trusted instead of
local-with-networking and use relative paths to all assets (and have
those assets in the local filesystem).  Then when you deploy those
files to a server in the same folder configuration, everything should
just work.
 
 If you use an absolute path, then in local-trusted it is seen as a
foreign domain, and by default modules will not work unless you set
the SecurityDomain.currentDomain on the module loader.  However, that
will still set up a different topology of trust than when you deploy
and the loading app is on the same server as the module.
 
 So, only use absolute paths  if you'll always be loading the module
from a different domain.  There might be issues using
SecurityDomain.currentDomain in local-trusted sandboxes.  You can
sometimes get yourself into configurations that can only be tested
while deployed and served over http:
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of hughesmatt78
 Sent: Monday, December 15, 2008 7:33 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Loading network SWFs from SWF hosted on
filesystem (SWF is not a loadable module
 
 
 My sandbox type is local-trusted. According to the Flash Security
 white paper, local-trusted has *at least* the priviledges of
 local-with-networking.
 
 localWithNetwork: This SWF file is a local file and has not been
 trusted by the user, but it was
 published with a networking designation. This SWF may communicate with
 the Internet but may not
 read from local data sources.
 localTrusted: This SWF file is a local file and has been trusted by
 the user, using either the
 Settings Manager or a FlashPlayerTrust configuration file. This SWF
 file may both read from local
 data sources and communicate with the Internet.
 
 
 I did change it to local-with-networking, but I get the same error:
 
 Finished loading crossdomain.
 ?xml version=1.0?
 cross-domain-policy
 allow-access-from domain=* /
 /cross-domain-policy
 
 [SWF] /SimpleModuleProject.swf - 574,981 bytes after decompression
 *** Security Sandbox Violation ***
 SecurityDomain

'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf'
 tried to access incompatible context 'http://localhost/crossdomain.xml'
 *** Security Sandbox Violation ***
 SecurityDomain

'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf'
 tried to access incompatible context 'http://localhost/crossdomain.xml'
 Failed to load module
 SWF is not a loadable module
 
 Any ideas?
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex
Harui aharui@ wrote:
 
  Check your sandboxType. I'll bet it is local-trusted and not
 local-with-networking.
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of hughesmatt78
  Sent: Saturday, December 13, 2008 11:33 AM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Loading network SWFs from SWF hosted on
 filesystem (SWF is not a loadable module
 
 
  I'm trying so far in vain to load a module from a network domain from
  a SWF that was loaded via the filesystem. Every time I try and load
  the module, I get the following error:
 
  SWF is not a loadable module.
 
  I have seen this same problem discussed elsewhere on FlexCoders and
  other blogs but I am getting very conflicting views. Some people say
  this kind of module loading is not supported
  (http://www.nabble.com/Problems-using-Flex-modules-td15188446.html)
  but the Adobe Flash Player 9 Security white paper clearly indicate it
  is possible:
 
  A SWF file may also call Security.allowDomain() with the wildcard
  parameter * to 

RE: [flexcoders] Re: Anything other than a JS alert can delay a window close?

2008-12-15 Thread Maciek Sakrejda
One could hack around this by faking state, no? Have the client open a
socket to the server and the server can just manually heartbeat it so
that the connection is not dropped (the client of course must read off
and discard the heartbeats). We're doing this (and more along the same
lines) at Truviso and it works reasonably well (although there are some
pretty hideous corner-case problems with--surprise--Internet Explorer).

Doing this with URLStream (the way we do) will count a connection
against your total open limit (discussed in a number of places; e.g.,
here:
http://www.openajax.org/runtime/wiki/The_Two_HTTP_Connection_Limit_Issue ). 
Note also that maintaining an open connection (and more importantly, a thread) 
per client is not very efficient, and may not be appropriate for all setups.

Doing this with a raw Socket should also be possible (though you'd need
an open port), would avoid the connection limit issue, and (I'm pretty
sure) would be more scalable.

Also, you may need to deal with temporary disconnections when the socket
connection fails, but the client is still there. For us, we just
disconnect the client entirely and try to reconnect with a fresh start,
but that might be less than ideal.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Seth Hodgson shodg...@adobe.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Anything other than a JS alert can delay a
window close?
Date: Mon, 15 Dec 2008 11:40:24 -0800

HTTP session timeout at the server is the only sure-fire way to detect a
client has left. Catching Javascript events at the client and attempting
to notify the server may shortcut this process _when_ it works - but it
provides no guarantees that it will. Even if your Javascript is able to
put a request onto the network or get Flash to issue a request via
ExternalInterface before the browser closes, the notification over the
network could be lost, for instance if an intermediate router crashes.

Depending on the behavior of your app, you can shorten this time
interval by lowering your session timeout in web.xml.

If you're trying to detect the client leaving specific pages this is
more difficult with HTTP because your connection (i.e. session) spans
all the pages of your site that are loaded in the browser process. When
the session times out, you could treat this as a leave for all pages
the client has viewed during its session.

For RTMP (not available in BlazeDS) because we're dealing with a
stateful connection (unlike HTTP where connections are stateless) as
soon as the RTMP connection closes when the user closes their browser or
navigates away from a page containing your Flex app, we detect that and
you can respond to this event on the server.

In this case, if different pages contain individual swfs that you're
tracking, as soon as the client leaves a page and the connection closes
you can track that directly.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Wednesday, December 10, 2008 5:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Anything other than a JS alert can delay a
window close?

Another idea...

How about setting up a timer in Flex to poll the server. If the server
does not receive the poll in a certain amount of time then the client
has disconnected and you can write the data to the database.

It may work even better with BlazeDS (I don't know this - I'm kinda
hoping it works). Hopefully you can tell if a client disconnects from
something they have subscribed to via RTMP. Does anyone know?




 




[flexcoders] Flex dates and time zones.

2008-12-15 Thread Paul Kukiel
I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time zone
issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
really just wan the exact date from the database regardless of where I am in
the world.

Any ideas?


// Label Grid Date
public static function labelGridDate(item:Object,
column:DataGridColumn):String {
var formatter:DateFormatter = new DateFormatter();
var myDate:Date = item[column.dataField];
formatter.formatString = DD MMM ;

var offsetMilliseconds:Number =
item[column.dataField].getTimezoneOffset() * 60 * 1000;
item[column.dataField].setTime(item[column.dataField].getTime()
+ offsetMilliseconds);

return formatter.format(item[column.dataField]);
}

Paul.


[flexcoders] Should I be able to load a .fxg file as XML?

2008-12-15 Thread Mic
public var myXML:XML = new XML();
public var XML_URL:String = ../xml/FlowerPower4.fxg;
public var myXMLURL:URLRequest = new URLRequest(XML_URL);
public var myLoader:URLLoader = new URLLoader(myXMLURL);


myLoader.addEventListener(complete, xmlLoaded);

private function xmlLoaded(event:Event):void
{
   myXML = XML(myLoader.data);
   trace(Data loaded.);
}

Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
XML file? TIA,

Mic.



[flexcoders] How to change two level parent currentstate?

2008-12-15 Thread markflex2007

I did this but I get error.Please help me.

this.parentApplication.parentApplication.currentState = 'test1'

Thanks

Mark



[flexcoders] Re: mxml compiler on linux

2008-12-15 Thread Deniz Davutoglu

Thank you very much Maciek,
it realy sove my problem just with one exception you need to add :$PATH
in end of the line other wise it resets your entire path variables.

Correct : PATH=/usr/lib/Adobe_Flex_Builder/sdks/4.0/bin:$PATH; 
wrong : PATH=$PATH:/usr/lib/Adobe_Flex_Builder/sdks/4.0/bin; 

Thanks.

Deniz


Posted by: Maciek Sakrejda msakre...@truviso.com 

Mon Dec 15, 2008 9:13 am (PST) 

It looks like mxmlc is not in your path. Try running 'which mxmlc' from
a terminal--that will tell you where it is if it *is* in your path (and
just won't print anything if it isn't). If it's not, set your PATH=
$PATH:$FLEX_HOME/bin, where $FLEX_HOME is the full path to your Flex sdk
(e.g., if you have FB3-alpha4 installed, it's under sdks/3.0.0).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Deniz Davutoglu d...@7ist.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mxml compiler on linux
Date: Mon, 15 Dec 2008 19:03:23 +0200

Hi Everyone,
I try to build some app which use mxml compiler. in windows everything
is ok when I compile .as file with mxmlc it creates swf file, but in
Linux when I try to compile same .as file wit mxmlc it cast me error
command not found. I checked all permissions and ownership are ok.
Does any one have experience to use sdk in linux?

thanks 




[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread ozziegt
Thanks for all the replies. Yeah I thought about it over lunch and it
occurred to me that I might only get the params when I reference the
.swf file directly. I think I will stick with my current
implementation using swfobject. 


--- In flexcoders@yahoogroups.com, ozziegt osman.ul...@... wrote:

 I feel kind of stupid asking this, but I have been beating my head
 against the wall and I know I am missing something obvious.
 
 I created a sample app here (you can view source on it):
 http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
 
 You will notice there are no URL parameters being reported by the
 application. The code is pretty basic, so I don't know what I am
 missing. This is a brand new sample app...I created it, added a few
 lines of code, and that is it. Any ideas? 
 
 Thanks
 
 private function showParams():void
 {
   var params:Object = Application.application.parameters;
   var s:String = Params: \n;
   params.runtime = added in code;
   for (var key:String in params)
   {
   s += key +: + params[key] + \n;
   }
   txt.text = s;
 }





[flexcoders] Re: Creating an URL to a subsection of UI

2008-12-15 Thread ozziegt
Thanks.

Since I am using swfobject, I am going to also use swfaddress, and
maybe use the wrapper to BrowserManager found here:
http://developer.iconara.net/objectlib/flex-browsermanager-swfaddress.html

My question now is whether or not there is a benefit in using
BrowserManager instead of using swfaddress directly?

Thanks

--- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote:

 Check out:

http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Deep_Linking
 Cheers,
 Nate
 
 On Mon, Dec 15, 2008 at 7:53 AM, ozziegt osman.ul...@... wrote:
 
I have a pretty complicated UI with 2-3 layers of tab-like
navigation.
  So imagine if you will, a top level menu of 3-4 items, and then under
  each of those another submenu of a few items. I want to be able to
  create an URL to point to one of those subitems. Is there any way to
  do this in flex?
 
  Currently what I am planning on doing is taking an url parameter which
  specifies the destination and then using that to manipulate the UI and
  show the page I need to show. But I wanted to make sure there wasn't a
  built-in or better way to do it.
 
  Thanks
 
   
 





[flexcoders] Re: Anything other than a JS alert can delay a window close?

2008-12-15 Thread ozziegt
We have had success in onBeforeUnload, make the final request, and
then in onUnload, create a 500ms loop in JS which gives the networking
layer enough time to put the request on the wire before the flash is
torn down. 

This was for a logout call, and it worked pretty well except in Safari
(it might work on safari now, I am not sure). Since it was only a
logout call and we had a timeout after 30 seconds anyway, it was not a
huge issue if it was not 100% successful. But in practice it works
pretty well.

It's one of those crazy ideas that you just do if you absolutely need
to. I think gmail might do the same thing for gchat; if you close a
gmail window you will notice a slight delay. I haven't looked at their
code though so I don't know for sure.



--- In flexcoders@yahoogroups.com, wkolcz wko...@... wrote:

 Pretty much what I asked in the subject line. I need Flash to submit
to a database before the window closes and the flash instance dies. 
 
 Don't think that a pop up (alert) is an option for our sites. 
 
 Using JS and ExternalInterface to communicate with flash (AS) to
push to a HTTPRequest data to insert.
 
 ANY ideas? Any?





RE: [flexcoders] Re: Loading network SWFs from SWF hosted on filesystem (SWF is not a loadable module

2008-12-15 Thread Alex Harui
I was unclear you needed to load from different domains.  I don't know how you 
would get your current configuration to work when deployed over HTTP unless the 
module and main swf were on the same domain, and in such a case, relative URLs 
would be better.

I think you are caught in one of those scenarios I described.  In order to use 
cross-domain modules, you need to set SecurityDomain.currentDomain and thus can 
only test when deployed over HTTP.  For security reasons, cross-domain modules 
is not a common configuration.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of hughesmatt78
Sent: Monday, December 15, 2008 11:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Loading network SWFs from SWF hosted on filesystem 
(SWF is not a loadable module


How could I use relative URLs when I am purposely loading from a
different domain. Again, I need to run the Application SWF from the
filesystem and load the module from http://localhost (or some other
domain).

As far as setting the SecurityDomain.currentDomain, I have tried doing
that, only to get this error:

SecurityError: Error #2142: Security sandbox violation: local SWF
files cannot use the LoaderContext.securityDomain property.
file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf
was attempting to load http://localhost/SimpleModuleProject.swf.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at
ModuleInfo/load()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:431]
at
ModuleInfoProxy/load()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\modules\ModuleManager.as:986]

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
Harui aha...@... wrote:

 Typically, you want to test in local-trusted instead of
local-with-networking and use relative paths to all assets (and have
those assets in the local filesystem). Then when you deploy those
files to a server in the same folder configuration, everything should
just work.

 If you use an absolute path, then in local-trusted it is seen as a
foreign domain, and by default modules will not work unless you set
the SecurityDomain.currentDomain on the module loader. However, that
will still set up a different topology of trust than when you deploy
and the loading app is on the same server as the module.

 So, only use absolute paths if you'll always be loading the module
from a different domain. There might be issues using
SecurityDomain.currentDomain in local-trusted sandboxes. You can
sometimes get yourself into configurations that can only be tested
while deployed and served over http:

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of hughesmatt78
 Sent: Monday, December 15, 2008 7:33 AM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Loading network SWFs from SWF hosted on
filesystem (SWF is not a loadable module


 My sandbox type is local-trusted. According to the Flash Security
 white paper, local-trusted has *at least* the priviledges of
 local-with-networking.

 localWithNetwork: This SWF file is a local file and has not been
 trusted by the user, but it was
 published with a networking designation. This SWF may communicate with
 the Internet but may not
 read from local data sources.
 localTrusted: This SWF file is a local file and has been trusted by
 the user, using either the
 Settings Manager or a FlashPlayerTrust configuration file. This SWF
 file may both read from local
 data sources and communicate with the Internet.
 

 I did change it to local-with-networking, but I get the same error:

 Finished loading crossdomain.
 ?xml version=1.0?
 cross-domain-policy
 allow-access-from domain=* /
 /cross-domain-policy

 [SWF] /SimpleModuleProject.swf - 574,981 bytes after decompression
 *** Security Sandbox Violation ***
 SecurityDomain

'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swffile:///file:///localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf'
 tried to access incompatible context 'http://localhost/crossdomain.xml'
 *** Security Sandbox Violation ***
 SecurityDomain

'file://localhost/Users/mhughes/work/ccad/workspace/AwesomeProject/bin-debug/AwesomeProject.swffile:///\\localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swffile:///file:///localhost\Users\mhughes\work\ccad\workspace\AwesomeProject\bin-debug\AwesomeProject.swf'
 tried to access incompatible context 'http://localhost/crossdomain.xml'
 Failed to load module
 SWF is not a loadable module

 Any ideas?

 --- In

RE: [flexcoders] Should I be able to load a .fxg file as XML?

2008-12-15 Thread Alex Harui
What error did you get?

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Mic
Sent: Monday, December 15, 2008 12:31 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Should I be able to load a .fxg file as XML?


public var myXML:XML = new XML();
public var XML_URL:String = ../xml/FlowerPower4.fxg;
public var myXMLURL:URLRequest = new URLRequest(XML_URL);
public var myLoader:URLLoader = new URLLoader(myXMLURL);

myLoader.addEventListener(complete, xmlLoaded);

private function xmlLoaded(event:Event):void
{
myXML = XML(myLoader.data);
trace(Data loaded.);
}

Doesn't work ... should it? :-) i.e. can a .fxg file be treated as an
XML file? TIA,

Mic.



RE: [flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread Alex Harui
Checkout BrowserManager.  You may want to use it elsewhere in your app.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of ozziegt
Sent: Monday, December 15, 2008 11:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Application.application.parameters doesn't hold GET 
query parameters


Thanks for all the replies. Yeah I thought about it over lunch and it
occurred to me that I might only get the params when I reference the
.swf file directly. I think I will stick with my current
implementation using swfobject.

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
ozziegt osman.ul...@... wrote:

 I feel kind of stupid asking this, but I have been beating my head
 against the wall and I know I am missing something obvious.

 I created a sample app here (you can view source on it):
 http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar

 You will notice there are no URL parameters being reported by the
 application. The code is pretty basic, so I don't know what I am
 missing. This is a brand new sample app...I created it, added a few
 lines of code, and that is it. Any ideas?

 Thanks

 private function showParams():void
 {
 var params:Object = Application.application.parameters;
 var s:String = Params: \n;
 params.runtime = added in code;
 for (var key:String in params)
 {
 s += key +: + params[key] + \n;
 }
 txt.text = s;
 }




Re: [flexcoders] Re: mxml compiler on linux

2008-12-15 Thread Maciek Sakrejda
Both ways should work (unless you've got some supremely weird shell).
One way prepends the sdk bin directory to the path, the other appends it
(so, for example, if you already had another executable named mxmlc in
your path, the first would pick the Flex mxmlc, and the other would use
the existing mxmlc). But glad you got it working.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Deniz Davutoglu d...@7ist.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: mxml compiler on linux
Date: Mon, 15 Dec 2008 22:46:31 +0200



Thank you very much Maciek,
it realy sove my problem just with one exception you need to add :$PATH
in end of the line other wise it resets your entire path variables.

Correct : PATH=/usr/lib/Adobe_Flex_Builder/sdks/4.0/bin:$PATH; 
wrong : PATH=$PATH:/usr/lib/Adobe_Flex_Builder/sdks/4.0/bin; 

Thanks.

Deniz




Posted by: Maciek Sakrejda msakre...@truviso.com 
Mon Dec 15, 2008 9:13 am (PST) 
It looks like mxmlc is not in your path. Try running 'which mxmlc' from
a terminal--that will tell you where it is if it *is* in your path (and
just won't print anything if it isn't). If it's not, set your PATH=
$PATH:$FLEX_HOME/bin, where $FLEX_HOME is the full path to your Flex sdk
(e.g., if you have FB3-alpha4 installed, it's under sdks/3.0.0).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Deniz Davutoglu d...@7ist.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mxml compiler on linux
Date: Mon, 15 Dec 2008 19:03:23 +0200

Hi Everyone,
I try to build some app which use mxml compiler. in windows everything
is ok when I compile .as file with mxmlc it creates swf file, but in
Linux when I try to compile same .as file wit mxmlc it cast me error
command not found. I checked all permissions and ownership are ok.
Does any one have experience to use sdk in linux?

thanks 




 




[flexcoders] French accents in resource bundles not showing up

2008-12-15 Thread Wildbore, Brendon
Hi all,

I have an application which uses resource bundles to change the languages 
dynamically.

I'm having issues with special characters in the French language like ê ç etc 
showing up as empty little square boxes.


I have seen an example where the characters ç are entered in a resource 
bundle to produce the ç character in a flex label.



Question is, where do I find out the rest of these funky codes to produce the 
same result for the other characters?


Regards,


Brendon





Re: [flexcoders] French accents in resource bundles not showing up

2008-12-15 Thread ivo
I had a similar behavior but it cleared up after I verified that the target 
system had a font installed that could display the accented characters.

- Ivo





From: Wildbore, Brendon b.j.wildb...@massey.ac.nz
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Monday, December 15, 2008 3:31:01 PM
Subject: [flexcoders] French accents in resource bundles not showing up


Hi all,
 
I have an application which uses resource bundles to change
the languages dynamically.
 
I’m having issues with special characters in the
French language like ê ç etc showing up
as empty little square boxes.
 
I have seen an example where the characters “ç” are entered in a resource 
bundle to produce the ç character in a flex label.
  
Question is, where do I find out the rest of these funky codes to produce the 
same result for the other characters?
 
 
Regards,
 
 
Brendon
 
 
 

RE: [flexcoders] Re: Disable Runtime Binding Warnings

2008-12-15 Thread Tracy Spratt
Just as an FYI, I am using that binding syntax in many places without
any warnings.

 

Oh, and in case it has not been said you cannot bind to an XMLList.
This will not work:

[Bindable] private var _areas:XMLList;

 

Make it an XMLListCollection.

 

Tracy



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alex Harui
Sent: Monday, December 15, 2008 1:58 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Disable Runtime Binding Warnings

 

So uncomment that line or change it to return a known bindable variable
and see if the warning goes away.  I would have thought the error would
have @title instead of title in it.

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of stoff0
Sent: Monday, December 15, 2008 2:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Disable Runtime Binding Warnings

 

ar1 is a repeater. sorry, should have been more thorough with my
example:

[Bindable] private var _areas:XMLList;

mx:Repeater id=ar1 dataProvider={_areas}
spr:SubsectionText text={XML(ar1.currentItem)@title} /
/mx:Repeater

nope, i don't care if any changes ever get picked up in this case.
although, the crazy thing is changes do get picked up (i've tried this
before). 

i am positive the warning is coming from this line (and many other
lines like it).

i also want to mention that i have definitely thought of putting this
an arraylist and/or making custom data model out of the xml, but it
seems kind of ridiculous when all of the data is right there. yeah,
i'll get introspection, but i'll also end up with a ton more code and
a bigger hassle to maintain.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui aha...@... wrote:

 What is ar1? What is currentItem? Are you sure that line is the
one kicking the warning? Do you care that if @title does change that
your code may not pick it up?
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
]
On Behalf Of stoff0
 Sent: Sunday, December 14, 2008 9:22 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Disable Runtime Binding Warnings
 
 
 this doesn't seem to take away the warnings. for instance, the warning
 i'm getting is this:
 
 warning: unable to bind to property 'title' on class 'XML' (class is
 not an IEventDispatcher)
 
 doing this:
 
 spr:SubsectionText text={XML(ar1.currentItem)@title} width=100%
/
 
 makes no difference as compared to this:
 
 spr:SubsectionText text={ar1.currentit...@title} width=100% /
 
 (spr is a custom component i made)
 
 either way, there should be away to just disable these warnings. the
 code is performing fine otherwise.
 
 anyone have any ideas?
 
 --- In
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com,
Tracy Spratt tspratt@ wrote:
 
  Those warnings are correctable.
 
 
 
  Wrap the node expression, which is probably currentItem or data, or
  selectedItem which are objects, in the XML() function.
 
 
 
  text={XML(myDG.selectedItem).myNode.text()}
 
 
 
  Tracy
 
 
 
  
 
  From:
flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com]
On
  Behalf Of stoff0
  Sent: Tuesday, December 09, 2008 7:58 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Disable Runtime Binding Warnings
 
 
 
  Is there anyway to stop binding warnings (or all warnings from being
  logged to the console)? I've tried to turn off warnings with
compiler
  arguments like:
 
  -compiler.show-binding-warnings=false
  -warnings=false
 
  I also tried unchecking enable warnings checkbox in flex builder.
 
  It looks like none of these have an effect on runtime warnings
  (warnings that get logged to the console)
 
  For some background the reason I'm attempting this is because I'm
  getting about 200 warnings on some xml binding and it's really
slowing
  things down for me and probably everyone with the debug player.
 
  Thanks!
 


 



RE: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Tracy Spratt
Pass the date as a string.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Monday, December 15, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex dates and time zones.

 

I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time zone
issue but my date always comes back to me as 21/12/2008 in the datagrid.
I really just wan the exact date from the database regardless of where I
am in the world.

Any ideas?


// Label Grid Date
public static function labelGridDate(item:Object,
column:DataGridColumn):String {
var formatter:DateFormatter = new DateFormatter();
var myDate:Date = item[column.dataField];
formatter.formatString = DD MMM ;

var offsetMilliseconds:Number =
item[column.dataField].getTimezoneOffset() * 60 * 1000;
 
item[column.dataField].setTime(item[column.dataField].getTime() +
offsetMilliseconds);

return formatter.format(item[column.dataField]);
}

Paul.



 



[flexcoders] How would I Overwrite contents of External XML File

2008-12-15 Thread anuj181
Hi All
I am working on change password option for the user, I am reading
password content from external XML Files and then depending upon the
added value I need to overwrite the external XML's files passsword
entry. I am using following code for changing it but it is not
working, My XML file is in the external folder but withtin the same
project and this is one of the component which i am calling on click
of some button. I need to overwrite data in Login.xml which is stored
in Private folder as the separate folder in my project, Reading from
thh xml file is no problem but writing back is an issue,
Does anyone know where I am screwing things up?

Many Many Thanks for your help
Anuj
//My XML
?xml version=1.0 encoding=utf-8?
Users
user
id1/id
userNameasasasd/userName
passwordasasd123/password
securityQuestionTest Security Question/securityQuestion
answerSecurityQuestion/answerSecurityQuestion
/user
/Users


/CODE***/

mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; 
creationComplete=init(); 
 horizontalScrollPolicy=off verticalScrollPolicy=off
public function init():void
{
var getPassword:URLRequest=new 
URLRequest(Private/Login.xml); 
passwordLoader = new URLLoader();  
  
try 
{
passwordLoader.load(getPassword);   
}
catch (error:SecurityError)
{
trace(SecurityError has occurred while loading 
password);
}

passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword);
}

//ChangePassword

 public function changePassword(evt:MouseEvent):void
 {

if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)||

(txt_Security_Question.text==)||(txt_Security_Answer.text==))
{
Alert.show(Please Check the values 
entered. They cannot be
null); 
}
else 
if(txt_Enter_Password.text!=txt_ReEnter_Password.text)
{
Alert.show(Passwords do not match);
}
else
{

externalXMLPassword.user.password=txt_Enter_Password.text;

externalXMLPassword.user.securityQuestion=txt_Security_Question.text;

externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text;

}
 }

mx:Button x=630 y=402 label=Save click=changePassword(event);/



Re: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Nate Beck
I'm working on timezone support within flash that I'm going to release as
open source very soon.  I'll update this thread when I do.
But Tracy is right, you can always just pass a string from the server.

On Mon, Dec 15, 2008 at 4:46 PM, Tracy Spratt tspr...@lariatinc.com wrote:

Pass the date as a string.

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Monday, December 15, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Flex dates and time zones.



 I have a date in a server in Australia:  22/12/2008 12:00:00 AM

 I am using this label function for the grid to try and fix the time zone
 issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
 really just wan the exact date from the database regardless of where I am in
 the world.

 Any ideas?


 // Label Grid Date
 public static function labelGridDate(item:Object,
 column:DataGridColumn):String {
 var formatter:DateFormatter = new DateFormatter();
 var myDate:Date = item[column.dataField];
 formatter.formatString = DD MMM ;

 var offsetMilliseconds:Number =
 item[column.dataField].getTimezoneOffset() * 60 * 1000;
 item[column.dataField].setTime(item[column.dataField].getTime()
 + offsetMilliseconds);

 return formatter.format(item[column.dataField]);
 }

 Paul.





Re: [flexcoders] Test-driven development in Flex

2008-12-15 Thread Josh McDonald
Hi Gregor,

I've recently started to implement FlexUnit myself (not tweaked yet, but it
will be) - I'd like to hear about your experiences with FlexCover when
you've played with it a bit, as I'm interested in adding it to my workflow
but the documentation is a little lacking I think. Any chance you have a
blog where you'll be posting about it?

Cheers,
-Josh

On Tue, Dec 16, 2008 at 3:21 AM, Gregor Kiddie gkid...@inpses.co.uk wrote:

  1. We use FlexUnit for our development (well, a tweaked version of
 FlexUnit) and I'm in the process of adding FlexCover to that. We use test
 first as a guiding principle when writing code.

 2. Our general architecture and therefore designs are geared to helping us
 test the business logic that is written.

 3. We've pulled way back from Cairngorm and rolled our own, one of the
 contributing decisions for this was the problems in testing Cairngorm apps.



 Gk.

 *Gregor Kiddie*
 Senior Developer
 *INPS*

 Tel:   01382 564343

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

 Registered Number: 1788577

 Registered in the UK

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

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

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Errol Thompson
 *Sent:* 15 December 2008 16:49
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Test-driven development in Flex



 I am fairly new to Flex but have a reasonable amount of experience with
 test-driven development in Java and .NET.



 I have been told that test-driving Flex development is not possible. I am
 not convinced as I have been told similar things on other projects in the
 past and then proven that they are possible.



 I am wondering:



 1) How many people actually use a testing framework (FlexUnit, Fluint,
 FUnit, AsUnit) when doing Flex development?



 2) Does using a testing framework change the way that you structure your
 Flex applications?



 3) How many use test-driven development with the Cairngorm framework?



 -
 Errol Thompson
 Kiwi-ET Computing Education Research
 Wellington, New Zealand
 Phone: +64 21 210 1662
 E-Mail: kiwiet (at) acm.org
 kiwiet (at) computer.org
 Web: www.thompsonz.net
 -

 




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

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


RE: [flexcoders] How would I Overwrite contents of External XML File

2008-12-15 Thread Wildbore, Brendon
Im not 100% sure, but I don't believe flex can write to the server directly. 
You will most likely have to employ a server side http service to achieve this.

Also if you are going to be storing sensitive info in an xml file, you should 
encrypt the passwords and security answers


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of anuj181
Sent: Tuesday, 16 December 2008 1:37 p.m.
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How would I Overwrite contents of External XML File


Hi All
I am working on change password option for the user, I am reading
password content from external XML Files and then depending upon the
added value I need to overwrite the external XML's files passsword
entry. I am using following code for changing it but it is not
working, My XML file is in the external folder but withtin the same
project and this is one of the component which i am calling on click
of some button. I need to overwrite data in Login.xml which is stored
in Private folder as the separate folder in my project, Reading from
thh xml file is no problem but writing back is an issue,
Does anyone know where I am screwing things up?

Many Many Thanks for your help
Anuj
//My XML
?xml version=1.0 encoding=utf-8?
Users
user
id1/id
userNameasasasd/userName
passwordasasd123/password
securityQuestionTest Security Question/securityQuestion
answerSecurityQuestion/answerSecurityQuestion
/user
/Users

/CODE***/

mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=init();
horizontalScrollPolicy=off verticalScrollPolicy=off
public function init():void
{
var getPassword:URLRequest=new URLRequest(Private/Login.xml);
passwordLoader = new URLLoader();

try
{
passwordLoader.load(getPassword);
}
catch (error:SecurityError)
{
trace(SecurityError has occurred while loading password);
}

passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword);
}

//ChangePassword

public function changePassword(evt:MouseEvent):void
{
if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)||
(txt_Security_Question.text==)||(txt_Security_Answer.text==))
{
Alert.show(Please Check the values entered. They cannot be
null);
}
else if(txt_Enter_Password.text!=txt_ReEnter_Password.text)
{
Alert.show(Passwords do not match);
}
else
{
externalXMLPassword.user.password=txt_Enter_Password.text;

externalXMLPassword.user.securityQuestion=txt_Security_Question.text;

externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text;

}
}

mx:Button x=630 y=402 label=Save click=changePassword(event);/



[flexcoders] OutOfMemory without using allocated memory?

2008-12-15 Thread Maciek Sakrejda
My colleague is hitting an OutOfMemory error when building an
application library with compc from ant. We've previously had to set the
fork attribute to true (as suggested here and there for OutOfMemory
errors) and set the maxmemory attribute to 512m. However, now he's
getting the error again, and the machine reports this before getting
anywhere near the max: he uses ~100MB and then the compc task fails.
He's using about 1/2 of 4GB of memory total. Any ideas? This is a 64-bit
Windows Server 2003 system with Flex SDK 3.0.0. The weirdest part is
that this still *seems* to produce a working .swc, but I'm (I hope
understandably) somewhat wary of it.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] Re: Custom event--please help me

2008-12-15 Thread Josh McDonald
Don't call new EventDispatcher(), it won't be any real use. The main
reason you would want to create an instance of EventDispatcher itself is
when you're building a class that is an IEventDispatcher, but inherits from
a base class that is not an IEventDispatcher, because we don't have multiple
inheritance in AS3. When you do that, you need to use something like:

private var myEventDispatcher : IEventDispatcher  = new
EventDispatcher(this);

and then you proxy all your implementations of IEventDispatcher methods to
use that, ie:

public function dispatchEvent(event:Event):Boolean
{
return myEventDispatcher.dispatchEvent(event);
}

But the important part is that you create it with the (this) parameter so
the internal stuff knows who is actually the dispatcher of the event in
question, which is important in order to perform the bubble and capture
stages. Without it, nobody will ever be able to catch the events without
having a reference to the instance of EventDispatcher that you create, as it
will have no ties to the object that created it, and it cannot be added to
the display list.

-Josh

On Mon, Dec 15, 2008 at 10:38 PM, nathanleewei nathanlee...@yahoo.comwrote:

 BasePanel uses another EventDispatcher instance which is inherit from
 UIComponent.


 So U can try
 var basePanel:BasePanel = your BasePanel instance;
 basePanel.dispatchEvent(ev);

 instead

 var dipsatcher:EventDispatcher = new EventDispatcher();
 dispatcher.dispatchEvent(ev);

 And U should have a look at;
 http://tech.groups.yahoo.com/group/flexcoders/message/66101
 http://www.helihobby.com/html/alon_desingpattern.html
 also CairngormEventDispatcher


 --- In flexcoders@yahoogroups.com, lorenzo.boaro lore...@...
 wrote:
 
  Hi
 
  i've a problem..anibody can help me?
 
  i created this class:
 
  public class CompleteEvent extends Event
{
private var array:ArrayCollection
 
public function CompleteEvent(type:String,
 array:ArrayCollection)
{
super(type);
this.array = array;
}
 
public override function clone():Event {
return new CompleteEvent(type, array);
}
  }
 
  the main class create the array through a socket connection within
 the
  socket listeners for Socket.DATA...in the method listeners dispatch
  the event...
 
  [Event(name=newEvent, type=CompleteEvent)]
 
  public class MainApp{
  
  socket.addEventListeners(ProgressEvent.SOCKET_DATA, socketData);
  ...
  private function socketData(event:Event):void {
 
  ...some code to create array from server data...
//dispatch event
  var dipsatcher:EventDispatcher = new EventDispatcher();
  var ev:CompleteEvent = new CompleteEvent(newEvent, array);
 
  dispatcher.dispatchEvent(ev);
}
  }
 
  and this other class listens for the event
 
  public class BasePanel extends Panel
{
 
private function dataEventHandler():void {
trace(Array retrieved);
}
 
public function BasePanel()
{
super();
this.addEventListener(newEvent,
 dataEventHandler);
}
  }
 
  but not working the BasePanel class doesn't listen for the event..
 
  thanks a lot
 
  Regards
  Lorenzo
 




 

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






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

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] How would I Overwrite contents of External XML File

2008-12-15 Thread anuj sharma
Hi Brendon
We are working on the encryption part but do you think it is not possible to
overwrite stuff on server with Flex. If thats the case i  have used amfPHP
for tarnsferring data to server, then do you think amfPHP is the only option
i left with I guess right.
Any other guidance will be apprecited too , Also if you have better
links/info about encryption of password on the server that will be helpful
too
Thanks
Anuj

On Mon, Dec 15, 2008 at 4:52 PM, Wildbore, Brendon 
b.j.wildb...@massey.ac.nz wrote:

Im not 100% sure, but I don't believe flex can write to the server
 directly. You will most likely have to employ a server side http service to
 achieve this.



 Also if you are going to be storing sensitive info in an xml file, you
 should encrypt the passwords and security answers


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *anuj181
 *Sent:* Tuesday, 16 December 2008 1:37 p.m.
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] How would I Overwrite contents of External XML
 File



 Hi All
 I am working on change password option for the user, I am reading
 password content from external XML Files and then depending upon the
 added value I need to overwrite the external XML's files passsword
 entry. I am using following code for changing it but it is not
 working, My XML file is in the external folder but withtin the same
 project and this is one of the component which i am calling on click
 of some button. I need to overwrite data in Login.xml which is stored
 in Private folder as the separate folder in my project, Reading from
 thh xml file is no problem but writing back is an issue,
 Does anyone know where I am screwing things up?

 Many Many Thanks for your help
 Anuj
 //My XML
 ?xml version=1.0 encoding=utf-8?
 Users
 user
 id1/id
 userNameasasasd/userName
 passwordasasd123/password
 securityQuestionTest Security Question/securityQuestion
 answerSecurityQuestion/answerSecurityQuestion
 /user
 /Users

 /CODE***/

 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
 creationComplete=init();
 horizontalScrollPolicy=off verticalScrollPolicy=off
 public function init():void
 {
 var getPassword:URLRequest=new URLRequest(Private/Login.xml);
 passwordLoader = new URLLoader();

 try
 {
 passwordLoader.load(getPassword);
 }
 catch (error:SecurityError)
 {
 trace(SecurityError has occurred while loading password);
 }

 passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword);
 }

 //ChangePassword

 public function changePassword(evt:MouseEvent):void
 {
 if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)||
 (txt_Security_Question.text==)||(txt_Security_Answer.text==))
 {
 Alert.show(Please Check the values entered. They cannot be
 null);
 }
 else if(txt_Enter_Password.text!=txt_ReEnter_Password.text)
 {
 Alert.show(Passwords do not match);
 }
 else
 {
 externalXMLPassword.user.password=txt_Enter_Password.text;

 externalXMLPassword.user.securityQuestion=txt_Security_Question.text;

 externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text;

 }
 }

 mx:Button x=630 y=402 label=Save click=changePassword(event);/

  



RE: [flexcoders] How would I Overwrite contents of External XML File

2008-12-15 Thread Wildbore, Brendon
Hi Anuj,

All the investigation I have done points to it not being possible in flex 
(non-air flex). So amfPHP is a logical option for you, especially if you have 
already had experience with it.

Cheers
Brendon


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of anuj sharma
Sent: Tuesday, 16 December 2008 2:01 p.m.
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How would I Overwrite contents of External XML File


Hi Brendon
We are working on the encryption part but do you think it is not possible to 
overwrite stuff on server with Flex. If thats the case i  have used amfPHP for 
tarnsferring data to server, then do you think amfPHP is the only option i left 
with I guess right.
Any other guidance will be apprecited too , Also if you have better links/info 
about encryption of password on the server that will be helpful too
Thanks
Anuj
On Mon, Dec 15, 2008 at 4:52 PM, Wildbore, Brendon 
b.j.wildb...@massey.ac.nzmailto:b.j.wildb...@massey.ac.nz wrote:

Im not 100% sure, but I don't believe flex can write to the server directly. 
You will most likely have to employ a server side http service to achieve this.



Also if you are going to be storing sensitive info in an xml file, you should 
encrypt the passwords and security answers





From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of anuj181
Sent: Tuesday, 16 December 2008 1:37 p.m.
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] How would I Overwrite contents of External XML File



Hi All
I am working on change password option for the user, I am reading
password content from external XML Files and then depending upon the
added value I need to overwrite the external XML's files passsword
entry. I am using following code for changing it but it is not
working, My XML file is in the external folder but withtin the same
project and this is one of the component which i am calling on click
of some button. I need to overwrite data in Login.xml which is stored
in Private folder as the separate folder in my project, Reading from
thh xml file is no problem but writing back is an issue,
Does anyone know where I am screwing things up?

Many Many Thanks for your help
Anuj
//My XML
?xml version=1.0 encoding=utf-8?
Users
user
id1/id
userNameasasasd/userName
passwordasasd123/password
securityQuestionTest Security Question/securityQuestion
answerSecurityQuestion/answerSecurityQuestion
/user
/Users

/CODE***/

mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=init();
horizontalScrollPolicy=off verticalScrollPolicy=off
public function init():void
{
var getPassword:URLRequest=new URLRequest(Private/Login.xml);
passwordLoader = new URLLoader();

try
{
passwordLoader.load(getPassword);
}
catch (error:SecurityError)
{
trace(SecurityError has occurred while loading password);
}

passwordLoader.addEventListener(Event.COMPLETE,getAlreadySetPassword);
}

//ChangePassword

public function changePassword(evt:MouseEvent):void
{
if((txt_Enter_Password.text==)||(txt_ReEnter_Password.text==)||
(txt_Security_Question.text==)||(txt_Security_Answer.text==))
{
Alert.show(Please Check the values entered. They cannot be
null);
}
else if(txt_Enter_Password.text!=txt_ReEnter_Password.text)
{
Alert.show(Passwords do not match);
}
else
{
externalXMLPassword.user.password=txt_Enter_Password.text;

externalXMLPassword.user.securityQuestion=txt_Security_Question.text;

externalXMLPassword.user.answerSecurityQuestion=txt_Security_Answer.text;

}
}

mx:Button x=630 y=402 label=Save click=changePassword(event);/




RE: [flexcoders] French accents in resource bundles not showing up

2008-12-15 Thread Wildbore, Brendon
Hi Ivo,

Thanks for that. I can confirm that the system I am testing on can display the 
characters, but for some reason is not when I pull it from the resource 
bundle... it's a real puzzler.


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of ivo
Sent: Tuesday, 16 December 2008 1:17 p.m.
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] French accents in resource bundles not showing up

I had a similar behavior but it cleared up after I verified that the target 
system had a font installed that could display the accented characters.

- Ivo


From: Wildbore, Brendon b.j.wildb...@massey.ac.nz
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Sent: Monday, December 15, 2008 3:31:01 PM
Subject: [flexcoders] French accents in resource bundles not showing up
Hi all,

I have an application which uses resource bundles to change the languages 
dynamically.

I'm having issues with special characters in the French language like ê ç etc 
showing up as empty little square boxes.


I have seen an example where the characters ç are entered in a resource 
bundle to produce the ç character in a flex label.



Question is, where do I find out the rest of these funky codes to produce the 
same result for the other characters?


Regards,


Brendon






Re: [flexcoders] French accents in resource bundles not showing up

2008-12-15 Thread Paul Hastings
Wildbore, Brendon wrote:
 Thanks for that. I can confirm that the system I am testing on can 
 display the characters, but for some reason is not when I pull it from 
 the resource bundle… it’s a real puzzler.

when you open the rb in notepad or whatever, can you read the text? btw the rb 
encoding's supposed to be utf-8.


RE: [flexcoders] French accents in resource bundles not showing up

2008-12-15 Thread Wildbore, Brendon
You're awesome! Thanks a bunch... I had tried to change the encoding previously 
but it worked this time...
I just needed to retype the text with the accents.

Thanks again


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Paul Hastings
Sent: Tuesday, 16 December 2008 2:44 p.m.
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] French accents in resource bundles not showing up


Wildbore, Brendon wrote:
 Thanks for that. I can confirm that the system I am testing on can
 display the characters, but for some reason is not when I pull it from
 the resource bundle... it's a real puzzler.

when you open the rb in notepad or whatever, can you read the text? btw the rb
encoding's supposed to be utf-8.



[flexcoders] Re: How to change two level parent currentstate?

2008-12-15 Thread Amy
--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... 
wrote:

 
 I did this but I get error.Please help me.
 
 this.parentApplication.parentApplication.currentState = 'test1'

http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
Q3



Re: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Paul Kukiel

Thanks Tracy,

I knew I was going to get this answer.  I already got this working  
with strings as a test sample looks like I have to convert the rest  
of the app.  Surely others are feeling my pain with this issue.


And Nate I look forward to seeing what you have come up with when its  
ready.


Paul.

On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:



Pass the date as a string.

Tracy



From: flexcoders@yahoogroups.com  
[mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Kukiel

Sent: Monday, December 15, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex dates and time zones.



I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time  
zone issue but my date always comes back to me as 21/12/2008 in the  
datagrid.  I really just wan the exact date from the database  
regardless of where I am in the world.


Any ideas?


// Label Grid Date
public static function labelGridDate(item:Object,  
column:DataGridColumn):String {

var formatter:DateFormatter = new DateFormatter();
var myDate:Date = item[column.dataField];
formatter.formatString = DD MMM ;

var offsetMilliseconds:Number = item 
[column.dataField].getTimezoneOffset() * 60 * 1000;
item[column.dataField].setTime(item 
[column.dataField].getTime() + offsetMilliseconds);


return formatter.format(item[column.dataField]);
}

Paul.









RE: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Dale Fraser
Why does Flex do this?

 

If I get a date out of the db and want to deal with it as a date, surely
this should be possible. How can the flash player determine it needs to
change it to a different date.

 

There must be some other option rather than converting to a string.

 

Regards

Dale Fraser

 http://learncf.com/ http://learncf.com

 http://flexcf.com/ http://flexcf.com

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Tuesday, 16 December 2008 1:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex dates and time zones.

 

Thanks Tracy,

 

I knew I was going to get this answer.  I already got this working with
strings as a test sample looks like I have to convert the rest of the app.
Surely others are feeling my pain with this issue.

 

And Nate I look forward to seeing what you have come up with when its ready.

 

Paul.

 

On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:





 

Pass the date as a string.

Tracy

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Monday, December 15, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex dates and time zones.

 

I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time zone
issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
really just wan the exact date from the database regardless of where I am in
the world.

Any ideas?


// Label Grid Date
public static function labelGridDate(item:Object,
column:DataGridColumn):String {
var formatter:DateFormatter = new DateFormatter();
var myDate:Date = item[column.dataField];
formatter.formatString = DD MMM ;

var offsetMilliseconds:Number =
item[column.dataField].getTimezoneOffset() * 60 * 1000;
item[column.dataField].setTime(item[column.dataField].getTime()
+ offsetMilliseconds);

return formatter.format(item[column.dataField]);
}

Paul.




 

 

 

 



Re: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Josh McDonald
I've had a fair bit of experience wrestling date problems in Flex; Aside
from the fact that SchemaManager marshalls xsi:Date as Zulu time instead of
local (which isn't technically incorrect, just annoying as hell for us
aussies), every time there's a problem it's because Flex is doing the right
thing, and the server is sending an incorrect value, or what the clients
actually want is not possible without also passing along the server timezone
in another field.

For you aussies out there, the easiest way to cut down on these problems is
to use midday instead of midnight when you're referring to an all day date
using a Flash Date or xsi:DateTime. We do this by filtering requests and
responses on the server-side, and a subclass of DateField that sets the time
values to midday (as well as letting you 'unset' the date value) on the
client side.

If you're getting yesterday in Flex when you mean today, you've usually got
00:00:00+10:00 on the server, and it's getting truncated after being
converted to Zulu for transport somewhere. Or, you're setting a midnight
date in NSW which is +11 at the moment, and the client machine is in
Queensland which is still +10, or somewhere else which is further West. Your
server sends (today)T00:00:00+11:00, which may or may not get converted to
Zulu as (yesterday)13:00:00Z in transport. The client correctly interprets
this as 23:00:00+10:00 on the client machine, which is then truncated when
displaying as  date-only display field.

Basically, if you want clients in timezone X to show times that are in
timezone Y, you need to have timezone Y be part of the information you're
sending alongside the actual datetime value, or send strings.

-Josh

On Tue, Dec 16, 2008 at 1:51 PM, Dale Fraser d...@fraser.id.au wrote:

  Why does Flex do this?



 If I get a date out of the db and want to deal with it as a date, surely
 this should be possible. How can the flash player determine it needs to
 change it to a different date.



 There must be some other option rather than converting to a string.



 Regards

 Dale Fraser

 http://learncf.com

 http://flexcf.com





 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Tuesday, 16 December 2008 1:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Flex dates and time zones.



 Thanks Tracy,



 I knew I was going to get this answer.  I already got this working with
 strings as a test sample looks like I have to convert the rest of the app.
  Surely others are feeling my pain with this issue.



 And Nate I look forward to seeing what you have come up with when its
 ready.



 Paul.



 On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:





 Pass the date as a string.

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Monday, December 15, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Flex dates and time zones.



 I have a date in a server in Australia:  22/12/2008 12:00:00 AM

 I am using this label function for the grid to try and fix the time zone
 issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
 really just wan the exact date from the database regardless of where I am in
 the world.

 Any ideas?


 // Label Grid Date
 public static function labelGridDate(item:Object,
 column:DataGridColumn):String {
 var formatter:DateFormatter = new DateFormatter();
 var myDate:Date = item[column.dataField];
 formatter.formatString = DD MMM ;

 var offsetMilliseconds:Number =
 item[column.dataField].getTimezoneOffset() * 60 * 1000;
 item[column.dataField].setTime(item[column.dataField].getTime()
 + offsetMilliseconds);

 return formatter.format(item[column.dataField]);
 }

 Paul.








  




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

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


[flexcoders] How do I get on adobe feeds? I'm having problems...

2008-12-15 Thread Nate Pearson
I'm trying to get my blog on adobe feeds.  

I've submitted my blog to the feed (19nates.com) and received an e-mail from 
adobe that 
says Your site has been added to Adobe Feeds: http://feeds.adobe.com;.

I click on my ping link and I get flerror 0 message Thanks for pinging MXNA!.

When I try to ping my link over at adobe feeds it says my blog hasn't been 
added.

I've e-mailed the help link twice but haven't got a response in about 2 weeks.  

HELP! :)  Any ideas?  Any adobe people here that can help me out?  I just want 
to share my 
flexness with the world.

thanks!

Nate



RE: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Randy Martin
I guess I really don't understand what the problem is here?? I have a
smalldatetime (or a datetime) in a MSSQL database. I setup a value object in
AS to have the date field as a Date object. I go get the date from
ColdFusion using RemoteObject. The cfc sets up a CF value object with the
date as a CF Date object. And, voila, the MSSQL datetime becomes an AS Date
object.

 

I don't have to convert anything to a string, or any other kind of object.
So, what's the problem here???

 

~randy

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dale Fraser
Sent: Monday, December 15, 2008 9:51 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex dates and time zones.

 

Why does Flex do this?

 

If I get a date out of the db and want to deal with it as a date, surely
this should be possible. How can the flash player determine it needs to
change it to a different date.

 

There must be some other option rather than converting to a string.

 

Regards

Dale Fraser

http://learncf.com http://learncf.com/ 

http://flexcf.com http://flexcf.com/ 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Tuesday, 16 December 2008 1:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex dates and time zones.

 

Thanks Tracy,

 

I knew I was going to get this answer.  I already got this working with
strings as a test sample looks like I have to convert the rest of the app.
Surely others are feeling my pain with this issue.

 

And Nate I look forward to seeing what you have come up with when its ready.

 

Paul.

 

On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:






 

Pass the date as a string.

Tracy

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Monday, December 15, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex dates and time zones.

 

I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time zone
issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
really just wan the exact date from the database regardless of where I am in
the world.

Any ideas?


// Label Grid Date
public static function labelGridDate(item:Object,
column:DataGridColumn):String {
var formatter:DateFormatter = new DateFormatter();
var myDate:Date = item[column.dataField];
formatter.formatString = DD MMM ;

var offsetMilliseconds:Number =
item[column.dataField].getTimezoneOffset() * 60 * 1000;
item[column.dataField].setTime(item[column.dataField].getTime()
+ offsetMilliseconds);

return formatter.format(item[column.dataField]);
}

Paul.





 

 

 

 



Re: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Josh McDonald
If you're in the US, you're unlikely to run up against these issues at all.
The problem is, computers think about dates and times attached to timezones,
but most of the time our clients do not. That and Flash has no date-only
object, whereas people want to use dates instead of datetimes all over the
place.

On Tue, Dec 16, 2008 at 2:51 PM, Randy Martin ra...@mariposa.us wrote:

  I guess I really don't understand what the problem is here?? I have a
 smalldatetime (or a datetime) in a MSSQL database. I setup a value object in
 AS to have the date field as a Date object. I go get the date from
 ColdFusion using RemoteObject. The cfc sets up a CF value object with the
 date as a CF Date object. And, voila, the MSSQL datetime becomes an AS Date
 object.



 I don't have to convert anything to a string, or any other kind of object.
 So, what's the problem here???



 ~randy



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Dale Fraser
 *Sent:* Monday, December 15, 2008 9:51 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Flex dates and time zones.



 Why does Flex do this?



 If I get a date out of the db and want to deal with it as a date, surely
 this should be possible. How can the flash player determine it needs to
 change it to a different date.



 There must be some other option rather than converting to a string.



 Regards

 Dale Fraser

 http://learncf.com

 http://flexcf.com





 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Tuesday, 16 December 2008 1:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Flex dates and time zones.



 Thanks Tracy,



 I knew I was going to get this answer.  I already got this working with
 strings as a test sample looks like I have to convert the rest of the app.
  Surely others are feeling my pain with this issue.



 And Nate I look forward to seeing what you have come up with when its
 ready.



 Paul.



 On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:






 Pass the date as a string.

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Monday, December 15, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Flex dates and time zones.



 I have a date in a server in Australia:  22/12/2008 12:00:00 AM

 I am using this label function for the grid to try and fix the time zone
 issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
 really just wan the exact date from the database regardless of where I am in
 the world.

 Any ideas?


 // Label Grid Date
 public static function labelGridDate(item:Object,
 column:DataGridColumn):String {
 var formatter:DateFormatter = new DateFormatter();
 var myDate:Date = item[column.dataField];
 formatter.formatString = DD MMM ;

 var offsetMilliseconds:Number =
 item[column.dataField].getTimezoneOffset() * 60 * 1000;
 item[column.dataField].setTime(item[column.dataField].getTime()
 + offsetMilliseconds);

 return formatter.format(item[column.dataField]);
 }

 Paul.









  




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

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Nate Beck
Here's what it comes down to...
The Date class in flash doesn't natively allow you to have a timezone other
than your local timezone and UTC.

Take this example (my computer is in PST time):

var myDate:Date = new Date(Mon Dec 15 12:00:00 GMT-0400 2008);

trace(myDate.toString());
trace(myDate.toUTCString());

Output:
Mon Dec 15 08:00:00 GMT-0800 2008
Mon Dec 15 16:00:00 2008 UTC

So if someone passes a DateTime from a server that has a timezone offset
which differs from the local timezone of the client's machine.  Flex doesn't
save that offset when it's unmarshalled.  If you pass them as a string, the
timezone data is preserved.

HTH,
Nate

On Mon, Dec 15, 2008 at 8:51 PM, Randy Martin ra...@mariposa.us wrote:

I guess I really don't understand what the problem is here?? I have a
 smalldatetime (or a datetime) in a MSSQL database. I setup a value object in
 AS to have the date field as a Date object. I go get the date from
 ColdFusion using RemoteObject. The cfc sets up a CF value object with the
 date as a CF Date object. And, voila, the MSSQL datetime becomes an AS Date
 object.



 I don't have to convert anything to a string, or any other kind of object.
 So, what's the problem here???



 ~randy



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Dale Fraser
 *Sent:* Monday, December 15, 2008 9:51 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Flex dates and time zones.



 Why does Flex do this?



 If I get a date out of the db and want to deal with it as a date, surely
 this should be possible. How can the flash player determine it needs to
 change it to a different date.



 There must be some other option rather than converting to a string.



 Regards

 Dale Fraser

 http://learncf.com

 http://flexcf.com





 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Tuesday, 16 December 2008 1:46 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Flex dates and time zones.



 Thanks Tracy,



 I knew I was going to get this answer.  I already got this working with
 strings as a test sample looks like I have to convert the rest of the app.
  Surely others are feeling my pain with this issue.



 And Nate I look forward to seeing what you have come up with when its
 ready.



 Paul.



 On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:






 Pass the date as a string.

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Paul Kukiel
 *Sent:* Monday, December 15, 2008 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Flex dates and time zones.



 I have a date in a server in Australia:  22/12/2008 12:00:00 AM

 I am using this label function for the grid to try and fix the time zone
 issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
 really just wan the exact date from the database regardless of where I am in
 the world.

 Any ideas?


 // Label Grid Date
 public static function labelGridDate(item:Object,
 column:DataGridColumn):String {
 var formatter:DateFormatter = new DateFormatter();
 var myDate:Date = item[column.dataField];
 formatter.formatString = DD MMM ;

 var offsetMilliseconds:Number =
 item[column.dataField].getTimezoneOffset() * 60 * 1000;
 item[column.dataField].setTime(item[column.dataField].getTime()
 + offsetMilliseconds);

 return formatter.format(item[column.dataField]);
 }

 Paul.









   



RE: [flexcoders] Flex dates and time zones.

2008-12-15 Thread Dale Fraser
The problem is that somehow.

 

If the server serving that date is in a different location to you, flash
player says, well I wont show that date I just got from the database, I'll
adjust it to your time. This is totally useless, so for example if Im
logging actions in an audit, the date in those logs could look different
from one user to another.

 

Regards

Dale Fraser

 http://learncf.com/ http://learncf.com

 http://flexcf.com/ http://flexcf.com

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Randy Martin
Sent: Tuesday, 16 December 2008 3:52 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex dates and time zones.

 

I guess I really don't understand what the problem is here?? I have a
smalldatetime (or a datetime) in a MSSQL database. I setup a value object in
AS to have the date field as a Date object. I go get the date from
ColdFusion using RemoteObject. The cfc sets up a CF value object with the
date as a CF Date object. And, voila, the MSSQL datetime becomes an AS Date
object.

 

I don't have to convert anything to a string, or any other kind of object.
So, what's the problem here???

 

~randy

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dale Fraser
Sent: Monday, December 15, 2008 9:51 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex dates and time zones.

 

Why does Flex do this?

 

If I get a date out of the db and want to deal with it as a date, surely
this should be possible. How can the flash player determine it needs to
change it to a different date.

 

There must be some other option rather than converting to a string.

 

Regards

Dale Fraser

http://learncf.com http://learncf.com/ 

http://flexcf.com http://flexcf.com/ 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Tuesday, 16 December 2008 1:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex dates and time zones.

 

Thanks Tracy,

 

I knew I was going to get this answer.  I already got this working with
strings as a test sample looks like I have to convert the rest of the app.
Surely others are feeling my pain with this issue.

 

And Nate I look forward to seeing what you have come up with when its ready.

 

Paul.

 

On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:







 

Pass the date as a string.

Tracy

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Monday, December 15, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex dates and time zones.

 

I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time zone
issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
really just wan the exact date from the database regardless of where I am in
the world.

Any ideas?


// Label Grid Date
public static function labelGridDate(item:Object,
column:DataGridColumn):String {
var formatter:DateFormatter = new DateFormatter();
var myDate:Date = item[column.dataField];
formatter.formatString = DD MMM ;

var offsetMilliseconds:Number =
item[column.dataField].getTimezoneOffset() * 60 * 1000;
item[column.dataField].setTime(item[column.dataField].getTime()
+ offsetMilliseconds);

return formatter.format(item[column.dataField]);
}

Paul.






 

 

 

 



  1   2   >