RE: [flexcoders] Flex 2: Inline ItemRenderer -- Getting current row of DataGrid

2006-04-23 Thread Matt Chotin



The listData property of your component (wich you'll have inherited from
the Text) should have a rowIndex I think.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Collins
Sent: Thursday, April 20, 2006 9:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2: Inline ItemRenderer -- Getting current
row of DataGrid

I have the following for a DataGridColumn, which works just fine:

 mx:DataGridColumn dataField=label id=dg_products_label 
width=65 headerText=Product 
 
mx:itemRenderer
  mx:Component
 
  mx:Text text={data.label} 
color={outerDocument.checkProductUsage(this,data.selected)} /
   
 /mx:Component

 /mx:itemRenderer
   
 /mx:DataGridColumn 

The function it calls looks like this:
public function checkProductUsage(c:mx.controls.Text, 
sel:String):Number {
if (sel == 'true') {
//ta_debug.text = mx.utils.ObjectUtil.toString(d);
//example of what I want - dg_products.selectedIndices.push
(currentrow of datagrid);
 return 0xFF;
}else {
 return 0x00;
 }
}

This all works, the text color changes based on the data.selected 
value, but I really want to add the row index to the selectedindices 
of the DataGrid.

How do I get the currentrow of the DataGrid from in an itemrenderer 
like this? Am I missing another approach?

Thanks,
Mike





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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] Re: Flex 2 Beta 2 - MenuBar events - no menuItem property

2006-04-23 Thread Jordan Snyder



That did it! Thank you!

I was apparently going down the wrong path, because when I traced the
event object itself, I was not seeing a menuItem property...so it's
just magically there. Why would that property not show up?

Cheers

On 4/22/06, sof4real03 [EMAIL PROTECTED] wrote:
 Try accessing your label attribute as follows:

 [EMAIL PROTECTED] and then you should be able to retrieve the
 value.

 Let me know if tht works for you.
 -Sof


 --- In flexcoders@yahoogroups.com, Jordan Snyder [EMAIL PROTECTED]
 wrote:
 
  Hello,
 
  I'm using Flex 2 Beta 2, and I'm trying to catch MenuBar events.
 
  I've already been through the workarounds in order to display E4X XML
  dataproviders correctly, ie, using showRoot=false,
  labelField=@label, etc.
 
  However, whenever a MenuBar event fires, the event object does not
  contain a menuItem property. I can trace the event object and see
  that it contains no menuItem. Here is my code, in case I've missed
  something silly.
 
 
 
  mx:Script![CDATA[
  import mx.managers.PopUpManager;
  import mx.controls.Menu;
  import mx.controls.MenuBar;
  import mx.events.MenuEvent;
 
 
  private function changeEvt(event:MenuEvent):void {
  flash.util.trace(crazy+event);
  if(event.menuItem.attributes.label == Settings...) {
  showSettings();
  }
  }
 
 
  private function showSettings():void {
  // Create the TitleWindow container.
  var settingsWindow:IFlexDisplayObject =
  PopUpManager.createPopUp(this,
  SettingsMenu, false);
  }
 
  ]]
  /mx:Script
 
 
 
  mx:MenuBar x=0 y=0 width=1024 height=20 id=FileBar
  change=changeEvt(event) labelField=@label showRoot=false
  mx:dataProvider
  mx:XML format=e4x
  menuitem label=File
  menuitem label=Exit /
  /menuitem
  menuitem label=Edit
  menuitem label=Mode
  menuitem label=** Mode/
  menuitem label=** Mode/
  /menuitem
  menuitem label=Users... /
  menuitem label=IP Address List... /
  menuitem label=Settings... /
  /menuitem
  menuitem label=View
  menuitem label=Logs... /
  menuitem label=Reports... /
  /menuitem
  menuitem label=Window
  menuitem label=*** /
  menuitem label=*** /
  /menuitem
  menuitem label=Help
  menuitem label=*** Help... /
  menuitem label=Support /
  menuitem label=Check for Updates... /
  menuitem label=About  /
  /menuitem
 
  /mx:XML
  /mx:dataProvider
 
  /mx:MenuBar
 
  The trace shows this:
 
  crazy[Event type=change bubbles=false cancelable=true eventPhase=2]
 
 
 
  Is there a workaround? Is anyone getting MenuBar events to work in
 Beta 2?
 







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













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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [Flexcoders]Silent error all Flex applications

2006-04-23 Thread Matt Chotin










Were you playing around with different
Flash Players, maybe youre using Player 8 instead of 8.5?











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Webdevotion
Sent: Saturday, April 22, 2006
6:41 AM
To: flexcoders@yahoogroups.com
Subject: [Flexcoders]Silent error
all Flex applications







Hello,

I just powered on my pc to found out that none of my 
Flex projects are displaying ... They are being compiled
on the server or as a swf without errors, they have a 
filesize (  200kb etc. ). The Flex command window does 
not give any errors.

What are the things I need to check here ?

tnx very much!











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Uncaught exceptions in Flex 1.5

2006-04-23 Thread Matt Chotin



In 1.5 we don't throw exceptions as a practice, I'm not sure what you're
actually running into here?

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stanislav Zayarsky
Sent: Saturday, April 22, 2006 7:52 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5

Hello FlexCoders,

I have the same problem!

Adobe guys, can you help us?

Best regards
Stanislav

On 4/21/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:
 Hi All!

 How to deal with uncaught exceptions in Flex 1.5? Actually they kill
 application running via terminating the current script.

 Due to the fact Flex application has a lot of entry points (each and
every
 event handling delegate), I need either put try..catch..finally
statements
 in each and every function assigned as an event handler that is wrong
copy
 and paste method or create own Delegate class that is much more better
by
 design.

 But on the other hand using the second approach force me not to assign
event
 handlers in MXML (like mx:Button click=onClick()). Instead we need
to
 assign those handlers in linked ActionScript class. It's very
difficult when
 you deal with complex nested structures, repeaters, ViewStack,
Accordion and
 their successors.

 Any suggestions?

 Thank you in advance.

 Regards, Sergey.



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










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



 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Newbie question

2006-04-23 Thread Matt Chotin










Give your services component an id, then
refer to it elsewhere. If you put services in your application you could use
Application.application.myServices.statsRequest, etc.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex MacCaw
Sent: Saturday, April 22, 2006
1:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie
question





Is it possible to reference a HTTPService from
another file.



For example in services.mxml I create a service:

mx:HTTPService id=statsRequest
url=""
useProxy=false/



And in stats.mxml I reference the service:

 mx:DataGrid id=dgReviews x=40 y=85 width=800 height=134 dataProvider={ statsRequest.result.graphdata.stat} mx:columns mx:DataGridColumn headerText=Ip dataField=ip width=480/ mx:DataGridColumn headerText=When dataField=created-at width=240/ /mx:columns /mx:DataGridHowever this doesnt work, I get Access of undefined property 'statRequest'. Im sure there must be a simple answer to this.Thanks.Alex









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Loading image in Tilelist using itemrenderer

2006-04-23 Thread Matt Chotin










Why do you have the initCellRenderer AND
the itemRenderer=renderer/imagecomp?



In the MXML you should use a dot, not a
slash, renderer.imagecomp



But pick one or the other, dont do
the MXML and the AS I think.









From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of imran_b_l
Sent: Thursday, April 20, 2006
8:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Loading
image in Tilelist using itemrenderer





i m
trying to load image in TileList using itemrenderer and
dataprovider but there's some error which i m not able to sort.

i m
pasting the code below.



//

?xml
version=1.0 encoding=utf-8?

mx:VBox
xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
height=100% width=100%
creationComplete=initCellEditor(event);

mx:Script

![CDATA[

import
flash.events.Event;

import
mx.core.ClassFactory; 

import
mx.controls.listClasses.*;

import
mx.controls.Image;

[Bindable]

public
var myArr:Array = [

{image:assets/images/inetoo_bg.jpg},

{image:assets/images/inetoo_bg.jpg}

];

public
function initCellEditor(event:Event):void { 

thumbnail.itemRenderer=
new ClassFactory(RendererState);

} 

]]

/mx:Script

mx:HBox
label=Navigation

mx:Button
label=btn1/

mx:Button
label=btn2/

mx:Button
label=btn3/

/mx:HBox

mx:HBox
width=100% id=mainHB

mx:TileList
id=thumbnail dataProvider={myArr}
columnCount=1 width=100% itemRenderer=renderer/imagecomp/

/mx:HBox

/mx:VBox

/

imagecomp is as below;

///

?xml
version=1.0 encoding=utf-8?

mx:VBox
xmlns:mx=http://www.adobe.com/2006/mxml
horizontalAlign=center verticalAlign=top

mx:Image
id=image width=60 height=60
source={data.image}/

/mx:VBox





The error i m getting is: initializer for 'itemRenderer': cannot
parse value of type mx.core.IFactory from text 'renderer/imagecomp' 









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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] How would I do something like this....

2006-04-23 Thread jeremy lu




hi Anatole,

I'm talking about datagrid too, never thought about extending tree and
add in those function. (especially in flex 2 the implementation changed
a lot).

I should add this to my original post:

if what the user want is providing a *view* into the hierarchy data,
then a simple item renderer inside first column of the datagrid should
do the trick, this should just take 2-3 days.

but the project I'm working on (which will be public in the end of May)
requires the capability to let user manipulate those nodes
(add/remove/rename/drag-drop/cut/copy/paste), which made it a lot
complex then I original thought. (acutally what you said is what I
thought it should be in the beginning - that weekend when I started
prototyping - but after digging into it I found that's totally another
story)


jeremy.

On 4/23/06, Anatole Tartakovsky [EMAIL PROTECTED] wrote:









Jeremy,
 Actually,I was not 
suggesting to rewrite UI/datagrid - I was suggesting not to use tree 
-datagrid would work fine the way it is now. The changes to 
datagridwould be verylocalized:just sorting to take in 
consideration the hierarchy (essentially making sure you have custom sort 
function based on parent precedingcolumn sort), minor changes like 
making sure first column locking works, etc. In either case the code is based on 
datagrid and not on the tree, with opening/closing of the nodes based upon 
filtering of the data, add custom renderer to the first column to paint / 
outdent first label and integrate it with filter function.
 Quick and dirty approach allows 
you to do most of that code inline within the mxml/data definition itself doing 
the above code explicitly.

Thank you,
Anatole

PS. Obviously, disabling sorting or column 
reordering would further simplify the task.


- Original Message - 

  
From: 
  jeremy lu 

  To: 
flexcoders@yahoogroups.com 
  Sent: Saturday, April 22, 2006 11:14 
  PM
  Subject: Re: [flexcoders] How would I do 
  something like this
  

