[flexcoders] Sprite doubleclick

2009-03-09 Thread flexaustin
So if you have a sprite, say a circle in shape, and assign a doubleclick event 
handler to it.  Then you add a child to the circle sprite, thus covering up the 
circle sprite. How do you get the the top sprite to allow the underneath 
(circle sprite) to hear the doubleclick?

I have set doubleclick enabled for both, but I think the issue is the top 
sprite is not letting the lower sprite hear anything?

TIA, J



[flexcoders] Re: how to call dynamic servlet

2009-03-09 Thread anitha2324
Hi , Thanks alot for the help,

I have made some modification and it is working now , i ll post the full mxml 
file later for the sharing


Thanking all of you ..




[flexcoders] Compilers

2009-03-09 Thread James Riffe
Does Flex have both a 32bit and a 64 bit compiler?



[flexcoders] Re: Help on DataGrid dataProvider

2009-03-09 Thread jcjr031064
Oh... That's interesting. I could use attributes instead of nodes.
Thanks.


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

 Flex will find the attributes but not the child nodes.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of jcjr031064
 Sent: Wednesday, March 04, 2009 7:56 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Help on DataGrid dataProvider
 
 
 Thanks a lot. I followed your recommendation and it worked.
 
 I though that flex automatically fetched the field names from the xml as in 
 the case of default resultFormat i.e. object.
 
 I guess for e4x, the dataGridColums must be explicitly specified.
 
 Thanks again.
 
 JC
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  You may need to specify the dataFields in your DataGridColumns depending on 
  what the XML really looks like
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of jcjr031064
  Sent: Tuesday, March 03, 2009 11:43 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Help on DataGrid dataProvider
 
 
  Hello guys,
  A newbie here.
 
  I have this code:
  ?xml version=1.0 encoding=UTF-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute creationComplete=bookData.send()
 
  mx:Script
  ![CDATA[
  import mx.rpc.events.ResultEvent;
  import mx.rpc.events.FaultEvent;
  import mx.controls.Alert;
 
  [Bindable]
  private var bookInfo:XMLList;
 
  private function handleXML(event:ResultEvent):void{
  bookInfo=event.result.stock as XMLList;
  Alert.show(xmlBooks.toString());
  Alert.show(bookInfo);
  }
  ]]
  /mx:Script
  mx:XMLListCollection id=xmlBooks
  source={bookData.lastResult.stock}/
  mx:HTTPService result=handleXML(event) id=bookData url=books.xml 
  resultFormat=e4x/
  mx:DataGrid x=56 y=250 width=950
  dataProvider={xmlBooks}/
  /mx:Application
 
  How do I get the datagrid to be populated with rows? The alert.show calls 
  somehow get the data.
 
  What am i missing here?
 
  JC
 





Re: [flexcoders] Compilers

2009-03-09 Thread Fidel Viegas
On Mon, Mar 9, 2009 at 7:09 AM, James Riffe jtri...@24x7-systems.com wrote:
 Does Flex have both a 32bit and a 64 bit compiler?

Hi James,

The Flex compiler is implemented in Java. So, if you want to take
advantage of 64-bit architecture, you will need a 64-bit JVM.

Fidel.


[flexcoders] Re: Hie

2009-03-09 Thread ppongtong
Please try the following.

mx:Repeater id=upcomingRepeater dataProvider={this.myXML.stat} 
mx:Text id=upcomingText
text={upcomingRepeater.currentItem.empResults}
color={(upcomingRepeater.currentItem.empStatus == 
'VALID') ?
0xFF:0x00}/
/mx:Repeater

Panhathai

--- In flexcoders@yahoogroups.com, Vik vik@... wrote:

 Hie
 My xml is like this:
 
 stat
 empResultsguan completing 9 years in 6 months and 5 days./empResults
 empStatusINVALID/empStatus
 /stat
 stat
 empResultskumar completing 4 years in 11 months and 18
days./empResults
 empStatusVALID/empStatus
 /stat
 stat
 empResultskies completing 4 years in 11 months and 26
days./empResults
 empStatusINVALID/empStatus
 /stat
 stat
 empResultsroy completing 4 years in 11 months and 26
days./empResults
 empStatusVALID/empStatus
 /stat
 
 I want to show it in my vbox as text boxes like
 
 guan completing 9 years in 6 months and 5 days.
 kumar completing 4 years in 11 months and 18 days.
 kies completing 4 years in 11 months and 26 days.
 roy completing 4 years in 11 months and 26 days.
 
 Please note color is red for those whose empStatus in INVALID.
 
 currently my code is like:
 mx:Repeater id=upcomingRepeater dataProvider={myXML}
 mx:Text id=upcomingText text={upcomingRepeater.currentItem}/
 /mx:Repeater
 
 This above code shows me all in black as I have not applied this
empStatus
 to format. So how to do that?
 
 
 
 
 Thankx and Regards
 
 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com





[flexcoders] How to acces POST of REST Service thru Flex (Couldn't establish a connection)

2009-03-09 Thread bjgindia
Hi,

I have got the REST POST working thru simple HTML Form submit.
This REST Service takes an XML and returns back an XML.

But, when I tried it with FLEX, I am getting Couldn't establish a
connection errors:

FLEX CODE:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
 mx:HTTPService id=RESTService
 method=POST

destination=http://10.176.95.32:8889/SunRestTest/sunTest/testRest;
 resultFormat=e4x

  mx:request xmlns=
   {this.payload}
  /mx:request
 /mx:HTTPService

 mx:Script
 ![CDATA[
 private function processValues():void {
 RESTService.send();
 }
 ]]
 /mx:Script

mx:VBox width=100% height=100%
mx:Form width=100% height=50%
 mx:FormItem label=Payload width=100% height=100%
 mx:TextArea id=payload width=100% height=80%
 text=Paste or Type the XML Payload here:/
 mx:Button
 label=Submit
 click=processValues();/
 /mx:FormItem
 /mx:Form

 mx:TextArea width=100% height=50%
 text=
   {RESTService.lastResult.toString()}/

/mx:VBox

/mx:Application

FAULT ON Clicking the Submit Button:

[RPC Fault faultString=[MessagingError message='Destination
'http://10.176.95.32:8889/SunRestTest/sunTest/testRest' either does not
exist or the destination has no channels defined (and the application
does not define any default channels.)'] faultCode=InvokeFailed
faultDetail=Couldn't establish a connection to
'http://10.176.95.32:8889/SunRestTest/sunTest/testRest']
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invo\
ke()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvok\
er.as:263]
at
mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal\
::invoke()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\http\mx\
ml\HTTPService.as:249]
at
mx.rpc.http::HTTPService/send()[C:\autobuild\3.2.0\frameworks\projects\r\
pc\src\mx\rpc\http\HTTPService.as:767]
at
mx.rpc.http.mxml::HTTPService/send()[C:\autobuild\3.2.0\frameworks\proje\
cts\rpc\src\mx\rpc\http\mxml\HTTPService.as:232]
at
CallRESTServices/processValues()[D:\SourceCodes\FLEX_SOURCE\CallRESTServ\
ices\src\CallRESTServices.mxml:17]
at
CallRESTServices/___CallRESTServices_Button1_click()[D:\SourceCodes\FLEX\
_SOURCE\CallRESTServices\src\CallRESTServices.mxml:29]

Appreciate your useful suggestions.

thanks
Bhaskar


Re: [flexcoders] Bindable Singleton is not propogating the changes of its proprties.

2009-03-09 Thread claudiu ursica
Can you post some code ...
Usually you have to bind on AC item if not using list or repeaters or grids ... 
Or listen to the collection change event manually ...

However for Boolean and other primitive types the bindings should fire right 
away...

Claudiu





From: alex myth_dran...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Monday, March 9, 2009 2:49:14 AM
Subject: [flexcoders] Bindable Singleton is not propogating the changes of its 
proprties.


I have a Bindable Singleton class were I access from diffrent components. The 
class has several properties ArrayCollection, Boolean.. . etc .
I assumed that any change in then properties will propogate to all the 
components that use the Singleton class , but from what I see it is not the 
case. 
Why so ? Should I use ChangeWatcher then ?

Thank you.


   


  

Re: [flexcoders] Flex Interview Questions

2009-03-09 Thread claudiu ursica
There was a topic like this a few moths ago, check the archives .. you'll find 
some nice stuff in there ...

Claudiu





From: Shyam Prasad khtsh...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Sunday, March 8, 2009 5:47:27 PM
Subject: [flexcoders] Flex Interview Questions



Hi,

Can anyone provide any website for the Interview Questions  for Flex ?

Thanks

Prasad


   


  

[flexcoders] Convert ArrayCollection to XML

2009-03-09 Thread tiend...@ezweb.ne.jp
Hi all guru,

I have a question about ArrayCollection.

[Backend: MySQL,PHP]
MySQL return result in Array.

[Frontend: Flex]
dp = new ArrayCollection( ArrayUtil.toArray(event.result));

I want to convert ArrayCollection (dp) to XML, and show XML result in TextArea.


Help me please !



Re: [flexcoders] Flex Interview Questions

2009-03-09 Thread Ashish Verma
They could ask you about the followings:

Advanced Datagrid functionalities
Basic Operators like is, typeof, instanceof, , ===, !==
Basic function and constants like random(), Nan, indexOf()
Datatypes: Array, Number
Architecture: Cairngorm, PureMVC,
Event Delegation Model: bubble, traget and capture
DisplayList
Custom Components MXML  AS
RSL, SWC


Best,
Ashish

On Mon, Mar 9, 2009 at 1:57 PM, claudiu ursica the_bran...@yahoo.comwrote:

There was a topic like this a few moths ago, check the archives ..
 you'll find some nice stuff in there ...

 Claudiu

  --
 *From:* Shyam Prasad khtsh...@yahoo.com
 *To:* flexcoders@yahoogroups.com
 *Sent:* Sunday, March 8, 2009 5:47:27 PM
 *Subject:* [flexcoders] Flex Interview Questions


 Hi,

 Can anyone provide any website for the Interview Questions for Flex ?

 Thanks

 Prasad


  



Re: [flexcoders] Sprite doubleclick

2009-03-09 Thread claudiu ursica
In theory you should be able to child.addEventListener(MouseEvent.click, 
handler) after doing 

sprite.addChild(child), so you use the child for listening instead of the 
parent sprite...

He child should be able to handle the clicks ...

HTH,
Claudiu





From: flexaustin flexaus...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Monday, March 9, 2009 8:03:18 AM
Subject: [flexcoders] Sprite doubleclick


So if you have a sprite, say a circle in shape, and assign a doubleclick event 
handler to it.  Then you add a child to the circle sprite, thus covering up the 
circle sprite. How do you get the the top sprite to allow the underneath 
(circle sprite) to hear the doubleclick?

I have set doubleclick enabled for both, but I think the issue is the top 
sprite is not letting the lower sprite hear anything?

TIA, J


   


  

[flexcoders] Re: Datagrid : mouse over item

2009-03-09 Thread secrit.service
Hi Bart,

Exactly what I needed.

Thanks a lot


--- In flexcoders@yahoogroups.com, bartman279 bartman...@... wrote:

 Dispatch the DataGrid's itemRollOver event.
 That event contains a rowIndex of the rolled over item.
 
 Your listener could then be something like:
 
   private function PreviewRow( e: ListEvent ) : void {
   var evt:ListEvent = e as ListEvent;
   preview.text = dg.dataProvider[evt.rowIndex].label;
   }
 
 Hope this helps
 
 ~ Bart
 
 --- In flexcoders@yahoogroups.com, secrit.service secrit-service@ wrote:
 
  Hi everyone,
  
  I have a datagrid. If I mouseclick on a row, I can retrieve this record by 
  using selectedItem. However, when I move my mouse over the datagrid 
  (without clicking) the rows also change color. Is there any way to retrieve 
  the record where my mouse is pointing at.
  Meaning is to show a preview of the records as soon my mouse is passing 
  over.
  
  Thanks in advance
 





[flexcoders] Re: Convert ArrayCollection to XML

2009-03-09 Thread oneworld95
http://nsdevaraj.wordpress.com/2008/08/20/arraycollection-xml/

- Alex C

--- In flexcoders@yahoogroups.com, tiend...@... tienda...@... wrote:

 Hi all guru,
 
 I have a question about ArrayCollection.
 
 [Backend: MySQL,PHP]
 MySQL return result in Array.
 
 [Frontend: Flex]
 dp = new ArrayCollection( ArrayUtil.toArray(event.result));
 
 I want to convert ArrayCollection (dp) to XML, and show XML result in 
 TextArea.
 
 
 Help me please !





Re: [flexcoders] Enumerating throug container/control arrays in Flex/Actionscript?

2009-03-09 Thread surkoff.v

Could you please write a part of our code using flash.events.Event.ADDED on
this purpose ?


Josh McDonald-4 wrote:
 
 I'd attach an event listener to systemManager which listens for bubbling
 flash.events.Event.ADDED and flash.events.Event.REMOVED events and keeps a
 list. You will of course have to attach said event listener on
 Application.preinitialize or something like that.
 
 I'm interested into why you'd want to do this though?
 
 -Josh
 
 On Wed, Jul 2, 2008 at 1:37 PM, pbrendanc pbrend...@yahoo.com wrote:
 
 In windows apps there is a control array collection that can be used
 to find controls and return a handle to the appropriate object.

 What is the recommended Flex approach to finding controls and are
 there any  performance tradeoffs here - recursion is slow and
 potentially error prone (stack overflows anyone?)??

 (I'm seeing the use of recursive GetChildByName calls in some examples
 and wonder if there is a more direct way to find a control given the
 name/ID - regardless of the nesting level). Am I correct in thinking
 that GetChildByName only searches the current node for an item, rather
 than subordinate, nested items?

 TIA,
 Patrick



 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@gfunk007.com
 
 

-- 
View this message in context: 
http://www.nabble.com/Enumerating-throug-container-control-arrays-in-Flex-Actionscript--tp18229675p22401033.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: need some help with extending the LinkBar a bit - How 2 hv close buttons

2009-03-09 Thread bjgindia
Hi All,

Is it possible to extend the LinkBar and have close buttons on each of the 
LinkButtons of the LinkBar?
I don't find an itemRenderer property with the LinkBar control so that I can 
use a custom item renderer to render the LinkButtons on the bar.

Is anyone aware of any such component? Appreciate any help.

Thanks
Bhaskar




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

 LinkBars have LinkButtons as their underlying components so something
 like the following should do it:
 
 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 xmlns:local=*
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  import mx.controls.LinkButton;
 
  private function onCreationComplete():void
  {
  var linkBarChildren:Array = theLinkBar.getChildren();
  for(var i:int = 0 ; i  linkBarChildren.length ; i++)
  {
  var curentLinkButton:LinkButton = linkBarChildren[i]
 as LinkButton;
 
 curentLinkButton.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
 
 curentLinkButton.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
  }
  }
 
  private function onMouseOver(event:MouseEvent):void
  {
  (event.target as LinkButton).setStyle(textDecoration,
 underline);
  }
 
  private function onMouseOut(event:MouseEvent):void
  {
  (event.target as LinkButton).setStyle(textDecoration,
 none);
  }
  ]]
  /mx:Script
  mx:Panel title=LinkBar Control Example height=75% width=75%
 horizontalAlign=center
  paddingTop=10 paddingBottom=10 paddingLeft=10
 paddingRight=10
  mx:LinkBar id=theLinkBar color=#FF fontWeight=bold
 dataProvider={myViewStack}/
  !-- Define the ViewStack and the two child containers. --
  mx:ViewStack id=myViewStack borderStyle=solid width=100%
 height=80%
  mx:Canvas id=search backgroundColor=#CC
 label=Search width=100% height=100%
  mx:Label text=Search Screen color=#00/
  /mx:Canvas
  mx:Canvas id=custInfo backgroundColor=#CC
 label=Customer Info width=100% height=100%
  mx:Label text=Customer Info color=#00/
  /mx:Canvas
  mx:Canvas id=accountInfo backgroundColor=#FFCCFF
 label=Account Info width=100% height=100%
  mx:Label text=Account Info color=#00/
  /mx:Canvas
  /mx:ViewStack
  /mx:Panel
 /mx:Application
 
 
 
 --- In flexcoders@yahoogroups.com, Mark markp.shopping_id@ wrote:
 
  I found this great post out there on how to remove the highlight
  from a LinkButton.  This post shows how to put the underline under
  the text on rollOver which is what I need.  But I'm using a LinkBar,
  can someone help with this on the LinkBar?
 
  Thanks,
  Mark
 
  package
  {
  import flash.events.MouseEvent;
   import mx.controls.LinkButton;
  public class LinkButtonEx extends LinkButton
  {
  public function LinkButtonEx() {
  super();
  addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
  }
public function onMouseOver(event:MouseEvent):void {
 this.setStyle(textDecoration, underline);
}
//
public function onMouseOut(event:MouseEvent):void {
 this.setStyle(textDecoration, none);
}
//
protected override function rollOverHandler
  (event:MouseEvent):void {
 // We don't want the rollOver highlight
}
 
protected override function mouseDownHandler
  (event:MouseEvent):void {
 // We don't want the rollOver highlight
}
 
  }
  }
 





[flexcoders] Re: SWFLoader content-resizing problem

