[flexcoders] Question about FXP file type

2010-06-17 Thread timgerr
Hey all,
I am still using 3.5 with FlashBuilder and I have a question for you all.
 
Can I take a FXP image file and embed it in Flex like a jpeg or png file?

Thanks,
timgerr



[flexcoders] Flex 3 Eclipse and Java

2010-04-01 Thread timgerr
Hello all,
I have over the last few years been using PHP for my back end in order to 
communiate to Flex.  I now want to use Java and Blazeds.  The problem is that I 
need to get a version of Eclipse that will be able to install Java and the Flex 
3 SDK.  I have been working for hrs to get Eclipse to mimic my developing 
environment, OS X at home and Windows at work.  In order to get Flex 3 sdk to 
install into Eclipse I will have to find an old version of Eclipse. As people 
that user this (Java and Flex + other things) combonation of development items 
within Eclipse, what do / did you do to create the eniorment, and also what 
should I do.

Thank you,
Timgerr 



[flexcoders] Refresh Advanced DataGrid with HierarchicalData

2010-02-28 Thread timgerr
Hello all,
I have a arraycollection that I use for a HierarchicalData data
provider.  If I add/change data contained within the arraycollection,
how do I refresh the Advanced DataGrid?

Thank you,
timgerr




[flexcoders] Question/Problems extending RichTextEditor, Learning

2010-02-18 Thread timgerr
Hello all,
I want to extend the RichTextEitor and I have a problem(s) with doing so.  So I 
wrote A action script class trying to extend the Rich Text Editor.  I wanted to 
just add a text box to the toolbar but am getting errors, here is my code:
ackage com.DaNaTiRTE
{
import mx.controls.RichTextEditor;
import mx.controls.TextInput;

public class DRTE extends RichTextEditor
{
public function DRTE()
{
//TODO: implement function
super();
}

private var _width:int;
private var _height:int;
public function SetItems():void
{
var t:TextInput = new TextInput();
t.width = 40;
this.toolbar.addChild(t);
}   
}
}

I wanted to do somthing like this when I call the code
var a:DRTE = new DRTE();
a.SetItems();
addChild(a);

When I do the (a.SetItems) I get an error Error #1009: Cannot access a 
property or method of a null object reference..

Can someone tell me what I am doing wrong, and if so what I need to be doing 
correctly?  I want to not just build this code but understand how to extend 
components.

Thanks for the help and read.
timgerr



[flexcoders] Build UICompenent Widgets, add drag and drop, keep widgets within Panel

2010-02-11 Thread timgerr
Hello all,
I have this panel that I have a button in.  I add the ability for the button to 
be dragged around the panel, but I don't want the button to be dragged out of 
the panel?

Here is my code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
mx:Script
![CDATA[
import mx.controls.Button;
private function Init():void
{
var b:Button = new Button()
b.label = Testing;
b.addEventListener(MouseEvent.MOUSE_DOWN, 
this.StartDrag);
b.addEventListener(MouseEvent.MOUSE_UP, 
this.StopDrag); 
this.mePanel.addChild(b);
}

private function StartDrag(e:Event):void
{
e.currentTarget.startDrag();
}
private function StopDrag(e:Event):void
{
e.currentTarget.stopDrag();
}
]]
/mx:Script
mx:Panel id=mePanel width=50% height=50% 
creationComplete=Init();

/mx:Panel
/mx:Application

I have done drag and drop before adding items from something to another, but 
not sure how to keep it in the same panel.

Thank for the help,
timgerr



[flexcoders] Best Java addon for Flex

2010-01-31 Thread timgerr
Hello all, 
I have been coding with Flex for a few years using PHP as my back end.  I am 
looking to learn Java, and I have a few questions.  I understand the Java 
language from all the other programming languages that I know.  If I want to 
interface Flex with Java, should I lean Spring or what?  I am asking the group, 
what/how do you use Java with Flex?

Thank you,
Tim Gallagher



[flexcoders] Question about MouseOver and getting the UIComponent ClassName

2010-01-28 Thread timgerr
Hello all, I am having a problem.  I am using drag and drop and want to add an 
event listener on objects that a mouse is over.  So I have this panel and then 
I add a label and maybe a button to the panel.  I then attach to the panel, 
label and button an event listener mouse over to get the class name to what the 
mouse is hovering over.

If I then hover over the label, I get the class name Label then Panel, here 
is my simple test code:

mx:Script
![CDATA[
public function INIT():void
{

}
public function EVC(e:Event):void
{
trace(e.currentTarget.className);   
}
]]
/mx:Script
mx:Panel x=58 y=108 width=417 height=355 
mouseOver=EVC(event)
mx:Button label=Button mouseOver=EVC(event)/
mx:Label text=Label mouseOver=EVC(event)/
mx:TextInput mouseOver=EVC(event)/
/mx:Panel

So when I hover anything that is contained within the panel I get that objects 
class name and the panels class name.  How can I just get the class name of 
what I am hovering over?  If I hover the panel and only the panel (lets say in 
the title bar) then I want to return className = Panel but if I hover anything 
else I want that class name.  

Can this be done?

Thanks for the help,
timgerr



[flexcoders] Question about getting the type of item / component with drag and drop