well, just flip 
  thru my gridtree component (http://tinyurl.com/grcfs) developed two 
  months ago (which is still in a mess), it's around 2000 lines of code (after 
  refactoring it three times) and lot of algorithm behind to handle following 
  function:addNoderemoveNodecutNodecopyNodepasteNodeindent/outdent 
  codeI think the first methods Anatole mentioned will definitely be a 
  b***h to tackel with, for the nature of List-based component is a little bit 
  tricky then it looks (all the list items are dynamically generated and draw on 
  the screen, this will cause some trouble)I'm currently implementing 
  gridtree using item renderer for the first column, it's pretty much the same 
  work to extends gridbase and inject the tree grid code into it so the API 
  would be more compatible, by using this method I could easily feed a non-xml 
  structure (ie:resultset from java/php) to the component and let it draw the 
  hierarchy and set indent/outdent of each node.now I'm thinking maybe I 
  should draw those lines and plus sign instead of a simple arrowhead, so it's 
  more like VS2005 :-)FYI, the component took a whole weekend for 
  prototyping and concept-proofing, *but*, it took almost one and a half 
  month for debugging and refactoring to stablize the code and become really 
  usable in the on-going product/project.originally I want to 
  open-source the component but later on this become one of my assigned 
  day-job project (so I can fulltime developing it with the approval of my 
  employer), but anyway, I would love to answer any related 
  questions.jeremy.
  On 4/23/06, Anatole 
  Tartakovsky [EMAIL PROTECTED] wrote:
  

Depends on your requirements:
For generic caseit is 3 step 
process:
1. Wait for beta 3 that supposely comes with 
the source code.
2. Study the code for data grid header, 
treeview, datagrid, etc
3. Write your own code for the 
controlinherited on the topof BaseGrid, with automatic wrapper 
for the first column - 1500-2000 lines in total to support generic 
case

For quick and dirty :
Create first column as cell renderer. I believe 
I posted code in this group for Flex 1.5 tree cell renderer that allowed to 
add nodes lines to the regular tree - you just paint it within item - still 
about 200 lines of code for core functionality, another 100 lines for 
cascade retrieve/grouped sort on the header clicks, 2-3 days of work 
altogether

Have not seen anything in the public domain, 
just few developed for hire in consulting gigs.

HTH,

Anatole





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com









  
  
SPONSORED LINKS
  
  
  


Web site design development
  
  

Computer software development
 

RE: [flexcoders] Flex2B2 :: Changing State :: Problem with parent child

2006-04-23 Thread Matt Chotin










I dont think this should be a
problem, can you provide more code if its not working?











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle
Sent: Thursday, April 20, 2006
10:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2B2 :: Changing State :: Problem with parent child





Hi,

Real quick is there a problem with changing a parent component state and in the
next call calling one if it's children's state changes?

I cannot get this to work, but in the mxml component the child component
changes state fine.

IE

if
(event.label == Match) {
   
 trace(Match);
   
 currentState = matchState;

modifierCheckGroup.currentState matchState;

}

Peace, Mike

-- 
What goes up, does come down. 







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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex2B2 Problem with XML insertChildBefore

2006-04-23 Thread Matt Chotin



I haven't tried this but it may need to be
productData.category[0].insertChildBefore(x, y)

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of greenfishinwater
Sent: Thursday, April 20, 2006 12:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2B2 Problem with XML insertChildBefore

I am experimenting with using XML as the data provider for a tree. I
want to be able to inset new nodes at run time. I have successfully
used appendChild and insertChildAfter, but cannot get
insertChildBefore to work. In my example app I think I maybe setting
up the position where to insert incorrectly. Does anybody else have
experience of using these insert methods.

Also I would like to know how to insert a new node underneath an
existing node, rather than at the same level.

This is my app which is coded for Flex 2 beta 2

Thank you

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
layout=absolute
 mx:Script
 ![CDATA[
 import mx.collections.XMLListCollection;
 import flash.events.*;
 import mx.events.*;
 import mx.controls.*;

 [Bindable]
 public var productData:XML = food
 category name=Fish
 product name=Salmon/
 /category
 category name=Vegetable
 product name=Carrot/
 /category
 /food;

 public var extraData:XML = category name=Fruit
 product name=Orange/
 /category;

 public var newFish:XML = product name=Chilean Sea Bass/;

 public function appendToEnd() : void
 {
 productData = productData.appendChild(extraData);
 myTree.dataProvider = productData;
 }
 public function insertAfterFish() : void
 {
 var x:Object = productData.category[0];
 var y:Object = extraData;

 productData = productData.insertChildAfter(x, y);
 myTree.dataProvider = productData;
 }

 public function insertBeforeSalmon() : void
 {
 var x:Object = productData.category[0].product[0];
 var y:Object = newFish;

 productData = productData.insertChildBefore(x, y);
 myTree.dataProvider = productData;
 }
 ]]
 /mx:Script

 mx:Tree id=myTree width=300 height=200 labelField=@name
 showRoot=false dataProvider={productData} /
 mx:Button label=Append to End click=appendToEnd() y=210/
 mx:Button label=Insert after Fish click=insertAfterFish()
y=235/
 mx:Button label=Insert before Salmon
click=insertBeforeSalmon() y=260/

/mx:Application





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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Flex2b2: Question about controls and mouse events

2006-04-23 Thread Jason Hawryluk





Just 
for info Matt, I seen the same behavior with the button when set to 
toggle=true.

  -Message d'origine-De: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]De la part 
  de Matt ChotinEnvoy: dimanche 23 avril 2006 
  07:46: flexcoders@yahoogroups.comObjet: RE: 
  [flexcoders] Flex2b2: Question about controls and mouse 
  events
  
  Ive forwarded this 
  on, I dont know that it makes sense either.
  
  
  
  
  
  From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tobias PattonSent: Wednesday, April 19, 2006 10:50 
  AMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Flex2b2: Question 
  about controls and mouse events
  
  Hello 
  List;
  
  One of the panels in my appliction has a 
  check box immediately to the left of a text input field. I noticed that when I 
  would click and drag (right to left) to select all the text in the text input, 
  sometimes the value of the check box would change. It turns out that to change 
  the value of the check box, all that is required is that a mouse-up event 
  occur with the mouse above the control. I was a bit sloppy with my drag 
  select, and was releasing the mouse beyond the left bounday of the text input, 
  over the check box control, and thereby changing its 
  value.
  
  Is this behavior by design? In every UI 
  framework Ive worked with, both Windows and Macintosh, for a control to 
  change its value there must be a mouse down within the controls click region, 
  followed by a mouse-up also in the click region. This allows the user to 
  change his mind. If the user presses the mouse button over the control, he can 
  move the pointer away from the control before releasing the button to avoid 
  activating the control. In Flex 2b2, this is not the case. This same sequence 
  of events activates the control. Also, in Flex 2b2, pressing the mouse button 
  when the pointer is not over the control, then moving the pointer over the 
  control before releasing the button changes the controls value (as in the 
  example above). 
  
  Am I the only one that thinks this 
  behavior is non standard, and perhaps a bit unintuitive the the typical 
  user?
  
  Heres a small application that 
  demonstrates what Im describing.
  
  ?xml version="1.0" 
  encoding="utf-8"?
  mx:Application 
  
   
  xmlns:mx="http://www.adobe.com/2006/mxml"
   
  xmlns="*" 
   
  layout="vertical"
   
  
   
  mx:Script
   
  ![CDATA[ 
  
   
  private function EventHandler( event : Event ) : 
  void
   
  {
   
  trace( event.type );
   
  } 
  
   
  ]]
   
  /mx:Script
  
   
  mx:HBox verticalAlign="middle" 
  horizontalGap="2"
   
  mx:CheckBox label="Checkbox"
   
  mouseDown="EventHandler( event )"
   
  mouseUp="EventHandler( event )"
   
  buttonDown="EventHandler( event )"
   
  click="EventHandler( event )"
   
  valueCommit="EventHandler( event )"/
   
  mx:TextInput text="Select me"/
   
  /mx:HBox
  /mx:Application
  
  Thanks.Tobias.
  Kodak 
  Graphic Communications Canada Company
  Tobias Patton | 
  Software Developer | Tel: +1.604.451.2700 ext: 5148 | mailto:[EMAIL PROTECTED] 
  | http://www.creo.com 
  
  
  





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Matt Chotin
Title: Message










Youll need to make your own copy of
the object, AS is always pass by reference.



You can try calling
mx.utils.ObjectCopy.copy(yourobj) and it may give you back a copy with what you
want.



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Griffin
Sent: Saturday, April 22, 2006
3:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 1.5 -
getrepeaterItem values







I havea small app which passes the
reference to a repeater item to an editable view. I have been trying to
assign the values from the original repeater dataProvider item into a
newarray that can then be edited without affecting the original data
until explicitly saved. The problem is that every combination I've tried
is still updating the repeater data so I'm pretty sure I'm just assigning
references instead of copying the values over. A simplified version of
the code follows:







//positionVO has an array of names called
Successors





var editablePosition:positionVO;











//currentPosition is the repeater item
that got clicked in the main UI 





function
setEditableDetails(currentPosition)
{

 editablePosition.Successors =
currentPosition.getRepeaterItem().Successors;






 //also tried creating
editablePosition variable as a new positionVO





 //editSuccessorsList
should now be able to have items added to it without adding them to the
original currentPosition data as well





 //with this code the
repeater view is still bound to editSuccessorList's dataProvider newitems
are added to both lists





 






editSuccessorsList.dataProvider = editablePosition.Successors;






 }







If anyone can advise on what I'm doing
wrong in theprevious example a nudge in the right direction would be
appreciated. 











Many thanks in advance.











Mike











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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006
 

RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue

2006-04-23 Thread Matt Chotin










Do you have a typed reference to your AS
class so that it gets linked in?











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec
Sent: Friday, April 21, 2006 11:59
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2B2:
JAVA to AS object serialization issue







Hello,











I ran into something I woudn't expect to be a problem. Here is the
story.











Have a simple data object in Java that is passed to the Flash player
via remote object call. I see in the log that the object type is what I expect
to have but when I trace the object value via Alert message I get Object. 











I believe is something wrong but can't figure out what... Below is the
Java class, the AS2 calss and also the message from the log. Am I missing
something?

















=== JAVA CLASS ==











package org.ifm.model;





import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;





public class PhoneNumber implements Serializable {





 private long phnuId; 
 private String phnuPt1Code;
 private String phnuPhoneNumber;
 private String phnuExtension;
 private String phnuIsSource; 
 private Date phnuCreateTs;
 private Date phnuUpdateTs; 
 private Long phnuIndiId;
 
 public PhoneNumber() {
 }





 public long getPhnuId() {
 return this.phnuId;
 }





 public void setPhnuId(long phnuId) {
 this.phnuId = phnuId;
 }





 public String getPhnuPt1Code() {
 return this.phnuPt1Code;
 }





 public void setPhnuPt1Code(String phnuPt1Code) {
 this.phnuPt1Code = phnuPt1Code;
 }





