RE: [flexcoders] Re: Advise - List

2008-08-07 Thread Alex Harui
Did you try it?.  I'm pretty sure I can use Text or TextArea instead of
UITextField.  I might have to call validateClient() on it after fixing
its width, but the key is to fix its width and then ask for its
measurements.
 
However, I definitely recommend using TextField over Text or TextArea in
renderers.  It is much lighter than Text or TextArea.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, August 06, 2008 10:47 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Advise - List



Just FYI for anybody reading this thread, the reason it works when using
a UITextField and not mx:Text is that UITextField is not a UIComponent
and so updates its sizing and such as soon as it has a .width and a
.text

-Josh


On Thu, Aug 7, 2008 at 2:55 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


For performance reasons, renderers get validated once and not
checked again, so you can't just figure out the size later.
 
An example is in ListItemRenderer.  Its internal textfield
handles wordwrap correctly.  The OP could just use it, but it doesn't
handle html.  I'd just copy the source and wire the listData.label to
the htmlText.




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Josh McDonald

Sent: Wednesday, August 06, 2008 9:13 PM 

To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Re: Advise - List





You mean this is causing measure() to report the wrong height
for the renderer itself? Wouldn't measure get called again once the text
component has layed out and worked out its height in a frame or 3?
What's the answer? Set text.width, call validateNow() before you use
text.height in renderer.measure()?

Intriguing :)

-Josh


On Thu, Aug 7, 2008 at 1:48 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


I think the OP really wants it to be in a renderer,
which has slightly different rules
 
A renderer is given explicitWidth before it is measured,
and for text flow components, it should set the with of that component
then take its measurements.



From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Josh McDonald
Sent: Wednesday, August 06, 2008 8:45 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Re: Advise - List





You can set it to 100%, or to a binding like:

vbox id=bar
  text id=txt width={vbox.width}/
/vbox

Either will work just make sure that you set it :)

If you're doing that and it's not wrapping, you may need
collapseWhite=true (or something named like that) on your mx:Text,
depending on how you've set up your html!

-Josh


On Thu, Aug 7, 2008 at 1:38 PM, Rafael Faria
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


I need it to be 100%... its on a component that
goes in different
places on my application. I can't set it =/

Any other idea?

I'm trying to set the textarea's height when i
load it but it doesnt
seem to be getting the right height.

I tested a simple example like the following one
and if you run it you
will see that when you open its bigger than the
text but when you
start typing it gets back to the right size.

?xml version=1.0?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
creationComplete=update();
mx:Script
  ![CDATA[
  import mx.events.FlexEvent;

  public function update():void
  {
 src.explicitHeight = src.textHeight
+ 10;
 src.dispatchEvent(new
KeyboardEvent(KEY_DOWN));
  }

Re: [flexcoders] Re: Advise - List

2008-08-07 Thread Josh McDonald
You could definitely do it, but you would have to call some sort of
validateX() before you get a useful height, unless the height of the
internal renderer is exposed via textHeight (which it probably is, now that
I think about it). Haven't tried it, though.

On Thu, Aug 7, 2008 at 4:04 PM, Alex Harui [EMAIL PROTECTED] wrote:

  Did you try it?.  I'm pretty sure I can use Text or TextArea instead of
 UITextField.  I might have to call validateClient() on it after fixing its
 width, but the key is to fix its width and then ask for its measurements.

 However, I definitely recommend using TextField over Text or TextArea in
 renderers.  It is much lighter than Text or TextArea.





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

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


[flexcoders] ActiveSupport::TimeWithZone

2008-08-07 Thread weezee49
In the console, when I fetch updated_at from a record, and check the 
class via the command

sim.updated_at.class

I get ActiveSupport::TimeWithZone. Since it's a UTC time, I can 
use several of the commands from 
http://api.rubyonrails.org/classes/ActiveSupport/TimeWithZone.html#M0
00512 to convert this to the local time zone.

In my Flex code I have a ComboBox that has a dataProvider which is 
an mx:XMLListCollection of sim items. When I choose one of those 
using the ComboBox, I want to take the updated_at value and convert 
it from UTC to the local time zone.  However, none of the 
TimeWithZone conversion functions seem to work.  For example, the 
statement

trace(/ + userModelsCB.selectedItem.updated_at.getlocal + /)

produces // in the trace file, as does everything else that I have 
tried. The commands work in the console, but not in my Flex code. 

If I just assign userModelsCB.selectedItem.updated_at to my text 
field, I get 2008-08-05T02:08:09Z, which is ugly and not very user 
friendly.  

Is there any way to get a TimeWithZone function that works in the 
console to work in my Flex code to get a nicely formatted date and 
time?

Thanks,
Louise






RE: [flexcoders] Testing Internet Connection in Flex

2008-08-07 Thread Gregor Kiddie
If you are using AIR you can test to see if the connection is open.

http://www.adobe.com/devnet/air/flex/articles/flickr_floater_06.html
Explains it pretty well.

If you are purely using Flex in the Flash Player, you can probably glean
the information from the Fault object the Remote Object generates when
the RPC operation fails.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nagaofthesea
Sent: 06 August 2008 21:07
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Testing Internet Connection in Flex

 

Howdy-

Does anyone know of a way (AS3 or mx:CustomComponent) that tests if
the user's internet connection is live?

I have an application with error processing that needs to know if an
RPC failed because the user's connection is down...

Thanks!





[flexcoders] Re: Advise - List

2008-08-07 Thread Rafael Faria
Yeah...

It would be something like this. If you run it you will see that the
measure is wrong. It just gets right when you start typing.

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=update();
mx:Script
   ![CDATA[
   import mx.events.FlexEvent;

   public function update():void
   {
src.validateNow();
src.height = src.textHeight+ src.getStyle(fontSize);
   }

   ]]
   /mx:Script
mx:Panel title=TextArea Control Example height=75%
width=75%  paddingTop=10 paddingLeft=10

mx:TextArea id=src change=update()
mx:htmlText
![CDATA[
Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard
dummy text ever since the 1500s, when an unknown printer took a galley
of type and scrambled it to make a type specimen book. It has survived
not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in
the 1960s with the release of Letraset sheets containing Lorem Ipsum
passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.
]]
/mx:htmlText
/mx:TextArea

/mx:Panel
/mx:Application 

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

 Rafael - do you have an example small enough to post here so we can
have a
 look-see?
 
 -Josh
 





Re: [flexcoders] New to Adobe AIR - SQLite

2008-08-07 Thread Simon Bailey

Hi,

I built a simple AIR app that ultilises a SQLite db for a magazine who  
host the tutorial files online.  Have a dig around this app should do  
all you need i.e. add, update and delete:


http://www.webdesignermag.co.uk/images/wd_features/tutorials/issue145/Flash_ContactManager_Part1.zip

Cheers,

Simon

newtriks.com

On 7 Aug 2008, at 06:46, tech.sivakami wrote:

Hi,

I have created a flex 3 application and trying to convert it to AIR
application.i have converted to AIR application also working in
online.but i need to work in offline.i searched in groups and i got
the info about SQLite that is packaged with AIR.i tried some simple
examples on using this SQLite but i couldnt retrieve data from that or
even to update database.anyone knows about this or having any idea pls
let me know.waiting for the replies

Thanks in advance,
sivakami






Re: [flexcoders] Remoting fails

2008-08-07 Thread Simon Bailey
Actually no thats one thing I have not suggested to them, why would a  
server restart be required?


Also some further info, I have found out that they had issues with  
cfhttp requests and had to provide proxyserver and proxyport params,  
then they got it to work.  But as far as I am aware there is no place  
to enter these params in a flash remoting call?


Cheers,

Simon

On 6 Aug 2008, at 19:54, Sherif Abdou wrote:

You did restart the ColdFusion server right?


- Original Message 
From: Scott [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 6, 2008 12:56:18 PM
Subject: Re: [flexcoders] Remoting fails


I wouldn’t think it would be a firewall
issue unless its on the remote side and it has stateful packet  
inspection… It’s
all port 80 traffic, so if you can browse to other sites then you can  
flash

remote.

I had numerous issues with as2/flash
remoting; so many that I dropped developing in it about 1.5 years  
ago.  I
picked up flex 3 builder and have not experienced any server attaching  
issues

since.  I’m starting to do about 90% of my development in it.




From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED]  
ups.com ] On Behalf Of Simon Bailey

Sent: Wednesday, August 06, 2008
10:37 AM
To: [EMAIL PROTECTED] ups.com
Subject: {Disarmed} Re:
[flexcoders] Remoting fails

Hi Scott and thanks for the replies, I can hit it fine
from a few different servers cross domains ( BTW this is using
the old flash remoting for AS2 ) and this only seems an issue on this  
one
particular network whilst the swf is in a browser, hence me thinking  
this is a

firewall issue?

Apologise in advance for posting an AS2 related issue on this list,
however i am sure most of the peeps here are like myself and have had  
fun in

AS2 pre Flex :) so I thought why not ;)

On 6 Aug 2008, at 16:31, Scott
wrote:


I just thought of something else…
Did you check the services-config. xml to ensure outside access?

 Regards,
   Scott




From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED]  
ups.com ] On

Behalf Of  Scott
Sent: Wednesday, August 06, 2008 9:43 AM
To:  [EMAIL PROTECTED] ups.com
Subject: {Disarmed} Re: [flexcoders] Remoting
fails

I write .cfm files to test my code to
ensure its working.  Perhaps writing a quick .cfm to validate you can  
hit

the coldfusion server would help…?  That way you have better error
reporting from the remote components and can dump variables easily as  
well.


Regards,
  Scott




From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED]  
ups.com ] On

Behalf Of Simon Bailey
Sent: Wednesday, August 06, 2008 5:11 AM
To:  [EMAIL PROTECTED] ups.com
Subject: {Disarmed} Re: [flexcoders] Remoting
fails

Nice one Gregor I will give it a go.
 I think the calls are leaving the swf just having trouble returning  
into

the browser/swf!

On 6 Aug 2008, at 11:08, Gregor Kiddie
wrote:





Get some software that lets you see the responses like Charles or
Service Capture, that will give some more information on what’s going  
on.


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



From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups.  
com] On

Behalf Of Simon Bailey
Sent: 06 August 2008 10:53
To:  [EMAIL PROTECTED] ups.com
Subject: [flexcoders] Remoting fails

Hi,

I have an app making a simple flash remoting call to CF and it works
fine of multiple servers, runs in the local environment and returns a
query from ColdFusion as expected.

Problem is as soon as my client deploys on their company network the
remoting call fails, no error message either, its as though it is not
even leaving the app within the browser. I presume firewall could be
a problem but am unsure as to where to go on this one? Any ideas
anyone?

Cheers,

Simon




--
This message has been scanned for viruses and
dangerous content by MailScanner,
and is
believed to be clean.

--
This message has been scanned for viruses and
dangerous content by MailScanner,
and is
believed to be clean.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





[flexcoders] Checking swfs for malicious code!

2008-08-07 Thread superbokbok
Don't know if this is the right place for this, but thought I'd throw
out the question before I dive headlong into building something that
isn't do-able.

Basically, I'm building a video player that would allow flash authors
to create their own video/photo/game and upload to a server. My app
would then take this and use it within the Main video player as they
please. The concern my client has is that the swf's that are
uploaded(AS3) may contain malicious code that might affect other
users/websites etc... The main video players is built in Flex while
the uploaded vids are done in Flash.

Is there any way, other than decompiling swfs and checking the code,
to determine if the code is in fact malicious from a swf?

cheers
erick



[flexcoders] Re: Currently encountering a problem indigineous to the ie6 browser only

2008-08-07 Thread mark_j_ellul
Hi Matt,

I have come accross the same error doing a HTTP POST. I used Fiddler2 
(a windows tool to look at requests and responses) to prove that it 
was indeed a POST.

What I found was that if I do a HTTP Post I was receiving the Stream 
Error on my second request, which happened to be done in quick 
succession to the first. The HTTP Status Code Result of the Second 
Post was 200, and the response was the correct expected result.

PS The Cache was set to no-cache. So this is not the cacheing problem.

I am in the process of testing IE 7, as I have not hit this issue at 
all with Firefox 2 or Firefox 3.


Below is the Request and Response Information for a Failed Call 
that triggered the Stream Error.

Any Ideas on work arounds would be appreciated!

---
REQUEST
---

