Defining the startup class in FlexBuilder

2005-03-10 Thread Chris Reynolds



In 
Flexbuilder, when I press F6 or ALT/F6, it compiles and executes the file 
currently being edited.
As 
most of my time seems to be in editing components, is there anyway of specifying 
the executeable application root without switching to it in the edit 
window.


RE: [flexcoders] What does this error message mean

2005-03-10 Thread Tracy Spratt








Typically it is a syntax error somewhere
above the line identified. Look for a + or = with nothing after it.



Tracy











From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
1:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] What does
this error message mean





When it says Identifier expected what does it mean? 









RE: [flexcoders] flex project

2005-03-10 Thread Wilfred LEUNG
Title: Message



Any 
change for people not in the US?


Wilfred


-Original Message-From: Nate Nielsen 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 10:23 
AMTo: flexcoders@yahoogroups.comSubject: Re: 
[flexcoders] flex project
Apparently I have all of the Dallas / ft. worth 
resources tapped out, so if anyone else in the USA, (TX orCA would be 
nice, butisnt a must) is interested in some pure telecommute work on the 
side or full time, please let me know

awesome opportunity to work on an up-coming .com 
and make some cash hourly while at it!! this is NOT one of those 
"work for stock" situations, you'll be paid for every hour of 
work!

send me skills summary or resume off list at my 
address below, thanks!

nate nielsen
www.webclarity.com
[EMAIL PROTECTED]


- Original Message - 
From: 
Nate 
Nielsen 
To: flexcoders@yahoogroups.com 

Sent: Wednesday, March 09, 2005 8:47 
AM
Subject: [flexcoders] flex 
project

i'm looking for 2-3 flex coders to do some 
hourly contract work.

i would prefer you to be local to the dallas / 
ft worth, TXarea for some meetings, but all of the work will be done 
from your location via telecommuting. if you are able to drive toDFW 
for meetings roughly once a week but live/work further out, that shouldn't 
be a problem.

if you currently have a part time / full time 
job elsewhere and want some flex work for extra cash or experience, that is 
acceptable. (i.e. don't have to quit your day job if you are already 
engaged 8-5). but I am looking for people with a minimum of 20 hours a 
week to spare on this project.

you will be part of a team that is building an 
exciting new e-commerce .com that will be emerging shortly. this is an 
awesome chance to work on a high profile --fully-- flex site that will 
actually be open to the public! (perhaps the first large scale 
flex B2C .com!)

if you are interested, please send a resume or 
skills summary along with details of your flex experience and any URLs you 
might have OFF LIST to [EMAIL PROTECTED]

thanks

nate nielsen
[EMAIL PROTECTED]




Accessing POJO using remoteobject

2005-03-10 Thread Arjun

I have spend couple of hours to figure out how to access java object 
using remoteobject tag but haven't been successful, I would 
appreciate if somebody to tell me what am I doing wrong. I am 
basically trying to run the cairnogorm framework sample application

The problem that I am facing is first of all both the java code and 
flex action script shares the same package hierarchy i.e. 
com.iterationtwo.demo.* so I cannot copy both the java folder and 
flex AS folder under the WEB-INF\flex\user_classes folder

Options that I have tried

a)  created a new folder java under the WEB-INF\flex\ folder and 
added the mapping for that in actionscript-classpath folder and 
copied java package under this folder, this did not worked

b)  secondly since both the java code and flex code has the same 
folder hierarchy I copied the java files under the flex folder 
itself this also did not worked


Error I am getting is : service ….. not found.

Side notes
•   I am using jrun4
•   I have created the whitelist entry for the remote object
•   Is it possible to deploy jar (containing java source code) ?


Thanks
Arjun







RE: [flexcoders] Warning from custom component

2005-03-10 Thread Matt Chotin








It might need to be 



public function set visible(v:Boolean):
Void

{

 super.visible = v;

}



Also I think you need to make sure to also
include a getter that returns super.visible to make sure the full override is
successful.



Public function get visible() : Boolean

{

 Return super.visible;

}



Matt











From: Tom Fitzpatrick
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
1:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Warning from
custom component





I'm trying to make use of the dynamic FormItem example of a custom 
component from the Webster/McLeod book. The code
does work, but I'm getting 
a warning.

The warning is:

The function, visible, hides a function in
ancestor class, 'mx.core.UIObject'

