[flexcoders] Re: addchild error

2007-03-28 Thread wifi19

Hie, and thanks

i'd like make a windows with every page that i want to print before 
printing to select it

addpage is for print job isn't it ?


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

 You can't add a child twice.  Did you mean to call addPage?
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of wifi19
 Sent: Tuesday, March 27, 2007 1:57 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] addchild error
 
 
 
 I am having some trouble with addchild
 
 var thePrintView:FormPrintView = new FormPrintView();
 
 //myHbox.addChild(thePrintView); 
 var _caPan:Canvas = new Canvas();
 
 _caPan.height=300;
 _caPan.width = 200;
 
 
 _caPan.addChild(thePrintView);
 _caPan.addChild(thePrintView);
 
 second addchild generate a error
 
 RangeError: Error #2006: L'index indiqué sort des limites.
 at flash.display::DisplayObjectContainer/getChildAt()
 at mx.core::Container/getChildAt()
 at mx.core::UIComponent/set document()
 at 
 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin
 http://www.adobe.com/2006/flex/mx/internal::addin 
 gChild()
 at 
 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC
 http://www.adobe.com/2006/flex/mx/internal::addingC 
 hild()
 at mx.core::Container/addChildAt()
 at mx.core::Container/addChild()
 at MyLoginForm/process()
 at MyLoginForm/___TitleWindow1_initialize()
 at 
 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
 entFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.core::UIComponent/dispatchEvent()
 at mx.core::UIComponent/set processedDescriptors()
 at mx.core::Container/createComponentsFromDescriptors()
 at mx.containers::Panel/createComponentsFromDescriptors()
 at mx.core::Container/mx.core:Container::createChildren()
 at mx.containers::Panel/mx.containers:Panel::createChildren()
 at mx.core::UIComponent/initialize()
 at mx.core::Container/initialize()
 at MyLoginForm/initialize()
 at 
 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal:
 http://www.adobe.com/2006/flex/mx/internal: 
 :childAdded()
 at 
 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal:
 http://www.adobe.com/2006/flex/mx/internal: 
 :rawChildren_addChildAt()
 at mx.managers::SystemManager/addChild()
 at mx.managers::PopUpManagerImpl/addPopUp()
 at mx.managers::PopUpManager$/addPopUp()
 at print/doPrint()
 at print/__printDG_click()





RE: [flexcoders] Re: addchild error

2007-03-28 Thread Alex Harui
Ok, but why would you want to add the same view twice?  Do you want to add two 
different instances?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wifi19
Sent: Wednesday, March 28, 2007 12:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: addchild error




Hie, and thanks

i'd like make a windows with every page that i want to print before 
printing to select it

addpage is for print job isn't it ?

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

 You can't add a child twice. Did you mean to call addPage?
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On 
Behalf Of wifi19
 Sent: Tuesday, March 27, 2007 1:57 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] addchild error
 
 
 
 I am having some trouble with addchild
 
 var thePrintView:FormPrintView = new FormPrintView();
 
 //myHbox.addChild(thePrintView); 
 var _caPan:Canvas = new Canvas();
 
 _caPan.height=300;
 _caPan.width = 200;
 
 
 _caPan.addChild(thePrintView);
 _caPan.addChild(thePrintView);
 
 second addchild generate a error
 
 RangeError: Error #2006: L'index indiqué sort des limites.
 at flash.display::DisplayObjectContainer/getChildAt()
 at mx.core::Container/getChildAt()
 at mx.core::UIComponent/set document()
 at 
 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin 
http://www.adobe.com/2006/flex/mx/internal::addin 
http://www.adobe.com/2006/flex/mx/internal::addin 
http://www.adobe.com/2006/flex/mx/internal::addin  
 gChild()
 at 
 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC 
http://www.adobe.com/2006/flex/mx/internal::addingC 
http://www.adobe.com/2006/flex/mx/internal::addingC 
http://www.adobe.com/2006/flex/mx/internal::addingC  
 hild()
 at mx.core::Container/addChildAt()
 at mx.core::Container/addChild()
 at MyLoginForm/process()
 at MyLoginForm/___TitleWindow1_initialize()
 at 
 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
 entFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.core::UIComponent/dispatchEvent()
 at mx.core::UIComponent/set processedDescriptors()
 at mx.core::Container/createComponentsFromDescriptors()
 at mx.containers::Panel/createComponentsFromDescriptors()
 at mx.core::Container/mx.core:Container::createChildren()
 at mx.containers::Panel/mx.containers:Panel::createChildren()
 at mx.core::UIComponent/initialize()
 at mx.core::Container/initialize()
 at MyLoginForm/initialize()
 at 
 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: 
http://www.adobe.com/2006/flex/mx/internal: 
http://www.adobe.com/2006/flex/mx/internal: 
http://www.adobe.com/2006/flex/mx/internal:  
 :childAdded()
 at 
 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: 
http://www.adobe.com/2006/flex/mx/internal: 
http://www.adobe.com/2006/flex/mx/internal: 
http://www.adobe.com/2006/flex/mx/internal:  
 :rawChildren_addChildAt()
 at mx.managers::SystemManager/addChild()
 at mx.managers::PopUpManagerImpl/addPopUp()
 at mx.managers::PopUpManager$/addPopUp()
 at print/doPrint()
 at print/__printDG_click()




 


[flexcoders] Re: addchild error

2007-03-28 Thread wifi19
it's just a exemple

i'd like insert different pages (component FormPrintView()) with 
different page number and parameter with dataprovider.

ps: sorry for my english

my FormPrintView


mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* 
backgroundColor=#FF
paddingTop=50 paddingBottom=50 paddingLeft=50 

mx:Script
![CDATA[
import mx.core.*
// Declare and initialize the variables used in the 
component.
// The application sets the actual prodTotal value.
[Bindable]
public var pageNumber:Number = 1;
 [Bindable] 
   public var Index:Number = 1;
 [Bindable]
public var Qty:Number = 1;
[Bindable]
public var prodTotal:Number = 0;

// Control the page contents by selectively hiding the 
header and
// footer based on the page type.
public function showPage(pageType:String):void {
if(pageType == first || pageType == middle) {
// Hide the footer.
footer.includeInLayout=false;
footer.visible = false;
}
if(pageType == middle || pageType == last) {
// The header won't be used again; hide it.
header.includeInLayout=false;
header.visible = false;
}
if(pageType == last) {
// Show the footer.
footer.includeInLayout=true;
footer.visible = true;
}
//Update the DataGrid layout to reflect the results.
validateNow();
}

]]
/mx:Script

!-- The template for the printed page, with the contents for all 
pages. --
mx:VBox width=80% horizontalAlign=left
mx:Label text=Page {pageNumber}/
/mx:VBox
FormPrintHeader id=header /
!-- The data grid. The sizeToPage property is true by default, 
so the last
page has only as many grid rows as are needed for the data. --

mx:VBox width=80% horizontalAlign=left
mx:Label text=Index {Index}/
/mx:VBox
 mx:VBox width=80% horizontalAlign=left
mx:Label text=Quantite {Qty}/
/mx:VBox
  
!-- Create a FormPrintFooter control and set its prodTotal 
variable. --
FormPrintFooter id=footer pTotal={prodTotal} /

/mx:VBox

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

 Ok, but why would you want to add the same view twice?  Do you want 
to add two different instances?
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of wifi19
 Sent: Wednesday, March 28, 2007 12:07 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: addchild error
 
 
 
 
 Hie, and thanks
 
 i'd like make a windows with every page that i want to print before 
 printing to select it
 
 addpage is for print job isn't it ?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com , Alex Harui aharui@ wrote:
 
  You can't add a child twice. Did you mean to call addPage?
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com  
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com ] On Behalf Of wifi19
  Sent: Tuesday, March 27, 2007 1:57 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] addchild error
  
  
  
  I am having some trouble with addchild
  
  var thePrintView:FormPrintView = new FormPrintView();
  
  //myHbox.addChild(thePrintView); 
  var _caPan:Canvas = new Canvas();
  
  _caPan.height=300;
  _caPan.width = 200;
  
  
  _caPan.addChild(thePrintView);
  _caPan.addChild(thePrintView);
  
  second addchild generate a error
  
  RangeError: Error #2006: L'index indiqué sort des limites.
  at flash.display::DisplayObjectContainer/getChildAt()
  at mx.core::Container/getChildAt()
  at mx.core::UIComponent/set document()
  at 
  
 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addin
 http://www.adobe.com/2006/flex/mx/internal::addin 
 http://www.adobe.com/2006/flex/mx/internal::addin 
http://www.adobe.com/2006/flex/mx/internal::addin  
  gChild()
  at 
  
 
mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingC
 http://www.adobe.com/2006/flex/mx/internal::addingC 
 http://www.adobe.com/2006/flex/mx/internal::addingC 
http://www.adobe.com/2006/flex/mx/internal::addingC  
  hild()
  at mx.core::Container/addChildAt()
  at mx.core::Container/addChild()
  at MyLoginForm/process()
  at MyLoginForm/___TitleWindow1_initialize()
  at 
  
 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
  entFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at mx.core::UIComponent/dispatchEvent()
  at mx.core::UIComponent/set processedDescriptors()
  at 

Re: [flexcoders] wanted to share...

2007-03-28 Thread John Barrett
Hi Clint,
Just want to let you know that I re-installed ColdFusion, and this new version, 
I put your code remtingExample in the localhost, and it worked great, with no 
issues. I guess this does work on the mac. I have no idea what was wrong with 
he other developer's version of ColdFusion, but this new one works great. Now I 
can have flex  ColdFusion communicate`-`

Just wanted to thank you one more time!
John
 

  
 


- Original Message 
From: Clint Tredway [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 27, 2007 7:00:55 PM
Subject: [flexcoders] wanted to share...









  



I posted this on the component list, but I know not all of you are 
on

that list. I made a simple Count Down Timer component and I am sharing

it.



http://www.clinttre dway.com/ components/ CountDownTimer. zip



Feel free to do whatever you wish with it.



-- 

http://indeegrumpee .spaces.live. com/




  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o {font-size:0;}
.MsoNormal {
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq {margin:4;}
--








 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

[flexcoders] Re: Scaling Custom Components

2007-03-28 Thread g_odds
If you just want to remove all the children, do something like this:

while (this.numChildren()  0)
  this.removeChildAt(0);


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

 Nope, it is essentially an array.  If I have
  
 var a:Array = [ Nate, Alex];
 a[2] = Bjorn;
 a.shift();
 a[2] is no longer Bjorn, you are now at a[1].
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Bjorn Schultheiss
 Sent: Tuesday, March 27, 2007 6:19 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Scaling Custom Components
 
 
 
 Hey Alex,
 
 if 0 == childA
 can you insert childB at 99 for example.
 
 if so if you remove childA does childB's index change?
 
 can you ensure that you're child will remain at an index?
 
 
 
 On 28/03/2007, at 11:12 AM, Alex Harui wrote:
 
 
   
 
   Children renumber after one is removed

   0 = childA
   1 = childB
   2 = childC

   After removeChildAt(0)

   0 = childB
   1 = childC

   Look at the code for removeAllChildren.

   It will either removeChildAt(0) j times or iterate backwards.
 
 
 
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson
   Sent: Tuesday, March 27, 2007 5:22 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Scaling Custom Components
   
   
 
   I have a custom component that adds multiple shapes during
   UpdateDisplayList. When I scale the browser it calls update
 display
   list and draws over all of my shapes.
   
   I have tried:
   
   j = this.numChildren;
   for (i=0; ij; i++){
   this.removeChildAt(i);
   }
   
   Before I write redraw my shapes in UpdateDisplayList. I always
 get an
   outofbounds error after i exceed numAutomationChildren(?). If i
 try
   the same loop with numAutomationChildren nothing disappears.
   
   It won't let me call this.removeAllChildren (i think because I'm
   extending an UIComponent and not a Container)! Isnt there a way
 for
   me to get all those shapes outta there?
   
   Maybe I'm taking the wrong approach.
   
   Thanks in advance,
   
   Nate





[flexcoders] Re: ActiveMQ with JBoss and Flex Data Service

2007-03-28 Thread elmiguelestaaqui
Hi Brian,

thanks for your reply.

I'm trying your tips, because I had forgotten to put the jar
in the WEB-INF/lib.
But it isn't running. When jboss deploy my program.war, no exceptions
are thrown. But if I run in my browser
http://localhost:8080/program/myprogram.mxml, this exception is thrown:
javax.naming.NameNotFoundException: activemq/topic/inbound
..

I've tried without java: like you said me, I've tried a lots of
topic and queues names, topic.inbound, topic/inbound, etc., because in
the jmx-console of jboss, in the jndiviewer, activemq/topic/inbound
appears, but none of them has worked.

Have you other files in your deployed directory, like
jndi.properties, context.xml or applicationcontext.xml, ???

Thanks for your help  :-)







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

 Make sure you have the ActiveMQ jar file in your WEB-INF/lib directory.
 
 Also, my destination XML looks significantly different:
 
   destination id=queue1
   adapter ref=jms /
   properties
   jms
   destination-typeQueue/destination-type
   
 message-typejavax.jms.TextMessage/message-type
   
 connection-factoryConnectionFactory/connection-factory
   
 destination-jndi-namedynamicQueues/queue1/destination-jndi-name
   delivery-modeNON_PERSISTENT/delivery-mode
   
 message-priorityDEFAULT_PRIORITY/message-priority
   
 acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
   transacted-sessionsfalse/transacted-sessions
 
   initial-context-environment
   property
   
 nameContext.INITIAL_CONTEXT_FACTORY/name
   
valueorg.apache.activemq.jndi.ActiveMQInitialContextFactory/value
   /property
   property
   
 nameContext.PROVIDER_URL/name
   
 valuetcp://192.168.2.187:61616/value
   /property
   /initial-context-environment
   
   /jms
   /properties
   channels
   channel ref=my-rtmp /
   /channels
   /destination
 
 Most notably, I'm not sure you need the java: bit in your
 destination-jndi-name property, and you might consider adding the
 initial-context-environment section as I have above.
 
 Best of luck!
 
 Brian
 
 On 23 Mar 2007 05:57:18 -0700, elmiguelestaaqui
 [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  Hi,
 
  I'm trying deploy activemq in jboss. All it's allright, I launch a
java app
  that send messages to topic destination, but when I want to
connect from
  flex consumer to that destination, no messages are received.
  I have follow all steps in the activemq with jboss integration
tutorial:
 
http://devzone.logicblaze.com/site/integrating-apache-activemq-with-jboss.html
 
  In the messaging-config.xml file of flex I have written:
 
  destination id=chat-jms
  properties
  server
  durablefalse/durable
 
durable-store-managerflex.messaging.durability.FileStoreManager/durable-store-manager
  /server
  jms
  message-typejavax.jms.ObjectMessage/message-type
 
connection-factoryjava:comp/env/JmsConnectionFactory/connection-factory
 
destination-jndi-namejava:activemq/topic/inbound/destination-jndi-name
  destination-nameflexChat/destination-name
  delivery-modeNON_PERSISTENT/delivery-mode
  message-priorityDEFAULT_PRIORITY/message-priority
  acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
  transacted-sessionsfalse/transacted-sessions
  /jms
  /properties
  channels
  channel ref=my-rtmp/
  /channels
  adapter ref=jms/
  /destination
 
 
  In the java app I connect to activemq/topic/inbound, and I send
messages.
  In the flex app I create a consumer, with destination chat-jms,
but I
  don't receive messages
  :(
 
  Any suggestion?
 
  Thanks!
 
   
 
 
 -- 
 Brian Dunphy





[flexcoders] Re: ActiveMQ with JBoss and Flex Data Service

2007-03-28 Thread elmiguelestaaqui
Hello (again ;-)  )

I've tried with the dynamicQueues/queue1 and it's running!!!
thanks thanks thanks!!!

But I would like to know how I can use static queues, any idea?

Thanks!



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

 Make sure you have the ActiveMQ jar file in your WEB-INF/lib directory.
 
 Also, my destination XML looks significantly different:
 
   destination id=queue1
   adapter ref=jms /
   properties
   jms
   destination-typeQueue/destination-type
   
 message-typejavax.jms.TextMessage/message-type
   
 connection-factoryConnectionFactory/connection-factory
   
 destination-jndi-namedynamicQueues/queue1/destination-jndi-name
   delivery-modeNON_PERSISTENT/delivery-mode
   
 message-priorityDEFAULT_PRIORITY/message-priority
   
 acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
   transacted-sessionsfalse/transacted-sessions
 
   initial-context-environment
   property
   
 nameContext.INITIAL_CONTEXT_FACTORY/name
   
valueorg.apache.activemq.jndi.ActiveMQInitialContextFactory/value
   /property
   property
   
 nameContext.PROVIDER_URL/name
   
 valuetcp://192.168.2.187:61616/value
   /property
   /initial-context-environment
   
   /jms
   /properties
   channels
   channel ref=my-rtmp /
   /channels
   /destination
 
 Most notably, I'm not sure you need the java: bit in your
 destination-jndi-name property, and you might consider adding the
 initial-context-environment section as I have above.
 
 Best of luck!
 
 Brian
 
 On 23 Mar 2007 05:57:18 -0700, elmiguelestaaqui
 [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  Hi,
 
  I'm trying deploy activemq in jboss. All it's allright, I launch a
java app
  that send messages to topic destination, but when I want to
connect from
  flex consumer to that destination, no messages are received.
  I have follow all steps in the activemq with jboss integration
tutorial:
 
http://devzone.logicblaze.com/site/integrating-apache-activemq-with-jboss.html
 
  In the messaging-config.xml file of flex I have written:
 
  destination id=chat-jms
  properties
  server
  durablefalse/durable
 
durable-store-managerflex.messaging.durability.FileStoreManager/durable-store-manager
  /server
  jms
  message-typejavax.jms.ObjectMessage/message-type
 
connection-factoryjava:comp/env/JmsConnectionFactory/connection-factory
 
destination-jndi-namejava:activemq/topic/inbound/destination-jndi-name
  destination-nameflexChat/destination-name
  delivery-modeNON_PERSISTENT/delivery-mode
  message-priorityDEFAULT_PRIORITY/message-priority
  acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
  transacted-sessionsfalse/transacted-sessions
  /jms
  /properties
  channels
  channel ref=my-rtmp/
  /channels
  adapter ref=jms/
  /destination
 
 
  In the java app I connect to activemq/topic/inbound, and I send
messages.
  In the flex app I create a consumer, with destination chat-jms,
but I
  don't receive messages
  :(
 
  Any suggestion?
 
  Thanks!
 
   
 
 
 -- 
 Brian Dunphy





Re: [flexcoders] Personalized Popup

2007-03-28 Thread Roman Protsiuk

Far from good, very straightforward, but hopefully working. :)

ImagePopUp:
?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:Image id=image /
/mx:Canvas

Event handler for your TileList:
mx:TileList ... itemClick=onItemClick(event)
...
mx:Script
![CDATA[
...
private function onItemClick(event : ListEvent) : void {
var popUp : ImagePopUp = ImagePopUp(PopUpManager.createPopUp(this,
ImagePopUp));
popUp.image.source = event.itemRenderer.data.imageUrl;
}
...
]]
/mx:Script

R.

On 27 Mar 2007 14:43:21 -0700, leoaraguas [EMAIL PROTECTED] wrote:


  Hi, i need to make a popup that show me an image that represent the
item selected (one of my tilelist that is showed using render) can
anyone help me please? Its just like an image explorer.

Thanks

 



Re: [flexcoders] onChange()

2007-03-28 Thread Roman Protsiuk

What your method does with those basic calculation? Returns them, sets them
to some Label as text, what? It's very hard to get what is going on and thus
what might be wrong.

R.

On 27 Mar 2007 18:59:56 -0700, Jeremy Watson [EMAIL PROTECTED]
wrote:


  I'm calling on onCreationCompletel(event)

 creationComplete=onCreationComplete(event); 

//Alert.show(RequestType);
  if (RequestType == 1)
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts();
CostCalc()
   }
  }


Here is one of the text boxes in which I call the CostCalc()

mx:TextInput id=CattleAvWtKg editable=true enabled=true
change=CostCalc()  
text={remoteService.qryDrawdown.lastResult[0].CattleAvgWeightKg}
/
That's pretty much it.
The function CostCalc() is just doing basic math calculation. i.e. a + b

does that help at all.

Jeremy