POST /flexservicebroker/ HTTP/1.1
Accept: */*
Accept-Language: en-US
Referer: file://C:\Documents and Settings\mark\My Documents\Flex 
Builder 3\CareersEntryForm\bin-debug\CareersEntry.swf
x-flash-version: 9,0,115,0
Content-Type: text/xml
Content-Length: 1817
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 
SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Host: 217.8.251.101:4000
Connection: Keep-Alive
Pragma: no-cache

methodCall
  methodNameexecute_guest/methodName
  params
param
  value
stringterp/string
  /value
/param
param
  value
stringiodine.case/string
  /value
/param
param
  value
stringcreate_case_and_partner/string
  /value
/param
param
  value
array
  data
value
  stringmark/string
/value
value
  stringellul/string
/value
value
  string[EMAIL PROTECTED]/string
/value
value
  string976574325/string
/value
value
  boolean0/boolean
/value
value
  stringC/Marcianos/string
/value
value
  string/
/value
value
  stringZaragoza/string
/value
value
  string50016/string
/value
value
  int3/int
/value
  /data
/array
  /value
/param
param
  value
array
  data
value
  stringCareers Application from mark ellul/string
/value
value
  stringlt;careers_entry label=Careers 
Applicationgt;
  lt;information label=Informationgt;lt;![CDATA[IE 6 test 
7]]gt;lt;/informationgt;
lt;/careers_entrygt;/string
/value
value
  stringCAREERS/string
/value
  /data
/array
  /value
/param
  /params
/methodCall

---
RESPONSE
---

HTTP/1.0 200 OK
Server: PasteWSGIServer/0.5 Python/2.5.2
Date: Wed, 06 Aug 2008 17:27:23 GMT
content-type: text/xml
pragma: no-cache
cache-control: no-cache
Connection: close

?xml version='1.0'?
methodResponse
params
param
valueboolean1/boolean/value
/param
/params
/methodResponse

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

 Maybe try setting the data property on the URLRequest with a
 URLVariables instead of building out the url directly?  Make sure 
the
 method is POST and see how that goes.
 
  
 
 Matt
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of newfish
 Sent: Monday, August 07, 2006 7:21 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Currently encountering a problem 
indigineous
 to the ie6 browser only
 
  
 
 I encounted the same problem too! Did you resolved it? 
 
 any body could help??
 
 2006/8/2, sp0rarb3jd3r [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] :
 
 Currently encountering a problem indigineous to the ie6 browser only
 
 We are using flex 2 to develop a survey chart of various web traffic
 parameters.
 To do so we need to load XML served to the flashapp on request by an
 sql-server.
 When we try it out in the firefox browser, the opera browser, even 
in
 the internet explorer 7.0,
 it works fine. But in internet explorer 6.0 we seem to hit a wall.
 Every time we try and run it we get an IOStreamError #2032.
 Anyone experiencing similar problems?
 Anyone know of a solution/an explanation?
 It seems to be in the communication with the server that somethin is
 amiss.
 If we try to just load a static xml file it works fine.
 Any help would be appreciated.
 Here's the sample code:
 
 private var inhale:XML = new XML();
 private var rq:URLRequest = new URLRequest();
 private var ld:URLLoader = new URLLoader();
 

Re: [flexcoders] Checking swfs for malicious code!

2008-08-07 Thread Laurent Cozic
I don't think you need to worry about security for loaded contents. The Flash 
player does that very well already and there's probably no way a Flash file 
could do anything malicious.


--
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com



--- On Thu, 8/7/08, superbokbok [EMAIL PROTECTED] wrote:
From: superbokbok [EMAIL PROTECTED]
Subject: [flexcoders] Checking swfs for malicious code!
To: flexcoders@yahoogroups.com
Date: Thursday, August 7, 2008, 8:45 AM











Don't know if this is the right place for this, but thought I'd 
throw

out the question before I dive headlong into building something that

isn't do-able.



Basically, I'm building a video player that would allow flash authors

to create their own video/photo/ game and upload to a server. My app

would then take this and use it within the Main video player as they

please. The concern my client has is that the swf's that are

uploaded(AS3) may contain malicious code that might affect other

users/websites etc... The main video players is built in Flex while

the uploaded vids are done in Flash.



Is there any way, other than decompiling swfs and checking the code,

to determine if the code is in fact malicious from a swf?



cheers

erick




  




 

















  

Re: [flexcoders] Re: Error: Service was not found in the Cairngorm Services registry.

2008-08-07 Thread Tom Chiverton
On Wednesday 06 Aug 2008, sk_acura wrote:
I did lot of testing and Still cannot figure out why the
 ServiceLocator is unable to get the RemoteObjects..

...

 And my remoting-config.xml is as listed below:

Cairngorm Services registry doesn't mean that does it, but the 
ServiceLocator, maybe ?

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Multiple Builder instances / windows?

2008-08-07 Thread Tom Chiverton
On Thursday 07 Aug 2008, Josh McDonald wrote:
 I figured out a close enough one - start builder with open -n (mac
 only)... It complains when you open it about the workspace being locked,
 but then lets you choose another. I guess If I set always ask for
 workspace in eclipse that problem would go away!

Err: Window, New Window no help ?

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] New to Adobe AIR - SQLite

2008-08-07 Thread Tom Chiverton
On Thursday 07 Aug 2008, tech.sivakami wrote:
 i tried some simple
 examples on using this SQLite but i couldnt retrieve data from that or
 even to update database.anyone knows about this or having any idea pls
 let me know.

You forgot to include the code or the error.

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: simple arraycollection question

2008-08-07 Thread Richard Baker
Micheal,

That's great - thanks very much!
Richard
--- In flexcoders@yahoogroups.com, Michael VanDaniker [EMAIL PROTECTED]
wrote:

 As you loop over the objects you can save them in an array instead of
 in the collection.  When the array is finished being populated you can
 set it to be the source on the collection.  That would result in only
 one collection change event.
 
 --- In flexcoders@yahoogroups.com, Richard Baker bishbash64@ wrote:
 
  Ahh, yes, that does work. I was looping as you suggest, but the
  collection change event was firing each time. Now that I think about
  it I suppose the best ting to do would be to hook up the event
  listener on the last addition to the ac? Or is there a better practice
  out there somewhere?
  
  --- In flexcoders@yahoogroups.com, Michael VanDaniker michael@
  wrote:
  
   I haven't run this code, but I don't see why it wouldn't work:
   
   this.source = event.result.source;
   
   I personally prefer looping through the returned collection and
   translating the raw objects into instances of a class I've defined. 
   This allows for compile-time checking on anything you want to do
with
   the local copies, and it lets you add methods and properties to
those
   objects.
   
   var o:SomeClass = new SomeClass(event.result[i]);
   collection.addItem(o);
   
   --- In flexcoders@yahoogroups.com, Richard Baker bishbash64@
 wrote:
   
I have a .as class extending arraycollection.

In the constructor I set up a webservice and listner to
capture the
result in resultHandler

Ideally in resultHandler I'd do something like
  this=event.result;

but it doesn't work, so I am looping over the event.result,
 adding it
to the array collection like:

   this.addItem(event.result[i]);

can I assign the whole array collection in one go. Probably
missing
something simple, but I just can't see it :(

Thx
   
  
 





Re: [flexcoders] Checking swfs for malicious code!

2008-08-07 Thread Tom Chiverton
On Thursday 07 Aug 2008, superbokbok wrote:
 please. The concern my client has is that the swf's that are
 uploaded(AS3) may contain malicious code that might affect other
 users/websites etc... T

You want a virus scanner for Flash binary files ?
I'm not sure there is one, and witness the problems desktop virus scanners 
have anyway.

Never mind the problem that if there were one you end up with Halting Problem 
things like:
if (scanResult(self) == evil){
dontBeEvil();
}else{
beEvil();
}

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Gus
AFAIK, just open a new eclipse and point it to a different workspace
than the one is open, at least in windows it works. but its a matter
of how memory do you have because eclipse eats a lot!!


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

 I figured out a close enough one - start builder with open -n (mac
 only)... It complains when you open it about the workspace being
locked, but
 then lets you choose another. I guess If I set always ask for
workspace in
 eclipse that problem would go away!
 
 -Josh
 
 On Thu, Aug 7, 2008 at 12:16 PM, Sid Maskit [EMAIL PROTECTED] wrote:
 
   I don't know much about eclipse so I have no idea if there is a
good way
  to do this. I'm pretty sure this is not the answer you would like,
but one
  way to do this would be with virtualization. If you are running a
Windows
  box, you can use Microsoft's free virtualPC program.
 
  I'm not sure whether you would run into problems with trying to
use the
  same license for multiple copies this way. In theory, it should be
okay
  since they are all on the same machine, but since each virtual PC
instance
  appears to be its own machine, the license enforcement mechanism might
  object.
 
  Sid Maskit
  Partner
  CraftySpace
  Better Websites for a Better World
  http://www.CraftySpace.com
  blog: http://smaskit.blogspot.com/
 
 
  - Original Message 
  From: Josh McDonald [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
  Sent: Wednesday, August 6, 2008 4:03:23 PM
  Subject: [flexcoders] Multiple Builder instances / windows?
 
   Hey guys,
 
  Is there an easy way I can have multiple copies of Builder running
at the
  same time (with different workspaces)? This would really make my life
  easier!
 
  -Josh
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED] com [EMAIL PROTECTED]
 
  
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Johannes Nel
yeah, thats the way, why would you however want two instances of flex
builder (i get two eclipses).if its more than one project just open both at
once, or have both in one project and mod your build script.

On Thu, Aug 7, 2008 at 1:29 PM, Gus [EMAIL PROTECTED] wrote:

   AFAIK, just open a new eclipse and point it to a different workspace
 than the one is open, at least in windows it works. but its a matter
 of how memory do you have because eclipse eats a lot!!


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  I figured out a close enough one - start builder with open -n (mac
  only)... It complains when you open it about the workspace being
 locked, but
  then lets you choose another. I guess If I set always ask for
 workspace in
  eclipse that problem would go away!
 
  -Josh
 
  On Thu, Aug 7, 2008 at 12:16 PM, Sid Maskit [EMAIL PROTECTED] wrote:
 
   I don't know much about eclipse so I have no idea if there is a
 good way
   to do this. I'm pretty sure this is not the answer you would like,
 but one
   way to do this would be with virtualization. If you are running a
 Windows
   box, you can use Microsoft's free virtualPC program.
  
   I'm not sure whether you would run into problems with trying to
 use the
   same license for multiple copies this way. In theory, it should be
 okay
   since they are all on the same machine, but since each virtual PC
 instance
   appears to be its own machine, the license enforcement mechanism might
   object.
  
   Sid Maskit
   Partner
   CraftySpace
   Better Websites for a Better World
   http://www.CraftySpace.com
   blog: http://smaskit.blogspot.com/
  
  
   - Original Message 
   From: Josh McDonald [EMAIL PROTECTED]
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com 
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Sent: Wednesday, August 6, 2008 4:03:23 PM
   Subject: [flexcoders] Multiple Builder instances / windows?
  
   Hey guys,
  
   Is there an easy way I can have multiple copies of Builder running
 at the
   same time (with different workspaces)? This would really make my life
   easier!
  
   -Josh
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: [EMAIL PROTECTED] com [EMAIL PROTECTED]
  
  
  
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




-- 
j:pn
\\no comment


Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Tom Chiverton
On Thursday 07 Aug 2008, Gus wrote:
 AFAIK, just open a new eclipse and point it to a different workspace
 than the one is open, at least in windows it works. but its a matter
 of how memory do you have because eclipse eats a lot!!

I don't think 200meg is a lot these days is it ?

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] XML Document and Navigation

2008-08-07 Thread Patrick J. Jankun

Hello Everyone,

I run into a problem, something that probably a lot of people here  
knows how to solve.
But after sitting for 2 days building nestes for loops, i can't see  
the light by the end of the tunnel :-)


So, here is a problem:

I have to build an xml based navigation, so far, quite simple and  
clear. Made it already a few times,
but, now, this is a bit more complicated, because i got a much deeper  
nested sub levels, and i really
don't know how to efficient traverse the document and build the  
navigation out of it :|


The most complex navigation i made had 2 levels, so it wasn't really  
hard to imagine the code for this task:
2 for loops done the nav creation and that's it, but i got now, an  
undefined deep, and i don't know how to
bite the code that will build the nav, that goes a bit deeper then one- 
sub level.


Do you guys got any examples or thoughts on how to solve the task?
Im pretty sure that i got an logical error in my approach, since i  
will use some nested for loops, but i can't
think the formula since i don't know how deep each of the nodes  
goes, and this task gives me headaches.


any kind of help and pinpointing to right direction would be VERY  
appreciated


cheers,
Patrick

--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org



Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Josh McDonald
Ew, is that a joke? Besides I already said that it was two different
workspaces. Switching between them takes way too long, and I wanted to be
able to work in one while the other is building (which also takes way too
long)

On Thu, Aug 7, 2008 at 9:34 PM, Johannes Nel [EMAIL PROTECTED] wrote:

  yeah, thats the way, why would you however want two instances of flex
 builder (i get two eclipses).if its more than one project just open both
 at once, or have both in one project and mod your build script.






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

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


Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Johannes Nel
just kick of another eclipse and select the second workspace. it works fine.no
i am serious, why two flexbuilders, i am trying to think of a scenario where
1 is not enough. a java and flex eclipse instance i get, but two flex
builder instances?

also, did you install the plugin version of flexbuilder or stand alone, this
might be a problem with standalone.

On Thu, Aug 7, 2008 at 2:02 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   Ew, is that a joke? Besides I already said that it was two different
 workspaces. Switching between them takes way too long, and I wanted to be
 able to work in one while the other is building (which also takes way too
 long)

 On Thu, Aug 7, 2008 at 9:34 PM, Johannes Nel [EMAIL PROTECTED]wrote:

  yeah, thats the way, why would you however want two instances of flex
 builder (i get two eclipses).if its more than one project just open both
 at once, or have both in one project and mod your build script.






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

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

  




-- 
j:pn
\\no comment


Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Josh McDonald
Standalone, it's a packaged eclipse. Two builders == two eclipses I just
went with builder because I prefer the way some menus are layed out and I
don't do any java + flex (at the same time) development. My responsibilities
at work end at the WSDL these days.

-Josh

On Thu, Aug 7, 2008 at 10:10 PM, Johannes Nel [EMAIL PROTECTED]wrote:

  just kick of another eclipse and select the second workspace. it works
 fine.no i am serious, why two flexbuilders, i am trying to think of a
 scenario where 1 is not enough. a java and flex eclipse instance i get, but
 two flex builder instances?

 also, did you install the plugin version of flexbuilder or stand alone,
 this might be a problem with standalone.


 On Thu, Aug 7, 2008 at 2:02 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   Ew, is that a joke? Besides I already said that it was two different
 workspaces. Switching between them takes way too long, and I wanted to be
 able to work in one while the other is building (which also takes way too
 long)

 On Thu, Aug 7, 2008 at 9:34 PM, Johannes Nel [EMAIL PROTECTED]wrote:

  yeah, thats the way, why would you however want two instances of flex
 builder (i get two eclipses).if its more than one project just open both
 at once, or have both in one project and mod your build script.






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

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




 --
 j:pn
 \\no comment
 




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

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


[flexcoders] Set background color of special dates in DateField

2008-08-07 Thread kruse.morten
Hi,

I have got a DateField where it is possible to choose a date.
But I want to mark the dates already choosen with a color.
Is this possible?

I mean it is possible to giv current date a color so I think that it 
should be possible to give other dates another color to. 




[flexcoders] Need help urgently regarding the uploading component in flex

2008-08-07 Thread santoshgadagoju
I strucked at a point in designing uploading component in flex.
Below is the code of my uploading component. Please find the red marked
content in the below code.
My requirement is to alert the URL of the file selected in the list box
when i click a file item in the listbox.
Please help me ...


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

 mx:Style
 Text{
 font-weight:normal;
 }
 Label{
 font-weight:bold;
 }

 /mx:Style

 mx:Script
 ![CDATA[

 import mx.states.*;
 import mx.controls.*;
 import mx.managers.*;
 import mx.events.*;
 import mx.events.ListEvent;
 import flash.events.*;
 import flash.net.*;

 private var _arrUploadFiles:Array;
 private var _numCurrentUpload:Number = 0;
 private var _refAddFiles:FileReferenceList;
 private var _refUploadFile:FileReference;
 private var _strUploadUrl:String;



 private function initApp():void {
 Security.allowDomain(*);
 _arrUploadFiles = new Array();
 }

 // Set uploadUrl
 public function set uploadUrl(strUploadUrl:String):void {
 _strUploadUrl = strUploadUrl;
 }

 private function addFiles():void {
 _refAddFiles = new FileReferenceList();
 _refAddFiles.addEventListener(Event.SELECT,
onSelectFile);
 _refAddFiles.browse();
 }

 // Called to remove selected file(s) for upload
 private function removeFiles():void {
 var arrSelected:Array = listFiles.selectedIndices;
 for (var i:Number = 0; i  arrSelected.length; i++) {
 _arrUploadFiles[Number(arrSelected[i])] = null;
 }
 for (var j:Number = 0; j  _arrUploadFiles.length; j++)
{
 if (_arrUploadFiles[j] == null) {
 _arrUploadFiles.splice(j, 1);
 j--;
 }
 }
 listFiles.dataProvider = _arrUploadFiles;
 listFiles.selectedIndex = 0;

 }

 private function onSelectFile(event:Event):void {
 var arrFoundList:Array = new Array();
 // Get list of files from fileList, make list of files
already on upload list
 for (var i:Number = 0; i  _arrUploadFiles.length; i++)
{
 for (var j:Number = 0; j 
_refAddFiles.fileList.length; j++) {
 if (_arrUploadFiles[i].label ==
_refAddFiles.fileList[j].name) {

arrFoundList.push(_refAddFiles.fileList[j].name);
 _refAddFiles.fileList.splice(j, 1);
 j--;
 }
 }
 }
 if (_refAddFiles.fileList.length = 1) {
 for (var k:Number = 0; k 
_refAddFiles.fileList.length; k++) {

_arrUploadFiles.push({label:_refAddFiles.fileList[k].name,
data:_refAddFiles.fileList[k]});
 }
 listFiles.dataProvider = _arrUploadFiles;
 listFiles.selectedIndex = _arrUploadFiles.length -
1;
 }
 if (arrFoundList.length = 1) {
 Alert.show(The file(s): \n\n•  +
arrFoundList.join(\n• ) + \n\n...are already on the upload list.
Please change the filename(s) or pick a different file., File(s)
already on list);
 }

 }

 private function changeHandler(event:ListEvent):void{

 Alert.show(event.itemRenderer.data.label);

 // Here i want to alert the URL of the file clicked,
 // i.e, URL of the file from where the file is
uploaded.
 }


 ]]
 /mx:Script

 mx:List id=listFiles x=393 y=229 width=258
itemClick=changeHandler(event)/
 mx:Button x=659 y=239 label=Add click=addFiles() /
 mx:Button x=659 y=269 label=Del click=removeFiles()/


/mx:Application


[flexcoders] Re: Add a context menu to a menubar item

2008-08-07 Thread valdhor
Now that is definitely a hack/Kludge. Is there no other way? Maybe I
should file a feature request?


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

 Keep track of rollover events?
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of valdhor
 Sent: Wednesday, August 06, 2008 8:36 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Add a context menu to a menubar item
 
 
 
 Ok, I have created a custom itemRenderer which displays my context
 menu perfectly.
 
 Now, how do I get at the menu item data that the context menu came from.
 
 IOW, I left click on my menu bar which drops down a menu; I then right
 click on a menu item (Let's say it is Show some Cool Stuff) which
 brings up my custom context menu. I then left click on my custom
 context menu item. This generates a ContextMenuEvent.MENU_ITEM_SELECT
 event which I have an eventListener for. The trouble is, there is
 nothing in that event that lets me know what the original item was
 that was right clicked on.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Custom itemRenderer
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of valdhor
  Sent: Tuesday, August 05, 2008 9:05 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Add a context menu to a menubar item
  
  
  
  Either this is really easy and I've missed it or it's really quite
  difficult.
  
  I have a MenuBar that is created from an ArrayCollection that is
  returned from a RemoteObject call:
  
  mx:MenuBar id=menuBar itemClick=menuHandler(event)
  dataProvider={menuBarCollection} /
  
  How would I get at each item so I can add a context menu to each menu
  item?
 





[flexcoders] CursorManager problem - custom cursor disappears

2008-08-07 Thread ferriejbank
Hi,

I'm having this really weird problem in Flex 2.0.1 using LCDS ES 2.5.1
where whatever I do using CursorManager to change the cursor (like to
activate the BusyCursor or any kind of custom cursor, no matter what
priority) all my mouse pointer does is just disappear into nothing.

As soon as I reset the BusyCursor or remove my custom one, the
original regular mouse pointer image is restored.

The thing that really drives me crazy is that standard component
classes like mx.rpc.http.mxml.HTTPService make the same call
succesfully! In the same application.

I tried all kinds of workarounds, like employing callLater() so I
could do the time consuming stuff from a separate function call (so
the pointer will be updated), but that doesn't help. The mouse pointer
is actually instantly updated but simply disappears instead of showing
the different cursor.

Any ideas on this? Did anyone ever had a similar experience?

Regards,
Ferrie



[flexcoders] Re: BlazeDS/LCDS on Jboss 4.2.3

2008-08-07 Thread valdhor
Would you mind posting the fix (Just so it's available later on when
someone is searching).


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

 nevermind, figure out my problem
  
 Dimitrios Gianninas
 RIA Developer and Team Lead
 Optimal Payments Inc.
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Dimitrios Gianninas
 Sent: Thursday, July 31, 2008 11:16 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] BlazeDS/LCDS on Jboss 4.2.3
 
 
 
 Just wondering if anyone has deployed BlazeDS/LCDS on JBoss 4.2.3
and got the authentication stuff to work?
  
 Got everything configured as it should be but when I do
  
 myRemoteObject.setCredentials( falcon, falconfalcon );
  
 in my flex app, I get no response and when I try a remote call it
fails and I see the following in the debug log:
  
 '837C1F01-1993-5303-FCA0-79AC9C93A63C' producer sending message
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'
 'my-amf' channel endpoint set to
http://localhost:8080/xlogin/messagebroker/amf
http://localhost:8080/xlogin/messagebroker/amf 
 'my-amf' channel settings are:
 channel id=my-amf type=mx.messaging.channels.AMFChannel
   endpoint
uri=http://{server.name}:{server.port}/xlogin/messagebroker/amf/
http://{server.name}:{server.port}/xlogin/messagebroker/amf/ 
   properties/
 /channel
 'my-amf' pinging endpoint.
 'my-amf' channel got status. (Object)#0
   code = NetConnection.Call.BadVersion
   description = 
   details = 
   level = error
 'my-amf' channel polling stopped.
 'my-amf' channel connect failed.
 '837C1F01-1993-5303-FCA0-79AC9C93A63C' producer channel faulted with
Channel.Connect.Failed NetConnection.Call.BadVersion: : url:
'http://localhost:8080/xlogin/messagebroker/amf'
 '837C1F01-1993-5303-FCA0-79AC9C93A63C' producer fault for
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'.
  
 However... if I go to my login.jsp and login successfull and then
access my Flex app and try a remote call, it all works like a champ!
  
 So what am I missing?
  
 Dimitrios Gianninas
 RIA Developer and Team Lead
 Optimal Payments Inc.
  
 AVIS IMPORTANT
 
 WARNING
 
 Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé. L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation. Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système. La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.
 
 This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient. No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message. If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system. The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful. If you have received this e-mail
in error, please notify the sender.
 
  
 
 -- 
 WARNING
 ---
 This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient.  No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message.  If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system.  The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful.  If you have received this e-mail
in error, please notify the sender.
 
 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé.  L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation.  Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que 

[flexcoders] Text control - first line disappears

2008-08-07 Thread Heiko Niemann
Hi,

I have a multiline (HTML)text in a text control. When I select it and
get beyond its last line/character and move further down the whole
text will suddenly jump up one line, so the first line is not visible
anymore.

Is this a bug or is there a way to prevent this behavior (besides
making the text non-selectable)?

You can check this behavior in the text control of the component explorer:

http://examples.adobe.com/flex3/componentexplorer/explorer.html


Heiko



[flexcoders] SummaryObject Warning, no clue what it means...

2008-08-07 Thread bredwards358
While checking to make sure my summary information was correct, I got
this warning while debugging the application:

warning: unable to bind to property 'total2' on class
'mx.collections::SummaryObject' (class is not an IEventDispatcher)
warning: unable to bind to property 'total3' on class
'mx.collections::SummaryObject' (class is not an IEventDispatcher)

While the information displays correctly, I can't seem to figure out
what this warning means, much less how to correct it. I need some
clarification on this. Thanks in advance,

Brian Ross Edwards
Tech-Connect LLC




Re: [flexcoders] SummaryObject Warning, no clue what it means...

2008-08-07 Thread Josh McDonald
It means mx.collections.SummaryObject does not dispatch events, therefore it
can't dispatch PropertyChanged events, which is how bindings know that your
data has been updated.

On Thu, Aug 7, 2008 at 11:09 PM, bredwards358 [EMAIL PROTECTED]wrote:

 While checking to make sure my summary information was correct, I got
 this warning while debugging the application:

 warning: unable to bind to property 'total2' on class
 'mx.collections::SummaryObject' (class is not an IEventDispatcher)
 warning: unable to bind to property 'total3' on class
 'mx.collections::SummaryObject' (class is not an IEventDispatcher)

 While the information displays correctly, I can't seem to figure out
 what this warning means, much less how to correct it. I need some
 clarification on this. Thanks in advance,

 Brian Ross Edwards
 Tech-Connect LLC



 

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






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

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


[flexcoders] Re: How to save datagrid data to a Arraycollection?

2008-08-07 Thread markflex2007
Hi,

myCollection.getItemAt(i) is used to go over arraycollection.

I want to make the second Arraycollection get data from datagrid
(because I can change order in datagrid). so the order of data in
myCollection1 are different with myCollection.
 
I want to know how to go over the data in datagrid.

Thanks

Mark



[flexcoders] Re: Add a context menu to a menubar item

2008-08-07 Thread Amy
--- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote:

 Ok, I have created a custom itemRenderer which displays my context
 menu perfectly.
 
 Now, how do I get at the menu item data that the context menu came 
from.
 
 IOW, I left click on my menu bar which drops down a menu; I then right
 click on a menu item (Let's say it is Show some Cool Stuff) which
 brings up my custom context menu. I then left click on my custom
 context menu item. This generates a ContextMenuEvent.MENU_ITEM_SELECT
 event which I have an eventListener for. The trouble is, there is
 nothing in that event that lets me know what the original item was
 that was right clicked on.

This might give you some ideas:

http://flexdiary.blogspot.com/2008/07/musings-on-advanceddatagrid-part-
5_03.html



[flexcoders] Loading Stuff In Order - Advice?

2008-08-07 Thread nwebb
Hi,

I have a small application. A single view is declared in the main *mxml *file.
This view loads some [remote] data upon initialisation.

I  rejigged the application so that it loads in a config file first (this
config file contains the url from which I should load the data). Initially
the config file didn't finish loading in until after my view's *
initialization* event had fired .. so the view attempted to load data but
threw an error.

To solve this I plumped for declaring my view in MXML, but changing its
creationPolicy to none, then calling createComponentsFromDescriptors()
once my config had loaded. It works fine. I also realise there are various
other ways to solve this (e.g. I could call my view's init() method
manually, or I could add the view using ActionScript  both being done
after the config file had loaded).

I wanted to post because I'm curious to find out how other people have been
handling situations like this, and what arguments for/against your own
methods you have become aware of (mainly because I think it could make a
really useful blog post). So if you can spare a moment, I would appreciate
the feedback. For example, do you feel that it's unacceptable to make data
requests from within a View, even in a small app, and if so what would you
change? All that kind of stuff is useful :)

Cheers,
Neil

p.s. I haven't really run in to this before because I usually don't make
data calls from inside views (but rather in Commands). As this is a small
application I wonder if setting up a FrontController would be overkill
though.


[flexcoders] Problems with nudgescrolling when programatically clicking items in DataGrid

2008-08-07 Thread bsensale
Hello,

I'm writing some tools to automate clicking items in datagrids through 
mouse events.  Right now that means scrolling to an index, and calling 
mouseDown, then mouseUp on datagrid.indexToItemRenderer(idx).  The 
problem is if the physical mouse cursor happens to be below the 
datagrid when the mouseDown is called, the datagrid will nudge scroll 
before the mouseUp is called if there's any delay whatsoever.

I don't want to necessarily disable nudge scrolling for the grid; this 
is merely for automation purposes, so I was wondering if there was any 
way on the fly to either force the mouse to move into the datagrid so 
it won't nudge scroll, or to somehow disable nudge scrolling on the fly 
quickly, so I can run the automation.

I've put together a simple (and poorly written, sorry!) app showing the 
behavior.  If you click the button, it dispatches a mouseDown event to 
item 0 in the datagrid, then sets up a 10 ms timer.  When that timer 
fires, it checks if the item is still visible before firing the mouseUp.


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
mx:Script
![CDATA[
import mx.controls.Text;
import flash.sampler.NewObjectSample;
import flash.utils.setInterval;
function onButtonClick(event:MouseEvent):void {
textArea.text = ;
var mouseDown:MouseEvent = new MouseEvent
(MouseEvent.MOUSE_DOWN, true, false, 0, 0, null, false, false, false, 
true);
datagrid.scrollToIndex(0);
var obj:Object = datagrid.indexToItemRenderer(0);
if(obj == null) {
textArea.text += Object was null!\n;
}
else {
textArea.text += Object:  + obj.toString() + \n;
obj.dispatchEvent(mouseDown);
}


var t:Timer = new Timer(10, 1);
t.addEventListener(TimerEvent.TIMER, timerHandler);
t.start();
}

function timerHandler(evt:Object) {
var mouseUp:MouseEvent = new MouseEvent
(MouseEvent.MOUSE_UP, true, false, 0, 0, null, false, false, false, 
false);
var obj2:Object = datagrid.indexToItemRenderer(0);
if(obj2 == null) {
textArea.text += Object2 was null!\n;
}
else {
textArea.text += Object2:  + obj2.toString() 
+ \n;
obj2.dispatchEvent(mouseUp);
}
}
]]
/mx:Script
mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
mx:dataProvider
mx:Object col1=a col2=a/
mx:Object col1=b col2=b/
mx:Object col1=c col2=b/
mx:Object col1=d col2=b/
mx:Object col1=e col2=b/
mx:Object col1=f col2=b/
mx:Object col1=g col2=b/
mx:Object col1=h col2=h/
mx:Object col1=i col2=i/
mx:Object col1=j col2=j/
/mx:dataProvider
mx:columns
mx:DataGridColumn headerText=Column 1 dataField=col1/
mx:DataGridColumn headerText=Column 2 dataField=col2/
/mx:columns
/mx:DataGrid
mx:Button id=button y=479 label=Click Me! 
click=onButtonClick(event) horizontalCenter=0/
mx:TextArea id=textArea y=216 width=501 height=255 
horizontalCenter=-9/

/mx:Application





[flexcoders] Tracking bytes loaded bandwidth usage on streaming videos

2008-08-07 Thread nathanpdaniel
How can I track the amount of bandwidth used on a streaming video?  For 
progressive download of video, we can say the user downloaded X number 
of bytes.  However, if the video is streaming, there's no way for me to 
say X number of bytes have been downloaded/transfered/whatevered - at 
least not that I can find.  Anyone have any ideas?



[flexcoders] Tracking bytes loaded bandwidth usage on streaming video

2008-08-07 Thread nathanpdaniel
How can I track the amount of bandwidth used on a streaming video? For
progressive download of video, we can say the user downloaded X number
of bytes. However, if the video is streaming, there's no way for me to
say X number of bytes have been downloaded/transfered/whatevered - at
least not that I can find. Anyone have any ideas?

Secondly, on progressive download, how do you kill the download 
process?  I want the download to stop downloading if the user navigates 
away from the video.  I've yet to find any way to stop the progressive 
download process... 





Re: [flexcoders] Where are the AIR resources?

2008-08-07 Thread Steve Mathews
It turned out to be an issue on my part. I figured it out and got it
working.

As to security, now that my Flex swf is in the app directory, can't someone
just drop a new one in there and my AIR app think it is secure? Do I need to
verify swfs and html loaded from the app directory?

On Wed, Aug 6, 2008 at 6:12 PM, Alex Harui [EMAIL PROTECTED] wrote:

  Where's the HTML page loaded from?  Domain security rules apply to that
 too.

  --
  *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Steve Mathews
 *Sent:* Wednesday, August 06, 2008 4:20 PM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Where are the AIR resources?

 Ok, so after all this discussion (thank you by the way) I came to the
 realization that what I needed to do is be running my Flex swf as trusted.
 So I moved it and all my in-house created support swf to the app directory
 so they are installed with the app. So far so good, as I already had support
 for loading my resources from a different path by setting a var in the embed
 code.

 Now I have a new issue in that when you hit Esc in my Flex swf I call both
 a ExternalInterface call and an fscommand to let the container know about
 it. I had it working where my hosting html page was getting these calls, but
 now it doesn't seem to be. I would have expected it the other way around
 where as non-trusted the calls would get lost and as trusted they would
 work. Any ideas?

 On Tue, Aug 5, 2008 at 3:13 PM, Alex Harui [EMAIL PROTECTED] wrote:

  I'm sure there is a way to do that right now.  It might be a planned
 feature for a future AIR release.  You can try it though.

 This post:
 http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.html#more
  implies
 that you can't and should use loadBytes instead.

 -Alex

  --
  *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Steve Mathews
 *Sent:* Tuesday, August 05, 2008 2:58 PM
 *To:* flexcoders@yahoogroups.com

 *Subject:* Re: [flexcoders] Where are the AIR resources?

 Alex,

 Yes, it isn't an error, just the security dialog because my swf has
 -use-network=true but it is running locally. In theory I can compile a
 'local' version, but there are some webservices that I would like to consume
 even on the desktop. Also, I don't think telling the user to trust the
 app-storage folder is a good solution. You mention getting it into the same
 directory as the main swf. Can you expand on that comment?

 Thanks

 On Tue, Aug 5, 2008 at 11:09 AM, Alex Harui [EMAIL PROTECTED] wrote:

  You didn't say what error you are getting, but I'll bet it is that a
 localWithNetworking swf can't access local assets.

 Good thing we have that security check otherwise if you downloaded a
 spyware SWF, someone would be stealing your identity.
 So, no matter what, if you suck down SWF bits and launch them locally,
 please find a way to validate them against a man-in-the-middle attack.  We
 have a SHA library you can use.

 Once you truly trust the SWF bits, the next question is why your SWF
 needs network access.  If it doesn't, turn it off and you won't get
 warnings.  If it does need network access, I think your choices are to find
 a way load it into a trusted directory (users can opt to trust certain
 directories, or you somehow get it into the same directory as the main SWF),
 or proxy the network I/O or file system I/O through the main app.

 I don't think HTMLLoader or an intermediary HTML file is going to help.

 -Alex

  --
  *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 *On Behalf Of *Steve Mathews
 *Sent:* Tuesday, August 05, 2008 10:48 AM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Where are the AIR resources?

 Let me give some specific examples so hopefully we can get this to
 work.

 What I am creating is a player for a custom file type. The file is
 basically a zip (with different extension) that when opened is extracted to
 the app-storage location. This is just resources. Next I have a Flex based
 swf that can actually run with these resources. What I was thinking is that
 I could just copy this swf (and some others that it loads) into the
 app-storage directory and load it.

 So what I have started with is a Flex based AIR application that
 registers as the default for the file extension, loads the file and extracts
 it to the app-storage. After I copy (mannulay for now) the external Flex swf
 and an html page to the app-storage, I load the html into AIR using the
 HTMLLoader. Eventually I would like to be able to update the external swf
 and some of the other supporting swfs, so please keep that in mind when
 making recommendations.

 Thanks for the help,
 Steve



 On Mon, Aug 4, 2008 at 5:11 PM, Alex Harui [EMAIL PROTECTED] wrote:

  Just so I'm clear.  You have a AIR SWF based on Flex that is using
 HTMLLoader to load another Flex 

RE: [flexcoders] Re: BlazeDS/LCDS on Jboss 4.2.3

2008-08-07 Thread Dimitrios Gianninas
I had blocked all calls to the MessageBroker servlet by adding a security 
constraint in the web.xml which is no good for Flex...cause then the SWF cannot 
communicate with the server at all.
 
This is the constraint that was there that I removed:
 
security-constraint
web-resource-collection
  url-pattern/*/url-pattern
  http-methodDELETE/http-method
  http-methodGET/http-method
  http-methodPOST/http-method
  http-methodPUT/http-method