The code is:

class DynamicFormItem extends
mx.containers.FormItem
{
 public function set
visible(visible:Boolean)
 {

 super.visible = visible;

 if (!visible)

 {

  height=0;

 }

 else

 {

  height=undefined;

 }
 }
}

Is there something wrong with the way I've written
the code, or should I 
ignore the warning?

- Tom














RE: [flexcoders] ViewStack selectedChild

2005-03-10 Thread Matt Chotin








The selectedChild is a reference to the
actual object that you would find at the selectedIndex. So what is the data
that you have that will help you determine which object you want to select? If
each element of the dataProvider is the id of the child (this means that every
child of your ViewStack has an id), you could simply do
myViewStack.selectedChild = this[data].



Not sure what youre trying to
really do here.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
2:15 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Ok, Ive been coding too long
todayI need to take a data attribute from a dataProvider and cast into
an Object that can be used in the statement
ViewStack.selectedChild=objectI know this is easy but am having some
brain-pain at the momentTIA for any info.



Regards.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:40 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Oopsit appears I have to use the
data attribute to create a new object and use thatnevermind J













From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack
selectedChild





Hi,



Just curiousthe MM docs indicate that setting of the
ViewStack.selectedChild can only be done in AS and not in MXML; however, it
appears from the MM example and my tests that the reverse is true



I have a script that is attempting to set the selectedChild
to a value that matches the id attribute of one of the ViewStacks but it
doesnt work.the ViewStack.selectedIndex works
great...whats up with the selectedChild?



viewStack.selectedChild=event.target.selectedItem.attributes.data;



TIA for any info.



Regards.















MS Designers/Dot Net Designers needed for CMMi Level 5

2005-03-10 Thread abba_vb

MS Designers/Dot Net Designers needed for CMMi Level 5

Hi

We are looking for MS Designers 

Location : Hyderabad/Bangalore

Following are the skills we are looking for.


* Should be from OO background (C++ / VC++).

* ASP.NET / C# / VB.NET.

* .Net Remoting.

* Application Blocks.

* Design Patterns.


Expereince : Candidates should have 5 to 10 yrs of exp.


Pl rush ur profiles to

[EMAIL PROTECTED]

abba_consultants(at)yahoo.com

regards

Bharath
ABBA
98410 97494







Re: [flexcoders] Datagrid Rows - backgroundColor style...