2009-03-09 Thread danieldudek86
It turned out that I've had 3.0. After recompiling main application with 3.2 
(but child apps was still compiled with sdk 3.0) there was a difference, but 
not as I expected - none of the children was scaled at all. After recompiling 
child applications with sdk 3.2 they were scaled quite properly. The problem is 
that the swf's might be totally random (produced by user), but for now i'll 
leave it as is.

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

 Which version of the SDK are you using?  3.2?
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of danieldudek86
 Sent: Sunday, March 01, 2009 12:08 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] SWFLoader content-resizing problem
 
 
 Hi!
 
 Firstly - sorry for my english, I'm not a native english speaker.
 Secondly - sorry for a long post;) I'd like to show the problem clearly
 
 I've got a problem with resizing swf applications loaded with
 SWFLoader component. The problem is that it behaves differently when
 the content-application is at the same domain (or locally) and at the
 foreign domain. Here is the example applications, and some screenshots
 showing the behavior:
 
 exported base application:
 http://www.sendspace.com/file/lk6ce6
 
 first swf application written in flex:
 http://www.sendspace.com/file/j4ooyo
 
 second swf application written in flex:
 http://www.sendspace.com/file/bcqxti
 
 The first app, lets call it 'base application' is loading two
 applications ('stiff size' with application size set to 640x480px, and
 'resizable' with size set to 100%x100%, both with one button filling
 all the application area) exported to swf files, with swf loaders;
 
 1.When swf's are loaded locally, or at the same domain:
 a) 'resizable' app is resized to SWFLoader component size
 b) 'stiff size' app is not resized at all
 screenshot:
 http://img8.imageshack.us/my.php?image=local.png
 
 2.When swf's are loaded at the foreign domain (with
 Security.allowDomain(domain address) at the base application
 initialization):
 a) 'resizable' app is about twice bigger as it should be! (the biggest
 problem)
 b) 'stiff size' app is stretched to SWFLoader component size
 screenshot:
 http://img213.imageshack.us/my.php?image=remote.png
 
 The behavior that would be best for me is 1a for resizable
 applications, and 2b for applications with defined size (eventually 1b
 - not resized at all) for both local loading, and from foreign domain.
 
 1. Is it possible?
 2. Is it the SWFLoader proper behavior, or is it a bug? I've found a bug
 on adobe jira with similar problem, but with 'cannot reproduce'
 status, and no workaround (the trustContent=true do not work for me),
 should i post a comment there?
 link to jira: http://bugs.adobe.com/jira/browse/SDK-13323
 
 The swf files are uploaded for testing at the adresses:
 http://tomekok.ovh.org/test/ResizableSWF.swf
 http://tomekok.ovh.org/test/StiffSizeSWF.swf





[flexcoders] Re: Recommended MVC for Flex/AS?

2009-03-09 Thread smitade
ActionJack isn't mentioned:

http://www.beamjive.com/weblog/?p=38


--- In flexcoders@yahoogroups.com, Alex Ninan fle...@... wrote:

 Take a look at the attached link
 
 http://www.summa-tech.com/blog/2009/01/14/selecting-the-right-flex-application-framework/
 
 On Tue, Mar 3, 2009 at 11:38 AM, Adrian Williams
 adri...@...wrote:
 
 Hi All,
 
  I'm curious as to what our overall community would recommend, why and
  the pros/cons of the various MVC's that are out there for Flex/AS.
 
  Thanks,
  Adrian
 

 





Re: [flexcoders] Flex Interview Questions

2009-03-09 Thread Weyert de Boer
Why would you want to ask about specific components which can be easily 
learned after you have hired the guy? Better to ask question about 
programming principles and maybe Flash specific questions. But asking 
about specific components is a bit odd in my opinion.

Anyways, Sidney had some nice question listed in flashcoders or this 
list a while back.



[flexcoders] virtual keyboard

2009-03-09 Thread danieldudek86
Hi.

I have to implement a virtual keyboard (for touch screen kiosk). All the 
materials i've found on web was like adding text to some control, for example: 
textInput1.text += 'a', but it would be killer-task to implement all the 
functionality of keyboard like putting chars somewhere in the middle of text 
after user set cursor by clicking there etc, and what's worse - managing type 
of reaction depending of what control is focused.

Is there some way to generate keyboard events just as like they where generated 
by normal keyboard?

I tried this, but it is not working (no reaction):

var kEvent:KeyboardEvent = new KeyboardEvent(KeyboardEvent.KEY_DOWN, true, 
false, String('a').charCodeAt(),String('a').charCodeAt());

if(stage.focus!=null)
   this.stage.focus.dispatchEvent(kEvent);





[flexcoders] Find the value of a radiobutton in a radio group

2009-03-09 Thread Wally Kolcz
I am trying to make a AIR app that is a test. I have radiobuttons with a value 
of either 0 or 1 depending on if its correct or not. I want to pass the value 
to a function that keeps score. I am running into a problem on determining the 
value of the passed question to see if the app should add a 1 to the score or 
not. I keep getting 'Error #1069: Property value not found on Number and there 
is no default value.' when I click the button.

Here is my radiobuttongroup:

mx:Label fontWeight=bold text=1. Which layer(s) of the OSI Reference Model 
provide(s) for internetwork connectivity? /
mx:RadioButtonGroup id=group1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Data Link 
value=0 selected=true /
mx:RadioButton paddingLeft=10 groupName=group1 label=Physical 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Session 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Network 
value=1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Presentation 
value=0 /

mx:Button label=Next click=testMod.checkSingle(group1.selectedValue) /

Here is my function:

public function checkSingle(answer:Object):void {
if (answer.value !=0) {
Application.application.score += 1;
}
nextQuestionPlease();
}

How can I get it to find the value and determine if it should add 1 or not.

Thanks.



[flexcoders] Turn all keyboard input into upper-case for all TextInput and TextArea

2009-03-09 Thread per.olesen
I need to automatically turn all keyboard input in all TextInput and TextArea 
components in my flex application into upper-case.

It needs to function like if the user had actually typed it in upper-case. So, 
the events with the lower-case input needs to be stopped and new events with 
the upper-case equivalent need to be dispatched.

I am having trouble getting this to work, and would like some input on possible 
solutions.

Tried 1: Extending mx.controls.TextInput

And listening for TextEvent, stopping its propagation and preventing its 
default and dispatching a new TextEvent with the upper-case equivalent. But the 
upper-case char is not shown then, due to use preventing its default.

Tried 2: Listening for KeyboardEvent on stage

To catch all keyboard input and try and change it before it goes any further. 
But, some of the same problems occur. Preventing default makes the char not 
appear.

Any thought?



[flexcoders] Looking for a design pattern

2009-03-09 Thread markgoldin_2000
I am working on an application which purpose is to track a task time. Users are 
checking in and out of tasks by scanning their badges. Scanning stations are 
installed around a shop. Currently I have 5 stations. I would want to have all 
these stations showing identical data. For that I have a mechanism of syncing 
all stations at the time when a user scan his ID or enters a task to work on. 
Another words, any change on one station is triggering data refresh on all 
stations. Everything works fine, but with one problem. In the morning when 
scanning is the most extensive, there is a situation when a user scans his ID 
and at the same time another user scans on another station. This collision 
would change DataGrid's higjlighted record to a record of the second user and 
first user would be entering his task into a wrong record. What would be a 
design pattern of managing such solution? 
Any idea is very welcome.

Thanks, Mark



[flexcoders] Re: Turn all keyboard input into upper-case for all TextInput and TextArea

2009-03-09 Thread markgoldin_2000
Is this anything of help?

capsLock property 

capsLock:Boolean  [read-only]
Specifies whether the Caps Lock key is activated (true) or not (false). 


--- In flexcoders@yahoogroups.com, per.olesen per.ole...@... wrote:

 I need to automatically turn all keyboard input in all TextInput and TextArea 
 components in my flex application into upper-case.
 
 It needs to function like if the user had actually typed it in upper-case. 
 So, the events with the lower-case input needs to be stopped and new events 
 with the upper-case equivalent need to be dispatched.
 
 I am having trouble getting this to work, and would like some input on 
 possible solutions.
 
 Tried 1: Extending mx.controls.TextInput
 
 And listening for TextEvent, stopping its propagation and preventing its 
 default and dispatching a new TextEvent with the upper-case equivalent. But 
 the upper-case char is not shown then, due to use preventing its default.
 
 Tried 2: Listening for KeyboardEvent on stage
 
 To catch all keyboard input and try and change it before it goes any further. 
 But, some of the same problems occur. Preventing default makes the char not 
 appear.
 
 Any thought?





[flexcoders] Resize image

2009-03-09 Thread christophe_jacquelin
Hello, 

For a gallery, I want to rescale the original image to have a thumbnail image. 
What instuctions to use ? 

Thank you,
Christophe,



RE: [flexcoders] ASDoc and .as includes?

2009-03-09 Thread Stephen Gilson
We use include files in Flex in a lot of places with no ASDoc issues. Is the 
error because ASDoc is trying to process the include file as if it were a class 
definition? If so, you should exclude the file from the build.

Or, are you getting a different error?

Stephen

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of aaron smith
Sent: Sunday, March 08, 2009 1:10 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ASDoc and .as includes?


Hey all,

How can I get asdoc to play nice with includes? By includes, I don't
mean the asdoc -includes command flag. that's for including swcs. I
mean the preprocessor includes like:

include some_as_file.as

I have some classes that use the same logic, so I've put it in
includes. But it breaks asdoc.

any ideas?

Thanks
-Aaron

inline: image001.jpginline: image002.jpg

[flexcoders] Re: Flex Interview Questions

2009-03-09 Thread nathanpdaniel

 5) How do you add event listeners in mxml components.  Now AS3 components?

I was actually asked this once (someone was actually asking me at work) - but - 
I didn't really know how to answer the mxml portion - other than to give a code 
sample... 

custom:MyComponent eventType=eventHandler() /

What WOULD be a better/proper answer for that???



Re: [flexcoders] virtual keyboard

2009-03-09 Thread Weyert de Boer
Please keep in mind that a lot of the virtual keyboard designs are 
patented in the U.S. As long you don't have to deal in the U.S. you can 
ignore my comment.


[flexcoders] Re: Sprite doubleclick

2009-03-09 Thread flexaustin
ok, duh!!!  mouseChildren = false did the trick.


--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 In theory you should be able to child.addEventListener(MouseEvent.click, 
 handler) after doing 
 
 sprite.addChild(child), so you use the child for listening instead of the 
 parent sprite...
 
 He child should be able to handle the clicks ...
 
 HTH,
 Claudiu
 
 
 
 
 
 From: flexaustin flexaus...@...
 To: flexcoders@yahoogroups.com
 Sent: Monday, March 9, 2009 8:03:18 AM
 Subject: [flexcoders] Sprite doubleclick
 
 
 So if you have a sprite, say a circle in shape, and assign a doubleclick 
 event handler to it.  Then you add a child to the circle sprite, thus 
 covering up the circle sprite. How do you get the the top sprite to allow the 
 underneath (circle sprite) to hear the doubleclick?
 
 I have set doubleclick enabled for both, but I think the issue is the top 
 sprite is not letting the lower sprite hear anything?
 
 TIA, J





RE: [flexcoders] Turn all keyboard input into upper-case for all TextInput and TextArea

2009-03-09 Thread Alex Harui
Unfortunately, the text controls don't use events as input events, but dispatch 
them as notifications instead, so you can't fake events to them.

Most brute force way is to set text to toUpperCase on the change event.  Could 
be slow on large strings and you may have to track and restore selection.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of per.olesen
Sent: Monday, March 09, 2009 7:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Turn all keyboard input into upper-case for all TextInput 
and TextArea


I need to automatically turn all keyboard input in all TextInput and TextArea 
components in my flex application into upper-case.

It needs to function like if the user had actually typed it in upper-case. So, 
the events with the lower-case input needs to be stopped and new events with 
the upper-case equivalent need to be dispatched.

I am having trouble getting this to work, and would like some input on possible 
solutions.

Tried 1: Extending mx.controls.TextInput

And listening for TextEvent, stopping its propagation and preventing its 
default and dispatching a new TextEvent with the upper-case equivalent. But the 
upper-case char is not shown then, due to use preventing its default.

Tried 2: Listening for KeyboardEvent on stage

To catch all keyboard input and try and change it before it goes any further. 
But, some of the same problems occur. Preventing default makes the char not 
appear.

Any thought?



re: [flexcoders] Find the value of a radiobutton in a radio group

2009-03-09 Thread Wally Kolcz
I think I am finding that the problem is in the nextQuestionPlease() method. 
The reference to questionsVS is null and I can't figure out why.

Here is the function:

public function nextQuestionPlease():void {

questionsVS.selectedIndex=currentQuestion;

}

Here is the viewStack:

mx:ViewStack id=questionsVS width=98% height=100% paddingLeft=10

questions:question1 /
questions:question2 /
questions:question3 /
questions:question4 /
/mx:ViewStack

In my init I set it to 0 and it appears how it should. How can I instantiate it?


From: Wally Kolcz wko...@isavepets.com
Sent: Monday, March 09, 2009 6:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Find the value of a radiobutton in a radio group 

I am trying to make a AIR app that is a test. I have radiobuttons with a value 
of either 0 or 1 depending on if its correct or not. I want to pass the value 
to a function that keeps score. I am running into a problem on determining the 
value of the passed question to see if the app should add a 1 to the score or 
not. I keep getting 'Error #1069: Property value not found on Number and there 
is no default value.' when I click the button.

Here is my radiobuttongroup:

mx:Label fontWeight=bold text=1. Which layer(s) of the OSI Reference Model 
provide(s) for internetwork connectivity? /
mx:RadioButtonGroup id=group1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Data Link 
value=0 selected=true /
mx:RadioButton paddingLeft=10 groupName=group1 label=Physical 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Session 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Network 
value=1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Presentation 
value=0 /

mx:Button label=Next click=testMod.checkSingle(group1.selectedValue) /

Here is my function:

public function checkSingle(answer:Object):void {
if (answer.value !=0) {
Application.application.score += 1;
}
nextQuestionPlease();
}

How can I get it to find the value and determine if it should add 1 or not.

Thanks.




RE: [flexcoders] Find the value of a radiobutton in a radio group

2009-03-09 Thread Alex Harui
It is my strong preference that anyone asking a question about an error post 
the entire stacktrace.  It is like a fingerprint and makes it much faster for 
me and others to identify problems.

In the original post, you are using selectedValue as the parameter which will 
be 0 or 1, not the radiobutton itself.  The rb should be in the rbg's selection 
property

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Wally Kolcz
Sent: Monday, March 09, 2009 8:12 AM
To: flexcoders@yahoogroups.com
Subject: re: [flexcoders] Find the value of a radiobutton in a radio group


I think I am finding that the problem is in the nextQuestionPlease() method. 
The reference to questionsVS is null and I can't figure out why.

Here is the function:

public function nextQuestionPlease():void {

questionsVS.selectedIndex=currentQuestion;

}

Here is the viewStack:

mx:ViewStack id=questionsVS width=98% height=100% paddingLeft=10

questions:question1 /
questions:question2 /
questions:question3 /
questions:question4 /
/mx:ViewStack

In my init I set it to 0 and it appears how it should. How can I instantiate it?


From: Wally Kolcz wko...@isavepets.com
Sent: Monday, March 09, 2009 6:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Find the value of a radiobutton in a radio group

I am trying to make a AIR app that is a test. I have radiobuttons with a value 
of either 0 or 1 depending on if its correct or not. I want to pass the value 
to a function that keeps score. I am running into a problem on determining the 
value of the passed question to see if the app should add a 1 to the score or 
not. I keep getting 'Error #1069: Property value not found on Number and there 
is no default value.' when I click the button.

Here is my radiobuttongroup:

mx:Label fontWeight=bold text=1. Which layer(s) of the OSI Reference Model 
provide(s) for internetwork connectivity? /
mx:RadioButtonGroup id=group1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Data Link 
value=0 selected=true /
mx:RadioButton paddingLeft=10 groupName=group1 label=Physical 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Session 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Network 
value=1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Presentation 
value=0 /

mx:Button label=Next click=testMod.checkSingle(group1.selectedValue) /

Here is my function:

public function checkSingle(answer:Object):void {
if (answer.value !=0) {
Application.application.score += 1;
}
nextQuestionPlease();
}

How can I get it to find the value and determine if it should add 1 or not.

Thanks.





[flexcoders] Re: Debugging Event Bubbling

2009-03-09 Thread valkyrie77
Thanks Tracy and Jim.

Jim fixed that but no joy.  Ended up re-broadcasting the event up the chain 
which isn't terrible but wish i could take advantage of bubbling straight from 
my DAO class instead of  having to re-broadcast in my timeline class.