/web-resource-collection
auth-constraint
  role-namefcnuser/role-name
/auth-constraint
user-data-constraint
  transport-guaranteeNONE/transport-guarantee
/user-data-constraint
  /security-constraint
 
Dimitrios Gianninas
RIA Developer and Team Lead
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of valdhor
Sent: Thursday, August 07, 2008 9:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BlazeDS/LCDS on Jboss 4.2.3



Would you mind posting the fix (Just so it's available later on when
someone is searching).

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

 nevermind, figure out my problem
 
 Dimitrios Gianninas
 RIA Developer and Team Lead
 Optimal Payments Inc.
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On Behalf Of Dimitrios Gianninas
 Sent: Thursday, July 31, 2008 11:16 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] BlazeDS/LCDS on Jboss 4.2.3
 
 
 
 Just wondering if anyone has deployed BlazeDS/LCDS on JBoss 4.2.3
and got the authentication stuff to work?
 
 Got everything configured as it should be but when I do
 
 myRemoteObject.setCredentials( falcon, falconfalcon );
 
 in my flex app, I get no response and when I try a remote call it
fails and I see the following in the debug log:
 
 '837C1F01-1993-5303-FCA0-79AC9C93A63C' producer sending message
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'
 'my-amf' channel endpoint set to
http://localhost:8080/xlogin/messagebroker/amf 
http://localhost:8080/xlogin/messagebroker/amf 
http://localhost:8080/xlogin/messagebroker/amf 
http://localhost:8080/xlogin/messagebroker/amf  
 'my-amf' channel settings are:
 channel id=my-amf type=mx.messaging.channels.AMFChannel
 endpoint