2005-03-10 Thread Manish Jethani
On Wed, 09 Mar 2005 21:31:30 -, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 function setValue(str:String, item:Object, sel:String) : Void {
 if (item.c_state=='GA') {
 lbl.setStyle(color, 0x006600);
 } else {
 lbl.setStyle(color, 0x00);
 }

Do setStyle() on the cell itself, not the label.

if (item.c_state=='GA') {
setStyle(backgroundColor, 0x006600);
} else {
setStyle(backgroundColor, 0x00);
}

Manish




DateField: DateFormatter noCancel ?

2005-03-10 Thread r0main

Hi folks,
is there a DIRECT way to use a given mx:dateFormatter into a DateField ?
(I know I can do a function that calls the formatter and pass that
function, but a direct link between both controls would be nice isn't
it ?)
For future version: will be nice if we can use it like :
mx:DateFormatter id=versionFormatter formatString=-MM-DD /
mx:DateField id=asOfDate dateFormatter=versionFormatter /

Also a simple question: Is there a way to avoid allowing the user to
set the date to null by re-selecting the date selected ?
(In some apps, some dates can never be null)

Thanks, r0main







Re: Extending custom components

2005-03-10 Thread bhaq1972

Just an idea

add all the child controls in your base class using createchild 
(during the initialize event say) rather than in mxml.
then that will leave you free to add controls to your extended 
component using mxml.

hope this helps.

btw: this scheduling system your writing. can you give more details. 
would it be for sale? etc.

regards
bod(bhaq1972)




--- In flexcoders@yahoogroups.com, adk365 [EMAIL PROTECTED] wrote:
 
 Hello,
 
 I'm creating a scheduling system where users can drag events onto 
a 
 weekly calendar and resize the events for how long they want to 
 spend doing the activity. 
 
 The events may be of many different types with different 
 data/display needs, and so I'm creating a base clase, called 
 scheduleItem, to handle drag-and-drop, resizing, tracking what 
time 
 the event appears on the calendar, etc. I'm then extending that 
 base class to display text and components specific to the type of 
 event. (some may just have text, others may need combo boxes, 
etc.).
 
 The problem I have is that I can't add components to my base class 
 (like the drag bar, resizer dot, or text for displaying the time) 
 while at the same time allowing the extending classes to add 
 additional components based on their needs.
 
 Does anyone have any suggestions for getting around this?
 
 Thanks for your help!
 Aaron







RE: [flexcoders] Warning from custom component

2005-03-10 Thread Tom Fitzpatrick
At 02:04 AM 3/10/2005, you wrote:
It might need to be
public function set visible(v:Boolean) : Void
{
super.visible = v;
}
Also I think you need to make sure to also include a getter that returns 
super.visible to make sure the full override is successful.

Public function get visible() : Boolean
{
Return super.visible;
}
Matt
Matt - that was it. Thanks!
- Tom
--
From: Tom Fitzpatrick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 09, 2005 1:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Warning from custom component
I'm trying to make use of the dynamic FormItem example of a custom
component from the Webster/McLeod book. The code does work, but I'm getting
a warning.
The warning is:
The function, visible, hides a function in ancestor class, 'mx.core.UIObject'
The code is:
class DynamicFormItem extends mx.containers.FormItem
{
public function set visible(visible:Boolean)
{
super.visible = visible;
if (!visible)
{
height=0;
}
else
{
height=undefined;
}
}
}
Is there something wrong with the way I've written the code, or should I
ignore the warning?
- Tom



Yahoo! Groups Sponsor
ADVERTISEMENT
http://us.ard.yahoo.com/SIG=1290oq9no/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1110524692/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075
click here
[]

--
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.





RE: [flexcoders] ViewStack selectedChild

2005-03-10 Thread Rob








Hi Matt,



Thanks for the replywhat you coded
is (I think) exactly what I did, but doesnt work. An example of
what I have is:



function x(event:Object):Void
{

 viewStack.selectedChild=event.target.selectedItem.data;

}



The function is called on a list change
event, and the dataProvider for the list has the data property set to the id of
a container in the viewstack. 



TIA for any info.











From: Matt Chotin
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
2:16 AM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders]
ViewStack selectedChild





The selectedChild is a reference to the
actual object that you would find at the selectedIndex. So what is the
data that you have that will help you determine which object you want to
select? If each element of the dataProvider is the id of the child (this
means that every child of your ViewStack has an id), you could simply do
myViewStack.selectedChild = this[data].



Not sure what youre trying to
really do here.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
2:15 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Ok, Ive been coding too long
todayI need to take a data attribute from a dataProvider and cast into
an Object that can be used in the statement
ViewStack.selectedChild=objectI know this is easy but am having some
brain-pain at the momentTIA for any info.



Regards.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:40 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Oopsit appears I have to use the
data attribute to create a new object and use thatnevermind J













From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack
selectedChild





Hi,



Just curiousthe MM docs indicate that setting of the
ViewStack.selectedChild can only be done in AS and not in MXML; however, it
appears from the MM example and my tests that the reverse is true



I have a script that is attempting to set the selectedChild
to a value that matches the id attribute of one of the ViewStacks but it
doesnt work.the ViewStack.selectedIndex works
great...whats up with the selectedChild?



viewStack.selectedChild=event.target.selectedItem.attributes.data;



TIA for any info.



Regards.


















RE: [flexcoders] Installing Flex on IIS with JRun??

2005-03-10 Thread Dimitrios Gianninas



Hi,

Here are some steps to 
follow:

1) Using JRun admin,drilldown 
in the "Flex" server instance
2) Delete the "FlashRemoting 
EAR"

Next steps are I am giving you 
because I don't recall what is in the "default-ear" folder.

3) Stop the "Flex" server 
instance
4) Delete all the contents 
under the "default-war" folder under 
d:\jrun4\servers\flex\default-ear
5) Extract the contents of the 
sample.war to d:\jrun4\servers\flex\default-ear\default-war 
6) Start the "Flex" server 
instance

Now point your browser to http://localhost:8101/default and that 
should be it.

Jimmy 
Gianninas
Software Developer - 
Optimal Payments 
Inc.