Thanks again for the help

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

 Your TweetCommEvent's clone method returns a PreferencePaneEvent rather than 
 the TweetCommEvent I'd expect, at least in the code you wrote below.
 It's not that, is it? 
 
 public class TweetCommEvent extends Event
 {
 
 
 override public function clone():Event {
   return new PreferencePaneEvent(type, bubbles, cancelable);
  }
 ..
 
 }
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of valkyrie77
 Sent: 08 March 2009 17:52
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Debugging Event Bubbling
 
 Hi Folks,
 
 I'm currently working on a twitter AIR client using the twitterscript AS3 
 library and having some issues with bubbling custom events that are created 
 by nested classses back to the main application.
 
 I've architected so that the main application (A) spawns a new timeline 
 window (B) for every twitter account a user may have. I have a Comm class (C) 
 i use as a DAO layer to decouple the twitterscript custom events from my 
 framework (in case i switch to a different as3 API library)
 
 My custom event class looks like this 
 
 package com.kubeworks.events
 {
 import flash.events.Event;
 
 public class TweetCommEvent extends Event
 {
 public static const TIMELINE_BACK:String = timelineBack;
 public static const STATUS_BACK:String = statusBack;
 public static const USER_INFO_BACK:String = userInfoBack;
 public static const RATE_LIMIT_STATUS:String = rateLimitBack;
 public var data : Object = new Object ();
 
 public function TweetCommEvent(type:String, bubbles:Boolean=true, 
 cancelable:Boolean=false)
 {
 super(type, bubbles, cancelable);
 }
 
 override public function clone():Event {
 return new PreferencePaneEvent(type, bubbles, cancelable);
 }
 
 }
 }
 
 My Comm Class goes something like
 package com.kubeworks.data
 {
 // Twitter API calls
 import com.kubeworks.events.TweetCommEvent;
 
 import flash.events.Event;
 import flash.events.EventDispatcher;
 import flash.utils.*;
 
 import mx.utils.ObjectUtil;
 
 import twitter.api.Twitter;
 import twitter.api.events.TwitterEvent;
 
 public class TweetComm extends EventDispatcher
 {
 
 private var username:String;
 private var password:String;
 
 private var _twitterClient:Twitter;
 
 // Constructor
 public function TweetComm(usern:String, pass:String)
 {
 // Initialize Twitter Event Listeners
 _twitterClient = new Twitter();
 _twitterClient.addEventListener(Event.ACTIVATE, twitterClientActivateHandler);
 _twitterClient.addEventListener(Event.DEACTIVATE, twitterClientDeactivate);
 _twitterClient.addEventListener(TwitterEvent.ON_FRIENDS_TIMELINE_RESULT, 
 twitterTimelineBack);
 _twitterClient.addEventListener(TwitterEvent.ON_SET_STATUS, 
 twitterStatusBack);
 _twitterClient.addEventListener(TwitterEvent.ON_SHOW_INFO, twitterUserBack);
 _twitterClient.addEventListener(TwitterEvent.ON_RATE_LIMIT_STATUS, 
 twitterRateLimitBackHandler);
 
 
 // Do stuff
 setLogin(usern, pass);
 setAuth();
 }
 
 and within that class i'm re-dispatching like:
 
 private function twitterRateLimitBackHandler(event:TwitterEvent):void {
 var eventObj:TweetCommEvent = new 
 TweetCommEvent(TweetCommEvent.RATE_LIMIT_STATUS, true);
 eventObj.data = event.data;
 dispatchEvent(eventObj);
 trace(twitterRateLimitBackHandler);
 trace(ObjectUtil.toString(event));
 trace(twitterRateLimitBackHandler);
 trace(ObjectUtil.toString(eventObj));
 }
 
 I've set the bubbling to true. However in my main application this 
 EventListener never fires
 
 systemManager.addEventListener(TweetCommEvent.RATE_LIMIT_STATUS, 
 onRateLimitHandler);
 
 Any help would be greatly appreciated as i am out ideas and have exausted 
 google and my flex friends.
 
 Thanks,
 Sean
 
 
 __
 This communication is from Primal Pictures Ltd., a company registered in 
 England and Wales with registration No. 02622298 and registered office: 4th 
 Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. 
 VAT registration No. 648874577.
 
 This e-mail is confidential and may be privileged. It may be read, copied and 
 used only by the intended recipient. If you have received it in error, please 
 contact the sender immediately by return e-mail or by telephoning +44(0)20 
 7637 1010. Please then delete the e-mail and do not disclose its contents to 
 any person.
 This email has been scanned for Primal Pictures by the MessageLabs Email 
 Security System.
 __





[flexcoders] Re: How to acces POST of REST Service thru Flex (Couldn't establish a connection

2009-03-09 Thread Anthony DeBonis
Try switching destination  to url

destinations need to be preset in services-config.xml

url=http://10.176.95.32:8889/SunRestTest/sunTest/testRest;

Also add a fault handler would help so you can place a break point and look at 
fault event object for details.


--- In flexcoders@yahoogroups.com, bjgindia bjgin...@... wrote:

 Hi,
 
 I have got the REST POST working thru simple HTML Form submit.
 This REST Service takes an XML and returns back an XML.
 
 But, when I tried it with FLEX, I am getting Couldn't establish a
 connection errors:
 
 FLEX CODE:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  mx:HTTPService id=RESTService
  method=POST
 
 destination=http://10.176.95.32:8889/SunRestTest/sunTest/testRest;
  resultFormat=e4x
 
   mx:request xmlns=
{this.payload}
   /mx:request
  /mx:HTTPService
 
  mx:Script
  ![CDATA[
  private function processValues():void {
  RESTService.send();
  }
  ]]
  /mx:Script
 
 mx:VBox width=100% height=100%
 mx:Form width=100% height=50%
  mx:FormItem label=Payload width=100% height=100%
  mx:TextArea id=payload width=100% height=80%
  text=Paste or Type the XML Payload here:/
  mx:Button
  label=Submit
  click=processValues();/
  /mx:FormItem
  /mx:Form
 
  mx:TextArea width=100% height=50%
  text=
{RESTService.lastResult.toString()}/
 
 /mx:VBox
 
 /mx:Application
 
 FAULT ON Clicking the Submit Button:
 
 [RPC Fault faultString=[MessagingError message='Destination
 'http://10.176.95.32:8889/SunRestTest/sunTest/testRest' either does not
 exist or the destination has no channels defined (and the application
 does not define any default channels.)'] faultCode=InvokeFailed
 faultDetail=Couldn't establish a connection to
 'http://10.176.95.32:8889/SunRestTest/sunTest/testRest']
 at
 mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invo\
 ke()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvok\
 er.as:263]
 at
 mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal\
 ::invoke()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\http\mx\
 ml\HTTPService.as:249]
 at
 mx.rpc.http::HTTPService/send()[C:\autobuild\3.2.0\frameworks\projects\r\
 pc\src\mx\rpc\http\HTTPService.as:767]
 at
 mx.rpc.http.mxml::HTTPService/send()[C:\autobuild\3.2.0\frameworks\proje\
 cts\rpc\src\mx\rpc\http\mxml\HTTPService.as:232]
 at
 CallRESTServices/processValues()[D:\SourceCodes\FLEX_SOURCE\CallRESTServ\
 ices\src\CallRESTServices.mxml:17]
 at
 CallRESTServices/___CallRESTServices_Button1_click()[D:\SourceCodes\FLEX\
 _SOURCE\CallRESTServices\src\CallRESTServices.mxml:29]
 
 Appreciate your useful suggestions.
 
 thanks
 Bhaskar





[flexcoders] flash 10 3D

2009-03-09 Thread Kenneth Sutherland
I'm trying to get to grips with some of the new 3D features in flash
player 10 and I'm having limited success. So I'm looking for some
helpful tutorials/examples.  I've seen a few that are to do with gumbo,
but I'm not looking at that yet. Just flex 3.2/3.3 examples.

 

Some of the sites I've seen useful info on so far are.

 

http://www.yswfblog.com/blog/2008/11/12/3d-with-flash-10-part-2/

 

http://www.flex888.com/934/tutorial-for-3d-using-flash-10.html

 

http://polygeek.com/1508_flex_flash-10-3d-examples-of-rotating-component
s

 

http://www.neuroproductions.be/experiments/the-new-drawing-api-rocks/

 

http://blog.dcholth.com/

 

If you know of any other good ones, let me know.

 

Cheers.

 

 



realise

.


Kenneth Sutherland

Technical Developer

Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com http://www.realise.com/ 

Check out some of our recent flex work:
* Focus on funds UK http://www.focusonfunds.co.uk/ 
* Focus on funds Europe
http://europe.standardlifeinvestments.com/distributor/products_and_serv
ices/going_further_focus_on_funds/index.html 
* Fund selector
http://uk.standardlifeinvestments.com/ifa/adviser_support/index.html 

* Video view
http://uk.standardlifeinvestments.com/ifa/market_views/video_view_and_m
p3s/index.html 
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.

 

 

Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---

[flexcoders] Holi Hai ...............................

2009-03-09 Thread Ashish Verma
[image: http://www.bindaaspoll.com/festivals/images/holi-greeting5.jpg]


[image: http://www.bindaaspoll.com/festivals/images/holi-greeting1.jpg]

[image: http://www.bindaaspoll.com/festivals/images/holi-greeting2.jpg]

[image: http://www.bindaaspoll.com/festivals/images/holi-greeting3.jpg]

[image: http://www.bindaaspoll.com/festivals/images/holi-greeting4.jpg]


[image: http://www.bindaaspoll.com/festivals/images/holi-greeting6.jpg]



-- 
Regards
Vineet Jaiswal
[Software Engineer]
Dataman Computer Systems Pvt. Ltd.


RE: [flexcoders] Find the value of a radiobutton in a radio group

2009-03-09 Thread Wally Kolcz

That part seems to work fine no that I went through the 
debugging values. Its a null reference which ties to the questionsVS 
 viewstack.

Here is the error for that.

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
at com.ipexpert.tests::test1/nextQuestionPlease()[D:\wkolcz\My 
Documents\Flex Builder 
3\IPExpertBrainBuster\src\com\ipexpert\tests\test1.mxml:49]
at com.ipexpert.tests::test1/checkSingle()[D:\wkolcz\My Documents\Flex 
Builder 3\IPExpertBrainBuster\src\com\ipexpert\tests\test1.mxml:22]
at 
com.ipexpert.questions.q1::question1/___question1_Button1_click()[D:\wkolcz\My 
Documents\Flex Builder 
3\IPExpertBrainBuster\src\com\ipexpert\questions\q1\question1.mxml:21]

thiscom.ipexpert.tests.test1 (@872c0a1)
[inherited]
_1087624319currentQuestion1
_964308170questionsVSnull
currentQuestion1
_documentDescriptor_mx.core.UIComponentDescriptor (@872e629)
questionsVSnull
testID1



From: Alex Harui aha...@adobe.com
Sent: Monday, March 09, 2009 8:21 AM
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Find the value of a radiobutton in a radio group 


It is my strong preference that anyone asking a question about
an error post the entire stacktrace.  It is like a fingerprint and makes it
much faster for me and others to identify problems.


In the original post, you are using selectedValue as the
parameter which will be 0 or 1, not the radiobutton itself.  The rb should be in
the rbg's selection property


Alex Harui


Flex SDK Developer


Adobe
Systems Inc.


Blog: http://blogs.adobe.com/aharui


From:

flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of 
Wally
Kolcz
Sent: Monday, March 09, 2009 8:12 AM
To: flexcoders@yahoogroups.com
Subject: re: [flexcoders] Find the value of a radiobutton in a radio
group

I think I am finding that the problem is in the
nextQuestionPlease() method. The reference to questionsVS is null and I can't
figure out why.

Here is the function:

public function nextQuestionPlease():void {

questionsVS.selectedIndex=currentQuestion;

}

Here is the viewStack:

mx:ViewStack id=questionsVS
width=98% height=100% paddingLeft=10

questions:question1 /

questions:question2 /

questions:question3 /

questions:question4 /

/mx:ViewStack

In my init I set it to 0 and it appears how it should. How can I instantiate
it?





From


: Wally Kolcz
wko...@isavepets.com
Sent: Monday, March 09, 2009 6:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Find the value of a radiobutton in a radio group

I am trying to make a AIR app that is a test. I have radiobuttons with a
value of either 0 or 1 depending on if its correct or not. I want to pass the
value to a function that keeps score. I am running into a problem on
determining the value of the passed question to see if the app should add a 1
to the score or not. I keep getting 'Error #1069: Property value not found on
Number and there is no default value.' when I click the button.

Here is my radiobuttongroup:

mx:Label fontWeight=bold text=1. Which layer(s) of the
OSI Reference Model provide(s) for internetwork connectivity? /

mx:RadioButtonGroup id=group1 /

mx:RadioButton paddingLeft=10
groupName=group1 label=Data Link value=0
selected=true /

mx:RadioButton paddingLeft=10
groupName=group1 label=Physical value=0
/

mx:RadioButton paddingLeft=10
groupName=group1 label=Session value=0
/

mx:RadioButton paddingLeft=10
groupName=group1 label=Network value=1
/

mx:RadioButton paddingLeft=10
groupName=group1 

RE: [flexcoders] Re: how to close a titlewindow that was not created as a popup

2009-03-09 Thread Ryan Graham

Post some code and we'll take it from there...

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of stinasius
Sent: Friday, March 06, 2009 10:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to close a titlewindow that was not
created as a popup

 

am calling it from with the titlewindow i would like to close. i also
tried calling it from the parent page that calls the custom titlewindow.





This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.

RE: [flexcoders] Looking for a design pattern

2009-03-09 Thread Gregory Kelley
It is my humble opinion that you would need to initiate some type of
locking mechanism. The process locks until the one process is done. If
you have an application level backend then that could have a lock
variable with a unique ID to the specific process. when it is complete
you push your synchronization and wait for the next request. Another
option might be to package a request as a bundle and submit the package
1 tme and pull the update to that station. If a process is in process
you don't auto update until that process is complete. When there is no
process in progress then you have it pull on a timer. 
 
That is if I have read your post correctly. :-)
 
Greg



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Monday, March 09, 2009 10:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Looking for a design pattern



I am working on an application which purpose is to track a task time.
Users are checking in and out of tasks by scanning their badges.
Scanning stations are installed around a shop. Currently I have 5
stations. I would want to have all these stations showing identical
data. For that I have a mechanism of syncing all stations at the time
when a user scan his ID or enters a task to work on. Another words, any
change on one station is triggering data refresh on all stations.
Everything works fine, but with one problem. In the morning when
scanning is the most extensive, there is a situation when a user scans
his ID and at the same time another user scans on another station. This
collision would change DataGrid's higjlighted record to a record of the
second user and first user would be entering his task into a wrong
record. What would be a design pattern of managing such solution? 
Any idea is very welcome.

Thanks, Mark






[flexcoders] Re: Flash 10 File Chooser

2009-03-09 Thread twcrone70
That's kinda what I suspected.  Thank you!

- Todd

--- In flexcoders@yahoogroups.com, jim.abbott45 jim.abbot...@... wrote:

 No, according to the documentation (probably because it would be a privacy 
 violation):
 
 The FileReference and FileReferenceList classes . . . do not allow the SWF 
 file that initiated the upload or download to access the uploaded or 
 downloaded file or the file's location on the user's disk.
 
 See: http://livedocs.adobe.com/flex/3/langref/flash/net/FileReference.html
 
 --JIm
 
 --- In flexcoders@yahoogroups.com, twcrone70 twcrone70@ wrote:
 
  Is there anyway to get the fully qualified path to a selected file rather 
  than just the filename?
  
  - Todd
 





[flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Wally Kolcz
I have a test that I want to walk through the questions using a function. How 
can I set the inital value of the ViewStack (questionsVS) to 0 and then 
increment it by one each time someone clicks a button?

mx:ViewStack id=questionsVS width=98% height=100% paddingLeft=10
questions:question1 /
questions:question2 /
questions:question3 /
questions:question4 /
/mx:ViewStack



Re: [flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Michael Wills
Hey there Wally,

You can get access to the currently selected viewstack, and also set it, 
through selectedIndex. So your initial declaration would be like
mx:ViewStack id=questionVS etc... selectedIndex=0 
click=nextQuestion()

and in your function nextQuestion you can increment the selectedIndex. 
I'd have to check but I think you can find the number of items in your 
viewStack with numChildren. That would give you your max value to finish 
your quiz or handle the end how you would like.

You can find more about what you can do with viewstacks in the docs:

http://livedocs.adobe.com/flex/3/langref/mx/containers/ViewStack.html

Hope that helps!

Michael

Wally Kolcz wrote:

 I have a test that I want to walk through the questions using a 
 function. How can I set the inital value of the ViewStack 
 (questionsVS) to 0 and then increment it by one each time someone 
 clicks a button?

 mx:ViewStack id=questionsVS width=98% height=100% paddingLeft=10
 questions:question1 /
 questions:question2 /
 questions:question3 /
 questions:question4 /
 /mx:ViewStack

 


[flexcoders] Flickering in datagrid Header Renderer while loading data

2009-03-09 Thread Dharmendra Chauhan
I m also facing similar issue,Please see my code below:-

Custom Header Renderer:

[Bindable]
 private var theImage:Class;
 override public  function set data(value:Object):void 
  {
dgColumn =  value as DataGridColumn;
  if(dgColumn.sortDescending)
 this.theImage = this.downArrow;
 else
this.theImage = this.upArrow;
}

]]
/mx:Script

mx:Image source={this.theImage}/
 

Image is flicking when data loads in data grid. I also tried Label with some 
text, that to is  flicking.
Everything looks good as soon as data loading is over .Is there any ways to 
avoid this flicker  ??

 Please throw some light in to it 

Regards,
Dharmendra



[flexcoders] Re: Looking for a design pattern

2009-03-09 Thread markgoldin_2000
Yes, locking mechanism is what I am after. But my question what is a 
technically correct way of implementing one.

--- In flexcoders@yahoogroups.com, Gregory Kelley gkel...@... wrote:

 It is my humble opinion that you would need to initiate some type of
 locking mechanism. The process locks until the one process is done. If
 you have an application level backend then that could have a lock
 variable with a unique ID to the specific process. when it is complete
 you push your synchronization and wait for the next request. Another
 option might be to package a request as a bundle and submit the package
 1 tme and pull the update to that station. If a process is in process
 you don't auto update until that process is complete. When there is no
 process in progress then you have it pull on a timer. 
  
 That is if I have read your post correctly. :-)
  
 Greg
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of markgoldin_2000
 Sent: Monday, March 09, 2009 10:12 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Looking for a design pattern
 
 
 
 I am working on an application which purpose is to track a task time.
 Users are checking in and out of tasks by scanning their badges.
 Scanning stations are installed around a shop. Currently I have 5
 stations. I would want to have all these stations showing identical
 data. For that I have a mechanism of syncing all stations at the time
 when a user scan his ID or enters a task to work on. Another words, any
 change on one station is triggering data refresh on all stations.
 Everything works fine, but with one problem. In the morning when
 scanning is the most extensive, there is a situation when a user scans
 his ID and at the same time another user scans on another station. This
 collision would change DataGrid's higjlighted record to a record of the
 second user and first user would be entering his task into a wrong
 record. What would be a design pattern of managing such solution? 
 Any idea is very welcome.
 
 Thanks, Mark





[flexcoders] microsoft excel plug in for flex/air

2009-03-09 Thread hworke


   Hi did any one try this plug in for MS
   Excel? 

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

   Is there any other out there?

   Regards,

  



RE: [flexcoders] Flickering in datagrid Header Renderer while loading data

2009-03-09 Thread Alex Harui
It depends on what you mean by flickering.  It would be unusual for a label to 
flicker.  Images often do, and SuperImage from quietlyscheming.com can help, 
but if the label if flickering, something else might be the issue.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Dharmendra Chauhan
Sent: Monday, March 09, 2009 11:05 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flickering in datagrid Header Renderer while loading data


I m also facing similar issue,Please see my code below:-

Custom Header Renderer:

[Bindable]
private var theImage:Class;
override public function set data(value:Object):void
{
dgColumn = value as DataGridColumn;
if(dgColumn.sortDescending)
this.theImage = this.downArrow;
else
this.theImage = this.upArrow;
}

]]
/mx:Script

mx:Image source={this.theImage}/


Image is flicking when data loads in data grid. I also tried Label with some 
text, that to is flicking.
Everything looks good as soon as data loading is over .Is there any ways to 
avoid this flicker ??

Please throw some light in to it

Regards,
Dharmendra



Re: [flexcoders] Resize image

2009-03-09 Thread Paul Kukiel
This can be done with the client in Flex with Flash 10 but most more
commonly is done server side.  Here is a rough prototype I put
together a few weeks back.  It required Flash 10 and so far is only
working in Windows:
http://blog.kukiel.net/2009/02/file-manipulation-client-side-with.html

Paul.

On Mon, Mar 9, 2009 at 10:29 AM, christophe_jacquelin
christophe_jacque...@yahoo.fr wrote:
 Hello,

 For a gallery, I want to rescale the original image to have a thumbnail
 image. What instuctions to use ?

 Thank you,
 Christophe,

 


[flexcoders] Re: dataGrid not receiving user input (intermitently) in bottom right - itemRenderer problem..

2009-03-09 Thread Tim Hoff

1. Are there any known issues with extending Label for item renderers?
No, but it's rare.   2. Assuming that the item renderer only needs to
manipulate the text of the renderer, is example 1  - extending
DataItemGrid - (below) a good way to do it? (I've never written one
before, so I'm just checking) No,  for text only, use a labelFunction;
instead of a custom itemRenderer.   3. Is there anything else wrong with
the example 1 below / a better way? Better to handle the calcs in
commitProperties.
-TH

--- In flexcoders@yahoogroups.com, tom s tcs2...@... wrote:

 Problem solved. But is was bizarre, so I'll explain. Also, I still
have one
 or two questions, but mainly for education now...

 First, I set the visible property of the dataGrid to false. I then
check the
 redraw region and never saw the area that was causing trouble before.
So I
 figured it was probably something in the dataGrid. The item renderers
being
 prime suspect, as I wrote them..

 I put it back to visible = true, and played some more. I discovered
that the
 problem didnt manifest itself at first, only after a fair amount of
mouse
 activity over the dataGrid. Maybe a memory leak in my item renderer?

 Then I looked at Alex Harui's blog, and saw that I could/ should be
 extending DataGridItemRenderer. I did that, and all seems fine now.
The
 speed at which the dataGrid appearance keeps up with the mouse
movements
 over it is 10x faster than before.

 My questions:

 1. Are there any known issues with extending Label for item renderers?
 1b. What's wrong with example 2 - extending Label - (below)?
 2. Assuming that the item renderer only needs to manipulate the text
of the
 renderer, is example 1 - extending DataItemGrid - (below) a good way
to do
 it? (I've never written one before, so I'm just checking)
 3. Is there anything else wrong with the example 1 below / a better
way?


 thanks

 tom

 *** example 1 

 package com.***
 {
 import mx.controls.dataGridClasses.DataGridItemRenderer;

 public class LengthRenderer extends DataGridItemRenderer
 {
 override public function set data(value:Object):void
 {
 super.data = value;
 if(value!= null  value.length != null) {
 this.invalidateProperties();
 }
 }

 override public function validateProperties():void
 {
 super.validateProperties();
 var mins:int = Math.floor(data.length/60)
 var secs:String = (data.length - mins).toString()
 if (secs.length == 1){secs = 0 + secs}
 this.text = mins.toString()+:+secs
 }
 }
 }

 *** example 2 ***

 package com.***
 {


 import mx.controls.Label;

 public class LengthRenderer extends Label
 {
 override public function set data(value:Object):void
 {
 super.data = value;
 if(value!= null  value.length != null) {
 this.invalidateDisplayList();
 }
 }

 override protected function
 updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
 {
 var mins:int = Math.floor(data.length/60)
 var secs:String = (data.length - mins).toString()
 if (secs.length == 1){secs = 0 + secs}
 this.text = mins.toString()+:+secs





 }
 }
 }

 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Has to be another object on top of the DataGrid. The redraw region
is
  the clue. Look at the other objects in the same class as the
DataGrid.
 
  -TH
 
  --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote:
  
   If you are pretty sure there is not something invisible covering
that
  area,
   try cleaning the project.
  
   Tracy
  
  
  
   _
  
   From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com]
  On
   Behalf Of tom s
   Sent: Saturday, March 07, 2009 6:31 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] dataGrid not receiving user input
  (intermitently) in
   bottom right
  
  
  
   I have a datagrid that works ~50% of the time.
  
   The other 50% of the time the dataGrid wont accept user
interaction in
  the
   bottom right area (the bottom 3 (of 6) rows, right 2 (of 4)
columns).
  
   i.e. that part of the grid does not react to mouse over events,
not
  mouse
   click events.
  
   Sometimes is reacts to click events as if they are occurring in
the
  row in
   which a mouse_over interaction was last observed.
  
  
  
   Looking at the redraw regions, I see that a redraw region
occasionally
   appears in the bottom right of the grid - exactly where he grid is
not
   receiving user input.
  
   So that is probably related.
  
   But I don't know what it is a redraw region for. I've checked my
other
   component and they aren't near.
  
  
  
   I have the following custom item renderers:
  
   column 2: extends Canvas
  
   column 3: extends Label
  
   column 4: extends Label.
  
  
  
   Anyone know what might be causing this?
  
   Or how to fix it / diagnose it further?
  
  
  
   thanks
  
  
  
   tom
  
 





Re: [flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Wally Kolcz
When I added the click=nextQuestion() it was triggered off the selecting of a 
radio button and not the button. Here all the code I have. It is telling me 
that the viewStack doesn't exist when I believe it should.

test1.mxml

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
width=100% height=98% xmlns:questions=com.ipexpert.questions.q1.* 
creationComplete=initApp() 
mx:Script
![CDATA[
import mx.core.Application;

public var testID:int = 1;
public var currentQuestion:int = 0;

public function initApp():void {

}

public function checkSingle(answer:Object):void {
if (answer !=0) {
Application.application.score += 1;
}
currentQuestion += 1;
nextQuestionPlease();
}

public function nextQuestionPlease():void {
}
]]
/mx:Script
mx:ViewStack id=questionsVS width=98% height=100% paddingLeft=10

questions:question1 /
questions:question2 /
questions:question3 /
questions:question4 /
/mx:ViewStack
/mx:Module

question1.mxml

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=98% height=98%

mx:Script
![CDATA[

import com.ipexpert.tests.test1;

public var testMod:test1 = new test1();
]]
/mx:Script

mx:Label fontWeight=bold text=1. Which layer(s) of the OSI Reference 
Model provide(s) for internetwork connectivity? /
mx:RadioButtonGroup id=group1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Data Link 
value=0 selected=true /
mx:RadioButton paddingLeft=10 groupName=group1 label=Physical 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Session 
value=0 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Network 
value=1 /
mx:RadioButton paddingLeft=10 groupName=group1 label=Presentation 
value=0 /

mx:Button label=Next click=testMod.checkSingle(group1.selectedValue) /
/mx:VBox


From: Michael Wills mich...@mawills.com
Sent: Monday, March 09, 2009 10:55 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Moving a viewStack through actionscript 

Hey there Wally,

You can get access to the currently selected viewstack, and also set it, 

through selectedIndex. So your initial declaration would be like

mx:ViewStack id=questionVS etc... selectedIndex=0 

click=nextQuestion()

and in your function nextQuestion you can increment the selectedIndex. 

I'd have to check but I think you can find the number of items in your 

viewStack with numChildren. That would give you your max value to finish 

your quiz or handle the end how you would like.

You can find more about what you can do with viewstacks in the docs:

http://livedocs.adobe.com/flex/3/langref/mx/containers/ViewStack.html

Hope that helps!

Michael

Wally Kolcz wrote:



 I have a test that I want to walk through the questions using a 

 function. How can I set the inital value of the ViewStack 

 (questionsVS) to 0 and then increment it by one each time someone 

 clicks a button?



 mx:ViewStack id=questionsVS width=98% height=100% paddingLeft=10

 questions:question1 /

 questions:question2 /

 questions:question3 /

 questions:question4 /

 /mx:ViewStack



 




RE: [flexcoders] Re: how to call dynamic servlet

2009-03-09 Thread Tracy Spratt
Why are you converting the e4x XML into the legacy XMLDocument?  And if you
really are satisfied working with dynamic Object instead of XML, then use
resultFormat=object and skip all that decdoing stuff.  Flex will do that
for you.  But that is the worst of both worlds; you lose the power of e4x
and suffer the diminished access performance of a dynamic object.

 

I suggest you use XML and XMLListCollection instead.

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of anitha2324
Sent: Sunday, March 08, 2009 3:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to call dynamic servlet

 

Hi Thanks alot for your reply,

I have removed the binding variables, replaced xml by e4x , and setted the
url before the service.send but am still unable to get the successful result


here is my modified code

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml
com/2006/mxml layout=absolute creationComplete=init()
mx:Script
![CDATA[
import flash.net.sendToURL;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.xml.SimpleXMLDecoder;
import mx.controls.Button;
import mx.controls.Label;
import mx.collections.ArrayCollection;

[Bindable]
public var expenses:ArrayCollection;

public var userId:int;

public var servletURL:String;

private function init():void{
userId = 12;
servletURL=http://localhost:
http://localhost:8080/Application/topSenderServlet?TYPE=4amp;USER_ID=
8080/Application/topSenderServlet?TYPE=4amp;USER_ID=+userId;
Alert.show(servletURL);
topSenders.url=servletURL;
topSenders.send();
}
private function serv_result(evt:ResultEvent):void {
/* Convert XMLNode to XMLDocument. */
var xmlStr:String = evt.result.toString();
var xmlDoc:XMLDocument = new XMLDocument(xmlStr);
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
var resultObj:Object = decoder.decodeXML(xmlDoc);
/* Assign the values... */

expenses = new ArrayCollection();
for(var i:int=0;iresultObj.top.sender.length;i++){
Alert.show(resultObj.top.sender[i].phone);

}
}

]]
/mx:Script

!--mx:HTTPService id=topSenders useProxy=false resultFormat=xml
method=POST url=http://localhost:
http://localhost:8080/Application/topSenderServlet?TYPE=4amp;USER_ID=12
8080/Application/topSenderServlet?TYPE=4amp;USER_ID=12
result=serv_result(event);/--

mx:HTTPService id=topSenders useProxy=false resultFormat=e4x
method=POST 
result=serv_result(event);/

/mx:Application

thanking you in Advance





RE: [flexcoders] Re: Hie

2009-03-09 Thread Tracy Spratt
Also, you may see binding warnings, like Unable to bind to. XML is not an
IEventDispatcher.'  This is kind of a bogus warning, the description anyway.
Fix it like this:

text={XML(upcomingRepeater.currentItem).empResults}

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of ppongtong
Sent: Friday, February 27, 2009 10:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Hie

 

Please try the following.

mx:Repeater id=upcomingRepeater dataProvider={this.myXML.stat} 
mx:Text id=upcomingText
text={upcomingRepeater.currentItem.empResults}
color={(upcomingRepeater.currentItem.empStatus == 'VALID') ?
0xFF:0x00}/
/mx:Repeater

Panhathai

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

 Hie
 My xml is like this:
 
 stat
 empResultsguan completing 9 years in 6 months and 5 days./empResults
 empStatusINVALID/empStatus
 /stat
 stat
 empResultskumar completing 4 years in 11 months and 18
days./empResults
 empStatusVALID/empStatus
 /stat
 stat
 empResultskies completing 4 years in 11 months and 26
days./empResults
 empStatusINVALID/empStatus
 /stat
 stat
 empResultsroy completing 4 years in 11 months and 26
days./empResults
 empStatusVALID/empStatus
 /stat
 
 I want to show it in my vbox as text boxes like
 
 guan completing 9 years in 6 months and 5 days.
 kumar completing 4 years in 11 months and 18 days.
 kies completing 4 years in 11 months and 26 days.
 roy completing 4 years in 11 months and 26 days.
 
 Please note color is red for those whose empStatus in INVALID.
 
 currently my code is like:
 mx:Repeater id=upcomingRepeater dataProvider={myXML}
 mx:Text id=upcomingText text={upcomingRepeater.currentItem}/
 /mx:Repeater
 
 This above code shows me all in black as I have not applied this
empStatus
 to format. So how to do that?
 
 
 
 
 Thankx and Regards
 
 Vik
 Founder
 www.sakshum.com
 www.sakshum.blogspot.com






Re: [flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Michael Wills
If I am understanding your code correctly, you actually want to call 
test1(parent).checkSingle instead of testMod. The reason is because you 
are instantiating a brand new, and unrelated, test1 component with

public var testMod:test1 = new test1();

You might be able to do

public var testMod:test1 = test1(parent);

casting the variable to the type test1.

If it's a simple app you are working on, you can do this kind of tightly 
coupled design. By that I mean, your question1 component knows about 
your test1 component. If it's a more complex app though, you may want to 
look at decoupling your app. Otherwise this app will quickly become 
inflexible and harder to maintain as it grows.

In this case, you could set up your question components to dispatch an 
event that your test1 then listens to. That way question1 doesn't have 
to be directly connected to parent.

I hope that makes sense!

Michael

Wally Kolcz wrote:

 When I added the click=nextQuestion() it was triggered off the 
 selecting of a radio button and not the button. Here all the code I 
 have. It is telling me that the viewStack doesn't exist when I believe 
 it should.

 test1.mxml

 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 
 width=100% height=98% 
 xmlns:questions=com.ipexpert.questions.q1.* 
 creationComplete=initApp() 
 mx:Script
 ![CDATA[
 import mx.core.Application;   

 public var testID:int = 1;
 public var currentQuestion:int = 0;

 public function initApp():void {

 }   

 public function checkSingle(answer:Object):void {
 if (answer !=0) {
 Application.application.score += 1;
 }
 currentQuestion += 1;
 nextQuestionPlease();
 }

 public function nextQuestionPlease():void {
 }
 ]]
 /mx:Script
 mx:ViewStack id=questionsVS width=98% height=100% 
 paddingLeft=10

 questions:question1 /
 questions:question2 /
 questions:question3 /
 questions:question4 /
 /mx:ViewStack
 /mx:Module


 question1.mxml

 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=98% 
 height=98%

 mx:Script
 ![CDATA[

 import com.ipexpert.tests.test1;

 public var testMod:test1 = new test1();
 ]]
 /mx:Script

 mx:Label fontWeight=bold text=1. Which layer(s) of the OSI 
 Reference Model provide(s) for internetwork connectivity? /
 mx:RadioButtonGroup id=group1 /
 mx:RadioButton paddingLeft=10 groupName=group1 label=Data 
 Link value=0 selected=true /
 mx:RadioButton paddingLeft=10 groupName=group1 
 label=Physical value=0 /   
 mx:RadioButton paddingLeft=10 groupName=group1 
 label=Session value=0 /   
 mx:RadioButton paddingLeft=10 groupName=group1 
 label=Network value=1 /   
 mx:RadioButton paddingLeft=10 groupName=group1 
 label=Presentation value=0 /   

 mx:Button label=Next 
 click=testMod.checkSingle(group1.selectedValue) /
 /mx:VBox

 
 *From*: Michael Wills mich...@mawills.com
 *Sent*: Monday, March 09, 2009 10:55 AM
 *To*: flexcoders@yahoogroups.com
 *Subject*: Re: [flexcoders] Moving a viewStack through actionscript

 Hey there Wally,

 You can get access to the currently selected viewstack, and also set it,
 through selectedIndex. So your initial declaration would be like
 mx:ViewStack id=questionVS etc... selectedIndex=0
 click=nextQuestion()

 and in your function nextQuestion you can increment the selectedIndex.
 I'd have to check but I think you can find the number of items in your
 viewStack with numChildren. That would give you your max value to finish
 your quiz or handle the end how you would like.

 You can find more about what you can do with viewstacks in the docs:

 http://livedocs.adobe.com/flex/3/langref/mx/containers/ViewStack.html 
 http://livedocs.adobe.com/flex/3/langref/mx/containers/ViewStack.html

 Hope that helps!

 Michael

 Wally Kolcz wrote:
 
  I have a test that I want to walk through the questions using a
  function. How can I set the inital value of the ViewStack
  (questionsVS) to 0 and then increment it by one each time someone
  clicks a button?
 
  mx:ViewStack id=questionsVS width=98% height=100% 
 paddingLeft=10
  questions:question1 /
  questions:question2 /
  questions:question3 /
  questions:question4 /
  /mx:ViewStack
 
 


 


[flexcoders] Re: Flex Interview Questions

2009-03-09 Thread Amy
--- In flexcoders@yahoogroups.com, Ashish Verma verma.lu...@... wrote:

 They could ask you about the followings:
 
 Advanced Datagrid functionalities
 Basic Operators like is, typeof, instanceof, , ===, !==
 Basic function and constants like random(), Nan, indexOf()
 Datatypes: Array, Number
 Architecture: Cairngorm, PureMVC,
 Event Delegation Model: bubble, traget and capture
 DisplayList
 Custom Components MXML  AS
 RSL, SWC

I have only once been interviewed for a Flex job by someone who was qualified 
to assess my Flex coding abilities.  By and large you'll be interviewed by HR 
and recruiter types who ask questions from the frame of reference of someone 
trying to figure out your qualifications by braille.  I honestly don't know how 
to answer these types of interviewers, so I've never managed to get a job from 
this type of person.  I did get the job from the interviewer who knew something 
about Flex--because he'd already checked out my blog (he didn't ask me 
technical questions either).

-Amy



Re: [flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Wally Kolcz

Wow...its a 'simple' one time create app. 

All I want to do is when the user selects an answer on the question1.mxml 
component, they can click a button,  pass the value of the radio button to the 
test1 module's checkSingle() method  and then move to the next question in the 
test1 module's stack. 

When I changed the function call on the button of question1.mxml to 
test1(parent).checkSingle(group1.selectedValue);  
mx:Button label=Next 
click=test1(parent).checkSingle(group1.selectedValue) / 

I get this error:

TypeError: Error #1034: Type Coercion failed: cannot convert 
mx.containers::viewst...@6563ae1 to com.ipexpert.tests.test1.
at 
com.ipexpert.questions.q1::question1/___question1_Button1_click()[D:\wkolcz\My 
Documents\Flex Builder 
3\IPExpertBrainBuster\src\com\ipexpert\questions\q1\question1.mxml:21]

Here is checkSingle() and nextQuestionPlease()

public function checkSingle(answer:Object):void {
if (answer !=0) {
Application.application.score += 1;
}
currentQuestion += 1;
nextQuestionPlease();
}

public function nextQuestionPlease():void {

 questionsVS.selectedIndex=currentQuestion;
}



From: Michael Wills mich...@mawills.com
Sent: Monday, March 09, 2009 11:44 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Moving a viewStack through actionscript 

If I am understanding your code correctly, you actually want to call 

test1(parent).checkSingle instead of testMod. The reason is because you 

are instantiating a brand new, and unrelated, test1 component with

public var testMod:test1 = new test1();

You might be able to do

public var testMod:test1 = test1(parent);

casting the variable to the type test1.

If it's a simple app you are working on, you can do this kind of tightly 

coupled design. By that I mean, your question1 component knows about 

your test1 component. If it's a more complex app though, you may want to 

look at decoupling your app. Otherwise this app will quickly become 

inflexible and harder to maintain as it grows.

In this case, you could set up your question components to dispatch an 

event that your test1 then listens to. That way question1 doesn't have 

to be directly connected to parent.

I hope that makes sense!

Michael

Wally Kolcz wrote:



 When I added the click=nextQuestion() it was triggered off the 

 selecting of a radio button and not the button. Here all the code I 

 have. It is telling me that the viewStack doesn't exist when I believe 

 it should.



 test1.mxml



 ?xml version=1.0 encoding=utf-8?

 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical 

 width=100% height=98% 

 xmlns:questions=com.ipexpert.questions.q1.* 

 creationComplete=initApp() 

 mx:Script

 ![CDATA[

 import mx.core.Application;   



 public var testID:int = 1;

 public var currentQuestion:int = 0;



 public function initApp():void {



 }   



 public function checkSingle(answer:Object):void {

 if (answer !=0) {

 Application.application.score += 1;

 }

 currentQuestion += 1;

 nextQuestionPlease();

 }



 public function nextQuestionPlease():void {

 }

 ]]

 /mx:Script

 mx:ViewStack id=questionsVS width=98% height=100% 

 paddingLeft=10



 questions:question1 /

 questions:question2 /

 questions:question3 /

 questions:question4 /

 /mx:ViewStack

 /mx:Module





 question1.mxml



 ?xml version=1.0 encoding=utf-8?

 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=98% 

 height=98%



 mx:Script

 ![CDATA[



 import com.ipexpert.tests.test1;



 public var testMod:test1 = new test1();

 ]]

 /mx:Script



 mx:Label fontWeight=bold text=1. Which layer(s) of the OSI 

 Reference Model provide(s) for internetwork connectivity? /

 mx:RadioButtonGroup id=group1 /

 mx:RadioButton paddingLeft=10 groupName=group1 label=Data 

 Link value=0 selected=true /

 mx:RadioButton paddingLeft=10 groupName=group1 

 label=Physical value=0 /   

 mx:RadioButton paddingLeft=10 groupName=group1 

 label=Session value=0 /   

 mx:RadioButton paddingLeft=10 groupName=group1 

 label=Network value=1 /   

 mx:RadioButton paddingLeft=10 groupName=group1 

 label=Presentation value=0 /   



 mx:Button label=Next 

 click=testMod.checkSingle(group1.selectedValue) /

 /mx:VBox



 --

 *From*: Michael Wills mich...@mawills.com

 *Sent*: Monday, March 

[flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Alan Rother
Hey All,
I am trying to build a Flex based tree for our content management system
here at work. It needs to represent all of the pages on a given site. I
already have a good working prototype using XML as the dataprovider and i
have a good chunk of the drag and drop functions working well. The problem I
am having is around the dragdrop handler. I need to be able to move any page
to anywhere on the tree, including below (as a child of) any other page in
addition to being able to reorder pages on the same level (same parent node)

I can get it to do one or the other but not both at the same time. As far as
I can tell, Flex doesn't recognize the difference between a drop on a node
and a drop between two nodes. As I think this would solve my problem. Has
anyone tackled this problem before? I basically need a simple way for my
very non-technical users to drag pages for one of two operations,
re-ordering within a section or moving a page to another section.

This ExtJS example is almost exactly what I want my Flex tree to do

http://www.extjs.com/deploy/dev/examples/tree/reorder.html

Except I need to treat every item on the tree as a folder.

=]

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


[flexcoders] Variable changes value without being set

2009-03-09 Thread reflexactions
Really odd problem.

A variable is set to true in code, but when I step through the code and watch 
the variable by the next line it has become false again even thought it wasn't 
set. 
I even have tried turning it into a set/get property and put a break on the 
setter, and still it changes from true to false without the breakpoint being 
hit.

Any thoughts...



[flexcoders] Flex Roadmap Question

2009-03-09 Thread kramus0
I'm not sure if I should ask that question here, but maybe somebody can help me 
anyway. Is there any roadmap for Flex? I have found a bug in the Flex bug 
management system (Jira) that shows that it is already fixed in I11 - which 
mean Iteration 11 for Gumbo. But what does that exactly mean? Is it already 
in the nightly builds for Gumbo or will it be released later? 

Thanks for your help.

Markus



[flexcoders] Re: Problem in sorting XMLList collection as a dataProvider for the list

2009-03-09 Thread foobone9
It's a class property array. That line is simply showing a way to fall back to 
other compare field properties if none are provided via the 'fields' parameter.

--- In flexcoders@yahoogroups.com, geeky developer geekydevelo...@... wrote:

 Hi foobone9I am trying to implement your sent/recommended code but it is not
 recognizing internalPropList in line
  var propList:Array = fields ? fields : internalPropList;.
 
 What exactly in internalPropList  here?
 Anyone has any idea,
 Thanks all for your reply and help
 
 .
 
 
 On Thu, Mar 5, 2009 at 4:57 PM, foobone9 foobo...@... wrote:
 
 
  There is a nice example in the Sort class documentation:
 
 
  http://livedocs.adobe.com/flex/3/langref/mx/collections/Sort.html#compareFunction
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, crazy
  developer geekydeveloper@ wrote:
  
   Hi Thanks for replying
   What does we mean by custom sort compare function, Can we provide any
   examples of both sort and sort compare functions or little more details
   about what and how does we do that?
   Thanks much fro your help
  
  
  
   On Thu, Mar 5, 2009 at 11:24 AM, Alex Harui aharui@ wrote:
  
If you have a labelfunction, you'll probably need a custom sortcompare
function
   
   
   
Alex Harui
   
Flex SDK Developer
   
Adobe Systems Inc. http://www.adobe.com/
 
   
Blog: http://blogs.adobe.com/aharui
   
   
   
*From:* flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.com[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On
Behalf Of *anuj181
*Sent:* Wednesday, March 04, 2009 3:51 PM
*To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
*Subject:* [flexcoders] Problem in sorting XMLList collection as a
dataProvider for the list
   
   
   
Hi Guys
   
I am trying to sort the xmllist collection which is the dataprovider
  for
the list. As the implementation of name-value pairs, i am displaying
  the
entries in form of string in List and would like to sort all the data
displayed in the List alphabetically, I am making a call through amfphp
  call
to grab data from backend and populate XMLListCollection but now I need
  to
sort the data in the list. Below is the code,Can anyone please help me
  where
I am messing things up. Also please let me know if there is any
  question
regarding the code and if there is better way of doing it.
   
Thanks
   
/**CODE/
   
mx:RemoteObject id=amfSetup source=Setup destination=amfphp
mx:method name=getList result=getListHandler(event);
fault=getListFault(event);/
/mx:RemoteObject
   
[Bindable] private var entriesXmlListFull:XMLList;
[Bindable] private var entriesXmlCollection:XMLListCollection;
   
   
public function getListHandler(event:ResultEvent):void
{
   
entriesXmlListFull = XML(event.result).device;
populateEntries();
}
private function getListFault(event:FaultEvent):void
{
Alert.Show(Error retreiving Data);
}
   
//Displaying names need to be displayed in the List box
private function entriesLabelFunc(item:Object):String
{
var xmlItem:XML = item as XML;
   
return xmlItem..attribute.(@name==friendlyname);
}
   
//Populating List with XML Objects
private function populateEntries():void
{
entriesXmlCollection = new XMLListCollection();
   
for each(var item:XML in entriesXmlListFull)
{
   
var friendlyName:String = item..attribute.(@name==friendlyname);
//Only add camera type
if ( !recordValue  hasFriendlyName  (itemType.toUpperCase() ==
CAMERA) )
{
entriesXmlCollection.addItem(item);
}
}
   
//Calling Sort on XMLList collection
entriesXmlCollection.sort = sortList;
entriesXmlCollection.refresh();
   
   
}
   
   
mx:Sort id=sortList
mx:fields
mx:SortField name=* caseInsensitive=true /
/mx:fields
/mx:Sort
   
mx:List id=listData dataProvider={entriesXmlCollection}
labelFunction=entriesLabelFunc/
   
   
   
  
 
   
 





[flexcoders] binding not updating for ArrayCollection when item changes?

2009-03-09 Thread John Robinson
I have a strange issue with data binding not updating when an item in  
an ArrayCollection is changed. I'm using Cairngorm and have the  
following setup. In my ModelLocator I have a 'users' ArrayCollection  
that contains 'UserVO' objects. I have a two views that binds their  
dataProvider to the 'users' AC in the ModelLocator. My UserVO looks  
like so:

package com.jrobinson.model.VO
{
[Bindable]
public class UserVO
{
public var id:int = -1;
public var username:String = null;
public var enabled:Boolean = false;
public var userData:XMLList = null;


public function UserVO(user_id:int, uName:String, 
enabled:Boolean,  
d:XMLList)
{
id = user_id;
username = uName;
enabled = enabled;
userData = d;
}

}
}

I first have a command that loads all of the users and populates the  
AC. This updates the bindings as expected. I then have a second  
command that loads the userData portion for a given user. Once  
retrieved, I update the given UserVO's userData, but this time, the  
bindings fail to update.

I feel like I've seen this before but can't find where or what the  
workaround might be. I guess I'm just looking for confirmation that  
this should or shouldn't work.

Thanks!
John


Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Howard Fore
I just implemented the same thing. What I did was have data in the XML
elements that differentiated what kind of node they were (topic and article
in my case) and that told me the parent topic of the selected node (using
parent topic id of 0 for a top level topic). This way you can compare data
between the dragSource's dragItems and the item that exists in the tree at
the calculatedDropIndex. Through this comparison you'll know if you're
dropping onto a branch or leaf node and can handle it appropriately.

--
Howard Fore, howard.f...@hofo.com
The universe tends toward maximum irony. Don't push it. - Jeff Atwood


On Mon, Mar 9, 2009 at 3:34 PM, Alan Rother alan.rot...@gmail.com wrote:

  Hey All,
 I am trying to build a Flex based tree for our content management system
 here at work. It needs to represent all of the pages on a given site. I
 already have a good working prototype using XML as the dataprovider and i
 have a good chunk of the drag and drop functions working well. The problem I
 am having is around the dragdrop handler. I need to be able to move any page
 to anywhere on the tree, including below (as a child of) any other page in
 addition to being able to reorder pages on the same level (same parent node)

 I can get it to do one or the other but not both at the same time. As far
 as I can tell, Flex doesn't recognize the difference between a drop on a
 node and a drop between two nodes. As I think this would solve my problem.
 Has anyone tackled this problem before? I basically need a simple way for my
 very non-technical users to drag pages for one of two operations,
 re-ordering within a section or moving a page to another section.

 This ExtJS example is almost exactly what I want my Flex tree to do

 http://www.extjs.com/deploy/dev/examples/tree/reorder.html

 Except I need to treat every item on the tree as a folder.

 =]

 --
 Alan Rother
 Adobe Certified Advanced ColdFusion MX 7 Developer
 Manager, Phoenix Cold Fusion User Group, AZCFUG.org


 



Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Alan Rother
Yeah,
I tried something similar, but since all of my nodes are essentially the
same (all pages) and can all be a parent or a child (leaf or branch as it
were) but the problem I'm running into is how do I discriminate between
intent, in other words how do I know if the user wanted to move the page
between two pages on the same level (re-ordering) or if they wanted to move
the page to be the child of the page is was dropped onto.

That ExtJS example seems to be doing what I want (albeit, you cant drag a
file to another file, only folders) I have to believe Flex can do this as
well, I really don't want to do it in Ext...

=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


Re: [flexcoders] Flex Roadmap Question

2009-03-09 Thread Matt Chotin
If it's marked as fixed and the history shows it as not having been the same 
day as you looking at the bug, then it's likely in the nightly build.  This is 
for the SDK obviously.

Matt


On 3/9/09 12:58 PM, kramus0 kram...@yahoo.de wrote:




I'm not sure if I should ask that question here, but maybe somebody can help me 
anyway. Is there any roadmap for Flex? I have found a bug in the Flex bug 
management system (Jira) that shows that it is already fixed in I11 - which 
mean Iteration 11 for Gumbo. But what does that exactly mean? Is it already 
in the nightly builds for Gumbo or will it be released later?

Thanks for your help.

Markus







[flexcoders] first user tab is slow

2009-03-09 Thread schneiderjim
Flex: 2.0.1

In our app, we experience a significant delay when the user tabs from the 
first form field to the second. After that, tabs work as expected. Is there a 
reason for this? Is there a way to eliminate this delay? I'm not sure whether 
this is a factor, but many (not all) of the forms are dynamically created (in 
AS).

Thanks



[flexcoders] Re: Is there a way to detect mouse button state without tracking events?

2009-03-09 Thread Dave Kong
Thanks for the suggestion.

The problem is that when wmode=transparent on FF, if mouse button is already 
down (dragging scrollbar), and I exit the stage, MOUSE_LEAVE is not fired (or 
was eaten by a framework handler somewhere). But if mouse button is UP, then I 
do see a MOUSE_LEAVE event, but that doesn't help me.

Problem is that the mouseUP is never processed when I'm outside the stage, so 
on re-entry, buttonDown is always true when it shouldn't be...

--- In flexcoders@yahoogroups.com, sunild99 sunilbd...@... wrote:

 Hi,
 
 You can use Event.MOUSE_LEAVE to detect when mouse has left the stage.
 
 You can listen for MouseEvent.MOUSE_MOVE if you need to know when the mouse 
 is back.
 
 Can you listen for MOUSE_LEAVE and dispatch your own MOUSE_UP event to stop 
 the list from scrolling?
 
 Sunil
 
 
 --- In flexcoders@yahoogroups.com, Dave Kong davekong@ wrote:
 
  This is a very urgent issue for us. =( Any help is deeply appreciated!
  
  On Thu, Mar 5, 2009 at 5:14 PM, Dave Kong davekong@ wrote:
  
 I need to find out at this particular moment, if the mouse button is up
   or down.
  
   Trying to work around the issue with wmode=transparent in FF. If I scroll 
   a
   list, and drags cursor outside of the player and then releases the button.
   That mouseUp event is never captured by Flash Player, so when I move mouse
   cursor back, buttonDown is always true for all mouse events. So I need a
   workaround on moues re-entry to detect if button is truly down, if not, 
   call
   the scrollThumb's releaseButton function so it won't keep on scrolling.
  
   Thanks!
  

  
 





[flexcoders] Architecture / Design question...

2009-03-09 Thread tchredeemed
I have a situation in which I am currently using a very ugly set up to get the 
job done, but I want to change this (will explain) and I am looking for some 
insight.

The process is this.

A user gets to  a piece of our app and they are presented with some options.  
The options are very different depending on which route they take to get there.

For instance, they might see a checkbox about saving a piece of their file as a 
note.

They might see a set of radio buttons to order different quantities (in this 
case the price can change depending on which radio button is selected [the 
price is on the same screen]).

They might see a mailing address or an email address, depending on the medium 
of the item they are purchasing.

Basically, the options vary greatly, so I currently have a different custom 
component depending on which they are using.

I want to be able to use one component and have different options on that 
component, but I am not sure of an efficient way to do it.

I know this is random and probably not easily answered without a specific 
understanding of the system, but I thought I would ask :)



[flexcoders] difference between Adobe Flex SDK Open Source Flex SDK

2009-03-09 Thread hworke


   Hi what are the differences between
   Adobe Flex SDK  Open Source Flex SDK?


   As you can see here?

   http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4



RE: [flexcoders] first user tab is slow

2009-03-09 Thread Alex Harui
You can run the profiler to see why it is taking so long.  We do compute a 
sorted list of all objects that can receive focus, but you'd need an awful lot 
of them to cause a noticeable delay, and if you've created that many, I'd 
expect you'd be having startup time delays that would be even more problematic.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of schneiderjim
Sent: Monday, March 09, 2009 2:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] first user tab is slow


Flex: 2.0.1

In our app, we experience a significant delay when the user tabs from the 
first form field to the second. After that, tabs work as expected. Is there a 
reason for this? Is there a way to eliminate this delay? I'm not sure whether 
this is a factor, but many (not all) of the forms are dynamically created (in 
AS).

Thanks



RE: [flexcoders] Re: Is there a way to detect mouse button state without tracking events?

2009-03-09 Thread Alex Harui
Quite frankly, I'm not sure there is a solution to these kinds of problems with 
wmode.  I'll bet there's already a bug filed, but if not, please file one.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Dave Kong
Sent: Monday, March 09, 2009 2:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Is there a way to detect mouse button state without 
tracking events?


Thanks for the suggestion.

The problem is that when wmode=transparent on FF, if mouse button is already 
down (dragging scrollbar), and I exit the stage, MOUSE_LEAVE is not fired (or 
was eaten by a framework handler somewhere). But if mouse button is UP, then I 
do see a MOUSE_LEAVE event, but that doesn't help me.

Problem is that the mouseUP is never processed when I'm outside the stage, so 
on re-entry, buttonDown is always true when it shouldn't be...

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
sunild99 sunilbd...@... wrote:

 Hi,

 You can use Event.MOUSE_LEAVE to detect when mouse has left the stage.

 You can listen for MouseEvent.MOUSE_MOVE if you need to know when the mouse 
 is back.

 Can you listen for MOUSE_LEAVE and dispatch your own MOUSE_UP event to stop 
 the list from scrolling?

 Sunil


 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Dave 
 Kong davekong@ wrote:
 
  This is a very urgent issue for us. =( Any help is deeply appreciated!
 
  On Thu, Mar 5, 2009 at 5:14 PM, Dave Kong davekong@ wrote:
 
   I need to find out at this particular moment, if the mouse button is up
   or down.
  
   Trying to work around the issue with wmode=transparent in FF. If I scroll 
   a
   list, and drags cursor outside of the player and then releases the button.
   That mouseUp event is never captured by Flash Player, so when I move mouse
   cursor back, buttonDown is always true for all mouse events. So I need a
   workaround on moues re-entry to detect if button is truly down, if not, 
   call
   the scrollThumb's releaseButton function so it won't keep on scrolling.
  
   Thanks!
  
  
  
 




RE: [flexcoders] Variable changes value without being set

2009-03-09 Thread Alex Harui
Sometimes folks override a setter and don't call super so the backing variable 
returned by the getter doesn't change.  What really matters is what the getter 
computes.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of reflexactions
Sent: Monday, March 09, 2009 12:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Variable changes value without being set


Really odd problem.

A variable is set to true in code, but when I step through the code and watch 
the variable by the next line it has become false again even thought it wasn't 
set.
I even have tried turning it into a set/get property and put a break on the 
setter, and still it changes from true to false without the breakpoint being 
hit.

Any thoughts...



RE: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Alex Harui
There might be a way to use a custom ITreeDataDescriptor to turn every child 
into a branch.  Open but empty folders have a middle drop zone for dropping 
into.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alan Rother
Sent: Monday, March 09, 2009 12:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 3 Tree - Moving Nodes


Hey All,

I am trying to build a Flex based tree for our content management system here 
at work. It needs to represent all of the pages on a given site. I already have 
a good working prototype using XML as the dataprovider and i have a good chunk 
of the drag and drop functions working well. The problem I am having is around 
the dragdrop handler. I need to be able to move any page to anywhere on the 
tree, including below (as a child of) any other page in addition to being able 
to reorder pages on the same level (same parent node)

I can get it to do one or the other but not both at the same time. As far as I 
can tell, Flex doesn't recognize the difference between a drop on a node and a 
drop between two nodes. As I think this would solve my problem. Has anyone 
tackled this problem before? I basically need a simple way for my very 
non-technical users to drag pages for one of two operations, re-ordering within 
a section or moving a page to another section.

This ExtJS example is almost exactly what I want my Flex tree to do

http://www.extjs.com/deploy/dev/examples/tree/reorder.html

Except I need to treat every item on the tree as a folder.

=]

--
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org



Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Alan Rother
Good to know Alex,
I'm still a little (ok, a lot) green can you point me at a good tutorial /
example to start from?

=]

On Mon, Mar 9, 2009 at 2:48 PM, Alex Harui aha...@adobe.com wrote:

There might be a way to use a custom ITreeDataDescriptor to turn every
 child into a “branch”.  Open but empty folders have a middle drop zone for
 dropping “into”.



 Alex Harui

 Flex SDK Developer

 Adobe Systems Inc. http://www.adobe.com/

 Blog: http://blogs.adobe.com/aharui



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Alan Rother
 *Sent:* Monday, March 09, 2009 12:34 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Flex 3 Tree - Moving Nodes



 Hey All,



 I am trying to build a Flex based tree for our content management system
 here at work. It needs to represent all of the pages on a given site. I
 already have a good working prototype using XML as the dataprovider and i
 have a good chunk of the drag and drop functions working well. The problem I
 am having is around the dragdrop handler. I need to be able to move any page
 to anywhere on the tree, including below (as a child of) any other page in
 addition to being able to reorder pages on the same level (same parent node)



 I can get it to do one or the other but not both at the same time. As far
 as I can tell, Flex doesn't recognize the difference between a drop on a
 node and a drop between two nodes. As I think this would solve my problem.
 Has anyone tackled this problem before? I basically need a simple way for my
 very non-technical users to drag pages for one of two operations,
 re-ordering within a section or moving a page to another section.



 This ExtJS example is almost exactly what I want my Flex tree to do



 http://www.extjs.com/deploy/dev/examples/tree/reorder.html



 Except I need to treat every item on the tree as a folder.



 =]


 --
 Alan Rother
 Adobe Certified Advanced ColdFusion MX 7 Developer
 Manager, Phoenix Cold Fusion User Group, AZCFUG.org

   




-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


[flexcoders] Re: Architecture / Design question...

2009-03-09 Thread Tim Hoff

If you want to keep all of the options in one component/class, consider
using view states for the various versions.  This can get messy really
quick though; if you have many different states.  As the number of
states increases, it often becomes benefitial to use seperate view
components, in a view stack instead.  Really just depends on how you
want to do it.

-TH

--- In flexcoders@yahoogroups.com, tchredeemed apth...@... wrote:

 I have a situation in which I am currently using a very ugly set up to
get the job done, but I want to change this (will explain) and I am
looking for some insight.

 The process is this.

 A user gets to a piece of our app and they are presented with some
options. The options are very different depending on which route they
take to get there.

 For instance, they might see a checkbox about saving a piece of their
file as a note.

 They might see a set of radio buttons to order different quantities
(in this case the price can change depending on which radio button is
selected [the price is on the same screen]).

 They might see a mailing address or an email address, depending on the
medium of the item they are purchasing.

 Basically, the options vary greatly, so I currently have a different
custom component depending on which they are using.

 I want to be able to use one component and have different options on
that component, but I am not sure of an efficient way to do it.

 I know this is random and probably not easily answered without a
specific understanding of the system, but I thought I would ask :)






Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Martyn Bowis




You could consider using a combination of a key input and being over a
certain node as to how you interact with it.

ie: if the CTRL key is down, then treat the node as a folder and drop
the page you are dragging as a child, otherwise drop the page you are
dragging as a sibling.

Cheers,
Martyn

Alan Rother wrote:

  
  Yeah,
  
  
  I tried something similar, but since all of my nodes are
essentially the same (all pages) and can all be a parent or a child
(leaf or branch as it were) but the problem I'm running into is how do
Idiscriminate between intent, in other words how do I know if the user
wanted to move the page between two pages on the same level
(re-ordering) or if they wanted to move the page to be the child of the
page is was dropped onto.
  
  
  That ExtJS example seems to be doing what I want (albeit, you
cant drag a file to another file, only folders) I have to believe Flex
can do this as well, I really don't want to do it in Ext...
  
  
  =]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org
  
  
 
  
__ Information from ESET NOD32 Antivirus, version of virus
signature database 3922 (20090309) __
  
The message was checked by ESET NOD32 Antivirus.
  
  http://www.eset.com
 

-- 

Dr Martyn Bowis (PhD Engineering)
Director Net Design Ltd
New Zealand
www.netdesign.co.nz
Mob: +64 21 932626
Skype: mbowis
MSN: mbowis @ msn.com

Truth brings Freedom

The content of this email is confidential.
If you are not the intended recipient,
you must not use or distribute this
information in any way, shape or form.
Please notify the send of this error.
Thank you.





Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Martyn Bowis




Another alternative is to have the node you are dragging over open
after two seconds and display a placeholder child. If you want to make
it a sibling, that will be your first option before the node has time
to open. If you want it to be a child, wait a couple of seconds whilst
the node opens to display any current children (and if not a
placeholder child that you dynamically create for that purpose)

Cheers,
Martyn

Alan Rother wrote:

  
  Yeah,
  
  
  I tried something similar, but since all of my nodes are
essentially the same (all pages) and can all be a parent or a child
(leaf or branch as it were) but the problem I'm running into is how do
Idiscriminate between intent, in other words how do I know if the user
wanted to move the page between two pages on the same level
(re-ordering) or if they wanted to move the page to be the child of the
page is was dropped onto.
  
  
  That ExtJS example seems to be doing what I want (albeit, you
cant drag a file to another file, only folders) I have to believe Flex
can do this as well, I really don't want to do it in Ext...
  
  
  =]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org
  
  
 
  
__ Information from ESET NOD32 Antivirus, version of virus
signature database 3922 (20090309) __
  
The message was checked by ESET NOD32 Antivirus.
  
  http://www.eset.com
 

-- 

Dr Martyn Bowis (PhD Engineering)
Director Net Design Ltd
New Zealand
www.netdesign.co.nz
Mob: +64 21 932626
Skype: mbowis
MSN: mbowis @ msn.com

Truth brings Freedom

The content of this email is confidential.
If you are not the intended recipient,
you must not use or distribute this
information in any way, shape or form.
Please notify the send of this error.
Thank you.





Re: [flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Michael Wills
Hi Wally, sorry I missed the hierarchy there. You have checkSingle on 
the module and not the Viewstack. In that case, you should be able to do 
parent.parent.checkSingle and leave out the cast as test1. So


public var testMod:Object = parent.parent;

The last one failed because it was trying to convert a viewstack into a 
test1 which of course isn't a viewstack. But I'm not sure about this one 
because the parent.parent is a module. You could also forgo using the 
testMod variable and in your click declaration instead of


click=testMod.checkSingle(group1.selectedValue)

use

click=parent.parent.checkSingle(group1.selectedValue) /

Hopefully that'll work for you.

If you have a little time to invest, and if you may be doing more Flex 
apps in the future, even though this one is not going to be a full-on 
huge app, I'd learn about dispatching custom events. It's not that 
complicated but it takes some time to understand. It would save some of 
the hassle you're trying to do of course at the expense of a new and 
different kind of hassle. :-)


Michael


Wally Kolcz wrote:


Wow...its a 'simple' one time create app.

All I want to do is when the user selects an answer on the 
question1.mxml component, they can click a button,  pass the value of 
the radio button to the test1 module's checkSingle() method  and then 
move to the next question in the test1 module's stack.


When I changed the function call on the button of question1.mxml to 
test1(parent).checkSingle(group1.selectedValue); mx:Button 
label=Next click=test1(parent).checkSingle(group1.selectedValue) /


I get this error:

TypeError: Error #1034: Type Coercion failed: cannot convert 
mx.containers::viewst...@6563ae1 to com.ipexpert.tests.test1.
at 
com.ipexpert.questions.q1::question1/___question1_Button1_click()[D:\wkolcz\My 
Documents\Flex Builder 
3\IPExpertBrainBuster\src\com\ipexpert\questions\q1\question1.mxml:21]


Here is checkSingle() and nextQuestionPlease()

public function checkSingle(answer:Object):void {
if (answer !=0) {
Application.application.score += 1;
}
currentQuestion += 1;
nextQuestionPlease();
}

public function nextQuestionPlease():void {
   
 questionsVS.selectedIndex=currentQuestion;

}


*From*: Michael Wills mich...@mawills.com
*Sent*: Monday, March 09, 2009 11:44 AM
*To*: flexcoders@yahoogroups.com
*Subject*: Re: [flexcoders] Moving a viewStack through actionscript

If I am understanding your code correctly, you actually want to call
test1(parent).checkSingle instead of testMod. The reason is because you
are instantiating a brand new, and unrelated, test1 component with

public var testMod:test1 = new test1();

You might be able to do

public var testMod:test1 = test1(parent);

casting the variable to the type test1.

If it's a simple app you are working on, you can do this kind of tightly
coupled design. By that I mean, your question1 component knows about
your test1 component. If it's a more complex app though, you may want to
look at decoupling your app. Otherwise this app will quickly become
inflexible and harder to maintain as it grows.

In this case, you could set up your question components to dispatch an
event that your test1 then listens to. That way question1 doesn't have
to be directly connected to parent.

I hope that makes sense!

Michael

Wally Kolcz wrote:

 When I added the click=nextQuestion() it was triggered off the
 selecting of a radio button and not the button. Here all the code I
 have. It is telling me that the viewStack doesn't exist when I believe
 it should.

 test1.mxml

 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml 
http://www.adobe.com/2006/mxml layout=vertical

 width=100% height=98%
 xmlns:questions=com.ipexpert.questions.q1.*
 creationComplete=initApp() 
 mx:Script
 ![CDATA[
 import mx.core.Application;

 public var testID:int = 1;
 public var currentQuestion:int = 0;

 public function initApp():void {

 }

 public function checkSingle(answer:Object):void {
 if (answer !=0) {
 Application.application.score += 1;
 }
 currentQuestion += 1;
 nextQuestionPlease();
 }

 public function nextQuestionPlease():void {
 }
 ]]
 /mx:Script
 mx:ViewStack id=questionsVS width=98% height=100%
 paddingLeft=10

 questions:question1 /
 questions:question2 /
 questions:question3 /
 questions:question4 /
 /mx:ViewStack
 /mx:Module


 question1.mxml

 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml 
http://www.adobe.com/2006/mxml width=98%

 height=98%

 mx:Script
 ![CDATA[

 import com.ipexpert.tests.test1;

 public var testMod:test1 = new test1();
 ]]
 /mx:Script

 mx:Label fontWeight=bold text=1. Which layer(s) of the OSI
 Reference Model provide(s) for internetwork connectivity? /
 mx:RadioButtonGroup id=group1 /
 

Re: [flexcoders] difference between Adobe Flex SDK Open Source Flex SDK

2009-03-09 Thread Matt Chotin
Explanations are here: 
http://opensource.adobe.com/wiki/display/flexsdk/Downloads


On 3/9/09 2:23 PM, hworke kanps...@gmail.com wrote:






Hi what are the differences between
 Adobe Flex SDK  Open Source Flex SDK?

As you can see here?

http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4







RE: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Jim Hayes
This may be of interest :
 
http://flexibleexperiments.wordpress.com/2007/02/26/flex-201-tree-with-s
pring-loaded-folders-update-2/
 
 
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alan Rother
Sent: 09 March 2009 21:54
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 3 Tree - Moving Nodes
 
Good to know Alex,
 
I'm still a little (ok, a lot) green can you point me at a good tutorial
/ example to start from?
 
=]
On Mon, Mar 9, 2009 at 2:48 PM, Alex Harui aha...@adobe.com
mailto:aha...@adobe.com  wrote:
There might be a way to use a custom ITreeDataDescriptor to turn every
child into a branch.  Open but empty folders have a middle drop zone
for dropping into.
 
Alex Harui
Flex SDK Developer
Adobe Systems Inc. http://www.adobe.com/ 
Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui 
 
From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Alan Rother
Sent: Monday, March 09, 2009 12:34 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Flex 3 Tree - Moving Nodes
 
Hey All,
 
I am trying to build a Flex based tree for our content management system
here at work. It needs to represent all of the pages on a given site. I
already have a good working prototype using XML as the dataprovider and
i have a good chunk of the drag and drop functions working well. The
problem I am having is around the dragdrop handler. I need to be able to
move any page to anywhere on the tree, including below (as a child of)
any other page in addition to being able to reorder pages on the same
level (same parent node)
 
I can get it to do one or the other but not both at the same time. As
far as I can tell, Flex doesn't recognize the difference between a drop
on a node and a drop between two nodes. As I think this would solve my
problem. Has anyone tackled this problem before? I basically need a
simple way for my very non-technical users to drag pages for one of two
operations, re-ordering within a section or moving a page to another
section.
 
This ExtJS example is almost exactly what I want my Flex tree to do
 
http://www.extjs.com/deploy/dev/examples/tree/reorder.html
http://www.extjs.com/deploy/dev/examples/tree/reorder.html 
 
Except I need to treat every item on the tree as a folder.
 
=]

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org



-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


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

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

Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Alan Rother
Thanks Jim,
Thats not exactly what I was looking for, but it's a great example of how to
use some of the Tree components, which I've been struggling with...

=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


RE: [flexcoders] Moving a viewStack through actionscript

2009-03-09 Thread Jim Hayes
, I'd learn about dispatching custom events. It's not that complicated
but it takes some time to understand.
 
Raising some events from the question components strikes me as being a
whole  lot easier than dealing with addressing all the different objects
through the heirarchy!
But then when I first started out with flex I didn't know that and tried
to do pretty well the same sort of thing.
You could probably google and read enough on custom events to do what
you need in an hour or two, you'd more than likely spend much more time
trying to work out your current problems than that, I'd guess.
Hth
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Michael Wills
Sent: 09 March 2009 22:20
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Moving a viewStack through actionscript
 
Hi Wally, sorry I missed the hierarchy there. You have checkSingle on
the module and not the Viewstack. In that case, you should be able to do
parent.parent.checkSingle and leave out the cast as test1. So

public var testMod:Object = parent.parent;

The last one failed because it was trying to convert a viewstack into a
test1 which of course isn't a viewstack. But I'm not sure about this one
because the parent.parent is a module. You could also forgo using the
testMod variable and in your click declaration instead of

click=testMod.checkSingle(group1.selectedValue)

use

click=parent.parent.checkSingle(group1.selectedValue) /

Hopefully that'll work for you.

If you have a little time to invest, and if you may be doing more Flex
apps in the future, even though this one is not going to be a full-on
huge app, I'd learn about dispatching custom events. It's not that
complicated but it takes some time to understand. It would save some of
the hassle you're trying to do of course at the expense of a new and
different kind of hassle. :-)

Michael


Wally Kolcz wrote: 
Wow...its a 'simple' one time create app. 

All I want to do is when the user selects an answer on the
question1.mxml component, they can click a button,  pass the value of
the radio button to the test1 module's checkSingle() method  and then
move to the next question in the test1 module's stack. 

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

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

Re: [flexcoders] Architecture / Design question...

2009-03-09 Thread Michael Wills
Wow yeah that would depend on a lot of things. Some thoughts that help 
me narrow down prospects like that:

Am I doing all of the subcomponents in MXML? If so I could manage it 
with States perhaps using addChild. Pass the state in on 
instantiation/show/creationComplete, etc.
Am I doing all of the subcomponents in AS3? Then I can dynamically 
instantiate things on the fly depending on those requirements.
Whether or not I actually use the states tags, are their actual states 
with shared components? If so I might make a set of flags. If flag x is 
present, add component x, or if y is present, add y.

But it depends on how detailed it needs to be, and how convoluted the 
solution might be. It might be better not to put it ALL in one 
component, but have one component that loads subsections as well. It all 
depends on what you need. And, just a caveat, I am not a Flex guru. They 
might pine in with much better solutions.

Michael

tchredeemed wrote:

 I have a situation in which I am currently using a very ugly set up to 
 get the job done, but I want to change this (will explain) and I am 
 looking for some insight.

 The process is this.

 A user gets to a piece of our app and they are presented with some 
 options. The options are very different depending on which route they 
 take to get there.

 For instance, they might see a checkbox about saving a piece of their 
 file as a note.

 They might see a set of radio buttons to order different quantities 
 (in this case the price can change depending on which radio button is 
 selected [the price is on the same screen]).

 They might see a mailing address or an email address, depending on the 
 medium of the item they are purchasing.

 Basically, the options vary greatly, so I currently have a different 
 custom component depending on which they are using.

 I want to be able to use one component and have different options on 
 that component, but I am not sure of an efficient way to do it.

 I know this is random and probably not easily answered without a 
 specific understanding of the system, but I thought I would ask :)

 


[flexcoders] Styling Advanced Data Grid Columns

2009-03-09 Thread Ethan Miller
Greetings -

My data grid has the notion of a column of data being selectable. When selected
the column displays a light background color indicating it's selected state. 
Luckily
AdvancedDataGridColumn has a backgroundColor attribute. Unfortunately it does 
not have a backgroundAlpha attribute meaning that when the column is selected 
it covers the alternating row colors. Looks bad and decreases readability. 

Any suggestions?

Any way to create my own version of AdvancedDataGridColumn and reference it 
from AdvancedDataGrid?  (I've done this with AdvancedDataGridHeaderRenderer 
for example).

cheers, ethan



[flexcoders] ColumnSeries Question

2009-03-09 Thread Ethan Miller
Greetings-

A client has uneven data. One of the series they'd like to chart contains 80 
categories but in most cases there are only values in 4 or 5 of the 80 
categories, which 4 or 5 change over time.  Looks kind of  like this (supposing 
a series with categories A - Z):

Group 1
  Series Item A
  Series Item X
  Series Item M
  Series Item C

Group 2
  Series Item D
  Series Item Z
  Series Item J
  Series Item Q

etc.

As you might imagine, this looks bad when graphed as you get 75 empty spaces 
per group, 5 columns and tons of wasted space. Obviously it would be desirable 
to not reserve space, missing series items or for series items lacking a value 
or whose value was 0. 

Suggestions for accomplishing this?

cheers, ethan



RE: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Jim Hayes
I had thought that I'd used the code there to allow users to drag/drop
reorder and move tree nodes, but it was quite a long while ago so I may
well be wrong.
It wasn't perfect, but not bad at all.
Also I may have misunderstood what you are looking for.
Still, glad it wasn't entirely wasted!
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alan Rother
Sent: 09 March 2009 23:01
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 3 Tree - Moving Nodes
 
Thanks Jim,
 
Thats not exactly what I was looking for, but it's a great example of
how to use some of the Tree components, which I've been struggling
with...
 
=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


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

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

[flexcoders] Best option for implementing a growl like notification system ?

2009-03-09 Thread Arpit Mathur
Hi all,

I had a question regarding an AIR utility class that I am trying to finish.
The class is pretty simple, it is basically an AIR implementation of the Mac
Growl UI (notification windows that pop open on the right edge of the
display). Most AIR applications seem to use some implementation of the
functionality so I decided to write a generic one that I could open source
and let everyone use it.

My question is pretty simple. Like growl, I wanted to bring out a number of
rectangular notification windows that fade out after some time. There are 3
ways I can see this being accomplished:

1) Open new NativeWindow for each notification
2) Open one transparent nativeWindow add children to it calculate its size
based on the number of children being added (notifications), and then place
the window appropriately on the screen's edge
3) Open one transparent nativeWindow to the size of the screen (resolution),
and add notifications to its right edge.

Is there one implementation over another that may have better performance ?
#2 seems it may since it creates one native window of the exact size it
needs, but its the most work.

Any thoughts ?


Re: [flexcoders] Architecture / Design question...

2009-03-09 Thread Paul Andrews
Having one component with different states or a viewstack with all of the 
options may be attractive for a few variants, but I'd probably go for 
instantiating a specific UI interface once it's known which is required. You 
could either base the UI variants off a common ancestor, or use a common 
interface.

In flex it makes little difference if a component is created from MXML or 
actionscript.

Given the clear uncertainty that you have I would suggest an initial 
implementation with a couple of UI variants and see how well it works for 
you rather than try and get the whole thing right first time.

Paul
- Original Message - 
From: Michael Wills mich...@mawills.com
To: flexcoders@yahoogroups.com
Sent: Monday, March 09, 2009 11:06 PM
Subject: Re: [flexcoders] Architecture / Design question...


 Wow yeah that would depend on a lot of things. Some thoughts that help
 me narrow down prospects like that:

 Am I doing all of the subcomponents in MXML? If so I could manage it
 with States perhaps using addChild. Pass the state in on
 instantiation/show/creationComplete, etc.
 Am I doing all of the subcomponents in AS3? Then I can dynamically
 instantiate things on the fly depending on those requirements.
 Whether or not I actually use the states tags, are their actual states
 with shared components? If so I might make a set of flags. If flag x is
 present, add component x, or if y is present, add y.

 But it depends on how detailed it needs to be, and how convoluted the
 solution might be. It might be better not to put it ALL in one
 component, but have one component that loads subsections as well. It all
 depends on what you need. And, just a caveat, I am not a Flex guru. They
 might pine in with much better solutions.

 Michael

 tchredeemed wrote:

 I have a situation in which I am currently using a very ugly set up to
 get the job done, but I want to change this (will explain) and I am
 looking for some insight.

 The process is this.

 A user gets to a piece of our app and they are presented with some
 options. The options are very different depending on which route they
 take to get there.

 For instance, they might see a checkbox about saving a piece of their
 file as a note.

 They might see a set of radio buttons to order different quantities
 (in this case the price can change depending on which radio button is
 selected [the price is on the same screen]).

 They might see a mailing address or an email address, depending on the
 medium of the item they are purchasing.

 Basically, the options vary greatly, so I currently have a different
 custom component depending on which they are using.

 I want to be able to use one component and have different options on
 that component, but I am not sure of an efficient way to do it.

 I know this is random and probably not easily answered without a
 specific understanding of the system, but I thought I would ask :)




 

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






[flexcoders] Re: Convert ArrayCollection to XML

2009-03-09 Thread tiend...@ezweb.ne.jp
Thanks,

I was read it, but can not apply in my app.
I think , can not convert ArrayCollection to XML. You must convert XML in PHP 
code.

Anyway thank you.

--- In flexcoders@yahoogroups.com, oneworld95 oneworl...@... wrote:

 http://nsdevaraj.wordpress.com/2008/08/20/arraycollection-xml/
 
 - Alex C
 
 --- In flexcoders@yahoogroups.com, tiendans@ tiendanvn@ wrote:
 
  Hi all guru,
  
  I have a question about ArrayCollection.
  
  [Backend: MySQL,PHP]
  MySQL return result in Array.
  
  [Frontend: Flex]
  dp = new ArrayCollection( ArrayUtil.toArray(event.result));
  
  I want to convert ArrayCollection (dp) to XML, and show XML result in 
  TextArea.
  
  
  Help me please !
 





RE: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Tracy Spratt
This has been a problem with Tree for as long as I can remember, that is,
especially with empty nodes, how do you select it to drop into?  Alex said,
Open but empty folders have a middle drop zone for dropping into.  I
wonder how to recognize that zone when you are over it?

 

The drag indicators are all lines, of different lengths, to show in a node
or between nodes.  Tree needs a block or bar highlight on the parent node
itself, to indicate drop into here.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jim Hayes
Sent: Monday, March 09, 2009 7:17 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 3 Tree - Moving Nodes

 

I had thought that I'd used the code there to allow users to drag/drop
reorder and move tree nodes, but it was quite a long while ago so I may well
be wrong.

It wasn't perfect, but not bad at all.

Also I may have misunderstood what you are looking for.

Still, glad it wasn't entirely wasted!

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alan Rother
Sent: 09 March 2009 23:01
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 3 Tree - Moving Nodes

 

Thanks Jim,

 

Thats not exactly what I was looking for, but it's a great example of how to
use some of the Tree components, which I've been struggling with...

 

=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


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

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







Re: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-09 Thread Sam Lai
You could do what MindManager does and make the left half of the node
dropzone for reordering, and the right half for making the node a
child of the drop node.

Not sure how easy it would be to implement that though in Flex.

On 3/10/09, Jim Hayes j...@primalpictures.com wrote:
 I had thought that I'd used the code there to allow users to drag/drop
 reorder and move tree nodes, but it was quite a long while ago so I may
 well be wrong.
 It wasn't perfect, but not bad at all.
 Also I may have misunderstood what you are looking for.
 Still, glad it wasn't entirely wasted!

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Alan Rother
 Sent: 09 March 2009 23:01
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Flex 3 Tree - Moving Nodes

 Thanks Jim,

 Thats not exactly what I was looking for, but it's a great example of
 how to use some of the Tree components, which I've been struggling
 with...

 =]
 --
 Alan Rother
 Adobe Certified Advanced ColdFusion MX 7 Developer
 Manager, Phoenix Cold Fusion User Group, AZCFUG.org


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

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

-- 
Sent from my mobile device


RE: [flexcoders] Re: Convert ArrayCollection to XML

2009-03-09 Thread Tracy Spratt
I'd suggest using XML all the way through, instead of converting XML to
ArrayCollection first, then trying to convert it back.  What RPC protocol
are you using for server communication?  What is your resultFormat?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of tiend...@ezweb.ne.jp
Sent: Monday, March 09, 2009 8:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Convert ArrayCollection to XML

 

Thanks,

I was read it, but can not apply in my app.
I think , can not convert ArrayCollection to XML. You must convert XML in
PHP code.

Anyway thank you.

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

 http://nsdevaraj.
http://nsdevaraj.wordpress.com/2008/08/20/arraycollection-xml/
wordpress.com/2008/08/20/arraycollection-xml/
 
 - Alex C
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
tiendans@ tiendanvn@ wrote:
 
  Hi all guru,
  
  I have a question about ArrayCollection.
  
  [Backend: MySQL,PHP]
  MySQL return result in Array.
  
  [Frontend: Flex]
  dp = new ArrayCollection( ArrayUtil.toArray(event.result));
  
  I want to convert ArrayCollection (dp) to XML, and show XML result in
TextArea.
  
  
  Help me please !
 






RE: [flexcoders] DropDown selectedIndex problem

2009-03-09 Thread Tracy Spratt
Often when you programmatically  assign a dataProvider to a control, you
need to wait for the control to render before operating on its visual
elements.  So save the desired index from the loop, then use callLater() to
actually set the selectedIndex.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of moevydot...@ymail.com
Sent: Sunday, March 08, 2009 6:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DropDown selectedIndex problem

 

Hello @ all,
I want to select a specific part with selectedIndex. But it dont works :( It
selects all the time the first one in the list.

Can someone give me a help? There its the code... 

Thanks Michael

Code:
mx:Script
![CDATA[
import mx.controls.Alert;
import mx.collections.ArrayCollection;

[Bindable]
public var initSubjectableList:ArrayCollection = new ArrayCollection();
public var licenceID:String;

private function getSubjectDataList(evt:ResultEvent):void {
var count:Number = 0;
var _data:Array;
var _data2:Array;

for( count = 0; count  evt.result.id.length; count++)
{
//create array for drop down
_data = [{ID: evt.result.id[count], label: evt.result.name[count]}];
_data2 = _data.concat(_data2);
initSubjectableList = new ArrayCollection(_data2);

if(evt.result.id[count] == licenceID) {
editLicence.selectedIndex = count;

mx.controls.Alert.show(ID);
mx.controls.Alert.show(evt.result.id[count]); 
}
}
}

]]
/mx:Script





[flexcoders] Re: dataGrid not receiving user input (intermitently) in bottom righ

2009-03-09 Thread tom s
2. Assuming that the item renderer only needs to manipulate the text of the
renderer, is example 1  - extending DataItemGrid - (below) a good way to do
it? (I've never written one before, so I'm just checking)
No,  for text only, use a labelFunction; instead of a custom itemRenderer.

Thanks! Did that, and it works (as it did using DataItemGrid, but I assume
this is less resource intensive?)

3. Is there anything else wrong with the example 1 below / a better way?
Better to handle the calcs in commitProperties.

Good to know, for when I really need to use it :)

thanks all,

tom


[flexcoders] Re: LCDS Upgrade Problems

2009-03-09 Thread foobone9

I have things up and running now (mostly; I was thrown off a bit by 
fetchObjectProperties being moved out of the assembler and into the 
destinations).

The problem was a Hibernate version issue. I was using 3.2.0ga and when I 
popped in the 2.5.4 from the lcds install I was able to get things working.

However; I could only get this far when forcing CBLIB proxies (as noted below) 
by adding aop:config proxy-target-class=true/ to my applicationContext. I 
am using Spring version 2.5.4 (upgrading soon). I upgraded to Java 6 at the 
same time as lcds so I'm wondering if this triggered my proxy errors.

I think if HibernateAssembler were to implement an interface and then on 
HibernateType.java line 237 the interface is cast and used; then jdk proxies 
would work.

Thanks for your time Jeff, I'm sure you must be enormously busy.


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

 I think this is maybe a problem with the version of hibernate you are using.  
  As part of this simplified configuration feature, the assembler is going 
 into the metadata for hibernate and it seems like the protection-level on 
 that method has changed or is different in the version you are using than the 
 one we compiled against.   We are using 3.2.5 I believe.
 
 You should not need to change any configuration as it is compatible with the 
 old format.   You can remove the metadata section entirely and it will 
 generate the id properties and lazy=true associations for each hibernate 
 association.You can then add assoc tags as needed to change the defaults. 
Any associated destinations which are not defined are not directly 
 accessible via clients though they are created so you don't have to declare 
 all destinations in your model - just the ones you use fill or getItem calls 
 on.
 
 Back to the original error, I guess the other spring configuration you were 
 using was generating some proxy class which did not extend 
 HibernateAssembler?   What version of spring are you using?
 
 Jeff
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of foobone9
 Sent: Thursday, March 05, 2009 6:01 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: LCDS Upgrade Problems
 
 
 That is correct; I have a destination who's source is a derived object of 
 HibernateAssembler (Just to shutoff autoRefreshFill). My assember is then a 
 bean in the Spring container.
 
 Obviously something is wrong with this bean because if I force CGLib proxies 
 in my container (to avoid the proxy cast error; even though my derived 
 assembler implements an interface) I get the following error:
 
 17:45:18,606 ERROR [STDERR]  MessageBrokerServlet failed to initialize 
 due to runtime exception: Error: java.lang.IllegalAccessError: tried to 
 access method 
 org.hibernate.persister.entity.AbstractEntityPersister.getEntityMetamodel()Lorg/hibernate/tuple/entity/EntityMetamodel;
  from class flex.data.assemblers.HibernateType
 at flex.data.assemblers.HibernateType.start(HibernateType.java:247)
 at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216)
 
 Would I need to update my data-management-config.xml file for 2.6? I am under 
 the impression that it can be greatly simplified (from 2.5.1 config) by 
 removing the hibernate object mappings; but it doesn't need to for backward 
 compatibility.
 
 I am using hibernate config files, not annotations, and an example 
 destination I have (one with no relationships) is:
 
 destination id=testycle.hibernate
 adapter ref=java-dao /
 properties
 factoryspring/factory
 sourceTestCycleBean/source
 use-transactionstrue/use-transactions
 scopeapplication/scope
 metadata
 identity property=id/
 /metadata
 network
 session-timeout0/session-timeout
 paging enabled=false pageSize=10/
 throttle-inbound policy=ERROR max-frequency=500/
 throttle-outbound policy=REPLACE max-frequency=500/
 /network
 server
 hibernate-entitycom.xxx.ics.dto.TestCycle/hibernate-entity
 update-conflict-modePROPERTY/update-conflict-mode
 delete-conflict-modeOBJECT/delete-conflict-mode
 fill-method
 namefill/name
 paramsjava.util.List/params
 /fill-method
 fill-configuration
 use-query-cachefalse/use-query-cache
 allow-hql-queriestrue/allow-hql-queries
 /fill-configuration
 /server
 /properties
 channels
 channel ref=my-rtmp/
 /channels
 /destination
 
 and the simple bean definition is:
 
 bean id=TestCycleBean class=com.xxx.ics.assembler.MyHibernateAssembler/
 
 I commented everything else out in my data-management-config.xml.
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Jeff 
 Vroom jvroom@ wrote:
 
  I am thinking your spring configuration must be wrapping the 
  HibernateAssembler in a proxy. The code is getting an error here:
 
  HibernateAssembler assembler = (HibernateAssembler) 
  destination.getFactoryInstance().lookup();
 
  when trying to use the factory to get the assembler component from the 
  destination. Usually when you 

[flexcoders] Re: LCDS Upgrade Problems

2009-03-09 Thread foobone9
Correction, the Hibernate version bundled with lcds - 3.2.5, not 2.5.4 (that is 
my Spring version) that I mentioned below.

--- In flexcoders@yahoogroups.com, foobone9 foobo...@... wrote:

 
 I have things up and running now (mostly; I was thrown off a bit by 
 fetchObjectProperties being moved out of the assembler and into the 
 destinations).
 
 The problem was a Hibernate version issue. I was using 3.2.0ga and when I 
 popped in the 2.5.4 from the lcds install I was able to get things working.
 
 However; I could only get this far when forcing CBLIB proxies (as noted 
 below) by adding aop:config proxy-target-class=true/ to my 
 applicationContext. I am using Spring version 2.5.4 (upgrading soon). I 
 upgraded to Java 6 at the same time as lcds so I'm wondering if this 
 triggered my proxy errors.
 
 I think if HibernateAssembler were to implement an interface and then on 
 HibernateType.java line 237 the interface is cast and used; then jdk proxies 
 would work.
 
 Thanks for your time Jeff, I'm sure you must be enormously busy.
 
 
 --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote:
 
  I think this is maybe a problem with the version of hibernate you are 
  using.   As part of this simplified configuration feature, the assembler is 
  going into the metadata for hibernate and it seems like the 
  protection-level on that method has changed or is different in the version 
  you are using than the one we compiled against.   We are using 3.2.5 I 
  believe.
  
  You should not need to change any configuration as it is compatible with 
  the old format.   You can remove the metadata section entirely and it will 
  generate the id properties and lazy=true associations for each hibernate 
  association.You can then add assoc tags as needed to change the 
  defaults.Any associated destinations which are not defined are not 
  directly accessible via clients though they are created so you don't have 
  to declare all destinations in your model - just the ones you use fill or 
  getItem calls on.
  
  Back to the original error, I guess the other spring configuration you were 
  using was generating some proxy class which did not extend 
  HibernateAssembler?   What version of spring are you using?
  
  Jeff
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
  Behalf Of foobone9
  Sent: Thursday, March 05, 2009 6:01 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: LCDS Upgrade Problems
  
  
  That is correct; I have a destination who's source is a derived object of 
  HibernateAssembler (Just to shutoff autoRefreshFill). My assember is then a 
  bean in the Spring container.
  
  Obviously something is wrong with this bean because if I force CGLib 
  proxies in my container (to avoid the proxy cast error; even though my 
  derived assembler implements an interface) I get the following error:
  
  17:45:18,606 ERROR [STDERR]  MessageBrokerServlet failed to initialize 
  due to runtime exception: Error: java.lang.IllegalAccessError: tried to 
  access method 
  org.hibernate.persister.entity.AbstractEntityPersister.getEntityMetamodel()Lorg/hibernate/tuple/entity/EntityMetamodel;
   from class flex.data.assemblers.HibernateType
  at flex.data.assemblers.HibernateType.start(HibernateType.java:247)
  at 
  flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:216)
  
  Would I need to update my data-management-config.xml file for 2.6? I am 
  under the impression that it can be greatly simplified (from 2.5.1 config) 
  by removing the hibernate object mappings; but it doesn't need to for 
  backward compatibility.
  
  I am using hibernate config files, not annotations, and an example 
  destination I have (one with no relationships) is:
  
  destination id=testycle.hibernate
  adapter ref=java-dao /
  properties
  factoryspring/factory
  sourceTestCycleBean/source
  use-transactionstrue/use-transactions
  scopeapplication/scope
  metadata
  identity property=id/
  /metadata
  network
  session-timeout0/session-timeout
  paging enabled=false pageSize=10/
  throttle-inbound policy=ERROR max-frequency=500/
  throttle-outbound policy=REPLACE max-frequency=500/
  /network
  server
  hibernate-entitycom.xxx.ics.dto.TestCycle/hibernate-entity
  update-conflict-modePROPERTY/update-conflict-mode
  delete-conflict-modeOBJECT/delete-conflict-mode
  fill-method
  namefill/name
  paramsjava.util.List/params
  /fill-method
  fill-configuration
  use-query-cachefalse/use-query-cache
  allow-hql-queriestrue/allow-hql-queries
  /fill-configuration
  /server
  /properties
  channels
  channel ref=my-rtmp/
  /channels
  /destination
  
  and the simple bean definition is:
  
  bean id=TestCycleBean 
  class=com.xxx.ics.assembler.MyHibernateAssembler/
  
  I commented everything else out in my data-management-config.xml.
  
  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  Jeff Vroom jvroom@ wrote:
  
   I am thinking your 

[flexcoders] flex application 2048 error

2009-03-09 Thread sreejeshdnair
I am using a flex application to communicate with Salesforce.com. It was able 
to retrieve the Crossdomain.xml from Salesforce.com. But after that when the 
application tries to retrieve data from Salesforce it flash player is throwing 
security sandbox vioalation error.. with error code 2048. this is the error i 
am getting in detail.
##
(mx.messaging.messages::ErrorMessage)#0
  body = (Object)#1
  clientId = DirectHTTPChannel0
  correlationId = 53E9F6FC-B0CC-6E84-2FCB-ED6FFAC081E7
  destination = 
  extendedData = (null)
  faultCode = Channel.Security.Error
  faultDetail = Destination: DefaultHTTP
  faultString = Security error accessing url
  headers = (Object)#2
  messageId = 07AB6F6E-7703-37AF-31EB-ED6FFAEE56C6
  rootCause = (flash.events::SecurityErrorEvent)#3
bubbles = false
cancelable = false
currentTarget = (flash.net::URLLoader)#4
  bytesLoaded = 0
  bytesTotal = 0
  data = (null)
  dataFormat = text
eventPhase = 2
target = (flash.net::URLLoader)#4
text = Error #2048: Security sandbox violation: 
file:///F|/Shared/SalesForce/swf%20file/CCPApplication.swf cannot load data 
from https://cs2-api.salesforce.com/services/Soap/u/12.0/4e1300DR000716i.;
type = securityError
  timestamp = 0
  timeToLive = 0
#



Re: [flexcoders] difference between Adobe Flex SDK Open Source Flex SDK

2009-03-09 Thread Shyam Prasad
The Open Source Flex SDK contains everything needed to create a functional Flex 
application including the ActionScript™ and MXML compilers and the Flex 
framework. The Free Adobe Flex 3 SDK contains everything in the Open Source 
Flex SDK plus additional components that enhance the Flex application creation 
process such as advanced font encoders, tools for packaging Adobe AIR 
applications, and Adobe Flash Player. These components are not open source but 
are made freely available by Adobe.
http://www.adobe.com/products/flex/faq/open_source/


--- On Mon, 3/9/09, hworke kanps...@gmail.com wrote:

From: hworke kanps...@gmail.com
Subject: [flexcoders] difference between  Adobe Flex SDK  Open Source Flex SDK
To: flexcoders@yahoogroups.com
Date: Monday, March 9, 2009, 4:23 PM











 











Hi what are the differences between

   Adobe Flex SDK  Open Source Flex SDK?



As you can see here?



http://opensource. adobe.com/ wiki/display/ flexsdk/Download +Flex+4




 

  




 
















  

RE: [flexcoders] Re: Flex Interview Questions

2009-03-09 Thread Gordon Smith
I think giving an example is perfectly fine answer. But in words it would be 
something like  this:

You put an event attribute on the component tag. The name of the attribute is 
the event type the component should listen for. The value of the attribute is 
the body of the event handler to be executed when it hears that event. The 
event handler can use an implied argument named 'event' to access the Event 
instance.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of nathanpdaniel
Sent: Monday, March 09, 2009 7:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex Interview Questions


 5) How do you add event listeners in mxml components. Now AS3 components?

I was actually asked this once (someone was actually asking me at work) - but - 
I didn't really know how to answer the mxml portion - other than to give a code 
sample...

custom:MyComponent eventType=eventHandler() /

What WOULD be a better/proper answer for that???



RE: [flexcoders] static function and getDefinitionByName

2009-03-09 Thread Gordon Smith
If you are running in a debug player, you should have gotten an RTE when the VM 
tried to execute ClassRef[getter](), unless your getter returns a Function 
expecting no arguments. If you didn't, that seems like a serious VM bug.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Sefi Ninio
Sent: Tuesday, March 03, 2009 12:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] static function and getDefinitionByName

Hmmm...
I know I should have though about that...

Thanks
On Tue, Mar 3, 2009 at 8:50 PM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:

Oh, if it is a getter then just use

ClassRef[getter]



as in:



trace(ClassRef[getter]);



Alex Harui

Flex SDK Developer

Adobe Systems Inc.http://www.adobe.com/

Blog: http://blogs.adobe.com/aharui



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Sefi Ninio
Sent: Monday, March 02, 2009 10:12 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com

Subject: Re: [flexcoders] static function and getDefinitionByName



It has a few private static members, and a few public static getter functions 
that manipulate the private members (no arguments on any of the functions).
Nothing out of the ordinary.

I get the fully qualified class name, and the static getter to be executed - at 
run time via XML.
I use the class name to create a Class instance, and then I tried
ClassRef[getter]();

Nothing. When I debug it, the debugger doesn't event break on the breakpoint in 
the getter.

On Tue, Mar 3, 2009 at 12:58 AM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:

What does the class definition look like?  I’m pretty sure I’ve used this 
successfully.



Alex Harui

Flex SDK Developer

Adobe Systems Inc.http://www.adobe.com/

Blog: http://blogs.adobe.com/aharui



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Sefi Ninio
Sent: Monday, March 02, 2009 5:10 AM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] static function and getDefinitionByName



Hi Alex.

I actually tried that, it doesn't work...

On Mon, Mar 2, 2009 at 8:13 AM, Alex Harui 
aha...@adobe.commailto:aha...@adobe.com wrote:

ClassRef[“staticFunctionName”]()



Alex Harui

Flex SDK Developer

Adobe Systems Inc.http://www.adobe.com/

Blog: http://blogs.adobe.com/aharui



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Sefi Ninio
Sent: Sunday, March 01, 2009 2:07 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] static function and getDefinitionByName



Hi.

I am using getDefinitionByName from flash.utils to get a class definition / 
instance from a string:
var ClassRef:Class = getDefinitionByName(className) as Class;

That works great, I can create an instance if I want.
Problem is, I need to call a static function on that ClassRef class, and I'll 
know the function name only at runtime from XML.
Any idea on how to do this?








RE: [flexcoders] Re: Define repeaters at runtime

2009-03-09 Thread Gordon Smith
 I understand that arrays can hold references to components
 so I've recoded to push and pop the images from ImageArray
 to set the properties on the individual Images.

You shouldn't have to push and pop anything. If the ith element of the array is 
a reference to an Image instance, then setting imageArray[i].source in a loop 
should work fine. What are you setting it to, and how does it not work?

Gordon Smith
Adobe Flex SDK Team


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of smitade
Sent: Friday, February 27, 2009 11:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Define repeaters at runtime


--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon 
Smith gosm...@... wrote:

 So that the doc team understands... What is it that you found
surprising? That an Array can hold anything, including references to
components?

 Gordon Smith
 Adobe Flex SDK Team

 From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of smitade
 Sent: Thursday, February 26, 2009 9:50 PM
 To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Define repeaters at runtime


 It works - please ignore the previous post. Wow, the ability to push
 components into arrays like this opens up so many possibilities -
 especially when working with flex frameworks. I find it strange the
 documentation doesn't highlight this feature - otherwise I missed it.
 Thanks again!


Gordon - sorry for the confusion - I'm confused myself! When I started
this thread I was looking for a way to dump components into an Array
e.g. 64 Images into an array ImageArray so that I could set the
properties of the images by setting the array directly e.g.
for (i=0;i64;i++)
{
ImageArray[i].source=some.png;
}

I mistakenly thought it was working as initially all of the 64 images
have the same source and this was showing up correctly. What I found
out that this is not the case (and probably why I didn't find it in
the docs). I understand that arrays can hold references to components
so I've recoded to push and pop the images from ImageArray to set the
properties on the individual Images. I liked the functionality of
using a repeater defined in MXML where I could reference my
ImageArray directly. I haven't found a way to define this repeater
at runtime though.

Sorry for the long reply - hope it makes sense.



[flexcoders] Problem with custom component tabbing in TabNavigator

2009-03-09 Thread aceoohay


I have created an extension of the DateField() (ValidatedDateField())
component. The main purpose of this extension is to call an extension to
the TextInput component.

Everything seems to work swimmingly. I have found that in some cases
however, the tab key (tab index order) handling gets messed up. Because
of the poor tab handling design in flex, the method that we use to
control the tab order is by placing the fields in the order in the mxml
file that we want. This seems to work most of the time.

I have found that on forms where the custom datefield components are in
a TabNavigator canvas that the ValidatedDateField() that I have created
will cause the tab order to break. In one case it causes the focus to go
to a dataGrid in another container above the one the
ValidatedDateField() is in. My best guess is that it causes the next
field to be the first editable field within the TabNavigator canvas that
the datefield is in.

If I make the field editable=false, the tabbing seems to work fine
irrespective of the TabNavigator.

My conclusion is that when the custom TextInput portion of the
DateField gets instantsiated the tab order gets hosed.

I have looked through the code for the ComboBase and DateField to see if
I can tell where the tab order gets defined and I can't see it. I saw a
line that says;

textInput.parentDrawsFocus = true;

and thought that might have something to do with it, but I can't
replicate that in my code, I get an inaccessible error.

If my assumption that I am not creating the textInput component
correctly is true, the question is;

How can I ensure that the custom textInput component portion of my
DateField component gets the same tab order as the DateField itself?

Here is the creatChildren method of the custom DateField Component;


override protected function createChildren():void  { 
super.createChildren();removeChild(textInput);   
if(this.textInput){ // Use ValidatedTextInput instead of TextInput
and Setup various fields   //needed by ValidatedTextInput
textInput = new ValidatedTextInput(); textInput[dataType] =
date; textInput[formatter] = _dateFormat;
textInput[minDataChars] = _minDataChars; textInput[maxDataChars]
= _maxDataChars; textInput[minValue] = _minValue;
textInput[maxValue] = _maxValue; textInput[id] = vti +
this.id; textInput[rootOwner] = this.parent;
textInput[charactersAlsoPermitted] = _charactersAlsoPermitted;
textInput[formatData] = _formatData; textInput[doValidateData] =
_doValidateData; textInput[defaultValue] = _defaultValue; 
textInput.addEventListener(focusOut,updateTextValue)
textInput.addEventListener(textChanged,updateTextValue)
addChild(textInput);}  }

Since the application that I am working on contains a number of heads
down data entry environments, this is a critical issue for me.


All help is greatly appreciated.

Paul



[flexcoders] Re: how to close a titlewindow that was not created as a popup

2009-03-09 Thread stinasius
this is my code

import mx.containers.TitleWindow;

 private function closeWindow(event:Event):void{
removeChild( event.target as TitleWindow);
currentState='';
} 


then on the titlewindow component this is the way i call the close function

mx:State name=login_reg
mx:RemoveChild target={intro}/
mx:AddChild relativeTo={intro_container}
mx:target 
comp:login_register id=login_reg 
close=closeWindow(event) loginSuccessful=handleLoginSucess(event)/
/mx:target
/mx:AddChild  
/mx:State



  1   2   >