- Original Message 
From: Bjorn Schultheiss [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, 28 March, 2007 10:59:57 AM
Subject: Re: [flexcoders] onChange()

 Send through more of your code.
Are you calling this logic on the creationComplete event?


On 28/03/2007, at 10:43 AM, Jeremy Watson wrote:


AnyoneAm I calling the function correctly in flex actionscript?

J.

- Original Message 
From: Jeremy Watson [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, 27 March, 2007 7:48:38 AM
Subject: [flexcoders] onChange()


Howdy again.

The flex application that I'm building is really quite simple which is
good cause I'm learning flex. However that said.. in html we have onLoad()
which we put on a page. I have built a function called CostCalc() everytime
someone changes a field it will recalculate each field. I got that working
perfectly.

However, when I first load the page up with values every value in the form
is 0.00 until I make a change to a field. I know that in flex we have
creationComplete= onCreationCompl ete(event) ;  but when I put in the
function call CostCalc() it doesn't seem to work. Below is the code.
Disregard the RequestType stuff. I'm switching states based on the URL.

//Alert.show( RequestType) ;
  if (RequestType == 1)
  {
   EndValue();
   CostCalc()
   }
   else
   {
LandedCosts( );
CostCalc()
   }
  }



Send instant messages to your online friends http://au.messenger.yahoo.com


Send instant messages to your online friends http://au.messenger.yahoo.com




Send instant messages to your online friends http://au.messenger.yahoo.com


 



Re: [flexcoders] Re: New Adobe Products and Flex

2007-03-28 Thread Michael Schmalle

Blaze and 8 Ball. Somehow a product release date of 4/20


That made me laugh. Really, sometimes when you put things together, it's
like Freudian slip.

Yeah, All those past Macormedia people blazing those trees, opps I mean
trails! got for it!

Peace, Mike

On 3/28/07, Bjorn Schultheiss [EMAIL PROTECTED] wrote:


  loving it..

On 28/03/2007, at 3:30 PM, Matt Chotin wrote:


Wait till you guys see the Doritos plugin J


--

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Bjorn Schultheiss
*Sent:* Tuesday, March 27, 2007 10:20 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Re: New Adobe Products and Flex



Its probably Kevin 'Escobar' Lynch who comes up with this.



On 28/03/2007, at 2:57 PM, hank williams wrote:



wow. thats funny.

Hank

On 27 Mar 2007 18:42:52 -0700, *Doug McCune* [EMAIL PROTECTED] wrote:

We're talking about a company (Macromedia) that had code names for
products like Blaze and 8 Ball. Somehow a product release date of 4/20
seems to make sense...



On 27 Mar 2007 17:02:19 -0700, *Nancy** Gill* [EMAIL PROTECTED] wrote:



ah .. Amazon.  I heard they jumped their NDA by close to a week.  Too bad.

Officially, there has been no specific date given .. at least not to the
testing teams.





Thanks,

Nancy



- Original Message -

*From:* Paul Whitelock [EMAIL PROTECTED]

*To:* flexcoders@yahoogroups.com

*Sent:* Tuesday, March 27, 2007 4:57 PM

*Subject:* [flexcoders] Re: New Adobe Products and Flex



I've seen it pop up a few places on the web, but most notably it's the
date that Amazon lists as the ship date. It's probably just a best
guess that Adobe gave to retailers, but I'm hoping that it's an
accurate guess :-)

Paul

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

 Where did you hear April 20th? I have asked and looked extensively
and haven't found anyone who knows a specific date. The press release
says during April and May for the web and design suite products ..
but nowhere have I found a specific published date.

 where did you see this date?

 Thanks,

 Nancy Gill
 Adobe Community Expert
 Author: Dreamweaver 8 e-book for the DMX Zone
 Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
 Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A
Beginner''s
 Guide, Mastering Macromedia Contribute
 Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web
Development


--



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007
2:31 PM

















 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Sharing An ArrayCollection

2007-03-28 Thread Ajay K
i want to share ArrayCollection  object Across  various mxml s 
can anyone guide regard this 




Regards
Ajay K 

 
-
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.

Re: [flexcoders] wanted to share...

2007-03-28 Thread Clint Tredway

np, glad everything is working for you.

On 28 Mar 2007 01:26:30 -0700, John Barrett [EMAIL PROTECTED] wrote:


  Hi Clint,
Just want to let you know that I re-installed ColdFusion, and this new
version, I put your code remtingExample in the localhost, and it worked
great, with no issues. I guess this does work on the mac. I have no idea
what was wrong with he other developer's version of ColdFusion, but this new
one works great. Now I can have flex  ColdFusion communicate`-`

Just wanted to thank you one more time!
John






- Original Message 
From: Clint Tredway [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 27, 2007 7:00:55 PM
Subject: [flexcoders] wanted to share...

 I posted this on the component list, but I know not all of you are on
that list. I made a simple Count Down Timer component and I am sharing
it.

http://www.clinttre dway.com/ components/ CountDownTimer. 
ziphttp://www.clinttredway.com/components/CountDownTimer.zip

Feel free to do whatever you wish with it.

--
http://indeegrumpee .spaces.live. com/http://indeegrumpee.spaces.live.com/


--
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel 
siteshttp://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0Ato
 find flight and hotel bargains.

 





--
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] List Control with checkbox items

2007-03-28 Thread Rick Root

On 3/28/07, Doug McCune [EMAIL PROTECTED] wrote:


Not sure if this is what you were asking, but here's what I came up with:

http://dougmccune.com/blog/2007/03/27/list-control-for-the-one-armed-man/



Doug, that's close, but you're emulating SHIFT-CLICK functionality... I'm
looking to emulate CTRL-click functionality

But maybe I can take your code and make it work.

Rick


Re: [flexcoders] Sharing An ArrayCollection

2007-03-28 Thread Roman Protsiuk

You can make them static, though it's not very good practice. There should
be better solution considering context.

R.

On 28 Mar 2007 05:01:20 -0700, Ajay K [EMAIL PROTECTED] wrote:


  i want to share ArrayCollection  object Across  various mxml s
can anyone guide regard this




Regards
Ajay K

--
The fish are biting.
 Get more 
visitorshttp://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140cmp=Yahooctv=Q107Taglines=Ys2=EMb=50on
 your site using Yahoo!
Search Marketing.

 



Re: [flexcoders] List Control with checkbox items

2007-03-28 Thread Rick Root

On 3/28/07, Rick Root [EMAIL PROTECTED] wrote:


On 3/28/07, Doug McCune [EMAIL PROTECTED] wrote:

 Not sure if this is what you were asking, but here's what I came up
 with:

 http://dougmccune.com/blog/2007/03/27/list-control-for-the-one-armed-man/

 http://dougmccune.com/blog/2007/03/27/list-control-for-the-one-armed-man/+


Doug, that's close, but you're emulating SHIFT-CLICK functionality... I'm
looking to emulate CTRL-click functionality

But maybe I can take your code and make it work.



And I did!  I'll email you the code off list if you're interested.

Rick


Re: [flexcoders] AS3-only HEAD request

2007-03-28 Thread Alex MacCaw

I've made a socket version of the urlloader that allows any method (and any
headers). If you email me, I'll send you a copy. I hope to release it on my
blog soon.

On 3/28/07, Matt Chotin [EMAIL PROTECTED] wrote:


   Unfortunately HEAD is only supported when using HTTPService with the
Proxy, the Player doesn't allow that method.  We're hoping that Apollo might
and that a future version of the Player might as well.



Matt


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Daniel Thompson
*Sent:* Tuesday, March 27, 2007 10:21 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] AS3-only HEAD request



The HTTPService has the ability to make a HEAD request. Is there a way to
do
the same in an ActionScript-only project? (I tried using a simple socket,
but I can't ensure a wide-open crossdomain policy.)

Basically, what I need to accomplish is to determine the URL of a resource
(an MP3 or FLV) after any server redirects. This is handled transparently
by
the Player (it just follows the redirects), but I need to know the final
URL.

Thanks,
-DT







--
http://www.eribium.org | http://juggernaut.rubyforge.org |
http://www.aireofs.com | Skype: oldmanorhouse


RE: [flexcoders] List Control with checkbox items

2007-03-28 Thread Alex Harui
Here's an example:
 
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:local=* 
 
mx:Script
![CDATA[
 
private var stateList:Array = [
{ label: Alaska, selected: false },
{ label: Arkansas, selected: false },
{ label: California, selected: false },
{ label: Delaware, selected: false },
{ label: Florida, selected: false },
{ label: Georgia, selected: false },
{ label: Hawaii, selected: false },
{ label: Massachusetts, selected: false },
{ label: Nevada, selected: false },
{ label: Pennsylvaia, selected: false },
{ label: South Dakota, selected: false },
{ label: Tennessee, selected: false },
{ label: Utah, selected: false },
{ label: Virginia, selected: false },
{ label: Washington, selected: false }
];
 

private function showSelected():void
{
 var s:String = ;
 var n:int = stateList.length;
 for (var i:int = 0; i  n; i++)
 {
  if (stateList[i].selected)
   s += stateList[i].label + \n;
 }
 ta1.text = s;
}
 
]]
/mx:Script
 
mx:List id=list1 initialize=list1.dataProvider = stateList
width=200 
 mx:itemRenderer
  mx:Component
   mx:CheckBox selectedField=selected change=data.selected =
selected /
  /mx:Component
 /mx:itemRenderer
/mx:List
mx:Button label=show selected click=showSelected() /
mx:TextArea id=ta1 width=200 height=100 /
 
/mx:Application
 
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Clint Tredway
Sent: Tuesday, March 27, 2007 1:14 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] List Control with checkbox items