uri=http://{server.name}:{server.port}/xlogin/messagebroker/amf/
http://{server.name}:{server.port}/xlogin/messagebroker/amf/ 
 properties/
 /channel
 'my-amf' pinging endpoint.
 'my-amf' channel got status. (Object)#0
 code = NetConnection.Call.BadVersion
 description = 
 details = 
 level = error
 'my-amf' channel polling stopped.
 'my-amf' channel connect failed.
 '837C1F01-1993-5303-FCA0-79AC9C93A63C' producer channel faulted with
Channel.Connect.Failed NetConnection.Call.BadVersion: : url:
'http://localhost:8080/xlogin/messagebroker/amf 
http://localhost:8080/xlogin/messagebroker/amf '
 '837C1F01-1993-5303-FCA0-79AC9C93A63C' producer fault for
'C36DF068-C3FB-BA3B-F07E-79AD2A0CC9D5'.
 
 However... if I go to my login.jsp and login successfull and then
access my Flex app and try a remote call, it all works like a champ!
 
 So what am I missing?
 
 Dimitrios Gianninas
 RIA Developer and Team Lead
 Optimal Payments Inc.
 
 AVIS IMPORTANT
 
 WARNING
 
 Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé. L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation. Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système. La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.
 
 This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient. No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message. If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system. The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful. If you have received this e-mail
in error, please notify 

[flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Gus
 I don't think 200meg is a lot these days is it ?

Well I think it depends on how many projects, libraries, etc you have.
and also if you are compiling... etc. 



[flexcoders] Re: Error: Service was not found in the Cairngorm Services registry.

2008-08-07 Thread sk_acura
Hi All,

  I am able to resolve the Issue by using the ServiceLocator from
Cairngorm rather than the one from UM Extensions.

  Accordingly i needed to change the Services.mxml File..

Regards
Mars

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

 On Wednesday 06 Aug 2008, sk_acura wrote:
 I did lot of testing and Still cannot figure out why the
  ServiceLocator is unable to get the RemoteObjects..
 
 ...
 
  And my remoting-config.xml is as listed below:
 
 Cairngorm Services registry doesn't mean that does it, but the 
 ServiceLocator, maybe ?
 
 -- 
 Tom Chiverton
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Johannes Nel
i vm my work enviroment and two instances of eclipse (either while working
on plugins or building stuff side by side) is a annoying at times.

On Thu, Aug 7, 2008 at 5:01 PM, Gus [EMAIL PROTECTED] wrote:

I don't think 200meg is a lot these days is it ?

 Well I think it depends on how many projects, libraries, etc you have.
 and also if you are compiling... etc.

  




-- 
j:pn
\\no comment


[flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Daniel
200MB? javaw.exe can take up to 700MB when running builder for a
couple of hours... That's a lot of memory...


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

  I don't think 200meg is a lot these days is it ?
 
 Well I think it depends on how many projects, libraries, etc you have.
 and also if you are compiling... etc.





Re: [flexcoders] Testing Internet Connection in Flex

2008-08-07 Thread Brian Deitte
If it's not AIR, just add event listeners for this, usually an
IOErrorEvent.  If you can listen for SecurityErrorEvent, make sure to
do this as well, since depending on what you're loading, this could
show up as the event for a connection being down.  -Brian

On Wed, Aug 6, 2008 at 4:06 PM, nagaofthesea [EMAIL PROTECTED] wrote:
 Howdy-

 Does anyone know of a way (AS3 or mx:CustomComponent) that tests if
 the user's internet connection is live?

 I have an application with error processing that needs to know if an
 RPC failed because the user's connection is down...

 Thanks!
 Naga

 


Re: [flexcoders] Data caching dto's

2008-08-07 Thread Brian Deitte
Caching of data across browser sessions, I assume?  This is usually
done with SharedObject.  But I wonder if there's a way to rearchitect
your application so this isn't needed?  I assume that all 500 objects
aren't shown at once and that you could implement some kind of paging
mechanism.  -Brian

On Wed, Aug 6, 2008 at 3:17 PM, flexaustin [EMAIL PROTECTED] wrote:
 I was wondering if anyone has done any caching of data in Flex? And if
 so how did you do this?

 I have an application that pulls in up to 500 items and converts them
 to DTO's. The app then runs a routine, which generates objects based
 on those dto's. The generation of objects is very memory intensive so
 I need to reduce this to increase usability as right now the user has
 to wait until all 500 objects are created. I would like to be able to
 generate say the first 10 objects based off the old data, if the data
 hasn't changed since the last time the data was grab (via httpservice)
 then run the routine to create the other 490 objects.

 So sorting by saying N changed?...yes through out, N + 1
 changed?no keep create object, N + 2 changed? yes through
 out.N+10 stop.
 Run...routine recreate the other 490 and stick them back in the
 correct order.

 Make sense?

 


[flexcoders] Flex 3 SWCs within CS3

2008-08-07 Thread Brian Deitte
Can you use framework-less Flex 3 SWCs within CS3?  I'm having a hard
time googling about information on this.  I assumed that you could do
this if the compatibility-version flag was used and you didn't use any
of the Flex framework.  The SWFs I'm creating in Authoring, however,
are 1k and don't seem to actually use the classes in the SWC.  I
haven't tried decompiling the SWF yet to see what's actually happening
in it.  But is this expected to work?  -Brian


[flexcoders] removing default 1/1/70 label on DateTimeAxis

2008-08-07 Thread blc187
A DateTimeAxis on a chart with no data shows 1 label: 1/1/70.
Is there a way to either make the whole axis invisible, or not show any 
date labels at all?

I want to do this before I populate the chart, then when the data comes 
in, turn the visibility back on so that the 1/1/70 never shows.



[flexcoders] Re: Data caching dto's

2008-08-07 Thread flexaustin
Actually obtaining the data isn't the issue. I more interested how do
I go about comparing the old data to the new data?  Array, some sort
of custom hash, or xml. Which is faster or better?

I would think array would be best by comparing old data array to new
data array and then creating a third data array that holds all those
that haven't changed?

Yes all 500 objects are shown at once. The issue isn't getting the
data its how slow and processor intensive it is to create the objects
all over again if the data has changed.




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

 Caching of data across browser sessions, I assume?  This is usually
 done with SharedObject.  But I wonder if there's a way to rearchitect
 your application so this isn't needed?  I assume that all 500 objects
 aren't shown at once and that you could implement some kind of paging
 mechanism.  -Brian
 
 On Wed, Aug 6, 2008 at 3:17 PM, flexaustin [EMAIL PROTECTED] wrote:
  I was wondering if anyone has done any caching of data in Flex? And if
  so how did you do this?
 
  I have an application that pulls in up to 500 items and converts them
  to DTO's. The app then runs a routine, which generates objects based
  on those dto's. The generation of objects is very memory intensive so
  I need to reduce this to increase usability as right now the user has
  to wait until all 500 objects are created. I would like to be able to
  generate say the first 10 objects based off the old data, if the data
  hasn't changed since the last time the data was grab (via httpservice)
  then run the routine to create the other 490 objects.
 
  So sorting by saying N changed?...yes through out, N + 1
  changed?no keep create object, N + 2 changed? yes through
  out.N+10 stop.
  Run...routine recreate the other 490 and stick them back in the
  correct order.
 
  Make sense?
 
 





Re: [flexcoders] Loading Stuff In Order - Advice?

2008-08-07 Thread Ralf Bokelberg
I'm using states to do this. As soon, as the data is loaded, i switch
currentState to dataLoadedState, which adds the view.

Cheers
Ralf.

On Thu, Aug 7, 2008 at 4:11 PM, nwebb [EMAIL PROTECTED] wrote:
 Hi,

 I have a small application. A single view is declared in the main mxml file.
 This view loads some [remote] data upon initialisation.

 I  rejigged the application so that it loads in a config file first (this
 config file contains the url from which I should load the data). Initially
 the config file didn't finish loading in until after my view's
 initialization event had fired .. so the view attempted to load data but
 threw an error.

 To solve this I plumped for declaring my view in MXML, but changing its
 creationPolicy to none, then calling createComponentsFromDescriptors()
 once my config had loaded. It works fine. I also realise there are various
 other ways to solve this (e.g. I could call my view's init() method
 manually, or I could add the view using ActionScript  both being done
 after the config file had loaded).

 I wanted to post because I'm curious to find out how other people have been
 handling situations like this, and what arguments for/against your own
 methods you have become aware of (mainly because I think it could make a
 really useful blog post). So if you can spare a moment, I would appreciate
 the feedback. For example, do you feel that it's unacceptable to make data
 requests from within a View, even in a small app, and if so what would you
 change? All that kind of stuff is useful :)

 Cheers,
 Neil

 p.s. I haven't really run in to this before because I usually don't make
 data calls from inside views (but rather in Commands). As this is a small
 application I wonder if setting up a FrontController would be overkill
 though.


 


[flexcoders] Changing Parents

2008-08-07 Thread wwwpl
I have an image viewer that I would like to go full screen.  I now have 
my app taking up the full screen, but I need the image viewer window  
to become the size of the app window.  The image viewer is a child of a 
child of a child of the Application.  I am calling application.addChild
(imageViewer) to get this to go full screen, but when I want to go back 
to the normal view, I do a application.removeChild(imageViewer) and I 
want to add it back to the parent it had before.  But that doesn't 
work.  How can I change parents of a component without causing havoc?



Re: [flexcoders] Changing Parents

2008-08-07 Thread Brian Deitte
I did this recently, and it didn't cause havoc.  What are seeing that
goes wrong?  I had two issues that I did needed to fix.  One is that
you have to remember to remove the child from the stage before adding
it back to the application.  The second is that the bindings were
reexecuted when added back to the application, which I worked around
by checking for the same value in the places I was observing bindings.
 -Brian

On Thu, Aug 7, 2008 at 11:53 AM, wwwpl [EMAIL PROTECTED] wrote:
 I have an image viewer that I would like to go full screen. I now have
 my app taking up the full screen, but I need the image viewer window
 to become the size of the app window. The image viewer is a child of a
 child of a child of the Application. I am calling application.addChild
 (imageViewer) to get this to go full screen, but when I want to go back
 to the normal view, I do a application.removeChild(imageViewer) and I
 want to add it back to the parent it had before. But that doesn't
 work. How can I change parents of a component without causing havoc?

 


Re: [flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Tom Chiverton
On Thursday 07 Aug 2008, Gus wrote:
 Well I think it depends on how many projects, libraries, etc you have.

Well, of course.

 and also if you are compiling... etc.

I see higher spikes, but 200meg is about a rough average, and I'll have 
several projects open (CFML, Flex, Perl, plain text etc.).

-- 
Tom Chiverton



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Problem in Identfying Flash Objects in QTP 9.2

2008-08-07 Thread Anthony DeBonis
Did you include automation.swc, automation_agent.swc, and qtp.swc?

Besure to use IE and not Firefox... but if your using ActiveX I would 
guess your already using firefox.

Also - turn off Tabbed browsing - this can cause issues.



It should work 



[flexcoders] Different separator line colors on AdvancedDatagrid

2008-08-07 Thread Pun Sophany
Hello,
I want to draw horizontal separators between rows with different line
colors depending on the row data.
I tried to use optimized item renderers but the performance was still
too slow during vertical scrolling.
I also tried to extend AdvancedDatagridItemRenderer and set border at
true. But I couldn't choose border sides and I only want a border on the
bottom side.
Next I attempted to override the drawHorizontalLine method from
AdvancedDatagrid class:
drawHorizontalLine is called from drawHorizontalSeparators().

override protected function drawHorizontalLine(s:Sprite, rowIndex:int,
color:uint, y:Number):void {
 if(indexToItemRenderer(rowIndex) != null) {
 var myObj:Object = indexToItemRenderer(rowIndex).data;
 var g:Graphics = s.graphics;
 if (myObj.name == John) {
 g.lineStyle(1, 0xff);
 g.moveTo(0, y);
 g.lineTo(width, y);
 } else {
 g.lineStyle(1, 0x00);
 g.moveTo(0, y);
 g.lineTo(width, y);
 }
 }
}

The first display is correct. But after a vertical scroll, horizontal
lines keep their position and are not redrawn no matter what the row is,
because drawHorizontalSeparators() is not recalled.
So I tried to call drawHorizontalSeparators() on Scroll event: failure,
separator lines on top and bottom rows disappear during the vertical
scroll.

Is there a way I can draw different horizontal separators depending on
data without using item renderers?

Thanks in advance.

Sophany


[flexcoders] Compressing BitmapData

2008-08-07 Thread Jesse Warden
How can you compress BitmapData in Flash to reduce the amount of RAM it
uses?

I need to scrub H264 video frame by frame.  You cannot do this utilizing
NetStream.seek because it seeks to the nearest keyframe.  This would require
the video to consist of nothing but keyframes.  Naturally this is not an
option for file size and playback performance reasons.  So, what I did was
record a 10 second section of the video using BitmapData.draw ( t3hV1d30 ),
shove the captures in an Array, and playback in a simple Bitmap swapper.  It
works well, allowing me to scrub frame by frame...

... except for the RAM; it takes 30 to 40 megs for just 10 seconds of
640x480 captures.  Someone mentioned ByteArray.deflate.  Looking for any
ideas on how to reduce the RAM cost here???

-- sorry for the x-post for those on Flash_Tiger --


Re: [flexcoders] XML Document and Navigation

2008-08-07 Thread Sid Maskit
If you have to perform basically the same operation at each level of your XML, 
one way to deal with an open-ended number of levels is to use recursion.

I apologize for not saying more, but I am running out the door, and don't have 
time to write up any kind of sample code on this. However, I'm sure that if you 
google for things like recursion or recursive function, you should find lots of 
information on how this approach works. I'd also guess that Wikipedia has a 
good article on this.

Hope that helps,


 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Patrick J. Jankun [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, September 7, 2008 4:30:50 AM
Subject: [flexcoders] XML Document and Navigation


Hello Everyone,

I run into a problem, something that probably a lot of people here knows how to 
solve.
But after sitting for 2 days building nestes for loops, i can't see the light 
by the end of the tunnel :-)

So, here is a problem:

I have to build an xml based navigation, so far, quite simple and clear. Made 
it already a few times,
but, now, this is a bit more complicated, because i got a much deeper nested 
sub levels, and i really
don't know how to efficient traverse the document and build the navigation out 
of it :|

The most complex navigation i made had 2 levels, so it wasn't really hard to 
imagine the code for this task:
2 for loops done the nav creation and that's it, but i got now, an undefined 
deep, and i don't know how to
bite the code that will build the nav, that goes a bit deeper then one-sub 
level.

Do you guys got any examples or thoughts on how to solve the task?
Im pretty sure that i got an logical error in my approach, since i will use 
some nested for loops, but i can't
think the formula since i don't know how deep each of the nodes goes, and 
this task gives me headaches.

any kind of help and pinpointing to right direction would be VERY appreciated

cheers,
Patrick


 - - - ---
fancy skills to pay the bills
www.jankun.org
 
Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun. org 



  

[flexcoders] Re: Changing Parents

2008-08-07 Thread wwwpl
Forgive me, but how do you remove the child from the stage?  Did you 
do the following (using my example):

//Go to full screen
app.addChild(imageViewer);
subcomponent.removeChild(imageViewer);

//Go to normal screen
subcomponent.addChild(imageViewer);
app.removeChild(imageViewer);

The problem I am having is putting the imageViewer back into the 
subcomponent.  It does not reappear in the subcomponent.

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

 I did this recently, and it didn't cause havoc.  What are seeing 
that
 goes wrong?  I had two issues that I did needed to fix.  One is that
 you have to remember to remove the child from the stage before 
adding
 it back to the application.  The second is that the bindings were
 reexecuted when added back to the application, which I worked around
 by checking for the same value in the places I was observing 
bindings.
  -Brian
 
 On Thu, Aug 7, 2008 at 11:53 AM, wwwpl [EMAIL PROTECTED] wrote:
  I have an image viewer that I would like to go full screen. I now 
have
  my app taking up the full screen, but I need the image viewer 
window
  to become the size of the app window. The image viewer is a child 
of a
  child of a child of the Application. I am calling 
application.addChild
  (imageViewer) to get this to go full screen, but when I want to 
go back
  to the normal view, I do a application.removeChild(imageViewer) 
and I
  want to add it back to the parent it had before. But that doesn't
  work. How can I change parents of a component without causing 
havoc?
 
 





[flexcoders] How to fix this?

2008-08-07 Thread markflex2007
Hi,

I try to catch a change happen for ArrayCollection,but I get follow error.

ReferenceError: Error #1069: Property myCollection not found on
changeOrder and there is no default value.

but I already have myCollection,why this happen.

Thanks

Mark


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=initApp() 
mx:Script
![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;  
 import mx.binding.utils.*; 
  
[Bindable]
private var myCollection:ArrayCollection =   new
ArrayCollection([{order: '1', name: 'Matthews'},{order: '2', name:
'Mark'},{order: '3', name: 'Tony'}]);
private var myCollection1:ArrayCollection = new 
ArrayCollection();

public function initApp():void{  
  
   BindingUtils.bindSetter(watcherListener, this,
myCollection , true);   

} 

public function  watcherListener(value:ArrayCollection):void
{
Alert.show (change);
} 


private function finishit():void{

 
  myCollection1 = dg1.dataProvider as ArrayCollection;  
  
  Alert.show(ok);
} 


]]
/mx:Script
 
mx:DataGrid  id=dg1 x=105 y=149 dataProvider={myCollection}
dragEnabled=true dragMoveEnabled=true
 dropEnabled=true
mx:columns

mx:DataGridColumn headerText=Name List 
dataField=name /
 
/mx:columns
/mx:DataGrid
mx:Button x=105 y=359 label=save click=finishit()/

/mx:Application 




[flexcoders] Garbage Collection and event listeners

2008-08-07 Thread flexaustin
Is possible to remove all event listeners by doing something like the
following?

mc.removeEventListener(*,*,false);

Though not sure how you would get the count of eventlisteners or
iterate through them?

And as far as deleteing any reference to an object can you override
removechildren and add
 for(var i:int=0; ithis.numChildren-1; i++) 
{ var chld:DisplayObject = this.getChildAt(i); 
  chld.deleteReferenceOnParentDocument(this.parent);
}

Or is there a best practice when for when you write code like this:
addEventListener(ChildEvent.CHILD_ADDED,
handleAdd);

To override the removeChilden function to remove the event listener above?

Thanks in advance.

--JDog



Re: [flexcoders] Re: Changing Parents

2008-08-07 Thread Sid Maskit
I may be wrong, but I have a guess here.

First, you should not need your calls to removeChild. If you take an item that 
is currently in the display list, and use addChild to put it somewhere else in 
the display list, flex will automatically switch its parent from the old one to 
the new one.

My guess is that this is what is happening: subcomponent. addChild( 
imageViewer) ; is doing what you wanted to, but app.removeChild( imageViewer) 
; is then removing the imageViewer from the display list so that it disappears.

Try just removing the calls to removeChild.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: wwwpl [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, August 7, 2008 10:13:06 AM
Subject: [flexcoders] Re: Changing Parents


Forgive me, but how do you remove the child from the stage?  Did you 
do the following (using my example):

//Go to full screen
app.addChild( imageViewer) ;
subcomponent. removeChild( imageViewer) ;

//Go to normal screen
subcomponent. addChild( imageViewer) ;
app.removeChild( imageViewer) ;

The problem I am having is putting the imageViewer back into the 
subcomponent.  It does not reappear in the subcomponent.

--- In [EMAIL PROTECTED] ups.com, Brian Deitte [EMAIL PROTECTED]  wrote:

 I did this recently, and it didn't cause havoc.  What are seeing 
that
 goes wrong?  I had two issues that I did needed to fix.  One is that
 you have to remember to remove the child from the stage before 
adding
 it back to the application.  The second is that the bindings were
 reexecuted when added back to the application, which I worked around
 by checking for the same value in the places I was observing 
bindings.
  -Brian
 
 On Thu, Aug 7, 2008 at 11:53 AM, wwwpl [EMAIL PROTECTED] wrote:
  I have an image viewer that I would like to go full screen. I now 
have
  my app taking up the full screen, but I need the image viewer 
window
  to become the size of the app window. The image viewer is a child 
of a
  child of a child of the Application. I am calling 
application. addChild
  (imageViewer) to get this to go full screen, but when I want to 
go back
  to the normal view, I do a application. removeChild( imageViewer) 
and I
  want to add it back to the parent it had before. But that doesn't
  work. How can I change parents of a component without causing 
havoc?
 
 





  

RE: [flexcoders] How to fix this?

2008-08-07 Thread Alex Harui
Please post full stack traces, examples that actually compile and
examples that actually have the problem in it.  ChangeOrder does not
appear in the example.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markflex2007
Sent: Thursday, August 07, 2008 10:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to fix this?



Hi,

I try to catch a change happen for ArrayCollection,but I get follow
error.

ReferenceError: Error #1069: Property myCollection not found on
changeOrder and there is no default value.

but I already have myCollection,why this happen.

Thanks

Mark

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute creationComplete=initApp() 
mx:Script
![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection; 
import mx.binding.utils.*; 

[Bindable]
private var myCollection:ArrayCollection = new
ArrayCollection([{order: '1', name: 'Matthews'},{order: '2', name:
'Mark'},{order: '3', name: 'Tony'}]);
private var myCollection1:ArrayCollection = new ArrayCollection();

public function initApp():void{ 

BindingUtils.bindSetter(watcherListener, this,
myCollection , true); 

} 

public function watcherListener(value:ArrayCollection):void
{
Alert.show (change);
} 


private function finishit():void{


myCollection1 = dg1.dataProvider as ArrayCollection; 
Alert.show(ok);
} 


]]
/mx:Script

mx:DataGrid id=dg1 x=105 y=149 dataProvider={myCollection}
dragEnabled=true dragMoveEnabled=true
dropEnabled=true  
mx:columns

mx:DataGridColumn headerText=Name List dataField=name /

/mx:columns
/mx:DataGrid
mx:Button x=105 y=359 label=save click=finishit()/

/mx:Application 



 


RE: [flexcoders] Where are the AIR resources?

2008-08-07 Thread Alex Harui
Flex/AIR security is not designed to control what happens if an evil app
gets access to a computer's harddrive.  Once it can do that, it can
substitute an evil flash player, erase your hard drive, spread worms.
 
So, if you don't think your users have that level of control, then yes,
verify the SWFs before loading, but keep in mind, the evil app could
just modify your SWF that is doing the checking too.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Mathews
Sent: Thursday, August 07, 2008 7:37 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Where are the AIR resources?



It turned out to be an issue on my part. I figured it out and got it
working.
 
As to security, now that my Flex swf is in the app directory, can't
someone just drop a new one in there and my AIR app think it is secure?
Do I need to verify swfs and html loaded from the app directory?


On Wed, Aug 6, 2008 at 6:12 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


Where's the HTML page loaded from?  Domain security rules apply
to that too.




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Steve Mathews

Sent: Wednesday, August 06, 2008 4:20 PM 

To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Where are the AIR resources?




Ok, so after all this discussion (thank you by the way) I came
to the realization that what I needed to do is be running my Flex swf as
trusted. So I moved it and all my in-house created support swf to the
app directory so they are installed with the app. So far so good, as I
already had support for loading my resources from a different path by
setting a var in the embed code.
 
Now I have a new issue in that when you hit Esc in my Flex swf I
call both a ExternalInterface call and an fscommand to let the container
know about it. I had it working where my hosting html page was getting
these calls, but now it doesn't seem to be. I would have expected it the
other way around where as non-trusted the calls would get lost and as
trusted they would work. Any ideas?


On Tue, Aug 5, 2008 at 3:13 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:


I'm sure there is a way to do that right now.  It might
be a planned feature for a future AIR release.  You can try it though.
 
This post:
http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.h
tml#more
http://weblogs.macromedia.com/emalasky/archives/2008/04/remote_plugins.
html#more  implies that you can't and should use loadBytes instead.
 
-Alex




From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Steve Mathews

Sent: Tuesday, August 05, 2008 2:58 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  

Subject: Re: [flexcoders] Where are the AIR resources?




Alex,
 
Yes, it isn't an error, just the security dialog because
my swf has -use-network=true but it is running locally. In theory I can
compile a 'local' version, but there are some webservices that I would
like to consume even on the desktop. Also, I don't think telling the
user to trust the app-storage folder is a good solution. You mention
getting it into the same directory as the main swf. Can you expand on
that comment?
 
Thanks


On Tue, Aug 5, 2008 at 11:09 AM, Alex Harui
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  wrote:


You didn't say what error you are getting, but
I'll bet it is that a localWithNetworking swf can't access local assets.
 
Good thing we have that security check otherwise
if you downloaded a spyware SWF, someone would be stealing your
identity.
So, no matter what, if you suck down SWF bits
and launch them locally, please find a way to validate them against a
man-in-the-middle attack.  We have a SHA library you can use.
 
Once you truly trust the SWF bits, the next
question is why your SWF needs network access.  If it doesn't, turn it
off and you won't get warnings.  If it does need network access, I think
your choices are to find a way load it into a trusted directory (users
can opt to trust certain directories, or you somehow get 

RE: [flexcoders] Problems with nudgescrolling when programatically clicking items in DataGrid

2008-08-07 Thread Alex Harui
set dragEnabled=true
 
or use the mx_internal mouseX/Y override in UIComponent



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bsensale
Sent: Thursday, August 07, 2008 6:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problems with nudgescrolling when programatically
clicking items in DataGrid



Hello,

I'm writing some tools to automate clicking items in datagrids through 
mouse events. Right now that means scrolling to an index, and calling 
mouseDown, then mouseUp on datagrid.indexToItemRenderer(idx). The 
problem is if the physical mouse cursor happens to be below the 
datagrid when the mouseDown is called, the datagrid will nudge scroll 
before the mouseUp is called if there's any delay whatsoever.

I don't want to necessarily disable nudge scrolling for the grid; this 
is merely for automation purposes, so I was wondering if there was any 
way on the fly to either force the mouse to move into the datagrid so 
it won't nudge scroll, or to somehow disable nudge scrolling on the fly 
quickly, so I can run the automation.

I've put together a simple (and poorly written, sorry!) app showing the 
behavior. If you click the button, it dispatches a mouseDown event to 
item 0 in the datagrid, then sets up a 10 ms timer. When that timer 
fires, it checks if the item is still visible before firing the mouseUp.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  
layout=absolute
mx:Script
![CDATA[
import mx.controls.Text;
import flash.sampler.NewObjectSample;
import flash.utils.setInterval;
function onButtonClick(event:MouseEvent):void {
textArea.text = ;
var mouseDown:MouseEvent = new MouseEvent
(MouseEvent.MOUSE_DOWN, true, false, 0, 0, null, false, false, false, 
true);
datagrid.scrollToIndex(0);
var obj:Object = datagrid.indexToItemRenderer(0);
if(obj == null) {
textArea.text += Object was null!\n;
}
else {
textArea.text += Object:  + obj.toString() + \n;
obj.dispatchEvent(mouseDown);
}


var t:Timer = new Timer(10, 1);
t.addEventListener(TimerEvent.TIMER, timerHandler);
t.start();
}

function timerHandler(evt:Object) {
var mouseUp:MouseEvent = new MouseEvent
(MouseEvent.MOUSE_UP, true, false, 0, 0, null, false, false, false, 
false);
var obj2:Object = datagrid.indexToItemRenderer(0);
if(obj2 == null) {
textArea.text += Object2 was null!\n;
}
else {
textArea.text += Object2:  + obj2.toString() 
+ \n;
obj2.dispatchEvent(mouseUp);
}
}
]]
/mx:Script
mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
mx:dataProvider
mx:Object col1=a col2=a/
mx:Object col1=b col2=b/
mx:Object col1=c col2=b/
mx:Object col1=d col2=b/
mx:Object col1=e col2=b/
mx:Object col1=f col2=b/
mx:Object col1=g col2=b/
mx:Object col1=h col2=h/
mx:Object col1=i col2=i/
mx:Object col1=j col2=j/
/mx:dataProvider
mx:columns
mx:DataGridColumn headerText=Column 1 dataField=col1/
mx:DataGridColumn headerText=Column 2 dataField=col2/
/mx:columns
/mx:DataGrid
mx:Button id=button y=479 label=Click Me! 
click=onButtonClick(event) horizontalCenter=0/
mx:TextArea id=textArea y=216 width=501 height=255 
horizontalCenter=-9/

/mx:Application



 


RE: [flexcoders] Re: How to save datagrid data to a Arraycollection?

2008-08-07 Thread Alex Harui
If the DG re-ordered, then it got re-ordered in the collection.  The DG
doesn't have its own copy.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markflex2007
Sent: Thursday, August 07, 2008 6:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to save datagrid data to a
Arraycollection?



Hi,

myCollection.getItemAt(i) is used to go over arraycollection.

I want to make the second Arraycollection get data from datagrid
(because I can change order in datagrid). so the order of data in
myCollection1 are different with myCollection.

I want to know how to go over the data in datagrid.

Thanks

Mark



 


RE: [flexcoders] CursorManager problem - custom cursor disappears

2008-08-07 Thread Alex Harui
The cursor won't draw until code stops running.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ferriejbank
Sent: Thursday, August 07, 2008 5:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CursorManager problem - custom cursor disappears



Hi,

I'm having this really weird problem in Flex 2.0.1 using LCDS ES 2.5.1
where whatever I do using CursorManager to change the cursor (like to
activate the BusyCursor or any kind of custom cursor, no matter what
priority) all my mouse pointer does is just disappear into nothing.

As soon as I reset the BusyCursor or remove my custom one, the
original regular mouse pointer image is restored.

The thing that really drives me crazy is that standard component
classes like mx.rpc.http.mxml.HTTPService make the same call
succesfully! In the same application.

I tried all kinds of workarounds, like employing callLater() so I
could do the time consuming stuff from a separate function call (so
the pointer will be updated), but that doesn't help. The mouse pointer
is actually instantly updated but simply disappears instead of showing
the different cursor.

Any ideas on this? Did anyone ever had a similar experience?

Regards,
Ferrie



 


RE: [flexcoders] Re: Add a context menu to a menubar item

2008-08-07 Thread Alex Harui
You can file a request, but I think there's already one in there.
Several folks already deal with trying to select the item that got
right-clicked in a list.  They use mouseX/Y and track events to do it.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Thursday, August 07, 2008 5:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Add a context menu to a menubar item



Now that is definitely a hack/Kludge. Is there no other way? Maybe I
should file a feature request?

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

 Keep track of rollover events?
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of valdhor
 Sent: Wednesday, August 06, 2008 8:36 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Add a context menu to a menubar item
 
 
 
 Ok, I have created a custom itemRenderer which displays my context
 menu perfectly.
 
 Now, how do I get at the menu item data that the context menu came
from.
 
 IOW, I left click on my menu bar which drops down a menu; I then right
 click on a menu item (Let's say it is Show some Cool Stuff) which
 brings up my custom context menu. I then left click on my custom
 context menu item. This generates a ContextMenuEvent.MENU_ITEM_SELECT
 event which I have an eventListener for. The trouble is, there is
 nothing in that event that lets me know what the original item was
 that was right clicked on.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Custom itemRenderer
  
  
  
  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 valdhor
  Sent: Tuesday, August 05, 2008 9:05 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Add a context menu to a menubar item
  
  
  
  Either this is really easy and I've missed it or it's really quite
  difficult.
  
  I have a MenuBar that is created from an ArrayCollection that is
  returned from a RemoteObject call:
  
  mx:MenuBar id=menuBar itemClick=menuHandler(event)
  dataProvider={menuBarCollection} /
  
  How would I get at each item so I can add a context menu to each
menu
  item?
 




 


RE: [flexcoders] Checking swfs for malicious code!

2008-08-07 Thread Alex Harui
If you load content from another domain or sub-domain, it is loaded into
a secure sandbox and can't really do anything malicious.  If you load
from the same domain, it can do anything it wants.
 
If you load content from another domain or sub-domain, and another piece
of content from that same other domain or sub-domain, those two SWFs
can cross-script each other, so loading one at a time is best.
 
Until FP10, you cannot force unload content so evil content could appear
to unload but hang around to do evil things to the next content loaded.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Laurent Cozic
Sent: Thursday, August 07, 2008 2:13 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Checking swfs for malicious code!



I don't think you need to worry about security for loaded contents. The
Flash player does that very well already and there's probably no way a
Flash file could do anything malicious.


--
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com http://pogopixels.com 



--- On Thu, 8/7/08, superbokbok [EMAIL PROTECTED] wrote:


From: superbokbok [EMAIL PROTECTED]
Subject: [flexcoders] Checking swfs for malicious code!
To: flexcoders@yahoogroups.com
Date: Thursday, August 7, 2008, 8:45 AM



Don't know if this is the right place for this, but thought I'd
throw
out the question before I dive headlong into building something
that
isn't do-able.

Basically, I'm building a video player that would allow flash
authors
to create their own video/photo/ game and upload to a server. My
app
would then take this and use it within the Main video player as
they
please. The concern my client has is that the swf's that are
uploaded(AS3) may contain malicious code that might affect other
users/websites etc... The main video players is built in Flex
while
the uploaded vids are done in Flash.

Is there any way, other than decompiling swfs and checking the
code,
to determine if the code is in fact malicious from a swf?

cheers
erick




 


RE: [flexcoders] Re: Advise - List

2008-08-07 Thread Alex Harui
I thought you wanted html in a renderer.  If so, copy ListItemRenderer
and modify to set the htmlText instead of text.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rafael Faria
Sent: Thursday, August 07, 2008 12:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Advise - List



Yeah...

It would be something like this. If you run it you will see that the
measure is wrong. It just gets right when you start typing.

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
creationComplete=update();
mx:Script
![CDATA[
import mx.events.FlexEvent;

public function update():void
{
src.validateNow();
src.height = src.textHeight+ src.getStyle(fontSize);
}

]]
/mx:Script
mx:Panel title=TextArea Control Example height=75%
width=75% paddingTop=10 paddingLeft=10

mx:TextArea id=src change=update()
mx:htmlText
![CDATA[
Lorem Ipsum is simply dummy text of the printing and
typesetting industry. Lorem Ipsum has been the industry's standard
dummy text ever since the 1500s, when an unknown printer took a galley
of type and scrambled it to make a type specimen book. It has survived
not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in
the 1960s with the release of Letraset sheets containing Lorem Ipsum
passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.
]]
/mx:htmlText
/mx:TextArea

/mx:Panel
/mx:Application 

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

 Rafael - do you have an example small enough to post here so we can
have a
 look-see?
 
 -Josh
 



 


RE: [flexcoders] Garbage Collection and event listeners

2008-08-07 Thread Alex Harui
No one call can remove all listeners.  No one call can remove all
references, just one at a time.
 
If you add a listener on yourself, there is no need to remove it.  It
might slightly help if it is a DRC object, but eventually it will be
garbage collected.
 
a.addEventListener(foo, b.someMethod) creates a reference from a to b,
not the other way around.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flexaustin
Sent: Thursday, August 07, 2008 10:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Garbage Collection and event listeners



Is possible to remove all event listeners by doing something like the
following?

mc.removeEventListener(*,*,false);

Though not sure how you would get the count of eventlisteners or
iterate through them?

And as far as deleteing any reference to an object can you override
removechildren and add
for(var i:int=0; ithis.numChildren-1; i++) 
{ var chld:DisplayObject = this.getChildAt(i); 
chld.deleteReferenceOnParentDocument(this.parent);
}

Or is there a best practice when for when you write code like this:
addEventListener(ChildEvent.CHILD_ADDED,
handleAdd);

To override the removeChilden function to remove the event listener
above?

Thanks in advance.

--JDog



 


[flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Amy
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 07 Aug 2008, Gus wrote:
  Well I think it depends on how many projects, libraries, etc you 
have.
 
 Well, of course.
 
  and also if you are compiling... etc.
 
 I see higher spikes, but 200meg is about a rough average, and I'll 
have 
 several projects open (CFML, Flex, Perl, plain text etc.).

If you use the Help a lot it can go much higher, especially if you have 
more than one Help window open at a time.




[flexcoders] Re: Multiple Builder instances / windows?

2008-08-07 Thread Amy
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] 
wrote:

 On Thursday 07 Aug 2008, Gus wrote:
  Well I think it depends on how many projects, libraries, etc you 
have.
 
 Well, of course.
 
  and also if you are compiling... etc.
 
 I see higher spikes, but 200meg is about a rough average, and I'll 
have 
 several projects open (CFML, Flex, Perl, plain text etc.).

If you use the Help a lot it can go much higher, especially if you have 
more than one Help window open at a time.




[flexcoders] Re: How to fix this?

2008-08-07 Thread markflex2007
changeOrder is the application name (changeOrder.mxml)

the error details is here:


ReferenceError: Error #1069: Property myCollection not found on
changeOrder and there is no default value.
at
mx.binding.utils::ChangeWatcher/getHostPropertyValue()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\binding\utils\ChangeWatcher.as:407]
at
mx.binding.utils::ChangeWatcher/getValue()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\binding\utils\ChangeWatcher.as:332]
at
anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\binding\utils\BindingUtils.as:144]
at
mx.binding.utils::BindingUtils$/bindSetter()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\binding\utils\BindingUtils.as:147]
at changeOrder/initApp()[C:\Documents and Settings\user\My
Documents\Flex Builder 3\test0806\src\changeOrder.mxml:15]
at
changeOrder/___changeOrder_Application1_creationComplete()[C:\Documents
and Settings\user\My Documents\Flex Builder
3\test0806\src\changeOrder.mxml:2]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
at mx.core::UIComponent/set
initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1167]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:698]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]