From: Bradley [mailto:[EMAIL PROTECTED]Sent: Wednesday, March 09, 2005 2:16 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Installing Flex on 
IIS with JRun??
OK, I have an IIS server that I Installed JRun onto then 
Iinstalled FLEX onto it as well.The JRun server works fine, i can 
adminstrate and all that. I added aNew Server in the admin called'flex' started it on localhost andgave it port 8101.I then 
copied the flex.war file into that new servers directory 
here...D:\JRun4\servers\flex\default-ear\default-warFirst off is 
that the right spot? And second do I have to do anythingwith the flex.war file like extract it?I then tossed a simple 'hello.mxml' file 
into the same path as aboveand when i view it in a browser at http://localhost:8101/hello.mxml 
itrenders out all the mxml file as text like this?xml 
version="1.0" encoding="utf-8" ? - mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"backgroundColor="#FF" 
mx:Label text="Hello World" /  
/mx:ApplicationSo WHAT am i doing wrong?ANY help 
would be great, this whole server admin thing really isn't myback as you can 
tell and I am a bit lost.Thanks 
all!Cheers.

AVIS IMPORTANTWARNING Les informations contenues dans le present document etses pieces jointes sont strictement confidentielles et reservees a l'usagede la (des) personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez avise que toute divulgation, distribution, copie, ou autre utilisation de ces informations est strictement prohibee. Si vous avez recu ce document par erreur, veuillez s'il vous plait communiquer immediatement avec l'expediteur et detruire ce document sans en faire de copie sous quelque forme. The information contained in this document and attachments is confidential and intended only for the person(s) named above. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution, or any other use of the information isstrictly prohibited. If you have received this document by mistake, pleasenotify the sender immediately and destroy this document and attachments without making any copy of any kind.




childDescriptors array/ UIObjectDescriptors.id is undefined

2005-03-10 Thread bhaq1972

Hi
As i understand things the childDescriptors array (an array of 
UIObjectDescriptors) is created/populated when you create the mxml.
When i do this

myCustomComponent id=myCustomComponent
/myCustomComponent

the id property of the UIObjectDescriptor is 'myCustomComponent'. 
which is correct.

Is there a way i can force the id to be the className (ie 
myCustomComponent in this case)

I tried 'id = className' in the constructor of myBox (which extends 
a mx:Box class).the base container of myCustomComponent i.e.

myCustomComponent.mxml
--
myBox
.
/myBox


thanks







Re: [flexcoders] Default date in DateField

2005-03-10 Thread Tom Fitzpatrick
At 06:21 PM 3/9/2005, you wrote:
Hey Tom,
Does this help? Just a simple example grabbing the date and setting it 
when the app initializes.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
initialize=displayDate();
mx:Script
function displayDate(date) {
var today_date:Date = new Date();
var date_str:String = 
(today_date.getDate()+/+(today_date.getMonth()+1)+/+today_date.getFullYear());
mx.controls.Alert.show(date_str,Message); // displays current date 
in United States date format
selectedDate.text = date_str;
}
/mx:Script
mx:DateChooser id=date1 
change=displayDate(event.target.selectedDate)/
mx:TextInput id=selectedDate/
/mx:Application
Hi Mike -
Thanks for the suggestion.
I ended up doing something similar, but using the initialize property of 
the DateField rather than the app as a whole. I also had to keep using the 
selectedDate property to set the same date in the calendar chooser.

I had been looking for a somewhat tidier solution (where the default date 
only has to be set in one place), but this does work.

- Tom 






Question about layers or something similar

2005-03-10 Thread nostra72


Ok I have ran in to problems when it comes to linking a repeater to a multidimensional array and I am not sure if thats possible. What I am wondering is this lets say you have a canvass container and you have two Hbox containers inside it that have the same x and y and there both set to be visible is there a way to stack buttons on top of another and make one appear when you need it? I know how to change the visiblity attribute what I mean is have two buttons one on top of another and then make it so that I know what layer to look at?


RE: [flexcoders] CFC's and Databinding in FLEX

2005-03-10 Thread Peter Farland
Title: Message



What 
version of CF are you using?




-Original Message-From: Matt Chotin 
[mailto:[EMAIL PROTECTED] Sent: Thursday, March 10, 2005 2:01 
AMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] 
CFC's and Databinding in FLEX

I'm not sure why caps 
would make a difference here. Bind it without 
caps.

{myRO.myMethod.result[0].givenname} 
etc.

For the 
FlashPaperLoader.as, that would go in the same directory as your application 
mxml file (or in user_classes if you wanted it 
shared).

Matt





From: 
cnewroth55 [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 10:55 
AMTo: flexcoders@yahoogroups.comSubject: [flexcoders] CFC's and Databinding 
in FLEX

I am using a cfc to make a call to one of our LDAP servers 
thatcontain info on our employees, 
I used the Netdebugger and can see thatI am getting data back, but it is not in the `usual' format 
(i.e whenI make a DB call in a CFC 
to one of my `regular' db's, typically I getthe datafields back in CAPS) , I am enclosing what the 
debugger`sees'. Now because I am 
not getting it back in CAPS then I cannotbind the result to anything...also this code is being used as 
a`component' and I can see the call 
to the Web service, but when I putit in it's own application framework, it doesn't work at 
allWhat the debugger sees; 
[array] : 
length[Number] : 
1[0][object] : 
smallcaseID[String] : 
XXsmallcaseBuilding[String] : 
33.3smallcaseClock[String] : 
MXXsmallcaseDisplayName[String] 
: Newroth, CraigsmallcaseMailCode[String] : 
S034-1060departmentNumber[String] : 
GT-XX-XXXgivenname[String] : 
Craiginitials[String] : 
mail[String] : 
[EMAIL PROTECTED]sn[String] : 
NewrothtelephoneNumber[String] : 
XXX-XXX-also, Matt Chotin 
wrote an item in one of the blogs on how to load aflashpaper swf into flex, exactly what I am trying to do with 
a filethat I converted to 
FlashPaper but am unsure as to where to put the.as file to make that work...the url for the thing Matt wrote:http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectID=117


RE: [flexcoders] ViewStack selectedChild

2005-03-10 Thread Tracy Spratt








Just jumping in here, but selectedChild is/wants
a reference to the actual container component in the view stack. So unless you
have a reference to the container in the data property of the item, this wont
work.



What Matt is saying is that if the data
property contains the id for the viewstack component, then you
can use the bracket notation to get a reference to the actual object.



this[myComponentId] is
saying return the property of this(the application or component) that is
named myComponentId.



It is esentially the same as saying eval(myComponentId)



So selectedChild = this[myComponentId]
is getting a ref to the real child component.



Tracy











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
9:34 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Hi Matt,



Thanks for the replywhat you coded
is (I think) exactly what I did, but doesnt work. An example of
what I have is:



function x(event:Object):Void
{


viewStack.selectedChild=event.target.selectedItem.data;

}



The function is called on a list change
event, and the dataProvider for the list has the data property set to the id of
a container in the viewstack. 



TIA for any info.











From: Matt Chotin
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 2:16
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





The selectedChild is a reference to the
actual object that you would find at the selectedIndex. So what is the
data that you have that will help you determine which object you want to
select? If each element of the dataProvider is the id of the child (this
means that every child of your ViewStack has an id), you could simply do
myViewStack.selectedChild = this[data].



Not sure what youre trying to
really do here.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
2:15 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Ok, Ive been coding too long
todayI need to take a data attribute from a dataProvider and cast into
an Object that can be used in the statement
ViewStack.selectedChild=objectI know this is easy but am having some
brain-pain at the momentTIA for any info.



Regards.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:40 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Oopsit appears I have to use the
data attribute to create a new object and use thatnevermind J













From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack
selectedChild





Hi,



Just curiousthe MM docs indicate that setting of the
ViewStack.selectedChild can only be done in AS and not in MXML; however, it
appears from the MM example and my tests that the reverse is true



I have a script that is attempting to set the selectedChild
to a value that matches the id attribute of one of the ViewStacks but it
doesnt work.the ViewStack.selectedIndex works
great...whats up with the selectedChild?



viewStack.selectedChild=event.target.selectedItem.attributes.data;



TIA for any info.



Regards.



















RE: [flexcoders] RE: Tree component confusion

2005-03-10 Thread Tracy Spratt








Here is an example posted on the MM forum some
time ago:



Tariq, if you are listening, maybe this
should go in your examples.



Tracy







There is an unexpected
behavior with the dropLocation: Sometimes it does not return the correct
integer. For example, expand all the nodes and try to drag node
Four into the first(0) position in branch
one. GetDropLocation() returns a 1 not a 0
as I would expect. If anyone has any insights I would like to hear, as I am
fighting with this situation in my own application.

Attach
Code 

?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml mx:Script ![CDATA[ import mx.managers.DragManager; function doDragEnter(event) { event.handled = true; }  function doDragExit(event) { event.target.hideDropFeedback(); }  function doDragOver(event) { event.target.showDropFeedback(); }  function doDragDrop(event) { doDragExit(event); var dragNodes = event.dragSource.dataForFormat(source).selectedItems; var toNode = event.target.getDropParent(); var idex = event.target.getDropLocation(); event.target.clearSelected(); var imax = dragNodes.length;  for( var i=0; i  imax; i++ ) { taStatus.text = taStatus.text + \n + Adding node at index:  + idex; toNode.addTreeNodeAt( idex, dragNodes[i] ); }  }  function doDragComplete(event) { var dragNodes = event.dragSource.dataForFormat(source).selectedItems; var imax = dragNodes.length;  for( var i=0; i  imax; i++ ) { var node = dragNodes; node.removeTreeNode(); } } ]]/mx:Script  mx:Tree id=navigator editable=true heightFlex=1 dragEnabled=true dragEnter=doDragEnter(event) dragExit=doDragExit(event) dragOver=doDragOver(event) dragDrop=doDragDrop(event) dragComplete=doDragComplete(event)  mx:dataProvider mx:XML node label=A node label=One node label=abc/ node label=def/ /node node label=Two / /node node label=B node label=Three / node label=Four / /node /mx:XML /mx:dataProvider /mx:Tree mx:TextArea id=taStatus width=300 height=100 //mx:Application















From: Pilby
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
11:34 AM
To: Flex Coders
Subject: [flexcoders] RE: Tree
component confusion







My objective is to allow the user to drag a tree node and
drop it on another node, and then reflect visually the changes he/she has made.











I since learned this is a lot more complicated than meets
the eye because the index of the drop location seems to change. From what I
have seen, the moment a branch opens, its index becomes 0, and when it's
closed, it's index becomes relative to its parent node. So if Node A is the
topmost node, and Node B is its child node, while Node B is closed, it's index
is 1, but the moment I open Node B, it's index becomes 0.











This is a problem because the only method I see that I can
use for my purpose is the addTreeNodeAt(index). And if there were multiple
branches open in the entire tree, we end up having multiple nodes with the SAME
index!











Can anyone give me an example of a drag-n-drop operation
entirely within a tree? The examples I have found deal with dragging datagrid
items on a tree, or dragging items from a tree to a list box. What about an
example that drags a tree item and drops on another tree item within the same
tree?













RE: [flexcoders] ViewStack selectedChild

2005-03-10 Thread Rob








Thanks Tracythats explains itthe
syntax and methods internal to this script is starting to gel, but not
optimally yethopefully soon J











From: Tracy Spratt
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
11:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders]
ViewStack selectedChild