here is a couple of ideas. (I didnt test these, but either 'should
work')

1. have a function tied to the click event of the checkbox that adds
that index to the selectedItems of the list control

2. when submitting the info, loop through the list and check to see if
any check boxes are checked. 

option 1 would mean you would need to change how your itemRenderer is
built, but it should work.


On 27 Mar 2007 13:02:37 -0700, Rick Root  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

Anyone else got any ideas here?



On 3/27/07, Rick Root [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

(wow, gmail makes it difficult to quote emails from
yahoo groups!)
 
That almost works here's my MXML:
 
  mx:List allowMultipleSelection=true height=203
width=360
dataProvider={parentDocument.ro.getListData.lastResult.CONTROL_CODES}
labelField=TABLFLD id=lstControlCodes 
rendererIsEditor=true
itemRenderer=mx.controls.CheckBox
  /mx:List

The problem here is that the checkboxes do not relate to
the actual selected status of the items.  For example, if I click 3
different items without holding down the control key, all 3 items have
checkboxes, but only one (the last) is highlighted in blue.. meaning
it's the only one REALLY selected as far as the list control is
concerned. 

 
Rick


-- 
CFMBB - Coldfusion Message Boards, Version 1.21 Now
Available!
http://www.cfmbb.org http://www.cfmbb.org/  




-- 
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org http://www.cfmbb.org  








-- 
http://indeegrumpee.spaces.live.com/
http://indeegrumpee.spaces.live.com/  

 


Re: [flexcoders] Flex coldfusion simple question

2007-03-28 Thread John Barrett
sorry guys, this is from 2 days ago:( It just came in now?
 

  
 


- Original Message 
From: John Barrett [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 27, 2007 2:55:46 AM
Subject: Re: [flexcoders] Flex coldfusion simple question









  




This came in really late!

I don't think that flex is loading in ColdFusion, as when I go to 
http://localhost/ flex2gateway/ I get a JRun error.
Can somebody help me figure out what is going wrong?

I made a page with he server log, the flex messages are in 'red
http://johnbarrett. net/cfusion/ log.cfm
 
Basically this going on:
user failed to load: flex.messaging. MessageBrokerSer vlet


at flex.messaging. config.XPathServ erConfigurationP 
arser.selectSing leNode(XPathServ erConfigurationP arser.java: 52)

at flex.messaging. config.ServerCon figurationParser 
.parseTopLevelCo nfig(ServerConfi gurationParser. java:45)

at flex.messaging. config.AbstractC onfigurationPars er.parse( 
AbstractConfigur ationParser. java:66)

at flex.messaging. config.Configura tionManager. getMessagingConf 
iguration( ConfigurationMan ager.java: 77)

at flex.messaging. MessageBrokerSer vlet.init( MessageBrokerSer 
vlet.java: 90)

Does this, user failed to load: flex.messaging. MessageBrokerSer vlet mean 
that this is where my issue is?
Thanks so much.
John
  
 


- Original Message 
From: John Barrett [EMAIL PROTECTED] com
To: [EMAIL PROTECTED] ups.com
Sent: Saturday, March 24, 2007 2:23:07 AM
Subject: Re: [flexcoders] Flex coldfusion simple question











Hi Rich,
Thanks for sharing this code. I will be looking into this tomorrow.
One question:
Do I need to change anything in the file:
Applications/ JRun4/servers/ cfusion/cfusion- ear/cfusion- war/WEB-INF/ flex 
services-config. xml file?

Thanks,
John

 

  
 


- Original Message 
From: Rich Tretola [EMAIL PROTECTED] com
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, March 22, 2007 7:00:03 AM
Subject: Re:
 [flexcoders] Flex coldfusion simple question










Here is a sample using ColdFusion that I just gave at our Indy user 
group.

http://blog. everythingflex. com/2007/ 03/21/indyflex- photobrowser- code/






On 22 Mar 2007 09:47:41 -0700, cardinalflexjeremy [EMAIL PROTECTED] net wrote:













  



Simple question here for the group. 



If I want to make a flex app to tie to a Database, and I want to use

Coldfusion components to access the Database stuff, and connect Flex

and coldfusion, do I need FDS to use the coldfusion adapter pieces? 



Please let me know if a company would require FDS in order to use

coldfusion with flex?



Thanks.






  



















-- 
Rich Tretola
mx:EverythingFlex/
http://www.Everythi ngFlex.com


  













 Looking for earth-friendly autos? 
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.  

  










Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

  







!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a {
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc {
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}

Re: [flexcoders] Are Events OK in the MVC (S) pattern

2007-03-28 Thread shaun etherton
Hi,

Troy Gilbert wrote:
 Brett,
 
 Events are actually an a pretty fundamental component of an MVC
 implementation. Events are most often used by the model to notify the view
 and/or controller of changes (Observer pattern).

Usually the model does not talk to the controller (see the diagram at 
the java blueprints url below).

-

Observer(page 94) - The MVC pattern often uses the observable pattern to 
manage communication. This is usually done for the following parts of 
the system:

.  between view and controller so that a change in the view triggers a 
response in the controller.

.  between model and view so the view is notified of changes to the model.

[Stelting and Maassen(2002) Applied Java Patterns, page 213]

-


 If your model is responding to *any* events then its really not acting as a
 model in the traditional MVC sense. Models should be pure data, they
 should basically represent state and contain no behavior. The exception, of
 course, are structural behaviors like collection management
 (ArrayCollection) or notification (Bindable). If you have parts of your
 model that are listening for events that's a good indicator (in my book)
 that your model needs some refactoring to truly be MVC. I tend to work
 toward the goal of the model having only properties, no methods.


The model should just be made up of objects which are modelled on the 
business processes and should adhear to the usual best practices.
Properties represent state, methods implement behavior to modify state 
based on some business logic.

Therefore, the model should define the state and business 
logic(behaviour) to manage the model's state.

The ModelLocator(Cairngorm speak?) should not contain functional 
methods, because the ModelLocator is not the model, its just the locator 
of models.

This is what the java blueprints has to say about the model in MVC.


Model - The model represents enterprise data and the business rules that 
govern access to and updates of this data. Often the model serves as a 
software approximation to a real-world process, so simple real-world 
modeling techniques apply when defining the model.

[ http://java.sun.com/blueprints/patterns/MVC-detailed.html ]



Even though the pattern in this instance is being descibed for an 
enterprise application, the rules for the pattern dont change.


 On 3/25/07, rumpleminzeflickr [EMAIL PROTECTED] wrote:
 

   Hi there,

 I'm building a flex app using MVS and it seems to me events can break
 the MVC pattern?

 I.e a event in the ui layer could trigger something directly in the
 model etc..

 Is it recommended to use Events in this way or am I being totally dumb
 here.?

 Any feedback appreciated..

 Many thanks,

 Brett

regards,
  shaun


Re: [flexcoders] Global access in AS3

2007-03-28 Thread shaun etherton
Troy Gilbert wrote:

[snip]

 That works for me. There's also a technique where you use an internal class
 (visible only within the AS source file) as a parameter to the constructor,
 thus causing the compiler to complain if anyone calls the constructor from
 outside that source file, but I find that throwing the error is enough.
 

[snip]

Ahhh.. nice one. Its just what I've been looking for (compile time check 
to ensure noone is calling the constructor directly) swt!

Thanks for the tip.

regards,
  shaun


Re: [flexcoders] Re: ActiveMQ with JBoss and Flex Data Service

2007-03-28 Thread Brian Dunphy
Not sure what how you would go about using static queues. We are using
tomcat -- we used JBoss for a bit with it's messaging capabilities,
but recently switched back to tomcat/ActiveMQ.

Best of luck,

Brian



On 28 Mar 2007 02:38:09 -0700, elmiguelestaaqui
[EMAIL PROTECTED] wrote:






 Hello (again ;-) )

  I've tried with the dynamicQueues/queue1 and it's running!!!
  thanks thanks thanks!!!

  But I would like to know how I can use static queues, any idea?

  Thanks!

  --- In flexcoders@yahoogroups.com, Brian Dunphy [EMAIL PROTECTED] wrote:
  
   Make sure you have the ActiveMQ jar file in your WEB-INF/lib directory.
  
   Also, my destination XML looks significantly different:
  
   destination id=queue1
   adapter ref=jms /
   properties
   jms
   destination-typeQueue/destination-type
   message-typejavax.jms.TextMessage/message-type
   connection-factoryConnectionFactory/connection-factory
   destination-jndi-namedynamicQueues/queue1/destination-jndi-name
   delivery-modeNON_PERSISTENT/delivery-mode
   message-priorityDEFAULT_PRIORITY/message-priority
   acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
   transacted-sessionsfalse/transacted-sessions
  
   initial-context-environment
   property
   nameContext.INITIAL_CONTEXT_FACTORY/name
  
  valueorg.apache.activemq.jndi.ActiveMQInitialContextFactory/value
   /property
   property
   nameContext.PROVIDER_URL/name
   valuetcp://192.168.2.187:61616/value
   /property
   /initial-context-environment
  
   /jms
   /properties
   channels
   channel ref=my-rtmp /
   /channels
   /destination
  
   Most notably, I'm not sure you need the java: bit in your
   destination-jndi-name property, and you might consider adding the
   initial-context-environment section as I have above.
  
   Best of luck!
  
   Brian
  
   On 23 Mar 2007 05:57:18 -0700, elmiguelestaaqui
   [EMAIL PROTECTED] wrote:
   
   
   
   
   
   
Hi,
   
I'm trying deploy activemq in jboss. All it's allright, I launch a
  java app
that send messages to topic destination, but when I want to
  connect from
flex consumer to that destination, no messages are received.
I have follow all steps in the activemq with jboss integration
  tutorial:
   
 http://devzone.logicblaze.com/site/integrating-apache-activemq-with-jboss.html
   
In the messaging-config.xml file of flex I have written:
   
destination id=chat-jms
properties
server
durablefalse/durable
   
 durable-store-managerflex.messaging.durability.FileStoreManager/durable-store-manager
/server
jms
message-typejavax.jms.ObjectMessage/message-type
   
  connection-factoryjava:comp/env/JmsConnectionFactory/connection-factory
   
  destination-jndi-namejava:activemq/topic/inbound/destination-jndi-name
destination-nameflexChat/destination-name
delivery-modeNON_PERSISTENT/delivery-mode
message-priorityDEFAULT_PRIORITY/message-priority
acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode
transacted-sessionsfalse/transacted-sessions
/jms
/properties
channels
channel ref=my-rtmp/
/channels
adapter ref=jms/
/destination
   
   
In the java app I connect to activemq/topic/inbound, and I send
  messages.
In the flex app I create a consumer, with destination chat-jms,
  but I
don't receive messages
:(
   
Any suggestion?
   
Thanks!
   
   
  
  
   --
   Brian Dunphy
  



  


-- 
Brian Dunphy


[flexcoders] Re: UIComponent: focus problem?

2007-03-28 Thread carlo.cavallieri
first of all: 
now i get it working, implementing the
IFocusManagerComponent and adding a
crationComplete=myComp.setFocus() in the mx:Application tag
i can log the keystrokes;

so, thanks Alex.

But i'm still curious about systemManager, i always get null 
(I run the test in the stand-alone player), here's my code:

 Stage.as -

package
{
import flash.display.*;
import flash.events.*;
import mx.core.*;

public class Stage extends UIComponent implements 
IFocusManagerComponent 
{

public function Stage()
{
super();

trace(systemManager);
}

private function onKeyDown( event:KeyboardEvent ):void
{
trace(Key Code: +event.keyCode);
}

}
}

-- Game.mxml 

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2009/mxml;
xmlns:test=* creationComplete=gameStage.setFocus()

mx:Panel title=Test

test:Stage id=gameStage /

/mxPanel

/mx:Application





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

 That means you haven't added the component as a child of some other
 component on the stage (like the main app).  You have to be on the
 display list in order to get keystrokes.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of carlo.cavallieri
 Sent: Tuesday, March 27, 2007 2:52 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: UIComponent: focus problem?
 
 
 
 if in my component i add this line of code
 
 trace(systemManager) i get null
 
  public function Stage()
  {
  super();
  
 trace(systemManager);
  
  }
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  You component must implement IFocusManagerComponent if you want it to
  receive focus.
  
  public class Stage extends UIComponent implements
 IFocusManagerComponent
  
  If you want to capture all keystrokes, listen to the stage.
  
  systemManager.stage.addEventListener( KeyboardEvent.KEY_DOWN,
 onKeyDown
  );
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of carlo.cavallieri
  Sent: Tuesday, March 27, 2007 1:47 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] UIComponent: focus problem?
  
  
  
  Hi,
  
  i have a simple Test Component that display the key pressed by the
  user, but it doesn't log anything
  
  package
  {
  import flash.display.*;
  import flash.events.*;
  import mx.core.*;
  
  public class Stage extends UIComponent
  {
  
  public function Stage()
  {
  super();
  
  //height = 300;
  //width = 400;
  
  //
  // keyboard binding
  //
  addEventListener( KeyboardEvent.KEY_DOWN, onKeyDown );
  
  }
  
  private function onKeyDown( event:KeyboardEvent ):void
  {
  trace(Key Code: +event.keyCode);
  }
  
  }
  }
  
  Where i'm wrong?
 




Re: [flexcoders] Data binding will not be able to detect changes... ?

2007-03-28 Thread Valy Sivec
Per my knowledge for Array and XMLList data binding won't detect data changes. 
I suggest you use XMLListCollection and the warning will go away.

Regards,
Valy



- Original Message 
From: Greg Morphis [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, March 27, 2007 10:25:24 AM
Subject: Re: [flexcoders] Data binding will not be able to detect changes... ?

the whole model is bindable..
[Bindable]
public class MyModel implements ModelLocator {
...
...
public var DALocationsXML: XMLList;
...

On 3/27/07, Tom Chiverton tom.chiverton@ halliwells. com wrote:
 On Tuesday 27 Mar 2007, Greg Morphis wrote:
  How can I knock this warning out?

 [Bindable]

 --
 Tom Chiverton
 Helping to advantageously restore cutting-edge platforms
 on: http://thefalken. livejournal. com

  * * * * 

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

 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under registered number OC307980 whose registered office address is at 
 St James's Court Brown Street Manchester M2 2JF. A list of members is 
 available for inspection at the registered office. Any reference to a partner 
 in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by 
 the Law Society.

 CONFIDENTIALITY

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

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



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








 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

RE: [flexcoders] List Control with checkbox items

2007-03-28 Thread Alex Harui
I was looking at the source.  You'll need an inline renderer with
selectedField set to some property in your  data that will record
whether it is selected or not.
 
If you want to store that elsewhere, then you'll need more subclassing
and set up a centralized repository of what is selected.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Root
Sent: Tuesday, March 27, 2007 1:01 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] List Control with checkbox items



Anyone else got any ideas here?


On 3/27/07, Rick Root [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

(wow, gmail makes it difficult to quote emails from yahoo
groups!)
 
That almost works here's my MXML:
 
  mx:List allowMultipleSelection=true height=203
width=360
dataProvider={parentDocument.ro.getListData.lastResult.CONTROL_CODES}
labelField=TABLFLD id=lstControlCodes 
rendererIsEditor=true itemRenderer=mx.controls.CheckBox
  /mx:List

The problem here is that the checkboxes do not relate to the
actual selected status of the items.  For example, if I click 3
different items without holding down the control key, all 3 items have
checkboxes, but only one (the last) is highlighted in blue.. meaning
it's the only one REALLY selected as far as the list control is
concerned. 

 
Rick


-- 
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org http://www.cfmbb.org/  




-- 
CFMBB - Coldfusion Message Boards, Version 1.21 Now Available!
http://www.cfmbb.org http://www.cfmbb.org  

 


[flexcoders] Accessing Item Renderer in a List.

2007-03-28 Thread ivansebastiansurya
Hi everyone,

I need bit of a help in displaying items from a List.

I have an item renderer which is associated to the List.

The items in the list contains lots of data, one of which is an 
indication of how many percent a task has been completed.

My custom item renderer has a ProgressBar in it. 

Every 5 minutes, the data source for my list is updated, hence the 
progress bar should be updated.

How can I detect the change in data source from the item renderer's 
class, so that I can change the progress bar status?

I have always thought that new item renderer object is created 
everytime the list is updated (everytime the data source is updated, 
I cleared the array collection which is the source of the list and re 
add the new items).

At the moment, my progress bar only looks right when the application 
first run.  However, seems like the progress bar is updated randomly 
afterwards.

Thanks.

Ivan.



[flexcoders] Re: Flex access to cookies

2007-03-28 Thread Tony Obermeit
Thanks a lot! :-) - any code snippets to guide me as to how to do  
that, or links to related examples?

Tony

Posted by: Clint Tredway [EMAIL PROTECTED]   clinttredway
Tue Mar 27, 2007 5:33 pm (PST)

pass in the cookie value thru the flashVars.

On 3/27/07, Tony Obermeit [EMAIL PROTECTED] wrote:
 
  I need to access the cookies already created in the browser in order
  to determine if the user has been authenticated using oracle single
  sign on.
 
  1. Which flash object / class do I use to access the cookies?
 
  2. Anyone have tips / code to share that they've used to authenicate
  user with oracle sso?
 
  Thanks
 
  Tony
 
 



[flexcoders] HTTPService/ArrayCollection/DataGrid/Tree/

2007-03-28 Thread Alain Thibodeau
Hi all,

I was wondering if someone could please point me in the correct direction. 

I have an HTTPService that I am using with a datagrid, the Service's data is 
loaded into an ArrayCollection and I filter the ArrayCollection with a 
filterFunction. All works great. 

I now want to take the same ArrayCollection and load certain elements of the 
data into a tree. This is where I am getting errors. 

The xml:
?xml version=1.0 encoding=utf-8?
build
item id=1
nameName/name
areaChicago/area
statusAvail./status
spec1264/spec
size40/size
/item
item id=2
nameName/name
areaNew York/area
statusAvail./status
spec1264/spec
size49/size
/item
/build

I want to display in the tree the area(s) as the folder and the name under it 
as a leaf(s). All I managed to do is a labelFunction that returns the area, and 
populates the tree as leafs. I am assuming, I will have to create a custom 
function? 

  private function trModels(item:Object):String{
return item.community;
  }

Now all the docs I could find tell me to use the result on the httpservice as 
e4x and filter the data that way for the tree, but when I specify e4x as 
resultFormat I get an error and it breaks my filtering on the datagrid...: 
Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to 
mx.collections.ArrayCollection.

Can anyone point me in the correct direction please? There must be a way to 
filter data that is not tree friendly..

thank-you

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

[flexcoders] VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread beecee1977
Hi,

I would normally spend more time trying to work this out first, but 
I'm under a bit of pressure... There appears to be a bug in the 
VideoDisplay code. 

vid.close() = within the videoDisplay a private variable called 
closeCalled is set to true. 
vid.play() = the closeCalled variable is set to be false in the play 
function.

Fine, but:
vid.close() = closeCalled=true
vid.load() = loadVideo()
vid.play() = if (closeCalled==true) {loadVideo()}

So if you load in the video this variable is not reset to false. This 
means that the video gets loaded twice; once when the video is loaded 
and once when the video is played... 

Anyway, all this is besides the point... I just want to know how to 
get around this. I've tried this:

package libraries.utility
{
import mx.controls.VideoDisplay;

public class NewVideoDisplay extends VideoDisplay
{
//private var closeCalled:Boolean = false;  


public function NewVideoDisplay()
{
super();
}

override public function load():void
{
super.load();
closeCalled = false;
}

}
}


but naturally I cannot access the private variable closeCalled. How 
do I go about doing this?

Thanks in advance
Bill




[flexcoders] Re: Flex access to cookies

2007-03-28 Thread Maury Sword
You can modify the flashvars in index.template.html file under the 
html-template directory of your project.  In the follwoing snippet I 
have added username and pwd parameters.

// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
   src, ${swf},
   width, ${width},
   height, ${height},
   align, middle,
   id, ${application},
   quality, high,
   bgcolor, ${bgcolor},
   name, ${application},
   flashvars,'historyUrl=history.htm%3Flconid=' + lc_id   
+ 'username=myUserpwd=myPwd',     code change
   allowScriptAccess,sameDomain,
   type, application/x-shockwave-flash,
   pluginspage, http://www.adobe.com/go/getflashplayer;
);


Then reference these parameter in Flex via the Application class:

import mx.core.Application;

Application.application.parameters.username;
Application.application.parameters.pwd;


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

 Thanks a lot! :-) - any code snippets to guide me as to how to do  
 that, or links to related examples?
 
 Tony
 
 Posted by: Clint Tredway [EMAIL PROTECTED]   clinttredway
 Tue Mar 27, 2007 5:33 pm (PST)
 
 pass in the cookie value thru the flashVars.
 
 On 3/27/07, Tony Obermeit [EMAIL PROTECTED] wrote:
  
   I need to access the cookies already created in the browser in 
order
   to determine if the user has been authenticated using oracle 
single
   sign on.
  
   1. Which flash object / class do I use to access the cookies?
  
   2. Anyone have tips / code to share that they've used to 
authenicate
   user with oracle sso?
  
   Thanks
  
   Tony
  
  





Re: [flexcoders] Re: Flex access to cookies

2007-03-28 Thread Clint Tredway

you can also reference them like this: this.parameters.paramName.

I typically bind these to bindable vars in my initApp function.

On 28 Mar 2007 06:32:51 -0700, Maury Sword [EMAIL PROTECTED]
wrote:


  You can modify the flashvars in index.template.html file under the
html-template directory of your project. In the follwoing snippet I
have added username and pwd parameters.

// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
src, ${swf},
width, ${width},
height, ${height},
align, middle,
id, ${application},
quality, high,
bgcolor, ${bgcolor},
name, ${application},
flashvars,'historyUrl=history.htm%3Flconid=' + lc_id
+ 'username=myUserpwd=myPwd',  code change
allowScriptAccess,sameDomain,
type, application/x-shockwave-flash,
pluginspage, http://www.adobe.com/go/getflashplayer;
);

Then reference these parameter in Flex via the Application class:

import mx.core.Application;

Application.application.parameters.username;
Application.application.parameters.pwd;

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

 Thanks a lot! :-) - any code snippets to guide me as to how to do
 that, or links to related examples?

 Tony

 Posted by: Clint Tredway [EMAIL PROTECTED] clinttredway
 Tue Mar 27, 2007 5:33 pm (PST)

 pass in the cookie value thru the flashVars.

 On 3/27/07, Tony Obermeit [EMAIL PROTECTED] wrote:
 
  I need to access the cookies already created in the browser in
order
  to determine if the user has been authenticated using oracle
single
  sign on.
 
  1. Which flash object / class do I use to access the cookies?
 
  2. Anyone have tips / code to share that they've used to
authenicate
  user with oracle sso?
 
  Thanks
 
  Tony
 
 


 





--
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] Accessing Item Renderer in a List.

2007-03-28 Thread Roman Protsiuk

All the interaction with item renderer is expected to be done via data set
to it. And the feedback may be  for example bubbling event (though, I use
this technique very seldom).
When list-based control is created it creates as many item renderer
instances as needed and only substitutes data afterwards.

R.

On 28 Mar 2007 06:06:00 -0700, ivansebastiansurya 
[EMAIL PROTECTED] wrote:


  Hi everyone,

I need bit of a help in displaying items from a List.

I have an item renderer which is associated to the List.

The items in the list contains lots of data, one of which is an
indication of how many percent a task has been completed.

My custom item renderer has a ProgressBar in it.

Every 5 minutes, the data source for my list is updated, hence the
progress bar should be updated.

How can I detect the change in data source from the item renderer's
class, so that I can change the progress bar status?

I have always thought that new item renderer object is created
everytime the list is updated (everytime the data source is updated,
I cleared the array collection which is the source of the list and re
add the new items).

At the moment, my progress bar only looks right when the application
first run. However, seems like the progress bar is updated randomly
afterwards.

Thanks.

Ivan.

 



[flexcoders] Problem with measureHTMLText when using different font-sizes

2007-03-28 Thread ewoermann
Hi

I need to resize a TextArea to show all the text it got populated
with. The TextArea has to display htmlText, so I use measureHTMLText
to get the width and height of a string. According to that I calculate
the dimensions of the TextArea.

Now this all works, unless I change the font, its weight or size.
Below is an example to demonstrate this. Does anyone now how to get
the correct TextLineMetrics for styled fonts? Or does anyone have a
better way to solve this problem?

If you run the code below, you will see 3 TextAreas. The 1st one just
displays normal text, is editable and the height is fixed. Beneath it
is a Button when clicked updates the other two TextAreas to contain
the same text as the first one, but formatted as htmlText. The text in
the second TextArea is not styled, whereas in the third one it has a
greater font size. Now, if you add text to the first component and
click update, the second one resizes correctly and displays all the
text, but the third one only resizes to the same height as the second
one and because of its greater font size, might not display all the text.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Style
.customTextAreaStyle
{
font-size:16;
}
/mx:Style
mx:Script
![CDATA[
[Bindable]
private var __someHTMLText:String = This is an example 
of
bHTMLText/b.;

private function onUpdateBtnClick():void
{
__someHTMLText = userInput.text;

resizeTextArea(defaultStyleTextArea);
resizeTextArea(customStyleTextArea);
}

private function resizeTextArea(textArea:TextArea):void
{
if (textArea.htmlText == )
{
textArea.height = 0;
return;
}

var numberOfLines:uint = 1;

var wordArray:Array = textArea.htmlText.split( 
);
var measureString:String = new String();

var l:uint = wordArray.length;
for (var i:uint = 0; i  l; i++)
{
measureString = 
measureString.concat(wordArray[i],  );
if 
(measureHTMLText(measureString).width  textArea.width)
{
numberOfLines++;
measureString = wordArray[i] + 
 ;
}
}

// height = textHeight * numberOfLines + 
2-pixel gutter top +
2-pixel gutter bottom.
textArea.height = 
measureHTMLText(textArea.htmlText).height *
numberOfLines + 4;
}
]]
/mx:Script
mx:HBox width=100% height=100%
mx:VBox width=200 height=100%
mx:TextArea id=userInput text={__someHTMLText} 
width=100%
height=100%/
mx:Button id=updateTextBtn label=Update Text
click=onUpdateBtnClick()/
/mx:VBox
mx:TextArea id=defaultStyleTextArea 
htmlText={__someHTMLText}
width=200 selectable=false 
verticalScrollPolicy=off/
mx:TextArea id=customStyleTextArea 
htmlText={__someHTMLText}
styleName=customTextAreaStyle
width=200 selectable=false 
verticalScrollPolicy=off/
/mx:HBox
/mx:Application

Hope anyone can help
Masi.



[flexcoders] Question

2007-03-28 Thread midwest_consulting_group
Dear Flex Mamabers,

I am a recruiter currently conducting a search for a Flex developer 
position in the DFW area. Without breaking any of your group rules i 
want to know, is there is a place where i can share this opportunity 
with you all? Let me know how i can go about this so that if there is 
any interest you members can contact me.

Thank you,

Ali



Re: [flexcoders] Question

2007-03-28 Thread Clint Tredway

there is a flex jobs list that you can post it to.
http://tech.groups.yahoo.com/group/flexjobs/

On 3/28/07, midwest_consulting_group [EMAIL PROTECTED] wrote:


  Dear Flex Mamabers,

I am a recruiter currently conducting a search for a Flex developer
position in the DFW area. Without breaking any of your group rules i
want to know, is there is a place where i can share this opportunity
with you all? Let me know how i can go about this so that if there is
any interest you members can contact me.

Thank you,

Ali

 





--
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] Problem with measureHTMLText when using different font-sizes

2007-03-28 Thread Daniel Freiman

yeah, measureHTMLText will give you trouble for this type of problem.  If
you're only resizing the height and keeping the same width, you can use
textArea.textHeight and resize the textarea to that (plus border, padding,
etc).  The only thing to look out for is that the textHeight property is up
to date when you ask for it.  It probably will be but if it's not you may
need to call one of the validation functions (such as validateNow()) on the
TextArea or the TextArea's UITextField.

- Dan Freiman

On 28 Mar 2007 07:31:53 -0700, ewoermann [EMAIL PROTECTED] wrote:


  Hi

I need to resize a TextArea to show all the text it got populated
with. The TextArea has to display htmlText, so I use measureHTMLText
to get the width and height of a string. According to that I calculate
the dimensions of the TextArea.

Now this all works, unless I change the font, its weight or size.
Below is an example to demonstrate this. Does anyone now how to get
the correct TextLineMetrics for styled fonts? Or does anyone have a
better way to solve this problem?

If you run the code below, you will see 3 TextAreas. The 1st one just
displays normal text, is editable and the height is fixed. Beneath it
is a Button when clicked updates the other two TextAreas to contain
the same text as the first one, but formatted as htmlText. The text in
the second TextArea is not styled, whereas in the third one it has a
greater font size. Now, if you add text to the first component and
click update, the second one resizes correctly and displays all the
text, but the third one only resizes to the same height as the second
one and because of its greater font size, might not display all the text.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Style
.customTextAreaStyle
{
font-size:16;
}
/mx:Style
mx:Script
![CDATA[
[Bindable]
private var __someHTMLText:String = This is an example of
bHTMLText/b.;

private function onUpdateBtnClick():void
{
__someHTMLText = userInput.text;

resizeTextArea(defaultStyleTextArea);
resizeTextArea(customStyleTextArea);
}

private function resizeTextArea(textArea:TextArea):void
{
if (textArea.htmlText == )
{
textArea.height = 0;
return;
}

var numberOfLines:uint = 1;

var wordArray:Array = textArea.htmlText.split( );
var measureString:String = new String();

var l:uint = wordArray.length;
for (var i:uint = 0; i  l; i++)
{
measureString = measureString.concat(wordArray[i],  );
if (measureHTMLText(measureString).width  textArea.width)
{
numberOfLines++;
measureString = wordArray[i] +  ;
}
}

// height = textHeight * numberOfLines + 2-pixel gutter top +
2-pixel gutter bottom.
textArea.height = measureHTMLText(textArea.htmlText).height *
numberOfLines + 4;
}
]]
/mx:Script
mx:HBox width=100% height=100%
mx:VBox width=200 height=100%
mx:TextArea id=userInput text={__someHTMLText} width=100%
height=100%/
mx:Button id=updateTextBtn label=Update Text
click=onUpdateBtnClick()/
/mx:VBox
mx:TextArea id=defaultStyleTextArea htmlText={__someHTMLText}
width=200 selectable=false verticalScrollPolicy=off/
mx:TextArea id=customStyleTextArea htmlText={__someHTMLText}
styleName=customTextAreaStyle
width=200 selectable=false verticalScrollPolicy=off/
/mx:HBox
/mx:Application

Hope anyone can help
Masi.

 



[flexcoders] Connecting two tree views

2007-03-28 Thread Harald Kucharek
Hi,

I'm new to Flex and want the following: I have two Tree views side by
side, based on the same XML-datasource. When I click one node in the
left tree, I want  the node holding the same data to be expanded on the
right tree.