[flexcoders] Re: XML Document and Navigation

2008-08-07 Thread Amy
--- In flexcoders@yahoogroups.com, Patrick J. Jankun [EMAIL PROTECTED] 
wrote:

 Hello Everyone,
 
 I run into a problem, something that probably a lot of people here  
 knows how to solve.
 But after sitting for 2 days building nestes for loops, i can't 
see  
 the light by the end of the tunnel :-)
 
 So, here is a problem:
 
 I have to build an xml based navigation, so far, quite simple and  
 clear. Made it already a few times,
 but, now, this is a bit more complicated, because i got a much 
deeper  
 nested sub levels, and i really
 don't know how to efficient traverse the document and build the  
 navigation out of it :|
 
 The most complex navigation i made had 2 levels, so it wasn't 
really  
 hard to imagine the code for this task:
 2 for loops done the nav creation and that's it, but i got now, an  
 undefined deep, and i don't know how to
 bite the code that will build the nav, that goes a bit deeper then 
one- 
 sub level.
 
 Do you guys got any examples or thoughts on how to solve the task?
 Im pretty sure that i got an logical error in my approach, since i  
 will use some nested for loops, but i can't
 think the formula since i don't know how deep each of the nodes  
 goes, and this task gives me headaches.
 
 any kind of help and pinpointing to right direction would be VERY  
 appreciated

You might want to look at Eli Greenfield's RandomWalk 
http://www.quietlyscheming.com/blog/components/randomwalk-component/

If that doesn't do what you want, post back.  I have some code I 
don't feel comfortable posting publically but that I could share off 
list.  It's not the best code ever written, but it does work.

HTH;

Amy



[flexcoders] Re: Application's height property problem

2008-08-07 Thread guillaumeracine
Thank you very much!

Using ExternalInterface.call(resizeDiv,myHeight);
solved my problem of scrolling!

Here is my js function:

script language=JavaScript type=text/javascript
function resizeContent(height) {
document.getElementById(content).style.height = 
parseInt(height)+px;

}
/script

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

 App height is bound by the stage size.  It sounds like you actually want
 to change the player's object size in the browser which requires
 javascript and ExternalInterface
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of guillaumeracine
 Sent: Wednesday, August 06, 2008 9:02 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Application's height property problem
 
 
 
 Hi, i want to set the height of my application dynamically.
 My app has a tree menu to the left and product thumbnails on the right.
 I want to increase the height of the application depending on the
 number of rows displayed in my product thumbnails. (The goal is to be
 able to scroll with the browser instand of scrolling inside a VBox)
 
 I have a appHeight property in my ModelLocator class.
 This property is changed when the product's dataprovider change.
 
 Here is the structure of my application
 
 mx:Application ... height={modelLocator.appHeight }
 
 mx:HBox
 
 mx:Tree height={this.height}.../mx:Tree
 mx:VBox height={this.height}.../mx:VBox
 
 /mx:HBox
 
 /mx:Application
 
 This is the way i think it should work but it seems that i can't
 acheive what i want with this...the height does not change at all and
 i think there is a limit to the height of the application because if
 my heigh is 2000 or 4000 i don't see any difference...
 
 Please help!





[flexcoders] is there a way to disable scrolling to selected row when DataGrid sorts?

2008-08-07 Thread ndele_sutton
i have found that DataGrid will automatically scroll to the first
selected row when the grid is sorted (this includes re-sorts caused by
data being updated in the data provider).  is there some way i can
disable this behavior?



[flexcoders] make the trace work on a windows 2003 server

2008-08-07 Thread Zhu De Hao
I can make the trace logging work form my developper machnice (which 
is a XP)

But  JUST CAN NOT make it work on a windows 2003 box, i have mm.cfg in 
place, debug verison of flash player (ver 9.0.124.0), Admin right on 
the server, but when i check Application Data\Macromedia\Flash 
Player\Logs folder, i just can not see the flashlog.txt file be 
created. 

Can anyone here give me some help?

Thanks 



[flexcoders] Re: Problems with nudgescrolling when programatically clicking items in DataGrid

2008-08-07 Thread bsensale
Thanks for the quick reply.  Is there a sample anywhere of how to do 
this?  Or could someone put the sample code into the little app 
below?  Thanks!

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

 set dragEnabled=true
  
 or use the mx_internal mouseX/Y override in UIComponent
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of bsensale
 Sent: Thursday, August 07, 2008 6:54 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problems with nudgescrolling when 
programatically
 clicking items in DataGrid
 
 
 
 Hello,
 
 I'm writing some tools to automate clicking items in datagrids 
through 
 mouse events. Right now that means scrolling to an index, and 
calling 
 mouseDown, then mouseUp on datagrid.indexToItemRenderer(idx). The 
 problem is if the physical mouse cursor happens to be below the 
 datagrid when the mouseDown is called, the datagrid will nudge 
scroll 
 before the mouseUp is called if there's any delay whatsoever.
 
 I don't want to necessarily disable nudge scrolling for the grid; 
this 
 is merely for automation purposes, so I was wondering if there was 
any 
 way on the fly to either force the mouse to move into the datagrid 
so 
 it won't nudge scroll, or to somehow disable nudge scrolling on the 
fly 
 quickly, so I can run the automation.
 
 I've put together a simple (and poorly written, sorry!) app showing 
the 
 behavior. If you click the button, it dispatches a mouseDown event 
to 
 item 0 in the datagrid, then sets up a 10 ms timer. When that timer 
 fires, it checks if the item is still visible before firing the 
mouseUp.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  
 layout=absolute
 mx:Script
 ![CDATA[
 import mx.controls.Text;
 import flash.sampler.NewObjectSample;
 import flash.utils.setInterval;
 function onButtonClick(event:MouseEvent):void {
 textArea.text = ;
 var mouseDown:MouseEvent = new MouseEvent
 (MouseEvent.MOUSE_DOWN, true, false, 0, 0, null, false, false, 
false, 
 true);
 datagrid.scrollToIndex(0);
 var obj:Object = datagrid.indexToItemRenderer(0);
 if(obj == null) {
 textArea.text += Object was null!\n;
 }
 else {
 textArea.text += Object:  + obj.toString() + \n;
 obj.dispatchEvent(mouseDown);
 }
 
 
 var t:Timer = new Timer(10, 1);
 t.addEventListener(TimerEvent.TIMER, timerHandler);
 t.start();
 }
 
 function timerHandler(evt:Object) {
 var mouseUp:MouseEvent = new MouseEvent
 (MouseEvent.MOUSE_UP, true, false, 0, 0, null, false, false, false, 
 false);
 var obj2:Object = datagrid.indexToItemRenderer(0);
 if(obj2 == null) {
 textArea.text += Object2 was null!\n;
 }
 else {
 textArea.text += Object2:  + obj2.toString() 
 + \n;
 obj2.dispatchEvent(mouseUp);
 }
 }
 ]]
 /mx:Script
 mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
 mx:dataProvider
 mx:Object col1=a col2=a/
 mx:Object col1=b col2=b/
 mx:Object col1=c col2=b/
 mx:Object col1=d col2=b/
 mx:Object col1=e col2=b/
 mx:Object col1=f col2=b/
 mx:Object col1=g col2=b/
 mx:Object col1=h col2=h/
 mx:Object col1=i col2=i/
 mx:Object col1=j col2=j/
 /mx:dataProvider
 mx:columns
 mx:DataGridColumn headerText=Column 1 dataField=col1/
 mx:DataGridColumn headerText=Column 2 dataField=col2/
 /mx:columns
 /mx:DataGrid
 mx:Button id=button y=479 label=Click Me! 
 click=onButtonClick(event) horizontalCenter=0/
 mx:TextArea id=textArea y=216 width=501 height=255 
 horizontalCenter=-9/
 
 /mx:Application





RE: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-07 Thread Gordon Smith
I think Josh stated the fundamental problem here: commitProperties() is
not a place for setting properties, it's a place for commiting them once
they've been set.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Wednesday, August 06, 2008 7:35 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Must call super.commitProperties at END of
overrided commitProperties when extending TitleWindow?

 

Well, I said you were strict and not wrong.  I've heard others say
that super always should be the first thing in an override, but to me,
that means that an override can only add or re-do and not intercept,
which is, IMHO, a valid thing to do for an override.

 

If you're that worried about whether you forgot or even intended to call
super, a comment might be in order.  Gordon likes comments whenever we
deviate from a pattern like add a listener in capture phase.  Sometimes
I actually put them in.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, August 06, 2008 6:31 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Must call super.commitProperties at END of
overrided commitProperties when extending TitleWindow?

I guess :) 

I just *really* don't like a situation where the position of
super.whatever() affects whether or not it works. Frankly If I were
designing a language super.foo() would be the default, and there'd be a
keyword to block it.

If super.commitProperties() can be expected to be anywhere inside a
method, you can no longer at a quick glance tell whether or not it's
called at all.

The point I think is that commitProperties() is ideally (correct me if
I'm wrong) for propagating any changed properties on this into their
actual destinations, and deciding whether or not you need to schedule an
updateDisplayList() or measure(). Doing anything else, such as changing
said properties should be done where it makes more sense. The idea is
that all the property changes generated by any events dispatched in the
last frame are already completed by the time you get to
commitProperties(). And changing properties inside commitProperties()
invalidates this. It seems to me that whoever decided to ignore
invalidateProperties() within commitProperties() thought something
similar. That's probably an arrogant assumption to make, but I'm a jerk
like that some times :)

Somebody else in 6 months could see super.foo() at the end of your
method, and because it's not in line with the rest of the project, move
it back up the top - who knows how long it'll be before somebody notices
that under certain circumstances the titles on your CustomPanel aren't
what they should be any more?

-Josh

On Thu, Aug 7, 2008 at 11:15 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Man, you are strict!  There is no reason you can't do work in your
override before calling super.whatever()

 



 




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

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

 



RE: [flexcoders] Re: Problems with nudgescrolling when programatically clicking items in DataGrid

2008-08-07 Thread Alex Harui
mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
dragEnabled=true




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bsensale
Sent: Thursday, August 07, 2008 12:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problems with nudgescrolling when
programatically clicking items in DataGrid



Thanks for the quick reply. Is there a sample anywhere of how to do 
this? Or could someone put the sample code into the little app 
below? Thanks!

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

 set dragEnabled=true
 
 or use the mx_internal mouseX/Y override in UIComponent
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of bsensale
 Sent: Thursday, August 07, 2008 6:54 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Problems with nudgescrolling when 
programatically
 clicking items in DataGrid
 
 
 
 Hello,
 
 I'm writing some tools to automate clicking items in datagrids 
through 
 mouse events. Right now that means scrolling to an index, and 
calling 
 mouseDown, then mouseUp on datagrid.indexToItemRenderer(idx). The 
 problem is if the physical mouse cursor happens to be below the 
 datagrid when the mouseDown is called, the datagrid will nudge 
scroll 
 before the mouseUp is called if there's any delay whatsoever.
 
 I don't want to necessarily disable nudge scrolling for the grid; 
this 
 is merely for automation purposes, so I was wondering if there was 
any 
 way on the fly to either force the mouse to move into the datagrid 
so 
 it won't nudge scroll, or to somehow disable nudge scrolling on the 
fly 
 quickly, so I can run the automation.
 
 I've put together a simple (and poorly written, sorry!) app showing 
the 
 behavior. If you click the button, it dispatches a mouseDown event 
to 
 item 0 in the datagrid, then sets up a 10 ms timer. When that timer 
 fires, it checks if the item is still visible before firing the 
