Re: [flexcoders] How can I show validation error message with ActionScript progrmming?

2005-05-12 Thread michael keirnan






the errorString property of UIComponent causes the red borders and
rollover error tip. errorString is set by the default validation
listener when it gets errors.

so you'll need to do something like this:

 - write a validation listener that does not set errorString, but
instead presents the error how you like

 - set the listener property of your validators to point at your new
listener (your listener could extend UIComponent
 if you want to easily drop one in your MXML pages, but it does not
have to be)

one thing to be careful of: the default flex validation system has
internal knowledge of data bindings. that is, you point a validator at
a model object, and the default validation listener automagically knows
what UIComponent to associate with errors. your listener does not have
this knowledge, so if you do need to associate errors with fields you
have to declare or configure them somehow. it sounds like you may not
care about this association.

 /mgk

cto wrote:

  
  
  
  
  Hi~
  
I want to show a validation error messgae with ActionScript.
  
I general, if there is invalid data in form with validator, user can
see the 
error message(ErrorTip) when he rollover the formItem.
  
But, my customer want to show this error message without mouse rollOver.
  
Do you have any idea?
  










Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.














Re: [flexcoders] Default Text Color?

2005-05-12 Thread michael keirnan







Matt Chotin wrote:

  
  


  
  
  Yep. I just
use the calculator in Windows
in scientific mode to help me out for stuff like this J
  

ugh, why go through all that trouble?

perl -e 'printf("%x\n", "734012")'

;)

 /mgk


  
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
  Sent: Thursday, May
12, 2005 10:07
AM
  To: flexcoders@yahoogroups.com
  Subject: Re:
[flexcoders] Default
Text Color?
  
  
  0x0B333C; right?
  
  - Original Message - 
  From: "JesterXL"
[EMAIL PROTECTED]
  To: "Flexcoders" flexcoders@yahoogroups.com
  Sent: Thursday, May 12, 2005 12:57 PM
  Subject: [flexcoders] Default Text Color?
  
  
  I suck at math; what is 734012 in hex?
  
  Thanks if you can help.
  
  --JesterXL
  
  
  
  Yahoo! Groups Links
  
  
  
  
  
  
  

  









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.














Re: [flexcoders] Split up flex-config.xml

2005-05-03 Thread michael keirnan
i haven't tried it, but the XML entity include might work, depending on 
the parser.

   http://ant.apache.org/faq.html#xml-entity-include

   /mgk

Peter Farland wrote:

Hi Yokota, only one configuration file can be used by the
AMFGatewayServlet. The whitelist.parent.node points the gateway's
configuration parser to the right element to start constructing its
whitelist. This was necessary as Flex 1.5's configuration file has a
whitelist for web services, http services and remote object services.

Please file an enhancement request at
http://www.macromedia.com/support/email/wishform/main.cgi



 
Yahoo! Groups Links



 





  



 
Yahoo! Groups Links

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

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

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





Re: [flexcoders] binding error - from Flex?

2005-05-02 Thread michael keirnan






also, if you run mxmlc or compc against your source tree the generated
files are placed right in your source tree. (perhaps obvious if one
thinks about it, but i did not think about it until it bit me). this
can lead to various problems during the typical development process:
edit-compile-test-curse-repeat.

 /mgk

Tom Fitzpatrick wrote:

  Tracy - thanks. Deleting the generated files did the trick.

- Tom

At 12:19 PM 4/27/2005, you wrote:
  
  
The generated files I am talking about are under "
..[flex-root]\WEB-INF\flex\generated|" folder in the Flex server. There
are several folders with generated names. It is safe to delete them.

If you get the 32k error on one server but not another, that really
sounds like a boundary condition.  Try running the one with the error
using the ?debug=true request parameter.  This causes debug code to get
generated into the app and has, in the past allowed us to continue.

Tracy



-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Tom Fitzpatrick
Sent: Wednesday, April 27, 2005 6:26 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] binding error - from Flex?


Tracy - thanks for the suggestion. My problem is that I'm not really
changing anything, just making a copy of the whole app folder, renaming
it,
and trying to compile it again from the new folder - so I don't really
know
where to put the extra code.

I'm ready to try the file deletion suggestion, but need more info. I'm
running Flex locally using Tomcat, so I have generated files in my local

project folder and in my local server folder. Which ones do I delete?
Both?
Do I leave the libs folders alone? And - most important - is there any
danger in doing this or any precautions I should take?

- Tom

At 09:47 PM 4/25/2005, you wrote:


  Ignore the message, add some code, and run the app again.  I have also
hit a situation where this did not work until I had deleted the files
out of the ...web-inf\flex\generated folder, then compiled it again.
But usually, 10-15 more lines of code gets me over the hump.

If you believe you app is as refactored as is reasonable, give this a
try.
  







Yahoo! Groups Links











--
Yahoo! Groups Links
   * To visit your group on the web, go to:
   * 
http://groups.yahoo.com/group/flexcoders/http://groups.yahoo.com/group/flexcoders/ 

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

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

  
  





 
Yahoo! Groups Links

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

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

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





  









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.














