RE: [flexcoders] help enabling or disabling a control when a user selects something - Solved

2005-05-11 Thread David Manriquez
Ppl..


Who is Ben Forta?.. :-)

David Manriquez Desarrollador
[EMAIL PROTECTED] 
(+56-2) 43 00 155


-Mensaje original-
De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre
de Craig Newroth
Enviado el: MiƩrcoles, 11 de Mayo de 2005 9:43
Para: flexcoders@yahoogroups.com
Asunto: RE: [flexcoders] help enabling or disabling a control when a user
selects something - Solved

okay, now just one more thing
that works, in that it disables the listbox on the
right, now I have made a button on the file that runs
the following AS code when clicked:
function resetForm(){
srcgrid.enabled = !srcgrid.enabled
}

so that works in that it enables the listbox, but if i
drag "All Reports" back into the originiating listbox
then drag it back into the destination listbox control
box,(it should disable the box) it doesn't disable the
control...
what in the world am I doing wrong. It should be a
simple thing to enable / disable a control based on
the selectionh
Craig



--- Craig Newroth <[EMAIL PROTECTED]> wrote:
> Thanks Tracy for getting me on the right track.!!!
> In the action script file that I posted here is what
> I
> changed/added in the below function to make it
> work...
> Now all I have to do is do a test on it to see if
> they
> selected it somewhere in the middle of the process.
> :-)
> **
> function doDragDrop(event) {
> 
> doDragExit(event);
> var items =
> event.dragSource.dataForFormat("items");
> var dest = event.target;
> var dropLoc = dest.getDropLocation();
> 
> items.reverse();
> 
> for(var i = 0; i < items.length; i++) {
> dest.addItemAt(dropLoc,items[i]);
> // * THE CHANGE/ADDED CODE **
> // Check to see if the drop location contains 'All
> Reports', if is does then disable the srcgrid so the
> user cannot select any other reports 
>   if (dropLoc,items[i] == 'All Reports'){
>   srcgrid.enabled = !srcgrid.enabled;
>   }
> }
> }
> *
> --- Tracy Spratt <[EMAIL PROTECTED]> wrote:
> > The enable toggle works correctly right?  Say if
> you
> > were to run it
> > directly from a button?
> > 
> > And the drag/drop works correctly?
> > 
> > Your code wasn't complete enough for me to run, so
> I
> > need to ask, When
> > you drag an item into the list, is it
> automatically
> > selected?
> > 
> > If so, you want to test:
> > event.target.selectedItem.label == "All Reports"
> (or
> > whatever the label
> > column property is named)
> > 
> > If not, you will need to iterate through the items
> > to see if the "All
> > Reports" option is included.
> > 
> > Can you extract the issue into a simple example?
> > 
> > Tracy
> > 
> > -Original Message-
> > From: flexcoders@yahoogroups.com
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Craig Newroth
> > Sent: Friday, May 06, 2005 2:05 PM
> > To: flexcoders@yahoogroups.com
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [flexcoders] help enabling or
> disabling
> > a control when a
> > user selects something
> > 
> > well, it is supposed to test for the content of
> the
> > selected item and then what I want to do is enable
> > or
> > disable a list control.. I have tired both the
> > number
> > zero (the selected index) of my first list and the
> > text value and cannot get it to work.
> > 
> > --- Manish Jethani <[EMAIL PROTECTED]>
> wrote:
> > > On 5/5/05, cnewroth55 <[EMAIL PROTECTED]>
> > wrote:
> > > 
> > > > if (event.target.selectedIndices ==
> "All
> > > Reports"){
> > > > srcgrid.enabled =
> > > !srcgrid.enabled;
> > > > }
> > > 
> > > I'm sorry if this is a stupid question as I
> > haven't
> > > gone through your
> > > entire code line by line, but what does the
> above
> > > if-condition want to
> > > test?  'selectedIndices' will be an array of
> > Number
> > > objects, so I
> > > wonder if comparing it to a string like that is
> > > correct.
> > > 
> > 
> > 
> > 
> > Yahoo! Mail
> > Stay connected, organized, and protected. Take the
> > tour:
> > http://tour.mail.yahoo.com/mailtour.html
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> 
> 
>   
> Yahoo! Mail
> Stay connected, organized, and protected. Take the
> tour:
> http://tour.mail.yahoo.com/mailtour.html
> 
> 



Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html


 
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] help enabling or disabling a control when a user selects something - Solved