2009-12-09 Thread timgerr
Hello all, 
I have been tasked with creating a menu that gets build with drag and drop 
components.  I have followed this tutorial 
(http://www.flexafterdark.com/tutorials/Flex-Drag-and-Drop) and have learned a 
lot.

I have a few questions to get to the next stage so I will ask a few questions.

1. When I drop (or drag over) an item like a panel, how can I tell what that 
UIComponent is, how can I tell that is a panel?

2. How can I get that panel as an object so I can do something like 
panelid.addChild(new dropped item)?

Thanks for the read,
timgerr

Here is the code that I have from the tutorial.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
name=Drag and Drop tutorial creationComplete=Init()

mx:Script
![CDATA[
import mx.core.DragSource;
import mx.core.IUIComponent;
import mx.managers.DragManager;
import mx.events.DragEvent;
import mx.controls.Alert;

public function Init():void
{
// a mouseDown event will start the drag

this.redBox.addEventListener(MouseEvent.MOUSE_DOWN, BeginDrag);
// accepting a drag/drop operation...
this.blueBox.addEventListener( 
DragEvent.DRAG_ENTER,AcceptDrop);
// handling the drop...
this.blueBox.addEventListener( 
DragEvent.DRAG_DROP, handleDrop );
}

private function BeginDrag(mouseEvent:MouseEvent):void
{
// the drag initiator is the object being 
dragged (target of the mouse event)
var dragInitiator:IUIComponent = 
mouseEvent.currentTarget as IUIComponent;
  
// the drag source contains data about what's 
being dragged
var dragSource:DragSource = new DragSource();
  
// ask the DragManger to begin the drag
DragManager.doDrag( dragInitiator, dragSource, 
mouseEvent, null );
}

public function AcceptDrop(dragEvent:DragEvent):void
{
var dropTarget:IUIComponent = 
dragEvent.currentTarget as IUIComponent;
// accept the drop
DragManager.acceptDragDrop( dropTarget );
// show feedback
DragManager.showFeedback( DragManager.COPY );

}

public function handleDrop( dragEvent:DragEvent 
):void
{
var dragInitiator:IUIComponent = 
dragEvent.dragInitiator;
var dropTarget:IUIComponent = 
dragEvent.currentTarget as IUIComponent;
  
Alert.show( You dropped the Red Box on 
the Blue Box! );
var obj:Object = dragEvent.target;
}

]]
/mx:Script
mx:HBox horizontalGap=100
mx:Canvas id=redBox width=100 height=100 
backgroundColor=Red /
mx:Canvas id=blueBox width=100 height=100 backgroundColor=Blue 
/
/mx:HBox

/mx:Application




[flexcoders] Re: Question about getting the type of item / component with drag and drop

2009-12-09 Thread timgerr
What is the best way to check if it is a panel?

timgerr

--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote:

 1. if (dragEvent.currentTarget is Panel)
 
 2. currentTarget is generically typed as Object, which doesn't have an 
 addChild() method. But if you have already checked that the dropTarget is a 
 Panel, it's safe to do a cast:
 
 Panel(dragEvent.currentTarget).addChild(...);
 
 Gordon Smith
 Adobe Flex SDK Team
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of timgerr
 Sent: Wednesday, December 09, 2009 12:01 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Question about getting the type of item / component 
 with drag and drop
 
 
 
 Hello all,
 I have been tasked with creating a menu that gets build with drag and drop 
 components. I have followed this tutorial 
 (http://www.flexafterdark.com/tutorials/Flex-Drag-and-Drop) and have learned 
 a lot.
 
 I have a few questions to get to the next stage so I will ask a few questions.
 
 1. When I drop (or drag over) an item like a panel, how can I tell what that 
 UIComponent is, how can I tell that is a panel?
 
 2. How can I get that panel as an object so I can do something like 
 panelid.addChild(new dropped item)?
 
 Thanks for the read,
 timgerr
 
 Here is the code that I have from the tutorial.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 name=Drag and Drop tutorial creationComplete=Init()
 
 mx:Script
 ![CDATA[
 import mx.core.DragSource;
 import mx.core.IUIComponent;
 import mx.managers.DragManager;
 import mx.events.DragEvent;
 import mx.controls.Alert;
 
 public function Init():void
 {
 // a mouseDown event will start the drag
 this.redBox.addEventListener(MouseEvent.MOUSE_DOWN, BeginDrag);
 // accepting a drag/drop operation...
 this.blueBox.addEventListener( DragEvent.DRAG_ENTER,AcceptDrop);
 // handling the drop...
 this.blueBox.addEventListener( DragEvent.DRAG_DROP, handleDrop );
 }
 
 private function BeginDrag(mouseEvent:MouseEvent):void
 {
 // the drag initiator is the object being dragged (target of the mouse event)
 var dragInitiator:IUIComponent = mouseEvent.currentTarget as IUIComponent;
 
 // the drag source contains data about what's being dragged
 var dragSource:DragSource = new DragSource();
 
 // ask the DragManger to begin the drag
 DragManager.doDrag( dragInitiator, dragSource, mouseEvent, null );
 }
 
 public function AcceptDrop(dragEvent:DragEvent):void
 {
 var dropTarget:IUIComponent = dragEvent.currentTarget as IUIComponent;
 // accept the drop
 DragManager.acceptDragDrop( dropTarget );
 // show feedback
 DragManager.showFeedback( DragManager.COPY );
 
 }
 
 public function handleDrop( dragEvent:DragEvent ):void
 {
 var dragInitiator:IUIComponent = dragEvent.dragInitiator;
 var dropTarget:IUIComponent = dragEvent.currentTarget as IUIComponent;
 
 Alert.show( You dropped the Red Box on the Blue Box! );
 var obj:Object = dragEvent.target;
 }
 
 ]]
 /mx:Script
 mx:HBox horizontalGap=100
 mx:Canvas id=redBox width=100 height=100 backgroundColor=Red /
 mx:Canvas id=blueBox width=100 height=100 backgroundColor=Blue /
 /mx:HBox
 
 /mx:Application





[flexcoders] How to remove object from nested arraycollection

2009-10-22 Thread timgerr
Hello all, I have a problem, I need to remove an object from a nested array.  
Lets say I have this arraycollection

private var people:ArrayCollection = new ArrayCollection([
new Person(Grandma Susan, new ArrayCollection([
new Person(John, new ArrayCollection([
new Person(Timmy),
new Person(Sammy),
new Person(Alan)

])),
new Person(Tiffany, new ArrayCollection([
new Person(Billy),
new Person(Adam),
new Person(Graham),
new Person(Vennesa)

])),
new Person(Michael, new ArrayCollection([
new Person(Jannette),
new Person(Alan, new ArrayCollection([
new Person(Alice),
new Person(Jane)

]))

])),
new Person(Peter),
new Person(Cindy, new ArrayCollection([
new Person(Paul),
new Person(David),
new Person(Joseph),
new Person(Cameron),
new Person(Debra),
new Person(Polly)

]))

]))

]);

How can I remove peter?

Thanks,
timgerr



[flexcoders] Re: Trees are killing me

2009-10-11 Thread timgerr
Max, that was a big help.  Thanks all for helping me out, this group rocks.

timgerr

--- In flexcoders@yahoogroups.com, max.nachlinger max.nachlin...@... wrote:

 
 
 
 
 
 Here's a bit of code that might help.
 
 Silly test app: -
 
 ?xml version=1.0 encoding=utf-8?
 Application xmlns=http://www.adobe.com/2006/mxml; layout=absolute 
 creationComplete=_onLoad() xmlns:local=*
 Script
 ![CDATA[
 import mx.events.*;
 import mx.collections.ArrayCollection;
 [Bindable] private var _data:ArrayCollection;
 
 private function _onLoad():void
 {
   var a:Array = [];
   var o:Object = {};
   var o1:Object = {};
   var o2:Object = {};
   var o3:Object = {};
   
   var c:int, d:int, e:int;
   for( var i:int = 0; i  100; i++ )
   {
   c = _randIntRange(2,20);
   o = {name:'Great Grand-Parent '+(i+1), children:[]};
   
   for( var j:int = 0; j  c; j++ )
   {
   o1 = {name:'Grand Parent '+(j+1), children:[]};
   
   d = _randIntRange(1,5);
   for( var k:int = 0; k  d; k++ )
   {
   o2 = {name:'Parent '+(k+1), children:[]};
   
   e = _randIntRange(1,2);
   for( var l:int = 0; l  e; l++ )
   {
   o3 = {name:'Child '+(l+1)};
   o2.children.push(o3);
   }
   
   o1.children.push(o2);
   }
 
   o.children.push(o1);
   }
   
   a.push(o);
   }
   _data = new ArrayCollection(a);
 }
 private function _randIntRange( start:Number, end:Number ):int
 {
   return int(Math.floor(start +(Math.random() * (end - start;
 }
 ]]
 /Script
 local:TestTree id=tr width=250 height=100% dataProvider={_data} 
 labelField=name 
   dragEnabled=true dropEnabled=true dragMoveEnabled=true/
 /Application
 
 Silly test tree: -
 
 ?xml version=1.0 encoding=utf-8?
 Tree xmlns=http://www.adobe.com/2006/mxml;
 Script
 ![CDATA[
 import mx.events.*;
 import mx.controls.listClasses.*;
 
 private var _currentRenderer:IListItemRenderer;
 private var _draggedItem:Object;
 
 override protected function mouseOverHandler(event:MouseEvent):void 
 {
   super.mouseOverHandler(event);
   var item:IListItemRenderer = mouseEventToItemRenderer(event);
   if ( item != null  _currentRenderer != item ) 
   {
   _currentRenderer = item;
   trace(className + '::mouseMoveHandler(): ' + 
 _currentRenderer.data['name'] );
   }
 }
 
 override protected function dragOverHandler(event:DragEvent):void
 {
   _draggedItem = event.dragSource.dataForFormat('treeItems')[0];
   trace(className + '::dragOverHandler(): dragging (' + 
 _draggedItem['name'] + ') over (' + _currentRenderer.data['name'] + ')' );
 }
 ]]
 /Script
 /Tree
 
 Hope that helps a bit.
 
 --Max





[flexcoders] Re: Trees are killing me

2009-10-09 Thread timgerr
OK, I am now hanging my hat in hand.  I need help with a method to get the 
object of the folder that I am over, I have no idea how to do this.  PLEASE 
HELP!

Thanks, maybe I can get my dignity back.

timgerr

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 You should be getting DRAG_OVER events.  The dragSource contains the object 
 being dragged.  You can use mouseEventToItemRenderer to get the renderer you 
 are currently over.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of timgerr
 Sent: Tuesday, October 06, 2009 8:54 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Trees are killing me
 
 
 
 Thanks for the response, I have a question for ya. I am dragging with in a 
 tree, how can I get the object that I am dragging and when I drag over 
 something how can I get that object. I am using an arraycollection.
 
 Thanks again for the help.
 timgerr
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  I see. You don't want to allow dropping at the top-level.
 
  I think you can get the DRAG_OVER event, look at where the mouse is, and 
  call event.preventDefault()
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of timgerr
  Sent: Monday, October 05, 2009 2:18 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: Trees are killing me
 
 
 
  I am creating an app that folders are groups and leafs are users. I want 
  users in groups (folders) only.
 
  Tim
 
  --- In 
  flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com,
   Alex Harui aharui@ wrote:
  
   You have folders mixed with non-folders and you only want to allow 
   dropping on the folder rows? Why not allow dropping on the leaf rows?
  
   Alex Harui
   Flex SDK Developer
   Adobe Systems Inc.http://www.adobe.com/
   Blog: http://blogs.adobe.com/aharui
  
   From: 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com

   [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com]
On Behalf Of timgerr
   Sent: Monday, October 05, 2009 10:28 AM
   To: 
   flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com
   Subject: [flexcoders] Trees are killing me
  
  
  
   Hello all,
   I was wondering if someone could help me. I have a tree with 3 folders, 
   how can I make sure nodes get dropped into the folders?
  
   Thank for the look,
   timgerr
  
 





[flexcoders] Re: Trees are killing me

2009-10-09 Thread timgerr
I have no idea how to use this, I have been googleing it but can only find 
references when people extend classes.  Anyone know how to use 
mouseEventToItemRenderer???

Really thanks for the help, this problem has been a thorn in my side for a long 
time.

timgerr

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Should be mouseEventToItemRenderer(dragEvent).data
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of timgerr
 Sent: Friday, October 09, 2009 7:03 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Trees are killing me
 
 
 
 OK, I am now hanging my hat in hand. I need help with a method to get the 
 object of the folder that I am over, I have no idea how to do this. PLEASE 
 HELP!
 
 Thanks, maybe I can get my dignity back.
 
 timgerr




[flexcoders] Re: Trees are killing me

2009-10-06 Thread timgerr
Thanks for the response, I have a question for ya.  I am dragging with in a 
tree, how can I get the object that I am dragging and when I drag over 
something how can I get that object.  I am using an arraycollection.

Thanks again for the help.
timgerr

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 I see.  You don't want to allow dropping at the top-level.
 
 I think you can get the DRAG_OVER event, look at where the mouse is, and call 
 event.preventDefault()
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of timgerr
 Sent: Monday, October 05, 2009 2:18 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Trees are killing me
 
 
 
 I am creating an app that folders are groups and leafs are users. I want 
 users in groups (folders) only.
 
 Tim
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex 
 Harui aharui@ wrote:
 
  You have folders mixed with non-folders and you only want to allow dropping 
  on the folder rows? Why not allow dropping on the leaf rows?
 
  Alex Harui
  Flex SDK Developer
  Adobe Systems Inc.http://www.adobe.com/
  Blog: http://blogs.adobe.com/aharui
 
  From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On 
  Behalf Of timgerr
  Sent: Monday, October 05, 2009 10:28 AM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Trees are killing me
 
 
 
  Hello all,
  I was wondering if someone could help me. I have a tree with 3 folders, how 
  can I make sure nodes get dropped into the folders?
 
  Thank for the look,
  timgerr
 





[flexcoders] Trees are killing me

2009-10-05 Thread timgerr
Hello all, 
I was wondering if someone could help me.  I have a tree with 3 folders, how 
can I make sure nodes get dropped into the folders?

Thank for the look,
timgerr



[flexcoders] Re: Trees are killing me

2009-10-05 Thread timgerr
I am creating an app that folders are groups and leafs are users.  I want users 
in groups (folders) only.

Tim

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 You have folders mixed with non-folders and you only want to allow dropping 
 on the folder rows?  Why not allow dropping on the leaf rows?
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of timgerr
 Sent: Monday, October 05, 2009 10:28 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Trees are killing me
 
 
 
 Hello all,
 I was wondering if someone could help me. I have a tree with 3 folders, how 
 can I make sure nodes get dropped into the folders?
 
 Thank for the look,
 timgerr





[flexcoders] Drag and drop into Advanced Datagrid

2009-09-18 Thread timgerr
I was wondering if there are any examples of Drag and Drop into an advanced 
datagrid with an array collection as the data provider?

Thanks for the help.
timgerr



[flexcoders] Re: Drag and drop into Advanced Datagrid

2009-09-18 Thread timgerr
I have this advanced datagrid and I want to make sure that anything dropped 
into the grid can only go into a folder, can this happen?

Thanks
timgerr


--- In flexcoders@yahoogroups.com, timgerr tgallag...@... wrote:

 I was wondering if there are any examples of Drag and Drop into an advanced 
 datagrid with an array collection as the data provider?
 
 Thanks for the help.
 timgerr





[flexcoders] Embed image source with a url?

2009-07-30 Thread timgerr
Hello all, 
I am in need of a way to store a picture for using in my application.  I will 
be using this picture as an avatar so I dont want to have to call it from a url 
every time I need it.  I would like to do somting like this:

[Embed(source=http://mydomain/somepics.jpeg;)]
[Bindable]
public var Logo:Class;  

How can I store an image into a class, or how can I reuse an image??

Thanks
timgerr



[flexcoders] Re: Problem with Flex tree and arraycollection

2009-07-23 Thread timgerr
That was the problem, I had an entry in each object of the arrayobject called 
uid.  I changed this and I was good to go.  

Thanks for the help, I would have killed myself trying to get this one

timgerr

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 If there are duplicate items (items with the same UID) it may not work 
 correctly
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of timgerr
 Sent: Wednesday, July 22, 2009 2:03 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problem with Flex tree and arraycollection
 
 
 
 Hello all,
 I have troubles with my trees when I use an array collection. What happens is 
 the highlighting doesn't work, I can highlight some things nodes but not 
 others. Anyone have this happen?
 
 Thanks,
 timgerr





[flexcoders] Re: String validators and turning off the red

2009-07-23 Thread timgerr
Thank you, that worked well
timgerr

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Here's a simple way:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 
 mx:Script
   ![CDATA[
public function turnOff(e:Event):void
{
 sv.enabled = false;
 test.errorString = ;
}
 
 
 
public function turnOn(e:Event):void
{
 sv.enabled = true;
}
   ]]
 /mx:Script
 
 mx:TextInput id=test/
 
 mx:Button top=60 label=Turn Off click=turnOff(event)/
 
 mx:Button top=60 left=100 label=Turn On click=turnOn(event)/
 
 mx:StringValidator id=sv required=true source={test}
 property=text enabled=true/
 
 /mx:Application
 
 -TH
 




[flexcoders] String validators and turning off the red

2009-07-22 Thread timgerr
Hello all, I have a question for ya.  

I have a text input that I attach a string validator so the text input is 
required.  So I put my mouse in the box then take it out, not the box is red.  
I then hit a button to turn the string validator off, but the box remains red.  
How can I tell a text input to not be red anymore.  Here is some code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
mx:Script
![CDATA[
public function TurnOff(e:Event):void
{
sv.enabled = false;
}
]]
/mx:Script
mx:TextInput id=test/
mx:Button label=Hello/
mx:StringValidator id=sv required=true source={test} 
property=text enabled=true/
/mx:Application

Thanks,
Timgerr



[flexcoders] Problem with Flex tree and arraycollection

2009-07-22 Thread timgerr
Hello all,
I have troubles with my trees when I use an array collection.  What happens is 
the highlighting doesn't work, I can highlight some things nodes but not 
others.  Anyone have this happen?

Thanks,
timgerr 



[flexcoders] Anyone Using Kap Lab Datagrammer, I have a question about getting child nodes

2009-06-10 Thread timgerr
Hey all,
If you use Kap Lab Diagrammer, if you delete a node, how do you delete all the 
child nodes?  Is there a place (array or arraycollection) that holds all the 
created/showing elements

If you have any information, please help a brother out :)

Thanks,
timgerr



[flexcoders] Re: Getting an error when using a tree as a component

2009-05-18 Thread timgerr
OK, Here is what I did.  I wanted to know if there was a problem with my code 
or was it the tree stuff.  I went to Adobe Live Docs to get a tree example 
(http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=dragdrop_081_06.html).
  I took this code and created a Canvas Component from it.  I then created an 
app and called the code from it. 

I then called the app and when I click on any of the items in the tree I get 
this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the 
caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at 
mx.managers::SystemManager/getChildIndex()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1652]
at 
mx.managers::SystemManager/mouseDownHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3439]

Here is the code that I used for the component CallTree.mxml:

[CODE]
?xml version=1.0?
!-- dragdrop\SimpleTreeSelf.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
width=700 height=250 
borderStyle=solid

mx:Script
![CDATA[
// Initialize the data provider for the Tree.
private function initApp():void {
firstList.dataProvider = treeDP;
}
]]
/mx:Script

mx:XML id=treeDP
node label=Mail
node label=Inbox/
node label=Personal Folder
node label=Demo/
node label=Personal/
node label=Saved Mail/
node label=bar/
/node
node label=Calendar/
node label=Sent/
node label=Trash/
/node
/mx:XML

mx:Tree id=firstList 
height=200 width=200
showRoot=false
labelField=@label
dragEnabled=true 
dropEnabled=true 
dragMoveEnabled=true
allowMultipleSelection=true
creationComplete=initApp();/
/mx:Application
[/CODE]

Here is the application that is calling CallTree.mxml
[CODE]
?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
width=700 height=250 
borderStyle=solid
creationComplete=CallMeNow()
mx:Script
![CDATA[
import com.callTree;

public function CallMeNow():void
{
var t:callTree = new callTree()
addChild(t);
}
]]
/mx:Script
/mx:Application
[/CODE]

I am not sure what to do here.

Thanks for the read,
timgerr



[flexcoders] Re: Getting an error when using a tree as a component

2009-05-13 Thread timgerr
OK, Here is some code, this is my tree Component:
[START]

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
creationComplete=Init();
mx:Script
![CDATA[
import mx.events.TreeEvent;
import mx.events.IndexChangedEvent;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.remoting.RemoteObject;
import mx.controls.Alert;
import mx.collections.ArrayCollection;

[Bindable]
public var SmallTree_uid:String;
[Bindable]
public var SmallTree_sessionid:String;
[Bindable]
private var _acFirst:ArrayCollection;
[Bindable]
private var _treeDataPrivider:ArrayCollection;


/* - [   Remote Calls   ] 
- */
private function RemoteCallFirstRequest():void
{
var nOb:Object = new Object();
nOb.uid = this.SmallTree_uid;
nOb.sessionid   = this.SmallTree_sessionid;
nOb.call= BuildTreeStructure
var rmt:RemoteObject;
rmt = new RemoteObject( GenericDestination );
rmt.source = com.ArrayTree.Tree;
rmt.MasterCall.addEventListener( FaultEvent.FAULT, 
this.ServiceError );
rmt.MasterCall.addEventListener( ResultEvent.RESULT, 
this.ReturnFirstRequestData);
rmt.MasterCall(nOb);
}
/* - [  Remote Returns  ] 
- */

private function ServiceError(f:FaultEvent):void
{
Alert.show(f.message +   + f.fault);
} 
private function ReturnFirstRequestData(r:ResultEvent):void
{
  this._acFirst = new ArrayCollection(r.result as 
Array);
  this.findRoot();
}
/* - [   Event Calls] 
- */
private function findRoot():void
{
this._treeDataPrivider = new ArrayCollection();
for(var i:int = 0; i  this._acFirst.length; i++){
if (this._acFirst[i].PARid == 0  
this._acFirst[i].name != pseudo_root){

this._treeDataPrivider.addItem(this._acFirst[i]);
}
}
this.BuildRestOfTree(this._treeDataPrivider);

}

private function BuildRestOfTree(obj:Object):void
{
//if(obj.length  1){
for(var i:int = 0; i  obj.length; i++){
trace(obj[i].CBSid +   + obj[i].name);
var childAry:Array = 
this.FindChild(obj[i].CBSid);

if(childAry.length  0){
Object(obj[i]).children = 
childAry;

// recures the newly added child
trace(he he ha ha  + 
obj[i].children.length);

this.BuildRestOfTree(obj[i].children);
}
}
//}
}

private function FindChild(numCBSid:String):Array
{
var ary:Array = new Array();
for(var i:int = 0; i  this._acFirst.length; i++){
if(this._acFirst[i].PARid == numCBSid){
ary.push(this._acFirst[i]);
}
}
return ary;
}


/**
* GetTreeLabel
* @param None
* @return None
* This will get the name of the tree node from the individual 
object within the 
* array collection
*/ 
public function GetTreeLable(obj:Object):String
{
return obj.name;
}
 

[flexcoders] Getting an error when using a tree as a component

2009-05-12 Thread timgerr
Hello all, 
I was wondering if this error makes sense?  I have this tree that I made into a 
component.  When I run the script, I see the tree but when I try and click on 
one of the folders I get this error The supplied DisplayObject must be a child 
of the caller.  Anyone know what this means


Thanks,
timgerr



[flexcoders] Add items to an array list as a child

2009-05-08 Thread timgerr
Hello all, 
I have a question for you all.  I was wondering how I can add a child to an 
object within a arraycollection.  Here is what I mean:
var myCollection:ArrayCollection = new ArrayCollection([{first: 'Matt', last: 
'Matthews'}, {first: 'Tom', last: 'Jones'}]);

var obj:Object = new Object();
obj.first = 'lisa';
obj.last = 'griffen';

I would like to add the new object to be a child of the first item in the array 
list.  Can this be done??

Thanks,
timgerr



[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
I want to add items to an arraycollection as a child


--- In flexcoders@yahoogroups.com, timgerr tgallag...@... wrote:

 Hello all, 
 I have a question for you all.  I was wondering how I can add a child to an 
 object within a arraycollection.  Here is what I mean:
 var myCollection:ArrayCollection = new ArrayCollection([{first: 'Matt', last: 
 'Matthews'}, {first: 'Tom', last: 'Jones'}]);
 
 var obj:Object = new Object();
 obj.first = 'lisa';
 obj.last = 'griffen';
 
 I would like to add the new object to be a child of the first item in the 
 array list.  Can this be done??
 
 Thanks,
 timgerr





[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
I want to add it as a child to the first item in the arraycollection 
(myCollection[0]).  Can this be done???

Thanks, 
timgerr

--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:

 
 Have you tried myCollection.addItemAt(obj,0);?
 
 -TH
 
 --- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:
 
  I want to add items to an arraycollection as a child
 
 
  --- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:
  
   Hello all,
   I have a question for you all. I was wondering how I can add a child
 to an object within a arraycollection. Here is what I mean:
   var myCollection:ArrayCollection = new ArrayCollection([{first:
 'Matt', last: 'Matthews'}, {first: 'Tom', last: 'Jones'}]);
  
   var obj:Object = new Object();
   obj.first = 'lisa';
   obj.last = 'griffen';
  
   I would like to add the new object to be a child of the first item
 in the array list. Can this be done??
  
   Thanks,
   timgerr
  
 





[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
Thanks for the response, I have a question about arraycollection and
trees.  If I do this:

var myCollection:ArrayCollection = new ArrayCollection([{first: 'Matt',
last:'Matthews'}, {first: 'Tom', last: 'Jones'}]);

var obj:Object = new Object();
obj.first = 'lisa';
obj.last = 'griffen';

Object(myCollection[0]).obj = obj;

then create a tree:
mx:Tree x=137 y=176 width=422 id=meSmallTree
dataProvider={myCollection}
 labelFunction=GetTreeLable 
click=ItemClicked(event)/mx:Tree

I only see the first 2 names, Matt and Tom.  How do I have the new
object show as a child of the Matt?

Thanks,
timgerr

PS, how did you do he color in your code


--- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote:


 Ah, ok.  The first item in the arrayCollection is an Object.  So, you
 would have to do something like this:

 var myCollection:ArrayCollection = new ArrayCollection([{first:
'Matt',
 last:'Matthews'}, {first: 'Tom', last: 'Jones'}]);

 var obj:Object = new Object();
 obj.first = 'lisa';
 obj.last = 'griffen';

 Object(myCollection[0]).obj = obj;

 -TH

 --- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:
 
  I want to add it as a child to the first item in the arraycollection
 (myCollection[0]). Can this be done???
 
  Thanks,
  timgerr
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Have you tried myCollection.addItemAt(obj,0);?
  
   -TH
  
   --- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:
   
I want to add items to an arraycollection as a child
   
   
--- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:

 Hello all,
 I have a question for you all. I was wondering how I can add a
 child
   to an object within a arraycollection. Here is what I mean:
 var myCollection:ArrayCollection = new
ArrayCollection([{first:
   'Matt', last: 'Matthews'}, {first: 'Tom', last: 'Jones'}]);

 var obj:Object = new Object();
 obj.first = 'lisa';
 obj.last = 'griffen';

 I would like to add the new object to be a child of the first
 item
   in the array list. Can this be done??

 Thanks,
 timgerr

   
  
 





[flexcoders] Re: Add items to an array list as a child

2009-05-08 Thread timgerr
That did it, now how do you get the text to change color in your code here in 
the Groups???

thanks,
timgerr


--- In flexcoders@yahoogroups.com, Charles Parcell pokemonkil...@... wrote:

 Going out on a limb here but try changing the one line of code that injects
 an child object to...
 
 Object(myCollection[0]).children= obj;
 
 Charles P.
 
 
 




[flexcoders] How to do a function/method in a Tree for the label

2009-05-06 Thread timgerr
Hello all, I am having some troubles with the tree control and an array 
collection.  I have this tree and the data provider is pointing to an array 
collection.  This is working great, I now have to create a label function for 
the labelField.  So this is what I did:

public function TreeNodeLabel(obj:Object):String
{
return obj.name;
}

Here is my MXML code:
mx:Tree x=510 y=271 dataProvider={this._ac} 
labelField={this.TreeNodeLabel()}/mx:Tree

What am I supposed to use as the argument in the mxml code for the 
this.TreeNodeLabel()  ?


Thanks,
timgerr



[flexcoders] Question about ASDocs

2009-04-23 Thread timgerr
When I run ASDocs on a project that works fine, I get some errors that somthing 
was not found at compile time.  Is there a way to turn off errors and just 
write the documentation???


Thanks,
timgerr



[flexcoders] Datagrid Goofy Problem cannot select rows

2009-04-10 Thread timgerr
Hello all,
I am creating a message board forum and I am using the datagrid to show message 
topics.  I add a new topic, via flex text input box, it gets sent to a PHP 
Weborb back end and the datagrid will then be updated.  So lets say I do not 
have any topics, I will add the first one, I can then take my mouse and select 
that row.  When my mouse hovers over the item, the row is highlighted (this is 
done by default, a feature of the datagrid).  If I create another topic, I am 
unable to highlight any other row except for the latest one that was updated.  
I am not sure what to look for here.  Here is my mxml datagrid :


mx:DataGrid x=0 y=0 width=100% height=100% id=dataGridReadTopics 
dataProvider={this._acTopic} click={this.dataGridReadTopicsClicked(event);}
mx:columns
mx:DataGridColumn headerText=Topic 
dataField=topic editable=false/
mx:DataGridColumn headerText=id 
dataField=id visible=false/ 
!--mx:DataGridColumn headerText=Column 
3 dataField=col3/ --
/mx:columns
/mx:DataGrid



Any Ideas???

thanks,
timgerr



[flexcoders] Has anyone done a file upload and download, store data into database

2009-04-01 Thread timgerr
I am in need of a flex app that will upload a file and that file will go into a 
database using PHP backed.  I know what most of this has to do with PHP, I am 
not sure how to take the data out of flex and hand it back to the user via 
flex.  Has anyone done something like this?

Thank you,
timgerr



[flexcoders] Re: Has anyone done a file upload and download, store data into database

2009-04-01 Thread timgerr
I have seen many for uploading something then storing the item in a directory.  
I think I can figure the upload out, but the download part I am not sure how to 
do.  I don't know how to take binary data and convert it to a picture or 
document.  If you know of a link that shows this being done, can you please 
post it???

Thanks,
timgerr

--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 Yes, it is not difficult.  The examples in the docs are nearly usable as
 they are.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of timgerr
 Sent: Wednesday, April 01, 2009 2:38 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Has anyone done a file upload and download, store data
 into database
 
  
 
 I am in need of a flex app that will upload a file and that file will go
 into a database using PHP backed. I know what most of this has to do with
 PHP, I am not sure how to take the data out of flex and hand it back to the
 user via flex. Has anyone done something like this?
 
 Thank you,
 timgerr





[flexcoders] Re: Has anyone done a file upload and download, store data into database

2009-04-01 Thread timgerr
Sorry for not being clear.  I want to transfer a file (image or document) to my 
back end PHP using flex.  I then want PHP to convert the file to binary and 
store the data into a database.  I think I know how to do that.  I then want to 
be able to retrieve that data from a query to the back end via flex and then 
have the user download the file (in the correct file format).   Can the 2nd 
part be done with flex, retrieving the file???  

Thanks, 
timgerr


--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 Can you be more clear on what you want?  Download typically means to take
 a physical file from a remote file system and save it in a local filesystem.
 There is no conversion involved.
 
  
 
 Perhaps you do not mean download?  What kinds of file formats are you
 talking about, and what do you want to do with the data in the Flex client?
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  




[flexcoders] Question an how to create dynamic content with Flex

2009-03-27 Thread timgerr
Hello all, 
I am creating an application that is a windowed system, I mean that I have 
windows that will launch and you can move them around.  I have ad to create all 
my content dynamically in Action Script because when my windows close I remove 
the object.  

Here is my question for y'all, can I create flex code dynamically, if so how 
can I do it?   Meaning that if I remove the Flex code widget object can I 
create it again?

Thanks for the information.

timgerr




[flexcoders] Re: Question an how to create dynamic content with Flex

2009-03-27 Thread timgerr
Never mind, I am a goof.

timgerr

--- In flexcoders@yahoogroups.com, timgerr tgallag...@... wrote:

 Hello all, 
 I am creating an application that is a windowed system, I mean that I have 
 windows that will launch and you can move them around.  I have ad to create 
 all my content dynamically in Action Script because when my windows close I 
 remove the object.  
 
 Here is my question for y'all, can I create flex code dynamically, if so how 
 can I do it?   Meaning that if I remove the Flex code widget object can I 
 create it again?
 
 Thanks for the information.
 
 timgerr





[flexcoders] Dynamic Accordion

2009-03-24 Thread timgerr
Can some one point me to an example of an accordion done in actionscript?  I 
want to create a menu with an accordion in it in actionscript but cannot find 
any examples on how to do the accordion.

Thanks,

timgerr



[flexcoders] Re: Dynamic Accordion

2009-03-24 Thread timgerr
So I have been reading actionscript on how to do this and I am running into 
some troubles, I seem to have to use createSegment but I dont see it in flex, 
here is what I mean:
var a:Accordion = new Accordion();
a.createSegment(Some Parameters);

I dont get a.createSegment in my list of things I can add to a.  What am I 
doing wrong?

Thanks,
timgerr


--- In flexcoders@yahoogroups.com, timgerr tgallag...@... wrote:

 Can some one point me to an example of an accordion done in actionscript?  I 
 want to create a menu with an accordion in it in actionscript but cannot find 
 any examples on how to do the accordion.
 
 Thanks,
 
 timgerr





[flexcoders] Re: Dynamic Accordion

2009-03-24 Thread timgerr
Thanks all for the response, I am not sure what I am doing wrong.  

I tried the example from valdhor and I get errors when I run it.  I decided to 
create a small example and run it.  When I do, the single vbox that I created 
is repeated until I close my browser. Can someone tell me what I am doing 
wrong???  Thanks for the help all:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
creationComplete=Testing()
mx:Script
![CDATA[
import mx.containers.Accordion;
import mx.controls.Label;
import mx.containers.VBox;
   
public function Testing():void
{
var a:Accordion = new Accordion();
a.height = 300;
a.width = 300;
var vb:VBox = new VBox()
var lbl1:Label = new Label();
lbl1.text = Ass Hat;
vb.label = Test 1;
vb.addChild(lbl1);
a.addChild(vb);
addChild(a);
}
]]
/mx:Script
/mx:Application

Tim 

--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 You may be making this hard. I do dynamic Accordions using repeater, works
 great.  If you really are insistent on AS only, then use addChild().
 Accordion is just a navigation container.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
 



[flexcoders] Getting Error when trying to destroy a tooltip

2009-03-19 Thread timgerr
Hello all, 
I am creating my own tooltip and I am getting an error, this code comes from 
adobe examples.  Here is the code:

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script![CDATA[
import mx.managers.ToolTipManager;
import mx.controls.ToolTip;

public var myTip:ToolTip;

private function createBigTip():void {
var s:String = These buttons let you save, exit, or continue with the 
current operation.
myTip = ToolTipManager.createToolTip(s,10,10) as ToolTip;
myTip.setStyle(backgroundColor,0xFFCC00);
myTip.width = 150;
myTip.height = 200;
}

private function destroyBigTip():void {
ToolTipManager.destroyToolTip(myTip);
}
]]/mx:Script

mx:Style
Panel {
paddingLeft: 5;
paddingRight: 5;
paddingTop: 5;
paddingBottom: 5;
}
/mx:Style

mx:Panel title=ToolTips rollOver=createBigTip() 
rollOut=destroyBigTip()
mx:Button label=OK toolTip=Save your changes and exit./
mx:Button label=Apply toolTip=Apply changes and continue./
mx:Button label=Cancel toolTip=Cancel and exit./
/mx:Panel
/mx:Application

I get this error:
Implicit coercion of a value of type ToolTip to an unrelated type 
mx.core:IToolTip. 

At this piece of code:
ToolTipManager.destroyToolTip(myTip);

Can someone tell me what I am doing wrong?

Thank you,
Tim Gallagher



[flexcoders] Find the middel of the screen

2009-03-11 Thread timgerr
I have to use layout=absolute in my flex app, is there a way to find the x 
and y values of the middle of the screen?

Thanks, 
timgerr



[flexcoders] Need help gettig weborb and my flex project working after compuer reimage...

2009-03-06 Thread timgerr
Hello all, I need some help. I am pulling my hair out.  I have been working 
on a flex project for about a year now and I had some problems with my 
computer.  I put in a new hard drive (Got all the data off the old one) and set 
xampp, weborb up all the same.  When I debug my project my Flex app runs, and 
on start A weborb request is done and fails with this error in Flex coming from 
the FaultEvent.  The error is Server reported an error - Send failed.  My 
debug path is C:\xampp\htdocs\weborb\pjhome-debug.  Here is the return error 
from Charles:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en
head
title
Object not found!
/title
link rev=made href=mailto:ad...@localhost; /
style type=text/css
!--/*--
![CDATA[/*!--*/ body { color: #00; background-color: #FF; } a:link { 
color: #CC; } p, address {margin-left: 3em;} span {font-size: smaller;} 
/*]]*/--gt;
/style
/head
body
h1
Object not found!
/h1
p
The requested URL was not found on this server. The link on the
a href=http://localhost/weborb/pjhome/pjhome.swf;
referring page
/a
seems to be wrong or outdated. Please inform the author of
a href=http://localhost/weborb/pjhome/pjhome.swf;
that page
/a
about the error. 
/p
p
If you think this is a server error, please contact the
a href=mailto:ad...@localhost;
webmaster
/a
.
/p
h2
Error 404
/h2
address
a href=/
localhost
/a
br /
span
03/07/09 00:21:40
br /
Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color 
PHP/5.2.8
/span
/address
/body
/html

Since my build path is C:\xampp\htdocs\weborb\pjhome-debug, and the page comes 
up.  Why is weborb sending a response request to 
http://localhost/weborb/pjhome/pjhome.swf ??

I am pulling my hair out on this one,  Please help.

Thanks for the read,
timgerr




[flexcoders] mysqli, Weborb, and getting username and password from include or method

2009-01-16 Thread timgerr
Hello all, I have started using stored procedures for my MySql queries
so to call the stored procedures I use mysqli.  The problem is that I
have a class and one of my public methods calls private methods to do
the work.  Here is what I mean.
Class Tree{
var $mysqli;
var $finalArry;
var $collectArry;
var $dUName;
var $dPWord;
var $dHost;
var $dDB;
public function Tree()
{
$this-finalArry = array();
$this-collectArry = array();
}
public function MasterCall(SB $obj)
{
switch($obj-call){
case BuildTreeStructure:
$called = $this-BuildTreeStructure($obj);
break;
case AddNewNode:
$called = $this-AddNewNode($obj);
break;  
}
return $called;
}

private function AddNewNode($obj)
{   
/* Calling the SQL stored procedure AddNodeSP   
*/
$mysqli = new mysqli('localhost', 'root', '', 'MeDatabase');
if (mysqli_connect_errno(  )) {
printf(Connect failed: %s\n, mysqli_connect_error(  
));
exit (  );
} else {
//  printf(Connect succeeded\n);
}
$sql = CALL
AddNodeSP('$obj-parentCBSid','$obj-rootCBSid','$obj-newNode');
$mysqli-query($sql);

if ($mysqli-errno) {
die(Execution failed: .$mysqli-errno.: .$mysqli-error);
}
$getTree = $this-BuildTreeStructure($obj);
return $getTree;
}

}
Class SB {
var $parentCBSid;
var $rootCBSid;
var $newNode;
var $call;
var $user;
var $pass;
var $host;
var $db;
}

so in my AddNewNode method I have a mysqli connection :
$mysqli = new mysqli('localhost', 'root', '', 'MeDatabase');

I dont want to have to add this line everytime I do this because if I
have to change my password.  SO I created a password file and did an
include:
In the AddNewNode method I do this
require_once('PasswordFile.php');
$mysqli = new mysqli('localhost',$user,$pass,$db);


When I run this script from a webpage (remember I am using this as a
service from Webord) It works fine.  When I run my flex app, I get an
error in charles :
bWarning/b:  mysqli::mysqli() [a
href='function.mysqli-mysqli'function.mysqli-mysqli/a]:
(28000/1045): Access denied for user 'ODBC'@'localhost' (using
password: NO) in
bC:\xampp\htdocs\weborb\Services\com\ArrayTree\Tree.php/b on line
b100/bbr /
Connect failed: Access denied for user 'ODBC'@'localhost' (using
password: NO)

Anyone know how I can use a password file with Weborb, mysqli, and Flex?

Thanks for the read,
timgerr





[flexcoders] Change Color of panel from a function

2008-12-29 Thread timgerr
Hello all,
I am having troubles finding information on how to change the border
color of a panel from a function, here is my code:
mx:Panel id=editPanel layout=absolute width=330 height=65%
right=10 top=128
  mx:Button x=122.5 y=10 click=EditMe id=nodeEditMode
label=Edit Mode/
  mx:Label x=10 y=37 text=Name/
  mx:TextInput x=10 y=63 id=node_Name width=218
editable=false/
/mx:Panel

private function EditMe():void
{
  Not sure what to put here
}

I don't see the ability to change the color when I do editPanel. .
Thanks for the help,
timgerr





[flexcoders] Weborb to return XML data

2008-12-16 Thread timgerr
I have been working with weborb and I think it is great.  I am working
on a graph that needs XML data that I have generated via php and
mysql.  I was wondering of Weborb can return XML and if you have any
examples of this.

Thanks for the,
timgerr



[flexcoders] Re: Flex nested tree get data from mysql and php

2008-12-10 Thread timgerr
So I took a few days to figure out how to create a parent child array
using left, right keys and parent child relationship.  You can use this
code how ever you want.

You have to have a table that holds left, right and parent information.
?php
class CBSTree {
 public $tempArry;
 public $parentString;
 public $collectArry;
 public $parentArry;


 public function CBSTree()
 {
 $this-parentString;
 $this-tempArry = array();
 $this-collectArry = array();
 $this-parentArry = array();
 }
 public function BuildTree($name)
 {
 /* setting up the database
*/
 if(!$dbconnect = mysql_connect('localhost', 'root')) {
echo Connection failed to the host 'localhost'.;
exit;
 }
 if (!mysql_select_db('UrDataBase')) {
echo Cannot connect to database 'test';
exit;
 }

 $table_id = 'dnt_cbs_table';  // Table name

 $query = SELECT node.name, node.CBSid, node.PARid
 FROM $table_id AS node,
 $table_id AS parent
 WHERE node.L BETWEEN parent.L AND parent.R
 AND parent.name = '$name'
 ORDER BY node.L;

 $result = mysql_query($query);
 while($row=mysql_fetch_object($result)){
 $this-parentArry[] = $row-PARid;
 $this-collectArry[] = $row;
 }

 $this-CleanParentString();
 return $this-tempArry[0][0];
 }
 /**
  * CleanParentString()
  * This will break the $this-parentString into an array, remove
duplicate numbers
  * then reassemble the array into a string ($this-parentString)
ordered from lowest
  * to highest
  */
 public function CleanParentString()
 {
 $temp = array_unique($this-parentArry);
 $this-parentArry = array_reverse($temp);
 $this-GroupCommonChildObjects();
 }
 /**
  * GroupCommonChildObjects()
  * This will first get the last digit in the $this-parentString and
then loop through
  * the array ($this-collectArry[]-parent) to make matches.  If
there is a match then
  * the object ($this-collectArray[]) is grouped in a temporary
array.  This temporary
  * array is then added to $this-tempArry;
  */
 public function GroupCommonChildObjects()
 {
 for($e=0;$ecount($this-parentArry);$e++){
 $arr = array();
 for($i=0;$icount($this-collectArry);$i++){
 if($this-collectArry[$i]-PARid ==
$this-parentArry[$e]){
 $arr[] = ($this-collectArry[$i]);
 }
 }
 $this-tempArry[] = ($arr);
 }
 $this-DoTheWork();
 }

 public function FindParent($num,$childArry)
 {
 for($i=0;$icount($this-tempArry);$i++){
 for($x=0;$xcount($this-tempArry[$i]);$x++){
 if($this-tempArry[$i][$x]-CBSid == $num){
 $this-tempArry[$i][$x]-children = $childArry;

 }

 }
 }
 }

 public function DoTheWork()
 {
 while(count($this-tempArry)1){
 $this-FindParent($this-tempArry[0][0]-PARid,
$this-tempArry[0]);
 array_shift($this-tempArry);
 }
 }
}


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

 Hello all,
 I am working with nested arrayobjects and I cannot construct the
 needed data from my php/mysql backend.

 I am using nested sets
 (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html),
 with left and right keys.  I need to construct the data (in php) and
 pass it to flex (using a remote call). I need/want to get the data to
 flex and put it into an arraycollection.  Has any one done this?  If
 so, can you post some code?  I have been banging my head on this for a
 long time and cannot get the data into the right format for an array
 collection.

 Thanks for the help,
 timgerr





[flexcoders] SpringGraph and ArrayCollection

2008-12-10 Thread timgerr
Has anyone used an arraycollection with a springgraph?

thanks for the help,
timgerr



[flexcoders] Re: Flex nested tree get data from mysql and php

2008-12-02 Thread timgerr
So I am trying to build a MPTT (nested tree) object in php, I have a
few questions for this group because I am not sure how the data should
be returned.  I have been using static data and have a few questions
on what is contained within the data.  Here is my arraycollection:
private var myDataProvider:ArrayCollection = new ArrayCollection([
  Region:Southwest,ID:1,Territory_Rep:Tom Jones, children: [
{Region:Arizona,ID:2, children: [ 
{Territory_Rep:Barbara Jennings, ID:3}, 
{Territory_Rep:Dana Binn,ID:4}]},  
{Region:Central California,ID:5, children: [ 
{Territory_Rep:Joe Smith, ID:6}]},  
{Region:Nevada, ID:7, children: [ 
   {Territory_Rep:Bethany Pittman,ID:8}]},  
{Region:Northern California, ID:9, children: [ 
   {Territory_Rep:Lauren Ipsum,ID:10}, 
   {Territory_Rep:T.R. Smith,ID:11}]},  
{Region:Southern California,ID:'12', children: [ 
   {Territory_Rep:Alice Treu, ID:'13'}, 
   {Territory_Rep:Jane Grove,ID:14}]}
   ]}
]);

I am in need of some guidance, so bear with me :). I think that this
is an object {Territory_Rep:Joe Smith, ID:6}, is this an array
with an object {Region:Central California,ID:5, children: [ 
{Territory_Rep:Joe Smith, ID:6}]} ?

Here is my problem, I am creating some php data returns to flex with
arrays, object, assoc arrays.  I am not sure what a flex
arraycollection is so I am running some tests.  Here are some tests
that I have done,
Example #1
PHP CODE
$o1-name = 'Tom';
$o1-status = 'Dad';

$o2-name = 'Wendy';
$o2-status = 'Daughter';
$b[] = $o2;
$o1-child = $b;
$arr[] = $o1;
return $arr;

Charles Proxy Sees This:
com.mptt.MPTT.GetTree
Parameters
Results
[0]
name
status
child
[0]
name
status

Example #2
$o1-name = 'Tom';
$o1-status = 'Dad';

$o2-name = 'Wendy';
$o2-status = 'Daughter';
$o1-child = $o2;
$arr[] = $o1;
return $arr;


com.mptt.MPTT.GetTree
Parameters
Results
[0]
name
status
child
name
status


Example #3
$o1-name = 'Tom';
$o1-status = 'Dad';

$o2-name = 'Wendy';
$o2-status = 'Daughter';
$o1-child = $o2;
return $o1;

com.mptt.MPTT.GetTree
Parameters
Results
name
status
child
name
status

So when I return the 3 examples int an arraycollection:
var ac:ArrayCollection = new ArrayCollection(result.result as Array);
and use that array collection as a dataprovider for a combobox 

mx:ComboBox x=204 y=107 id=cmbox dataProvider={ac}
labelField=name/mx:ComboBox

Only example 1 and 2 return anything and that is only the first name,
none of the child names propagate the Combobox.  

So my question with all of this, how (what format) should I return my
data from php to flex so I can add it (the data) to an arraycollection.

Thanks for all the help, this group rocks,
timgerr

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

 Hello all, 
 I am working with nested arrayobjects and I cannot construct the
 needed data from my php/mysql backend.  
 
 I am using nested sets
 (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html),
 with left and right keys.  I need to construct the data (in php) and
 pass it to flex (using a remote call). I need/want to get the data to
 flex and put it into an arraycollection.  Has any one done this?  If
 so, can you post some code?  I have been banging my head on this for a
 long time and cannot get the data into the right format for an array
 collection.
 
 Thanks for the help,
 timgerr





[flexcoders] Re: Flex nested tree get data from mysql and php

2008-11-30 Thread timgerr
Amy, as always, you rock, that url was a good read.  My problem is I
am not sure how many children I will have or what the structure will
look like.  I am doing a tree so I can have n number of nodes or
children, and I am not sure how to build the return object/array. 

Thanks for the read.

timgerr

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

 --- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:
 
  Hello all, 
  I am working with nested arrayobjects and I cannot construct the
  needed data from my php/mysql backend.  
  
  I am using nested sets
  (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html),
  with left and right keys.  I need to construct the data (in php) and
  pass it to flex (using a remote call). I need/want to get the data to
  flex and put it into an arraycollection.  Has any one done this?  If
  so, can you post some code?  I have been banging my head on this for a
  long time and cannot get the data into the right format for an array
  collection.
 
 My client felt it wasn't appropriate to send all the data at once, so 
 the way I work it is to have a manager class that tells each child node 
 to load all of its children one at a time, using an event model that 
 allows for interruptions when the user selects something so that then 
 it concentrates on the children of the selected node.
 
 But you might find this article a good start to the way you want to do 
 it:
 http://www.insideria.com/2008/04/amf3-php-server-objects-to-fle.html





[flexcoders] Flex nested tree get data from mysql and php

2008-11-29 Thread timgerr
Hello all, 
I am working with nested arrayobjects and I cannot construct the
needed data from my php/mysql backend.  

I am using nested sets
(http://dev.mysql.com/tech-resources/articles/hierarchical-data.html),
with left and right keys.  I need to construct the data (in php) and
pass it to flex (using a remote call). I need/want to get the data to
flex and put it into an arraycollection.  Has any one done this?  If
so, can you post some code?  I have been banging my head on this for a
long time and cannot get the data into the right format for an array
collection.

Thanks for the help,
timgerr



[flexcoders] Get parent object in an array collection

2008-11-26 Thread timgerr
Hello all,
I am using an array collection as a dataprovider for the Kap Lab
(http://lab.kapit.fr/display/visualizer/Visualizer) which is like a
spring graph.  So when I click on an end node, I get the id of the
node. If I have an id to an object, how can find the parent object and
get access to it?  Has anyone done this before?  Here is my
ArrayCollection:

private var myDataProvider:ArrayCollection = new ArrayCollection([
{Region:Southwest,ID:1, children: [
 {Region:Arizona,ID:2, children: [  
{Territory_Rep:Barbara Jennings, ID:3}, 
{Territory_Rep:Dana Binn,ID:4}]},  
 {Region:Central California,ID:5, children: [ 
 {Territory_Rep:Joe Smith, ID:6}]},  
 {Region:Nevada, ID:7, children: [ 
 {Territory_Rep:Bethany Pittman,ID:8}]},  
 {Region:Northern California, ID:9, children: [ 
 {Territory_Rep:Lauren Ipsum,ID:10}, 
 {Territory_Rep:T.R. Smith,ID:11}]},  
 {Region:Southern California,ID:'12', children: [ 
 {Territory_Rep:Alice Treu, ID:'13'}, 
 {Territory_Rep:Jane Grove,ID:14}]}
]}
]);

Thanks for the read,
happy TGiving ,
timgerr



[flexcoders] Re: Error #1034: Type Coercion failed: cannot convert to Date w/ Datagrid

2008-11-20 Thread timgerr
TypeError: Error #1034: Type Coercion failed: cannot convert  to Date.
at mx.controls::DateField/set
data()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DateField.as:735]
at
mx.controls::DataGrid/itemEditorItemEditBeginHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4755]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
at
mx.controls::DataGrid/commitEditedItemPosition()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:3676]
at
mx.controls::DataGrid/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:1498]
at
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3281]
at
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:675]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()


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

 Please use a debug build and post the complete stacktrace.
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of timgerr
 Sent: Wednesday, November 19, 2008 8:46 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Error #1034: Type Coercion failed: cannot
convert  to Date w/ Datagrid
 
 
 Alex thanks for the reply, I am still getting the same error.
 
 timgerr
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex
Harui aharui@ wrote:
 
  editorDataField=selectedDate
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of timgerr
  Sent: Tuesday, November 18, 2008 9:32 PM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Error #1034: Type Coercion failed: cannot
 convert  to Date w/ Datagrid
 
 
  Hello all,
  I am trying to add a datefield to a datagrid using a itemEditor. I
  have seen that people are having this problem but I canot find a
  solution (That I understand). Has anyone ever had this problem and
  what did you do to solve it. Here is my code:
 
  mx:DataGrid id=CertDG width=528 height=60% editable=true
  mx:columns
  mx:DataGridColumn headerText=Name dataField=cert_name/
  mx:DataGridColumn headerText=Issuer dataField=issuer/
  mx:DataGridColumn headerText=Achieved
  dataField=date_achieved editorDataField=text
  mx:itemEditor
  mx:Component
  mx:DateField formatString=DD-MM-YY
  yearNavigationEnabled=true toolTip=Format:DD-MM-YY/
  /mx:Component /mx:itemEditor
  /mx:DataGridColumn
  /mx:columns
  /mx:DataGrid
 
  Thanks for the read,
  timgerr
 





[flexcoders] Question about a component Kap Lab Diagrammer

2008-11-20 Thread timgerr
Has anyone used this component?  It does not have any community
support for it?

Thanks for the read,
timgerr



[flexcoders] Re: Error #1034: Type Coercion failed: cannot convert to Date w/ Datagrid

2008-11-20 Thread timgerr
I have the dateField in an exitable Flex component within a DataGrid.
 The field is empty and when I hit the dateField I get the error.

timgerr

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

 are you passing an empty string as a date?
 
  cannot convert  to Date
 
 On Thu, Nov 20, 2008 at 5:32 PM, timgerr [EMAIL PROTECTED] wrote:
 
TypeError: Error #1034: Type Coercion failed: cannot convert 
to Date.
  at mx.controls::DateField/set
 
 
data()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DateField.as:735]
  at
 
 
mx.controls::DataGrid/itemEditorItemEditBeginHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4755]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at
 
 
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
  at
 
 
mx.controls::DataGrid/commitEditedItemPosition()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:3676]
  at
 
 
mx.controls::DataGrid/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:1498]
  at
 
 
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3281]
  at
 
 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
  at
 
 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:675]
  at Function/http://adobe.com/AS3/2006/builtin::apply()
  at
 
 
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
  at
 
 
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
  at flash.utils::Timer/_timerDispatch()
  at flash.utils::Timer/tick()
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex
  Harui aharui@ wrote:
  
   Please use a debug build and post the complete stacktrace.
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com]
  On Behalf Of timgerr
   Sent: Wednesday, November 19, 2008 8:46 AM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Re: Error #1034: Type Coercion failed: cannot
  convert  to Date w/ Datagrid
  
  
   Alex thanks for the reply, I am still getting the same error.
  
   timgerr
  
   --- In
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
  flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Alex
  Harui aharui@ wrote:
   