Naive :-) Code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
pageTitle=Tree Sync

 mx:Script
 ![CDATA[

 public function treeItemClicked(event:Event):void {
  rightTree.expandItem(leftTree.selectedItem, true);
  }

 ]]
 /mx:Script

 mx:XML id=dataSet source=data/tree.xml xmlns=/

 mx:Panel x=10 y=10 width=465 height=459 layout=absolute
 mx:HDividedBox x=10 y=10 height=399 width=425
 mx:Tree width=100% height=100%
 id=leftTree  dataProvider={dataSet}
 showRoot=false labelField=@label
 itemClick=treeItemClicked(event) /mx:Tree
 mx:Tree width=100% height=100%
 id=rightTree dataProvider={dataSet}
 showRoot=false labelField=@label/mx:Tree
 /mx:HDividedBox
 /mx:Panel

/mx:Application

Of  course, rightTree.expandItem(leftTree.selectedItem, true); isn't
working as I hoped it may. Is there an easy solution for my task?

Thanks in advance,

Harald





[flexcoders] storing data in models within Flex 2

2007-03-28 Thread jmwhittaker007
How can I store data within my Flex application as XML that can be
used again in a DataGrid? 

I have created an mx:XML data model in MXML. It seems that this only
stores one model at a time from my form. 

How can I keep adding data from my form getting it to add to the model?







[flexcoders] Re: VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread beecee1977
P.S. If it's any easier to access an mx_internal variable than a 
private variable (when sub-classing/extending a control) that'll work 
too!

Cheers
Bill

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

 Hi,
 
 I would normally spend more time trying to work this out first, but 
 I'm under a bit of pressure... There appears to be a bug in the 
 VideoDisplay code. 
 
 vid.close() = within the videoDisplay a private variable called 
 closeCalled is set to true. 
 vid.play() = the closeCalled variable is set to be false in the 
play 
 function.
 
 Fine, but:
 vid.close() = closeCalled=true
 vid.load() = loadVideo()
 vid.play() = if (closeCalled==true) {loadVideo()}
 
 So if you load in the video this variable is not reset to false. 
This 
 means that the video gets loaded twice; once when the video is 
loaded 
 and once when the video is played... 
 
 Anyway, all this is besides the point... I just want to know how to 
 get around this. I've tried this:
 
 package libraries.utility
 {
   import mx.controls.VideoDisplay;
 
   public class NewVideoDisplay extends VideoDisplay
   {
   //private var closeCalled:Boolean = false;  
 
 
   public function NewVideoDisplay()
   {
   super();
   }
   
   override public function load():void
   {
   super.load();
   closeCalled = false;
   }
   
   }
 }
 
 
 but naturally I cannot access the private variable closeCalled. How 
 do I go about doing this?
 
 Thanks in advance
 Bill





[flexcoders] List Box in a DataGrid

2007-03-28 Thread jitender_instacoll
Hello,

How do i add a listbox in a datagrid control so that it is populated 
from the dataprovider of the datagrid control?

mx:datagrid dataprovider={httpMyService.lastResutls.CARS.CAR} 
mx:columns
mx:List dataField=COLOR headerText=Color   /
mx:DataGridColumn dataField=Type  headerText=Type /
/mx:columns
/mx:datagrid

My XML Returned from the service looks like this:
CARS
CAR
KEYWORDwhite/KEYWORD
KEYWORDred/KEYWORD
KEYWORDblack/KEYWORD
TYPECadillac/TYPE
/CAR
CAR
KEYWORDwhite/KEYWORD
KEYWORDbrown/KEYWORD
KEYWORDblack/KEYWORD
TYPEHyundai/TYPE
/CAR
/CARS

List Box should show White Red Black or whatever are the colors for 
every row/car.

Any help is greatly appreciated.
Thankyou.



[flexcoders] Connect and Retrieve from MS SQL Server 2005

2007-03-28 Thread hugocorept

Hello all,

In your opnion, witch is the simple/best way to connect a MSSQLServer
2005.

I prefer java-less..

Thank you , Very Much!



[flexcoders] HTML-like Table/Textbox behavior possible?

2007-03-28 Thread missgiggygirl
As a pilot project to see if we can make the move to flex, I am trying
to convert some common widgets/screens that we use in the HTML/Ajax
world into Flex.

One widget that we have uses a standard HTML table based on
percentages (100% width, various percentage TDs) that has many date
picker thingies, which are made up of a text field in one TD and the
calendar icon in an adjacent TD.  In HTML it is pretty easy to specify
percentage widths for the TDs as well as the text fields, and to have
the table and all of its contents scale accordingly as the table or
window is resized.  

Is this possible -- and PRACTICAL! -- using the existing date picker
and grid container in Flex?

Specifically, say that when the user's window is 100% of the screen. 
Well in that case, the date picker should be 100% of its maximum
width, the width of the TD holding it (if we are using a grid), which
say is 110 pixels.  If we reduce the window to half the width, is it
possible to make all of the elements of the grid -- including the date
picker widget -- to also reduce by half, or 55 pixels for the text
field (the icon stays the same size)?

I should point out that one page in one of our web apps has 15 date
pickers on it, so doing a manual calculation of how wide to make each
datepicker seems impracticle.

Now, I do appreciate that Flex is not HTML, so if the answer is it is
not practical for Flex Apps to have this behavior then that is fine,
I just need a definitive answer that I cannot provide as a newbie. 
(Maybe I should not be trying to do any layout with a grid to begin with?)

Thanks,
Ann



RE: [flexcoders] HTML-like Table/Textbox behavior possible?

2007-03-28 Thread Dimitrios Gianninas
Yes you can, but I recommend you do not use the Grid container, just VBoxes and 
HBoxes will allow you to place items as you need them.
 
mx:VBox width=100%
  mx:DateField width=100%/
  mx:DateField width=100%/
/mx:VBox
 
Dimitrios Gianninas
Developer
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
missgiggygirl
Sent: Wednesday, March 28, 2007 11:05 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTML-like Table/Textbox behavior possible?



As a pilot project to see if we can make the move to flex, I am trying
to convert some common widgets/screens that we use in the HTML/Ajax
world into Flex.

One widget that we have uses a standard HTML table based on
percentages (100% width, various percentage TDs) that has many date
picker thingies, which are made up of a text field in one TD and the
calendar icon in an adjacent TD. In HTML it is pretty easy to specify
percentage widths for the TDs as well as the text fields, and to have
the table and all of its contents scale accordingly as the table or
window is resized. 

Is this possible -- and PRACTICAL! -- using the existing date picker
and grid container in Flex?

Specifically, say that when the user's window is 100% of the screen. 
Well in that case, the date picker should be 100% of its maximum
width, the width of the TD holding it (if we are using a grid), which
say is 110 pixels. If we reduce the window to half the width, is it
possible to make all of the elements of the grid -- including the date
picker widget -- to also reduce by half, or 55 pixels for the text
field (the icon stays the same size)?

I should point out that one page in one of our web apps has 15 date
pickers on it, so doing a manual calculation of how wide to make each
datepicker seems impracticle.

Now, I do appreciate that Flex is not HTML, so if the answer is it is
not practical for Flex Apps to have this behavior then that is fine,
I just need a definitive answer that I cannot provide as a newbie. 
(Maybe I should not be trying to do any layout with a grid to begin with?)

Thanks,
Ann



 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.



[flexcoders] Re: Connect and Retrieve from MS SQL Server 2005

2007-03-28 Thread Shaun
If you want to use .NET, check out the open-source Fluorine project:

http://www.thesilentgroup.com/fluorine/fluorine/index.html



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

 
 Hello all,
 
 In your opnion, witch is the simple/best way to connect a MSSQLServer
 2005.
 
 I prefer java-less..
 
 Thank you , Very Much!





Re: [flexcoders] Connect and Retrieve from MS SQL Server 2005

2007-03-28 Thread Clint Tredway

you can use just about any server side language (ColdFusion, PHP, ASP, .NET,
etc) to connect to SQL Server

On 3/28/07, hugocorept [EMAIL PROTECTED] wrote:



Hello all,

In your opnion, witch is the simple/best way to connect a MSSQLServer
2005.

I prefer java-less..

Thank you , Very Much!

 





--
http://indeegrumpee.spaces.live.com/


Re: [flexcoders] Re: Flex 2, AMFPHP and charset

2007-03-28 Thread Ryan Barrett

It sounds to me like a problem with differing character sets between PHP and
the database or the client you're using to connect to the database.

I'd guess that both should be Latin-1 / Windows 1252..

You might get more info by looking at the communication between flex and
php, this is easy using Firefox and the latest version of Firebug...

On 27/03/07, Rafael Guédez [EMAIL PROTECTED] wrote:


  Thanks Ryan,



I tried with varchar and text datatype and I got the same problem.



For example: the char á look fine in the flex application, but in the
database is á



And my php class is like the old amfphp 1.2 without the method table. If I
use the same flex application with AMFPHP 1.9 and the AMF0
remotingconnection package work fine and save the correct chars in the DB.
I'm using this old way for now,



like this:


http://www.adobe.com/devnet/flex/articles/flex2_amfphp_03.html




regards


Rafael




On Mar 27, 2007, at 11:01 AM, RadicalByte wrote:

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Rafael
Guédez [EMAIL PROTECTED] wrote:

 Hello,


 I really don't know what to do, I'm using in the gateway:


 $gateway-setCharsetHandler( none, ISO-8859-1, ISO-8859-1 );


 And running the application in the browser all the data look fine,
 but in the database this really write weird characters for special
 chars, and I need this data to see it in a normal flash web site.


 I don't know if this is a unsolved problem in this beta version. Any
 idea?


 Flex 2, AMFPHP 1.9, MySQL 4.0.26 and PHP 5.0.4


 regards


 Rafael


Hi Rafael,

What datatype are the fields in your DB?

How're you handling the characters in PHP (as it doesn't support unicode).

Cheers,
Ryan


 





--
Ryan


[flexcoders] Flex Data Services installation

2007-03-28 Thread chqdzn
I am evaluating this software for purchase for our UI Development 
teams, 50+ people.  I'm posting this question here because the FLEX 
forum is continually undergoing maintenance which is making it 
temporarily unavailable until 1:00pm PST.  I'm on the east coast, 
and although I tried over several days to connect to this forum (all 
after 4pm EST), the FLEX forum is always unavailable.



The question I am trying to get answered is regarding Flex Data 
Services.  I've downloaded the files according to the instructions 
at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#fle
xj2ee .  

I placed the files in my webapps directory running on 
tomcat.   

However, according to the instructions at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom
cat, 

It appears I need to download additional applications in order to 
correctly use FDS (Java Transaction API (JTA), Java Management 
Extensions (JMX)).  I have tried to download the JOTM 2.0.10.tgz  
from 
http://forge.objectweb.org/project/download.php?
group_id=19file_id=3926 

without success.  Once I try to unzip the 
file (I am running Windows XP Professional). I get the following 
error:  
 

Error reading header after processing 0 entries.



I've tried to download three different versions of JOTM, and also 
tried saving the tar as a zip file.  However, trying to open the 
WinZip file returns this error:  
 
Cannot open file: it does not appear to be a valid archive.  If you 
downloaded this file, try downloading the file again.


Has anyone been successful in downloading and opening the all 
important JOTM?  If so, could you tell me where you got it, how you 
were able to open the files?
 
Also, while  I was reading the installation instructions for Tomcat  
at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom
cat 

it is pretty complicated for a non-Java programmer to 
understand.  I asked one of our 6-year Veteran Java developers to 
help me with this and he said it was a pretty complicated process 
for someone w/o Java programming experience.  But he did say that if 
I can't download the JOTM, I won't be able to do whatever it is that 
Flex Data Services is supposed to do.  I say the latter because I am 
still in the Getting Started manual going through the last of the 
tutorials before I start reading Using Flex, so I'm not really 
sure what lessons I will be doing that require FDS to work correctly 
on my box.
 
Was I wrong to think that Flex was supposed to be geared at Front-
End Developers? 



Re: [flexcoders] Re: VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread Daniel Freiman

mx_internal is easy to access because it's just a namespace.

Simply import mx.core.mx_internal.  After the imports type the line:

use namespace mx_internal;


There should be a complete discussion if you just search through the mailing
list archives for 'mx_internal' specifically or you can just read up on
namespaces in general in the docs.

HOWEVER, mx_internal is not documented or stable.  If you use it and an
update to the framework is released, there is no guarantee that the update
will not break your code.  Use at your own risk.

- Dan Freiman

On 3/28/07, beecee1977 [EMAIL PROTECTED] wrote:


  P.S. If it's any easier to access an mx_internal variable than a
private variable (when sub-classing/extending a control) that'll work
too!

Cheers
Bill

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
beecee1977 [EMAIL PROTECTED]

wrote:

 Hi,

 I would normally spend more time trying to work this out first, but
 I'm under a bit of pressure... There appears to be a bug in the
 VideoDisplay code.

 vid.close() = within the videoDisplay a private variable called
 closeCalled is set to true.
 vid.play() = the closeCalled variable is set to be false in the
play
 function.

 Fine, but:
 vid.close() = closeCalled=true
 vid.load() = loadVideo()
 vid.play() = if (closeCalled==true) {loadVideo()}

 So if you load in the video this variable is not reset to false.
This
 means that the video gets loaded twice; once when the video is
loaded
 and once when the video is played...

 Anyway, all this is besides the point... I just want to know how to
 get around this. I've tried this:

 package libraries.utility
 {
 import mx.controls.VideoDisplay;

 public class NewVideoDisplay extends VideoDisplay
 {
 //private var closeCalled:Boolean = false;


 public function NewVideoDisplay()
 {
 super();
 }

 override public function load():void
 {
 super.load();
 closeCalled = false;
 }

 }
 }


 but naturally I cannot access the private variable closeCalled. How
 do I go about doing this?

 Thanks in advance
 Bill


 



RE: [flexcoders] Flex Data Services installation

2007-03-28 Thread Dimitrios Gianninas
should be as simple as:
 
1) under tomcat/webapps create a folder called test
2) extract the samples.war contents to the test folder you just created
3) start tomcat
4) goto http://localhost:8080/test and u should see the sample page and start 
using the demo apps
 
Dimitrios Gianninas
Developer
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of chqdzn
Sent: Wednesday, March 28, 2007 11:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Data Services installation



I am evaluating this software for purchase for our UI Development 
teams, 50+ people. I'm posting this question here because the FLEX 
forum is continually undergoing maintenance which is making it 
temporarily unavailable until 1:00pm PST. I'm on the east coast, 
and although I tried over several days to connect to this forum (all 
after 4pm EST), the FLEX forum is always unavailable.

The question I am trying to get answered is regarding Flex Data 
Services. I've downloaded the files according to the instructions 
at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#fle 
http://www.adobe.com/support/documentation/en/flex/2/install.html#fle 
xj2ee . 

I placed the files in my webapps directory running on 
tomcat. 

However, according to the instructions at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom 
cat, 

It appears I need to download additional applications in order to 
correctly use FDS (Java Transaction API (JTA), Java Management 
Extensions (JMX)). I have tried to download the JOTM 2.0.10.tgz 
from 
http://forge.objectweb.org/project/download.php? 
http://forge.objectweb.org/project/download.php? 
group_id=19file_id=3926 

without success. Once I try to unzip the 
file (I am running Windows XP Professional). I get the following 
error: 


Error reading header after processing 0 entries.

I've tried to download three different versions of JOTM, and also 
tried saving the tar as a zip file. However, trying to open the 
WinZip file returns this error: 

Cannot open file: it does not appear to be a valid archive. If you 
downloaded this file, try downloading the file again.

Has anyone been successful in downloading and opening the all 
important JOTM? If so, could you tell me where you got it, how you 
were able to open the files?

Also, while I was reading the installation instructions for Tomcat 
at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom 
cat 

it is pretty complicated for a non-Java programmer to 
understand. I asked one of our 6-year Veteran Java developers to 
help me with this and he said it was a pretty complicated process 
for someone w/o Java programming experience. But he did say that if 
I can't download the JOTM, I won't be able to do whatever it is that 
Flex Data Services is supposed to do. I say the latter because I am 
still in the Getting Started manual going through the last of the 
tutorials before I start reading Using Flex, so I'm not really 
sure what lessons I will be doing that require FDS to work correctly 
on my box.

Was I wrong to think that Flex was supposed to be geared at Front-
End Developers? 



 

-- 
WARNING
---
This electronic message and its attachments may contain confidential, 
proprietary or legally privileged information, which is solely for the use of 
the intended recipient.  No privilege or other rights are waived by any 
unintended transmission or unauthorized retransmission of this message.  If you 
are not the intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete it and all 
attachments from your system.  The reading, distribution, copying or other use 
of this message or its attachments by unintended recipients is unauthorized and 
may be unlawful.  If you have received this e-mail in error, please notify the 
sender.

AVIS IMPORTANT
--
Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
privilège ou à aucun autre droit si le présent message a été transmis 
involontairement ou s'il est retransmis sans son autorisation.  Si vous n'êtes 
pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, 
veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses 
pièces jointes, de votre système.  La lecture, la distribution, la copie ou 
tout autre usage du présent message ou de ses pièces jointes par des personnes 
autres que le destinataire visé ne sont pas autorisés et pourraient être 
illégaux.  Si vous avez reçu ce courrier électronique par erreur, veuillez en 
aviser l'expéditeur.



Re: RE: [flexcoders] HTML-like Table/Textbox behavior possible?

2007-03-28 Thread John Mark Hawley
...and if you have columns of varying percentage-based widths, you should be 
able to proportionally tweak those 100%'s in order to make the V/HBox setup 
work just the same as your HTML table.

-Mark Hawley

 
 From: Dimitrios Gianninas [EMAIL PROTECTED]
 Date: 2007/03/28 Wed AM 09:14:53 CST
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] HTML-like Table/Textbox behavior possible?
 
 Yes you can, but I recommend you do not use the Grid container, just VBoxes 
 and HBoxes will allow you to place items as you need them.
  
 mx:VBox width=100%
   mx:DateField width=100%/
   mx:DateField width=100%/
 /mx:VBox
  
 Dimitrios Gianninas
 Developer
 Optimal Payments Inc.
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
 missgiggygirl
 Sent: Wednesday, March 28, 2007 11:05 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] HTML-like Table/Textbox behavior possible?
 
 
 
 As a pilot project to see if we can make the move to flex, I am trying
 to convert some common widgets/screens that we use in the HTML/Ajax
 world into Flex.
 
 One widget that we have uses a standard HTML table based on
 percentages (100% width, various percentage TDs) that has many date
 picker thingies, which are made up of a text field in one TD and the
 calendar icon in an adjacent TD. In HTML it is pretty easy to specify
 percentage widths for the TDs as well as the text fields, and to have
 the table and all of its contents scale accordingly as the table or
 window is resized. 
 
 Is this possible -- and PRACTICAL! -- using the existing date picker
 and grid container in Flex?
 
 Specifically, say that when the user's window is 100% of the screen. 
 Well in that case, the date picker should be 100% of its maximum
 width, the width of the TD holding it (if we are using a grid), which
 say is 110 pixels. If we reduce the window to half the width, is it
 possible to make all of the elements of the grid -- including the date
 picker widget -- to also reduce by half, or 55 pixels for the text
 field (the icon stays the same size)?
 
 I should point out that one page in one of our web apps has 15 date
 pickers on it, so doing a manual calculation of how wide to make each
 datepicker seems impracticle.
 
 Now, I do appreciate that Flex is not HTML, so if the answer is it is
 not practical for Flex Apps to have this behavior then that is fine,
 I just need a definitive answer that I cannot provide as a newbie. 
 (Maybe I should not be trying to do any layout with a grid to begin with?)
 
 Thanks,
 Ann
 
 
 
  
 
 -- 
 WARNING
 ---
 This electronic message and its attachments may contain confidential, 
 proprietary or legally privileged information, which is solely for the use of 
 the intended recipient.  No privilege or other rights are waived by any 
 unintended transmission or unauthorized retransmission of this message.  If 
 you are not the intended recipient of this message, or if you have received 
 it in error, you should immediately stop reading this message and delete it 
 and all attachments from your system.  The reading, distribution, copying or 
 other use of this message or its attachments by unintended recipients is 
 unauthorized and may be unlawful.  If you have received this e-mail in error, 
 please notify the sender.
 
 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir des 
 renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
 seul usage du destinataire visé.  L'expéditeur original ne renonce à aucun 
 privilège ou à aucun autre droit si le présent message a été transmis 
 involontairement ou s'il est retransmis sans son autorisation.  Si vous 
 n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par 
 erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que 
 toutes ses pièces jointes, de votre système.  La lecture, la distribution, la 
 copie ou tout autre usage du présent message ou de ses pièces jointes par des 
 personnes autres que le destinataire visé ne sont pas autorisés et pourraient 
 être illégaux.  Si vous avez reçu ce courrier électronique par erreur, 
 veuillez en aviser l'expéditeur.
 
 
 