2005-05-11 Thread Craig Newroth
okay, now just one more thing
that works, in that it disables the listbox on the
right, now I have made a button on the file that runs
the following AS code when clicked:
function resetForm(){
srcgrid.enabled = !srcgrid.enabled
}

so that works in that it enables the listbox, but if i
drag "All Reports" back into the originiating listbox
then drag it back into the destination listbox control
box,(it should disable the box) it doesn't disable the
control...
what in the world am I doing wrong. It should be a
simple thing to enable / disable a control based on
the selectionh
Craig



--- Craig Newroth <[EMAIL PROTECTED]> wrote:
> Thanks Tracy for getting me on the right track.!!!
> In the action script file that I posted here is what
> I
> changed/added in the below function to make it
> work...
> Now all I have to do is do a test on it to see if
> they
> selected it somewhere in the middle of the process.
> :-)
> **
> function doDragDrop(event) {
> 
> doDragExit(event);
> var items =
> event.dragSource.dataForFormat("items");
> var dest = event.target;
> var dropLoc = dest.getDropLocation();
> 
> items.reverse();
> 
> for(var i = 0; i < items.length; i++) {
> dest.addItemAt(dropLoc,items[i]);
> // * THE CHANGE/ADDED CODE **
> // Check to see if the drop location contains 'All
> Reports', if is does then disable the srcgrid so the
> user cannot select any other reports 
>   if (dropLoc,items[i] == 'All Reports'){
>   srcgrid.enabled = !srcgrid.enabled;
>   }
> }
> }
> *
> --- Tracy Spratt <[EMAIL PROTECTED]> wrote:
> > The enable toggle works correctly right?  Say if
> you
> > were to run it
> > directly from a button?
> > 
> > And the drag/drop works correctly?
> > 
> > Your code wasn't complete enough for me to run, so
> I
> > need to ask, When
> > you drag an item into the list, is it
> automatically
> > selected?
> > 
> > If so, you want to test:
> > event.target.selectedItem.label == "All Reports"
> (or
> > whatever the label
> > column property is named)
> > 
> > If not, you will need to iterate through the items
> > to see if the "All
> > Reports" option is included.
> > 
> > Can you extract the issue into a simple example?
> > 
> > Tracy
> > 
> > -Original Message-
> > From: flexcoders@yahoogroups.com
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Craig Newroth
> > Sent: Friday, May 06, 2005 2:05 PM
> > To: flexcoders@yahoogroups.com
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [flexcoders] help enabling or
> disabling
> > a control when a
> > user selects something
> > 
> > well, it is supposed to test for the content of
> the
> > selected item and then what I want to do is enable
> > or
> > disable a list control.. I have tired both the
> > number
> > zero (the selected index) of my first list and the
> > text value and cannot get it to work.
> > 
> > --- Manish Jethani <[EMAIL PROTECTED]>
> wrote:
> > > On 5/5/05, cnewroth55 <[EMAIL PROTECTED]>
> > wrote:
> > > 
> > > > if (event.target.selectedIndices ==
> "All
> > > Reports"){
> > > > srcgrid.enabled =
> > > !srcgrid.enabled;
> > > > }
> > > 
> > > I'm sorry if this is a stupid question as I
> > haven't
> > > gone through your
> > > entire code line by line, but what does the
> above
> > > if-condition want to
> > > test?  'selectedIndices' will be an array of
> > Number
> > > objects, so I
> > > wonder if comparing it to a string like that is
> > > correct.
> > > 
> > 
> > 
> > 
> > Yahoo! Mail
> > Stay connected, organized, and protected. Take the
> > tour:
> > http://tour.mail.yahoo.com/mailtour.html
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> 
> 
>   
> Yahoo! Mail
> Stay connected, organized, and protected. Take the
> tour:
> http://tour.mail.yahoo.com/mailtour.html
> 
> 



Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html


 
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] help enabling or disabling a control when a user selects something - Solved