mouseUp.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml   
 layout=absolute
 mx:Script
 ![CDATA[
 import mx.controls.Text;
 import flash.sampler.NewObjectSample;
 import flash.utils.setInterval;
 function onButtonClick(event:MouseEvent):void {
 textArea.text = ;
 var mouseDown:MouseEvent = new MouseEvent
 (MouseEvent.MOUSE_DOWN, true, false, 0, 0, null, false, false, 
false, 
 true);
 datagrid.scrollToIndex(0);
 var obj:Object = datagrid.indexToItemRenderer(0);
 if(obj == null) {
 textArea.text += Object was null!\n;
 }
 else {
 textArea.text += Object:  + obj.toString() + \n;
 obj.dispatchEvent(mouseDown);
 }
 
 
 var t:Timer = new Timer(10, 1);
 t.addEventListener(TimerEvent.TIMER, timerHandler);
 t.start();
 }
 
 function timerHandler(evt:Object) {
 var mouseUp:MouseEvent = new MouseEvent
 (MouseEvent.MOUSE_UP, true, false, 0, 0, null, false, false, false, 
 false);
 var obj2:Object = datagrid.indexToItemRenderer(0);
 if(obj2 == null) {
 textArea.text += Object2 was null!\n;
 }
 else {
 textArea.text += Object2:  + obj2.toString() 
 + \n;
 obj2.dispatchEvent(mouseUp);
 }
 }
 ]]
 /mx:Script
 mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
 mx:dataProvider
 mx:Object col1=a col2=a/
 mx:Object col1=b col2=b/
 mx:Object col1=c col2=b/
 mx:Object col1=d col2=b/
 mx:Object col1=e col2=b/
 mx:Object col1=f col2=b/
 mx:Object col1=g col2=b/
 mx:Object col1=h col2=h/
 mx:Object col1=i col2=i/
 mx:Object col1=j col2=j/
 /mx:dataProvider
 mx:columns
 mx:DataGridColumn headerText=Column 1 dataField=col1/
 mx:DataGridColumn headerText=Column 2 dataField=col2/
 /mx:columns
 /mx:DataGrid
 mx:Button id=button y=479 label=Click Me! 
 click=onButtonClick(event) horizontalCenter=0/
 mx:TextArea id=textArea y=216 width=501 height=255 
 horizontalCenter=-9/
 
 /mx:Application




 


RE: [flexcoders] is there a way to disable scrolling to selected row when DataGrid sorts?

2008-08-07 Thread Alex Harui
Override collectioniChangeHandler.  if collectionEventKind = REFRESH,
set anchorBookmark = null;
 
At least in theory...



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ndele_sutton
Sent: Thursday, August 07, 2008 10:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] is there a way to disable scrolling to selected
row when DataGrid sorts?



i have found that DataGrid will automatically scroll to the first
selected row when the grid is sorted (this includes re-sorts caused by
data being updated in the data provider). is there some way i can
disable this behavior?



 


RE: [flexcoders] Re: How to fix this?

2008-08-07 Thread Alex Harui
BindingUtils.bindSetter(watcherListener, this,
myCollection1 , true); 




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markflex2007
Sent: Thursday, August 07, 2008 11:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to fix this?



changeOrder is the application name (changeOrder.mxml)

the error details is here:

ReferenceError: Error #1069: Property myCollection not found on
changeOrder and there is no default value.
at
mx.binding.utils::ChangeWatcher/getHostPropertyValue()[E:\dev\3.0.x\fram
eworks\projects\framework\src\mx\binding\utils\ChangeWatcher.as:407]
at
mx.binding.utils::ChangeWatcher/getValue()[E:\dev\3.0.x\frameworks\proje
cts\framework\src\mx\binding\utils\ChangeWatcher.as:332]
at
anonymous()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\binding\
utils\BindingUtils.as:144]
at
mx.binding.utils::BindingUtils$/bindSetter()[E:\dev\3.0.x\frameworks\pro
jects\framework\src\mx\binding\utils\BindingUtils.as:147]
at changeOrder/initApp()[C:\Documents and Settings\user\My
Documents\Flex Builder 3\test0806\src\changeOrder.mxml:15]
at
changeOrder/___changeOrder_Application1_creationComplete()[C:\Documents
and Settings\user\My Documents\Flex Builder
3\test0806\src\changeOrder.mxml:2]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\fr
amework\src\mx\core\UIComponent.as:9051]
at mx.core::UIComponent/set
initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIC
omponent.as:1167]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\framewor
ks\projects\framework\src\mx\managers\LayoutManager.as:698]
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\proj
ects\framework\src\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\proje
cts\framework\src\mx\core\UIComponent.as:8403]



 


[flexcoders] Re: Problems with nudgescrolling when programatically clicking items in DataGrid

2008-08-07 Thread bsensale
Heh, sorry, I meant the other option.  Thanks!

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

 mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
 dragEnabled=true
 
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of bsensale
 Sent: Thursday, August 07, 2008 12:43 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Problems with nudgescrolling when
 programatically clicking items in DataGrid
 
 
 
 Thanks for the quick reply. Is there a sample anywhere of how to do 
 this? Or could someone put the sample code into the little app 
 below? Thanks!
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  set dragEnabled=true
  
  or use the mx_internal mouseX/Y override in UIComponent
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of bsensale
  Sent: Thursday, August 07, 2008 6:54 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Problems with nudgescrolling when 
 programatically
  clicking items in DataGrid
  
  
  
  Hello,
  
  I'm writing some tools to automate clicking items in datagrids 
 through 
  mouse events. Right now that means scrolling to an index, and 
 calling 
  mouseDown, then mouseUp on datagrid.indexToItemRenderer(idx). The 
  problem is if the physical mouse cursor happens to be below the 
  datagrid when the mouseDown is called, the datagrid will nudge 
 scroll 
  before the mouseUp is called if there's any delay whatsoever.
  
  I don't want to necessarily disable nudge scrolling for the grid; 
 this 
  is merely for automation purposes, so I was wondering if there 
was 
 any 
  way on the fly to either force the mouse to move into the 
datagrid 
 so 
  it won't nudge scroll, or to somehow disable nudge scrolling on 
the 
 fly 
  quickly, so I can run the automation.
  
  I've put together a simple (and poorly written, sorry!) app 
showing 
 the 
  behavior. If you click the button, it dispatches a mouseDown 
event 
 to 
  item 0 in the datagrid, then sets up a 10 ms timer. When that 
timer 
  fires, it checks if the item is still visible before firing the 
 mouseUp.
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
  http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml 
  
  layout=absolute
  mx:Script
  ![CDATA[
  import mx.controls.Text;
  import flash.sampler.NewObjectSample;
  import flash.utils.setInterval;
  function onButtonClick(event:MouseEvent):void {
  textArea.text = ;
  var mouseDown:MouseEvent = new MouseEvent
  (MouseEvent.MOUSE_DOWN, true, false, 0, 0, null, false, false, 
 false, 
  true);
  datagrid.scrollToIndex(0);
  var obj:Object = datagrid.indexToItemRenderer(0);
  if(obj == null) {
  textArea.text += Object was null!\n;
  }
  else {
  textArea.text += Object:  + obj.toString() + \n;
  obj.dispatchEvent(mouseDown);
  }
  
  
  var t:Timer = new Timer(10, 1);
  t.addEventListener(TimerEvent.TIMER, timerHandler);
  t.start();
  }
  
  function timerHandler(evt:Object) {
  var mouseUp:MouseEvent = new MouseEvent
  (MouseEvent.MOUSE_UP, true, false, 0, 0, null, false, false, 
false, 
  false);
  var obj2:Object = datagrid.indexToItemRenderer(0);
  if(obj2 == null) {
  textArea.text += Object2 was null!\n;
  }
  else {
  textArea.text += Object2:  + obj2.toString() 
  + \n;
  obj2.dispatchEvent(mouseUp);
  }
  }
  ]]
  /mx:Script
  mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-
9
  mx:dataProvider
  mx:Object col1=a col2=a/
  mx:Object col1=b col2=b/
  mx:Object col1=c col2=b/
  mx:Object col1=d col2=b/
  mx:Object col1=e col2=b/
  mx:Object col1=f col2=b/
  mx:Object col1=g col2=b/
  mx:Object col1=h col2=h/
  mx:Object col1=i col2=i/
  mx:Object col1=j col2=j/
  /mx:dataProvider
  mx:columns
  mx:DataGridColumn headerText=Column 1 dataField=col1/
  mx:DataGridColumn headerText=Column 2 dataField=col2/
  /mx:columns
  /mx:DataGrid
  mx:Button id=button y=479 label=Click Me! 
  click=onButtonClick(event) horizontalCenter=0/
  mx:TextArea id=textArea y=216 width=501 height=255 
  horizontalCenter=-9/
  
  /mx:Application
 





[flexcoders] Using Create App from DB - Saving decimal number 123.123??

2008-08-07 Thread cox.blair
I'm using the Create Application from database for testing and I'm
just wondering on earth it appears to only update whole numbers to the
table? It will not pass a decimal number to the database? I see in the
php 'int', can I change this to allow it to store 123.123 instead?

Really, whole numbers are pretty useless, I must be missing something,
right?

Thanks,



[flexcoders] Re: is there a way to disable scrolling to selected row when DataGrid sorts?

2008-08-07 Thread ndele_sutton
thx again, alex.

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

 Override collectioniChangeHandler.  if collectionEventKind = REFRESH,
 set anchorBookmark = null;
  
 At least in theory...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of ndele_sutton
 Sent: Thursday, August 07, 2008 10:57 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] is there a way to disable scrolling to selected
 row when DataGrid sorts?
 
 
 
 i have found that DataGrid will automatically scroll to the first
 selected row when the grid is sorted (this includes re-sorts caused by
 data being updated in the data provider). is there some way i can
 disable this behavior?





[flexcoders] Re: Using Create App from DB - Saving decimal number 123.123??

2008-08-07 Thread Tim Hoff

No, you're stuck using just int for the rest of your programming
existence.  Ha, just kidding.  :)  Just change it to a long on the php
side.  And change it to a Number on the flex side.

-TH

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

 I'm using the Create Application from database for testing and I'm
 just wondering on earth it appears to only update whole numbers to the
 table? It will not pass a decimal number to the database? I see in the
 php 'int', can I change this to allow it to store 123.123 instead?

 Really, whole numbers are pretty useless, I must be missing something,
 right?

 Thanks,






[flexcoders] Null reference after creationComplete()

2008-08-07 Thread Steve Brownlee
When attempting to assign a dataProvider to a DataGrid...
reportProjects.dataProvider = rptProjects;

I get the following error...
Cannot access a property or method of a null object reference.

The only difference between this DataGrid, and one that is properly
instantiated is that its on a Canvas that's not visible when the
application starts.  The statement happens after creationComplete, which
I thought was the event that got fired after all objects were created.

creationComplete()  initApp()  loadProjects()  {problem statement}


Condensed version of design

mx:ViewStack
mx:Canvas label=Data
   ...
/mx:Canvas
mx:Canvas label=Reports
   ...
   mx:DataGrid id=reportProjects
  ...
   /mx:DataGrid
/mx:Canvas
/mx:ViewStack


I can't figure out why this DataGrid isn't getting instantiated, or how
to ensure it does.  Any help is greatly appreciated.

- Steve



[flexcoders] Re: removing default 1/1/70 label on DateTimeAxis

2008-08-07 Thread blc187
figured this out...

in the DateTimeAxis there is a method called buildLabelCache.
creating a class that extends DateTimeAxis and overriding 
buildLabelCache like this:


override protected function buildLabelCache():Boolean {
var returnVal:Boolean = super.buildLabelCache();
if(labelCache.length == 1  labelCache[0].text == 1/1/70)
labelCache.pop();
return returnVal;
}

If there is only one label and it is the default label (from a Date 
object with time=0), removing it from the labelCache so it never gets 
created.


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

 A DateTimeAxis on a chart with no data shows 1 label: 1/1/70.
 Is there a way to either make the whole axis invisible, or not show 
any 
 date labels at all?
 
 I want to do this before I populate the chart, then when the data 
comes 
 in, turn the visibility back on so that the 1/1/70 never shows.





[flexcoders] Re: Null reference after creationComplete()

2008-08-07 Thread Tim Hoff

Yes, but your dataGrid is in a child of a viewStack.  It won't be
instantiated until yu change to that selectedIndex.  You can use the
viewStack's creationPolicy=all.  But, that's not usually best
practice.  Better to just use binding.  Instead of:

reportProjects.dataProvider = rptProjects;

do something like:

mx:DataGrid dataProvider={ rptReports }/

Assuming that rptReports is an ArrayCollection, this will wait until the
DataGrid is instantiated before setting the dataProvider.

-TH

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

 When attempting to assign a dataProvider to a DataGrid...
 reportProjects.dataProvider = rptProjects;

 I get the following error...
 Cannot access a property or method of a null object reference.

 The only difference between this DataGrid, and one that is properly
 instantiated is that its on a Canvas that's not visible when the
 application starts. The statement happens after creationComplete,
which
 I thought was the event that got fired after all objects were created.

 creationComplete()  initApp()  loadProjects()  {problem statement}


 Condensed version of design

 mx:ViewStack
 mx:Canvas label=Data
 ...
 /mx:Canvas
 mx:Canvas label=Reports
 ...
 mx:DataGrid id=reportProjects
 ...
 /mx:DataGrid
 /mx:Canvas
 /mx:ViewStack


 I can't figure out why this DataGrid isn't getting instantiated, or
how
 to ensure it does. Any help is greatly appreciated.

 - Steve





[flexcoders] Re: Null reference after creationComplete()

2008-08-07 Thread Steve Brownlee
Makes perfect sense.  Thanks, Tim.

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

 
 Yes, but your dataGrid is in a child of a viewStack.  It won't be
 instantiated until yu change to that selectedIndex.  You can use the
 viewStack's creationPolicy=all.  But, that's not usually best
 practice.  Better to just use binding.  Instead of:
 
 reportProjects.dataProvider = rptProjects;
 
 do something like:
 
 mx:DataGrid dataProvider={ rptReports }/
 
 Assuming that rptReports is an ArrayCollection, this will wait until the
 DataGrid is instantiated before setting the dataProvider.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Steve Brownlee
 steven.brownlee@ wrote:
 
  When attempting to assign a dataProvider to a DataGrid...
  reportProjects.dataProvider = rptProjects;
 
  I get the following error...
  Cannot access a property or method of a null object reference.
 
  The only difference between this DataGrid, and one that is properly
  instantiated is that its on a Canvas that's not visible when the
  application starts. The statement happens after creationComplete,
 which
  I thought was the event that got fired after all objects were created.
 
  creationComplete()  initApp()  loadProjects()  {problem statement}
 
 
  Condensed version of design
 
  mx:ViewStack
  mx:Canvas label=Data
  ...
  /mx:Canvas
  mx:Canvas label=Reports
  ...
  mx:DataGrid id=reportProjects
  ...
  /mx:DataGrid
  /mx:Canvas
  /mx:ViewStack
 
 
  I can't figure out why this DataGrid isn't getting instantiated, or
 how
  to ensure it does. Any help is greatly appreciated.
 
  - Steve
 





RE: [flexcoders] Re: Problems with nudgescrolling when programatically clicking items in DataGrid

2008-08-07 Thread Alex Harui
private static var fakeMouseX:QName = new QName(mx_internal,
_mouseX);
private static var fakeMouseY:QName = new QName(mx_internal,
_mouseY);
 
before dispatching the event, figure out the stage coordinates of the
mouse, then set that position

  root[mouseX] = stagePt.x;
  root[mouseY] = stagePt.y;




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bsensale
Sent: Thursday, August 07, 2008 1:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problems with nudgescrolling when
programatically clicking items in DataGrid



Heh, sorry, I meant the other option. Thanks!

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

 mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-9
 dragEnabled=true
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of bsensale
 Sent: Thursday, August 07, 2008 12:43 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Problems with nudgescrolling when
 programatically clicking items in DataGrid
 
 
 
 Thanks for the quick reply. Is there a sample anywhere of how to do 
 this? Or could someone put the sample code into the little app 
 below? Thanks!
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  set dragEnabled=true
  
  or use the mx_internal mouseX/Y override in UIComponent
  
  
  
  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 bsensale
  Sent: Thursday, August 07, 2008 6:54 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] Problems with nudgescrolling when 
 programatically
  clicking items in DataGrid
  
  
  
  Hello,
  
  I'm writing some tools to automate clicking items in datagrids 
 through 
  mouse events. Right now that means scrolling to an index, and 
 calling 
  mouseDown, then mouseUp on datagrid.indexToItemRenderer(idx). The 
  problem is if the physical mouse cursor happens to be below the 
  datagrid when the mouseDown is called, the datagrid will nudge 
 scroll 
  before the mouseUp is called if there's any delay whatsoever.
  
  I don't want to necessarily disable nudge scrolling for the grid; 
 this 
  is merely for automation purposes, so I was wondering if there 
was 
 any 
  way on the fly to either force the mouse to move into the 
datagrid 
 so 
  it won't nudge scroll, or to somehow disable nudge scrolling on 
the 
 fly 
  quickly, so I can run the automation.
  
  I've put together a simple (and poorly written, sorry!) app 
showing 
 the 
  behavior. If you click the button, it dispatches a mouseDown 