editorDataField=selectedDate
   
From:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
  flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
flexcoders%40yahoogroups.commailto:
  flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com]
   On Behalf Of timgerr
Sent: Tuesday, November 18, 2008 9:32 PM
To: flexcoders@yahoogroups.com
flexcoders%40yahoogroups.commailto:
  flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com
Subject: [flexcoders] Error #1034: Type Coercion failed: cannot
   convert  to Date w/ Datagrid
   
   
Hello all,
I am trying to add a datefield to a datagrid using a itemEditor. I
have seen that people are having this problem but I canot find a
solution (That I understand). Has anyone ever had this problem and
what did you do to solve it. Here is my code:
   
mx:DataGrid id=CertDG width=528 height=60% editable=true
mx:columns
mx:DataGridColumn headerText=Name dataField=cert_name/
mx:DataGridColumn headerText=Issuer dataField=issuer/
mx:DataGridColumn headerText=Achieved
dataField=date_achieved editorDataField=text
mx:itemEditor
mx:Component
mx:DateField formatString=DD-MM-YY
yearNavigationEnabled=true toolTip=Format:DD-MM-YY/
/mx:Component /mx:itemEditor
/mx:DataGridColumn
/mx:columns
/mx:DataGrid
   
Thanks for the read,
timgerr
   
  
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],