 public String getPhnuPhoneNumber() {
 return this.phnuPhoneNumber;
 }





 public void setPhnuPhoneNumber(String
phnuPhoneNumber) {
 this.phnuPhoneNumber =
phnuPhoneNumber;
 }





 public String getPhnuExtension() {
 return this.phnuExtension;
 }





 public void setPhnuExtension(String phnuExtension) {
 this.phnuExtension = phnuExtension;
 }
 
 public Date getPhnuCreateTs() {
 return this.phnuCreateTs;
 }





 public void setPhnuCreateTs(Date phnuCreateTs) {
 this.phnuCreateTs = phnuCreateTs;
 }





 public Date getPhnuUpdateTs() {
 return this.phnuUpdateTs;
 }





 public void setPhnuUpdateTs(Date phnuUpdateTs) {
 this.phnuUpdateTs = phnuUpdateTs;
 }
 
 public String getPhnuIsSource() {
 return this.phnuIsSource;
 }





 public void setPhnuIsSource(String phnuIsSource) {
 this.phnuIsSource = phnuIsSource;
 }





 public String toString() { 
 return new ToStringBuilder(this)

.append(phnuId, getPhnuId())
 .toString();
 }
 
public Long getPhnuIndiId() {
return phnuIndiId;
}





public void setPhnuIndiId(Long phnuIndiId) {
this.phnuIndiId = phnuIndiId;
} 





 public boolean equals(Object other) {
 if ( !(other instanceof PhoneNumber)
) return false;
 PhoneNumber castOther =
(PhoneNumber) other;
 return new EqualsBuilder()
 .append(this.getPhnuId(),
castOther.getPhnuId())
 .isEquals();
 }





 public int hashCode() {
 return new HashCodeBuilder()

.append(getPhnuId())

.toHashCode();
 }
}






 AS3 class
 package org.ifm.model
 {
 [Bindable]
 [RemoteClass(alias=org.ifm.model.PhoneNumber)] 
 public class PhoneNumber {





 public function TlcPhoneNumber(){}
 public var phnuId : Number;
 public var phnuPt1Code : String;
 public var phnuPhoneNumber : String;
 public var phnuExtension : String;
 public var phnuIsSource : String;
 public var phnuCreateTs : Date;
 public var phnuUpdateTs : Date;
 public var phnuIndiId : Number;
 public
function toString() : String
 {
 var msg : String = [***PHONE_NUMBER***PHNU_PHONE_NUMBER
+ phnuPhoneNumber + ];
 return msg; 
 }
 }
}