Just jumping in here, but selectedChild
is/wants a reference to the actual container component in the view stack.
So unless you have a reference to the container in the data property of the
item, this wont work.



What Matt is saying is that if the data property
contains the id for the viewstack component, then you can usethe
bracket notation to get a reference to the actual object.



this[myComponentId] is
saying return the property of this(the application or component) that is
named myComponentId.



It is esentially the same as saying
eval(myComponentId)



So selectedChild =
this[myComponentId] is getting a ref to the real child component.



Tracy











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
9:34 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Hi Matt,



Thanks for the replywhat you coded
is (I think) exactly what I did, but doesnt work. An example of
what I have is:



function x(event:Object):Void
{


viewStack.selectedChild=event.target.selectedItem.data;

}



The function is called on a list change
event, and the dataProvider for the list has the data property set to the id of
a container in the viewstack. 



TIA for any info.











From: Matt Chotin
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
2:16 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





The selectedChild is a reference to the
actual object that you would find at the selectedIndex. So what is the data
that you have that will help you determine which object you want to
select? If each element of the dataProvider is the id of the child (this
means that every child of your ViewStack has an id), you could simply do
myViewStack.selectedChild = this[data].



Not sure what youre trying to
really do here.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
2:15 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Ok, Ive been coding too long
todayI need to take a data attribute from a dataProvider and cast into
an Object that can be used in the statement
ViewStack.selectedChild=objectI know this is easy but am having some
brain-pain at the momentTIA for any info.