--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

* Your use of Yahoo! Groups is subject to:

RE: [flexcoders] Flex Data Services installation

2007-03-28 Thread Messer, Jon
Are you sure you need to use FDS? I think you will be much better off
evaluating Flex first as a UI development environment. If you then
decide you like it for UI and you know you will need to use FDS then
evaluate FDS after you have a grip on Flex.

 

A good way to check out FDS is to use the packaged Tomcat standalone
that goes with this tutorial
http://www.adobe.com/devnet/flex/articles/java_testdrive.html you just
unzip it and run it.

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of chqdzn
Sent: Wednesday, March 28, 2007 8:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Data Services installation

 

I am evaluating this software for purchase for our UI Development 
teams, 50+ people. I'm posting this question here because the FLEX 
forum is continually undergoing maintenance which is making it 
temporarily unavailable until 1:00pm PST. I'm on the east coast, 
and although I tried over several days to connect to this forum (all 
after 4pm EST), the FLEX forum is always unavailable.

The question I am trying to get answered is regarding Flex Data 
Services. I've downloaded the files according to the instructions 
at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#fle
http://www.adobe.com/support/documentation/en/flex/2/install.html#fle 
xj2ee . 

I placed the files in my webapps directory running on 
tomcat. 

However, according to the instructions at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom 
cat, 

It appears I need to download additional applications in order to 
correctly use FDS (Java Transaction API (JTA), Java Management 
Extensions (JMX)). I have tried to download the JOTM 2.0.10.tgz 
from 
http://forge.objectweb.org/project/download.php?
http://forge.objectweb.org/project/download.php? 
group_id=19file_id=3926 

without success. Once I try to unzip the 
file (I am running Windows XP Professional). I get the following 
error: 


Error reading header after processing 0 entries.

I've tried to download three different versions of JOTM, and also 
tried saving the tar as a zip file. However, trying to open the 
WinZip file returns this error: 

Cannot open file: it does not appear to be a valid archive. If you 
downloaded this file, try downloading the file again.

Has anyone been successful in downloading and opening the all 
important JOTM? If so, could you tell me where you got it, how you 
were able to open the files?

Also, while I was reading the installation instructions for Tomcat 
at: 
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom
http://www.adobe.com/support/documentation/en/flex/2/install.html#tom 
cat 

it is pretty complicated for a non-Java programmer to 
understand. I asked one of our 6-year Veteran Java developers to 
help me with this and he said it was a pretty complicated process 
for someone w/o Java programming experience. But he did say that if 
I can't download the JOTM, I won't be able to do whatever it is that 
Flex Data Services is supposed to do. I say the latter because I am 
still in the Getting Started manual going through the last of the 
tutorials before I start reading Using Flex, so I'm not really 
sure what lessons I will be doing that require FDS to work correctly 
on my box.

Was I wrong to think that Flex was supposed to be geared at Front-
End Developers? 

 



[flexcoders] Re: How heavyweight is data binding?

2007-03-28 Thread One Person
Collin,

We are using a similar approach for our I18N strings. We don't have 
nearly as many strings are you have indicated you are using, but we 
are wondering the same thing. Will a large number of data bound 
string cause problems in the app?

We are trying to come up with a different plan if we find something 
else we will share it.

But what have you discovered since last year. It has been several 
months since your last post and I was wondering if you had discovered 
anything new.

Thanks,
Mike Collins

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

 Yes, I have considered and ruled out Flex 2's localization 
features.  I find
 it a ludicrous idea to have to compile resource strings directly 
into a SWF
 or SWC.  Maybe I am still missing something about how Flex 
implements it and
 please tell me if I am.  I find two serious issues with this method
 1. You have to compile your application for EACH language you want 
to
 support.  So if I want to support 30 languages I have to compile my
 application 30 times, storing the output in different directories, 
etc.,
 etc..  Add to this that in order to support skinning I have to 
again compile
 the application for each skin.  So if I have 30 languages and I 
want to give
 the option of 30 skins for each language that = 30 * 30 = 900 
compiled
 instances of the same application.  Some may say why would have 
that many
 skins.  I say why not?  This is EASILY accomplished with HTML.  And 
you
 can't ask me 'why support 30 languages'.  Anybody who has done any 
kind of
 enterprise development knows the answer to that question.
 2. Related to #1 but still I don't understand why you would want to 
compile
 the i18n strings *directly* into the SWF.  This means any time I 
want to
 make a single update to any string in any language I have to 
recompile
 EVERYTHING.  Wow, that is insanity.
 
 Now as for my solution it is really quite simple. It is simply a 
singleton
 class that loads an XML file containing the text strings.  The 
loading of
 this file is part of my bootstrap process which also loads the 
application
 configuration, inits remoting, etc..  The XML file looks like:
 ?xml version=1.0 encoding=UTF-8?
 language translation=en_US
 key id=$I18N_PROGRAMProgram/key
 key id=$I18N_POINTSPoints/key
 
 
 To get a I18N string you simple call Locale.getKey($I18N_PROGRAM) 
which
 does some other error checking but basically the only brains is:
var value:String = _langXML.key.(@id == key);
 E4X makes this *incredibly* easy and even as I mentioned could even 
allow
 you to change every piece of text in your entire running application
 instantly by simply loading another xml file.  The original 
question of this
 thread though is 'is having that many bindings feasible'.  If it 
isn't I
 don't really mind as all it means is telling the user to restart the
 application.  Since users don't exactly switch languages often this 
isn't an
 unreasonable thing to ask.  The other argument is that since (I 
assume) a
 SWF is compressed somewhat the download time for this may be more.  
This is
 true but not by much.  I have also added a feature to modularize 
the strings
 so that each languge will be broken up into many files and they 
will be only
 loaded as each module in the app is loaded (this is a multi-module,
 multi-swf app)
 
 If there are any better methods I would love to hear them.  By all 
means
 lets start a discussion on it.  But I don't see a single advantage 
to using
 Flex's built in methods.
 
 Regards,
 Collin Peters
 
 
 On 12/25/06, greg h [EMAIL PROTECTED] wrote:
 
Collin,
 
  But a side question Collin, had you considered and ruled out Flex 
2's
  localization 
featureshttp://livedocs.macromedia.com/flex/2/docs/0898.htmlwhic
h are implemented at compile time, rather than using run time 
bindings?
  If so, and if you are willing to share, I am interested to hear 
what your
  considerations were.
 
 
 
 
 g
 
 
  On 12/24/06, Collin Peters [EMAIL PROTECTED] wrote:
  
   Merry Christmas all!
  
   I am wondering how heavyweight databinding is.  What I have is 
a class
   which handles all the I18N in my application.  It is a simple 
class
   which loads an XML containing all the I18N strings and then 
provides a
   getKey() function to grab strings out.
  
   What I have discovered is that I can directly bind labels and 
such in
   MXML directly to the XML i18n string.  I am wondering though if 
this
   is a smart idea.  The completed app could have a thousand or 
more i18n
   strings.  Would it unnecessarily stress the application to have 
each
   one of these thousand strings setup with data binding?
  
   I'm wondering about increased memory and CPU usage.  Not much is
   gained from the binding except slightly less code and I guess 
the
   possibility of changing all strings in the application to 
another
   language by simply loading another XML file.  But again, I 
wonder how
   fast this 

[flexcoders] DataGrid cell effect

2007-03-28 Thread Nick Durnell
Hi all,

I'd like my datagrids to have an effect whereby a cell's background 
briefly flashes a different colour when its data changes.  For example 
if row 2 gets updated and column 4 has changed value, I want that cell 
(and that cell only) to flash to draw the attention of the user.

Does anybody have any ideas as to the best way of achieving this?  
Performance is paramount as my datagrids can get quite large and 
although the number of rows are fairly constant, the row data can 
update quite frequently.

Thanks,

Nick.




[flexcoders] Re: Connect and Retrieve from MS SQL Server 2005

2007-03-28 Thread iko_knyphausen

If you are using the full version of SQL 2005 (meaning not Express) you
may be able to use the built-in Web Services Endpoints ... Have not
tried it myself, but I think in theory that should work.

-Iko
--- In flexcoders@yahoogroups.com, Clint Tredway [EMAIL PROTECTED] wrote:

 you can use just about any server side language (ColdFusion, PHP, ASP,
.NET,
 etc) to connect to SQL Server

 On 3/28/07, hugocorept [EMAIL PROTECTED] wrote:
 
 
  Hello all,
 
  In your opnion, witch is the simple/best way to connect a
MSSQLServer
  2005.
 
  I prefer java-less..
 
  Thank you , Very Much!
 
 
 



 --
 http://indeegrumpee.spaces.live.com/






[flexcoders] Re: How heavyweight is data binding?

2007-03-28 Thread Paul DeCoursey
I'm going to jump in here and say that if you try binding a very large
number of strings you are going to have a performance penalty. I think
the only benefit to not using the built in localization and
ResourceBundles is a user could switch locales dynamically within the
app and not have to reload the app.  I considered that a positive and
looked at going that route.  I found however that it did slow the app
down when the user switched locales mid stream. In the end I went back
 to using the ResourceBundle and I am much happier.  The most common
use case is that a user would select the locale at login or startup
and not change it.  well actually the most common use case is the
browser will tell us the users locale and we serve the correct swf
file based on that and the user never has to select anything.  In the
end it's less code, less overhead from binding and gives us much more
control over the appearance of a specific locale.

Paul


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

 Collin,
 
 We are using a similar approach for our I18N strings. We don't have 
 nearly as many strings are you have indicated you are using, but we 
 are wondering the same thing. Will a large number of data bound 
 string cause problems in the app?
 
 We are trying to come up with a different plan if we find something 
 else we will share it.
 
 But what have you discovered since last year. It has been several 
 months since your last post and I was wondering if you had discovered 
 anything new.
 
 Thanks,
 Mike Collins
 
 --- In flexcoders@yahoogroups.com, Collin Peters cpeters@ 
 wrote:
 
  Yes, I have considered and ruled out Flex 2's localization 
 features.  I find
  it a ludicrous idea to have to compile resource strings directly 
 into a SWF
  or SWC.  Maybe I am still missing something about how Flex 
 implements it and
  please tell me if I am.  I find two serious issues with this method
  1. You have to compile your application for EACH language you want 
 to
  support.  So if I want to support 30 languages I have to compile my
  application 30 times, storing the output in different directories, 
 etc.,
  etc..  Add to this that in order to support skinning I have to 
 again compile
  the application for each skin.  So if I have 30 languages and I 
 want to give
  the option of 30 skins for each language that = 30 * 30 = 900 
 compiled
  instances of the same application.  Some may say why would have 
 that many
  skins.  I say why not?  This is EASILY accomplished with HTML.  And 
 you
  can't ask me 'why support 30 languages'.  Anybody who has done any 
 kind of
  enterprise development knows the answer to that question.
  2. Related to #1 but still I don't understand why you would want to 
 compile
  the i18n strings *directly* into the SWF.  This means any time I 
 want to
  make a single update to any string in any language I have to 
 recompile
  EVERYTHING.  Wow, that is insanity.
  
  Now as for my solution it is really quite simple. It is simply a 
 singleton
  class that loads an XML file containing the text strings.  The 
 loading of
  this file is part of my bootstrap process which also loads the 
 application
  configuration, inits remoting, etc..  The XML file looks like:
  ?xml version=1.0 encoding=UTF-8?
  language translation=en_US
  key id=$I18N_PROGRAMProgram/key
  key id=$I18N_POINTSPoints/key
  
  
  To get a I18N string you simple call Locale.getKey($I18N_PROGRAM) 
 which
  does some other error checking but basically the only brains is:
 var value:String = _langXML.key.(@id == key);
  E4X makes this *incredibly* easy and even as I mentioned could even 
 allow
  you to change every piece of text in your entire running application
  instantly by simply loading another xml file.  The original 
 question of this
  thread though is 'is having that many bindings feasible'.  If it 
 isn't I
  don't really mind as all it means is telling the user to restart the
  application.  Since users don't exactly switch languages often this 
 isn't an
  unreasonable thing to ask.  The other argument is that since (I 
 assume) a
  SWF is compressed somewhat the download time for this may be more.  
 This is
  true but not by much.  I have also added a feature to modularize 
 the strings
  so that each languge will be broken up into many files and they 
 will be only
  loaded as each module in the app is loaded (this is a multi-module,
  multi-swf app)
  
  If there are any better methods I would love to hear them.  By all 
 means
  lets start a discussion on it.  But I don't see a single advantage 
 to using
  Flex's built in methods.
  
  Regards,
  Collin Peters
  
  
  On 12/25/06, greg h flexsavvy@ wrote:
  
 Collin,
  
   But a side question Collin, had you considered and ruled out Flex 
 2's
   localization 
 featureshttp://livedocs.macromedia.com/flex/2/docs/0898.htmlwhic
 h are implemented at compile time, rather than using run time 
 bindings?
  

[flexcoders] Re: VideoDisplay bug?! How to extend to change a private variable?

2007-03-28 Thread beecee1977
That did the trick thanks. 

For when I get a chance I should really log a bug... anyone got the 
url for that handy?

For anyone else with this problem, so long as you know you'll be 
ALWAYS calling load() before play(), having done a close() this will 
do the job:

package libraries.utility
{
import mx.controls.VideoDisplay;
import mx.core.mx_internal;

use namespace mx_internal;


public class NewVideoDisplay extends VideoDisplay
{
public function NewVideoDisplay()
{
super();
}

override public function close():void
{
//the real close sets a variable closeCalled
//which causes the next video to be loaded 
after
//both load() and play().

//because we always load before playing we 
can avoid
//setting this variable.. 
mx_internal::videoPlayer.close()
}   
}
}

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

 mx_internal is easy to access because it's just a namespace.
 
 Simply import mx.core.mx_internal.  After the imports type the line:
 
 use namespace mx_internal;
 
 
 There should be a complete discussion if you just search through 
the mailing
 list archives for 'mx_internal' specifically or you can just read 
up on
 namespaces in general in the docs.
 
 HOWEVER, mx_internal is not documented or stable.  If you use it 
and an
 update to the framework is released, there is no guarantee that the 
update
 will not break your code.  Use at your own risk.
 
 - Dan Freiman
 
 On 3/28/07, beecee1977 [EMAIL PROTECTED] wrote:
 
P.S. If it's any easier to access an mx_internal variable than a
  private variable (when sub-classing/extending a control) that'll 
work
  too!
 
  Cheers
  Bill
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  beecee1977 billcahill@
 
  wrote:
  
   Hi,
  
   I would normally spend more time trying to work this out first, 
but
   I'm under a bit of pressure... There appears to be a bug in the
   VideoDisplay code.
  
   vid.close() = within the videoDisplay a private variable called
   closeCalled is set to true.
   vid.play() = the closeCalled variable is set to be false in the
  play
   function.
  
   Fine, but:
   vid.close() = closeCalled=true
   vid.load() = loadVideo()
   vid.play() = if (closeCalled==true) {loadVideo()}
  
   So if you load in the video this variable is not reset to false.
  This
   means that the video gets loaded twice; once when the video is
  loaded
   and once when the video is played...
  
   Anyway, all this is besides the point... I just want to know 
how to
   get around this. I've tried this:
  
   package libraries.utility
   {
   import mx.controls.VideoDisplay;
  
   public class NewVideoDisplay extends VideoDisplay
   {
   //private var closeCalled:Boolean = false;
  
  
   public function NewVideoDisplay()
   {
   super();
   }
  
   override public function load():void
   {
   super.load();
   closeCalled = false;
   }
  
   }
   }
  
  
   but naturally I cannot access the private variable closeCalled. 
How
   do I go about doing this?
  
   Thanks in advance
   Bill
  
 
   
 





[flexcoders] Re: Custom Component Width when 100%?

2007-03-28 Thread Nate Pearson
In my measure function I have:
 
 override protected function measure():void{
measuredWidth = getExplicitOrMeasuredWidth()
measuredHeight = getExplicitOrMeasuredHeight()
 } 

That makes them both zero though.  although my updateDisplayList gets
called twice my measure function is only called once.  How should I be
setting my measure function?  If we get this worked out I think I'll
be good to go, if not ill post the code.  Thanks so much for your help
Alex.

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

 In theory, if you started with UIComponent, you need to implement a
 measure() method to tell the parent how big you want to be.  That parent
 will then call setActualSize which should result in your
 updateDisplayList being called with non-zero values.  Again, if
 extending UIComponent, you should be able to draw or add shapes in
 updateDisplayList without causing a second call to updateDisplayList
 providing that your measure() method returns the same values and nobody
 else called invalidateDisplayList.
  
 It feels like you're not quite following the formula somehwere.  You
 could post the class code I suppose...
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Nate Pearson
 Sent: Tuesday, March 27, 2007 4:37 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Custom Component Width when 100%?
 
 
 
 Ahhh HA! I was reading the adobe documentation and it turns out that
 when you do addchild() it calls updateDisplayList again. This is why
 my program wasn't working, I had an infinite loop when I called
 addchild.
 
 I fixed it by adding an if function with a flag.
 if (_newBackground){
 ...
 }
 
 Since my updatedisplaylist was being called twice, once with 0
 unscaledWidth and once with an unscaledWidth, I had to add another
 condition.
 if (_newBackground  unscaledWidth != 0) {
 ...
 }
 
 Now I can't seem to get the component to scale with the rest of the
 app when the browser window opens. I'm going to start a new thread
 for that question.
 
 -Nate
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Nate Pearson napearson99@ wrote:
 
  So I think i got unScaledWidth to work during UpdateDisplayList. When
  I debug it seems like it's called twice. Once with 0 unscaledWidth
  and once with the correct unScaledWidth. Should I be worrying about
  this? I didn't override the measure function. Should I?
  
  So to draw in UpdateDisplayList you have to manipulate graphics like
 this:
  graphics.lineStyle(0,0x00, 0);
  graphics.beginFill(0xff, 1);
  graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
  graphics.endFill(); 
  
  But what if I want to draw shapes or UIcomponents? That's why It
  wasn't working for me before, i was drawing like this:
  var shape:Shape = new Shape();
  shape.graphics.lineStyle(0,0x00, 0);
  shape.graphics.beginFill(0xff, 1);
  shape.graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
  shape.graphics.endFill();
  //When i do the add child my program won't load!
  //addChild(shape);
  
  I watched Ely's component video and it says I can add UIComponents,
  sprites and shapes to UpdateDisplayList. Does anyone know what I'm
  doing wrong?
  
  Thanks!
  
  -Nate
  
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
  
   You can always call validateNow() to force validation, but you
 shouldn't
   be drawing in commitProperties in most cases. Most drawing should
 be in
   updateDisplayList
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
   Behalf Of Nate Pearson
   Sent: Monday, March 26, 2007 3:53 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 
   Subject: [flexcoders] Re: Custom Component Width when 100%?
   
   
   
   I can't seem to get the width/height at measure() or
   updateDisplayList(). Is there a specific function I have to call?
   
   Isn't there a way to get the height/width before measure? I'm
 drawing
   during commit properties so I would like to get it then. 
   
   Thanks for your reply.
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
   , Alex Harui aharui@ wrote:
   
It depends on when you ask. Components have a multi-stage
 validation
mechanism. Their properties get set in stage1, measured in stage2,
layed out in stage 3. Until measurement, they are zero
 width/height



From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
   [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
   ] On
Behalf Of Nate Pearson
Sent: Monday, March 26, 

[flexcoders] Re: Scaling Custom Components

2007-03-28 Thread Nate Pearson
Thanks everyone for your response.  Now that I understand how children
are added/removed i can take out some of my work arounds in other
projects!

The scaling works great now.

New question:
Is this the best way to scale?  Is it expensive to remove and re-add
all the components when I want to redraw?  In this component I have
graphics and text and it seems really fast.  But what if I used more
complex things like sprites or containers?  Would removing all of them
then re-adding them be the best way to redraw?