[flexcoders] Re: Error #1034: Type Coercion failed: cannot convert to Date w/ Datagrid

2008-11-19 Thread timgerr
Alex thanks for the reply, I am still getting the same error.

timgerr

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

 editorDataField=selectedDate
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of timgerr
 Sent: Tuesday, November 18, 2008 9:32 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Error #1034: Type Coercion failed: cannot
convert  to Date w/ Datagrid
 
 
 Hello all,
 I am trying to add a datefield to a datagrid using a itemEditor. I
 have seen that people are having this problem but I canot find a
 solution (That I understand). Has anyone ever had this problem and
 what did you do to solve it. Here is my code:
 
 mx:DataGrid id=CertDG width=528 height=60% editable=true
 mx:columns
 mx:DataGridColumn headerText=Name dataField=cert_name/
 mx:DataGridColumn headerText=Issuer dataField=issuer/
 mx:DataGridColumn headerText=Achieved
 dataField=date_achieved editorDataField=text
 mx:itemEditor
 mx:Component
 mx:DateField formatString=DD-MM-YY
 yearNavigationEnabled=true toolTip=Format:DD-MM-YY/
 /mx:Component /mx:itemEditor
 /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid
 
 Thanks for the read,
 timgerr





[flexcoders] Error #1034: Type Coercion failed: cannot convert to Date w/ Datagrid

2008-11-18 Thread timgerr
Hello all, 
I am trying to add a datefield to a datagrid using a itemEditor.  I
have seen that people are having this problem but I canot find a
solution (That I understand).  Has anyone ever had this problem and
what did you do to solve it.  Here is my code:


mx:DataGrid id=CertDG width=528 height=60% editable=true
   mx:columns
mx:DataGridColumn headerText=Name dataField=cert_name/
mx:DataGridColumn headerText=Issuer dataField=issuer/
mx:DataGridColumn headerText=Achieved
dataField=date_achieved editorDataField=text
mx:itemEditor  
mx:Component
  mx:DateField  formatString=DD-MM-YY
yearNavigationEnabled=truetoolTip=Format:DD-MM-YY/ 
 
/mx:Component  /mx:itemEditor
/mx:DataGridColumn
/mx:columns
/mx:DataGrid


Thanks for the read, 
timgerr



[flexcoders] DataGridColumn add a button and have the btn label = the returned dataField info

2008-11-14 Thread timgerr
Hello all,
I was wondering how to do somtgin that I think is complicated.  I want
to have a button in a DataGridColumn, I would like to have the button
label be set to the data returned in that fataField.  Here is what I mean:

mx:DataGrid id=MEDG  width=100% height=100%
  mx:columns
mx:DataGridColumn headerText=Name dataField=name/
mx:DataGridColumn headerText=Manufacturer
dataField=manufacturer/
mx:DataGridColumn headerText=Version dataField=version/
mx:DataGridColumn headerText=Ability dataField=ability 
  mx:itemRenderer
mx:Component
  mx:HBox horizontalAlign=center
mx:Button label={outerDocument.MEDG.ability}/
  /mx:HBox
/mx:Component
  /mx:itemRenderer
/mx:DataGridColumn
  /mx:columns
/mx:DataGrid

How can I set the button:
mx:Button label={outerDocument.MEDG.ability}/  

to equal the data contained in:
mx:DataGridColumn headerText=Ability dataField=ability

Thanks for the help,
timgerr



[flexcoders] Re: DataGridColumn add a button and have the btn label = the returned dataField info

2008-11-14 Thread timgerr
OK, I did this to the button:
mx:Button label={data.ability} width=75  /   
but now I get warnings when I run the app:
warning: unable to bind to property 'ability' on class 'Object' (class
is not an IEventDispatcher)


What is this and what should I be doing to get the label?

Thanks again,
timgerr


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

 Hello all,
 I was wondering how to do somtgin that I think is complicated.  I want
 to have a button in a DataGridColumn, I would like to have the button
 label be set to the data returned in that fataField.  Here is what I
mean:
 
 mx:DataGrid id=MEDG  width=100% height=100%
   mx:columns
 mx:DataGridColumn headerText=Name dataField=name/
 mx:DataGridColumn headerText=Manufacturer
 dataField=manufacturer/
 mx:DataGridColumn headerText=Version dataField=version/
 mx:DataGridColumn headerText=Ability dataField=ability 
   mx:itemRenderer
   mx:Component
 mx:HBox horizontalAlign=center
 mx:Button label={outerDocument.MEDG.ability}/
   /mx:HBox  
   /mx:Component
   /mx:itemRenderer
 /mx:DataGridColumn
   /mx:columns
 /mx:DataGrid
 
 How can I set the button:
 mx:Button label={outerDocument.MEDG.ability}/  
 
 to equal the data contained in:
 mx:DataGridColumn headerText=Ability dataField=ability
 
 Thanks for the help,
 timgerr





[flexcoders] Traverse through a TabNavigator

2008-11-12 Thread timgerr
Hello all, I have a TabNavigator that contains 2 forms:
mx:TabNavigator x=196 y=160 width=200 height=200 id=TopTab
 mx:Form id=FormOne label=User
mx:FormItem label=First Name
   mx:TextInput id=fname/
/mx:FormItem
mx:FormItem label=Last Name
   mx:TextInput id=lname/
/mx:FormItem
/mx:Form