Re: [flexcoders] Setting Text Property of Label Control Dynamically

2005-05-02 Thread michael keirnan






it looks like you want to use data binding here. in your mxml you can
do this:

mx:Label id="lblListValue"
text="{lstCanvasSize.selectedItem.label}"/

and comment out this line in your AS:

 //lblListValue.text = strSize;

if you haven't already, definitely check out the sections in the Flex
User Guide that talk about data binding for more background. the Flex
explorer sample app is also very useful to understand the building
blocks available to flex coders.

 /mgk

David Terry wrote:

  
  
  
  
  Hello Fellow Groupies,
  
  I am having an issue
with setting the text property of a
label control dynamically the alert box displays the correct value but
for some reason the label does not.
  
  What am I doing wrong?
  
  Many thank,
  David T.
  
  










Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.














Re: [flexcoders] Re: help with setInterval...

2005-04-23 Thread michael keirnan







heh, yeah i misplaced a paren on purpose to see who was paying
attention. ;) and if you believe that 

 /mgk

Abdul Qabiz wrote:

  Hi terry_hrtn,

Can you post the entire code now? I would like to see why it's not working. 

Correcting Michael's suggestion:

setInterval(mx.utils.Delegate.create(this, upCount), 1000);


I just tested your code after resolving scope issues, it works fine for
me

-abdul


-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
Sent: Saturday, April 23, 2005 12:31 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: help with setInterval...


Does not work.

On 4/12/05, michael keirnan [EMAIL PROTECTED] wrote:
  
  
it would be good to go through the Flex UG sections on scoping and event
listeners. in the long run understanding scope is invaluable. in your
test case the following might work:

  setInterval(mx.utils.Delegate.create(this, upCount, 1000);

   /mgk

terry_hrtn wrote:



  Matt...now I'm getting the message below in the debug file...any
suggestions.

Warning: [type Function] is not a function
  at ()

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


  
  
You're having scope issues.  setInterval(this, "upCount", 1000);



More info here:
http://livedocs.macromedia.com/flex/15/flex_docs_en/1662.htm
http://livedocs.macromedia.com/flex/15/flex_docs_en/1662.htm



Matt



 _

From: terry_hrtn [mailto:[EMAIL PROTECTED]...]
Sent: Monday, April 11, 2005 10:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] help with setInterval...




Needing some help with setInterval...
Can someone tell me why "setInterval" calls the "upCount" function
but does not update label on screen?

?xml version="1.0" encoding="utf-8"?
mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml
http://www.macromedia.com/2003/mxml " 
 mx:Script
 ![CDATA[

   var nCnt : Number = 0;
   var lClock : Number = -1;

   function startClock()
   {
 btStart.enabled = false;
 btStop.enabled = true;

 upCount();
 lClock = setInterval(upCount,1000);

 lbClockStat.text = 'Started! (' + lClock
+ ')';
   }

   function upCount()
   {
 nCnt += 1;
 lbShow.text = 'Count: ' + nCnt;
   }

   function stopClock()
   {
 lbClockStat.text = "Stopped at " + nCnt;
 nCnt = 0;
 btStop.enabled = false;
 btStart.enabled = true;
 clearInterval(lClock);
   }


 ]]
 /mx:Script
 mx:Panel width="304" height="121" 
   mx:Label id="lbShow" text="start" /
   mx:HBox
 mx:Button id="btStart" label="Start Clock"
click="startClock()" /
 mx:Button id="btStop" label="Stop Clock"
click="stopClock()" enabled="false" /
   /mx:HBox
   mx:Label id="lbClockStat" /
 /mx:Panel
/mx:Application






 _

Yahoo! Groups Links

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

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

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



  
  




Yahoo! Groups Links











  

Yahoo! Groups Links






  
  

 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

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

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

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





  









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.














Re: [flexcoders] Re: help with setInterval...

2005-04-12 Thread michael keirnan