Thanks guys. 

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

 If you just want to remove all the children, do something like this:
 
 while (this.numChildren()  0)
   this.removeChildAt(0);
 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Nope, it is essentially an array.  If I have
   
  var a:Array = [ Nate, Alex];
  a[2] = Bjorn;
  a.shift();
  a[2] is no longer Bjorn, you are now at a[1].
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of Bjorn Schultheiss
  Sent: Tuesday, March 27, 2007 6:19 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Scaling Custom Components
  
  
  
  Hey Alex,
  
  if 0 == childA
  can you insert childB at 99 for example.
  
  if so if you remove childA does childB's index change?
  
  can you ensure that you're child will remain at an index?
  
  
  
  On 28/03/2007, at 11:12 AM, Alex Harui wrote:
  
  
  
  
  Children renumber after one is removed
   
  0 = childA
  1 = childB
  2 = childC
   
  After removeChildAt(0)
   
  0 = childB
  1 = childC
   
  Look at the code for removeAllChildren.
   
  It will either removeChildAt(0) j times or iterate backwards.
  
  
  
  From: flexcoders@yahoogroups.com
  [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson
  Sent: Tuesday, March 27, 2007 5:22 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Scaling Custom Components
  
  
  
  I have a custom component that adds multiple shapes during
  UpdateDisplayList. When I scale the browser it calls update
  display
  list and draws over all of my shapes.
  
  I have tried:
  
  j = this.numChildren;
  for (i=0; ij; i++){
  this.removeChildAt(i);
  }
  
  Before I write redraw my shapes in UpdateDisplayList. I always
  get an
  outofbounds error after i exceed numAutomationChildren(?). If i
  try
  the same loop with numAutomationChildren nothing disappears.
  
  It won't let me call this.removeAllChildren (i think because I'm
  extending an UIComponent and not a Container)! Isnt there a way
  for
  me to get all those shapes outta there?
  
  Maybe I'm taking the wrong approach.
  
  Thanks in advance,
  
  Nate
 





[flexcoders] space between MenuBar - menuitems

2007-03-28 Thread Vinoth Babu
Hi All,
   
  How to give a custom gap between two menuItems in a menubar component
   
  For e.g.
   
  Assume menubar contains File,Edit, View,... menuitems
   
  I need to give custom gap between File and Edit 
   
  Thanks,
  Vinoth

 
-
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

[flexcoders] How to invoke WebService via Proxy script?

2007-03-28 Thread rzilist
Hi folks,

I'm consuming webservice from a server with no crossdomain file. So, 
I've generated a proxy script based on wsdl file. The proxy script 
resides on the same server as my SWF file (I have no access to the 
data server, and FDS is not an option). Now, in my MXML file, I have 
mx:WebService, and wsdl=myProxyScript useProxy=false ... define 
my operation, etc.
When I run it, I get the HTTP request error. I know I probably don't 
do it right, but I'm not sure how else I invoke a proxy script that 
talks to WebService. I see all the web methods inside proxy script, 
but I guess I'm just so dumb, that I can't figure it out. 
Please help!
Thanks,
/Roman





[flexcoders] Xml result / repeater weirdness (w Rails)

2007-03-28 Thread rowanhick
Hey Everyone, 

I'm wondering if someone can shed light on this, I've had a search of
the archives but no joy and don't seem to be missing anything obvious. 

PROBLEM: 
I have a repeater iterating over a dataproviders currentItem, which if
only one element is in the provider works perfectly fine, as soon as
two elements exist the repeater is dumping to screen the xml tags, and
the content within them. I will explain  

DESCRIPTION:
I have my little flex up hooked up to rails. I've got a fairly
standard Order 1 - 1-* Order Lines association, returned to my flex
app. Xml looks like so.. simplified. 

order
id type=integer1001/id
  order_lines
order_line
  descriptionMy product a/description
  id type=integer2773/id
  product_id type=integer1/product_id
  qty_ordered type=integer500/qty_ordered
/order_line
order_line
  descriptionMy product b/description
  id type=integer2774/id
  product_id type=integer2/product_id
  qty_ordered type=integer500/qty_ordered
/order_line
  /order_lines
/order


Now I'm getting at the order lines through a repeater control, where
_selectedOrder was a service call to the rails app which returned the
above xml. 

mx:Repeater id=rptOrderLinesView
dataProvider={_selectedOrder.order_lines} width=100% maxHeight=8
mx:HBox
mx:Text
text={rptOrderLinesView.currentItem.order_line.description}
height=16/
mx:Text
text={rptOrderLinesView.currentItem.order_line.qty_ordered}
height=16/
/mx:HBox
/mx:Repeater  

So,if I have just one element in the order lines element then I get
this... 

Product A  500

If I have two elements, I get this, tags and all ?  

descriptionProduct A/description qty_ordered
type=integer500/qty_ordered


Now I've tried return the result set via XML or E4X. I've looked at
the result set via String transform into a debug panel, looks a-ok
(there's a few more attributes than what I've shown above, but I don't
think they contribute to it) 

Any ideas ? 


Thanks kindly, 

Rowan






Re: [flexcoders] Problem with measureHTMLText when using different font-sizes

2007-03-28 Thread masi woermann

Thanks for the quick reply. I've changed the code in the example as you said
and with validation it works like a charm. Somehow it does not  measures
accurately in the app where I actually need it, but that problem obviously
resides somewhere else.

Cheers
Masi


[flexcoders] Draw Icon in Text Area

2007-03-28 Thread billbejeck
Hi,

I have an application where users can add comments about contents of a
file that is displayed in a TextArea.  The user selects some text,
right clicks and a dialog pops up for the user to enter some comments.
 I would like to embed an icon at the end of the selected text range,
but so far I have been unsuccessful in doing so.  Any ideas on how I
could do this?

Thanks,
Bill



[flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-28 Thread nxzone
You are right. Now i use a generic library (myLib.swc) as RSL. The RSL
is loaded first and my problem is solve...

I can use RSL or link-report to load repetitive class, but what is the
advantage to use link-report?

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

 Because it is a common problem.  Try putting a ToggleButtonBar in the
 main app first to prove it one way or another.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of nxzone
 Sent: Tuesday, March 27, 2007 2:36 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :
 
 
 
 Why you think this bug is due to this cause? Why loading the shared
 content before should solve the Type Coercion failed: cannot convert
 mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar ?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Check out the shared code portion of my modules presentation at
  blogs.adobe.com/aharui
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of nxzone
  Sent: Monday, March 26, 2007 2:27 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed
 :
  
  
  
  Same problem ...
  Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
  ToggleButtonBar not a buttonbar)
  var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , lrhazi lrhazi@ wrote:
  
   I get this annoying error often:
   
   TypeError: Error #1034: Type Coercion failed: cannot convert
   mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar
   
   My app uses Modules and has a user login/logout functionality... I
 get
   the above error systematically when i logout of an account and login
   to a second one.
   
   Any hints on what to look for?
   
   Thank you very much.
   Mohamed~
  
 





[flexcoders] Variable width ListItems

2007-03-28 Thread Shaun
I have a horizontal list with items that can have variable widths.  
However, all items end up with the same width as the first item in the 
list.  How do I allow variable width list items?  

Is there something similar to the datagrid's variableRowHeight setting 
that I'm missing?

Thanks,
Shaun



RE: [flexcoders] Re: Bad Results referencing local variables in nested loops

2007-03-28 Thread Gordon Smith
 I forwarded this to a compiler engineer. 
 
He says that it looks like a compiler bug, but he thinks he found a
workaround: Don't name the three Function objects in verifyContainer().
For example, instead of passing
 
function myContainerFunction( itemNo : int, numItems : int, items :
Array ) : Boolean { ... }

to enumerateItems(), pass
 
function( itemNo : int, numItems : int, items : Array ) : Boolean {
... }
 
He said this seems to make it work.
 
- Gordon
 


From: Gordon Smith 
Sent: Tuesday, March 27, 2007 8:55 PM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Re: Bad Results referencing local variables in
nested loops


I noticed two peculiarities in your code: You declare
myAnimationFunction() and myEventFunction() in verifyContainer() to
return void rather than Boolean. But when I declare them to return
Boolean and actually return true, I still see your problem.
 
In stepping through it in the FlexBuilder debugger, it appears that the
scope chain is different when the second item is processed than when the
first one was. I think you've found an AS3 compiler codegen bug
involving nested anonymous functions. I'll forward this to a compiler
engineer.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rod Perkins
Sent: Tuesday, March 27, 2007 5:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Bad Results referencing local variables in
nested loops



I had a typo in the post for a line in the setup function. The line:

[v: + vItemNo +  i: + itemNo +  a:  + aItemNo +  e:  + 
eItemNo + ]

should be:

[v: + pageNo+  i: + itemNo +  a:  + aItemNo +  e:  + eItemNo 
+ ]

- rod

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

 
 I have been having a great time using ActionScript 3.0 and Flex 
but 
 I have encountered problems which seem to be caused by Flexbuilder 
 or the Flashplayer runtime. The following problem is based on a 
 situation I have in my application uses a data structure of 
embedded 
 objects. I replicated the problem using arrays instead of the 
 classes I had used. The example may seemed contrived but 
reproduces 
 the problem without duplicating the complexity of my application.
 
 The structure was based on data structure of page objects, which 
 contains several cell items. Each item has a list of animations, 
 and each animation has a list trigger events references. So the 
 nested structure looked like the following:
 
 Pages (instance 1)
 Item (instance 1)
 Animation (instance 1)
 Events (instance 1)
 Events (instance 2)
 Animation (instance 2)
 Events (instance 1)
 Events (instance 2)
 Item (instance 2)
 Animation (instance 1)
 Events (instance 1)
 Events (instance 2)
 Animation (instance 2)
 Events (instance 1)
 Events (instance 2)
 
 The setup function in my example creates this structure using 
 arrays. The function goodResult traverses the structure using 
 nested for-loops. Nested local variables at different scoping 
 levels are referenced and displayed during the inner most loop for 
 the Events (instance 1  2). This produces the expected result. 
 Good Results
 500 200 [v:0 i:0 a: 0 e: 0]
 500 200 [v:0 i:0 a: 0 e: 1]
 500 200 [v:0 i:0 a: 1 e: 0]
 500 200 [v:0 i:0 a: 1 e: 1]
 500 200 [v:0 i:1 a: 0 e: 0]
 500 200 [v:0 i:1 a: 0 e: 1]
 500 200 [v:0 i:1 a: 1 e: 0]
 500 200 [v:0 i:1 a: 1 e: 1]
 
 The badResult function traverses the structure using the OO 
 technique of enumeration (iterator) functions. Among other 
reasons, 
 I used this approach to make the code more readable and compact by 
 hiding the loop from the caller and the typecasting the values 
 automatically. The caller is required to send a Function which is 
 then called during each pass (iterator) ofthe loop. The nested 
 local variables this time are not displayed properly. During the 
 first call, the results for Events (instance 1) is correct, but 
 Events (instance 2) is incorrect. Subsequent calls to 
 the badResult function display erroneous results. 
 
 Bad Results - first iteration - first event loop good, second loop 
 bad
 500 200 [v:0 i:0 a: 0 e: 0]
 500 200 [v:0 i:0 a: 0 e: 1]
 500 200 [v:0 i:0 a: 1 e: 0]
 500 200 [v:0 i:0 a: 1 e: 1]
 500 59369881 [v:0 i:1 a: 0 e: 0]
 500 59369881 [v:0 i:1 a: 0 e: 1]
 500 59369881 [v:0 i:1 a: 1 e: 0]
 500 59369881 [v:0 i:1 a: 1 e: 1]
 Bad Results - second iteration - both loops bad
 2 500 [v:0 i:0 a: 0 e: 0]
 2 500 [v:0 i:0 a: 0 e: 1]
 2 500 [v:0 i:0 a: 1 e: 0]
 2 500 [v:0 i:0 a: 1 e: 1]
 2 500 [v:0 i:1 a: 0 e: 0]
 2 500 [v:0 i:1 a: 0 e: 1]
 2 500 [v:0 i:1 a: 1 e: 0]
 2 500 [v:0 i:1 a: 1 e: 1]
 Bad Results - third iteration - both loops bad
 2 500 [v:0 i:0 a: 0 e: 0]
 2 500 [v:0 i:0 a: 0 e: 1]
 2 500 [v:0 i:0 a: 1 e: 0]
 2 500 [v:0 i:0 a: 1 e: 1]
 2 500 [v:0 i:1 a: 0 e: 0]
 2 500 [v:0 i:1 a: 0 e: 1]
 2 500 [v:0 i:1 a: 1 e: 0]
 2 500 [v:0 i:1 a: 1 e: 1]
 
 I don't know if the 

[flexcoders] Re: Scaling Custom Components

2007-03-28 Thread Nate Pearson
The browser window is resizing.  How would I just set the scaleX,
scaleY in that situation?  By setting those would i redraw for me?

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

 removing and readding is a bit expensive.  Are you scaling the content
 of a component?  You should just set the scaleX,scaleY and reposition.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Nate Pearson
 Sent: Wednesday, March 28, 2007 9:57 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Scaling Custom Components
 
 
 
 Thanks everyone for your response. Now that I understand how children
 are added/removed i can take out some of my work arounds in other
 projects!
 
 The scaling works great now.
 
 New question:
 Is this the best way to scale? Is it expensive to remove and re-add
 all the components when I want to redraw? In this component I have
 graphics and text and it seems really fast. But what if I used more
 complex things like sprites or containers? Would removing all of them
 then re-adding them be the best way to redraw?
 
 Thanks guys. 
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , g_odds g_odds@ wrote:
 
  If you just want to remove all the children, do something like this:
  
  while (this.numChildren()  0)
  this.removeChildAt(0);
  
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
  
   Nope, it is essentially an array. If I have
   
   var a:Array = [ Nate, Alex];
   a[2] = Bjorn;
   a.shift();
   a[2] is no longer Bjorn, you are now at a[1].
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
   Behalf Of Bjorn Schultheiss
   Sent: Tuesday, March 27, 2007 6:19 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 
   Subject: Re: [flexcoders] Scaling Custom Components
   
   
   
   Hey Alex,
   
   if 0 == childA
   can you insert childB at 99 for example.
   
   if so if you remove childA does childB's index change?
   
   can you ensure that you're child will remain at an index?
   
   
   
   On 28/03/2007, at 11:12 AM, Alex Harui wrote:
   
   
   
   
   Children renumber after one is removed
   
   0 = childA
   1 = childB
   2 = childC
   
   After removeChildAt(0)
   
   0 = childB
   1 = childC
   
   Look at the code for removeAllChildren.
   
   It will either removeChildAt(0) j times or iterate backwards.
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com ] On Behalf Of Nate Pearson
   Sent: Tuesday, March 27, 2007 5:22 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 
   Subject: [flexcoders] Scaling Custom Components
   
   
   
   I have a custom component that adds multiple shapes during
   UpdateDisplayList. When I scale the browser it calls update
   display
   list and draws over all of my shapes.
   
   I have tried:
   
   j = this.numChildren;
   for (i=0; ij; i++){
   this.removeChildAt(i);
   }
   
   Before I write redraw my shapes in UpdateDisplayList. I always
   get an
   outofbounds error after i exceed numAutomationChildren(?). If i
   try
   the same loop with numAutomationChildren nothing disappears.
   
   It won't let me call this.removeAllChildren (i think because I'm
   extending an UIComponent and not a Container)! Isnt there a way
   for
   me to get all those shapes outta there?
   
   Maybe I'm taking the wrong approach.
   
   Thanks in advance,
   
   Nate
  
 





[flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-28 Thread nxzone
My question was more why should I use link-report? If i have a RSL
library, each module or application that link this RSL will not export
class that are inside this RSL. So what is the difference?

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

 RSLs contain code to load (so do modules).
  
 link-report is a list of classes that don't need to be in a module
 because you guarantee they'll be found elsewhere.  THis makes your
 modules smaller so they load faster.  Usually you need both when using
 modules and RSLs
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of nxzone
 Sent: Wednesday, March 28, 2007 10:35 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :
 
 
 
 You are right. Now i use a generic library (myLib.swc) as RSL. The RSL
 is loaded first and my problem is solve...
 
 I can use RSL or link-report to load repetitive class, but what is the
 advantage to use link-report?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Because it is a common problem. Try putting a ToggleButtonBar in the
  main app first to prove it one way or another.
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of nxzone
  Sent: Tuesday, March 27, 2007 2:36 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed
 :
  
  
  
  Why you think this bug is due to this cause? Why loading the shared
  content before should solve the Type Coercion failed: cannot convert
  mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar ?
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   Check out the shared code portion of my modules presentation at
   blogs.adobe.com/aharui
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of nxzone
   Sent: Monday, March 26, 2007 2:27 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion
 failed
  :
   
   
   
   Same problem ...
   Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
   ToggleButtonBar not a buttonbar)
   var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , lrhazi lrhazi@ wrote:
   
I get this annoying error often:

TypeError: Error #1034: Type Coercion failed: cannot convert
mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar

My app uses Modules and has a user login/logout functionality... I
  get
the above error systematically when i logout of an account and
 login
to a second one.

Any hints on what to look for?

Thank you very much.
Mohamed~
   
  
 





RE: [flexcoders] List Box in a DataGrid

2007-03-28 Thread Alex Harui
Consider using Canvas with Repeater instead of List.  I doubt you need
scrollbars and selection for the list of colors.  Or if you know you'll
only have three colors, just put that many Labels on a Canvas.
 
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jitender_instacoll
Sent: Wednesday, March 28, 2007 7:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] List Box in a DataGrid



Hello,

How do i add a listbox in a datagrid control so that it is populated 
from the dataprovider of the datagrid control?

mx:datagrid dataprovider={httpMyService.lastResutls.CARS.CAR} 
mx:columns
mx:List dataField=COLOR headerText=Color /
mx:DataGridColumn dataField=Type headerText=Type /
/mx:columns
/mx:datagrid

My XML Returned from the service looks like this:
CARS
CAR
KEYWORDwhite/KEYWORD
KEYWORDred/KEYWORD
KEYWORDblack/KEYWORD
TYPECadillac/TYPE
/CAR
CAR
KEYWORDwhite/KEYWORD
KEYWORDbrown/KEYWORD
KEYWORDblack/KEYWORD
TYPEHyundai/TYPE
/CAR
/CARS

List Box should show White Red Black or whatever are the colors for 
every row/car.

Any help is greatly appreciated.
Thankyou.



 


RE: [flexcoders] storing data in models within Flex 2

2007-03-28 Thread Alex Harui
if you have mx:XML id=foo ...
 
You now have a variable names foo that you can use E4X to add to.  See
the doc on the XML class.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmwhittaker007
Sent: Wednesday, March 28, 2007 7:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] storing data in models within Flex 2



How can I store data within my Flex application as XML that can be
used again in a DataGrid? 

I have created an mx:XML data model in MXML. It seems that this only
stores one model at a time from my form. 

How can I keep adding data from my form getting it to add to the model?



 


RE: [flexcoders] Re: How heavyweight is data binding?

2007-03-28 Thread Alex Harui
The plan is for Flex to officially support a runtime-localization
strategy in the next major release.  One team has managed to customize
systemManager to allow an RSL of resource bundles to be brought in
before the app starts up, and they choose which RSL based on locale, but
that's because they couldn't wait for next major release and gamble that
we don't pull that feature before we ship.
 
Binding is slow because it is a really convenient but general feature.
If you have a bunch of strings and know where they go, you should just
write code to stuff them if you are concerned about performance.
 
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul DeCoursey
Sent: Wednesday, March 28, 2007 9:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How heavyweight is data binding?



I'm going to jump in here and say that if you try binding a very large
number of strings you are going to have a performance penalty. I think
the only benefit to not using the built in localization and
ResourceBundles is a user could switch locales dynamically within the
app and not have to reload the app. I considered that a positive and
looked at going that route. I found however that it did slow the app
down when the user switched locales mid stream. In the end I went back
to using the ResourceBundle and I am much happier. The most common
use case is that a user would select the locale at login or startup
and not change it. well actually the most common use case is the
browser will tell us the users locale and we serve the correct swf
file based on that and the user never has to select anything. In the
end it's less code, less overhead from binding and gives us much more
control over the appearance of a specific locale.