2005-05-11 Thread Craig Newroth
Thanks Tracy for getting me on the right track.!!!
In the action script file that I posted here is what I
changed/added in the below function to make it work...
Now all I have to do is do a test on it to see if they
selected it somewhere in the middle of the process.
:-)
**
function doDragDrop(event) {

doDragExit(event);
var items =
event.dragSource.dataForFormat("items");
var dest = event.target;
var dropLoc = dest.getDropLocation();

items.reverse();

for(var i = 0; i < items.length; i++) {
dest.addItemAt(dropLoc,items[i]);
// * THE CHANGE/ADDED CODE **
// Check to see if the drop location contains 'All
Reports', if is does then disable the srcgrid so the
user cannot select any other reports 
if (dropLoc,items[i] == 'All Reports'){
srcgrid.enabled = !srcgrid.enabled;
}
}
}
*
--- Tracy Spratt <[EMAIL PROTECTED]> wrote:
> The enable toggle works correctly right?  Say if you
> were to run it
> directly from a button?
> 
> And the drag/drop works correctly?
> 
> Your code wasn't complete enough for me to run, so I
> need to ask, When
> you drag an item into the list, is it automatically
> selected?
> 
> If so, you want to test:
> event.target.selectedItem.label == "All Reports" (or
> whatever the label
> column property is named)
> 
> If not, you will need to iterate through the items
> to see if the "All
> Reports" option is included.
> 
> Can you extract the issue into a simple example?
> 
> Tracy
> 
> -Original Message-
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Craig Newroth
> Sent: Friday, May 06, 2005 2:05 PM
> To: flexcoders@yahoogroups.com
> Cc: [EMAIL PROTECTED]
> Subject: Re: [flexcoders] help enabling or disabling
> a control when a
> user selects something
> 
> well, it is supposed to test for the content of the
> selected item and then what I want to do is enable
> or
> disable a list control.. I have tired both the
> number
> zero (the selected index) of my first list and the
> text value and cannot get it to work.
> 
> --- Manish Jethani <[EMAIL PROTECTED]> wrote:
> > On 5/5/05, cnewroth55 <[EMAIL PROTECTED]>
> wrote:
> > 
> > > if (event.target.selectedIndices == "All
> > Reports"){
> > > srcgrid.enabled =
> > !srcgrid.enabled;
> > > }
> > 
> > I'm sorry if this is a stupid question as I
> haven't
> > gone through your
> > entire code line by line, but what does the above
> > if-condition want to
> > test?  'selectedIndices' will be an array of
> Number
> > objects, so I
> > wonder if comparing it to a string like that is
> > correct.
> > 
> 
> 
>   
> Yahoo! Mail
> Stay connected, organized, and protected. Take the
> tour:
> http://tour.mail.yahoo.com/mailtour.html
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> 



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html



 
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] help enabling or disabling a control when a user selects something

2005-05-10 Thread Craig Newroth
Tracy:
 I have attached the files that I am using as weel as
the AS file for control...in the as file look around
line 58 for the code that I am trying. You will need
to comment out the ones that do the topmenu and the
display. StandardReports.mxml is the file in question.
WHen I select "all reports" from srcgrid and drag it
into destgrid I want 'srcgrid' to be disabled...
thanks,
Craig