[Flex] Adapter 'java-object' called
'org.ifm.business.AppFacade.findIndividualById([4339083])'
[Flex] Result: '[EMAIL PROTECTED]'
[Flex] Serializing AMF/HTTP response
Version: 3
 (Message #0 targetURI=/5/onResult, responseURI=)
 (Typed Object #0
'flex.messaging.messages.AcknowledgeMessage')
 destination = null
 headers = (Object #1)
 correlationId =
7C792757-AD11-2E1C-844E7E9F
 messageId =
39378036-8C0B-5897-38C2-CBDA80793946
 timeToLive = 0.0
 timestamp = 1.145644502348E12
 clientId =
39377FC3-CD0A-7DC0-F431-E58CC6883B8C
 body = (Typed Object #2
'org.ifm.model.TlcPhoneNumber')
 phnuCreateTs = null
 phnuIsSource = WEB
 phnuUpdateTs = null
 phnuPhoneNumber =
1231231234
 phnuIndiId = null
 phnuPt1Code = null
 phnuExtension = null
 phnuId = 0.0











When
display it: Alert.show(Phone:+ event.result, Alert
Box,Alert.OK);











it shows
Object, and I would expect to see something like that:
[***PHONE_NUMBER***PHNU_PHONE_NUMBER + phnuPhoneNumber +
];











I don't see
this hapening for other java objects I have. 
























































































New Yahoo! Messenger with Voice. Call
regular phones from your PC and save big. 







--
Flexcoders Mailing List
FAQ: 

RE: [flexcoders] Re: Drag Drop conundrum... BUG?

2006-04-23 Thread Paul Williams



Hi Martin,

Can you post your code?

Another guess: Are you using an Array or an ArrayCollection as your
dataprovider? My understanding is that you must use an ArrayCollection
if you want updates to propagate to the control, see below for more:

http://livedocs.macromedia.com/flex/20beta1/docs/wwhelp/wwhimpl/common/h
tml/wwhelp.htm?context=LiveDocs_Partsfile=2088.html

Paul

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flexabledev
Sent: Saturday, April 22, 2006 11:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Drag  Drop conundrum... BUG?

Paul,

Thanks! I didn't know that you did not need to set dropEnabled=true
if you also set dragEnter and dragDrop handlers. I just assumed that
you always needed to set dropEnabled, even if you write your own drag
behaviour...

Once I set dropEnabled to false, I can see (while debugging) that
the contents of the Array after the Drop were Correct, i.e. no
[object Object] items in the List. So far so good... BUT!!! Once
it is set to false the List does not reflect the contents of the
Array (it's dataProvider) after the Drop. I tested this in two ways:

1. I Initialized the [Bindable] Array to contain values before the
Drop. They show up in the List as expected but when I Drop an item
nothing changes! In debug mode, though, the Array contains both the
initialized values and the drop items.

2. When I set dropEnabled back to true, the drop items show up in
the list, but so does the default [object Object] for each drop item.

This now looks like a bug to me, that somehow the list control does
not get notified of change to the dataProvider. 

To test this, I added a button that manually adds a value to the Array
and the List still does not reflect the change to it's dataProvider. 
Any Ideas?

Thanks...

Martin

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

 Just a guess, but one possibility is that your list's default drop
 behaviour is switched on, i.e. on the list control,
dropEnabled=true.
 This could cause the item to be added twice, once by your event
handler
 and once by the default drop behaviour.
 
 Paul
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of flexabledev
 Sent: Saturday, April 22, 2006 9:38 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Drag  Drop conundrum...
 
 I've started to experiment with Drag  Drop and have run into a
 problem I can't figure out. I have successfully written code that
 allows me to Drag rows from a DataGrid (with a custom Drag Proxy) and
 Drop the value of one of the columns into a List. The only thing I
 don't understand is why when I do a Drag  Drop, I always get two
 entries in the List for each of the rows that were dragged. If I drag
 two rows with String values that get dropped (i.e. ONE, TWO), the
 result in the List after the Drop looks like:
 
 [object Object]
 [object Object]
 ONE
 TWO
 
 When I debug it, the value of items.length equals 2
 
 which drives a For loop with
 IList(dropTarget.dataProvider).addItem(items[i].field);
 
 As I step through the doDragDrop function in debug mode, it only
 executes the loop twice, yet I end up with four entries in the List?
 
 Any ideas? 
 
 I can't figure it out, but it feels like there is some default
 behaviour (dropping the items Object separate from my addItem)
 occuring that I don't see when I step through it in debug mode?
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links







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



 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Stanislav Zayarsky



Matt, you know that mx.utils.ObjectCopy doesn't work properly.

Best regards
Stanislav

On 4/23/06, Matt Chotin [EMAIL PROTECTED] wrote:



 You'll need to make your own copy of the object, AS is always pass by
 reference.



 You can try calling mx.utils.ObjectCopy.copy(yourobj) and it may give you
 back a copy with what you want.



 Matt


 


 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Michael Griffin
 Sent: Saturday, April 22, 2006 3:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 1.5 - getrepeaterItem values





 I have a small app which passes the reference to a repeater item to an
 editable view. I have been trying to assign the values from the original
 repeater dataProvider item into a new array that can then be edited without
 affecting the original data until explicitly saved. The problem is that
 every combination I've tried is still updating the repeater data so I'm
 pretty sure I'm just assigning references instead of copying the values
 over. A simplified version of the code follows:


 //positionVO has an array of names called Successors


 var editablePosition:positionVO;





 //currentPosition is the repeater item that got clicked in the main UI


 function setEditableDetails(currentPosition)
 {

 editablePosition.Successors =
 currentPosition.getRepeaterItem().Successors;



 //also tried creating editablePosition variable as a new positionVO


 //editSuccessorsList should now be able to have items added to it
 without adding them to the original currentPosition data as well


 //with this code the repeater view is still bound to editSuccessorList's
 dataProvider new items are added to both lists





 editSuccessorsList.dataProvider = editablePosition.Successors;



 }


 If anyone can advise on what I'm doing wrong in the previous example a nudge
 in the right direction would be appreciated.





 Many thanks in advance.





 Mike




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


 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

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

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006
 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

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

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006









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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] Uncaught exceptions in Flex 1.5

2006-04-23 Thread Stanislav Zayarsky



Matt, we are using 3rd party libraries like AS2lib, and it throws exceptions.
And also we starting to throw exceptions from our custom classes too.

Best regards
Stanislav

On 4/23/06, Matt Chotin [EMAIL PROTECTED] wrote:
 In 1.5 we don't throw exceptions as a practice, I'm not sure what you're
 actually running into here?

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Stanislav Zayarsky
 Sent: Saturday, April 22, 2006 7:52 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5

 Hello FlexCoders,

 I have the same problem!

 Adobe guys, can you help us?

 Best regards
 Stanislav

 On 4/21/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:
  Hi All!
 
  How to deal with uncaught exceptions in Flex 1.5? Actually they kill
  application running via terminating the current script.
 
  Due to the fact Flex application has a lot of entry points (each and
 every
  event handling delegate), I need either put try..catch..finally
 statements
  in each and every function assigned as an event handler that is wrong
 copy
  and paste method or create own Delegate class that is much more better
 by
  design.
 
  But on the other hand using the second approach force me not to assign
 event
  handlers in MXML (like mx:Button click=onClick()). Instead we need
 to
  assign those handlers in linked ActionScript class. It's very
 difficult when
  you deal with complex nested structures, repeaters, ViewStack,
 Accordion and
  their successors.
 
  Any suggestions?
 
  Thank you in advance.
 
  Regards, Sergey.
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
 


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








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














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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












[flexcoders] Re: Flex 2 Beta 2 - MenuBar events - no menuItem property

2006-04-23 Thread sof4real03



When the menu is defined in XML you need traverse the tree that way as
opposed to the way you were doing. It's in the Flex Application
Development PDF under Menu Controls. 

Thanks,
Sof

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

 That did it! Thank you!
 
 I was apparently going down the wrong path, because when I traced the
 event object itself, I was not seeing a menuItem property...so it's
 just magically there. Why would that property not show up?
 
 Cheers
 
 On 4/22/06, sof4real03 [EMAIL PROTECTED] wrote:
  Try accessing your label attribute as follows:
 
  [EMAIL PROTECTED] and then you should be able to retrieve the
  value.
 
  Let me know if tht works for you.
  -Sof
 
 
  --- In flexcoders@yahoogroups.com, Jordan Snyder jordan.lists@
  wrote:
  
   Hello,
  
   I'm using Flex 2 Beta 2, and I'm trying to catch MenuBar events.
  
   I've already been through the workarounds in order to display
E4X XML
   dataproviders correctly, ie, using showRoot=false,
   labelField=@label, etc.
  
   However, whenever a MenuBar event fires, the event object does not
   contain a menuItem property. I can trace the event object and see
   that it contains no menuItem. Here is my code, in case I've missed
   something silly.
  
  
  
   mx:Script![CDATA[
   import mx.managers.PopUpManager;
   import mx.controls.Menu;
   import mx.controls.MenuBar;
   import mx.events.MenuEvent;
  
  
   private function changeEvt(event:MenuEvent):void {
   flash.util.trace(crazy+event);
   if(event.menuItem.attributes.label == Settings...) {
   showSettings();
   }
   }
  
  
   private function showSettings():void {
   // Create the TitleWindow container.
   var settingsWindow:IFlexDisplayObject =
   PopUpManager.createPopUp(this,
   SettingsMenu, false);
   }
  
   ]]
   /mx:Script
  
  
  
   mx:MenuBar x=0 y=0 width=1024 height=20 id=FileBar
   change=changeEvt(event) labelField=@label showRoot=false
   mx:dataProvider
   mx:XML format=e4x
   menuitem label=File
   menuitem label=Exit /
   /menuitem
   menuitem label=Edit
   menuitem label=Mode
   menuitem label=** Mode/
   menuitem label=** Mode/
   /menuitem
   menuitem label=Users... /
   menuitem label=IP Address List... /
   menuitem label=Settings... /
   /menuitem
   menuitem label=View
   menuitem label=Logs... /
   menuitem label=Reports... /
   /menuitem
   menuitem label=Window
   menuitem label=*** /
   menuitem label=*** /
   /menuitem
   menuitem label=Help
   menuitem label=*** Help... /
   menuitem label=Support /
   menuitem label=Check for Updates... /
   menuitem label=About  /
   /menuitem
  
   /mx:XML
   /mx:dataProvider
  
   /mx:MenuBar
  
   The trace shows this:
  
   crazy[Event type=change bubbles=false cancelable=true
eventPhase=2]
  
  
  
   Is there a workaround? Is anyone getting MenuBar events to work in
  Beta 2?
  
 
 
 
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 











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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] how to make different border thickness/color

2006-04-23 Thread shemeshkale



hi,
i work on a Button but my question apply to all components..

how can i make each border side with different thickness and color??
for example:
border-top: 2px green;
border-right: 5px red;
border-bottom: 1px blue;
border-left: 4px white;

i couldnt find a way to do this with style nor a property.
is the only way is to write an AS class?
if so - how? (a sample code would be great)









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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Embedding the fonts of a Tab Label…

2006-04-23 Thread leo4beer



Embedding the fonts of a Tab Label…

Hi, I'm extending the TabBar class in order to make a vertical tab bar…
When I rotate a tab the fonts must be embedded otherwise they will not
appear.
Currently my main problem is embedding the fonts. 

I've tried embedding the font in various ways:


//child is a tab, I'm referring to it in a loop when overdding the
base class layoutChildren() method
child.labelPath.labelField.embedFonts = true;
//or
child.labelPath.setStyle(embedFonts, true);

both methods did not work and I'm unable to view the text…

Any ideas?

Thanks in advance.












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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue

2006-04-23 Thread Valy Sivec



Matt,I have  [RemoteClass(alias="org.ifm.model.PhoneNumber")] in the AS class. Am I missing something?.Thanks,ValyMatt Chotin [EMAIL PROTECTED] wrote:   Do you have a typed reference to your AS class so that it gets linked in?From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec Sent: Friday, April 21, 2006 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex2B2: JAVA to AS object serialization issueHello,I ran into something I woudn't expect to be a problem. Here is the story.Have a simple data object in Java that is passed to the Flash player via remote object call. I see in the log that the object type is what I expect to have but when I trace the object value via Alert message I get Object. I believe is something wrong but can't figure out what... Below is the Java class, the AS2 calss and also the message from the log. Am I missing something?  === JAVA CLASS ==package org.ifm.model; 
 import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder;  public class PhoneNumber implements Serializable {   private long phnuId;   private String phnuPt1Code;  private String phnuPhoneNumber;  private String phnuExtension;  private String phnuIsSource;  
 private Date phnuCreateTs;  private Date phnuUpdateTs;   private Long phnuIndiId;public PhoneNumber() {  }   public long getPhnuId() {  return this.phnuId;  }   public void setPhnuId(long phnuId) {  this.phnuId = phnuId;  }   public String
 getPhnuPt1Code() {  return this.phnuPt1Code;  }   public void setPhnuPt1Code(String phnuPt1Code) {  this.phnuPt1Code = phnuPt1Code;  }   public String getPhnuPhoneNumber() {  return this.phnuPhoneNumber;  }   public void setPhnuPhoneNumber(String phnuPhoneNumber) { 
 this.phnuPhoneNumber = phnuPhoneNumber;  }   public String getPhnuExtension() {  return this.phnuExtension;  }   public void setPhnuExtension(String phnuExtension) {  this.phnuExtension = phnuExtension;  }public Date getPhnuCreateTs() {  return this.phnuCreateTs;  }   public void setPhnuCreateTs(Date phnuCreateTs) {  this.phnuCreateTs = phnuCreateTs;  }   public Date getPhnuUpdateTs() {  return this.phnuUpdateTs;  }   public void setPhnuUpdateTs(Date phnuUpdateTs) {  this.phnuUpdateTs = phnuUpdateTs;  }public String getPhnuIsSource() {  return this.phnuIsSource;
  }   public void setPhnuIsSource(String phnuIsSource) {  this.phnuIsSource = phnuIsSource;  }   public String toString() {   return new ToStringBuilder(this)  .append("phnuId", getPhnuId())  .toString();  }   public Long getPhnuIndiId() { return phnuIndiId; }   
   public void setPhnuIndiId(Long phnuIndiId) { this.phnuIndiId = phnuIndiId; }public boolean equals(Object other) {  if ( !(other instanceof PhoneNumber) ) return false;  PhoneNumber castOther = (PhoneNumber) other;  return new EqualsBuilder()  .append(this.getPhnuId(), castOther.getPhnuId())  .isEquals();  }   public int hashCode() {  return new HashCodeBuilder()  .append(getPhnuId())  .toHashCode();  } }AS3 class  package org.ifm.model  {  [Bindable]  [RemoteClass(alias="org.ifm.model.PhoneNumber")]   public class PhoneNumber {   public function TlcPhoneNumber(){}  public var phnuId :
 Number;  public var phnuPt1Code : String;  public var phnuPhoneNumber : String;  public var phnuExtension : String;  public var phnuIsSource : String;  public var phnuCreateTs : Date;  public var phnuUpdateTs : Date;  public var phnuIndiId : Number;  public function toString() : String  {  var msg : String = "[***PHONE_NUMBER***PHNU_PHONE_NUMBER" + phnuPhoneNumber + "]";  return msg;   }  } }   [Flex] Adapter 'java-object' called 'org.ifm.business.AppFacade.findIndividualById([4339083])' [Flex] Result: '[EMAIL PROTECTED]' [Flex] Serializing AMF/HTTP response Version: 3  (Message #0 targetURI=/5/onResult, responseURI=)  (Typed Object #0 'flex.messaging.messages.AcknowledgeMessage')  destination = null  headers = (Object #1)  correlationId = "7C792757-AD11-2E1C-844E7E9F"  messageId = "39378036-8C0B-5897-38C2-CBDA80793946"  timeToLive = 0.0  timestamp = 1.145644502348E12  clientId = "39377FC3-CD0A-7DC0-F431-E58CC6883B8C"  body = (Typed Object #2 'org.ifm.model.TlcPhoneNumber')  phnuCreateTs = null  phnuIsSource = "WEB"  phnuUpdateTs = null  phnuPhoneNumber = "1231231234"  phnuIndiId = null  phnuPt1Code = null  phnuExtension = null  phnuId = 0.0When display it: Alert.show("Phone:"+ event.result, "Alert Box",Alert.OK);it shows Object, and I would expect to see something like that: "[***PHONE_NUMBER***PHNU_PHONE_NUMBER" + phnuPhoneNumber + "]";I don't
 see this hapening for other java objects I have.   

Re: [flexcoders] How would I do something like this....

2006-04-23 Thread Anatole Tartakovsky





Jeremi, 
 Agreed. Manipulation part 
(addNode, eventsetc) threw me off as it seemed that you wanted 
Tree API and DataGrid-like cell renderer. Very nice control.
Regards,
Anatole


  - Original Message - 
  From: 
  jeremy lu 

  To: flexcoders@yahoogroups.com 
  Sent: Sunday, April 23, 2006 2:41 
AM
  Subject: Re: [flexcoders] How would I do 
  something like this
  hi 
  Anatole,I'm talking about datagrid too, never thought about extending 
  tree and add in those function. (especially in flex 2 the implementation 
  changed a lot).I should add this to my original post:if what 
  the user want is providing a *view* into the hierarchy data, then a simple 
  item renderer inside first column of the datagrid should do the trick, this 
  should just take 2-3 days.but the project I'm working on (which will 
  be public in the end of May) requires the capability to let user manipulate 
  those nodes (add/remove/rename/drag-drop/cut/copy/paste), which made it a lot 
  complex then I original thought. (acutally what you said is what I thought it 
  should be in the beginning - that weekend when I started prototyping - but 
  after digging into it I found that's totally another 
  story)jeremy.
  On 4/23/06, Anatole 
  Tartakovsky [EMAIL PROTECTED] wrote:
  

Jeremy,
 Actually,I was not 
suggesting to rewrite UI/datagrid - I was suggesting not to use tree 
-datagrid would work fine the way it is now. The changes to 
datagridwould be very"localized":just sorting to take in 
consideration the hierarchy (essentially making sure you have custom sort 
function based on parent precedingcolumn sort), minor changes 
like making sure first column locking works, etc. In either case the code is 
based on datagrid and not on the tree, with opening/closing of the nodes 
based upon filtering of the data, add custom renderer to the first column to 
paint / outdent first label and integrate it with filter 
function.
 Quick and dirty approach 
allows you to do most of that code inline within the mxml/data definition 
itself doing the above code explicitly.

Thank you,
Anatole

PS. Obviously, disabling sorting or column 
reordering would further simplify the task.


- Original Message - 


From: 
jeremy lu 
To: 
flexcoders@yahoogroups.com 

Sent: 
Saturday, April 22, 2006 11:14 PM
Subject: 
Re: [flexcoders] How would I do something like this
well, just flip 
thru my gridtree component (http://tinyurl.com/grcfs) 
developed two months ago (which is still in a mess), it's around 2000 lines 
of code (after refactoring it three times) and lot of algorithm behind to 
handle following 
function:addNoderemoveNodecutNodecopyNodepasteNodeindent/outdent 
codeI think the first methods Anatole mentioned will definitely be a 
b***h to tackel with, for the nature of List-based component is a little bit 
tricky then it looks (all the list items are dynamically generated and draw 
on the screen, this will cause some trouble)I'm currently 
implementing gridtree using item renderer for the first column, it's pretty 
much the same work to extends gridbase and "inject" the tree grid code into 
it so the API would be more compatible, by using this method I could easily 
feed a non-xml structure (ie:resultset from java/php) to the component and 
let it draw the hierarchy and set indent/outdent of each node.now 
I'm thinking maybe I should draw those lines and plus sign instead of a 
simple arrowhead, so it's more like VS2005 :-)FYI, the 
component took a whole weekend for prototyping and concept-proofing, 
*but*, it took almost one and a half month for debugging and refactoring to 
stablize the code and become really usable in the on-going 
product/project.originally I want to open-source the component but 
later on this become one of my assigned day-job project (so I can 
fulltime developing it with the approval of my employer), but anyway, I 
would love to answer any related questions.jeremy.
On 4/23/06, Anatole 
Tartakovsky [EMAIL PROTECTED] wrote: 

  
  Depends on your requirements:
  For generic caseit is 3 step 
  process:
  1. Wait for beta 3 that supposely comes with 
  the source code.
  2. Study the code for data grid header, 
  treeview, datagrid, etc
  3. Write your own code for the 
  controlinherited on the topof BaseGrid, with automatic wrapper 
  for the first column - 1500-2000 lines in total to support generic 
  case
  
  For quick and dirty :
  Create first column as cell renderer. I 
  believe I posted code in this group for Flex 1.5 tree cell renderer that 
  allowed to add nodes lines to the regular tree - you just paint it within 
  item - still about 200 lines of code for core 

Re: [flexcoders] Flex2B2: JAVA to AS object serialization issue

2006-04-23 Thread Carlos Rovira



AFAIK, this is a bug in the Flash Player 8.5 beta 2But some people on this list report some days ago that beta 3 fix that issueOn 4/23/06, 
Valy Sivec [EMAIL PROTECTED] wrote:



Matt,I have  [RemoteClass(alias=org.ifm.model.PhoneNumber)] in the AS class. Am I missing something?.Thanks,Valy
Matt Chotin [EMAIL PROTECTED] wrote:
   Do you have a typed reference to your AS class so that it gets linked in?
  
  From:
 flexcoders@yahoogroups.com
 [mailto:flexcoders@yahoogroups.com] On Behalf Of Valy Sivec
 Sent: Friday, April 21, 2006 11:59 AM To: 
flexcoders@yahoogroups.com Subject: [flexcoders] Flex2B2: JAVA to AS object serialization issue
Hello,  
  I ran into something I woudn't expect to be a problem. Here is the story.
Have a simple data object in Java that is passed to the Flash player via remote object call. I see in the log that the object type is what I expect to have but when I trace the object value via Alert message I get Object. 

I believe is something wrong but can't figure out what... Below is the Java class, the AS2 calss and also the message from the log. Am I missing something?  

=== JAVA CLASS ==
package org.ifm.model; 
 import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder
; import org.apache.commons.lang.builder.ToStringBuilder;  public class PhoneNumber implements Serializable {
   private long phnuId;   private String phnuPt1Code;  private String phnuPhoneNumber;  private String phnuExtension;
  private String phnuIsSource;  
 private Date phnuCreateTs;  private Date phnuUpdateTs;   private Long phnuIndiId;public PhoneNumber() {  }  
 public long getPhnuId() {  return this.phnuId;  }   public void setPhnuId(long phnuId) {
  this.phnuId = phnuId;  }   public String
 getPhnuPt1Code() {  return this.phnuPt1Code;  }   public void setPhnuPt1Code(String phnuPt1Code) {
  this.phnuPt1Code = phnuPt1Code;  }   public String getPhnuPhoneNumber() {  return 
this.phnuPhoneNumber;  }   public void setPhnuPhoneNumber(String phnuPhoneNumber) { 
 this.phnuPhoneNumber = phnuPhoneNumber;  }   public String getPhnuExtension() {  return this.phnuExtension
;  }   public void setPhnuExtension(String phnuExtension) {  this.phnuExtension = phnuExtension;
  }public Date getPhnuCreateTs() {  return this.phnuCreateTs;  }  
 public void setPhnuCreateTs(Date phnuCreateTs) {  this.phnuCreateTs = phnuCreateTs;  }   public Date getPhnuUpdateTs() {
  return this.phnuUpdateTs;  }   public void setPhnuUpdateTs(Date phnuUpdateTs) {  
this.phnuUpdateTs = phnuUpdateTs;  }public String getPhnuIsSource() {  return this.phnuIsSource;
  }   public void setPhnuIsSource(String phnuIsSource) {  this.phnuIsSource = phnuIsSource;
  }   public String toString() {   return new ToStringBuilder(this)  .append(phnuId, getPhnuId())
  .toString();  }   public Long getPhnuIndiId() { return phnuIndiId; }   
   public void setPhnuIndiId(Long phnuIndiId) { this.phnuIndiId = phnuIndiId; }   
 public boolean equals(Object other) {  if ( !(other instanceof PhoneNumber) ) return false;  PhoneNumber castOther = (PhoneNumber) other;  return new EqualsBuilder()
  .append(this.getPhnuId(), castOther.getPhnuId())  .isEquals();  }   public int hashCode() {  return new HashCodeBuilder()  .append(getPhnuId())  .toHashCode();  } }
AS3 class  package org.ifm.model  {  [Bindable]  [RemoteClass(alias=org.ifm.model.PhoneNumber)] 
  public class PhoneNumber {   public function TlcPhoneNumber(){}  public var phnuId :
 Number;  public var phnuPt1Code : String;  public var phnuPhoneNumber : String;  public var phnuExtension : String;  public var phnuIsSource : String;  public var phnuCreateTs : Date;
  public var phnuUpdateTs : Date;  public var phnuIndiId : Number;  public function toString() : String  {  var msg : String = [***PHONE_NUMBER***PHNU_PHONE_NUMBER + phnuPhoneNumber + ];
  return msg;   }  } }   [Flex] Adapter 'java-object' called '
org.ifm.business.AppFacade.findIndividualById([4339083])' [Flex] Result: '[EMAIL PROTECTED]'
 [Flex] Serializing AMF/HTTP response Version: 3  (Message #0 targetURI=/5/onResult, responseURI=)  (Typed Object #0 'flex.messaging.messages.AcknowledgeMessage')  destination = null  headers = (Object #1)
  correlationId = 7C792757-AD11-2E1C-844E7E9F  messageId = 39378036-8C0B-5897-38C2-CBDA80793946  timeToLive = 0.0  timestamp = 1.145644502348E12  clientId = 39377FC3-CD0A-7DC0-F431-E58CC6883B8C
  body = (Typed Object #2 'org.ifm.model.TlcPhoneNumber')  phnuCreateTs = null
  phnuIsSource = WEB  phnuUpdateTs = null  phnuPhoneNumber = 1231231234  phnuIndiId = null  phnuPt1Code = null  phnuExtension = null
  phnuId = 0.0When display it: Alert.show(Phone:+ event.result, Alert Box,Alert.OK);  
  
it shows Object, 

[flexcoders] Caurngorm 2 - where to deal with system events?

2006-04-23 Thread Andrea Varga



Hi All!

I have to mention that I'm new to Cairngorm and Flex.
What is best practice to deal with system events (or whatever the events 
that are not dispatched by a user gesture are called)?
For example: after a successful user login I have to display a list of 
products (list loded from the server).
So, I have a login form in a component: Login.mxml, where I have a 
dispatch for the LoginEvent = the LoginCommand takes care of it... 
(goes to server etc.), the onResult method in the LoginCommand is 
called. If the login was successful, I set the 
ModelLocator.applicationState to the new state, the view is binded to 
that, so now I have the correct view (with a datagrid for example), and 
now I need the list of the products.
But for that, I need the list of the products = the 
ProductListGetCommand must be executed which means, that somebody has to 
dispatch an event for that, but there is no user gesture here.
Where should I place the code for dispathing the event?
Or, is my whole logic correct?

My only idea here is to place it in LoginCommand.onResult?

I have tried that:
var tmpEvent:ProductListGetEvent = new ProductListGetEvent();
dispatchEvent( tmpEvent );
I got the error: Call to a possibly undefined method 'dispatchEvent'

That's why I think this might not be the right place.


I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not 
reallt relevant here.

Thanks
Andi








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Caurngorm 2 - where to deal with system events?

2006-04-23 Thread Alex Uhlmann



Hi Andi,

You can certainly call another Command in the onResult of your
LoginCommand. But since a Command class in not on the display list,
events wouldn't make it to Cairngorm's FrontController. You have to use
mx.core.Application.application.dispatchEvent. Darron Schall has a nice
explanation of it here:
http://www.darronschall.com/weblog/archives/000224.cfm

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrea Varga
Sent: 23 April 2006 11:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Caurngorm 2 - where to deal with system events?

Hi All!

I have to mention that I'm new to Cairngorm and Flex.
What is best practice to deal with system events (or whatever the events
that are not dispatched by a user gesture are called)?
For example: after a successful user login I have to display a list of
products (list loded from the server).
So, I have a login form in a component: Login.mxml, where I have a
dispatch for the LoginEvent = the LoginCommand takes care of it... 
(goes to server etc.), the onResult method in the LoginCommand is
called. If the login was successful, I set the
ModelLocator.applicationState to the new state, the view is binded to
that, so now I have the correct view (with a datagrid for example), and
now I need the list of the products.
But for that, I need the list of the products = the
ProductListGetCommand must be executed which means, that somebody has to
dispatch an event for that, but there is no user gesture here.
Where should I place the code for dispathing the event?
Or, is my whole logic correct?

My only idea here is to place it in LoginCommand.onResult?

I have tried that:
var tmpEvent:ProductListGetEvent = new ProductListGetEvent();
dispatchEvent( tmpEvent ); I got the error: Call to a possibly undefined
method 'dispatchEvent'

That's why I think this might not be the right place.


I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not
reallt relevant here.

Thanks
Andi




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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












Re: [flexcoders] Caurngorm 2 - where to deal with system events?

2006-04-23 Thread JesterXL



You don't need that if you are using Cairngorm's EventBroadcaster; it has 
nothing to do with DisplayObjects. Simply do what Alex suggested in the 
result of your Command, do:

EventBroadcaster.getInstance().broadcastEvent ( Event.YOUR_EVENT, {param: 
value});

- Original Message - 
From: Alex Uhlmann [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, April 23, 2006 12:03 PM
Subject: RE: [flexcoders] Caurngorm 2 - where to deal with system events?


Hi Andi,

You can certainly call another Command in the onResult of your
LoginCommand. But since a Command class in not on the display list,
events wouldn't make it to Cairngorm's FrontController. You have to use
mx.core.Application.application.dispatchEvent. Darron Schall has a nice
explanation of it here:
http://www.darronschall.com/weblog/archives/000224.cfm

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrea Varga
Sent: 23 April 2006 11:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Caurngorm 2 - where to deal with system events?

Hi All!

I have to mention that I'm new to Cairngorm and Flex.
What is best practice to deal with system events (or whatever the events
that are not dispatched by a user gesture are called)?
For example: after a successful user login I have to display a list of
products (list loded from the server).
So, I have a login form in a component: Login.mxml, where I have a
dispatch for the LoginEvent = the LoginCommand takes care of it...
(goes to server etc.), the onResult method in the LoginCommand is
called. If the login was successful, I set the
ModelLocator.applicationState to the new state, the view is binded to
that, so now I have the correct view (with a datagrid for example), and
now I need the list of the products.
But for that, I need the list of the products = the
ProductListGetCommand must be executed which means, that somebody has to
dispatch an event for that, but there is no user gesture here.
Where should I place the code for dispathing the event?
Or, is my whole logic correct?

My only idea here is to place it in LoginCommand.onResult?

I have tried that:
var tmpEvent:ProductListGetEvent = new ProductListGetEvent();
dispatchEvent( tmpEvent ); I got the error: Call to a possibly undefined
method 'dispatchEvent'

That's why I think this might not be the right place.


I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not
reallt relevant here.

Thanks
Andi




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








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











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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Flex 15 - Debugging Java Remote Objects?

2006-04-23 Thread thunderstumpgesatwork




Guys,

I found this article for Flex 2 about debugging your server-side
Remote Objects. Is there something similar for Flex 15? Would these
steps apply to Flex 15?

http://labs.macromedia.com/wiki/index.php/Flex_Enterprise_Services:Debugging


I'm having problems with some JDBC calls, and I can't seem to narrow
it down. 

Thanks,
Thunder









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Matt Chotin



It's been a while since I thought about it, someone might have posted
bug fixes to it or have their own version. Larger point is he'll need
to do a copy :-)

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stanislav Zayarsky
Sent: Sunday, April 23, 2006 3:39 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 1.5 - getrepeaterItem values

Matt, you know that mx.utils.ObjectCopy doesn't work properly.

Best regards
Stanislav

On 4/23/06, Matt Chotin [EMAIL PROTECTED] wrote:



 You'll need to make your own copy of the object, AS is always pass by
 reference.



 You can try calling mx.utils.ObjectCopy.copy(yourobj) and it may give
you
 back a copy with what you want.



 Matt


 


 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Michael Griffin
 Sent: Saturday, April 22, 2006 3:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 1.5 - getrepeaterItem values





 I have a small app which passes the reference to a repeater item to an
 editable view. I have been trying to assign the values from the
original
 repeater dataProvider item into a new array that can then be edited
without
 affecting the original data until explicitly saved. The problem is
that
 every combination I've tried is still updating the repeater data so
I'm
 pretty sure I'm just assigning references instead of copying the
values
 over. A simplified version of the code follows:


 //positionVO has an array of names called Successors


 var editablePosition:positionVO;





 //currentPosition is the repeater item that got clicked in the main UI


 function setEditableDetails(currentPosition)
 {

 editablePosition.Successors =
 currentPosition.getRepeaterItem().Successors;



 //also tried creating editablePosition variable as a new
positionVO


 //editSuccessorsList should now be able to have items added to it
 without adding them to the original currentPosition data as well


 //with this code the repeater view is still bound to
editSuccessorList's
 dataProvider new items are added to both lists





 editSuccessorsList.dataProvider = editablePosition.Successors;



 }


 If anyone can advise on what I'm doing wrong in the previous example a
nudge
 in the right direction would be appreciated.





 Many thanks in advance.





 Mike




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


 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

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

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date:
4/20/2006
 
 YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

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

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date:
4/20/2006





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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue

2006-04-23 Thread Matt Chotin










Make sure that somewhere in your code (a
class that you know is working already) you have a var of type
org.ifm.model.PhoneNumber, not just the RemoteClass declaration.  Or theres
a compiler argument called include-classes I think that you could use to make
sure it gets included, youd need to check the docs for that.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec
Sent: Sunday, April 23, 2006 7:46
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex2B2:
JAVA to AS object serialization issue





Matt,

I have  [RemoteClass(alias=org.ifm.model.PhoneNumber)] in
the AS class. Am I missing something?.

Thanks,
Valy

Matt Chotin
[EMAIL PROTECTED] wrote:



Do you have a typed reference to your AS
class so that it gets linked in?



















From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec
Sent: Friday, April 21, 2006 11:59
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex2B2:
JAVA to AS object serialization issue















Hello,



















I ran into something I woudn't expect to be a problem. Here is the
story.



















Have a simple data object in Java that is passed to the Flash player
via remote object call. I see in the log that the object type is what I expect
to have but when I trace the object value via Alert message I get Object. 



















I believe is something wrong but can't figure out what... Below is the
Java class, the AS2 calss and also the message from the log. Am I missing
something?





























=== JAVA CLASS ==



















package org.ifm.model;









import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;









public class PhoneNumber implements Serializable {









 private long phnuId; 
 private String phnuPt1Code;
 private String phnuPhoneNumber;
 private String phnuExtension;
 private String phnuIsSource; 
 private Date phnuCreateTs;
 private Date phnuUpdateTs; 
 private Long phnuIndiId;
 
 public PhoneNumber() {
 }









 public long getPhnuId() {
 return this.phnuId;
 }









 public void setPhnuId(long phnuId) {
 this.phnuId = phnuId;
 }









 public String getPhnuPt1Code() {
 return this.phnuPt1Code;
 }









 public void setPhnuPt1Code(String phnuPt1Code) {
 this.phnuPt1Code = phnuPt1Code;
 }









 public String getPhnuPhoneNumber() {
 return this.phnuPhoneNumber;
 }









 public void setPhnuPhoneNumber(String
phnuPhoneNumber) {
 this.phnuPhoneNumber =
phnuPhoneNumber;
 }









 public String getPhnuExtension() {
 return this.phnuExtension;
 }









 public void setPhnuExtension(String phnuExtension) {
 this.phnuExtension = phnuExtension;
 }
 
 public Date getPhnuCreateTs() {
 return this.phnuCreateTs;
 }









 public void setPhnuCreateTs(Date phnuCreateTs) {
 this.phnuCreateTs = phnuCreateTs;
 }









 public Date getPhnuUpdateTs() {
 return this.phnuUpdateTs;
 }









 public void setPhnuUpdateTs(Date phnuUpdateTs) {
 this.phnuUpdateTs = phnuUpdateTs;
 }
 
 public String getPhnuIsSource() {
 return this.phnuIsSource;
 }









 public void setPhnuIsSource(String phnuIsSource) {
 this.phnuIsSource = phnuIsSource;
 }









 public String toString() { 
 return new ToStringBuilder(this)

.append(phnuId, getPhnuId())
 .toString();
 }
 
public Long getPhnuIndiId() {
return phnuIndiId;
}









public void setPhnuIndiId(Long phnuIndiId) {
this.phnuIndiId = phnuIndiId;
} 









 public boolean equals(Object other) {
 if ( !(other instanceof PhoneNumber)
) return false;
 PhoneNumber castOther =
(PhoneNumber) other;
 return new EqualsBuilder()

.append(this.getPhnuId(), castOther.getPhnuId())
 .isEquals();
 }










public int hashCode() {
 return new HashCodeBuilder()

.append(getPhnuId())

.toHashCode();
 }
}










 AS3 class
 package org.ifm.model
 {
 [Bindable]
 [RemoteClass(alias=org.ifm.model.PhoneNumber)] 
 public class PhoneNumber {









 public function TlcPhoneNumber(){}
 public var phnuId : Number;
 public var phnuPt1Code : String;
 public var phnuPhoneNumber : String;
 public var phnuExtension : String;
 public var phnuIsSource : String;
 public var phnuCreateTs : Date;
 public var phnuUpdateTs : Date;
 public var phnuIndiId : Number;
 public
function toString() : String
 {
 var msg : String =
[***PHONE_NUMBER***PHNU_PHONE_NUMBER + phnuPhoneNumber +
];
 return msg; 
 }
 }
}










[Flex] Adapter 'java-object' called
'org.ifm.business.AppFacade.findIndividualById([4339083])'
[Flex] Result: '[EMAIL PROTECTED]'
[Flex] Serializing AMF/HTTP response
Version: 3
 (Message #0 targetURI=/5/onResult, responseURI=)
 (Typed Object #0
'flex.messaging.messages.AcknowledgeMessage')
 destination = null
 headers = (Object #1)
 correlationId = 7C792757-AD11-2E1C-844E7E9F
 messageId =

RE: [flexcoders] Uncaught exceptions in Flex 1.5

2006-04-23 Thread Matt Chotin



I see, the same problem exists in 2.0 I guess too (though I've asked
internally about it to make sure). Only thing I can recommend is you
try to centralize your entry points. If you use a framework like
Cairngorm you can do that in the framework by catching errors in the
broadcaster or some main method that triggers your service handlers.

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Stanislav Zayarsky
Sent: Sunday, April 23, 2006 3:45 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5

Matt, we are using 3rd party libraries like AS2lib, and it throws
exceptions.
And also we starting to throw exceptions from our custom classes too.

Best regards
Stanislav

On 4/23/06, Matt Chotin [EMAIL PROTECTED] wrote:
 In 1.5 we don't throw exceptions as a practice, I'm not sure what
you're
 actually running into here?

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Stanislav Zayarsky
 Sent: Saturday, April 22, 2006 7:52 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5

 Hello FlexCoders,

 I have the same problem!

 Adobe guys, can you help us?

 Best regards
 Stanislav

 On 4/21/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:
  Hi All!
 
  How to deal with uncaught exceptions in Flex 1.5? Actually they kill
  application running via terminating the current script.
 
  Due to the fact Flex application has a lot of entry points (each
and
 every
  event handling delegate), I need either put try..catch..finally
 statements
  in each and every function assigned as an event handler that is
wrong
 copy
  and paste method or create own Delegate class that is much more
better
 by
  design.
 
  But on the other hand using the second approach force me not to
assign
 event
  handlers in MXML (like mx:Button click=onClick()). Instead we
need
 to
  assign those handlers in linked ActionScript class. It's very
 difficult when
  you deal with complex nested structures, repeaters, ViewStack,
 Accordion and
  their successors.
 
  Any suggestions?
 
  Thank you in advance.
 
  Regards, Sergey.
 
 
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
 


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








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










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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Flex 15 - Debugging Java Remote Objects?

2006-04-23 Thread Matt Chotin



Yep, there are just different JARs you might need to put into your path
for Flex 1.5 vs. 2.0 like the gateway. Look in the same locations,
web-inf/lib and play around, it shouldn't be too bad to get it going.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thunderstumpgesatwork
Sent: Sunday, April 23, 2006 10:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 15 - Debugging Java Remote Objects?


Guys,

I found this article for Flex 2 about debugging your server-side
Remote Objects. Is there something similar for Flex 15? Would these
steps apply to Flex 15?

http://labs.macromedia.com/wiki/index.php/Flex_Enterprise_Services:Debug
ging


I'm having problems with some JDBC calls, and I can't seem to narrow
it down. 

Thanks,
Thunder





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



 









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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Embedding the fonts of a Tab Label.

2006-04-23 Thread Matt Chotin



Have you made sure the font is truly embedded, using one of the
techniques mentioned in the docs?

E.g., http://livedocs.macromedia.com/labs/1/flex20beta2/1052.html



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of leo4beer
Sent: Sunday, April 23, 2006 6:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Embedding the fonts of a Tab Label...

Embedding the fonts of a Tab Label...

Hi, I'm extending the TabBar class in order to make a vertical tab
bar...
When I rotate a tab the fonts must be embedded otherwise they will not
appear.
Currently my main problem is embedding the fonts. 

I've tried embedding the font in various ways:


//child is a tab, I'm referring to it in a loop when overdding the
base class layoutChildren() method
child.labelPath.labelField.embedFonts = true;
//or
child.labelPath.setStyle(embedFonts, true);

both methods did not work and I'm unable to view the text...

Any ideas?

Thanks in advance.








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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex 1.5 - getrepeaterItem values

2006-04-23 Thread Michael Griffin
Title: Message





Thanks 
MattI thought that was the case. 

I had 
tried ObjectCopy, but couldn't get it to work. A few hours after I posted 
the cry for help I refound Darron's object copy script on his blog which did the 
trick. Just in case anyone else hits their head on the same problem here's 
the link again for reference: http://www.darronschall.com/weblog/archives/000148.cfm

Thanks 
again.

Mike

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Matt ChotinSent: Sunday, April 23, 2006 3:06 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Flex 1.5 - 
  getrepeaterItem values
  
  You’ll need to make 
  your own copy of the object, AS is always pass by 
  reference.
  
  You can try calling 
  mx.utils.ObjectCopy.copy(yourobj) and it may give you back a copy with what 
  you want.
  
  Matt
  
  
  
  
  
  From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael GriffinSent: Saturday, April 22, 2006 3:50 
  PMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Flex 1.5 - 
  getrepeaterItem values
  
  
  I havea small 
  app which passes the reference to a repeater item to an editable view. I 
  have been trying to assign the values from the original repeater dataProvider 
  item into a newarray that can then be edited without affecting the 
  original data until explicitly saved. The problem is that every 
  combination I've tried is still updating the repeater data so I'm pretty sure 
  I'm just assigning references instead of copying the values over. A 
  simplified version of the code follows:
  

//positionVO has an 
array of names called Successors

var 
editablePosition:positionVO;



//currentPosition 
is the repeater item that got clicked in the main UI 


function 
setEditableDetails(currentPosition){ 
editablePosition.Successors = 
currentPosition.getRepeaterItem().Successors;

 
//also tried creating editablePosition variable as a new 
positionVO

 
//editSuccessorsList should now be able to have items added to it without 
adding them to the original currentPosition data as 
well

 //with this code 
the repeater view is still bound to editSuccessorList's dataProvider 
newitems are added to both lists

 


 
editSuccessorsList.dataProvider = 
editablePosition.Successors;

 
}
  
  If anyone can advise 
  on what I'm doing wrong in theprevious example a nudge in the right 
  direction would be appreciated. 
  
  
  
  Many thanks in 
  advance.
  
  
  
  Mike
  
  --No virus found in this outgoing message.Checked by 
  AVG Free Edition.Version: 7.1.385 / Virus Database: 268.4.4/320 - Release 
  Date: 4/20/2006
  --No virus found in this incoming message.Checked by 
  AVG Free Edition.Version: 7.1.385 / Virus Database: 268.4.4/320 - Release 
  Date: 4/20/2006





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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.4/320 - Release Date: 4/20/2006
 


[flexcoders] Flex 1.5 Box container component that wraps?

2006-04-23 Thread Andrew D. Goodfellow



We're all super familiar with the HBox and VBox containers. Has anyone
extended one of these to get a wrapping behavior? Almost like an
HVBox? :) I want to create a tag cloud using Link components to look
like: http://www.flickr.com/photos/tags/ I don't think Grid or Tile
will give me the functionality I'm looking for because it will be
really hard to cluster them up together when they have differing
heights and widths.

I guess I'm looking for some suggestions for the best way to tackle
it. Anyone have any? Thanks in advance...

-Andy






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












[flexcoders] Re: Flex 15 - Debugging Java Remote Objects?

2006-04-23 Thread thunderstumpgesatwork



Thanks, I did eventually get it going.

Thunder

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

 Yep, there are just different JARs you might need to put into your path
 for Flex 1.5 vs. 2.0 like the gateway. Look in the same locations,
 web-inf/lib and play around, it shouldn't be too bad to get it going.
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of thunderstumpgesatwork
 Sent: Sunday, April 23, 2006 10:20 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 15 - Debugging Java Remote Objects?
 
 
 Guys,
 
 I found this article for Flex 2 about debugging your server-side
 Remote Objects. Is there something similar for Flex 15? Would these
 steps apply to Flex 15?
 
 http://labs.macromedia.com/wiki/index.php/Flex_Enterprise_Services:Debug
 ging
 
 
 I'm having problems with some JDBC calls, and I can't seem to narrow
 it down. 
 
 Thanks,
 Thunder
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links












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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Flex1.5 - Info about XML object and working with XML in Actionscript?

2006-04-23 Thread thunderstumpgesatwork



Hi all,

I've come to realize how much more complete the Flex 2 documentation
seems than the Flex 1.5 documentation...

I'm looking for Flex1.5 documentation on XML objects and working with
XML. That or I need some help converting an XML object that is
returned from a RemoteObject call into an ActionScript Object. I know
there's functionality that does this for web-service results, and
mx:Model tags that reference an XML file source can I tap into that?

Any guidance as to where additional documentation can be found is
greatly appreciated. I have looked through the Developing Flex
Applications help library that comes with FlexBuilder 1.5, as well as
the ActionScript/MXML Language reference for Flex 1.5... neither seem
to discuss how to use XML objects, or suggest how I might convert the
XML to an Object.

Thanks,
Thunder









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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] File - flexcodersFAQ.txt

2006-04-23 Thread flexcoders

 Flexcoders Frequently Asked Questions
  Last Updated: 30th May 2005

 Contributors:

Matt Chotin, Steven Webster, Alistair McLeod, Tariq Ahmed, Jeff Tapper,
 Peter Farland, Abdul Qabiz, Tracy Spratt, Jesse Warden, Dan Harfleet,
  Manish Jethani, Dimitrios Gianninas


1. What is Flexcoders?
2. How does Flexcoders relate to the Macromedia Flex Forum on
   www.macromedia.com?
3. Who posts to Flexcoders?
4. Resources to check before asking a question
5. Guidelines for effective question-asking
6. FAQ


1. What is Flexcoders?

Flexcoders is a forum where developers can ask questions about Flex,
FlexBuilder, and Flex-related technologies (like Cairngorm, FlexUnit and
SynergyFLEX).  The community is made up of everyday Flex developers as
well as Macromedia employees. However, this is not an official
Macromedia-sponsored forum, it is actually moderated by the folks at
iteration::two, a consultancy responsible for authoring the book
Developing Rich Internet Applications with Macromedia Flex.


2. How does Flexcoders relate to the Macromedia Flex Forum on
   www.macromedia.com?

Both the Macromedia Flex Forum and Flexcoders provide help on issues
related to Flex, and neither is an official support mechanism.  Some
people monitor both forums, some only one.  It is up to you to decide
where you might have a better experience getting a question answered and
being able to subsequently help others.


3. Who posts to Flexcoders?

Everyone who has a question or an answer.  Many members of the Flex
development team read and respond to Flexcoders as well as other
Macromedia folks who monitor the community.

Some recurring Macromedia folks are:

David Mendels: EVP and GM, highest-level executive in charge of Flex.
Lucian Beebe: Sr. Product Manager, Flex. Matt Chotin, Manish Jethani,
Abdul Qabiz, Gordon Smith, Peter Farland and many more: Engineers on
Flex.

Active community members include:

Steven Webster (Technical Director at iteration::two and co-author of
Developing Rich Clients with Macromedia Flex), Alistair McLeod
(Development Director at iteration::two and co-author of Developing Rich
Clients with Macromedia Flex), Jesse Warden (JesterXL - Flash badass
playing with Flex), Tracy Spratt (long-time member, holder of all
knowledge related to 32K limits), Jeff Steiner (maintainer of
www.flexauthority.com), Tariq Ahmed (maintainer of www.cflex.net), Jimmy
Gianninas (long-time member, developer at Optimal Payments).

And so many more!


4. Resources to check before asking a question

The Flexcoders Mail Archive (better searching than YahooGroups):
http://www.mail-archive.com/flexcoders%40yahoogroups.com

http://www.cflex.net/showfaq.cfm
http://livedocs.macromedia.com/flex/15/asdocs_en/index.html
http://www.macromedia.com/go/flex15_java_livedocs
http://www.macromedia.com/cfusion/knowledgebase/index.cfm
http://www.cflex.net http://www.flexauthority.com
http://www.macromedia.com/devnet/flex http://coenraets.com
http://weblogs.macromedia.com/mxna/ http://www.google.com 

The Book Developing Rich Clients with Macromedia Flex (check your
favorite bookstore)



5. Guidelines to effective question-asking

Include a useful subject; this will help people find their own questions
and answers later.

Explain what you are trying to accomplish.

Explain the error (include compilation errors or a description of the
runtime behavior).

Be prepared to break your problem down into a simpler scenario in case
someone wants to try to debug the code themselves.  Remember, private
web services are inaccessible; you may need to create some dummy data to
emulate problems.

Phrases to avoid:

URGENT (we all have deadlines, no one is intentionally delaying a
response to you)

Please send code (this is very frustrating to read as it implies you
aren't interested in learning anything on your own.  Where code is
appropriate you can expect someone to provide it, but in many cases you
will learn more by doing it on your own with appropriate guidance.  It
may be that you're on a deadline and just want to finish, but many of
those who respond regularly would prefer to teach you to fish so that
you can answer your own questions next time and even help out others).


6. Mini-FAQ



Q: Can I mail Matt, Manish, Abdul, Pete, Gordon, iteration::two, or
anyone else for that matter off-line with my question?

A: Please don't!  If someone is capable of answering your question on-
list please believe that it will be done.  Everyone on the list has
full-time jobs doing their own work and often answer flexcoders on their
own time; mailing them off- list doesn’t endear you to them.  If no one
answers on-list in a reasonable amount of time (24 hours) you can try to
rephrase the question and perhaps include more detail (including a
version of the problem that someone can run without doing any setup on
their own 

Re: [flexcoders] Caurngorm 2 - where to deal with system events?

2006-04-23 Thread Andrea Varga



I have read that using EventBroadcaster is deprecated in Cairngorm 2, 
instead the built in dispatchEvent() should be used:
http://weblogs.macromedia.com/swebster/archives/2006/02/index.cfm

OT - My messages appear with several hours delay on the list. Does 
anyone know why?

Andi

JesterXL wrote:

You don't need that if you are using Cairngorm's EventBroadcaster; it has 
nothing to do with DisplayObjects. Simply do what Alex suggested in the 
result of your Command, do:

EventBroadcaster.getInstance().broadcastEvent ( Event.YOUR_EVENT, {param: 
value});

- Original Message - 
From: Alex Uhlmann [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Sunday, April 23, 2006 12:03 PM
Subject: RE: [flexcoders] Caurngorm 2 - where to deal with system events?


Hi Andi,

You can certainly call another Command in the onResult of your
LoginCommand. But since a Command class in not on the display list,
events wouldn't make it to Cairngorm's FrontController. You have to use
mx.core.Application.application.dispatchEvent. Darron Schall has a nice
explanation of it here:
http://www.darronschall.com/weblog/archives/000224.cfm

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrea Varga
Sent: 23 April 2006 11:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Caurngorm 2 - where to deal with system events?

Hi All!

I have to mention that I'm new to Cairngorm and Flex.
What is best practice to deal with system events (or whatever the events
that are not dispatched by a user gesture are called)?
For example: after a successful user login I have to display a list of
products (list loded from the server).
So, I have a login form in a component: Login.mxml, where I have a
dispatch for the LoginEvent = the LoginCommand takes care of it...
(goes to server etc.), the onResult method in the LoginCommand is
called. If the login was successful, I set the
ModelLocator.applicationState to the new state, the view is binded to
that, so now I have the correct view (with a datagrid for example), and
now I need the list of the products.
But for that, I need the list of the products = the
ProductListGetCommand must be executed which means, that somebody has to
dispatch an event for that, but there is no user gesture here.
Where should I place the code for dispathing the event?
Or, is my whole logic correct?

My only idea here is to place it in LoginCommand.onResult?

I have tried that:
var tmpEvent:ProductListGetEvent = new ProductListGetEvent();
dispatchEvent( tmpEvent ); I got the error: Call to a possibly undefined
method 'dispatchEvent'

That's why I think this might not be the right place.


I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not
reallt relevant here.

Thanks
Andi




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








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







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



 

 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue

2006-04-23 Thread Valy Sivec



Matt, I'll check the documentation and see what I can do. It looks that this is a bug that might be fixed in the next release, hopefully. I hope the bug fix will be released soon, because I made a lot of investment developing the server side part and this issue puts this project at risk altogether. I must admit, I'm kinda disappointed because it seems to me such a basic thing to have...Thank you for your help,ValyMatt Chotin [EMAIL PROTECTED] wrote:   Make sure that somewhere in your code (a class that you know is working already) you have a var of type org.ifm.model.PhoneNumber, not just the RemoteClass
 declaration. Or there’s a compiler argument called include-classes I think that you could use to make sure it gets included, you’d need to check the docs for that.From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec Sent: Sunday, April 23, 2006 7:46 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue  Matt,  I have  [RemoteClass(alias="org.ifm.model.PhoneNumber")] in the AS class. Am I missing something?.  Thanks, Valy  Matt Chotin [EMAIL PROTECTED] wrote:Do you have a typed reference to your AS class so that it gets linked in?From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec Sent:
 Friday, April 21, 2006 11:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex2B2: JAVA to AS object serialization issueHello,I ran into something I woudn't expect to be a problem. Here is the
 story.Have a simple data object in Java that is passed to the Flash player via remote object call. I see in the log that the object type is what I expect to have but when I trace the object value via Alert message I get Object. I believe is something wrong but can't figure out what... Below is the Java
 class, the AS2 calss and also the message from the log. Am I missing something?  === JAVA CLASS ==package
 org.ifm.model;  import java.io.Serializable; import java.util.Date; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder;  public class PhoneNumber implements Serializable {   private long phnuId;   private String phnuPt1Code;  private String phnuPhoneNumber;
  private String phnuExtension;  private String phnuIsSource;   private Date phnuCreateTs;  private Date phnuUpdateTs;   private Long phnuIndiId;public PhoneNumber() {  }   public long getPhnuId() {  return this.phnuId;  }   public void setPhnuId(long phnuId) {  this.phnuId = phnuId;
  }   public String getPhnuPt1Code() {  return this.phnuPt1Code;  }   public void setPhnuPt1Code(String phnuPt1Code) {  this.phnuPt1Code = phnuPt1Code;  }   public String getPhnuPhoneNumber() {  return this.phnuPhoneNumber;
  }   public void setPhnuPhoneNumber(String phnuPhoneNumber) {  this.phnuPhoneNumber = phnuPhoneNumber;  }   public String getPhnuExtension() {  return this.phnuExtension;  }   public void setPhnuExtension(String phnuExtension) { 
 this.phnuExtension = phnuExtension;  }public Date getPhnuCreateTs() {  return this.phnuCreateTs;  }   public void setPhnuCreateTs(Date phnuCreateTs) {  this.phnuCreateTs = phnuCreateTs;  }   public Date getPhnuUpdateTs() {  return this.phnuUpdateTs;  }   
public void setPhnuUpdateTs(Date phnuUpdateTs) {  this.phnuUpdateTs = phnuUpdateTs;  }public String getPhnuIsSource() {  return this.phnuIsSource;  }   public void setPhnuIsSource(String phnuIsSource) {  this.phnuIsSource = phnuIsSource;  }   public
 String toString() {   return new ToStringBuilder(this)  .append("phnuId", getPhnuId())  .toString();  }   public Long getPhnuIndiId() { return phnuIndiId; }  public void setPhnuIndiId(Long phnuIndiId) { this.phnuIndiId = phnuIndiId; }public boolean equals(Object other) {
  if ( !(other instanceof PhoneNumber) ) return false;  PhoneNumber castOther = (PhoneNumber) other;  return new EqualsBuilder()  .append(this.getPhnuId(), castOther.getPhnuId())  .isEquals();  }   public int hashCode() {  return new HashCodeBuilder()  .append(getPhnuId()) 
 .toHashCode();  } }AS3 class  package org.ifm.model  {  [Bindable]  [RemoteClass(alias="org.ifm.model.PhoneNumber")]   public class PhoneNumber {   public function TlcPhoneNumber(){}  public var phnuId : Number;  public var phnuPt1Code : String;  public var phnuPhoneNumber : String;  public var phnuExtension : String;  public var phnuIsSource : String;  public var
 phnuCreateTs : Date;  public var phnuUpdateTs : Date;  public var phnuIndiId : Number;  public function toString() : String  {  var msg : String = 

RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue

2006-04-23 Thread Peter Farland
Title: RE: [flexcoders] Flex2B2: JAVA to AS object serialization issue









Valy, the only bug I know of in this area for Beta 2 has to do with AMF 0. If you're not changing the objectEncoding of the underlying NetConnection to ObjectEncoding.AMF0 then it's likely that you either have registered the wrong alias for the type or you simply don't have the class linked in to the SWF, as Matt suggested.



The debug trace output of your AMF response has the typed Object name as org.ifm.model.TlcPhoneNumber but this is not what you've registered as the class alias in the [RemoteClass] metadata

[RemoteClass(alias=org.ifm.model.PhoneNumber)]


even though the Java code you pasted below has this as its classname. 


Are you returning the wrong type from your Java service at runtime? Note that it can not be an implementation of an interface in order for a server type to be matched to a client type the client type alias must match the concrete implementation's class name.



Also, rather than relying on rumor of fixes for beta 3, can you please try to add the following in one of your MXML script blocks to see if it fixes the issue Matt describes?



import org.ifm.model.PhoneNumber;




private var dep:PhoneNumber;









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Flex1.5 - Info about XML object and working with XML in Actionscript?

2006-04-23 Thread Matt Chotin



In the extras folder is a class called XMLObjectOutput which is not
perfect but has given some folks a starting point for getting the kind
of deserialization you want.

If you want to use the same deserializer as HTTPService you can try this
undocumented trick:

var decoder = new mx.services.XMLDecoder();
var deserialized = decoderXML.decode(myXML);

I haven't tested that in a while though so no guarantees that you can
get away with passing params to the decoder constructor :-)

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thunderstumpgesatwork
Sent: Sunday, April 23, 2006 3:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex1.5 - Info about XML object and working with
XML in Actionscript?

Hi all,

I've come to realize how much more complete the Flex 2 documentation
seems than the Flex 1.5 documentation...

I'm looking for Flex1.5 documentation on XML objects and working with
XML. That or I need some help converting an XML object that is
returned from a RemoteObject call into an ActionScript Object. I know
there's functionality that does this for web-service results, and
mx:Model tags that reference an XML file source can I tap into
that?

Any guidance as to where additional documentation can be found is
greatly appreciated. I have looked through the Developing Flex
Applications help library that comes with FlexBuilder 1.5, as well as
the ActionScript/MXML Language reference for Flex 1.5... neither seem
to discuss how to use XML objects, or suggest how I might convert the
XML to an Object.

Thanks,
Thunder





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



 








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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Help with Effect on Panel...

2006-04-23 Thread Matt Chotin



Set showEffect=Fade on the Panel? Maybe set the hideEffect on them
too. That's for the individual Panels. If you want it applied to
everything all the time there's a changeEffect on ViewStack.

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flexabledev
Sent: Sunday, April 23, 2006 2:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help with Effect on Panel...

I am trying to create an Fade effect on each Panel in a ViewStack,
that takes place when I change the viewStack.selectedIndex value.

I have something similar to this:

mx:ViewStack id=vStack...
 mx:Panel
 child
 .
 .
 .
 /mx:Panel

 mx:Panel
 child
 .
 .
 .
 /mx:Panel
 .
 .
 .
/mx:ViewStack

I would like the entire Panel (including all it's children) to Fade in
 when the viewStack.selectedIndex value is changed. What would the
best way be to accomplish this? 






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



 









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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.