Paul

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

 Collin,
 
 We are using a similar approach for our I18N strings. We don't have 
 nearly as many strings are you have indicated you are using, but we 
 are wondering the same thing. Will a large number of data bound 
 string cause problems in the app?
 
 We are trying to come up with a different plan if we find something 
 else we will share it.
 
 But what have you discovered since last year. It has been several 
 months since your last post and I was wondering if you had discovered 
 anything new.
 
 Thanks,
 Mike Collins
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Collin Peters cpeters@ 
 wrote:
 
  Yes, I have considered and ruled out Flex 2's localization 
 features. I find
  it a ludicrous idea to have to compile resource strings directly 
 into a SWF
  or SWC. Maybe I am still missing something about how Flex 
 implements it and
  please tell me if I am. I find two serious issues with this method
  1. You have to compile your application for EACH language you want 
 to
  support. So if I want to support 30 languages I have to compile my
  application 30 times, storing the output in different directories, 
 etc.,
  etc.. Add to this that in order to support skinning I have to 
 again compile
  the application for each skin. So if I have 30 languages and I 
 want to give
  the option of 30 skins for each language that = 30 * 30 = 900 
 compiled
  instances of the same application. Some may say why would have 
 that many
  skins. I say why not? This is EASILY accomplished with HTML. And 
 you
  can't ask me 'why support 30 languages'. Anybody who has done any 
 kind of
  enterprise development knows the answer to that question.
  2. Related to #1 but still I don't understand why you would want to 
 compile
  the i18n strings *directly* into the SWF. This means any time I 
 want to
  make a single update to any string in any language I have to 
 recompile
  EVERYTHING. Wow, that is insanity.
  
  Now as for my solution it is really quite simple. It is simply a 
 singleton
  class that loads an XML file containing the text strings. The 
 loading of
  this file is part of my bootstrap process which also loads the 
 application
  configuration, inits remoting, etc.. The XML file looks like:
  ?xml version=1.0 encoding=UTF-8?
  language translation=en_US
  key id=$I18N_PROGRAMProgram/key
  key id=$I18N_POINTSPoints/key
  
  
  To get a I18N string you simple call Locale.getKey($I18N_PROGRAM) 
 which
  does some other error checking but basically the only brains is:
  var value:String = _langXML.key.(@id == key);
  E4X makes this *incredibly* easy and even as I mentioned could even 
 allow
  you to change every piece of text in your entire running application
  instantly by simply loading another xml file. The original 
 question of this
  thread though is 'is having that many bindings feasible'. If it 
 isn't I
  don't really mind as all it means is telling the user to restart the
  application. Since users don't exactly switch languages often this 
 isn't an
  unreasonable thing to ask. The 

RE: [flexcoders] Re: Custom Component Width when 100%?

2007-03-28 Thread Alex Harui
measure requires some math, usually.  you will never call
getExplicitOrMeasuredWidth() on yourself since that just reads the
meausredWidht property you are trying to set.
 
If I had a component that drew a circle and a triangle next to it, my
measure would look like
 
measuredWidth= circle.getExplicitOrMeasuredWidth() +
triangle.getExplicitOrMeasuredWidth();
measuredHeight = Math.max( circle.getExplicitOrMeasuredHeight(),
triangle.getExplicitOrMeasuredHeight();
 
In other situations I know I want to be 100 wide so I just set
measuredWidth = 100.
 
You'll have to find a way to know how big you want to be.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Wednesday, March 28, 2007 9:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Component Width when 100%?



In my measure function I have:

override protected function measure():void{
measuredWidth = getExplicitOrMeasuredWidth()
measuredHeight = getExplicitOrMeasuredHeight()
} 

That makes them both zero though. although my updateDisplayList gets
called twice my measure function is only called once. How should I be
setting my measure function? If we get this worked out I think I'll
be good to go, if not ill post the code. Thanks so much for your help
Alex.

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

 In theory, if you started with UIComponent, you need to implement a
 measure() method to tell the parent how big you want to be. That
parent
 will then call setActualSize which should result in your
 updateDisplayList being called with non-zero values. Again, if
 extending UIComponent, you should be able to draw or add shapes in
 updateDisplayList without causing a second call to updateDisplayList
 providing that your measure() method returns the same values and
nobody
 else called invalidateDisplayList.
 
 It feels like you're not quite following the formula somehwere. You
 could post the class code I suppose...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Nate Pearson
 Sent: Tuesday, March 27, 2007 4:37 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Custom Component Width when 100%?
 
 
 
 Ahhh HA! I was reading the adobe documentation and it turns out that
 when you do addchild() it calls updateDisplayList again. This is why
 my program wasn't working, I had an infinite loop when I called
 addchild.
 
 I fixed it by adding an if function with a flag.
 if (_newBackground){
 ...
 }
 
 Since my updatedisplaylist was being called twice, once with 0
 unscaledWidth and once with an unscaledWidth, I had to add another
 condition.
 if (_newBackground  unscaledWidth != 0) {
 ...
 }
 
 Now I can't seem to get the component to scale with the rest of the
 app when the browser window opens. I'm going to start a new thread
 for that question.
 
 -Nate
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Nate Pearson napearson99@ wrote:
 
  So I think i got unScaledWidth to work during UpdateDisplayList.
When
  I debug it seems like it's called twice. Once with 0 unscaledWidth
  and once with the correct unScaledWidth. Should I be worrying about
  this? I didn't override the measure function. Should I?
  
  So to draw in UpdateDisplayList you have to manipulate graphics like
 this:
  graphics.lineStyle(0,0x00, 0);
  graphics.beginFill(0xff, 1);
  graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
  graphics.endFill(); 
  
  But what if I want to draw shapes or UIcomponents? That's why It
  wasn't working for me before, i was drawing like this:
  var shape:Shape = new Shape();
  shape.graphics.lineStyle(0,0x00, 0);
  shape.graphics.beginFill(0xff, 1);
  shape.graphics.drawRect(0,0,unscaledWidth/2,unscaledHeight);
  shape.graphics.endFill();
  //When i do the add child my program won't load!
  //addChild(shape);
  
  I watched Ely's component video and it says I can add UIComponents,
  sprites and shapes to UpdateDisplayList. Does anyone know what I'm
  doing wrong?
  
  Thanks!
  
  -Nate
  
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
  
   You can always call validateNow() to force validation, but you
 shouldn't
   be drawing in commitProperties in most cases. Most drawing should
 be in
   updateDisplayList
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
   Behalf Of Nate Pearson
   Sent: Monday, March 26, 2007 3:53 PM
   To: 

[flexcoders] Re: Draw Icon in Text Area

2007-03-28 Thread nathanpdaniel
You can alter the htmlText property to add an img tag at the end... 
works good until the user deletes it... :D  But that was pre-apollo 
which has a whole lot better support for HTML - but I don't know if you 
can use that support outside Apollo, haven't tried yet.  But hopefully 
that'll get you what you're looking for.
-Nathan

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

 Hi,
 
 I have an application where users can add comments about contents of a
 file that is displayed in a TextArea.  The user selects some text,
 right clicks and a dialog pops up for the user to enter some comments.
  I would like to embed an icon at the end of the selected text range,
 but so far I have been unsuccessful in doing so.  Any ideas on how I
 could do this?
 
 Thanks,
 Bill





RE: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-28 Thread Alex Harui
RSLs contain code to load (so do modules).
 
link-report is a list of classes that don't need to be in a module
because you guarantee they'll be found elsewhere.  THis makes your
modules smaller so they load faster.  Usually you need both when using
modules and RSLs



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nxzone
Sent: Wednesday, March 28, 2007 10:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :



You are right. Now i use a generic library (myLib.swc) as RSL. The RSL
is loaded first and my problem is solve...

I can use RSL or link-report to load repetitive class, but what is the
advantage to use link-report?

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

 Because it is a common problem. Try putting a ToggleButtonBar in the
 main app first to prove it one way or another.
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of nxzone
 Sent: Tuesday, March 27, 2007 2:36 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed
:
 
 
 
 Why you think this bug is due to this cause? Why loading the shared
 content before should solve the Type Coercion failed: cannot convert
 mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar ?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Check out the shared code portion of my modules presentation at
  blogs.adobe.com/aharui
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of nxzone
  Sent: Monday, March 26, 2007 2:27 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion
failed
 :
  
  
  
  Same problem ...
  Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
  ToggleButtonBar not a buttonbar)
  var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , lrhazi lrhazi@ wrote:
  
   I get this annoying error often:
   
   TypeError: Error #1034: Type Coercion failed: cannot convert
   mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar
   
   My app uses Modules and has a user login/logout functionality... I
 get
   the above error systematically when i logout of an account and
login
   to a second one.
   
   Any hints on what to look for?
   
   Thank you very much.
   Mohamed~
  
 




 


RE: [flexcoders] Re: Scaling Custom Components

2007-03-28 Thread Alex Harui
removing and readding is a bit expensive.  Are you scaling the content
of a component?  You should just set the scaleX,scaleY and reposition.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Wednesday, March 28, 2007 9:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Scaling Custom Components



Thanks everyone for your response. Now that I understand how children
are added/removed i can take out some of my work arounds in other
projects!

The scaling works great now.

New question:
Is this the best way to scale? Is it expensive to remove and re-add
all the components when I want to redraw? In this component I have
graphics and text and it seems really fast. But what if I used more
complex things like sprites or containers? Would removing all of them
then re-adding them be the best way to redraw?

Thanks guys. 

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

 If you just want to remove all the children, do something like this:
 
 while (this.numChildren()  0)
 this.removeChildAt(0);
 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
 
  Nope, it is essentially an array. If I have
  
  var a:Array = [ Nate, Alex];
  a[2] = Bjorn;
  a.shift();
  a[2] is no longer Bjorn, you are now at a[1].
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
  Behalf Of Bjorn Schultheiss
  Sent: Tuesday, March 27, 2007 6:19 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: Re: [flexcoders] Scaling Custom Components
  
  
  
  Hey Alex,
  
  if 0 == childA
  can you insert childB at 99 for example.
  
  if so if you remove childA does childB's index change?
  
  can you ensure that you're child will remain at an index?
  
  
  
  On 28/03/2007, at 11:12 AM, Alex Harui wrote:
  
  
  
  
  Children renumber after one is removed
  
  0 = childA
  1 = childB
  2 = childC
  
  After removeChildAt(0)
  
  0 = childB
  1 = childC
  
  Look at the code for removeAllChildren.
  
  It will either removeChildAt(0) j times or iterate backwards.
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On Behalf Of Nate Pearson
  Sent: Tuesday, March 27, 2007 5:22 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: [flexcoders] Scaling Custom Components
  
  
  
  I have a custom component that adds multiple shapes during
  UpdateDisplayList. When I scale the browser it calls update
  display
  list and draws over all of my shapes.
  
  I have tried:
  
  j = this.numChildren;
  for (i=0; ij; i++){
  this.removeChildAt(i);
  }
  
  Before I write redraw my shapes in UpdateDisplayList. I always
  get an
  outofbounds error after i exceed numAutomationChildren(?). If i
  try
  the same loop with numAutomationChildren nothing disappears.
  
  It won't let me call this.removeAllChildren (i think because I'm
  extending an UIComponent and not a Container)! Isnt there a way
  for
  me to get all those shapes outta there?
  
  Maybe I'm taking the wrong approach.
  
  Thanks in advance,
  
  Nate
 




 


Re: [flexcoders] HTML-like Table/Textbox behavior possible?

2007-03-28 Thread missgiggygirl
Thanks Dimitrios and John Mark, I will follow your advice and see what
I come up with...

Thanks,
Ann



Re: [flexcoders] Are Events OK in the MVC (S) pattern

2007-03-28 Thread Troy Gilbert
On 3/27/07, shaun etherton [EMAIL PROTECTED] wrote:
  Troy Gilbert wrote:
   Brett,
  
   Events are actually an a pretty fundamental component of an MVC
   implementation. Events are most often used by the model to notify the view
   and/or controller of changes (Observer pattern).

  Usually the model does not talk to the controller (see the diagram at
  the java blueprints url below).


Uhm... you quoted exactly what I said. The model uses the Observer
pattern to notify the controller (or anyone) of changes. Nothing wrong
there...

  The model should just be made up of objects which are modelled on the
  business processes and should adhear to the usual best practices.
  Properties represent state, methods implement behavior to modify state
  based on some business logic.

  Therefore, the model should define the state and business
  logic(behaviour) to manage the model's state.

  The ModelLocator(Cairngorm speak?) should not contain functional
  methods, because the ModelLocator is not the model, its just the locator
  of models.

I guess this is where I may diverge from the usual practice of the
model... I treat it like a RecordSet (to use Design Pattern
terminology)... just data and relationships. You're right, though,
that many people treat the model as a Domain Model (with accompanying
methods), though I move that stuff into my controllers (and do end up
with a hierarchy of controllers acting on controllers).

Troy.


[flexcoders] TextArea htmltext parsing

2007-03-28 Thread jmfillman
How would I go about taking the htmltext of a TextArea and parsing it 
based on a space and assigning each piece to an Array or 
ArrayCollection?



RE: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :

2007-03-28 Thread Alex Harui
I use link-report to be sure that there is no duplication of classes.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nxzone
Sent: Wednesday, March 28, 2007 11:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed :



My question was more why should I use link-report? If i have a RSL
library, each module or application that link this RSL will not export
class that are inside this RSL. So what is the difference?

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

 RSLs contain code to load (so do modules).
 
 link-report is a list of classes that don't need to be in a module
 because you guarantee they'll be found elsewhere. THis makes your
 modules smaller so they load faster. Usually you need both when using
 modules and RSLs
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of nxzone
 Sent: Wednesday, March 28, 2007 10:35 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion failed
:
 
 
 
 You are right. Now i use a generic library (myLib.swc) as RSL. The RSL
 is loaded first and my problem is solve...
 
 I can use RSL or link-report to load repetitive class, but what is the
 advantage to use link-report?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Because it is a common problem. Try putting a ToggleButtonBar in the
  main app first to prove it one way or another.
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of nxzone
  Sent: Tuesday, March 27, 2007 2:36 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion
failed
 :
  
  
  
  Why you think this bug is due to this cause? Why loading the shared
  content before should solve the Type Coercion failed: cannot
convert
  mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar ?
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   Check out the shared code portion of my modules presentation at
   blogs.adobe.com/aharui
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of nxzone
   Sent: Monday, March 26, 2007 2:27 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: TypeError: Error #1034: Type Coercion
 failed
  :
   
   
   
   Same problem ...
   Line 158 of ButtonBarButtonSkin.as... (parent.parent is a
   ToggleButtonBar not a buttonbar)
   var bar:ButtonBar = parent ? ButtonBar(parent.parent) : null;
   
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , lrhazi lrhazi@ wrote:
   
I get this annoying error often:

TypeError: Error #1034: Type Coercion failed: cannot convert
mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar

My app uses Modules and has a user login/logout functionality...
I
  get
the above error systematically when i logout of an account and
 login
to a second one.

Any hints on what to look for?

Thank you very much.
Mohamed~
   
  
 




 


[flexcoders] Programmatically create MovieClip frames?

2007-03-28 Thread mtthwnthnyhys
Hey all,

I have a bit of an odd question.  I'm working on a project in which I'd like to 
include some 
somewhat intricate Flash animations... unfortunately... (sort of)... I'm 
working on one of 
those new MacBook Pros, with the Intel chip.  No Flash 9 AS3 preview for me.

I'd like to keep moving on the project, but as you probably know, Adobe is not 
shipping 
(and therefor not making available for download?) the new Flash CS3 until the 
end of April.

So I'm wondering, is it possible to add frames to a programmatically created 
AS3 
MovieClip, and then populate those frames dynamically?  Will nextFrame() called 
on the 
last frame of a MovieClip still move the playhead?.. or return some kind of 
error?.. or just 
not do anything?

I'll be experimenting with all this stuff over the next couple of days, trying 
to come up with 
a solution, but if anyone knows anything I'd appreciate the feedback.

Also, if you happen to know that there's no way to do what I'm asking... and 
you happen to 
have the Flash 9 AS3 preview... would you mind making a few empty AS3 MovieClip 
SWFs?  
To be safe, I think one each at 7, 14, 21, and 28 frames would be great.  
That's not too 
much trouble is it?

Okay, infinite thank yous in advance.

//Matthew Anthony Hayes 



RE: [flexcoders] Re: Scaling Custom Components

2007-03-28 Thread Alex Harui
I think I need more context.  If I had a component with a circle and
triangle and the browser window resized, if I set the component's
widht/height to use %, updateDisplayList will be called with different
numbers and I would  just set scaleX/scaleY on either the entire
component or the circle and triangle.
 
Also look at stage.scaleMode.  We use noScale by default.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Pearson
Sent: Wednesday, March 28, 2007 11:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Scaling Custom Components



The browser window is resizing. How would I just set the scaleX,
scaleY in that situation? By setting those would i redraw for me?

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

 removing and readding is a bit expensive. Are you scaling the content
 of a component? You should just set the scaleX,scaleY and reposition.
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Nate Pearson
 Sent: Wednesday, March 28, 2007 9:57 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Scaling Custom Components
 
 
 
 Thanks everyone for your response. Now that I understand how children
 are added/removed i can take out some of my work arounds in other
 projects!
 
 The scaling works great now.
 
 New question:
 Is this the best way to scale? Is it expensive to remove and re-add
 all the components when I want to redraw? In this component I have
 graphics and text and it seems really fast. But what if I used more
 complex things like sprites or containers? Would removing all of them
 then re-adding them be the best way to redraw?
 
 Thanks guys. 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , g_odds g_odds@ wrote:
 
  If you just want to remove all the children, do something like this:
  
  while (this.numChildren()  0)
  this.removeChildAt(0);
  
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
  
   Nope, it is essentially an array. If I have
   
   var a:Array = [ Nate, Alex];
   a[2] = Bjorn;
   a.shift();
   a[2] is no longer Bjorn, you are now at a[1].
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
   Behalf Of Bjorn Schultheiss
   Sent: Tuesday, March 27, 2007 6:19 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 
   Subject: Re: [flexcoders] Scaling Custom Components
   
   
   
   Hey Alex,
   
   if 0 == childA
   can you insert childB at 99 for example.
   
   if so if you remove childA does childB's index change?
   
   can you ensure that you're child will remain at an index?
   
   
   
   On 28/03/2007, at 11:12 AM, Alex Harui wrote:
   
   
   
   
   Children renumber after one is removed
   
   0 = childA
   1 = childB
   2 = childC
   
   After removeChildAt(0)
   
   0 = childB
   1 = childC
   
   Look at the code for removeAllChildren.
   
   It will either removeChildAt(0) j times or iterate backwards.
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
   [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com ] On Behalf Of Nate Pearson
   Sent: Tuesday, March 27, 2007 5:22 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 
   Subject: [flexcoders] Scaling Custom Components
   
   
   
   I have a custom component that adds multiple shapes during
   UpdateDisplayList. When I scale the browser it calls update
   display
   list and draws over all of my shapes.
   
   I have tried:
   
   j = this.numChildren;
   for (i=0; ij; i++){
   this.removeChildAt(i);
   }
   
   Before I write redraw my shapes in UpdateDisplayList. I always
   get an
   outofbounds error after i exceed numAutomationChildren(?). If i
   try
   the same loop with numAutomationChildren nothing disappears.
   
   It won't let me call this.removeAllChildren (i think because I'm
   extending an UIComponent and not a Container)! Isnt there a way
   for
   me to get all those shapes outta there?
   
   Maybe I'm taking the wrong approach.
   
   Thanks in advance,
   
   Nate
  
 




 


[flexcoders] PopUpManager Problem

2007-03-28 Thread Mark
I need some help with an error I am getting when using the popupmanager.
Essentially the problem I am having is if I dynamically load SWFs from
my main application and more than one of the SWF uses the popupmanager I
receive an error. The specific error I am getting is:
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
 at mx.managers::PopUpManager$/addPopUp()
 at mx.controls::Alert$/show()
 at Tab2/::onClick()
 at Tab2/___Button1_click()

My test app to reproduce this problem is essentially on the main
application a tabnavigator with two VBox as the tabs. The SWF files then
get loaded dynamically into those VBox. The two SWF files only contain a
button to press and it displays an Alert (the builtin Alert uses
PopUpManager).
Has anyone seen this error before and can shed some insight?

Thanks in advance.
--Mark

Below is my code to reproduce this:

PopUpApp.as
package
{
 import mx.core.Application;
 import flash.events.Event;

 public class PopUpApp extends Application
 {
 [Bindable] public var debug:Boolean;

 public function PopUpApp()
 {
 super();//Invoke the Application superclass
 this.addEventListener(creationComplete,
onCreationComplete);
 }

 private function onCreationComplete(event:Event):void
 {
 debug = (this.url.indexOf(-debug.swf))  -1 ? true :
false;
 }
 }
}