Regards.











From: Rob [mailto:[EMAIL PROTECTED]

Sent: Wednesday, March 09, 2005
4:40 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Oopsit appears I have to use the
data attribute to create a new object and use thatnevermind J













From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack
selectedChild





Hi,



Just curiousthe MM docs indicate that setting of the
ViewStack.selectedChild can only be done in AS and not in MXML; however, it
appears from the MM example and my tests that the reverse is true



I have a script that is attempting to set the selectedChild
to a value that matches the id attribute of one of the ViewStacks but it
doesnt work.the ViewStack.selectedIndex works
great...whats up with the selectedChild?



viewStack.selectedChild=event.target.selectedItem.attributes.data;



TIA for any info.



Regards.






















RE: [flexcoders] ViewStack selectedChild

2005-03-10 Thread Matt Chotin








Right, which means I think you want this: viewStack.selectedChild=this[event.target.selectedItem.data];











From: Tracy Spratt
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
8:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders]
ViewStack selectedChild





Just jumping in here, but selectedChild
is/wants a reference to the actual container component in the view stack.
So unless you have a reference to the container in the data property of the
item, this wont work.



What Matt is saying is that if the data property
contains the id for the viewstack component, then you can usethe
bracket notation to get a reference to the actual object.



this[myComponentId] is
saying return the property of this(the application or component) that is
named myComponentId.