--- Tracy Spratt <[EMAIL PROTECTED]> wrote:
> The enable toggle works correctly right?  Say if you
> were to run it
> directly from a button?
> 
> And the drag/drop works correctly?
> 
> Your code wasn't complete enough for me to run, so I
> need to ask, When
> you drag an item into the list, is it automatically
> selected?
> 
> If so, you want to test:
> event.target.selectedItem.label == "All Reports" (or
> whatever the label
> column property is named)
> 
> If not, you will need to iterate through the items
> to see if the "All
> Reports" option is included.
> 
> Can you extract the issue into a simple example?
> 
> Tracy
> 
> -Original Message-
> From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Craig Newroth
> Sent: Friday, May 06, 2005 2:05 PM
> To: flexcoders@yahoogroups.com
> Cc: [EMAIL PROTECTED]
> Subject: Re: [flexcoders] help enabling or disabling
> a control when a
> user selects something
> 
> well, it is supposed to test for the content of the
> selected item and then what I want to do is enable
> or
> disable a list control.. I have tired both the
> number
> zero (the selected index) of my first list and the
> text value and cannot get it to work.
> 
> --- Manish Jethani <[EMAIL PROTECTED]> wrote:
> > On 5/5/05, cnewroth55 <[EMAIL PROTECTED]>
> wrote:
> > 
> > > if (event.target.selectedIndices == "All
> > Reports"){
> > > srcgrid.enabled =
> > !srcgrid.enabled;
> > > }
> > 
> > I'm sorry if this is a stupid question as I
> haven't
> > gone through your
> > entire code line by line, but what does the above
> > if-condition want to
> > test?  'selectedIndices' will be an array of
> Number
> > objects, so I
> > wonder if comparing it to a string like that is
> > correct.
> > 
> 
> 
>   
> Yahoo! Mail
> Stay connected, organized, and protected. Take the
> tour:
> http://tour.mail.yahoo.com/mailtour.html
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> 



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


 
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/
 


DragEventHandlers.as
Description: 229667049-DragEventHandlers.as


standardReports.mxml
Description: 767879685-standardReports.mxml


gvsStartA.mxml
Description: 2325252969-gvsStartA.mxml


RE: [flexcoders] help enabling or disabling a control when a user selects something

2005-05-06 Thread Tracy Spratt
The enable toggle works correctly right?  Say if you were to run it
directly from a button?

And the drag/drop works correctly?

Your code wasn't complete enough for me to run, so I need to ask, When
you drag an item into the list, is it automatically selected?

If so, you want to test:
event.target.selectedItem.label == "All Reports" (or whatever the label
column property is named)

If not, you will need to iterate through the items to see if the "All
Reports" option is included.

Can you extract the issue into a simple example?

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Craig Newroth
Sent: Friday, May 06, 2005 2:05 PM
To: flexcoders@yahoogroups.com
Cc: [EMAIL PROTECTED]
Subject: Re: [flexcoders] help enabling or disabling a control when a
user selects something

well, it is supposed to test for the content of the
selected item and then what I want to do is enable or
disable a list control.. I have tired both the number
zero (the selected index) of my first list and the
text value and cannot get it to work.

--- Manish Jethani <[EMAIL PROTECTED]> wrote:
> On 5/5/05, cnewroth55 <[EMAIL PROTECTED]> wrote:
> 
> > if (event.target.selectedIndices == "All
> Reports"){
> > srcgrid.enabled =
> !srcgrid.enabled;
> > }
> 
> I'm sorry if this is a stupid question as I haven't
> gone through your
> entire code line by line, but what does the above
> if-condition want to
> test?  'selectedIndices' will be an array of Number
> objects, so I
> wonder if comparing it to a string like that is
> correct.
> 



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html



 
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] help enabling or disabling a control when a user selects something

2005-05-06 Thread Craig Newroth
well, it is supposed to test for the content of the
selected item and then what I want to do is enable or
disable a list control.. I have tired both the number
zero (the selected index) of my first list and the
text value and cannot get it to work.

--- Manish Jethani <[EMAIL PROTECTED]> wrote:
> On 5/5/05, cnewroth55 <[EMAIL PROTECTED]> wrote:
> 
> > if (event.target.selectedIndices == "All
> Reports"){
> > srcgrid.enabled =
> !srcgrid.enabled;
> > }
> 
> I'm sorry if this is a stupid question as I haven't
> gone through your
> entire code line by line, but what does the above
> if-condition want to
> test?  'selectedIndices' will be an array of Number
> objects, so I
> wonder if comparing it to a string like that is
> correct.
> 



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html



 
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] help enabling or disabling a control when a user selects something

2005-05-05 Thread Manish Jethani
On 5/5/05, cnewroth55 <[EMAIL PROTECTED]> wrote:

> if (event.target.selectedIndices == "All Reports"){
> srcgrid.enabled = !srcgrid.enabled;
> }

I'm sorry if this is a stupid question as I haven't gone through your
entire code line by line, but what does the above if-condition want to
test?  'selectedIndices' will be an array of Number objects, so I
wonder if comparing it to a string like that is correct.


 
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/