PopUpProblem.mxml
?xml version=1.0 encoding=utf-8?
local:PopUpApp
 xmlns:local=*
 xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 width=100%
 height=100%
 creationComplete=onCreationComplete();

 mx:Script
 ![CDATA[
 import mx.events.ModuleEvent;
 import mx.modules.ModuleManager;
 import mx.modules.IModuleInfo;

 public var tab1Mod:IModuleInfo;
 public var tab2Mod:IModuleInfo;

 private function onCreationComplete():void
 {
 if (this.debug)
 {
 tab1Mod = ModuleManager.getModule(Tab1-debug.swf);
 tab2Mod = ModuleManager.getModule(Tab2-debug.swf);
 }
 else
 {
 tab1Mod = ModuleManager.getModule(Tab1.swf);
 tab2Mod = ModuleManager.getModule(Tab2.swf);
 }

 tab1Mod.addEventListener(ModuleEvent.READY,
tab1ModReady);
 tab2Mod.addEventListener(ModuleEvent.READY,
tab2ModReady);
 tab1Mod.load();
 tab2Mod.load();
 }

 private function tab1ModReady(event:ModuleEvent):void
 {
 tab1.addChild(tab1Mod.factory.create() as
DisplayObject);
 }

 private function tab2ModReady(event:ModuleEvent):void
 {
 tab2.addChild(tab2Mod.factory.create() as
DisplayObject);
 }
 ]]
 /mx:Script

 mx:TabNavigator width=100% height=100%
 mx:VBox id=tab1 label=Tab 1 width=100% height=100% /
 mx:VBox id=tab2 label=Tab 2 width=100% height=100% /
 /mx:TabNavigator

/local:PopUpApp


Tab1.mxml
?xml version=1.0 encoding=utf-8?
mx:Module
 xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=horizontal
 percentWidth=100
 percentHeight=100

 mx:Script
 ![CDATA[
 import mx.controls.Alert;
 import flash.events.MouseEvent;

 private function onClick(event:MouseEvent):void
 {
 mx.controls.Alert.show(Tab1 Alert);
 }
 ]]
 /mx:Script

 mx:Button label=Button click=onClick(event);/

/mx:Module

Tab2.mxml
?xml version=1.0 encoding=utf-8?
mx:Module
 xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=horizontal
 percentWidth=100
 percentHeight=100

 mx:Script
 ![CDATA[
 import mx.controls.Alert;
 import flash.events.MouseEvent;

 private function onClick(event:MouseEvent):void
 {
 mx.controls.Alert.show(Tab2 Alert);
 }
 ]]
 /mx:Script

 mx:Button label=Button click=onClick(event);/

/mx:Module




[flexcoders] Cairngorm and compile time generated errors

2007-03-28 Thread bparvizi1
I'm using Cairngorm in Flex Builder Eclipse.  However, in my .as and 
mxml files the compile time error checking in the problems panel does 
not work.  Compile time errors fall silent. I made sure to have 
the Build Automatically checked as well, so I know I am compiling 
it.  I have to run the app to see the errors.  The little red x does 
not show up next to the code line number.  Code hinting works fine.  
Does anyone know how to fix this? 
Thanks.



RE: [flexcoders] PopUpManager Problem

2007-03-28 Thread Alex Harui
See sharedCode portion of my presentation on modules at
blogs.adobe.com/aharui



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark
Sent: Wednesday, March 28, 2007 11:48 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PopUpManager Problem



I need some help with an error I am getting when using the popupmanager.
Essentially the problem I am having is if I dynamically load SWFs from
my main application and more than one of the SWF uses the popupmanager I
receive an error. The specific error I am getting is:
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at mx.managers::PopUpManager$/addPopUp()
at mx.controls::Alert$/show()
at Tab2/::onClick()
at Tab2/___Button1_click()

My test app to reproduce this problem is essentially on the main
application a tabnavigator with two VBox as the tabs. The SWF files then
get loaded dynamically into those VBox. The two SWF files only contain a
button to press and it displays an Alert (the builtin Alert uses
PopUpManager). 
Has anyone seen this error before! and can shed some insight? 

Thanks in advance. 
--Mark

Below is my code to reproduce this:

PopUpApp.as
package
{
import mx.core.Application;
import flash.events.Event;

public class PopUpApp extends Application
{
[Bindable] public var debug:Boolean;

public function PopUpApp()
{
super();//Invoke the Application superclass
this.addEventListener(creationComplete,
onCreationComplete);
}

! private function onCreationComplete(event:Event):voi! d
nb sp;   {
debug = (this.url.indexOf(-debug.swf))  -1 ? true :
false;
}
}
}

PopUpProblem.mxml
?xml version=1.0 encoding=utf-8?
local:PopUpApp
xmlns:local=*
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
width=100%
height=100%
creationComplete=onCreationComplete();

mx:Script
![CDATA[
import mx.events.ModuleEvent;
import mx.modules.ModuleManager;import
mx.modules.IModuleInfo;

public var tab1Mod:IModuleInfo;
public var tab2Mod:IModuleInfo;

private function onCreationComplete():void
{
if (this.debug)
{
tab1Mod = ModuleManager.getModule(Tab1-debug.swf);
tab2Mod = ModuleManager.getModule(Tab2-debug.swf);
  ! ;nbs! p; }
else
{
tab1Mod = ModuleManager.getModule(Tab1.swf);
tab2Mod = ModuleManager.getModule(Tab2.swf);
}

tab1Mod.addEventListener(ModuleEvent.READY,
tab1ModReady);
tab2Mod.addEventListener(ModuleEvent.READY,
tab2ModReady);
tab1Mod.load();
  ! nbsp; tab2Mod.load();
}

private function tab1ModReady(event:ModuleEvent):void
{
tab1.addChild(tab1Mod.factory.create() as
DisplayObject);
}

private function tab2ModReady(event:ModuleEvent):void
{
tab2.addChild(tab2Mod.factory.create() as
DisplayObject);
}
  !   ]]
/mx:Script

!  n bsp;  mx:TabNavigator width=100% height=100%
mx:VBox id=tab1 label=Tab 1 width=100% height=100% /
mx:VBox id=tab2 label=Tab 2 width=100% height=100% /
/mx:TabNavigator

/local:PopUpApp


Tab1.mxml
?xml version=1.0 encoding=utf-8?
mx:Module
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
percentWidth=100 
percentHeight=100

mx:Script
![CDATA[
import mx.controls.Alert;
import flash.events.MouseEvent;

   ! ; private function onClick(event:MouseEvent):void
{
mx.controls.Alert.show(Tab1 Alert);
}
]]
/mx:Script

mx:Button label=Button click=onClick(event);/

/mx:Module

Tab2.mxml
?xml version=1.0 encoding=utf-8?
mx:Module
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
percentWidth=100 
percentHeight=100

mx:Script
![CDATA[
import mx.controls.Alert;
  ! nbsp; import flash.events.MouseEvent;

  !nbsp;   private function onClick(event:MouseEvent):void
{
mx.controls.Alert.show(Tab2 Alert);
}
]]
/mx:Script

mx:Button label=Button click=onClick(event);/

/mx:Module



 


Re: [flexcoders] space between MenuBar - menuitems

2007-03-28 Thread Cutter (Flex Related)
I don't remember the exact style attribute, but if you go in to the Flex 
Start Page of Flex Builder you will see a  link for the Style Editor, 
and I know that was one of the examples on there, giving you the 
complete attribute/value information you would need.

Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Vinoth Babu wrote:
 
 
 Hi All,
  
 How to give a custom gap between two menuItems in a menubar component
  
 For e.g.
  
 Assume menubar contains File,Edit, View,... menuitems
  
 I need to give custom gap between File and Edit
  
 Thanks,
 Vinoth
 
 
 Expecting? Get great news right away with email Auto-Check. 
 http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
 Try the Yahoo! Mail Beta. 
 http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
  
 
 


RE: [flexcoders] Programmatically create MovieClip frames?

2007-03-28 Thread Merrill, Jason
Why would you want to?  It seems whatever you're trying to do could be
accomplished in some other way.
 

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 


 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mtthwnthnyhys
Sent: Wednesday, March 28, 2007 3:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Programmatically create MovieClip frames?



Hey all,

I have a bit of an odd question. I'm working on a project in
which I'd like to include some 
somewhat intricate Flash animations... unfortunately... (sort
of)... I'm working on one of 
those new MacBook Pros, with the Intel chip. No Flash 9 AS3
preview for me.

I'd like to keep moving on the project, but as you probably
know, Adobe is not shipping 
(and therefor not making available for download?) the new Flash
CS3 until the end of April.

So I'm wondering, is it possible to add frames to a
programmatically created AS3 
MovieClip, and then populate those frames dynamically? Will
nextFrame() called on the 
last frame of a MovieClip still move the playhead?.. or return
some kind of error?.. or just 
not do anything?

I'll be experimenting with all this stuff over the next couple
of days, trying to come up with 
a solution, but if anyone knows anything I'd appreciate the
feedback.

Also, if you happen to know that there's no way to do what I'm
asking... and you happen to 
have the Flash 9 AS3 preview... would you mind making a few
empty AS3 MovieClip SWFs? 
To be safe, I think one each at 7, 14, 21, and 28 frames would
be great. That's not too 
much trouble is it?

Okay, infinite thank yous in advance.

//Matthew Anthony Hayes 



 



Re: [flexcoders] Cairngorm and compile time generated errors

2007-03-28 Thread Douglas McCarroll
If I recall correctly, this is because you are using the SWC for your 
Cairngorm code. Point your project at some Cairngorm source code, and 
give it a try.

Douglas


bparvizi1 wrote:

 I'm using Cairngorm in Flex Builder Eclipse. However, in my .as and
 mxml files the compile time error checking in the problems panel does
 not work. Compile time errors fall silent. I made sure to have
 the Build Automatically checked as well, so I know I am compiling
 it. I have to run the app to see the errors. The little red x does
 not show up next to the code line number. Code hinting works fine.
 Does anyone know how to fix this?
 Thanks.

  



RE: [flexcoders] Variable width ListItems

2007-03-28 Thread Alex Harui
Unfortunately, this is not supported.  Do you have tons of items?  If it
is only a few, I'd use HBox



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Shaun
Sent: Wednesday, March 28, 2007 10:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Variable width ListItems



I have a horizontal list with items that can have variable widths. 
However, all items end up with the same width as the first item in the 
list. How do I allow variable width list items? 

Is there something similar to the datagrid's variableRowHeight setting 
that I'm missing?

Thanks,
Shaun



 


[flexcoders] Re: Personalized Popup

2007-03-28 Thread leoaraguas
It works... now i want make some effects.. i will try.

Thanks Again.



[flexcoders] Center alignment problem

2007-03-28 Thread cardinalflexjeremy
I have a viewstack, that contains two sub components. One (the first)
is simply a small login panel. (its actually just a canvas with text
fields and a header etc inside it). The second is what is shown once
the user is logged in; its also a large canvas, with a function app
inside that component. 

So my code looks like this:

mx:ViewStack width=800 height=600 maxHeight=600 maxWidth=800
selectedChild={getView(false)} id=myViewStack
view:LoggedInView id=LoggedInView /
view:loginPanel id=LoginView /

/mx:ViewStack

So I want to have the loginPanel displayed in the center of the
available real estate, regardless of screen real estate, (some viewers
might be 1024x 768 and some might be 800 x 600) is there anyway to
automatically center the loginPanel component in the parent view stack? 

Thanks 
JS



[flexcoders] Re: Variable width ListItems

2007-03-28 Thread Shaun
There aren't tons of items, but I need the dataprovider binding 
functionality provided by the horizontallist.  (right now I bind to 
an arraycollection that changes regularly)

How would you recommend achieving this with an HBox? I'd rather not 
manage the HBox's children manually, though I will if I have to of 
course.

Thanks,
Shaun

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

 Unfortunately, this is not supported.  Do you have tons of items?  
If it
 is only a few, I'd use HBox
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Shaun
 Sent: Wednesday, March 28, 2007 10:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Variable width ListItems
 
 
 
 I have a horizontal list with items that can have variable widths. 
 However, all items end up with the same width as the first item in 
the 
 list. How do I allow variable width list items? 
 
 Is there something similar to the datagrid's variableRowHeight 
setting 
 that I'm missing?
 
 Thanks,
 Shaun





[flexcoders] Re: Center alignment problem

2007-03-28 Thread Shaun
a couple of options:

1)  change your login control to a popup titlewindow instead and use 
popupmanager to center it to the viewstack
2)  put your login control in a mx:Box control that takes up the 
full size of the viewstack and has verticalAlign set to middle and 
horizontalAlign set to center.

Shaun

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

 I have a viewstack, that contains two sub components. One (the 
first)
 is simply a small login panel. (its actually just a canvas with text
 fields and a header etc inside it). The second is what is shown once
 the user is logged in; its also a large canvas, with a function app
 inside that component. 
 
 So my code looks like this:
 
 mx:ViewStack width=800 height=600 maxHeight=600 
maxWidth=800
 selectedChild={getView(false)} id=myViewStack
   view:LoggedInView id=LoggedInView /
   view:loginPanel id=LoginView /
   
 /mx:ViewStack
 
 So I want to have the loginPanel displayed in the center of the
 available real estate, regardless of screen real estate, (some 
viewers
 might be 1024x 768 and some might be 800 x 600) is there anyway to
 automatically center the loginPanel component in the parent view 
stack? 
 
 Thanks 
 JS





[flexcoders] Re: TextArea htmltext parsing

2007-03-28 Thread Doug Lowder
There's a String.split() method that might be what you're looking for.

var eachPieceArray: Array = myTextArea.htmlText.split( );


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

 How would I go about taking the htmltext of a TextArea and parsing it 
 based on a space and assigning each piece to an Array or 
 ArrayCollection?





[flexcoders] Creating overlay controls for UIComponents

2007-03-28 Thread pavanpodila

Hello,
 I am working on a project where I will have a bunch of images. I need
to positions some overlay controls on some of them when selected. These
control are meant to manipulate the visual appearance of the image (for
example: resizing handles, etc). I wanted to know what is the best approach
to doing that. 

More generically, is it possible to automatically add overlay controls to
the display-list of a UIComponent and also attach some event handlers on
them? I have looked at ResizeManagerFX but I will be needing lot more
functionality so I want to create the overlays myself.

Any suggestions?
-- 
View this message in context: 
http://www.nabble.com/Creating-overlay-controls-for-UIComponents-tf3480770.html#a9715148
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Is anybody else getting duplicate messages?

2007-03-28 Thread Paul DeCoursey
I've been getting 2 sometimes 3 copies of many messages.  It's quite
annoying and this is on top of an already high volume list.



[flexcoders] Re: Is anybody else getting duplicate messages?

2007-03-28 Thread Shaun
Yeah, I'm see the same thing.  Rather annoying indeed.  Yahoo must be 
having some problems



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

 I've been getting 2 sometimes 3 copies of many messages.  It's quite
 annoying and this is on top of an already high volume list.





RE: [flexcoders] TextArea htmltext parsing

2007-03-28 Thread Gordon Smith
What are you trying to do? If you want a list of words wouldn't you want
to parse the 'text' rather than the 'htmlText', which includes a bunch
of HTML markup?
 
You can use the split() method of String to create an Array. For the
first argument pass a RegExp representing one or more whitespace
characters, since the words might not be separated by only a single
space character.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Wednesday, March 28, 2007 12:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] TextArea htmltext parsing



How would I go about taking the htmltext of a TextArea and parsing it 
based on a space and assigning each piece to an Array or 
ArrayCollection?



 


Re: [flexcoders] Is anybody else getting duplicate messages?

2007-03-28 Thread Cutter (Flex Related)
Yes, quite a few times today

Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Paul DeCoursey wrote:
 
 
 I've been getting 2 sometimes 3 copies of many messages. It's quite
 annoying and this is on top of an already high volume list.
 
 


Re: [flexcoders] Re: Flex 2, AMFPHP and charset

2007-03-28 Thread Rafael Guédez

Thanks again Ryan!


This theme about the specials chars drive me crazy!

I test all en 3 different servers, with php5 and 4 and checking the  
data with phpMyAdmin and with two diffents local clients, cocoaMySQL  
and YourSQL (Mac), and using the Terminal too. With the Terminal the  
data look fine, but I'm scared because in all another clients I only  
see garbage. Even from Windows and phpMyAdmin.



The MySQL have this confg:

charset: UTF-8 Unicode
collation: utf8_general_ci

and in the table and fields of my tests the collation is  
latin_swedish_ci



I make the comparison of the service using Firebug between the two  
modes (AMF0 -with remotingConnection patch- and AMF3) of AMFPHP 1.9.  
I can't see any difference. But using AMF0 in AMFPHP 1.9 I can write  
specials chars correctly in the database. This is really weird!! and  
I would like make it to work using the ease way with AMF3.


So, I don't know if this is a problem in the beta version of AMFPHP  
1.9, and I didn't see more people with a similar problem.


I test this with all type of data and with all diffents  
setCharsetHandler in the gateway.php without luck.




regards


Rafael



On Mar 28, 2007, at 11:24 AM, Ryan Barrett wrote:

It sounds to me like a problem with differing character sets  
between PHP and the database or the client you're using to connect  
to the database.


I'd guess that both should be Latin-1 / Windows 1252..

You might get more info by looking at the communication between  
flex and php, this is easy using Firefox and the latest version of  
Firebug...



On 27/03/07, Rafael Guédez [EMAIL PROTECTED] wrote:

Thanks Ryan,





I tried with varchar and text datatype and I got the same problem.





For example: the char á look fine in the flex application, but in  
the database is á






And my php class is like the old amfphp 1.2 without the method  
table. If I use the same flex application with AMFPHP 1.9 and the  
AMF0 remotingconnection package work fine and save the correct  
chars in the DB. I'm using this old way for now,






like this:



http://www.adobe.com/devnet/flex/articles/flex2_amfphp_03.html







regards



Rafael





On Mar 27, 2007, at 11:01 AM, RadicalByte wrote:

--- In flexcoders@yahoogroups.com , Rafael Guédez [EMAIL PROTECTED]  
wrote:


 Hello,


 I really don't know what to do, I'm using in the gateway:


 $gateway-setCharse tHandler( none, ISO-8859-1, ISO-8859-1 );


 And running the application in the browser all the data look fine,
 but in the database this really write weird characters for special
 chars, and I need this data to see it in a normal flash web site.


 I don't know if this is a unsolved problem in this beta version.  
Any

 idea?


 Flex 2, AMFPHP 1.9, MySQL 4.0.26 and PHP 5.0.4


 regards


 Rafael


Hi Rafael,

What datatype are the fields in your DB?

How're you handling the characters in PHP (as it doesn't support  
unicode).


Cheers,
Ryan








--
Ryan






Re: [flexcoders] Is anybody else getting duplicate messages?

2007-03-28 Thread Doug McCune

I've been getting 2 sometimes 3 copies of many messages. It's quite
annoying and this is on top of an already high volume list.


On 3/28/07, Cutter (Flex Related) [EMAIL PROTECTED] wrote:


  Yes, quite a few times today

Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Paul DeCoursey wrote:


 I've been getting 2 sometimes 3 copies of many messages. It's quite
 annoying and this is on top of an already high volume list.


 



Re: [flexcoders] Re: Variable width ListItems

2007-03-28 Thread Mark Doberenz

You put a repeater inside a hbox and set dataprovider of the repeater to
what you're using on the list box.  It's not normally best practice to do
this, that's why Alex asked if you had a lot of items in the list.  Using a
repeater is much slower in rendering time than a list.

On 28 Mar 2007 12:54:21 -0700, Shaun [EMAIL PROTECTED] wrote:


  There aren't tons of items, but I need the dataprovider binding
functionality provided by the horizontallist. (right now I bind to
an arraycollection that changes regularly)

How would you recommend achieving this with an HBox? I'd rather not
manage the HBox's children manually, though I will if I have to of
course.

Thanks,
Shaun


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

 Unfortunately, this is not supported. Do you have tons of items?
If it
 is only a few, I'd use HBox

 

 From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
 Behalf Of Shaun
 Sent: Wednesday, March 28, 2007 10:40 AM
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Subject: [flexcoders] Variable width ListItems



 I have a horizontal list with items that can have variable widths.
 However, all items end up with the same width as the first item in
the
 list. How do I allow variable width list items?

 Is there something similar to the datagrid's variableRowHeight
setting
 that I'm missing?

 Thanks,
 Shaun


 



  1   2   >