mx:Form id=FormTwo label=Address
  mx:FormItem label=Address
 mx:TextInput id=address/
   /mx:FormItem
   mx:FormItem label=Zip Code
 mx:TextInput id=zip/
   /mx:FormItem
  /mx:Form
/mx:TabNavigator

and I wrote this script to traverse a Form:
public function Frm(f:Form):void
{
   var a:Array = f.getChildren();
   for(var i:int = 0; i  a.length; i++){
  this.FrmI(a[i]);
   }
}

public function FrmI(f:FormItem):void
{
   var a:Array = f.getChildren();
   for(var i:int = 0; i  a.length; i++){
 trace(a[i].id);
   }
}

so the script will take a form object, then see how many childreen it
has then it will send the formitems to FrmI. Frmi will get me the name
of the child objects and that is all.  So the problem is when I run init()
public function init():void
{
  Frm(FormOne);
  Frm(FormTwo);
}
I get this in return:
fname
lname

If I just run the 2nd form like this:
public function init():void
{  
  Frm(FormTwo);
}

Nothing is displayed.  I think this has to do with TabNavigator.  It
looks to only get information from the tab that is on the top.  Is
that correct, and what do I have to do in order to get all the
information ?

Thanks,
timgerr





[flexcoders] Re: Traverse through a TabNavigator

2008-11-12 Thread timgerr
Thanks for the comment, if creationPolicy is bad, what do other people
do and why is it bad?

Thanks,
timgerr

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

 
 Hi Tim,
 
 The problem is that only the first child of a TabNavigator is
 instantiated initially.  Not best practice, but you can set
 creationPolicy=All for the TabNavigator; in order to reference the
 other children on init.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, timgerr tgallagher@ wrote:
 
  Hello all, I have a TabNavigator that contains 2 forms:
  mx:TabNavigator x=196 y=160 width=200 height=200 id=TopTab
  mx:Form id=FormOne label=User
  mx:FormItem label=First Name
  mx:TextInput id=fname/
  /mx:FormItem
  mx:FormItem label=Last Name
  mx:TextInput id=lname/
  /mx:FormItem
  /mx:Form
 
  mx:Form id=FormTwo label=Address
  mx:FormItem label=Address
  mx:TextInput id=address/
  /mx:FormItem
  mx:FormItem label=Zip Code
  mx:TextInput id=zip/
  /mx:FormItem
  /mx:Form
  /mx:TabNavigator
 
  and I wrote this script to traverse a Form:
  public function Frm(f:Form):void
  {
  var a:Array = f.getChildren();
  for(var i:int = 0; i  a.length; i++){
  this.FrmI(a[i]);
  }
  }
 
  public function FrmI(f:FormItem):void
  {
  var a:Array = f.getChildren();
  for(var i:int = 0; i  a.length; i++){
  trace(a[i].id);
  }
  }
 
  so the script will take a form object, then see how many childreen it
  has then it will send the formitems to FrmI. Frmi will get me the name
  of the child objects and that is all. So the problem is when I run
 init()
  public function init():void
  {
  Frm(FormOne);
  Frm(FormTwo);
  }
  I get this in return:
  fname
  lname
 
  If I just run the 2nd form like this:
  public function init():void
  {
  Frm(FormTwo);
  }
 
  Nothing is displayed. I think this has to do with TabNavigator. It
  looks to only get information from the tab that is on the top. Is
  that correct, and what do I have to do in order to get all the
  information ?
 
  Thanks,
  timgerr
 





[flexcoders] Adding objects to arraycollections

2008-11-10 Thread timgerr
Hello all, I was wondering how to add objects to arraycollections
arrycoll:ArrayCollection = new ArrayCollection();
obj1:Object = new Object();
obj2:Object = new Object();

obj1.id = 'Hi';
obj.2.id = 'Bye';

how do I add obj1 and obj2 to an array collection?
 
Thanks,
timgerr



[flexcoders] Question on how to find out what something is.

2008-11-10 Thread timgerr
So I have this form
mx:Form id=One
  mx:FormItem label=First
 mx:TextInput id=first/
  /mx:FormItem
/mx:Form

so I have this function 
init():void
{
  trace(One.getChildren().length)
}

My question is what is One, what kind of component or object is it. 
This is what I mean;

I take the same form and add a creationcomplete to it:
mx:Form id=One creationcomplete=init(somthing)
  mx:FormItem label=First
 mx:TextInput id=first/
  /mx:FormItem
/mx:Form