event 
 to 
  item 0 in the datagrid, then sets up a 10 ms timer. When that 
timer 
  fires, it checks if the item is still visible before firing the 
 mouseUp.
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
  http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
  
  layout=absolute
  mx:Script
  ![CDATA[
  import mx.controls.Text;
  import flash.sampler.NewObjectSample;
  import flash.utils.setInterval;
  function onButtonClick(event:MouseEvent):void {
  textArea.text = ;
  var mouseDown:MouseEvent = new MouseEvent
  (MouseEvent.MOUSE_DOWN, true, false, 0, 0, null, false, false, 
 false, 
  true);
  datagrid.scrollToIndex(0);
  var obj:Object = datagrid.indexToItemRenderer(0);
  if(obj == null) {
  textArea.text += Object was null!\n;
  }
  else {
  textArea.text += Object:  + obj.toString() + \n;
  obj.dispatchEvent(mouseDown);
  }
  
  
  var t:Timer = new Timer(10, 1);
  t.addEventListener(TimerEvent.TIMER, timerHandler);
  t.start();
  }
  
  function timerHandler(evt:Object) {
  var mouseUp:MouseEvent = new MouseEvent
  (MouseEvent.MOUSE_UP, true, false, 0, 0, null, false, false, 
false, 
  false);
  var obj2:Object = datagrid.indexToItemRenderer(0);
  if(obj2 == null) {
  textArea.text += Object2 was null!\n;
  }
  else {
  textArea.text += Object2:  + obj2.toString() 
  + \n;
  obj2.dispatchEvent(mouseUp);
  }
  }
  ]]
  /mx:Script
  mx:DataGrid id=datagrid y=10 width=501 horizontalCenter=-
9
  mx:dataProvider
  mx:Object col1=a col2=a/
  mx:Object col1=b col2=b/
  mx:Object col1=c col2=b/
  mx:Object col1=d col2=b/
  mx:Object col1=e col2=b/
  mx:Object col1=f col2=b/
  mx:Object col1=g col2=b/
  mx:Object col1=h 

[flexcoders] Re: Null reference after creationComplete()

2008-08-07 Thread Tim Hoff
cool

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

 Makes perfect sense.  Thanks, Tim.
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  
  Yes, but your dataGrid is in a child of a viewStack.  It won't be
  instantiated until yu change to that selectedIndex.  You can use 
the
  viewStack's creationPolicy=all.  But, that's not usually best
  practice.  Better to just use binding.  Instead of:
  
  reportProjects.dataProvider = rptProjects;
  
  do something like:
  
  mx:DataGrid dataProvider={ rptReports }/
  
  Assuming that rptReports is an ArrayCollection, this will wait 
until the
  DataGrid is instantiated before setting the dataProvider.
  
  -TH
  
  --- In flexcoders@yahoogroups.com, Steve Brownlee
  steven.brownlee@ wrote:
  
   When attempting to assign a dataProvider to a DataGrid...
   reportProjects.dataProvider = rptProjects;
  
   I get the following error...
   Cannot access a property or method of a null object reference.
  
   The only difference between this DataGrid, and one that is 
properly
   instantiated is that its on a Canvas that's not visible when the
   application starts. The statement happens after 
creationComplete,
  which
   I thought was the event that got fired after all objects were 
created.
  
   creationComplete()  initApp()  loadProjects()  {problem 
statement}
  
  
   Condensed version of design
  
   mx:ViewStack
   mx:Canvas label=Data
   ...
   /mx:Canvas
   mx:Canvas label=Reports
   ...
   mx:DataGrid id=reportProjects
   ...
   /mx:DataGrid
   /mx:Canvas
   /mx:ViewStack
  
  
   I can't figure out why this DataGrid isn't getting 
instantiated, or
  how
   to ensure it does. Any help is greatly appreciated.
  
   - Steve
  
 





[flexcoders] PHP Chat Example

2008-08-07 Thread todd_geist
I am unable to get the WebOrbChat application to work in the WebOrb
Management console examples tab.

This is with WebOrb PHP 3 running in XAMPP on a mac.

It just doesn't do anything.  I click the send button and nothing happens.

flash security

what could I be missing???

Thanks

Todd



[flexcoders] Re: Garbage Collection and event listeners

2008-08-07 Thread flexaustin
But it does matter. Say I create an object on stage through code.

var result:Boolean = super.handleAdd(event);

var child:UIComponent = event.relatedObject as 
UIComponent;

child.addEventListener(MouseEvent.CLICK, 
handleChildClick,
false, 0, true);

then later I delete all the child objects there will be a reference
from the addEventListener floating around so child won't be removed
from memory. 

When you say a to b what do you mean?



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

 No one call can remove all listeners.  No one call can remove all
 references, just one at a time.
  
 If you add a listener on yourself, there is no need to remove it.  It
 might slightly help if it is a DRC object, but eventually it will be
 garbage collected.
  
 a.addEventListener(foo, b.someMethod) creates a reference from a to b,
 not the other way around.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of flexaustin
 Sent: Thursday, August 07, 2008 10:27 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Garbage Collection and event listeners
 
 
 
 Is possible to remove all event listeners by doing something like the
 following?
 
 mc.removeEventListener(*,*,false);
 
 Though not sure how you would get the count of eventlisteners or
 iterate through them?
 
 And as far as deleteing any reference to an object can you override
 removechildren and add
 for(var i:int=0; ithis.numChildren-1; i++) 
 { var chld:DisplayObject = this.getChildAt(i); 
 chld.deleteReferenceOnParentDocument(this.parent);
 }
 
 Or is there a best practice when for when you write code like this:
 addEventListener(ChildEvent.CHILD_ADDED,
 handleAdd);
 
 To override the removeChilden function to remove the event listener
 above?
 
 Thanks in advance.
 
 --JDog





[flexcoders] WindowedApplication custom close / exit

2008-08-07 Thread aphexyuri
Hi
I need some help preventing window close, on system chrome close
button click.

Basically, what I would like to do, is check for a condition when the
user clicks the system chrome close btn. It the condition states its
ok, I'd like to call app.exit(), and if not, perform other actions.

Any help will be appreciated.





RE: [flexcoders] Re: Garbage Collection and event listeners

2008-08-07 Thread Alex Harui
If you are the parent, adding an event listener to a child does not
create a reference to the child, it creates a reference from the child
to the parent, so it won't affect collection of the child when you
release all other references to that child.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flexaustin
Sent: Thursday, August 07, 2008 2:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Garbage Collection and event listeners



But it does matter. Say I create an object on stage through code.

var result:Boolean = super.handleAdd(event);

var child:UIComponent = event.relatedObject as UIComponent;

child.addEventListener(MouseEvent.CLICK, handleChildClick,
false, 0, true);

then later I delete all the child objects there will be a reference
from the addEventListener floating around so child won't be removed
from memory. 

When you say a to b what do you mean?

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

 No one call can remove all listeners. No one call can remove all
 references, just one at a time.
 
 If you add a listener on yourself, there is no need to remove it. It
 might slightly help if it is a DRC object, but eventually it will be
 garbage collected.
 
 a.addEventListener(foo, b.someMethod) creates a reference from a to
b,
 not the other way around.
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of flexaustin
 Sent: Thursday, August 07, 2008 10:27 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Garbage Collection and event listeners
 
 
 
 Is possible to remove all event listeners by doing something like the
 following?
 
 mc.removeEventListener(*,*,false);
 
 Though not sure how you would get the count of eventlisteners or
 iterate through them?
 
 And as far as deleteing any reference to an object can you override
 removechildren and add
 for(var i:int=0; ithis.numChildren-1; i++) 
 { var chld:DisplayObject = this.getChildAt(i); 
 chld.deleteReferenceOnParentDocument(this.parent);
 }
 
 Or is there a best practice when for when you write code like this:
 addEventListener(ChildEvent.CHILD_ADDED,
 handleAdd);
 
 To override the removeChilden function to remove the event listener
 above?
 
 Thanks in advance.
 
 --JDog




 


[flexcoders] Flex access of RMI server

2008-08-07 Thread ron_mori
While I go off and explore the land of 'Flex to RMI' connections,
anyone want to offer any insights?

Things like:

- Can you do this?  Seems like a natural with BlazeDS remote objects.
 Just change the URL to point to rmi://localhost/server...

- Simple or difficult?

And any other insights are welcome.

thanks



[flexcoders] Proxy server for testing?

2008-08-07 Thread ivo
Hello all,

I am testing an AIR app that works over a network and consumes REST services 
from various internal servers. The app always points to the same URL and I want 
to be able to redirect the IP it resolves to without having to edit by hand the 
hosts file and restarting the app.

Seems a proxy would do the job, where I point the app to the proxy and just 
configure the proxy at runtime to redirect the requests to different servers. 
Does anyone know of a good tool to achieve this?

Thanks,

- Ivo



Re: [flexcoders] Flex access of RMI server

2008-08-07 Thread Fidel Viegas
On Thu, Aug 7, 2008 at 11:07 PM, ron_mori [EMAIL PROTECTED] wrote:
 While I go off and explore the land of 'Flex to RMI' connections,
 anyone want to offer any insights?

 Things like:

 - Can you do this? Seems like a natural with BlazeDS remote objects.
 Just change the URL to point to rmi://localhost/server...

 - Simple or difficult?

 And any other insights are welcome.

Hi ron,

In case you don't know, RMI is a Java thing. It is meant to allow
methods of remote objects found in certain JVMs to be invoked by other
JVMs.

Just stick to AMF (which is what BlazeDS uses), or use Hessian, XML
based Web Services or HTTP Services or JSON. I don't really think that
it is worthwhile creating a new protocol, unless it does prove to be
faster or better than the existing ones.

Anyway, those are just my 2 cents.

Fidel.


Re: [flexcoders] Proxy server for testing?

2008-08-07 Thread ivo
Shortly after sending this message I fired up Fiddler2 
(http://www.fiddlertool.com/Fiddler) and noticed that all the traffic from my 
AIR app goes thru it. By updating a simple js script file the behavior of the 
Fiddler proxy is modified at runtime. Very slick.

- Ivo



- Original Message 
From: ivo [EMAIL PROTECTED]
To: FlexCoders flexcoders@yahoogroups.com
Sent: Thursday, August 7, 2008 3:51:38 PM
Subject: [flexcoders] Proxy server for testing?


Hello all,

I am testing an AIR app that works over a network and consumes REST services 
from various internal servers. The app always points to the same URL and I want 
to be able to redirect the IP it resolves to without having to edit by hand the 
hosts file and restarting the app.

Seems a proxy would do the job, where I point the app to the proxy and just 
configure the proxy at runtime to redirect the requests to different servers. 
Does anyone know of a good tool to achieve this?

Thanks,

- Ivo



[flexcoders] Re: Advise - List

2008-08-07 Thread Rafael Faria
I do want the html in a redender. This was just an example that i was
trying to play. That would be my item renderer. anyway, somehow i get
it working... :p


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

 I thought you wanted html in a renderer.  If so, copy ListItemRenderer
 and modify to set the htmlText instead of text.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Rafael Faria
 Sent: Thursday, August 07, 2008 12:22 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Advise - List
 
 
 
 Yeah...
 
 It would be something like this. If you run it you will see that the
 measure is wrong. It just gets right when you start typing.
 
 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
 creationComplete=update();
 mx:Script
 ![CDATA[
 import mx.events.FlexEvent;
 
 public function update():void
 {
 src.validateNow();
 src.height = src.textHeight+ src.getStyle(fontSize);
 }
 
 ]]
 /mx:Script
 mx:Panel title=TextArea Control Example height=75%
 width=75% paddingTop=10 paddingLeft=10
 
 mx:TextArea id=src change=update()
 mx:htmlText
 ![CDATA[
 Lorem Ipsum is simply dummy text of the printing and
 typesetting industry. Lorem Ipsum has been the industry's standard
 dummy text ever since the 1500s, when an unknown printer took a galley
 of type and scrambled it to make a type specimen book. It has survived
 not only five centuries, but also the leap into electronic
 typesetting, remaining essentially unchanged. It was popularised in
 the 1960s with the release of Letraset sheets containing Lorem Ipsum
 passages, and more recently with desktop publishing software like
 Aldus PageMaker including versions of Lorem Ipsum.
 ]]
 /mx:htmlText
 /mx:TextArea
 
 /mx:Panel
 /mx:Application 
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Josh McDonald dznuts@ wrote:
 
  Rafael - do you have an example small enough to post here so we can
 have a
  look-see?
  
  -Josh
 





RE: [flexcoders] Re: DataServiceException

2008-08-07 Thread Jeff Vroom
Yeah, it should be calling any fill methods which are still actively managed by 
clients in that refreshFill call - as long as you have autoSync=true.  There 
are a couple of ways to track this down:


1)  Put in this printSeq.jsp file (enclosed below) and request it.  It will 
show you all active fills, etc.  If that is empty, somehow the client's fill is 
not auto-sync'd.

2)  If you turn on the Service.* debug target it should at least indicate 
which fills it is trying to refresh.

Jeff

- printSeqs.jsp:
%@ page import=flex.data.SequenceManager %
%@ page import=flex.messaging.MessageBroker%
%@ page import=flex.data.DataService%
%@ page import=flex.data.DataDestination%
%@ page import=java.util.Map%
%@ page import=java.util.List%
%@ page import=java.util.Iterator%
body
code

%
 MessageBroker mb = MessageBroker.getMessageBroker(null);

 DataService ds = (DataService) 
mb.getServiceByType(flex.data.DataService);
 if (ds == null)
out.print(no data service);
 else
 {
 Map dests = ds.getDestinations();

 for (Iterator it = dests.entrySet().iterator(); it.hasNext(); )
 {
 Map.Entry ent = (Map.Entry) it.next();

 String destName = (String) ent.getKey();

 DataDestination dest = (DataDestination) ent.getValue();
 SequenceManager seq = dest.getSequenceManager();

 out.print(Destination:  + destName + br);
 out.print(preSequenceInfo:);
 out.print(seq.getSequenceInfo());

 out.print(/preppreItemInfo:br);
 out.print(seq.getItemInfo());
 out.print(/pre);

 out.print(p);
 }
  }

%

done
/code

/body



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey
Sent: Wednesday, August 06, 2008 2:16 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: DataServiceException


I pass false to my begin() method and that stops the
DataServiceException from happening, but now nothing seems to happen
after I commit(). Here's a current code snippet:

DataServiceTransaction dst = DataServiceTransaction.begin(false);
dst.refreshFill(myTasks, null);
dst.commit();

The destination parameter for refreshFill(), is that the same string
as the parameter I pass to the DataService constructor in ActionScript
and the name of the destination I set up in data-management-config.xml?
(i.e.
__ds = new DataService(myTasks);
destination id=myTasks
)

I would expect to get a hit on the fill() method in my Assembler after
the commit() is called, but I ain't gettin' nut'in.

Ideas?

Thanks,
Geoff

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

 Yeah, I wish this stuff was easier to install and configure. Too
bad this JTA stuff hasn't been picked up by servlet containers as part
of the core.

 To help debug this problem, here's the source for a .jsp file which
does the same thing we do. Usually once this works,
DataServiceTransaction.begin(true) will work too:

 %@ page import=javax.transaction.UserTransaction %
 %@ page import=javax.naming.InitialContext %
 %@ page import=javax.naming.Context %
 body

 startbr
 %
 try
 {
 Context ctx = new InitialContext();

 String userTransactionJndi = java:comp/UserTransaction;
 String userSpecified = System.getProperty(UserTxJndiName);
 if (userSpecified != null)
 {
 userTransactionJndi = userSpecified;
 }
 UserTransaction userTransaction = (UserTransaction)
ctx.lookup(userTransactionJndi);
 if (userTransaction != null)
 {
 userTransaction.begin();
 out.println(begin ok!br);
 userTransaction.commit();
 out.println(commit ok!br);
 }
 else
 {
 out.println(returned null);
 }
 }
 catch (Exception ne)
 {
 out.println(ne.toString());
 }
 %

 done

 /body

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of Geoffrey
 Sent: Monday, August 04, 2008 2:51 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: DataServiceException


 I just went through installing/configuring JTA using JOTM(which was
 not as straight forward as the docs say) with Tomcat.

 The bummer is that I can't debug into the DataServiceTransaction
 class... no source.

 I guess I could try passing false to the begin method, but I should
 be able to use JOTM.

 BTW, thanks for your help on that other LCDS issue.

 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
 Jeff
Vroom jvroom@ wrote:
 
  When you create a DataServiceTransaction, especially with true so
 it needs to start a JTA transaction, it is look in the JNDI namespace
 for the standard UserTransaction object i.e. new
 InitialContext().lookup(java:comp/UserTransaction). That call is
 not working... if you are not in a JEE container or Tomcat with JOTM
 installed that would explain it. You can try 

  1   2   >