It is esentially the same as saying
eval(myComponentId)



So selectedChild =
this[myComponentId] is getting a ref to the real child component.



Tracy











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
9:34 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Hi Matt,



Thanks for the replywhat you coded
is (I think) exactly what I did, but doesnt work. An example of
what I have is:



function x(event:Object):Void
{


viewStack.selectedChild=event.target.selectedItem.data;

}



The function is called on a list change
event, and the dataProvider for the list has the data property set to the id of
a container in the viewstack. 



TIA for any info.











From: Matt Chotin
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005
2:16 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





The selectedChild is a reference to the
actual object that you would find at the selectedIndex. So what is the data
that you have that will help you determine which object you want to
select? If each element of the dataProvider is the id of the child (this
means that every child of your ViewStack has an id), you could simply do
myViewStack.selectedChild = this[data].



Not sure what youre trying to
really do here.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
2:15 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Ok, Ive been coding too long
todayI need to take a data attribute from a dataProvider and cast into
an Object that can be used in the statement
ViewStack.selectedChild=objectI know this is easy but am having some
brain-pain at the momentTIA for any info.



Regards.











From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:40 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders]
ViewStack selectedChild





Oopsit appears I have to use the
data attribute to create a new object and use thatnevermind J













From: Rob
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 09, 2005
4:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack
selectedChild





Hi,



Just curiousthe MM docs indicate that setting of the
ViewStack.selectedChild can only be done in AS and not in MXML; however, it
appears from the MM example and my tests that the reverse is true



I have a script that is attempting to set the selectedChild
to a value that matches the id attribute of one of the ViewStacks but it
doesnt work.the ViewStack.selectedIndex works
great...whats up with the selectedChild?



viewStack.selectedChild=event.target.selectedItem.attributes.data;



TIA for any info.



Regards.






















OT: Out of a job

2005-03-10 Thread Clint Tredway
My ex-employer has shifted its focus and I am now without a job... I
have roughly a month before I will 'need a job' but if anyone needs
help, I am available. Please respond to me and not the list.

Thanks
-- 
My Blog
http://www.clinttredway.com

Are you diabetic?
http://www.diabetesforums.com




RE: [flexcoders] unsupported type found in stream-Flex alert

2005-03-10 Thread Abdul Qabiz
Hi,

Yeah it generally happens when you try to pass entire recordset from server
to flash player via Remote Object(Flash Remoting). Try to pass array of
objects or structures to client rather than passing recordset...

Hope that helps...

-abdul

-Original Message-
From: Veronica Grigoras [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 3:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] unsupported type found in stream-Flex alert



Hi all,

From time to time I'm getting this flex alert popup in my application
stating Unsupported type found in stream. I don't see any errors in the
application server log (sql exceptions, any other faulty errors), there are
no functionality failures either. It doesn't appear constantly, which makes
it difficult to duplicate. 

Is this a configuration issue? Does it have to do with the datatypes mapping
between Flex and Java?

Thank you,
Veronica.






Yahoo! Groups Links