In the above example I pass something into init (init(something), what
is that something?  I am not sure how to declare it?

init(this:NotSureWhatItIs)
{
  trace ???
}

If I do an object I do not have access to getChildren().

What do I do?
Thanks for the help
timgerr



[flexcoders] Re: Get id of dynamic validator

2008-11-06 Thread timgerr
Thanks all for the help, I now have a following question:
1. In this line of code
globalValidators[validatorID_ + formItem[0].id] = validateString
what is validateString?

Thanks again,
timgerr

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

 Hi timgerr,
 
 try the following:
 
 var globalValidators:Object = new Object() ;
 
 inside the dynamically validators function do the following:
 
 globalValidators[validatorID_ + formItem[0].id] = validateString ;
 
 now when you need the validator (and you know the component (and its
id) you
 can get the validator:
 
 StringValidator sv = globalValidators[validatorID_ +
knownFormItem.id] as
 StringValidator
 
 
 On Thu, Nov 6, 2008 at 6:38 AM, timgerr [EMAIL PROTECTED] wrote:
 
Not sure how to do that. If the validators are created dynamically:
 
  var c:UIComponent = formItem[0];
  c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
  var validateString:StringValidator = new
  StringValidator();
  validateString.source = c;
  validateString.property = text;
  validateString.required = formItem[0].parent.required;
  validateString.maxLength = formItem[0].maxChars - 10;
 
  How do I make an an associative array? Not sure what the id of the
  validator is.
 
  Thanks for the help,
  timgerr
 
  FYI, c is a UIComponent
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Tracy
  Spratt tspratt@ wrote:
  
   Perhaps create an associative array of references to the validators?
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
   Behalf Of timgerr
   Sent: Wednesday, November 05, 2008 7:12 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Get id of dynamic validator
  
  
  
   Hello, I have this form and I am createin dynamic validators for
each
   textinput. I cannot see how to get the validators id when I try and
   validate the textinput boxes, here is my code:
   mx:Form width=370 id=userInfoForm
   mx:FormItem label=First Name required=true
   id=fname_25_string
   mx:TextInput id=firstName toolTip=First Name: Max Length 25
   Characters
   maxChars=35 text=James/
   /mx:FormItem
   mx:FormItem label=Last Name required=true id=lname_25_string
   mx:TextInput id=lastName toolTip=Last Name: Max Length 25
   Characters
   maxChars=35/
   /mx:FormItem
   mx:FormItem label=Email required=true id=Email__
   mx:TextInput id=email editable=false toolTip=Cannot edit
   this field/
   /mx:FormItem
   mx:FormItem label=Title id=tit_25_string
   mx:TextInput id=title maxChars=35 toolTip=Title: Max
   Length 25 Characters/
   /mx:FormItem
   /mx:Form
  
   So I do a creationcomplete to run a function to get a list of
all the
   textboxes:
   private function GetChild(item:Object):void
   {
   var formItems:Array = item.getChildren();
   // loop items and add values
   for (var i:int = 0; i  formItems.length; i++)
   {
   // formItem
   var formItem:Array = formItems[i].getChildren();
   var c:UIComponent = formItem[0];
   if(c.className.toString() == 'TextInput'){
   var rtnID:String = c.id;
   formItem[0].text = _performaReturnUsersData[rtnID];
   /* adding an eventlistener (focuseEvent) to all textinput
   */
   c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
   var validateString:StringValidator = new
   StringValidator();
   validateString.source = c;
   validateString.property = text;
   validateString.required = formItem[0].parent.required;
   validateString.maxLength = formItem[0].maxChars - 10;
   }
   }
   }
  
   This function will go through an find textinput boxes then assign a
   validator to them. So all is working but the problem is I have no
   idea how to validate the data without knowing the id of the
individual
   instance of the validator.
  
   I have added a listener to the instances of the textinput called
   UpdateItem, so here is the code:
  
   function UpdateItem(f:FocuseOut):void
   {
   trace(f.target.id);
   // Not sure what to do here becuase I dont know the id of the
   validator attached to the textinput
   }
  
   How can I see if the textinput passes the validators?
  
   Thanks for the help,
   timgerr
  
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],





[flexcoders] Re: Get id of dynamic validator

2008-11-06 Thread timgerr
OK I get it now, I think.

Thanks all.

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

 Hi timgerr,
 
 try the following:
 
 var globalValidators:Object = new Object() ;
 
 inside the dynamically validators function do the following:
 
 globalValidators[validatorID_ + formItem[0].id] = validateString ;
 
 now when you need the validator (and you know the component (and its
id) you
 can get the validator:
 
 StringValidator sv = globalValidators[validatorID_ +
knownFormItem.id] as
 StringValidator
 
 
 On Thu, Nov 6, 2008 at 6:38 AM, timgerr [EMAIL PROTECTED] wrote:
 
Not sure how to do that. If the validators are created dynamically:
 
  var c:UIComponent = formItem[0];
  c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
  var validateString:StringValidator = new
  StringValidator();
  validateString.source = c;
  validateString.property = text;
  validateString.required = formItem[0].parent.required;
  validateString.maxLength = formItem[0].maxChars - 10;
 
  How do I make an an associative array? Not sure what the id of the
  validator is.
 
  Thanks for the help,
  timgerr
 
  FYI, c is a UIComponent
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Tracy
  Spratt tspratt@ wrote:
  
   Perhaps create an associative array of references to the validators?
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
   Behalf Of timgerr
   Sent: Wednesday, November 05, 2008 7:12 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Get id of dynamic validator
  
  
  
   Hello, I have this form and I am createin dynamic validators for
each
   textinput. I cannot see how to get the validators id when I try and
   validate the textinput boxes, here is my code:
   mx:Form width=370 id=userInfoForm
   mx:FormItem label=First Name required=true
   id=fname_25_string
   mx:TextInput id=firstName toolTip=First Name: Max Length 25
   Characters
   maxChars=35 text=James/
   /mx:FormItem
   mx:FormItem label=Last Name required=true id=lname_25_string
   mx:TextInput id=lastName toolTip=Last Name: Max Length 25
   Characters
   maxChars=35/
   /mx:FormItem
   mx:FormItem label=Email required=true id=Email__
   mx:TextInput id=email editable=false toolTip=Cannot edit
   this field/
   /mx:FormItem
   mx:FormItem label=Title id=tit_25_string
   mx:TextInput id=title maxChars=35 toolTip=Title: Max
   Length 25 Characters/
   /mx:FormItem
   /mx:Form
  
   So I do a creationcomplete to run a function to get a list of
all the
   textboxes:
   private function GetChild(item:Object):void
   {
   var formItems:Array = item.getChildren();
   // loop items and add values
   for (var i:int = 0; i  formItems.length; i++)
   {
   // formItem
   var formItem:Array = formItems[i].getChildren();
   var c:UIComponent = formItem[0];
   if(c.className.toString() == 'TextInput'){
   var rtnID:String = c.id;
   formItem[0].text = _performaReturnUsersData[rtnID];
   /* adding an eventlistener (focuseEvent) to all textinput
   */
   c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
   var validateString:StringValidator = new
   StringValidator();
   validateString.source = c;
   validateString.property = text;
   validateString.required = formItem[0].parent.required;
   validateString.maxLength = formItem[0].maxChars - 10;
   }
   }
   }
  
   This function will go through an find textinput boxes then assign a
   validator to them. So all is working but the problem is I have no
   idea how to validate the data without knowing the id of the
individual
   instance of the validator.
  
   I have added a listener to the instances of the textinput called
   UpdateItem, so here is the code:
  
   function UpdateItem(f:FocuseOut):void
   {
   trace(f.target.id);
   // Not sure what to do here becuase I dont know the id of the
   validator attached to the textinput
   }
  
   How can I see if the textinput passes the validators?
  
   Thanks for the help,
   timgerr
  
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],





[flexcoders] Re: Get id of dynamic validator

2008-11-06 Thread timgerr
No I am again lost.  Sorry for the confusion, but I might need a code
example,
globalValidators[validatorID_ + formItem[0].id] = validateString ;
What is an example of validateString .  

Thanks for the help, I am trying to learn a more advanced way to doing
things.  

Thanks again,
timgerr



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

 Hi timgerr,
 
 try the following:
 
 var globalValidators:Object = new Object() ;
 
 inside the dynamically validators function do the following:
 
 globalValidators[validatorID_ + formItem[0].id] = validateString ;
 
 now when you need the validator (and you know the component (and its
id) you
 can get the validator:
 
 StringValidator sv = globalValidators[validatorID_ +
knownFormItem.id] as
 StringValidator
 
 
 On Thu, Nov 6, 2008 at 6:38 AM, timgerr [EMAIL PROTECTED] wrote:
 
Not sure how to do that. If the validators are created dynamically:
 
  var c:UIComponent = formItem[0];
  c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
  var validateString:StringValidator = new
  StringValidator();
  validateString.source = c;
  validateString.property = text;
  validateString.required = formItem[0].parent.required;
  validateString.maxLength = formItem[0].maxChars - 10;
 
  How do I make an an associative array? Not sure what the id of the
  validator is.
 
  Thanks for the help,
  timgerr
 
  FYI, c is a UIComponent
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Tracy
  Spratt tspratt@ wrote:
  
   Perhaps create an associative array of references to the validators?
  
   Tracy
  
  
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
[mailto:
  flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
   Behalf Of timgerr
   Sent: Wednesday, November 05, 2008 7:12 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Get id of dynamic validator
  
  
  
   Hello, I have this form and I am createin dynamic validators for
each
   textinput. I cannot see how to get the validators id when I try and
   validate the textinput boxes, here is my code:
   mx:Form width=370 id=userInfoForm
   mx:FormItem label=First Name required=true
   id=fname_25_string
   mx:TextInput id=firstName toolTip=First Name: Max Length 25
   Characters
   maxChars=35 text=James/
   /mx:FormItem
   mx:FormItem label=Last Name required=true id=lname_25_string
   mx:TextInput id=lastName toolTip=Last Name: Max Length 25
   Characters
   maxChars=35/
   /mx:FormItem
   mx:FormItem label=Email required=true id=Email__
   mx:TextInput id=email editable=false toolTip=Cannot edit
   this field/
   /mx:FormItem
   mx:FormItem label=Title id=tit_25_string
   mx:TextInput id=title maxChars=35 toolTip=Title: Max
   Length 25 Characters/
   /mx:FormItem
   /mx:Form
  
   So I do a creationcomplete to run a function to get a list of
all the
   textboxes:
   private function GetChild(item:Object):void
   {
   var formItems:Array = item.getChildren();
   // loop items and add values
   for (var i:int = 0; i  formItems.length; i++)
   {
   // formItem
   var formItem:Array = formItems[i].getChildren();
   var c:UIComponent = formItem[0];
   if(c.className.toString() == 'TextInput'){
   var rtnID:String = c.id;
   formItem[0].text = _performaReturnUsersData[rtnID];
   /* adding an eventlistener (focuseEvent) to all textinput
   */
   c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
   var validateString:StringValidator = new
   StringValidator();
   validateString.source = c;
   validateString.property = text;
   validateString.required = formItem[0].parent.required;
   validateString.maxLength = formItem[0].maxChars - 10;
   }
   }
   }
  
   This function will go through an find textinput boxes then assign a
   validator to them. So all is working but the problem is I have no
   idea how to validate the data without knowing the id of the
individual
   instance of the validator.
  
   I have added a listener to the instances of the textinput called
   UpdateItem, so here is the code:
  
   function UpdateItem(f:FocuseOut):void
   {
   trace(f.target.id);
   // Not sure what to do here becuase I dont know the id of the
   validator attached to the textinput
   }
  
   How can I see if the textinput passes the validators?
  
   Thanks for the help,
   timgerr
  
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],





[flexcoders] Get id of dynamic validator

2008-11-05 Thread timgerr
Hello, I have this form and I am createin dynamic validators for each
textinput.  I cannot see how to get the validators id when I try and
validate the textinput boxes, here is my code:
mx:Form width=370 id=userInfoForm
 mx:FormItem label=First Name required=true
id=fname_25_string
 mx:TextInput id=firstName toolTip=First Name: Max Length 25
Characters
  maxChars=35 text=James/
 /mx:FormItem
 mx:FormItem label=Last Name required=true id=lname_25_string
 mx:TextInput id=lastName toolTip=Last Name: Max Length 25
Characters
  maxChars=35/
 /mx:FormItem
 mx:FormItem label=Email required=true id=Email__
 mx:TextInput id=email editable=false toolTip=Cannot edit
this field/
 /mx:FormItem
 mx:FormItem label=Title id=tit_25_string
 mx:TextInput id=title maxChars=35 toolTip=Title: Max
Length 25 Characters/
 /mx:FormItem
/mx:Form


So I do a creationcomplete to run a function to get a list of all the
textboxes:
private function GetChild(item:Object):void
{
 var formItems:Array = item.getChildren();
 // loop items and add values
 for (var i:int = 0; i  formItems.length; i++)
 {
 // formItem
 var formItem:Array = formItems[i].getChildren();
 var c:UIComponent = formItem[0];
 if(c.className.toString() == 'TextInput'){
  var rtnID:String = c.id;
   formItem[0].text = _performaReturnUsersData[rtnID];
   /* adding an eventlistener (focuseEvent) to all textinput
*/
   c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
   var validateString:StringValidator = new
StringValidator();
   validateString.source = c;
   validateString.property = text;
   validateString.required = formItem[0].parent.required;
   validateString.maxLength = formItem[0].maxChars - 10;
 }
 }
}

This function will go through an find textinput boxes then assign a
validator  to them.  So all is working  but the problem is I have no
idea how to validate the data without knowing the id of the individual
instance of the validator.

I have added a listener to the instances of the textinput called
UpdateItem, so here is the code:

function UpdateItem(f:FocuseOut):void
{
trace(f.target.id);
   // Not sure what to do here becuase I dont know the id of the
validator attached to the textinput
}

How can I see if the textinput passes the validators?

Thanks for the help,
timgerr




[flexcoders] Re: Get id of dynamic validator

2008-11-05 Thread timgerr
Not sure how to do that.  If the validators are created dynamically:
var c:UIComponent = formItem[0];
c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
var validateString:StringValidator = new
StringValidator();
validateString.source = c;
validateString.property = text;
validateString.required = formItem[0].parent.required;
validateString.maxLength = formItem[0].maxChars - 10;

How do I make an an associative array?  Not sure what the id of the
validator is.

Thanks for the help,
timgerr

FYI, c is a UIComponent

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

 Perhaps create an associative array of references to the validators?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of timgerr
 Sent: Wednesday, November 05, 2008 7:12 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Get id of dynamic validator
 
  
 
 Hello, I have this form and I am createin dynamic validators for each
 textinput. I cannot see how to get the validators id when I try and
 validate the textinput boxes, here is my code:
 mx:Form width=370 id=userInfoForm
 mx:FormItem label=First Name required=true
 id=fname_25_string
 mx:TextInput id=firstName toolTip=First Name: Max Length 25
 Characters
 maxChars=35 text=James/
 /mx:FormItem
 mx:FormItem label=Last Name required=true id=lname_25_string
 mx:TextInput id=lastName toolTip=Last Name: Max Length 25
 Characters
 maxChars=35/
 /mx:FormItem
 mx:FormItem label=Email required=true id=Email__
 mx:TextInput id=email editable=false toolTip=Cannot edit
 this field/
 /mx:FormItem
 mx:FormItem label=Title id=tit_25_string
 mx:TextInput id=title maxChars=35 toolTip=Title: Max
 Length 25 Characters/
 /mx:FormItem
 /mx:Form
 
 So I do a creationcomplete to run a function to get a list of all the
 textboxes:
 private function GetChild(item:Object):void
 {
 var formItems:Array = item.getChildren();
 // loop items and add values
 for (var i:int = 0; i  formItems.length; i++)
 {
 // formItem
 var formItem:Array = formItems[i].getChildren();
 var c:UIComponent = formItem[0];
 if(c.className.toString() == 'TextInput'){
 var rtnID:String = c.id;
 formItem[0].text = _performaReturnUsersData[rtnID];
 /* adding an eventlistener (focuseEvent) to all textinput
 */
 c.addEventListener(FocusEvent.FOCUS_OUT,UpdateItem);
 var validateString:StringValidator = new
 StringValidator();
 validateString.source = c;
 validateString.property = text;
 validateString.required = formItem[0].parent.required;
 validateString.maxLength = formItem[0].maxChars - 10;
 }
 }
 }
 
 This function will go through an find textinput boxes then assign a
 validator to them. So all is working but the problem is I have no
 idea how to validate the data without knowing the id of the individual
 instance of the validator.
 
 I have added a listener to the instances of the textinput called
 UpdateItem, so here is the code:
 
 function UpdateItem(f:FocuseOut):void
 {
 trace(f.target.id);
 // Not sure what to do here becuase I dont know the id of the
 validator attached to the textinput
 }
 
 How can I see if the textinput passes the validators?
 
 Thanks for the help,
 timgerr





[flexcoders] Recursively get all the childreen

2008-11-04 Thread timgerr
How can I get a list of all the childreen?

mx:Tile id=TileTop width=333 height=197
mx:Form
mx:FormItem label=Part 1
mx:TextInput id=One/
/mx:FormItem
mx:FormItem label=Part 2
mx:TextInput id=two/
/mx:FormItem
mx:FormItem label=Part 3
mx:TextInput id=three/
/mx:FormItem
/mx:Form
/mx:Tile


Thanks,
Timgerr



[flexcoders] Re: Recursively get all the childreen

2008-11-04 Thread timgerr
I am trying to do something like this:
public function PerformaGetChild(ui:Object):void {
if(ui.childDescriptors.length  0){
for (var i:int = 0; i  ui.childDescriptors.length; 
i++) {
var c:ComponentDescriptor = ui.childDescriptors[i];
var d:Object = c.properties;
PerformaGetChild(d.id);
} 
} else {
trace(ui.id);
}
}  

PerformaGetChild(TileTop);

But it does not work, any ideas?

Thanks,
timgerr


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

 How can I get a list of all the childreen?
 
 mx:Tile id=TileTop width=333 height=197
 mx:Form
   mx:FormItem label=Part 1
   mx:TextInput id=One/
   /mx:FormItem
   mx:FormItem label=Part 2
   mx:TextInput id=two/
   /mx:FormItem
   mx:FormItem label=Part 3
   mx:TextInput id=three/
   /mx:FormItem
 /mx:Form
 /mx:Tile
 
 
 Thanks,
 Timgerr





[flexcoders] How to test for object and do other things

2008-11-03 Thread timgerr
Hello all,
I have a question for ya, have an object and I want to test for a flex
ui component with that name.  Here is what I am trying to do.

I have these flex UI items:
mx:TextInput id=myInput1 text=Enter text here/
mx:TextInput id=myInput3 text=Enter text here/
mx:TextInput id=myInput5 text=Enter text here/
mx:TextInput id=myInput7 text=Enter text here/


I have an object:
obj.myInput1 = 'Odd';
obj.myInput2 = 'Even';
obj.myInput3 = 'Odd';
obj.myInput4 = 'Even';
obj.myInput5 = 'Odd';
obj.myInput6 = 'Even';
obj.myInput7 = 'Odd';

so I can do this to see what is in the object:
for (var prop:String in obj)
   {
  trace(prop,  ' is ' +   obj[prop]);
   }

and I will get:
myInput1 is Odd
myInput2 is Even
myInput3 is Odd
myInput4 is Even
myInput5 is Odd
myInput6 is Even
myInput7 is Odd

Now I want to test to see if we have the textinput items for each
return of obj

I want to do something like this:
for (var prop:String in obj)
   {
  trace(prop,  ' is ' +   obj[prop]);
  if(prop.text) {
  trace('found');
  prop.text = obj[prop];
   }
This should find 
myInput1
myInput3
myInput5
myInput7

and add the information in the object to the textinput items.

but the problem is that the above code dosnt work, how can I do this?
Thanks for the help,
timgerr



[flexcoders] Re: How to test for object and do other things

2008-11-03 Thread timgerr
Thnaks for the help, here is the problem that I am getting.  I will
show you my code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute 
mx:Script
![CDATA[
public var obj:Object = new Object;
public function DoIt():void
{
NewObj();
}
public function NewObj():void
{
obj.myInput1 = 'Odd';
obj.myInput2 = 'Even';
obj.myInput3 = 'Odd';
obj.myInput4 = 'Even';
obj.myInput5 = 'Odd';
obj.myInput6 = 'Even';
obj.myInput7 = 'Odd';

for (var prop:String in obj)
{
if(this[prop].text) {
trace('found');
this[prop].text = obj[prop];
}
}
}
]]
/mx:Script
mx:TextInput id=myInput1 text=Enter text here/
mx:TextInput id=myInput3 text=Enter text here/
mx:TextInput id=myInput5 text=Enter text here/
mx:TextInput id=myInput7 text=Enter text here/
mx:Button id=Click click=DoIt()/
/mx:Application

I get an error ReferenceError: Error #1069: Property myInput6 not
found on Objects and there is no default value.  Not sure whey
myInput6 is being seen since I am doing the if statement.

Any ideas?

Thanks for the help
timgerr 


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

 if(this[prop].text) {
 trace('found');
 this[prop].text = obj[prop];
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of timgerr
 Sent: Monday, November 03, 2008 11:36 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to test for object and do other things
 
 
 Hello all,
 I have a question for ya, have an object and I want to test for a flex
 ui component with that name. Here is what I am trying to do.
 
 I have these flex UI items:
 mx:TextInput id=myInput1 text=Enter text here/
 mx:TextInput id=myInput3 text=Enter text here/
 mx:TextInput id=myInput5 text=Enter text here/
 mx:TextInput id=myInput7 text=Enter text here/
 
 I have an object:
 obj.myInput1 = 'Odd';
 obj.myInput2 = 'Even';
 obj.myInput3 = 'Odd';
 obj.myInput4 = 'Even';
 obj.myInput5 = 'Odd';
 obj.myInput6 = 'Even';
 obj.myInput7 = 'Odd';
 
 so I can do this to see what is in the object:
 for (var prop:String in obj)
 {
 trace(prop, ' is ' + obj[prop]);
 }
 
 and I will get:
 myInput1 is Odd
 myInput2 is Even
 myInput3 is Odd
 myInput4 is Even
 myInput5 is Odd
 myInput6 is Even
 myInput7 is Odd
 
 Now I want to test to see if we have the textinput items for each
 return of obj
 
 I want to do something like this:
 for (var prop:String in obj)
 {
 trace(prop, ' is ' + obj[prop]);
 if(prop.text) {
 trace('found');
 prop.text = obj[prop];
 }
 This should find
 myInput1
 myInput3
 myInput5
 myInput7
 
 and add the information in the object to the textinput items.
 
 but the problem is that the above code dosnt work, how can I do this?
 Thanks for the help,
 timgerr





[flexcoders] Re: Call to a member function on a non-object Weborb or PHP

2008-10-22 Thread timgerr
Does anyone know if this is a weborb or a php problem?

Thanks,
timgerr

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

 Hello all, I am using weborb and getting this error but I am not sure
 it is a weborb problem.  I have a class CleanQueryClass.php
 class CleanData {
 public function CleanObject($obj) {
   
   $n = new stdClass;
   foreach($obj as $var = $value) {
   // Stripslashes
   if (get_magic_quotes_gpc())
   {
   $value = stripslashes($value);
   }
   // Quote if not integer
   if (!is_numeric($value) || $value[0] == '0')
   {
   $value = 
 mysql_real_escape_string($value);
   }
   $n-$var = $value;
   }
   return $n;
   }
 
 }
 
 I call this class from another class UserAuthenicate.php:
 class UserAuthenicate {
   public function HandShake(SB $info)
   {
   require_once('CleanQueryClass.php');
   $cln = new CleanData;
   return $clean-CleanObject($info);
   }
 }
 class SB{
   var $userName;
   var $password;
   var $status;
   
 }
 
 
 When I communicate to UserAuthenicate.php with a weborb remote object
 I get an error in flex, server didnt respond (somthing like that) I
 look in charles and I see this:
 bFatal error/b:  Call to a member function CleanObject() on a
 non-object in

bC:\xampp\htdocs\weborb\Services\dnt\Authenicate\UserAuthenicate.php/b
 on line b12/bbr /
 
 Can someone tell me what I am doing wrong?  I am passong an object to
 the class method.
 
 Thanks,
 timgerr





[flexcoders] Call to a member function on a non-object

2008-10-21 Thread timgerr
Hello all, I am using weborb and getting this error but I am not sure
it is a weborb problem.  I have a class CleanQueryClass.php
class CleanData {
public function CleanObject($obj) {

$n = new stdClass;
foreach($obj as $var = $value) {
// Stripslashes
if (get_magic_quotes_gpc())
{
$value = stripslashes($value);
}
// Quote if not integer
if (!is_numeric($value) || $value[0] == '0')
{
$value = 
mysql_real_escape_string($value);
}
$n-$var = $value;
}
return $n;
}

}

I call this class from another class UserAuthenicate.php:
class UserAuthenicate {
public function HandShake(SB $info)
{
require_once('CleanQueryClass.php');
$cln = new CleanData;
return $clean-CleanObject($info);
}
}
class SB{
var $userName;
var $password;
var $status;

}


When I communicate to UserAuthenicate.php with a weborb remote object
I get an error in flex, server didnt respond (somthing like that) I
look in charles and I see this:
bFatal error/b:  Call to a member function CleanObject() on a
non-object in
bC:\xampp\htdocs\weborb\Services\dnt\Authenicate\UserAuthenicate.php/b
on line b12/bbr /

Can someone tell me what I am doing wrong?  I am passong an object to
the class method.

Thanks,
timgerr



[flexcoders] Re: More questions on weborb, creating my own services

2008-10-01 Thread timgerr
What are the 2 files TestNamesInVO.php and TestNamesOutVO.php for? 
Isn't it easier to just go to the TestService.php and get the returned
information their.  What is the functions of the 2 files.

Thanks again,

timgerr


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

 This seems to be a convoluted way to do this.
 
 I have created a simple example to show you how I use WebOrb.
 
 On my server I have the WebORB directory at the root level. In the
 Services directory I have a MyServices directory and in this directory I
 have a ValueObjects directory. For this example I have two files:
 
 =
 TestNamesInVO.php:
 ?php
 class TestNamesInVO
 {
  public $FirstName;
  public $LastName;
 
  public function __construct($FirstName, $LastName)
  {
  $this-FirstName = $FirstName;
  $this-LastName = $LastName;
  }
 }
 ?
 =
 TestNamesOutVO.php:
 ?php
 class TestNamesOutVO
 {
  public $FullName;
 
  public function __construct($FullName)
  {
  $this-FullName = $FullName;
  }
 }
 ?
 =
 
 The constructors are there just to make it easier to create a new
 object. They are optional.
 
 In the MyServices directory I have a TestService.php file. This contains
 all the functions available with this service.
 
 =
 TestService.php:
 ?php
 class TestService
 {
  function ShowMe()
  {
  return Tom Jones;
  }
 
  function ShowName($name)
  {
  return 'Hello ' . $name;
  }
 
  function ShowNames(TestNamesInVO $namesIn)
  {
  require_once(ValueObjects/TestNamesInVO.php);
  require_once(ValueObjects/TestNamesOutVO.php);
 
  $fullName = new TestNamesOutVO($namesIn-FirstName .   .
 $namesIn-LastName);
 
  return $fullName;
  }
 }
 ?
 =
 
 In flex I also have a ValueObjects folder underneath my src folder. This
 folder contains the corresponding ActionScript files for the value
 objects on the server:
 
 =
 TestNamesInVO.as:
 package ValueObjects
 {
  [RemoteClass(alias=MyServices.ValueObjects.TestNamesInVO)]
  [Bindable]
  public class TestNamesInVO
  {
  //instance variables
  private var _FirstName:String;
  private var _LastName:String;
 
  //accessor methods
  public function get FirstName():String {return _FirstName;}
  public function get LastName():String {return _LastName;}
 
  //mutator methods
  public function set FirstName(FirstName:String):void
{_FirstName
 = FirstName;}
  public function set LastName(LastName:String):void {_LastName =
 LastName;}
  } // end class
 }//end package
 =
 TestNamesOutVO.as:
 package ValueObjects
 {
  [RemoteClass(alias=MyServices.ValueObjects.TestNamesOutVO)]
  [Bindable]
  public class TestNamesOutVO
  {
  //instance variables
  private var _FullName:String;
 
  //accessor methods
  public function get FullName():String {return _FullName;}
 
  //mutator methods
  public function set FullName(FullName:String):void {_FullName =
 FullName;}
  } // end class
 }//end package
 =
 
 Note the RemoteClass metadata. This tells flex the location of the class
 on the server that matches this class (In relation to the Services
 directory).
 
 Finally we have the Flex application that makes calls to functions
 within this service.
 
 =
 WebORBExample.mxml:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  import mx.messaging.channels.AMFChannel;
  import mx.messaging.ChannelSet;
  import mx.rpc.events.FaultEvent;
  import mx.rpc.events.ResultEvent;
  import mx.rpc.remoting.RemoteObject;
  import mx.managers.CursorManager;
  import mx.controls.Alert;
  import ValueObjects.TestNamesInVO;
  import ValueObjects.TestNamesOutVO;
 
  private var channelSet:ChannelSet;
  private var amfChannel:AMFChannel;
  private var testService:RemoteObject;
 
  private function onCreationComplete():void
  {
  channelSet = new ChannelSet();
  amfChannel = new AMFChannel(my-amf

[flexcoders] Re: More questions on weborb, creating my own services

2008-10-01 Thread timgerr
OK, I did everything that was given and when I run the app I get this
error:
warning: Failed to load policy file from http://127.0.0.1/crossdomain.xml

*** Security Sandbox Violation ***
Connection to http://127.0.0.1/weborb/weborb.php halted - not
permitted from
http://localhost/weborb/WebORBExample-debug/WebORBExample.swf
Error: Request for resource at http://127.0.0.1/weborb/weborb.php by
requestor from
http://localhost/weborb/WebORBExample-debug/WebORBExample.swf is
denied due to lack of policy file permissions.

Not sure what to do here.

Thanks for the help,
timgerr




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

 This seems to be a convoluted way to do this.
 
 I have created a simple example to show you how I use WebOrb.
 
 On my server I have the WebORB directory at the root level. In the
 Services directory I have a MyServices directory and in this directory I
 have a ValueObjects directory. For this example I have two files:
 
 =
 TestNamesInVO.php:
 ?php
 class TestNamesInVO
 {
  public $FirstName;
  public $LastName;
 
  public function __construct($FirstName, $LastName)
  {
  $this-FirstName = $FirstName;
  $this-LastName = $LastName;
  }
 }
 ?
 =
 TestNamesOutVO.php:
 ?php
 class TestNamesOutVO
 {
  public $FullName;
 
  public function __construct($FullName)
  {
  $this-FullName = $FullName;
  }
 }
 ?
 =
 
 The constructors are there just to make it easier to create a new
 object. They are optional.
 
 In the MyServices directory I have a TestService.php file. This contains
 all the functions available with this service.
 
 =
 TestService.php:
 ?php
 class TestService
 {
  function ShowMe()
  {
  return Tom Jones;
  }
 
  function ShowName($name)
  {
  return 'Hello ' . $name;
  }
 
  function ShowNames(TestNamesInVO $namesIn)
  {
  require_once(ValueObjects/TestNamesInVO.php);
  require_once(ValueObjects/TestNamesOutVO.php);
 
  $fullName = new TestNamesOutVO($namesIn-FirstName .   .
 $namesIn-LastName);
 
  return $fullName;
  }
 }
 ?
 =
 
 In flex I also have a ValueObjects folder underneath my src folder. This
 folder contains the corresponding ActionScript files for the value
 objects on the server:
 
 =
 TestNamesInVO.as:
 package ValueObjects
 {
  [RemoteClass(alias=MyServices.ValueObjects.TestNamesInVO)]
  [Bindable]
  public class TestNamesInVO
  {
  //instance variables
  private var _FirstName:String;
  private var _LastName:String;
 
  //accessor methods
  public function get FirstName():String {return _FirstName;}
  public function get LastName():String {return _LastName;}
 
  //mutator methods
  public function set FirstName(FirstName:String):void
{_FirstName
 = FirstName;}
  public function set LastName(LastName:String):void {_LastName =
 LastName;}
  } // end class
 }//end package
 =
 TestNamesOutVO.as:
 package ValueObjects
 {
  [RemoteClass(alias=MyServices.ValueObjects.TestNamesOutVO)]
  [Bindable]
  public class TestNamesOutVO
  {
  //instance variables
  private var _FullName:String;
 
  //accessor methods
  public function get FullName():String {return _FullName;}
 
  //mutator methods
  public function set FullName(FullName:String):void {_FullName =
 FullName;}
  } // end class
 }//end package
 =
 
 Note the RemoteClass metadata. This tells flex the location of the class
 on the server that matches this class (In relation to the Services
 directory).
 
 Finally we have the Flex application that makes calls to functions
 within this service.
 
 =
 WebORBExample.mxml:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  import mx.messaging.channels.AMFChannel;
  import mx.messaging.ChannelSet;
  import mx.rpc.events.FaultEvent;
  import mx.rpc.events.ResultEvent;
  import mx.rpc.remoting.RemoteObject;
  import mx.managers.CursorManager;
  import mx.controls.Alert;
  import ValueObjects.TestNamesInVO

[flexcoders] Resolved Re: Have a question about Weborb

2008-09-30 Thread timgerr
I am learning, what you want to do is download Weborb and put your
browser on the root of that directory.  There is an example tab that
you will have to crate a database (with the given SLQ file).  That is
how I learned.  I have to do a writeup on what I have learned to a
group of people I will send that out when it is finished.

timgerr

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

 hi Tim
 
 I'd like to try out you've done. Is there a tutorial anywhere you 
 can recomend.
 
 regadrs
 Bod
 




[flexcoders] Resolved Re: Have a question about Weborb

2008-09-30 Thread timgerr
Mark I was looking for somthing like that last night at about 2am.  I
found somthing like that at
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23267099.html
in the guys script.

Mark, I cannot tell you how much thanks I want to give you.

Thank,
timgerr


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

 Hi Tim,
 
 Glad you figured it out. There's one minor change I would recommend:
 when you call any of the find methods, you're always getting an
 object (or a collection) back. We tried to simplify the programming
 model, however the async nature of Flex's client/server integration is
 always there. So even though you get back an object out of the find
 calls, initially that object does not have the data. When the client
 receives the data from the server, the same instance WebORB returns to
 you is updated with the data. As a result, it is recommended to make
 sure you actually got the data before you make any changes. Here's how
 you can do it:
 
 _master = ActiveRecords.Test.findByIdAndName('6','tessa');
 _master.addEventListener( loaded, gotTest );
 
 public function gotTest( evt:DynamicLoadEvent ):void
 {
   var testObj:Test = (evt.data as ArrayCollection)[0] as Test;
   testObj.Email = tessa@;
   testObj.Name = tessa;
 }
 
 Cheers,
 Mark
 
 




[flexcoders] Movable content

2008-09-30 Thread timgerr
I was wondering if there was a way to have flex content dynamically
place it's self in the center of the screen no matter what the screen
resolution is.

Here is what I mean, I have a login pane that I want to be always be
in center of the screen, can stuff dynamically move?

Thanks for the information 



[flexcoders] Re: Movable content

2008-09-30 Thread timgerr
Thanks,
That did it.

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

 verticalCenter=0 and horizontalCenter=0
 
 On Tue, Sep 30, 2008 at 10:02 AM, timgerr [EMAIL PROTECTED] wrote:
 
I was wondering if there was a way to have flex content dynamically
  place it's self in the center of the screen no matter what the screen
  resolution is.
 
  Here is what I mean, I have a login pane that I want to be always be
  in center of the screen, can stuff dynamically move?
 
  Thanks for the information
 
   
 
 
 
 
 -- 
 Brendan Meutzner
 http://www.meutzner.com/blog/





[flexcoders] More questions on weborb, creating my own services

2008-09-30 Thread timgerr
OK, so I have created this hello world service and then had WebOrb
create the code I see in the actionscript comments This:

(If using Model-View-Controller)
- Modify the constructor of the class below to accept the controller
object
- Modify response handlers to pass return values to the controller

(if not using MVC)
- Modify the constructor of the class below to accept your View object
- Modify response handlers to display the result directly in the View

I am not useing MVC so I have to use the 2nd commented option.  the
problem is I am not sure what to do, someone help me?

Here is my PHP code:
?php
class HelloWorld {
function ShowMe()
{
return Tom Jones;
}
function ShowName($name)
{
return 'Hello ' . $name;
}
}
?
So I have 2 methods, ShowMe and ShowName.

Here is my as code:
  package comp.HelloWorld
  {
  import mx.rpc.remoting.RemoteObject;
  import mx.controls.Alert;
  import mx.rpc.events.ResultEvent;
  import mx.rpc.events.FaultEvent;
  import mx.rpc.AsyncToken;
   import mx.rpc.IResponder;
  
  import comp.HelloWorld.vo.*;

  public class HelloWorld
  {
  private var remoteObject:RemoteObject;
  private var model:HelloWorldModel;

  public function HelloWorld( model:HelloWorldModel = null )
  {
  remoteObject  = new RemoteObject(GenericDestination);
  remoteObject.source = comp.HelloWorld.HelloWorld;

  remoteObject.ShowMe.addEventListener(result,ShowMeHandler);
  
remoteObject.ShowName.addEventListener(result,ShowNameHandler);
  remoteObject.addEventListener(fault, onFault);
  
   if( model == null )
  model = new HelloWorldModel();
  
  this.model = model;
  
  }

  public function setCredentials( userid:String, password:String
):void
  {
remoteObject.setCredentials( userid, password );
  }

  public function GetModel():HelloWorldModel
  {
return this.model;
  }   

  public function ShowMe(  responder:IResponder = null):void
 {
  var asyncToken:AsyncToken = remoteObject.ShowMe();
  
if( responder != null )
asyncToken.addResponder( responder );
}

  public function ShowName( name:String, responder:IResponder =
null):void
 {
  var asyncToken:AsyncToken = remoteObject.ShowName( name);
  
if( responder != null )
asyncToken.addResponder( responder );
}
  public virtual function ShowMeHandler(event:ResultEvent):void 
  {
  var returnValue:Object = event.result as Object;
  model.ShowMe = event.result as Object;
  }

  public virtual function ShowNameHandler(event:ResultEvent):void 
  {
  var returnValue:Object = event.result as Object;
  model.ShowName = event.result as Object;
  }

 public function onFault (event:FaultEvent):void
{
Alert.show(event.fault.faultString, Error);
}
  }

  }

I get an error on: import comp.HelloWorld.vo.* (not sure what this is
or how to create it)


And here is another chunck of code that I have to modify

 public virtual function ShowMeHandler(event:ResultEvent):void 
{
 var returnValue:Object = event.result as Object;
 model.ShowMe = event.result as Object;
}

public virtual function ShowNameHandler(event:ResultEvent):void 
{
 var returnValue:Object = event.result as Object;
 model.ShowName = event.result as Object;
}

I get an error:
(Severity and Description   PathResourceLocation
Creation Time   Id
1119: Access of possibly undefined property ShowMe through a reference
with static type comp.HelloWorld:HelloWorldModel.
WeborbHelloworld/src/comp/HelloWorldHelloWorld.as   line 95
1222790567712   8938) 

On these 2 lines of code:
model.ShowMe = event.result as Object;
model.ShowName = event.result as Object;

I just want to return that stuff, what do I have to do in order to fix
the errors.

Thanks,
timgerr




[flexcoders] Re: More questions on weborb, creating my own services

2008-09-30 Thread timgerr
Thanks for the reply, can you tell me what the RemoteClass metadata
looks like, this is an entry in your
weborb\Weborb\WEB-INF\flex\remoting-config.xml???

Thanks for the help, I just want to learn.

timgerr

Note the RemoteClass metadata. This tells flex the location of the
class on the server that matches this class (In relation to the
Services directory).

Finally we have the Flex application that makes calls to functions
within this service.


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

 This seems to be a convoluted way to do this.
 
 I have created a simple example to show you how I use WebOrb.
 
 On my server I have the WebORB directory at the root level. In the
 Services directory I have a MyServices directory and in this directory I
 have a ValueObjects directory. For this example I have two files:
 
 =
 TestNamesInVO.php:
 ?php
 class TestNamesInVO
 {
  public $FirstName;
  public $LastName;
 
  public function __construct($FirstName, $LastName)
  {
  $this-FirstName = $FirstName;
  $this-LastName = $LastName;
  }
 }
 ?
 =
 TestNamesOutVO.php:
 ?php
 class TestNamesOutVO
 {
  public $FullName;
 
  public function __construct($FullName)
  {
  $this-FullName = $FullName;
  }
 }
 ?
 =
 
 The constructors are there just to make it easier to create a new
 object. They are optional.
 
 In the MyServices directory I have a TestService.php file. This contains
 all the functions available with this service.
 
 =
 TestService.php:
 ?php
 class TestService
 {
  function ShowMe()
  {
  return Tom Jones;
  }
 
  function ShowName($name)
  {
  return 'Hello ' . $name;
  }
 
  function ShowNames(TestNamesInVO $namesIn)
  {
  require_once(ValueObjects/TestNamesInVO.php);
  require_once(ValueObjects/TestNamesOutVO.php);
 
  $fullName = new TestNamesOutVO($namesIn-FirstName .   .
 $namesIn-LastName);
 
  return $fullName;
  }
 }
 ?
 =
 
 In flex I also have a ValueObjects folder underneath my src folder. This
 folder contains the corresponding ActionScript files for the value
 objects on the server:
 
 =
 TestNamesInVO.as:
 package ValueObjects
 {
  [RemoteClass(alias=MyServices.ValueObjects.TestNamesInVO)]
  [Bindable]
  public class TestNamesInVO
  {
  //instance variables
  private var _FirstName:String;
  private var _LastName:String;
 
  //accessor methods
  public function get FirstName():String {return _FirstName;}
  public function get LastName():String {return _LastName;}
 
  //mutator methods
  public function set FirstName(FirstName:String):void
{_FirstName
 = FirstName;}
  public function set LastName(LastName:String):void {_LastName =
 LastName;}
  } // end class
 }//end package
 =
 TestNamesOutVO.as:
 package ValueObjects
 {
  [RemoteClass(alias=MyServices.ValueObjects.TestNamesOutVO)]
  [Bindable]
  public class TestNamesOutVO
  {
  //instance variables
  private var _FullName:String;
 
  //accessor methods
  public function get FullName():String {return _FullName;}
 
  //mutator methods
  public function set FullName(FullName:String):void {_FullName =
 FullName;}
  } // end class
 }//end package
 =
 
 Note the RemoteClass metadata. This tells flex the location of the class
 on the server that matches this class (In relation to the Services
 directory).
 
 Finally we have the Flex application that makes calls to functions
 within this service.
 
 =
 WebORBExample.mxml:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
  creationComplete=onCreationComplete()
  mx:Script
  ![CDATA[
  import mx.messaging.channels.AMFChannel;
  import mx.messaging.ChannelSet;
  import mx.rpc.events.FaultEvent;
  import mx.rpc.events.ResultEvent;
  import mx.rpc.remoting.RemoteObject;
  import mx.managers.CursorManager;
  import mx.controls.Alert;
  import ValueObjects.TestNamesInVO;
  import ValueObjects.TestNamesOutVO;
 
  private var channelSet:ChannelSet;
  private var amfChannel:AMFChannel

[flexcoders] Re: Have a question about Weborb

2008-09-29 Thread timgerr
Do I have to set that or does that come from the script generated weborb?

timgerr

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

 You do as same as you do to add, but the only diffrent is on the
server-side
 instead of INSERT INTO you should do UPDATE
 
 
 Regards
 
 
 On Sun, Sep 28, 2008 at 11:59 PM, timgerr [EMAIL PROTECTED] wrote:
 
Hello all,
  I am trying to learn Weborb and need some help on how to update a
  database record.
 
  Here is my question, I have a database table named test and the
  construction of one row is:
  id = 1
  name = Tim
  email = [EMAIL PROTECTED] tim%40tim.com
 
  Now if I wanted to return all the rows it would be
  ActiveRecord.test.findall().
 
  If I wanted to add a record it would be:
  private var t:Test = new Test();
  t.Name = 'bob';
  t.Email = '[EMAIL PROTECTED] %27bob%40bob.com';
  var asyncToken:AsyncToken = null;
  asyncToken = t.save();
 
  The problem that I have is I dont understand how to update a record,
  take my row 1
  id = 1
  name = Tim
  email = [EMAIL PROTECTED] tim%40tim.com
 
  How can I change that row to somting like this
  id = 1
  name = Timmy
  email = [EMAIL PROTECTED] timmy%40timmy.com
 
  Can some one show me the code?
 
  Thanks for the help,
  timgerr
 
   
 
 
 
 
 -- 
 
 Igor Costa
 www.igorcosta.com
 www.igorcosta.org





[flexcoders] Re: Have a question about Weborb

2008-09-29 Thread timgerr
Thanks for the help Igor.  I am not sure what you mean.  I see in the
documentation that save is insert or update information:

save()  method   
public function save(cascade:Boolean = true, responder:Responder =
null):AsyncToken

Saves new or updates existing ActiveRecord. The method sends a request
to the remote data source. New ActiveRecord instance is added to the
data store, existing record is updated with all the new values in the
record properties. Calling save() on an instance of ActiveRecord is
equivalent to calling save() on the data mapper associated with this
ActiveRecord.
Parameters
cascade:Boolean (default = true) — indicates if the save operation
should do deep traversal over all related records. If true, save
performs deep traversal, otherwise, only direct properties of the
ActiveRecord are saved in the data store.
 
responder:Responder (default = null) — a responder object to receive
success/failure callbacks when the save operation is complete.

Returns
AsyncToken — AsyncToken returned from the underlying remote invocation 

I am not sure how to set this up for an update.  When doing a SQL
update I do somting like:
Update some_table 
set This = That 
where id = #

How do I specify what table to update when invoking the save() method
in flex?

Thanks for the help, 
timgerr

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

 I guess there's something on the code. take look at the sql instrict
methods
 to see if there's something like UPDATE
 
 Regards
 Igor
 




[flexcoders] Re: Have a question about Weborb

2008-09-29 Thread timgerr
Mark, Thanks for the reply, I am getting closer to learning how to do
an update.

I am good at looking at code so here is what I am doing.  I want to
call a database row using findby and ad that information into an array
collection:
private var _master:ArrayCollection = new ArrayCollection(); 
_master = ActiveRecords.Test.findByIdAndName('6','tessa').isLoaded;

so now master[0] has Id, Email, Name
so if I wanted to change the email from [EMAIL PROTECTED] to
[EMAIL PROTECTED], I do this?

private var uDate:Test = new Test();
uDate.Name = 'tessa';
uDate.Id   = '6';
udate.Email = '[EMAIL PROTECTED]';

var asyncToken:AsyncToken = null;
asyncToken = uDate.save();

How does webord know the difference between an updated and new record?

Thanks for the help,
timgerr



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

 Hi Tim,
 
 For any instance of Active Record on the client side you can change
 the properties and then call save() on that instance. It will update
 the record in the database and also issue client synchronization event
 so other clients that have the same record would be updated. Instances
 of active record are loaded with any of the findXXX methods.
 
 Hope this helps.
 
 Mark
 




[flexcoders] Re: Have a question about Weborb

2008-09-29 Thread timgerr
Let me make this a little more clear:
I am good at looking at code so here is what I am doing.  I want to
call a database row using findby and ad that information into an array
collection:
private var _master:ArrayCollection = new ArrayCollection(); 
_master = ActiveRecords.Test.findByIdAndName('6','tessa');

so now master[0] has Id, Email, Name
 so if I wanted to change the name from tessa to
tess, not sure what to do.

Thanks for the read.
timgerr


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

 Mark, Thanks for the reply, I am getting closer to learning how to do
 an update.
 
 I am good at looking at code so here is what I am doing.  I want to
 call a database row using findby and ad that information into an array
 collection:
 private var _master:ArrayCollection = new ArrayCollection(); 
 _master = ActiveRecords.Test.findByIdAndName('6','tessa');
 
 so now master[0] has Id, Email, Name
 so if I wanted to change the email from [EMAIL PROTECTED] to
 [EMAIL PROTECTED], I do this?
 
 private var uDate:Test = new Test();
 uDate.Name = 'tessa';
 uDate.Id   = '6';
 udate.Email = '[EMAIL PROTECTED]';
 
 var asyncToken:AsyncToken = null;
 asyncToken = uDate.save();
 
 How does webord know the difference between an updated and new record?
 
 Thanks for the help,
 timgerr
 
 
 
 --- In flexcoders@yahoogroups.com, Mark Piller mark@ wrote:
 
  Hi Tim,
  
  For any instance of Active Record on the client side you can change
  the properties and then call save() on that instance. It will update
  the record in the database and also issue client synchronization event
  so other clients that have the same record would be updated. Instances
  of active record are loaded with any of the findXXX methods.
  
  Hope this helps.
  
  Mark
 





[flexcoders] Resolved Re: Have a question about Weborb

2008-09-29 Thread timgerr
OK, I found out how to do this.  When updating a row I have to specify
the row id, I think that is all. That is how I got it to work.

So if I have this 
_master = ActiveRecords.Test.findByIdAndName('6','tessa');
_master[0].Email = [EMAIL PROTECTED];
_master[0].Name = tessa;
_master[0].Id = 6;


I then create the test method (I think that is what you call it)
var i:Test = new Test();
i.Name = Tess;
i.Email = [EMAIL PROTECTED];
i.Id = 6;
var asyncToken:AsyncToken = null;
asyncToken = i.save();
asyncToken.addResponder(new mx.rpc.Responder (OnCreated,OnFault));

That is it, that is how I got it to work.  Man this Weborb rocks.  I
have a few other questions that I will be posting



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

 Let me make this a little more clear:
 I am good at looking at code so here is what I am doing.  I want to
 call a database row using findby and ad that information into an array
 collection:
 private var _master:ArrayCollection = new ArrayCollection(); 
 _master = ActiveRecords.Test.findByIdAndName('6','tessa');
 
 so now master[0] has Id, Email, Name
  so if I wanted to change the name from tessa to
 tess, not sure what to do.
 
 Thanks for the read.
 timgerr
 
 
 --- In flexcoders@yahoogroups.com, timgerr tim.gallagher@ wrote:
 
  Mark, Thanks for the reply, I am getting closer to learning how to do
  an update.
  
  I am good at looking at code so here is what I am doing.  I want to
  call a database row using findby and ad that information into an array
  collection:
  private var _master:ArrayCollection = new ArrayCollection(); 
  _master = ActiveRecords.Test.findByIdAndName('6','tessa');
  
  so now master[0] has Id, Email, Name
  so if I wanted to change the email from tsa@ to
  tsa@, I do this?
  
  private var uDate:Test = new Test();
  uDate.Name = 'tessa';
  uDate.Id   = '6';
  udate.Email = 'tesa@';
  
  var asyncToken:AsyncToken = null;
  asyncToken = uDate.save();
  
  How does webord know the difference between an updated and new record?
  
  Thanks for the help,
  timgerr
  
  
  
  --- In flexcoders@yahoogroups.com, Mark Piller mark@ wrote:
  
   Hi Tim,
   
   For any instance of Active Record on the client side you can change
   the properties and then call save() on that instance. It will update
   the record in the database and also issue client synchronization
event
   so other clients that have the same record would be updated.
Instances
   of active record are loaded with any of the findXXX methods.
   
   Hope this helps.
   
   Mark
  
 





[flexcoders] Have a question about Weborb

2008-09-28 Thread timgerr
Hello all,
I am trying to learn Weborb and need some help on how to update a
database record.

Here is my question, I have a database table named test and the
construction of one row is:
id = 1
name = Tim
email = [EMAIL PROTECTED]

Now if I wanted to return all the rows it would be
ActiveRecord.test.findall().

If I wanted to add a record it would be:
private var t:Test = new Test();
t.Name = 'bob';
t.Email = '[EMAIL PROTECTED]';
var asyncToken:AsyncToken = null;
asyncToken = t.save();

The problem that I have is I dont understand how to update a record,
take my row 1
id = 1
name = Tim
email = [EMAIL PROTECTED]

How can I change that row to somting like this
id = 1
name = Timmy
email = [EMAIL PROTECTED]

Can some one show me the code?

Thanks for the help,
timgerr




[flexcoders] Re: Have a question about Weborb

2008-09-28 Thread timgerr
Can changes to the active record only be done on the datastore?

Thanks,
timgerr

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

 Hello all,
 I am trying to learn Weborb and need some help on how to update a
 database record.
 
 Here is my question, I have a database table named test and the
 construction of one row is:
 id = 1
 name = Tim
 email = [EMAIL PROTECTED]
 
 Now if I wanted to return all the rows it would be
 ActiveRecord.test.findall().
 
 If I wanted to add a record it would be:
 private var t:Test = new Test();
 t.Name = 'bob';
 t.Email = '[EMAIL PROTECTED]';
 var asyncToken:AsyncToken = null;
 asyncToken = t.save();
 
 The problem that I have is I dont understand how to update a record,
 take my row 1
 id = 1
 name = Tim
 email = [EMAIL PROTECTED]
 
 How can I change that row to somting like this
 id = 1
 name = Timmy
 email = [EMAIL PROTECTED]
 
 Can some one show me the code?
 
 Thanks for the help,
 timgerr





[flexcoders] Re: Learning Flex and AMFPHP

2008-09-25 Thread timgerr
Thanks for the responce, where did you get
GlobalSettings.AMFPHP_GATEWAY?  What do I have to import in order to
use it?
Thanks,
timgerr

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

 It is hard to find. Here is a snippet from my code. Hope it helps!
 public function loadFavorites( resultHandler:Function,
 errorHandler:Function, zone:String ): void {
 trace('FavoritesProxy.loadFavorites');
 var dataService:RemoteObject = new RemoteObject();
 var channel:Channel = new AMFChannel( 'amfphp',
 GlobalSettings.AMFPHP_GATEWAY );
 var channelSet:ChannelSet = new ChannelSet();
  channelSet.addChannel(channel);
  dataService.channelSet = channelSet;
 dataService.destination = amfphp;
 dataService.source = FavoritesProxy;
 dataService.loadFavorites.addEventListener( ResultEvent.RESULT,
 resultHandler );
 dataService.addEventListener(FaultEvent.FAULT, errorHandler);
 dataService.loadFavorites( myUser.userID, myUser.userHash, zone );
 }
 
 This calls FavoritesProxy-loadFavorites in the amfphp services.
 
 Best Regards,
 ~Aaron
 
 On Wed, Sep 24, 2008 at 9:52 PM, timgerr [EMAIL PROTECTED] wrote:
 
Hello all, hope you all are doing good. I have a question on how to
  build the Flex RemoteObject method in action script. I am having
  troubles doing this. Here is my RemoteObject:
 
  mx:RemoteObject id=myservice fault=faultHandler(event)
  showBusyCursor=true source=tutorials.HelloWorld
destination=amfphp
  mx:method name=sayHello result=resultHandler(event) /
  /mx:RemoteObject
 
  Can someone take the above code and do it in acitonscript? It is not
  that I want someone to do my work, I am having a hard time finding
  data to do this. Most examples are in Flash and for some reason they
  do not work right in Flex.
 
  Thanks for all the help,
  timgerr
 
   
 
 
 
 
 -- 
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com





[flexcoders] Still working on learning AMFPHP

2008-09-25 Thread timgerr
Here is a Flex question that I have,
If I do this code:
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:RemoteObject id=myservice fault=faultHandler(event)
showBusyCursor=true source=tutorials.HelloWorld destination=amfphp
mx:method name=sayHello result=resultHandler(event) /
/mx:RemoteObject

All works fine, but if a add a variable to the mx:method name like this
private var _somthing:string = sayHello;
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:RemoteObject id=myservice fault=faultHandler(event)
showBusyCursor=true source=tutorials.HelloWorld destination=amfphp
mx:method name={_somthing} result=resultHandler(event) /
/mx:RemoteObject

I get an error for this mx:method name={_somthing}

How can I have mx:method name= be a variable?

thanks for the help,
timgerr



[flexcoders] Learning Flex and AMFPHP

2008-09-24 Thread timgerr
Hello all, hope you all are doing good.  I have a question on how to
build the Flex RemoteObject method in action script.  I am having
troubles doing this.  Here is my RemoteObject:

mx:RemoteObject id=myservice fault=faultHandler(event)
showBusyCursor=true source=tutorials.HelloWorld destination=amfphp
mx:method name=sayHello result=resultHandler(event) /
/mx:RemoteObject


Can someone take the above code and do it in acitonscript?  It is not
that I want someone to do my work, I am having a hard time finding
data to do this.  Most examples are in Flash and for some reason they
do not work right in Flex.  

Thanks for all the help,
timgerr



[flexcoders] Flex, BlazeDS, AMFPHP, LiveCycle Data Services

2008-09-18 Thread timgerr
Hello All,
I have to pick your brains on ways to connect to my back end.  Right
now I send data from flex via HTTPServices request to PHP and then PHP
will return data via JSON.  The reason why I do that is becuause I
come from using Java Script and Dojo. I have been working with flex
for many months and that is the way my front end (Flex) connects to
the back end (PHP). 

I have been been reading about 3 new thing (to me that is) and have a
few questions about them.  

1. I know that BlazeDS and LiveCycle Data Services are sort of the
same thing, what are the differences?  Is anyone using them and do you
have to be a Java guru to use it?  I know PHP well, but I can learn
Java if needed.

2. Is AMFPHP a good tool to communicate to my backed?  How hard is it
to learn?  What are the benefits of using it?

3.  What is better for future Flex/Air development?  I am creating a
web app that a user has to authenticate to, session information has to
be kept and that sort of stuff.  

I am asking the community what they think is the best way for Flex/Air
to talk to the back end.

I am running Centos 5, MYSql on Apache.

Thanks for the help,
timgerr





[flexcoders] Re: Flex, BlazeDS, AMFPHP, LiveCycle Data Services

2008-09-18 Thread timgerr
Anyone useing Red5 for communication with Flex?

Thanks,
timgerr

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

 Hello All,
 I have to pick your brains on ways to connect to my back end.  Right
 now I send data from flex via HTTPServices request to PHP and then PHP
 will return data via JSON.  The reason why I do that is becuause I
 come from using Java Script and Dojo. I have been working with flex
 for many months and that is the way my front end (Flex) connects to
 the back end (PHP). 
 
 I have been been reading about 3 new thing (to me that is) and have a
 few questions about them.  
 
 1. I know that BlazeDS and LiveCycle Data Services are sort of the
 same thing, what are the differences?  Is anyone using them and do you
 have to be a Java guru to use it?  I know PHP well, but I can learn
 Java if needed.
 
 2. Is AMFPHP a good tool to communicate to my backed?  How hard is it
 to learn?  What are the benefits of using it?
 
 3.  What is better for future Flex/Air development?  I am creating a
 web app that a user has to authenticate to, session information has to
 be kept and that sort of stuff.  
 
 I am asking the community what they think is the best way for Flex/Air
 to talk to the back end.
 
 I am running Centos 5, MYSql on Apache.
 
 Thanks for the help,
 timgerr





[flexcoders] Differences between AIR html and Flex

2008-09-12 Thread timgerr
Hello all, 
I have been programming in flex for about 6 months now and A friend
just showed me something cool.  He was able to run an AIR app locally
and within a web page.

Can I create Air apps that run on both HTML web pages and locally???

Thanks for the help,
Timgerr



[flexcoders] Re: Question about launching a form from a MXML component.

2008-09-10 Thread timgerr
Thanks, I forgot, I'm a silly little boy :).

Tim 

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

 addChild(FRM)
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of timgerr
 Sent: Tuesday, September 09, 2008 9:30 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Question about launching a form from a MXML
component.
 
 
 Hello all,
 I have this MXML component called users.mxml, here is what it looks
like:
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=366
 height=208
 mx:Form id=nuNewUserForm x=36 height=198
 mx:FormItem label=User Name required=true
 mx:TextInput id=username toolTip=Less than 16 characters
 invalid=IsValid('username',false) valid=IsValid('username',true)/
 /mx:FormItem
 mx:FormItem label=First Name required=true
 mx:TextInput id=firstname maxChars=25 toolTip=Less than 25
 characters
 invalid=IsValid('fistname',false) valid=IsValid('fistname',true)/
 /mx:FormItem
 mx:FormItem label=Last Name required=true
 mx:TextInput id=lastname maxChars=25 toolTip=Less than 25
 characters
 invalid=IsValid('lastname',false) valid=IsValid('lastname',true)/
 /mx:FormItem
 mx:FormItem label=Email required=true
 mx:TextInput id=email maxChars=100 toolTip=Less than 100
 characters
 invalid=IsValid('email',false) valid=IsValid('email',true)/
 /mx:FormItem
 mx:Label id=NewUserDateLabel text={newUserDate}/
 mx:Button id=NewUserSubmit enabled=true label=Submit
 click=Submit()/
 /mx:Form
 /mx:Canvas
 
 I then want to add it to Master.MXML
 so I do this :
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=MasterInit()
 mx:Script
 ![CDATA[
 
 import comp.users.*;
 private function MasterInit():void
 {
 var FRM:Users= new Users();
 
 ]]
 /mx:Script
 
 /mx:Application
 
 Once the MasterInit() is called, what do I have to do in order to get
 the form from Usersto show?
 
 Thanks,
 Timgerr





[flexcoders] Question about launching a form from a MXML component.

2008-09-09 Thread timgerr
Hello all,
I have this MXML component called users.mxml, here is what it looks like:
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=366
height=208
mx:Form id=nuNewUserForm x=36 height=198
mx:FormItem label=User Name required=true
mx:TextInput id=username toolTip=Less than 16 characters 
invalid=IsValid('username',false) 
valid=IsValid('username',true)/
/mx:FormItem
mx:FormItem label=First Name required=true
mx:TextInput id=firstname maxChars=25 toolTip=Less than 25
characters 
invalid=IsValid('fistname',false) 
valid=IsValid('fistname',true)/
/mx:FormItem
mx:FormItem label=Last Name required=true
mx:TextInput id=lastname  maxChars=25 toolTip=Less than 25
characters
invalid=IsValid('lastname',false) 
valid=IsValid('lastname',true)/
/mx:FormItem
mx:FormItem label=Email required=true
mx:TextInput id=email maxChars=100 toolTip=Less than 100
characters
invalid=IsValid('email',false) 
valid=IsValid('email',true)/
/mx:FormItem
mx:Label id=NewUserDateLabel text={newUserDate}/
mx:Button id=NewUserSubmit enabled=true label=Submit
click=Submit()/
/mx:Form
/mx:Canvas

I then want to add it to Master.MXML
so I do this :

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=MasterInit()
 mx:Script
![CDATA[
  
import comp.users.*;
private function MasterInit():void
{
var FRM:Users= new Users();

   ]]
 /mx:Script

/mx:Application


Once the MasterInit() is called, what do I have to do in order to get
the form from Usersto show?

Thanks,
Timgerr



  1   2   >