it would be good to go through the Flex UG sections on scoping and event 
listeners. in the long run understanding scope is invaluable. in your 
test case the following might work:

  setInterval(mx.utils.Delegate.create(this, upCount, 1000);


   /mgk

terry_hrtn wrote:

Matt...now I'm getting the message below in the debug file...any 
suggestions. 

Warning: [type Function] is not a function
   at ()

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

You're having scope issues.  setInterval(this, upCount, 1000);

 

More info here:
http://livedocs.macromedia.com/flex/15/flex_docs_en/1662.htm
http://livedocs.macromedia.com/flex/15/flex_docs_en/1662.htm 

 

Matt

 

  _  

From: terry_hrtn [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 11, 2005 10:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] help with setInterval...

 


Needing some help with setInterval...
Can someone tell me why setInterval calls the upCount function 
but does not update label on screen?

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml
http://www.macromedia.com/2003/mxml  
  mx:Script
  ![CDATA[
  
var nCnt : Number = 0;
var lClock : Number = -1;

function startClock()
{
  btStart.enabled = false;
  btStop.enabled = true;
  
  upCount();
  lClock = setInterval(upCount,1000);
  
  lbClockStat.text = 'Started! (' + lClock 
+ ')';
}

function upCount()
{
  nCnt += 1;
  lbShow.text = 'Count: ' + nCnt;
}

function stopClock()
{
  lbClockStat.text = Stopped at  + nCnt;
  nCnt = 0;
  btStop.enabled = false;
  btStart.enabled = true;
  clearInterval(lClock);
}

  
  ]]
  /mx:Script
  mx:Panel width=304 height=121 
mx:Label id=lbShow text=start /
mx:HBox
  mx:Button id=btStart label=Start Clock 
click=startClock() /
  mx:Button id=btStop label=Stop Clock 
click=stopClock() enabled=false /
/mx:HBox
mx:Label id=lbClockStat /
  /mx:Panel
/mx:Application






  _  

Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
http://groups.yahoo.com/group/flexcoders/ 
  
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 
  
* Your use of Yahoo! Groups is subject to the Yahoo!
http://docs.yahoo.com/info/terms/  Terms of Service.







 
Yahoo! Groups Links



 





  



 
Yahoo! Groups Links

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

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

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





Re: [flexcoders] Acessing a class

2005-04-08 Thread michael keirnan

from the code fragments below it looks like you never assign the 
objPropostaBusca variable to an instance of the class you want. it 
depends on the rest of your app and what you're trying to do of course, 
but something like this might work:

mx:Script
   var objPropostaBusca:as_PropostaBusca = new as_PropostaBusca();
/mx:Script

   /mgk

Fernando Barros wrote:

Hi there!

Im trying to make my first flex app and I´ve this problem:
I have proposta.mxml with 
mx:VBox id=tabBusca label=Suas Propostas width=100% 
   PropostaBusca id=PropBusca/
/mx:VBox

And in PropostaBusca.mxml I have:
...
mx:Script
   var objPropostaBusca:as_PropostaBusca;
/mx:Script
...
mx:Button label=Abrir enabled={dgProposta.selectedItem!=null} 
click=objPropostaBusca.Abrir(dgProposta.selectedItem.NPROPOSTAID);/

And in as_PropostaBusca.as:
import mx.controls.Alert;
import mx.services.WebService;

class as_PropostaBusca
{
   public function Abrir(nPropostaID:Number):Void
   {
   Alert.show('Entrou');
   var objSessao:SharedObject;
   ...

But I´ve never got this Alert or any type of trace.

What Am I doing wrong?

Thks in advance!

---
Fernando Barros
---




 
Yahoo! Groups Links



 





  



 
Yahoo! Groups Links

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

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

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





Re: [flexcoders] the difference between List.getItemAt and List.getChildAt

2005-04-08 Thread michael keirnan

the two APIs are not intended to be similar, although perhaps the names 
themselves might lead one to think they are related at first glance.

getItemAt() returns the specified item from the list's data provider. 
getChildAt() is inherited from View which is a base class that provides 
containment semantics. so MXML components that can have other MXML 
components within them extend View.

   /mgk

Krzysztof Szlapinski wrote:

Hi,

I wonder what is the difference between List.getItemAt() property and 
List.getChildAt() method.

When I create List items with addItem the List.getChildAt() gives me 
undefined value and getItemAt() gives me the correct item.

why?

krzysiek 




 
Yahoo! Groups Links



 





  



 
Yahoo! Groups Links

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

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

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





[flexcoders] Re: Inserting a blank row in the middle of a datagrid.

2005-04-06 Thread Michael Keirnan


if you have a look at the properties of DataGrid in the docs (like
rowHeight) you'll see various ways to adjust how rows and columns are
displayed, including substituing your own rowRenderer if you
want to get fancy.

generally it is better to adjust properties that control
presentation as opposed to faking data to force presentation, but
if you -really- want a blank row you could try inserting a row
whose values are whitespace strings.

   /mgk


--- In flexcoders@yahoogroups.com, greenfishinwater
[EMAIL PROTECTED] wrote:
 
 I have a datagrid, populated via a dataprovider from a remote
object.
 The grid has 3 columns, the first of which is a type description. In
 my application there are only 2 different types (Full Price and
 Discount Price). I would like to have a blank row between the rows
of
 the first type and the rows of the second type.This would help
 differentiate the 2 groups of data.
 
 Anybody have any ideas on anyway to do this?
 
 Andrew





 
Yahoo! Groups Links

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

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

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





generating ActionScript doc (ala javadoc)

2005-03-04 Thread Michael Keirnan

apologies in advance if this has been asked and answered. i searched
the archives (honest).

i'm curious what folks are doing for generating documentation for
their AS2 and MXML code. the freeware tools appear to be in the early
stages as yet.

here are some tools i've run across (but not yet tried)

http://www.badgers-in-foil.co.uk/projects/as2api/
http://visiblearea.com/visdoc/ (commercial)
http://www.as2doc.com (commercial)

/mgk