Re: [flexcoders] Newbie Question: Library Path for Using a 3rd-party utility

2011-08-07 Thread dorkie dork from dorktown
Hi Tac,

First setup your library project. Then go back to your original project and
go into Properties  Flex Build Path and click Add Project. A dialog will
display available library projects for you to choose. Select your new
library and click OK. The workspace will rebuild if it doesn't click Project
 Clean. From now on your original project will be able to access classes in
your library project. Note you may need to open the library project when
working in your main project.

On Sun, Aug 7, 2011 at 6:59 AM, tacman1123 tac...@gmail.com wrote:

 **


 I'm new to Flex, I've been reading the Adobe Training from the Source book,
 but am stuck on a simple setup question.

 I want to integrate SQLite, and figured I'd use probinson's sqlite
 utilities (https://github.com/probertson/air-sqlite) to manage the
 connections.

 My question is where do I download this set of utilities so that I can
 incorporate them into other projects? I'm modifying the test application
 FlexGrocer to store the inventory locally rather than via the web, but I
 don't want to copy the files into the FlexGrocer/src directory, but probably
 somewhere else that can be more easily used by other projects.

 I suspect there's a path I need to set somewhere for where to look for the
 libraries, and then I can just use

 import com.probertson.data.QueuedStatement;
 import com.probertson.data.SQLRunner;

 In the Project Properties, there's an option for adding a source path --
 should I use that? Or import the swc file that's available from git? If I do
 this, how can I then apply these settings to my project, is that something I
 need to do manually each time I set up a new project?

 Thanks, sorry for such basic questions!

 Tac

  



Re: [flexcoders] Newbie Question: Library Path for Using a 3rd-party utility

2011-08-07 Thread dorkie dork from dorktown
BTW Welcome to Flex! :)

On Sun, Aug 7, 2011 at 6:59 AM, tacman1123 tac...@gmail.com wrote:

 **


 I'm new to Flex, I've been reading the Adobe Training from the Source book,
 but am stuck on a simple setup question.

 I want to integrate SQLite, and figured I'd use probinson's sqlite
 utilities (https://github.com/probertson/air-sqlite) to manage the
 connections.

 My question is where do I download this set of utilities so that I can
 incorporate them into other projects? I'm modifying the test application
 FlexGrocer to store the inventory locally rather than via the web, but I
 don't want to copy the files into the FlexGrocer/src directory, but probably
 somewhere else that can be more easily used by other projects.

 I suspect there's a path I need to set somewhere for where to look for the
 libraries, and then I can just use

 import com.probertson.data.QueuedStatement;
 import com.probertson.data.SQLRunner;

 In the Project Properties, there's an option for adding a source path --
 should I use that? Or import the swc file that's available from git? If I do
 this, how can I then apply these settings to my project, is that something I
 need to do manually each time I set up a new project?

 Thanks, sorry for such basic questions!

 Tac

  



Re: [flexcoders] newbie question : putting a semicolon in a mxml property

2009-07-12 Thread Sam Lai
Not if there is just a single line of script within the quotation
marks. If you wanted to do something like this though,

mx:Button label=some label click=t1.text = t2.text;
doSomethingElse(); t3.visible = false; /

Then you do need the semi-colons. Most people just have the semi-colon
there out of habit from when they write AS in .as files or within the
mx:Script tags (they are needed in those cases).

2009/7/12 ew6014 ew6...@yahoo.com:
 hi guys

 i was reading the flex documentation and i noticed a ; inside a mxml property

 let me give you an example

 mx:Button label=some label click=t1.text = t2.text; /

 ive tried removing the semicolon ;  and also tried leaving it there and there 
 was no error of any kind.

 so im just wondering if this will cause issues or is something going on that 
 i do not know

 thank you guys in advance



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






Re: [flexcoders] Newbie questions

2009-06-04 Thread Pedro Sena
Take a look at data binding

http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_1.html

Regards,

PS

On Thu, Jun 4, 2009 at 6:33 PM, markfu...@rocketmail.com 
markfu...@rocketmail.com wrote:



 I have been trying to wrap my head around flex/actionscript for several
 weeks now...I'm a little slow. I'm using Coldfusion as an application server
 with Flash Remoting.

 So far, I've been able to get info from the database to a datagrid and
 after pulling several hundred hairs out of my head, figured out how to get a
 new record into the database from flex...with one small caveat...in the code
 below, I cannot un-comment the last line
 (//dataEstimateFixedItem.PricePerUnit = PricePerUnit.text;)as it causes an
 error...trying to put text into a numeric field (the value is a number)...Do
 I have to cast it as a number or something?

 private function addEditItemInsertHandler():void
 {
 var dataEstimateFixedItem:EstimatesFixedItems = new EstimatesFixedItems();



 dataEstimateFixedItem.ConstructionPhase =
 ConstructionPh.selectedItem.ConstructionPhaseId;
 dataEstimateFixedItem.JobEstimateType =
 JobEstimateType.selectedItem.JobTypeId;
 dataEstimateFixedItem.ItemType = ItemType.selectedItem.ItemTypeId;
 dataEstimateFixedItem.DefaultUnitType =
 DefaultUnitType.selectedItem.DefaultUnitTypeId;
 dataEstimateFixedItem.ItemName = ItemName.text;
 dataEstimateFixedItem.ItemDescription= ItemDescription.text;

 //dataEstimateFixedItem.PricePerUnit = PricePerUnit.text;


 EstimatesFixedItemsGateway.save(dataEstimateFixedItem);
 AddForm.height = 5;


 }

 uh...the code looks a little butt ugly...is there a better way to attach
 code?

 Thanks,

 Mark Fuqua

  




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


RE: [flexcoders] Newbie Question - databinding an arrayCollection to a List Control

2009-05-25 Thread Tracy Spratt
When you set a property of a dataProvider item directly, like:

absentee.selectedItem.status = absent;

the events to update the UI are not dispatched.

 

You can either use the collection API, like setItemAt(), or call
itemUpdated().

absentee.selectedItem.status = absent;

absentee..dataProvider.updateItem(absentee.selectedItem);

 

 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of hoytlee2000
Sent: Sunday, May 24, 2009 4:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Question - databinding an arrayCollection to a
List Control

 






Hello,

I've been reading a lot of information on databinding and I'm still a little
confused on how to execute it and when is it necessary.

I have a simple list control of names that I create by adding to an array
collection that I use as the List's dataprovider. when I add a name to the
array the list updates automatically as I would suspect

I also have associated with the names is a status attribute (absent or
present) that I use to determine which icon to display next to the name
using IconFunction property of the List control. I have a contextual menu
bound to the list control that allows the user to right click on a name to
change the status and thus the icon.

This is where I have the problem and can't figure out what to do. The
contextual menu works in that the status will change in the arraycollection
(i check and see that it does) however I can't get the iconFunction to
reevaluate the new value to display the proper icon.

I've read in many postings or similar examples on line that I have to create
an event listener and an event for the collection change event. This is
where I am a little fuzzy in the execution - assuming this is teh correct
solution. I've also peripherally read about setter and getter functions but
I don't even know where to begin with this aspect.

I would appreciate any help with this. here is what I have in terms of code:

for my List Control:

mx:List id=absentee dataProvider={absentItems} labelField=name
iconFunction={myIconFunction} contextMenu={cm}/

for my arrayCollection:

[Bindable]
public var absentItems:ArrayCollection = new ArrayCollection();

I add to the arrayCollection:

private function addAbsentee():void {
var tmp:Object = new Object();
tmp = ({name:ac.selectedItem.name, status:absent});
absentItems.addItem(tmp);
}

my iconFunction is just a switch statement that changes icons based on the
text value of status (either absent or present)

private function myIconFunction(item:Object):Class {
var value:String = item.status.toString();
switch(value) {
case absent:
return Aicon;
break;
case vacation:
return Vicon;
break;
case late:
return Licon;
break; 
}
return null;
}

the contextual menu functions just changes the status for example:

private function makeAbsent(evt:ContextMenuEvent):void {
absentee.selectedItem.status = absent;
}

1. I don't understand why the list updates when I update the arraycollection
with new items but not when I change a specific property of an array.

2. If I add and event do I add it to the arraycollection and the listener to
the List control, or is it vice-versa. Also what is the function/method that
I add to make the list control update the draw on the icon.

3. Is there a better way to do this, ie., use an xml format instead of a an
arraycollection? Is there an article with examples that is really clear
about explaining all this. I am confused as to some things I've read that
says xmlcollections and arraycollections are not good choices for
databinding.

Thanks!

be well,
hoyt





RE: [flexcoders] Newbie question: Custom Components and Custom Events

2009-05-04 Thread Tracy Spratt
Did you import UserEvents?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alan Rother
Sent: Monday, May 04, 2009 6:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie question: Custom Components and Custom Events

 






Hey All,

 

I'm playing around with a super simple demo Simeon Bateman posted on his
blog (http://blog.
http://blog.simb.net/2009/05/01/flex-101-back-to-the-basics/
simb.net/2009/05/01/flex-101-back-to-the-basics/)

 

It's just a little tool designed to teach basic MVC / OO principles to newbs
like me. I've get what it's doing and why it works, now I'm trying to extend
on it.

 

 

I'm trying to take this custom component and instead of displaying it in the
main app, open it in a pop up window.

 

view:UserForm userSubmit=onSubmit(event)/

 

 

 I can get it to do that just fine, but I cannot get the custom event
registered with the addEventListener. I get the following error message:


1119: Access of possibly undefined property USER_SUBMIT through a reference
with static type Class.

 

 

 

Any thoughts? It works properly when I use it as is in MXML form, but not
when I try to create the object using AS.

 

 

private function openWindow():void {

win =
view.UserForm(PopUpManager.createPopUp(this, UserForm, false));

 
PopUpManager.centerPopUp(win);

 
win.addEventListener(UserEvents.USER_SUBMIT, onSubmit);

}


-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org





Re: [flexcoders] Newbie question: Custom Components and Custom Events

2009-05-04 Thread Alan Rother
Did you import UserEvents?

Yep...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
xmlns:local=* xmlns:view=view.*
mx:Script
![CDATA[
import view.UserForm;
import events.UserEvents;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.managers.PopUpManager;
 [Bindable]
private var users:ArrayCollection = new ArrayCollection();
 private var win:UserForm = new UserForm();
 private function onSubmit(event:UserEvents):void {
users.addItem(event.user);
}
 private function openWindow():void {
win = view.UserForm(PopUpManager.createPopUp(this, UserForm, false));
PopUpManager.centerPopUp(win);
win.addEventListener(UserEvents.USER_SUBMIT, onSubmit);
}
]]
/mx:Script
mx:DataGrid dataProvider={users}/
view:UserForm userSubmit=onSubmit(event)/
mx:Button label=click me click=openWindow()/
/mx:Application


-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


Re: [flexcoders] Newbie question: Custom Components and Custom Events

2009-05-04 Thread Sam Lai
Looks like the USER_SUBMIT variable or constant in your UserEvents
class is not static, but you're accessing it in a static way.

They should be static, so add they keyword static before the var
keyword when you declare USER_SUBMIT and it should all work.

On 5/5/09, Alan Rother alan.rot...@gmail.com wrote:
 Hey All,
 I'm playing around with a super simple demo Simeon Bateman posted on his
 blog
 (http://blog.simb.net/2009/05/01/flex-101-back-to-the-basics/)http://blog.simb.net/2009/05/01/flex-101-back-to-the-basics/

 It's just a little tool designed to teach basic MVC / OO principles to newbs
 like me. I've get what it's doing and why it works, now I'm trying to extend
 on it.


 I'm trying to take this custom component and instead of displaying it in the
 main app, open it in a pop up window.

 view:UserForm userSubmit=onSubmit(event)/


  I can get it to do that just fine, but I cannot get the custom event
 registered with the addEventListener. I get the following error message:

 1119: Access of possibly undefined property USER_SUBMIT through a reference
 with static type Class.



 Any thoughts? It works properly when I use it as is in MXML form, but not
 when I try to create the object using AS.


 private function openWindow():void {
 win = view.UserForm(PopUpManager.createPopUp(this, UserForm, false));
 PopUpManager.centerPopUp(win);
 win.addEventListener(UserEvents.USER_SUBMIT, onSubmit);
 }

 --
 Alan Rother
 Adobe Certified Advanced ColdFusion MX 7 Developer
 Manager, Phoenix Cold Fusion User Group, AZCFUG.org


-- 
Sent from my mobile device


RE: [flexcoders] Newbie question: Custom Components and Custom Events

2009-05-04 Thread Tracy Spratt
Yes, as Sam says.

 

Also, you could look in the UserEvents code to see what the value of that
constant is and use that string.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Sam Lai
Sent: Monday, May 04, 2009 7:11 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie question: Custom Components and Custom
Events

 






Looks like the USER_SUBMIT variable or constant in your UserEvents
class is not static, but you're accessing it in a static way.

They should be static, so add they keyword static before the var
keyword when you declare USER_SUBMIT and it should all work.

On 5/5/09, Alan Rother alan.rother@ mailto:alan.rother%40gmail.com
gmail.com wrote:
 Hey All,
 I'm playing around with a super simple demo Simeon Bateman posted on his
 blog
 (http://blog.
http://blog.simb.net/2009/05/01/flex-101-back-to-the-basics/
simb.net/2009/05/01/flex-101-back-to-the-basics/)http://blog.
http://blog.simb.net/2009/05/01/flex-101-back-to-the-basics/
simb.net/2009/05/01/flex-101-back-to-the-basics/

 It's just a little tool designed to teach basic MVC / OO principles to
newbs
 like me. I've get what it's doing and why it works, now I'm trying to
extend
 on it.


 I'm trying to take this custom component and instead of displaying it in
the
 main app, open it in a pop up window.

 view:UserForm userSubmit=onSubmit(event)/


 I can get it to do that just fine, but I cannot get the custom event
 registered with the addEventListener. I get the following error message:

 1119: Access of possibly undefined property USER_SUBMIT through a
reference
 with static type Class.



 Any thoughts? It works properly when I use it as is in MXML form, but not
 when I try to create the object using AS.


 private function openWindow():void {
 win = view.UserForm(PopUpManager.createPopUp(this, UserForm, false));
 PopUpManager.centerPopUp(win);
 win.addEventListener(UserEvents.USER_SUBMIT, onSubmit);
 }

 --
 Alan Rother
 Adobe Certified Advanced ColdFusion MX 7 Developer
 Manager, Phoenix Cold Fusion User Group, AZCFUG.org


-- 
Sent from my mobile device





Re: [flexcoders] Newbie question: Custom Components and Custom Events

2009-05-04 Thread Alan Rother
This is the entire UserEvents class as the example showed me how to build
it. I'm guessing that the declaration for my event is supposed to be in
here, but in the demo we actually created it in the component we were
loading. How and where do I add it to the UserEvents class and why does it
work when I call it from MXML but not from AS?
//File: UserEvents.as
package events
{
import flash.events.Event;
import vo.User;

public class UserEvents extends Event
{
public var user:User;
 public function UserEvents(type:String, bubbles:Boolean=false,
cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}
 }
}


//Script Code from Component
mx:Metadata
[Event(name=userSubmit, type=events.UserEvents)]
/mx:Metadata
mx:Script
![CDATA[
import vo.User;
import events.UserEvents;
import mx.managers.PopUpManager;
 private function onClick():void {
var event:UserEvents = new UserEvents(userSubmit);
var user:User = new User();
user.fname = fname.text;
user.lname = lname.text;
user.email = email.text;
event.user = user;
dispatchEvent(event);
}
]]
/mx:Script

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


RE: [flexcoders] Newbie question: Custom Components and Custom Events

2009-05-04 Thread Tracy Spratt
This metadata makes it available in mxml:

[Event(name=userSubmit, type=events.UserEvents)]

 

But the syntax UserEvents.USER_SUBMIT requires a contant in that class:

public class UserEvents extends Event

{

  public static const USER_SUBMIT:String = userSubmit;

 

Using a constant like that just ensures you won't misspell userSubmit.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alan Rother
Sent: Monday, May 04, 2009 8:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie question: Custom Components and Custom
Events

 






This is the entire UserEvents class as the example showed me how to build
it. I'm guessing that the declaration for my event is supposed to be in
here, but in the demo we actually created it in the component we were
loading. How and where do I add it to the UserEvents class and why does it
work when I call it from MXML but not from AS?

 

//File: UserEvents.as

package events

{

import flash.events.Event;  

import vo.User;

 

public class UserEvents extends Event

{

public var user:User;



public function UserEvents(type:String,
bubbles:Boolean=false, cancelable:Boolean=false)

{

super(type, bubbles, cancelable);

}



}

}

 

 

//Script Code from Component

mx:Metadata

[Event(name=userSubmit, type=events.UserEvents)]

/mx:Metadata

mx:Script

![CDATA[

import vo.User;

import events.UserEvents;

import mx.managers.PopUpManager;



private function onClick():void {

var event:UserEvents = new
UserEvents(userSubmit);

var user:User = new User();

user.fname = fname.text;

user.lname = lname.text;

user.email = email.text;

event.user = user;

dispatchEvent(event);

}

]]

/mx:Script


-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org





RE: [flexcoders] Newbie SOA question (maintaining login state)

2009-04-08 Thread Michael Pengi

I'd be interested in hearing more about this. Isn't there a 'normal' way to
do this with flex? Maintaining login state would seem to be a basic
requirement for web apps. Just curious.


Tracy Spratt wrote:
 
 I have a lot to learn about security, and had difficulty wading through
 all
 of the levels and options, so I devised my own programmatic solution.
 
 When a user logs in from the Flex app (md5 hash on the password), I create
 a
 sessionId, store it in a hashtable in the .net app, and pass it back to
 the
 Flex app.  The Flex app sends this token with each call.  The server
 checks
 the passed in session id and compares the timestamp to the current time. 
 If
 it is within the timeout period specified, it updates the timestamp and
 authorizes the call.  If authorization fails, the user must log in again.
 
 I am certainly open to a better approach.
 
 Tracy Spratt,
 
 Lariat Services, development services available
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of variableop
 Sent: Friday, April 03, 2009 4:07 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Newbie SOA question
 
  
 
 I would like to provide a solution to maintaining login state over
 multiple
 calls to my .NET web service layer. So basically, the user logs in, then
 stores a login token internally on the Flex side so that each web
 service
 call can be authenticated as being made by someone who has already logged
 in to the system. Does anyone have any ideas on how to approach this? My
 initial approach was to cache the user's username/password and
 authenticate
 on each web service call (Direct Authentication). I was told, for obvious
 reasons, that this is insecure method and requires database hit each call.
 I
 am trying to implement WSE 3.0 enabled web services on the .NET side. Is
 this an SSO problem, or should I be using STS/Brokered Authentication
 approach? We just started our upgrade to VS2008, so maybe I should just
 pursue WCF methods instead? Any experiences with this would be greatly
 appreciated.
 
 TIA,
 
 variable
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Newbie-SOA-question-tp22875841p22962243.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] Newbie SOA question (maintaining login state)

2009-04-08 Thread Tracy Spratt
No more normal way with Flex than with html. Worse, really.  There are
just too many communication options, too many web server options and too
many degrees of secure.  Then the Flash Player weighs in with its own
restrictions on things like WebService headers and it just gets worse.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Michael Pengi
Sent: Wednesday, April 08, 2009 8:09 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Newbie SOA question (maintaining login state)

 







I'd be interested in hearing more about this. Isn't there a 'normal' way to
do this with flex? Maintaining login state would seem to be a basic
requirement for web apps. Just curious.

Tracy Spratt wrote:
 
 I have a lot to learn about security, and had difficulty wading through
 all
 of the levels and options, so I devised my own programmatic solution.
 
 When a user logs in from the Flex app (md5 hash on the password), I create
 a
 sessionId, store it in a hashtable in the .net app, and pass it back to
 the
 Flex app. The Flex app sends this token with each call. The server
 checks
 the passed in session id and compares the timestamp to the current time. 
 If
 it is within the timeout period specified, it updates the timestamp and
 authorizes the call. If authorization fails, the user must log in again.
 
 I am certainly open to a better approach.
 
 Tracy Spratt,
 
 Lariat Services, development services available
 _ 
 
 From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
[mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
On
 Behalf Of variableop
 Sent: Friday, April 03, 2009 4:07 PM
 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 Subject: [flexcoders] Newbie SOA question
 
 
 
 I would like to provide a solution to maintaining login state over
 multiple
 calls to my .NET web service layer. So basically, the user logs in, then
 stores a login token internally on the Flex side so that each web
 service
 call can be authenticated as being made by someone who has already logged
 in to the system. Does anyone have any ideas on how to approach this? My
 initial approach was to cache the user's username/password and
 authenticate
 on each web service call (Direct Authentication). I was told, for obvious
 reasons, that this is insecure method and requires database hit each call.
 I
 am trying to implement WSE 3.0 enabled web services on the .NET side. Is
 this an SSO problem, or should I be using STS/Brokered Authentication
 approach? We just started our upgrade to VS2008, so maybe I should just
 pursue WCF methods instead? Any experiences with this would be greatly
 appreciated.
 
 TIA,
 
 variable
 
 
 
 
 

-- 
View this message in context: http://www.nabble.
http://www.nabble.com/Newbie-SOA-question-tp22875841p22962243.html
com/Newbie-SOA-question-tp22875841p22962243.html
Sent from the FlexCoders mailing list archive at Nabble.com.





RE: [flexcoders] Newbie SOA question

2009-04-03 Thread Tracy Spratt
I have a lot to learn about security, and had difficulty wading through all
of the levels and options, so I devised my own programmatic solution.

 

When a user logs in from the Flex app (md5 hash on the password), I create a
sessionId, store it in a hashtable in the .net app, and pass it back to the
Flex app.  The Flex app sends this token with each call.  The server checks
the passed in session id and compares the timestamp to the current time.  If
it is within the timeout period specified, it updates the timestamp and
authorizes the call.  If authorization fails, the user must log in again.

 

I am certainly open to a better approach.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of variableop
Sent: Friday, April 03, 2009 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie SOA question

 

I would like to provide a solution to maintaining login state over multiple
calls to my .NET web service layer. So basically, the user logs in, then
stores a login token internally on the Flex side so that each web service
call can be authenticated as being made by someone who has already logged
in to the system. Does anyone have any ideas on how to approach this? My
initial approach was to cache the user's username/password and authenticate
on each web service call (Direct Authentication). I was told, for obvious
reasons, that this is insecure method and requires database hit each call. I
am trying to implement WSE 3.0 enabled web services on the .NET side. Is
this an SSO problem, or should I be using STS/Brokered Authentication
approach? We just started our upgrade to VS2008, so maybe I should just
pursue WCF methods instead? Any experiences with this would be greatly
appreciated.

TIA,

variable





Re: [flexcoders] Newbie : Video Capture and Streaming Questions

2009-03-05 Thread p...@vin Uttarwar
Hi,

Yes you need Streaming server like FMS or Red 5 to use NetStream.connect()
method.
Netconnection Creates a bidirectional connection between a Flash Player or
AIR application and a Flash Media Server application.


Regards,
Pravin


2009/3/5 toejamnyc jtho...@yahoo.com

   Good Day.

 I hope you'll forgive my very basic questions. I've googled, read FAQ's,
 and built a few tutorials, and have a very basic app that displays video.
 But I still have a very basic question.

 Must I have Flash Media Server in order to capture and save video from a
 webcam to a server? Is there *any* way I can build a small development,
 recording app on my existing http://domain?

 I am a PHP / MySQL developer, so this is all very new to me. Like I said, I
 can display video, but I'm having a hard time figuring out
 NetStream.connect() -- unless it's indeed true I need FMS.

 Thank you in advance for your time and any pointers.

  



re: [flexcoders] Newbie Help

2009-02-12 Thread Wally Kolcz
1.) Flex is just an SWF file. You can set the application to any size and embed 
it as a SWF.
3.) Flex has a really good printing solution allowing you to add elements to a 
print job and control the order of printing. 

I believe that AlivePDF can convert and export Flex information as a PDF 
document.


From: ksunair ksun...@yahoo.com
Sent: Thursday, February 12, 2009 5:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Help 

Hi All,

I am very new to Flex as a matter of fact I just wrote hello world :)

Anyway, I am evaluating Flex against SilverLight for our new development. Our 
current web 

app is legacy ASP (not ASP.Net) and I have completed a prototype for 
SilverLight and as a 

C# developer I was able to get it done pretty fast. I was reading about Flex 
and it seems to 

be also straight forward. I have few questions if someone can help me with.

1. Is it possible to add a flex object to an existing ASP page. If not, how can 
I call and pass 

information between classic ASP and Flex, is it possible? 

2. I would like to know how to create a hierarchal data grid in Flex? I saw 
some examples 

of the new Hierarchical collection, if it is the solution, is there a simple 
example 

somewhere I can use?

3. I would like to print reports from web and currently silverlight has buggy 

implementation of print, is it possible to print from Flex web page? Also is it 
possible to 

export the data to PDF or HTML format?

I am doing reading right now, as the Flex expert you could help me speed up to 
make my decision.

Thanks a lot.





RE: [flexcoders] newbie question - call to actionscript class

2009-01-29 Thread Gregor Kiddie
mx:XML ... / isn't a visual component. You'll need to use the XML as a
dataprovider from something that is.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of annelie2008
Sent: 29 January 2009 10:43
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie question - call to actionscript class

 

Hello,

I'm brand new to Flex so I'm sure this is a very stupid question, but 
hopefully someone will be able to help.

My ultimate goal is to take an xaml file with a musical score and 
convert it to flex, but to start with I've hardcoded a score (or 
rather some score elements) in an actionscript class and I'm trying 
to call it from my main application file. When I debug I can see that 
it does get called, however nothing gets drawn on screen. I first did 
the hardcoded score in a project on its own, so I know that the score 
should be able to be displayed.

Here's the code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  
layout=absolute initialize=initializeHandler()

mx:Script
![CDATA[

import test.DrawNotes;

public var myXmlList:XMLList;

private function initializeHandler():void
{
myXmlList = scoreXml.children();

// loop through the xml here and call 
the relevant functions in DrawNotes

var notes:DrawNotes = new DrawNotes();
}

]]
/mx:Script

mx:XML id=scoreXml source=scoreCanvas.xml /

/mx:Application

Does anyone know what I'm doing wrong?

Many thanks,

Annelie

 



Re: [flexcoders] Newbie question: Completion Events or proxy binding for RemoteObject calls

2009-01-06 Thread Josh McDonald
Bindings work with any objects, so long as the fields (or the whole class)
are marked with [Bindable]

-Josh

On Wed, Jan 7, 2009 at 11:44 AM, john.casey64 john.case...@yahoo.comwrote:

 I'm working on an application where I build a tree (in actionscript
 buildtree()) where I add new leafs from data that is retieve from a
 remote call.

 Since the buildtree() function deals with the view - I have this coded
 in the view mxml. The tree is bound to a XMLListCollection which is
 updated by the buildtree() function after a remote value object is updated

 The remote RetrieveDataCommand successfully retrieves the data into a
 business value object.

 What is the correct Cairgorm method for triggering the builtree()
 function after the RetrieveDataCommand is complete?

 I don't want to pollute my Command logic with any specific calls to
 buildtree()

 Should I be adding RemoteCommandComplete events to all of my
 RemoteCommands? and then set the view logic to listen for them?

 I tried to set a Collection.COLLECTION_CHANGE listener on the Business
 Value object from my View logic. But it seems to fire before the
 ArrayCollection is complete.

 I also tried the BindUtils function to bind my buildtree() function to
 my value object,  but bindutils only seems to work with MX visual
 objects, not actionscript value objects.

 Any experts out there? I'm sure there must be a simple solution for this.


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] newbie question on synchronous and asynchronous events

2008-10-16 Thread Paul Andrews
I always treat events as asynchronous - I don't see how else you can deal 
with them. I'll have to check out the cookbook article..

Paul
- Original Message - 
From: Dan [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, October 16, 2008 4:03 PM
Subject: [flexcoders] newbie question on synchronous and asynchronous events


 From Flex cookbook beta on adobe.com, How to handle events in a
 TestCase? article:
 Testing behavior in a TestCase often involves waiting for
 asynchronous events. If the TestCase methods only concern synchronous
 events like property change events fired immediately when the property
 is set, no special handling is required. It is only when asynchronous
 events are involved that extra care needs to be taken. A common
 example would be waiting for a URLLoad to finish or a UIComponent to
 finish creation.

 My question is: How do I distinguish between the synchronous and
 asynchronous  events?
 From what is said, if the event is synchronous, then I could test for
 event effect in synchronous manner. For example:

 public function testSync(){
 this.myValue = 0
 addEventListener(MySynch.Sync, listener)
 dispatchEvent(new MySynch)
 assertEquals (this.myValue, 10)
 }

 public function listener(){
 this.myValue = 10
 }


 Now, if I write the code for WebService send, test code would not
 work. Am I getting this right? If so, how do I distinguish between the
 synchronous and asynchronous  events?

 Thanks,

 Dan


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links



 



Re: [flexcoders] newbie question - multipage apps - best approach?

2008-04-28 Thread Tom Chiverton
On Saturday 26 Apr 2008, hoytlee2000 wrote:
 Should each page of the UI be it's own MXML
 file and inluded in as a component? 

I would say 'at a minimum'. It'll look a lot more organised. You may start 
spotting common/reusable parts too.

 And what are the draw backs?  

You'll have to be a bit more disciplined in when and where you use data 
binding, and to what.
You might need to look at ChangeWatcher, or something more 'serious' like the 
Cairngorm framework.

-- 
Tom Chiverton
Helping to biannually visualize frictionless users
on: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



RE: [flexcoders] newbie question

2008-04-23 Thread Tracy Spratt
Welcome, Steve.

 

First, please use a descriptive subject for all posts, including AIR,
if you think that might be signficant.  There is too much traffic on
this list for anyone to read all posts, so we choose what to read based
on the subject.  Subjects like HELP ME!!! and URGENT!!!, and even
Newbie Question stand a good chance of being skipped.

 

Now, for your question, I do not use AIR much yet, but generally, you
need to use a result handler on your data call.  That function will be
called when your data returns, and you can then do whatever you need
with it.  Are you using RemoteObject to make the call?  All the of the
RPC protocols support the result event.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Wednesday, April 23, 2008 1:44 PM
To: flexcoders
Subject: [flexcoders] newbie question

 

Let me start by saying that I am completely new to Flex and obviously
the list.  I'll apologize upfront for asking the dumb and obvious
questions, but I'm still going to ask them :P

 

So here's a description of what I'm doing and my question.

 

I built an Air app with Flex 3 that posts some form data to a remote cfm
file.  The cfm file then returns a string.  If I watch the app running
in the Flex Builder 3 debug perspective I can see the string that's
returned.  My question is this.  How do I get that string and make it
available to another function?  I want to use the returned string in
another post method in the same app.

 

If more details are required I can give them, just holler :-) and Thanks
in advance.

 

~Steve

http://lanctr.com/

 



__ Information from ESET NOD32 Antivirus, version of virus
signature database 3049 (20080423) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com http://www.eset.com 

 



RE: [flexcoders] newbie question

2008-04-23 Thread Steve Good
Sorry about the subject, I'm not sure why I didn't use something more
descriptive.

 

Here's a snippet of the code I'm using. 

 

  public function postData(){

var urlData:String = foo=bar;

trace(urlData);

var variables:URLVariables = new
URLVariables(urlData);

var request:URLRequest = new URLRequest();

request.url = http://domain.com/remoteScript.cfm;;

request.method = URLRequestMethod.POST;

request.data = variables;

var loader:URLLoader = new URLLoader();

loader.dataFormat = URLLoaderDataFormat.VARIABLES;

loader.addEventListener(Event.COMPLETE,
completeHandler);

try

{

loader.load(request);

}

catch (error:Error)

{

trace(Unable to load URL);

}



function completeHandler(event:Event):void

{

trace(event.target.data.resultCode);

}

  }

 

I don't know if this is the best way to do this, I just copied and modified
one of the examples at
http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_co
mmunications_3.html  

 

The string I'm trying to get is in the last trace, resultCode.  FB3 does
show a warning about the function.  -1008: return value for function
'postData' has no type declaration.  I don't have a clue what this means.

 

I have a Flex 3 book on order, so hopefully I can bring my dumb questions
down to a minimum once I get my hands on it.

 

Thanks!

 

~Steve

http://lanctr.com/

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, April 23, 2008 1:06 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie question

 

Welcome, Steve.

 

First, please use a descriptive subject for all posts, including AIR, if
you think that might be signficant.  There is too much traffic on this list
for anyone to read all posts, so we choose what to read based on the
subject.  Subjects like HELP ME!!! and URGENT!!!, and even Newbie
Question stand a good chance of being skipped.

 

Now, for your question, I do not use AIR much yet, but generally, you need
to use a result handler on your data call.  That function will be called
when your data returns, and you can then do whatever you need with it.  Are
you using RemoteObject to make the call?  All the of the RPC protocols
support the result event.

 

Tracy

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Wednesday, April 23, 2008 1:44 PM
To: flexcoders
Subject: [flexcoders] newbie question

 

Let me start by saying that I am completely new to Flex and obviously the
list.  I'll apologize upfront for asking the dumb and obvious questions, but
I'm still going to ask them :P

 

So here's a description of what I'm doing and my question.

 

I built an Air app with Flex 3 that posts some form data to a remote cfm
file.  The cfm file then returns a string.  If I watch the app running in
the Flex Builder 3 debug perspective I can see the string that's returned.
My question is this.  How do I get that string and make it available to
another function?  I want to use the returned string in another post method
in the same app.

 

If more details are required I can give them, just holler J and Thanks in
advance.

 

~Steve

http://lanctr.com/

 



__ Information from ESET NOD32 Antivirus, version of virus signature
database 3049 (20080423) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

 



Re: [flexcoders] newbie question

2008-04-23 Thread Pat Buchanan
Steve:

Several things you need to do.  First, make sure you have *defined a result
handler* for the function call.  Sounds like you have because you said you
could see the result come back.  Then, just access the result via the event,
like below:

private function getMyAnswer_Handler(event:ResultEvent):void{
   Alert.show(event.result);
}

If you are returning a string from your CF call, then the above code would
just show it in an alert box.  Replace it with your function to pass it
along to whatever you want to do with it.

Also, if you want quick responses in the future, be sure to provide a
summary of your question in the subject.  With the amount of questions that
get posted to this forum, many people don't open the messages without know
what they are about.

Thanks
-Pat Buchanan
www.DataNotion.com


On Wed, Apr 23, 2008 at 11:44 AM, Steve Good [EMAIL PROTECTED] wrote:

Let me start by saying that I am completely new to Flex and obviously
 the list.  I'll apologize upfront for asking the dumb and obvious questions,
 but I'm still going to ask them :P



 So here's a description of what I'm doing and my question.



 I built an Air app with Flex 3 that posts some form data to a remote cfm
 file.  The cfm file then returns a string.  If I watch the app running in
 the Flex Builder 3 debug perspective I can see the string that's returned.
 My question is this.  How do I get that string and make it available to
 another function?  I want to use the returned string in another post method
 in the same app.



 If more details are required I can give them, just holler J and Thanks in
 advance.



 ~Steve

 http://lanctr.com/




 __ Information from ESET NOD32 Antivirus, version of virus
 signature database 3049 (20080423) __

 The message was checked by ESET NOD32 Antivirus.

 http://www.eset.com
  



RE: [flexcoders] newbie question

2008-04-23 Thread Tracy Spratt
That is ok, but it is the hard way.  HTTPService is easier to use.

 

So you have the string you need in the completeHandler?  If so, then I
guess I don't understand your question.  If you need to 'save that
string for later use by some other function, you could declare an
instance (global) variable and store it in that.  Declare that var
outside of any function:

private var _sMyString:String;

 

then in completeHandler():

_sMyString = event.target.data.resultCode;

 

Now you can access that value from most anywhere.

 

That warning is from the function declaration:

public function postData(){

To fix it do:

public function postData():void{

This declares the return type of the function to be void

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Wednesday, April 23, 2008 2:10 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie question

 

Sorry about the subject, I'm not sure why I didn't use something more
descriptive.

 

Here's a snippet of the code I'm using. 

 

  public function postData(){

var urlData:String = foo=bar;

trace(urlData);

var variables:URLVariables = new
URLVariables(urlData);

var request:URLRequest = new URLRequest();

request.url =
http://domain.com/remoteScript.cfm;;

request.method = URLRequestMethod.POST;

request.data = variables;

var loader:URLLoader = new URLLoader();

loader.dataFormat =
URLLoaderDataFormat.VARIABLES;

loader.addEventListener(Event.COMPLETE,
completeHandler);

try

{

loader.load(request);

}

catch (error:Error)

{

trace(Unable to load URL);

}



function completeHandler(event:Event):void

{

trace(event.target.data.resultCode);

}

  }

 

I don't know if this is the best way to do this, I just copied and
modified one of the examples at
http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_an
d_communications_3.html
http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_a
nd_communications_3.html   

 

The string I'm trying to get is in the last trace, resultCode.  FB3 does
show a warning about the function.  -1008: return value for function
'postData' has no type declaration.  I don't have a clue what this
means.

 

I have a Flex 3 book on order, so hopefully I can bring my dumb
questions down to a minimum once I get my hands on it.

 

Thanks!

 

~Steve

http://lanctr.com/

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, April 23, 2008 1:06 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie question

 

Welcome, Steve.

 

First, please use a descriptive subject for all posts, including AIR,
if you think that might be signficant.  There is too much traffic on
this list for anyone to read all posts, so we choose what to read based
on the subject.  Subjects like HELP ME!!! and URGENT!!!, and even
Newbie Question stand a good chance of being skipped.

 

Now, for your question, I do not use AIR much yet, but generally, you
need to use a result handler on your data call.  That function will be
called when your data returns, and you can then do whatever you need
with it.  Are you using RemoteObject to make the call?  All the of the
RPC protocols support the result event.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Wednesday, April 23, 2008 1:44 PM
To: flexcoders
Subject: [flexcoders] newbie question

 

Let me start by saying that I am completely new to Flex and obviously
the list.  I'll apologize upfront for asking the dumb and obvious
questions, but I'm still going to ask them :P

 

So here's a description of what I'm doing and my question.

 

I built an Air app with Flex 3 that posts some form data to a remote cfm
file.  The cfm file then returns a string.  If I watch the app running
in the Flex Builder 3 debug perspective I can see the string that's
returned.  My question is this.  How do I get that string and make it
available to another function?  I want to use the returned string in
another post method in the same app.

 

If more details are required I can give them, just holler :-) and Thanks
in advance.

 

~Steve

http://lanctr.com/

 



__ Information from ESET NOD32 Antivirus, version of virus
signature database 3049 (20080423

RE: [flexcoders] newbie question

2008-04-23 Thread Steve Good
Cool, I think I understand.  I'll give it a try.

 

Thanks.

 

~Steve

http://lanctr.com/

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, April 23, 2008 2:02 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie question

 

That is ok, but it is the hard way.  HTTPService is easier to use.

 

So you have the string you need in the completeHandler?  If so, then I guess
I don't understand your question.  If you need to 'save that string for
later use by some other function, you could declare an instance (global)
variable and store it in that.  Declare that var outside of any function:

private var _sMyString:String;

 

then in completeHandler():

_sMyString = event.target.data.resultCode;

 

Now you can access that value from most anywhere.

 

That warning is from the function declaration:

public function postData(){

To fix it do:

public function postData():void{

This declares the return type of the function to be void

 

Tracy

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Wednesday, April 23, 2008 2:10 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie question

 

Sorry about the subject, I'm not sure why I didn't use something more
descriptive.

 

Here's a snippet of the code I'm using. 

 

  public function postData(){

var urlData:String = foo=bar;

trace(urlData);

var variables:URLVariables = new
URLVariables(urlData);

var request:URLRequest = new URLRequest();

request.url = http://domain.com/remoteScript.cfm;;

request.method = URLRequestMethod.POST;

request.data = variables;

var loader:URLLoader = new URLLoader();

loader.dataFormat = URLLoaderDataFormat.VARIABLES;

loader.addEventListener(Event.COMPLETE,
completeHandler);

try

{

loader.load(request);

}

catch (error:Error)

{

trace(Unable to load URL);

}



function completeHandler(event:Event):void

{

trace(event.target.data.resultCode);

}

  }

 

I don't know if this is the best way to do this, I just copied and modified
one of the examples at
http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_co
mmunications_3.html  

 

The string I'm trying to get is in the last trace, resultCode.  FB3 does
show a warning about the function.  -1008: return value for function
'postData' has no type declaration.  I don't have a clue what this means.

 

I have a Flex 3 book on order, so hopefully I can bring my dumb questions
down to a minimum once I get my hands on it.

 

Thanks!

 

~Steve

http://lanctr.com/

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Wednesday, April 23, 2008 1:06 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie question

 

Welcome, Steve.

 

First, please use a descriptive subject for all posts, including AIR, if
you think that might be signficant.  There is too much traffic on this list
for anyone to read all posts, so we choose what to read based on the
subject.  Subjects like HELP ME!!! and URGENT!!!, and even Newbie
Question stand a good chance of being skipped.

 

Now, for your question, I do not use AIR much yet, but generally, you need
to use a result handler on your data call.  That function will be called
when your data returns, and you can then do whatever you need with it.  Are
you using RemoteObject to make the call?  All the of the RPC protocols
support the result event.

 

Tracy

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Good
Sent: Wednesday, April 23, 2008 1:44 PM
To: flexcoders
Subject: [flexcoders] newbie question

 

Let me start by saying that I am completely new to Flex and obviously the
list.  I'll apologize upfront for asking the dumb and obvious questions, but
I'm still going to ask them :P

 

So here's a description of what I'm doing and my question.

 

I built an Air app with Flex 3 that posts some form data to a remote cfm
file.  The cfm file then returns a string.  If I watch the app running in
the Flex Builder 3 debug perspective I can see the string that's returned.
My question is this.  How do I get that string and make it available to
another function?  I want to use the returned string in another post method
in the same app.

 

If more details are required I can give them, just holler J and Thanks in
advance

RE: [flexcoders] newbie question

2008-04-17 Thread Gordon Smith
BTW, Timgerr asked essentially the same question early today in the
thread Flex Compenents, how to make them talk. 

 

If your app is organized like this

 

Application

ViewStack id=myVS

MyForm/

SecondView id=mySecondView/

/ViewStack

/Application

 

then from MyForm's Script you could do

 

Application.application.myVS.selectedIndex = 1;

 

(You can access the Application instance from anywhere as
Application.application.) You could also do

 

parentDocument.myVS.selectedIndex = 1;

 

However, this isn't good practice; MyForm shouldn't have that much
knowledge about the structure of things outside itself. Instead, put a
method like

 

public function showSecondView():void

{

myVS.selectedChild = mySecondView;

}

 

in Application's Script, and then have MyForm's Script call

 

Application.application.showSecondView();

 

or

 

parentDocument.showSecondView();

 

In other words, have MyForm request that the Application do something
without specifying how to do it.

 

Or, better yet, learn how to have MyForm send an event to which
Application can respond.

   

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Luke Vanderfluit
Sent: Wednesday, April 16, 2008 7:14 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie question

 

Hi Gordon.

Gordon Smith wrote:
 How do I allow the user to navigate from one page to the next?
 
 
 
 You'd generally use a ViewStack if the pages have little UI in common 
 with each other. Use states if they have a lot in common. You can also

 mix and match, using a ViewStack for part of the screen, etc.
 
 A ViewStack shows 1 of N of its child views. You change which child it

 displays by setting its selectedChild or selectedIndex property.

Thanks very much for your reply...

I have a component that displays a form (currently in 
selectedIndex 0), from this component I want the click to send me 
to ViewStack.selectedIndex 1.

Is there something like parent.selectedIndex?
Access the ViewStack (that contains the component as one of its 
children) directly from the component doesnt work.

mx:Button label=Button click=myVS.selectedIndex='1';/

How would I do that?

Kind regards.
Luke.

 
 Gordon Smith
 
 Adobe Flex SDK Team
 
 
 
 --
 
 *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] 
 *On Behalf Of *Luke Vanderfluit
 *Sent:* Wednesday, April 16, 2008 5:49 PM
 *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

 *Subject:* [flexcoders] newbie question
 
 
 
 Hi.
 
 Im relatively new to flex and am writing an application at work
 using flex! Yes!
 
 I want to get a log in page working in flex.
 Doing this in html/jsp one would create a page, submit the page
 and (if credentials are good) move to the next page.
 
 In flex, the concept of reloading pages is non-existent, I believe.
 So I know how to connect to a server from a flex client to test
 the user credentials...
 The question is:
 How do I allow the user to navigate from one page to the next?
 (I am currently using states. Is that the way?)
 
 My submit button will call an actionscript function that will
 test the credentials, but it should also put the user into the
 next step of the application, what is the accepted way of doing this?
 
 Thanks.
 Kind regards.
 
 -- 
 Luke Vanderfluit
 Analyst / Web Programmer
 e3Learning.com.au
 08 8221 6422
 
 

-- 
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422

 



RE: [flexcoders] newbie question

2008-04-16 Thread Gordon Smith
 How do I allow the user to navigate from one page to the next?

 

You'd generally use a ViewStack if the pages have little UI in common
with each other. Use states if they have a lot in common. You can also
mix and match, using a ViewStack for part of the screen, etc.

 

A ViewStack shows 1 of N of its child views. You change which child it
displays by setting its selectedChild or selectedIndex property.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Luke Vanderfluit
Sent: Wednesday, April 16, 2008 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie question

 

Hi.

Im relatively new to flex and am writing an application at work 
using flex! Yes!

I want to get a log in page working in flex.
Doing this in html/jsp one would create a page, submit the page 
and (if credentials are good) move to the next page.

In flex, the concept of reloading pages is non-existent, I believe.
So I know how to connect to a server from a flex client to test 
the user credentials...
The question is:
How do I allow the user to navigate from one page to the next?
(I am currently using states. Is that the way?)

My submit button will call an actionscript function that will 
test the credentials, but it should also put the user into the 
next step of the application, what is the accepted way of doing this?

Thanks.
Kind regards.

-- 
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422

 



Re: [flexcoders] newbie question

2008-04-16 Thread Luke Vanderfluit
Hi Gordon.


Gordon Smith wrote:
  How do I allow the user to navigate from one page to the next?
 
  
 
 You'd generally use a ViewStack if the pages have little UI in common 
 with each other. Use states if they have a lot in common. You can also 
 mix and match, using a ViewStack for part of the screen, etc.
 
 A ViewStack shows 1 of N of its child views. You change which child it 
 displays by setting its selectedChild or selectedIndex property.

Thanks very much for your reply...

I have a component that displays a form (currently in 
selectedIndex 0), from this component I want the click to send me 
to ViewStack.selectedIndex 1.

Is there something like parent.selectedIndex?
Access the ViewStack (that contains the component as one of its 
children) directly from the component doesnt work.

mx:Button label=Button click=myVS.selectedIndex='1';/

How would I do that?

Kind regards.
Luke.

 
 Gordon Smith
 
 Adobe Flex SDK Team
 
  
 
 
 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Luke Vanderfluit
 *Sent:* Wednesday, April 16, 2008 5:49 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] newbie question
 
  
 
 Hi.
 
 Im relatively new to flex and am writing an application at work
 using flex! Yes!
 
 I want to get a log in page working in flex.
 Doing this in html/jsp one would create a page, submit the page
 and (if credentials are good) move to the next page.
 
 In flex, the concept of reloading pages is non-existent, I believe.
 So I know how to connect to a server from a flex client to test
 the user credentials...
 The question is:
 How do I allow the user to navigate from one page to the next?
 (I am currently using states. Is that the way?)
 
 My submit button will call an actionscript function that will
 test the credentials, but it should also put the user into the
 next step of the application, what is the accepted way of doing this?
 
 Thanks.
 Kind regards.
 
 -- 
 Luke Vanderfluit
 Analyst / Web Programmer
 e3Learning.com.au
 08 8221 6422
 
 


-- 
Luke Vanderfluit
Analyst / Web Programmer
e3Learning.com.au
08 8221 6422


Re: [flexcoders] newbie question

2008-04-16 Thread shaun
Hey Luke,

Luke Vanderfluit wrote:
 
 I have a component that displays a form (currently in 
 selectedIndex 0), from this component I want the click to send me 
 to ViewStack.selectedIndex 1.
 
 Is there something like parent.selectedIndex?
 Access the ViewStack (that contains the component as one of its 
 children) directly from the component doesnt work.
 
 mx:Button label=Button click=myVS.selectedIndex='1';/
 
 How would I do that?

If i understand correctly, off the top of my head you could do something 
like:


//inside parent containing VS.
addEventListener(NextEvent, handleNext);

function handleNext(e:Event):void{
  var c:MyFormComponent = e.currentTarget as MyFormComponent;
  next(c);
}

function next(c:MyFormComponent){
//something.
myVs.selectedIndex  maxIndex ? myVs.selectedIndex++ : null ;
}


//inside child component within vs.
function handleClick(e:Event):void{
   if (e.currentTarget == next)
dispatchEvent(new Event(NextEvent, true));
   else
dispatchEvent(new Event(PreviousEvent, true));

}
mx:Button id=next label=Next click=handleClick(event);/

mx:Button id=back label=Back click=handleClick(event);/


HTH.
cheers,
  - shaun








RE: [flexcoders] newbie question

2008-04-16 Thread Tracy Spratt
Another convenient way to do a login is to use a modal popUp
TitleWindow.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of shaun
Sent: Wednesday, April 16, 2008 10:47 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie question

 

Hey Luke,

Luke Vanderfluit wrote:
 
 I have a component that displays a form (currently in 
 selectedIndex 0), from this component I want the click to send me 
 to ViewStack.selectedIndex 1.
 
 Is there something like parent.selectedIndex?
 Access the ViewStack (that contains the component as one of its 
 children) directly from the component doesnt work.
 
 mx:Button label=Button click=myVS.selectedIndex='1';/
 
 How would I do that?

If i understand correctly, off the top of my head you could do something

like:

//inside parent containing VS.
addEventListener(NextEvent, handleNext);

function handleNext(e:Event):void{
var c:MyFormComponent = e.currentTarget as MyFormComponent;
next(c);
}

function next(c:MyFormComponent){
//something.
myVs.selectedIndex  maxIndex ? myVs.selectedIndex++ : null ;
}

//inside child component within vs.
function handleClick(e:Event):void{
if (e.currentTarget == next)
dispatchEvent(new Event(NextEvent, true));
else
dispatchEvent(new Event(PreviousEvent, true));

}
mx:Button id=next label=Next click=handleClick(event);/

mx:Button id=back label=Back click=handleClick(event);/

HTH.
cheers,
- shaun

 



Re: [flexcoders] Newbie Question - Random position in an array

2008-03-03 Thread Maciek Sakrejda
Note that this will break on sparse arrays, though. In Flex, it's
perfectly valid to have something like

var foo:Array = [];
foo[0] = 2;
foo[3] = 5;

This array has length 4, but only two elements. Elements 1 and 2
evaluate to 'undefined'. I'm not sure if there's an easy way to pick a
random element out of a sparse array. If you want something
unscientific, I suppose you can just increment the randomly chosen index
until you find something. Or randomly pick again (although with *really*
sparse arrays, this could theoretically be a perf problem).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Sean Scott [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie Question - Random position in an array
Date: Sat, 1 Mar 2008 22:55:49 -0600

Sherif,

Thanks i ended up with var randSeed:Number = new
Number(Math.floor(Math.random() * this.techniColors.length));



On Sat, Mar 1, 2008 at 9:48 PM, Sherif Abdou [EMAIL PROTECTED]
wrote:
something like this should work

var randomNumber:int = Math.Random * myArray.length;

then do something like myArray[randomNumber] whatever




- Original Message 
From: Sean Scott [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Saturday, March 1, 2008 9:39:39 PM
Subject: [flexcoders] Newbie Question - Random position in an
array

Hi folks, wondering if someone has a function that returns a
random position from an array.

Thanks from a newbie,








Never miss a thing. Make Yahoo your homepage. 


 




Re: [flexcoders] Newbie Question - Random position in an array

2008-03-03 Thread Sean Scott
Maciek thanks for clearing that up, but in this case the array being access
was created with known values.  so no possibility of sparsity.

On Mon, Mar 3, 2008 at 10:27 AM, Maciek Sakrejda [EMAIL PROTECTED]
wrote:

   Note that this will break on sparse arrays, though. In Flex, it's
 perfectly valid to have something like

 var foo:Array = [];
 foo[0] = 2;
 foo[3] = 5;

 This array has length 4, but only two elements. Elements 1 and 2
 evaluate to 'undefined'. I'm not sure if there's an easy way to pick a
 random element out of a sparse array. If you want something
 unscientific, I suppose you can just increment the randomly chosen index
 until you find something. Or randomly pick again (although with *really*
 sparse arrays, this could theoretically be a perf problem).
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com


 -Original Message-
 From: Sean Scott [EMAIL PROTECTED] sean.net%40gmail.com
 Reply-To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Subject: Re: [flexcoders] Newbie Question - Random position in an array
 Date: Sat, 1 Mar 2008 22:55:49 -0600

 Sherif,

 Thanks i ended up with var randSeed:Number = new
 Number(Math.floor(Math.random() * this.techniColors.length));

 On Sat, Mar 1, 2008 at 9:48 PM, Sherif Abdou [EMAIL 
 PROTECTED]sherif626%40yahoo.com
 
 wrote:
 something like this should work

 var randomNumber:int = Math.Random * myArray.length;

 then do something like myArray[randomNumber] whatever




 - Original Message 
 From: Sean Scott [EMAIL PROTECTED] sean.net%40gmail.com
 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 Sent: Saturday, March 1, 2008 9:39:39 PM
 Subject: [flexcoders] Newbie Question - Random position in an
 array

 Hi folks, wondering if someone has a function that returns a
 random position from an array.

 Thanks from a newbie,







 __
 Never miss a thing. Make Yahoo your homepage.

  



Re: [flexcoders] Newbie Question - Random position in an array

2008-03-01 Thread Sherif Abdou
something like this should work
var randomNumber:int = Math.Random * myArray.length;
then do something like myArray[randomNumber] whatever



- Original Message 
From: Sean Scott [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Saturday, March 1, 2008 9:39:39 PM
Subject: [flexcoders] Newbie Question - Random position in an array

Hi folks, wondering if someone has a function that returns a random position 
from an array.

Thanks from a newbie,

 


  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: [flexcoders] Newbie Question - Random position in an array

2008-03-01 Thread Sean Scott
Sherif,

Thanks i ended up with var randSeed:Number = new Number(Math.floor(
Math.random() * this.techniColors.length));

On Sat, Mar 1, 2008 at 9:48 PM, Sherif Abdou [EMAIL PROTECTED] wrote:

   something like this should work

 var randomNumber:int = Math.Random * myArray.length;

 then do something like myArray[randomNumber] whatever


 - Original Message 
 From: Sean Scott [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Saturday, March 1, 2008 9:39:39 PM
 Subject: [flexcoders] Newbie Question - Random position in an array

  Hi folks, wondering if someone has a function that returns a random
 position from an array.

 Thanks from a newbie,


 --
 Never miss a thing. Make Yahoo your 
 homepage.http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs
 



Re: [flexcoders] newbie questions about mx:Move

2008-01-26 Thread [p e r c e p t i c o n]
thanks Sherif

On Jan 25, 2008 8:10 PM, Sherif Abdou [EMAIL PROTECTED] wrote:

   mx:Move targets=[]/

 remb targets and it takes an array of them

 - Original Message 
 From: [p e r c e p t i c o n] [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, January 25, 2008 4:08:53 PM
 Subject: [flexcoders] newbie questions about mx:Move

  Hi All,
 I have a question concerning the Move tag/object.. ..
 i'm wondering how to move multiple objects... in my attributes i use
 target to move one object, but can't seem to move multiple objects by using
 the targets attribute... can anyone point me in the right direction

 many thanks

 p


 --
 Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
 now.http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 



Re: [flexcoders] newbie questions about mx:Move

2008-01-25 Thread Sherif Abdou
mx:Move targets=[]/

remb targets and it takes an array of them


- Original Message 
From: [p e r c e p t i c o n] [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, January 25, 2008 4:08:53 PM
Subject: [flexcoders] newbie questions about mx:Move

Hi All,
I have a question concerning the Move tag/object.. ..
i'm wondering how to move multiple objects... in my attributes i use target to 
move one object, but can't seem to move multiple objects by using the targets 
attribute... can anyone point me in the right direction

many thanks

p




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


RE: [flexcoders] Newbie Flex Application

2007-12-31 Thread Tracy Spratt
Code looks ok on quick skim.  What is not working?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of obi.wasabi
Sent: Saturday, December 29, 2007 1:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Flex Application

 

Hi,

This is my first, perhaps ambitious FLEX application. The object is
building a DVD catalog. 

The form uses:
Text Inputs
Combo Box
Text Area
Radio Buttons

I could use assistance with Getting the Field Data into XML, then
Putting the XML file for 
use as the DataProvider for a Datagrid(View)

code
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=absolute 
viewSourceURL=srcview/index.html
mx:Style
Label{fontFamily: Verdana; fontSize: 10pt; fontWeight: bold;}
/mx:Style
mx:Script

![CDATA[
import flash.events.Event;
[Bindable]public var titleOverview:XML
private function addOverview(e:Event):void{ 
var titleOverview:XML = 
dvdCollection
dvd
titlePulp Fiction/title;
genreAction/genre;
actorsJohn Travolta, Sam Jackson/actors;
directorsQuentin Tarantino/directors
producersLawrence Bender /producers;

/dvd

/dvdCollection 
} 
]]
/mx:Script
mx:Panel title=DVD Collection: Add Title height=500 width=530
paddingTop=5 
paddingLeft=5 paddingRight=5 paddingBottom=5
mx:Accordion id=dvdAccordion height=450 width=500 x=10 y=31
mx:Form id=dvdOverview label=Overview height=507 width=635
mx:Label text=Title: width=48 height=19 /
mx:TextInput id=dvdTitle width=290 height=25/
mx:Label text=Genre: width=49 height=15 /
mx:ComboBox width=290
mx:ArrayCollection
mx:StringAction/mx:String
mx:StringSci-Fi/mx:String
mx:StringDrama/mx:String
mx:StringForeign/mx:String
mx:StringComedy/mx:String
mx:StringHorror/mx:String
mx:StringChildren's/mx:String
mx:StringRomance/mx:String
/mx:ArrayCollection
/mx:ComboBox
mx:Label text=Actors: /
mx:TextArea id=dvdActors width=450 /
mx:Label text=Director: /
mx:TextInput id=dvdDirector width=290 height=25/
mx:Label text=Producer(s): /
mx:TextInput id=dvdProducers width=290 height=25/
mx:Button label=Add DVD Overiew id=addOverviewBtn 
click=addOverview(event);/ 
/mx:Form 
mx:Form id=dvdDetails label=Details height=508 width=635
mx:Label text=Plot: /
mx:TextArea id=dvdPlot width=450 /
mx:Label text=Review: /
mx:TextArea id=dvdReview width=450 /
mx:Label text=Rating: /
mx:RadioButton groupName=dvdRating
id=dvdWatachable
label=Watachable
width=150/ 
mx:RadioButton groupName=dvdRating
id=dvdHorrible
label=Horrible
width=150/
mx:RadioButton groupName=dvdRating
id=dvdAwesome
label=Awesome
width=150/ 
mx:Label text=Date Purchased (MM/DD/): /
mx:DateField id=dvdPurchaseDate width=125 /
mx:Label text=Price (dollars . cents) : /
mx:HBox width=200
mx:Text text=$/mx:TextInput width=50 
height=20/mx:Text text=./mx:TextInput width=50 height=20/
/mx:HBox
mx:Label text=Date Released (MM/DD/): /
mx:DateField id=dvdReleaseDate width=125 /
mx:Label text=Length (HH MM SS) : width=265/

mx:HBox width=200
mx:TextInput width=50 height=20/mx:Text 
text=:/mx:TextInput width=50 height=20/mx:Text
text=:/mx:TextInput 
width=50 height=20/ 
/mx:HBox
mx:Button label=Add DVD Details id=addDetailsBtn / 
/mx:Form

/mx:Accordion
/mx:Panel
mx:Panel title=DVD Collection: View Titles height=300 width=59% 
paddingTop=5 paddingLeft=5 paddingRight=5 paddingBottom=5 x=0
y=518
mx:DataGrid width=100% editable=true variableRowHeight=true
x=538 
height=250 dataProvider={titleOverview.dvd}
mx:columns
mx:DataGridColumn dataField=title headerText=Title editable=false

/
mx:DataGridColumn dataField=genre headerText=Genre 
editable=false /
mx:DataGridColumn dataField=actors headerText=Actors 
editable=true /
mx:DataGridColumn dataField=directors headerText=Director 
editable=false /
mx:DataGridColumn dataField=producers headerText=Producer 
editable=true /
/mx:columns

/mx:DataGrid
/mx:Panel
mx:Panel x=538 y=0 width=450 height=500 layout=absolute
title=DVD 
Collection: Detailed View
/mx:Panel
/mx:Application

/code

 



RE: [flexcoders] Newbie XML to ArrayCollection Confusion

2007-12-31 Thread Tracy Spratt
You can't convert directly, unless you use
resultFormat=object(default), which converts your sml into a nested
dynamic object structure.  But you have no control over this conversion,
and it can have some side-effects, particularly with data type
conversions.

 

People often convert xml into an ArrayCollection of strongly typed
objects, because accessing strongly typed pbjects is significantly
faster than accessing XML, which this can help performance with very
large data displays (hundreds of renderers).  You will need to loop over
the XMLList (xmlData.score), and build the value object items and add
them to the ArrayCollection manually.

 

But, why not simply use XMLListCollection?

hScores = new XMLListCollection(xmlData.score);

 

Tracy



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of t_singe
Sent: Sunday, December 30, 2007 12:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie XML to ArrayCollection Confusion

 

I'm hoping someone can help explain how to retrieve an XML doc via
webservice and then create an ArrayCollection from it. Using the code
and xml below, I am able to retrieve the xml alright and access the
nodes, but when I attempt to convert the xml object to an array I end
up with a single element array. 

My xml document looks like:
?xml version=1.0 encoding=UTF-8 ? 
- scores
score position=14/score 
score position=21/score 
score position=32/score 
score position=43/score 
score position=55/score 
score position=60/score 
score position=79/score 
score position=86/score 
score position=98/score 
score position=107/score 
/scores

My webservice event handler looks like:
public function hScoresHandler(event:ResultEvent):void {
var xmlResult:XML ;
var hScores = new ArrayCollection(); 

xmlResult = new XML(event.result);

// This properly outputs the entire XML document
trace(xmlResult);

// These properly output the content from different nodes in the
// XMLM document
trace(first (0) position:  + xmlResult.score[0]);
trace(five position:  + xmlResult.score[5]);
trace(five position:  + [EMAIL PROTECTED]);

// Convert XML to Array
hScores = ArrayUtil.toArray(xmlResult);

// For some reason this outputs a null string
trace(hScores);

// Why is the length only one?
trace(length:  + hScores.length);
}

 



Re: [flexcoders] Newbie compile issue rattling my brain

2007-11-27 Thread Aaron Miller
I think you need define your list in an mx:Array (inside the source block)
since this is the type of the ArrayCollection.source property. I could be
wrong though, I usually don't define data in MXML.

Regards,
...aaron

On 11/27/07, mcaplan_labnet [EMAIL PROTECTED] wrote:

   Hi there,

 I'm learning the ropes of Flex. I have a pretty much textbook example
 of how to set up a datagrid that is resulting in compile time syntax
 errors. I can't for the life of me see the error.

 Any ideas?

 Thanks!

 mike

 Severity and Description Path Resource Location Creation Time Id
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 851
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 854
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 857
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 860
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 863
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214531 850
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 853
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 856
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 859
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 862
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 852
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 855
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 858
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 861
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 864

 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 width=100% height=100%
 mx:TitleWindow width=100% height=100% layout=absolute
 title=Cases
 mx:DataGrid left=10 top=10 right=10 bottom=10
 mx:dataProvider
 mx:ArrayCollection
 mx:source
 mx:Object case=1002 patient=Chris Pordan
 arrival=2007/12/02 delivery=2007/12/16 /
 mx:Object case=1003 patient=Dave Shompson
 arrival=2007/12/03 delivery=2007/12/17 /
 mx:Object case=1004 patient=Pat
 Boodfellow arrival=2007/12/04 delivery=2007/12/18 /
 mx:Object case=1005 patient=Mike Meath
 arrival=2007/12/05 delivery=2007/12/19 /
 mx:Object case=1006 patient=Sandy
 Macdaddy arrival=2007/12/05 delivery=2007/12/20 /
 /mx:source
 /mx:ArrayCollection
 /mx:dataProvider
 mx:columns
 mx:DataGridColumn headerText=Case dataField=case/
 mx:DataGridColumn headerText=Patient
 dataField=patient/
 mx:DataGridColumn headerText=Arrival
 dataField=arrival/
 mx:DataGridColumn headerText=Delivery
 dataField=delivery /
 /mx:columns
 /mx:DataGrid
 /mx:TitleWindow
 /mx:Module

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


RE: [flexcoders] Newbie compile issue rattling my brain

2007-11-27 Thread Seth Caldwell
I have an idea, but not sure. When I pasted your code, I noticed end of line
characters in some of your strings. 

For example:

mx:Object case=1006 patient=Sandy
Macdaddy arrival=2007/12/05 delivery=2007/12/20 /

This should be

mx:Object case=1006 patient=Sandy Macdaddy arrival=2007/12/05
delivery=2007/12/20 /

 

I cleaned it, compiled it, and ran it. All was good.

However, I also changed it from an Mx:Module to an Mx:Canvas, and then
dropped it in my main application.

Hope this helps,

Seth

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mcaplan_labnet
Sent: Tuesday, November 27, 2007 9:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie compile issue rattling my brain

 

Hi there,

I'm learning the ropes of Flex. I have a pretty much textbook example
of how to set up a datagrid that is resulting in compile time syntax
errors. I can't for the life of me see the error.

Any ideas?

Thanks!

mike

Severity and Description Path Resource Location Creation Time Id
1084: Syntax error: expecting colon before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 851
1084: Syntax error: expecting colon before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 854
1084: Syntax error: expecting colon before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 857
1084: Syntax error: expecting colon before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 860
1084: Syntax error: expecting colon before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 863
1084: Syntax error: expecting identifier before case.
labnet/src/modules cases_list.mxml line 7 1196183214531 850
1084: Syntax error: expecting identifier before case.
labnet/src/modules cases_list.mxml line 7 1196183214547 853
1084: Syntax error: expecting identifier before case.
labnet/src/modules cases_list.mxml line 7 1196183214547 856
1084: Syntax error: expecting identifier before case.
labnet/src/modules cases_list.mxml line 7 1196183214547 859
1084: Syntax error: expecting identifier before case.
labnet/src/modules cases_list.mxml line 7 1196183214547 862
1084: Syntax error: expecting identifier before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 852
1084: Syntax error: expecting identifier before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 855
1084: Syntax error: expecting identifier before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 858
1084: Syntax error: expecting identifier before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 861
1084: Syntax error: expecting identifier before rightbrace.
labnet/src/modules cases_list.mxml line 7 1196183214547 864

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
width=100% height=100%
mx:TitleWindow width=100% height=100% layout=absolute
title=Cases
mx:DataGrid left=10 top=10 right=10 bottom=10
mx:dataProvider
mx:ArrayCollection
mx:source
mx:Object case=1002 patient=Chris Pordan
arrival=2007/12/02 delivery=2007/12/16 /
mx:Object case=1003 patient=Dave Shompson
arrival=2007/12/03 delivery=2007/12/17 /
mx:Object case=1004 patient=Pat
Boodfellow arrival=2007/12/04 delivery=2007/12/18 /
mx:Object case=1005 patient=Mike Meath
arrival=2007/12/05 delivery=2007/12/19 /
mx:Object case=1006 patient=Sandy
Macdaddy arrival=2007/12/05 delivery=2007/12/20 /
/mx:source
/mx:ArrayCollection
/mx:dataProvider
mx:columns
mx:DataGridColumn headerText=Case dataField=case/
mx:DataGridColumn headerText=Patient
dataField=patient/
mx:DataGridColumn headerText=Arrival
dataField=arrival/
mx:DataGridColumn headerText=Delivery
dataField=delivery /
/mx:columns
/mx:DataGrid
/mx:TitleWindow
/mx:Module

 



RE: [flexcoders] Newbie Focus on Result Question

2007-10-02 Thread Alex Harui
set verticalScrollPosition on the form.
 
Other folks shrink the datagrid and grow the form so it doesn't have
scrollbars then reverse when the user is done with the form.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of its_llpj
Sent: Tuesday, October 02, 2007 8:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Focus on Result Question



Hello,

I have a datagrid and underneath the datagrid I'm using a Form to
display the entire record. When I click on a cell in the datagrid it
shows the data in the form, but you have to manually scroll down to
view the information. I would like to scroll down the page and focus
to the Form to show the rest of the record. This way I can keep the
datagrid reasonably small. 

Thanks!



 


RE: [flexcoders] newbie

2007-09-06 Thread Mathe Maema
I am sorry but I am slow. By applying the filter in the main instance variable, 
are you suggesting that I put it somewhere within this function?
   
  private function accommodationLocatorResultHandler(event:ResultEvent):void
 {
var lodgings:ArrayCollection = 
event.result.accommodations.accommodation;
   var temp:ArrayCollection = new ArrayCollection();
   var cursor:IViewCursor = lodgings.createCursor();
   var filter:AccommodationFilter = new AccommodationFilter();
 
while (!cursor.afterLast)
{
var accommodation:Accommodation = new Accommodation();
accommodation.fill(cursor.current); 
temp.addItem(accommodation);
cursor.moveNext();
}
  
   accommodations = temp;

}

Tracy Spratt [EMAIL PROTECTED] wrote:
  Call it in the result handler.
  
  Either apply the filter to the main instance level variable “accomodations”, 
or do as you have and then assign selectedAccoms to the dataGrid dataProvider.
  
  Tracy
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe 
Maema
Sent: Wednesday, September 05, 2007 6:57 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

  
  This is the function I thought of introducing.  I didn't introduce it 
because I couldn't really work out how it would be called if I wanted data to 
be updated automatically i.e. without a button click or something like that. 

[Bindable]
   private var selectedAccoms:ArrayCollection;
   public function updateGrid():void
   {
   selectedAccoms = new ArrayCollection(accommodations);
   //selectedAccoms.filterFunction =;
   selectedAccoms.refresh();
   dgAccom.dataProvider = selectedAccoms;
   }

Tracy Spratt [EMAIL PROTECTED] wrote:

Does your handler get called? Does it contain the reference you 
need? How are you applying the filter?  Are you calling refresh()?

Tracy

  
-
  
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mathe Maema
Sent: Wednesday, September 05, 2007 5:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie


Main


  Application
Script
//sending data methods using httpservice to say var accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application


  SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox


  filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked); //filter hold values of 
selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter, live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }


  Above is my abbreviated code. I think my problem is that I am unsure 
about how to get the result data after filtering. In my mind the filtering 
function is working on the data retrieved using httpservice...but I havent 
actually cracked that part well...at one point I thought of introducing a 
function for capturing selected data.

Tracy Spratt [EMAIL PROTECTED] wrote:


  Ok, that is reasonable, what does not work?  Does your handler 
get called? Does it contain the reference you need?  How are you updating the 
dataProvider?


  Tracy


  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mathe Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie



  I have two pages. The first is the main. In the main I load my  
xml data as follows using Httpservice. I pass this data to the second page as 
follows: 



SearchView id=searchView label=Search  accommodations={accoms} /



// accommodations has been declared publicly in SearchView.mxml and 
accoms is the variable that was used to accept data sent by httpservice.  Once 
the data is passed, I display in the datagrid. All is fine at this stage.



My second step was to attempt to filter the data in the datagrid and 
this is where my trouble began. I have two actionscript files one is for 
carrying out the filtering and the other is for the filterEvent. oh by the way

RE: [flexcoders] newbie

2007-09-06 Thread Tracy Spratt
Get your filtering code working without the event and custom event
object.  I think you need to have a better understanding how filtering
works.  Review the docs if needed.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mathe Maema
Sent: Thursday, September 06, 2007 4:51 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

 

I am sorry but I am slow. By applying the filter in the main instance
variable, are you suggesting that I put it somewhere within this
function?

 

private function
accommodationLocatorResultHandler(event:ResultEvent):void
 {
var lodgings:ArrayCollection =
event.result.accommodations.accommodation;
   var temp:ArrayCollection = new ArrayCollection();
   var cursor:IViewCursor = lodgings.createCursor();
   var filter:AccommodationFilter = new AccommodationFilter();
 
while (!cursor.afterLast)
{
var accommodation:Accommodation = new Accommodation();
accommodation.fill(cursor.current); 
temp.addItem(accommodation);
cursor.moveNext();
}
  
   accommodations = temp;

}

Tracy Spratt [EMAIL PROTECTED] wrote:

Call it in the result handler.

Either apply the filter to the main instance level variable
accomodations, or do as you have and then assign selectedAccoms to the
dataGrid dataProvider.

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 6:57 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

This is the function I thought of introducing.  I didn't
introduce it because I couldn't really work out how it would be called
if I wanted data to be updated automatically i.e. without a button click
or something like that. 

[Bindable]
   private var selectedAccoms:ArrayCollection;
   public function updateGrid():void
   {
   selectedAccoms = new ArrayCollection(accommodations);
   //selectedAccoms.filterFunction =;
   selectedAccoms.refresh();
   dgAccom.dataProvider = selectedAccoms;
   }

Tracy Spratt [EMAIL PROTECTED] wrote:

Does your handler get called? Does it contain the
reference you need? How are you applying the filter?  Are you calling
refresh()?

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 5:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

Main

Application
Script
//sending data methods using httpservice to say var
accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application

SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox

filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked);
//filter hold values of selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter,
live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function
accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }

Above is my abbreviated code. I think my problem is that
I am unsure about how to get the result data after filtering. In my mind
the filtering function is working on the data retrieved using
httpservice...but I havent actually cracked that part well

RE: [flexcoders] newbie

2007-09-06 Thread Mathe Maema
Thank you. will do that and see what happens.

Tracy Spratt [EMAIL PROTECTED] wrote:  Get your filtering code 
working without the event and custom event object.  I think you need to have a 
better understanding how filtering works.  Review the docs if needed.
  
  Tracy
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe 
Maema
Sent: Thursday, September 06, 2007 4:51 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

  
  I am sorry but I am slow. By applying the filter in the main instance 
variable, are you suggesting that I put it somewhere within this function?



private function accommodationLocatorResultHandler(event:ResultEvent):void
 {
var lodgings:ArrayCollection = 
event.result.accommodations.accommodation;
   var temp:ArrayCollection = new ArrayCollection();
   var cursor:IViewCursor = lodgings.createCursor();
   var filter:AccommodationFilter = new AccommodationFilter();
 
while (!cursor.afterLast)
{
var accommodation:Accommodation = new Accommodation();
accommodation.fill(cursor.current); 
temp.addItem(accommodation);
cursor.moveNext();
}
  
   accommodations = temp;

}

Tracy Spratt [EMAIL PROTECTED] wrote:

Call it in the result handler.

Either apply the filter to the main instance level variable 
“accomodations”, or do as you have and then assign selectedAccoms to the 
dataGrid dataProvider.

Tracy

  
-
  
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mathe Maema
Sent: Wednesday, September 05, 2007 6:57 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie


This is the function I thought of introducing.  I didn't introduce 
it because I couldn't really work out how it would be called if I wanted data 
to be updated automatically i.e. without a button click or something like that. 


  [Bindable]
   private var selectedAccoms:ArrayCollection;
   public function updateGrid():void
   {
   selectedAccoms = new ArrayCollection(accommodations);
   //selectedAccoms.filterFunction =;
   selectedAccoms.refresh();
   dgAccom.dataProvider = selectedAccoms;
   }

Tracy Spratt [EMAIL PROTECTED] wrote:


  Does your handler get called? Does it contain the reference you 
need? How are you applying the filter?  Are you calling refresh()?


  Tracy


  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mathe Maema
Sent: Wednesday, September 05, 2007 5:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie



  Main



Application
Script
//sending data methods using httpservice to say var accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application



SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox



filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked); //filter hold values of 
selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter, live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }



Above is my abbreviated code. I think my problem is that I am unsure 
about how to get the result data after filtering. In my mind the filtering 
function is working on the data retrieved using httpservice...but I havent 
actually cracked that part well...at one point I thought of introducing a 
function for capturing selected data.

Tracy Spratt [EMAIL PROTECTED] wrote:



Ok, that is reasonable, what does not work?  Does your handler 
get called? Does it contain the reference you need?  How are you updating the 
dataProvider?



Tracy



  
-
  
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mathe Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie




I have two pages. The first is the main. In the main I load my  
xml data as follows using Httpservice. I pass this data

Re: [flexcoders] newbie

2007-09-05 Thread Tom Chiverton
On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know which part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation infrastructures
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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


Re: [flexcoders] newbie

2007-09-05 Thread Mathe Maema
I have two pages. The first is the main. In the main I load my  xml data as 
follows using Httpservice. I pass this data to the second page as follows: 
  SearchView id=searchView label=Search  accommodations={accoms} /
  // accommodations has been declared publicly in SearchView.mxml and accoms is 
the variable that was used to accept data sent by httpservice.  Once the data 
is passed, I display in the datagrid. All is fine at this stage.
   
  My second step was to attempt to filter the data in the datagrid and this is 
where my trouble began. I have two actionscript files one is for carrying out 
the filtering and the other is for the filterEvent. oh by the way there is yet 
another actionscript file which is essentially the class file for 
accommodations.  At this point, the following sequence of events can take place:

   a click on a checkbox calls a function dispatchFilter  
   the dispatch filter creates an instance of class filterevent and dispatches 
the event  
   the dispatched event takes as its parameter instance of the filter class and 
thus reviews what has been checked or unchecked..
  I tried using a get function but a while I realised that I miss something 
relating to passing data between components.
  
Tom Chiverton [EMAIL PROTECTED] wrote:
  On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know which part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation infrastructures
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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



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





   
-
 For ideas on reducing your carbon footprint visit Yahoo! For Good this month.

RE: [flexcoders] newbie

2007-09-05 Thread Tracy Spratt
Ok, that is reasonable, what does not work?  Does your handler get
called? Does it contain the reference you need?  How are you updating
the dataProvider?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie

 

I have two pages. The first is the main. In the main I load my  xml data
as follows using Httpservice. I pass this data to the second page as
follows: 

SearchView id=searchView label=Search  accommodations={accoms} /

// accommodations has been declared publicly in SearchView.mxml and
accoms is the variable that was used to accept data sent by httpservice.
Once the data is passed, I display in the datagrid. All is fine at this
stage.

 

My second step was to attempt to filter the data in the datagrid and
this is where my trouble began. I have two actionscript files one is for
carrying out the filtering and the other is for the filterEvent. oh by
the way there is yet another actionscript file which is essentially the
class file for accommodations.  At this point, the following sequence of
events can take place:

*   a click on a checkbox calls a function dispatchFilter
*   the dispatch filter creates an instance of class filterevent and
dispatches the event
*   the dispatched event takes as its parameter instance of the
filter class and thus reviews what has been checked or unchecked..

I tried using a get function but a while I realised that I miss
something relating to passing data between components.


Tom Chiverton [EMAIL PROTECTED] wrote:

On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know which
part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation
infrastructures
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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



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



 

  



For ideas on reducing your carbon footprint visit Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html  this month. 

 



RE: [flexcoders] newbie

2007-09-05 Thread Gordon Smith
If you're writing an app with multiple components, you need a clear
understanding of how each component will reference the others. For
example, if you write
 
Application
SearchView id=searchView/
...
/Application
 
then in the Application script you can refer to searchView to get the
SearchView instance and in the SearchView script you can refer to
parentDocument or application to get the Application instance.
 
If your searchView script has code like
 
private var filter:SearchViewFilter;
 
private someMethod():void
{
...
filter = new SearchViewFilter();
...
}
 
then your searchView can access the SearchViewFilter instance as
'filter'. However, you don't have a back reference from the
SearchViewFilter instance to the SearchView unless you do somethign like
pass 'this' in the constructor and store it.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 11:52 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie



I have two pages. The first is the main. In the main I load my  xml data
as follows using Httpservice. I pass this data to the second page as
follows: 
SearchView id=searchView label=Search  accommodations={accoms} /
// accommodations has been declared publicly in SearchView.mxml and
accoms is the variable that was used to accept data sent by httpservice.
Once the data is passed, I display in the datagrid. All is fine at this
stage.
 
My second step was to attempt to filter the data in the datagrid and
this is where my trouble began. I have two actionscript files one is for
carrying out the filtering and the other is for the filterEvent. oh by
the way there is yet another actionscript file which is essentially the
class file for accommodations.  At this point, the following sequence of
events can take place:

*   a click on a checkbox calls a func! tion dispatchFilter 
*   the dispatch filter creates an instance of class filterevent and
dispatches the event 
*   the dispatched event takes as its parameter instance of the
filter class and thus reviews what has been checked or unchecked..

I tried using a get function but a while I realised that I miss
something relating to passing data between components.

Tom Chiverton [EMAIL PROTECTED] wrote:

On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know which
part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation
infrastructures
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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



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



http://docs.yahoo.com/info/terms/






For ideas on reducing your carbon footprint visit Yahoo! For Good
http://uk.promotions.yahoo.com/forgood/environment.html  this month. 

 


RE: [flexcoders] newbie

2007-09-05 Thread Mathe Maema
Main
  Application
Script
//sending data methods using httpservice to say var accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application
   
  SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox
   
  filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked); //filter hold values of 
selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter, live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }
   
  Above is my abbreviated code. I think my problem is that I am unsure about 
how to get the result data after filtering. In my mind the filtering function 
is working on the data retrieved using httpservice...but I havent actually 
cracked that part well...at one point I thought of introducing a function for 
capturing selected data.

Tracy Spratt [EMAIL PROTECTED] wrote:
  Ok, that is reasonable, what does not work?  Does your handler 
get called? Does it contain the reference you need?  How are you updating the 
dataProvider?
  Tracy
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe 
Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie

  
  I have two pages. The first is the main. In the main I load my  xml 
data as follows using Httpservice. I pass this data to the second page as 
follows: 

SearchView id=searchView label=Search  accommodations={accoms} /

// accommodations has been declared publicly in SearchView.mxml and accoms 
is the variable that was used to accept data sent by httpservice.  Once the 
data is passed, I display in the datagrid. All is fine at this stage.



My second step was to attempt to filter the data in the datagrid and this 
is where my trouble began. I have two actionscript files one is for carrying 
out the filtering and the other is for the filterEvent. oh by the way there is 
yet another actionscript file which is essentially the class file for 
accommodations.  At this point, the following sequence of events can take place:


   a click on a checkbox calls a function dispatchFilter  
   the dispatch filter creates an instance of class filterevent and dispatches 
the event  
   the dispatched event takes as its parameter instance of the filter class and 
thus reviews what has been checked or unchecked..
I tried using a get function but a while I realised that I miss something 
relating to passing data between components.


Tom Chiverton [EMAIL PROTECTED] wrote:

On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know which part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation infrastructures
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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



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





-
  
  For ideas on reducing your carbon footprint visit Yahoo! For Good this month

RE: [flexcoders] newbie

2007-09-05 Thread Tracy Spratt
Does your handler get called? Does it contain the reference you need?
How are you applying the filter?  Are you calling refresh()?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 5:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

 

Main

Application
Script
//sending data methods using httpservice to say var accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application

 

SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox

 

filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked); //filter hold values
of selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter, live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }

 

Above is my abbreviated code. I think my problem is that I am unsure
about how to get the result data after filtering. In my mind the
filtering function is working on the data retrieved using
httpservice...but I havent actually cracked that part well...at one
point I thought of introducing a function for capturing selected
data.

Tracy Spratt [EMAIL PROTECTED] wrote:

Ok, that is reasonable, what does not work?  Does your handler
get called? Does it contain the reference you need?  How are you
updating the dataProvider?

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie

I have two pages. The first is the main. In the main I load my
xml data as follows using Httpservice. I pass this data to the second
page as follows: 

SearchView id=searchView label=Search
accommodations={accoms} /

// accommodations has been declared publicly in SearchView.mxml
and accoms is the variable that was used to accept data sent by
httpservice.  Once the data is passed, I display in the datagrid. All is
fine at this stage.

My second step was to attempt to filter the data in the datagrid
and this is where my trouble began. I have two actionscript files one is
for carrying out the filtering and the other is for the filterEvent. oh
by the way there is yet another actionscript file which is essentially
the class file for accommodations.  At this point, the following
sequence of events can take place:

*   a click on a checkbox calls a function dispatchFilter
*   the dispatch filter creates an instance of class
filterevent and dispatches the event
*   the dispatched event takes as its parameter instance of
the filter class and thus reviews what has been checked or unchecked..

I tried using a get function but a while I realised that I miss
something relating to passing data between components.


Tom Chiverton [EMAIL PROTECTED] wrote:

On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know
which part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation
infrastructures
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

This email is intended only for the use of the addressee
named above and may be confidential or legally privileged. If you

RE: [flexcoders] newbie

2007-09-05 Thread Mathe Maema
This is the function I thought of introducing.  I didn't introduce it because I 
couldn't really work out how it would be called if I wanted data to be updated 
automatically i.e. without a button click or something like that. 
  [Bindable]
   private var selectedAccoms:ArrayCollection;
   public function updateGrid():void
   {
   selectedAccoms = new ArrayCollection(accommodations);
   //selectedAccoms.filterFunction =;
   selectedAccoms.refresh();
   dgAccom.dataProvider = selectedAccoms;
   }

Tracy Spratt [EMAIL PROTECTED] wrote:
  Does your handler get called? Does it contain the reference you 
need? How are you applying the filter?  Are you calling refresh()?
  Tracy
  
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mathe 
Maema
Sent: Wednesday, September 05, 2007 5:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

  
  Main

Application
Script
//sending data methods using httpservice to say var accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application



SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox



filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked); //filter hold values of 
selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter, live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }



Above is my abbreviated code. I think my problem is that I am unsure about 
how to get the result data after filtering. In my mind the filtering function 
is working on the data retrieved using httpservice...but I havent actually 
cracked that part well...at one point I thought of introducing a function for 
capturing selected data.

Tracy Spratt [EMAIL PROTECTED] wrote:

Ok, that is reasonable, what does not work?  Does your handler get 
called? Does it contain the reference you need?  How are you updating the 
dataProvider?

Tracy

  
-
  
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Mathe Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie


I have two pages. The first is the main. In the main I load my  xml 
data as follows using Httpservice. I pass this data to the second page as 
follows: 


  SearchView id=searchView label=Search  accommodations={accoms} /


  // accommodations has been declared publicly in SearchView.mxml and 
accoms is the variable that was used to accept data sent by httpservice.  Once 
the data is passed, I display in the datagrid. All is fine at this stage.


  My second step was to attempt to filter the data in the datagrid and this 
is where my trouble began. I have two actionscript files one is for carrying 
out the filtering and the other is for the filterEvent. oh by the way there is 
yet another actionscript file which is essentially the class file for 
accommodations.  At this point, the following sequence of events can take place:



   a click on a checkbox calls a function dispatchFilter  
   the dispatch filter creates an instance of class filterevent and dispatches 
the event  
   the dispatched event takes as its parameter instance of the filter class and 
thus reviews what has been checked or unchecked..
  I tried using a get function but a while I realised that I miss something 
relating to passing data between components.


  
Tom Chiverton [EMAIL PROTECTED] wrote:


  On Wednesday 05 Sep 2007, [EMAIL PROTECTED] wrote:
 I am sorry no code is included. I really didn't know which part to
 include.

Be specific, and try one part at a time.
What have your tried ? Why didn't it work ?

-- 
Tom Chiverton
Helping to widespreadedly accelerate eigth-generation infrastructures
on: http://thefalken.livejournal.com



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

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

RE: [flexcoders] newbie

2007-09-05 Thread Tracy Spratt
Call it in the result handler.

 

Either apply the filter to the main instance level variable
accomodations, or do as you have and then assign selectedAccoms to the
dataGrid dataProvider.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 6:57 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

 

This is the function I thought of introducing.  I didn't introduce it
because I couldn't really work out how it would be called if I wanted
data to be updated automatically i.e. without a button click or
something like that. 

[Bindable]
   private var selectedAccoms:ArrayCollection;
   public function updateGrid():void
   {
   selectedAccoms = new ArrayCollection(accommodations);
   //selectedAccoms.filterFunction =;
   selectedAccoms.refresh();
   dgAccom.dataProvider = selectedAccoms;
   }

Tracy Spratt [EMAIL PROTECTED] wrote:

Does your handler get called? Does it contain the reference you
need? How are you applying the filter?  Are you calling refresh()?

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 5:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie

Main

Application
Script
//sending data methods using httpservice to say var
accommodations
/Script
SearchView id=search lodgings={accommodations}/
/Application

SearchView
HBox
Script
[Bindable]
public var lodgings:ArrayCollections;
/Script
filterComp id=compfil/ 
displayGrid id=dg dataprovider={lodgings}/
HBox

filterComp
//assume it has 2 checkboxes: chk1 and chk2 which call
// dispatchFilter() when clicked
private function dispatchFilter():void
{
var event:FilterEvent = 
new FilterEvent(filter, checked); //filter hold
values of selection of chk1  chk2
dispatchEvent(event);
}

filterEvent.as comstructor
public function FilterEvent(filter:MyFilter, live:Boolean)
{
super(FILTER);
this.filter = filter;
this.live = live;
}
MyFilter.as
public function accept(accommodation:Accommodation):Boolean
{
  
if (graded  !accommodation.graded)
 return false;
if (backpacker  !accommodation.backpacker)
 return false;
return true;
  }

Above is my abbreviated code. I think my problem is that I am
unsure about how to get the result data after filtering. In my mind the
filtering function is working on the data retrieved using
httpservice...but I havent actually cracked that part well...at one
point I thought of introducing a function for capturing selected
data.

Tracy Spratt [EMAIL PROTECTED] wrote:

Ok, that is reasonable, what does not work?  Does your
handler get called? Does it contain the reference you need?  How are you
updating the dataProvider?

Tracy






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Mathe Maema
Sent: Wednesday, September 05, 2007 2:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] newbie

I have two pages. The first is the main. In the main I
load my  xml data as follows using Httpservice. I pass this data to the
second page as follows: 

SearchView id=searchView label=Search
accommodations={accoms} /

// accommodations has been declared publicly in
SearchView.mxml and accoms is the variable that was used to accept data
sent by httpservice.  Once the data is passed, I display in the
datagrid. All is fine at this stage.

My second step was to attempt to filter the data in the
datagrid and this is where my trouble began. I have two actionscript
files one is for carrying out the filtering and the other is for the
filterEvent. oh by the way there is yet another actionscript file which
is essentially the class file for accommodations.  At this point, the
following sequence of events can take place:

*   a click on a checkbox calls a function
dispatchFilter
*   the dispatch filter creates an instance of class
filterevent and dispatches the event
*   the dispatched event takes as its parameter
instance of the filter class and thus reviews what has been checked or
unchecked

RE: [flexcoders] newbie - adapting flexstore

2007-09-04 Thread Tracy Spratt
Typically, a data-driven control, like DataGrid is bound to a
dataProvider.  When the dataProvider changes, the control automatically
updates.  

 

In mxml, this means the DG dataProvider is bound to the instance level
ArrayCollection variable _acMyData: mx:DataGrid ...
dataProvider={_acMyData}

 

When _acMyData changes, the data grid will automatically update.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of g07m5064
Sent: Monday, September 03, 2007 4:36 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie - adapting flexstore

 

Hi,
I am new to flex. I would like to adapt the flexstore example such
that the filtered results are displayed in a grid (this is definitely
inspired by home locator). Anyway, after the filtering, I don't quite
comprehend how the datagrid will be updated. Any ideas?

 



Re: [flexcoders] newbie - adapting flexstore

2007-09-04 Thread Sherif Abdou
i actually redid the flex store and i wrote alot of comments and explantaion on 
how it works for my practice but i have no idea if i would be allowed to 
release it. does anyone know who i can contact to get permission? 

- Original Message 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, September 4, 2007 10:16:18 AM
Subject: RE: [flexcoders] newbie - adapting flexstore









  












Typically, a data-driven control, like DataGrid
is “bound” to a dataProvider.  When the dataProvider changes, the
control automatically updates.  
 

  
 

In mxml, this means the DG dataProvider is
bound to the instance level ArrayCollection variable _acMyData: mx:DataGrid
… dataProvider=”{_acMyData}”
 

  
 

When _acMyData changes, the data grid will
automatically update.
 

  
 

Tracy
 

  
 










From:
[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of 
g07m5064

Sent: Monday, September 03, 2007
4:36 PM

To: [EMAIL PROTECTED] ups.com

Subject: [flexcoders] newbie -
adapting flexstore
 




  
 







Hi,

I am new to flex. I would like to adapt the flexstore example such

that the filtered results are displayed in a grid (this is definitely

inspired by home locator). Anyway, after the filtering, I don't quite

comprehend how the datagrid will be updated. Any ideas?
 
















  







!--

#ygrp-mkp{
border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;}
#ygrp-mkp hr{
border:1px solid #d8d8d8;}
#ygrp-mkp #hd{
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;}
#ygrp-mkp #ads{
margin-bottom:10px;}
#ygrp-mkp .ad{
padding:0 0;}
#ygrp-mkp .ad a{
color:#ff;text-decoration:none;}
--



!--

#ygrp-sponsor #ygrp-lc{
font-family:Arial;}
#ygrp-sponsor #ygrp-lc #hd{
margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
#ygrp-sponsor #ygrp-lc .ad{
margin-bottom:10px;padding:0 0;}
--



!--

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

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

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

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








   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz
 

Re: [flexcoders] newbie - adapting flexstore

2007-09-04 Thread Mathe Maema
Thanks guys. I tried binding my data to the dataprovider. That didn't work. I 
suppose I have some logical problems with my code. 
  This is essentially what I want to happen. I click on the checkbox for 
triband and use a slider to adjust the price and relevant data is displayed.  I 
have retained much of the flexstore code but perhaps fail to understand how the 
data is retained after filtering. I will review my code again.
   
  Thanks

Sherif Abdou [EMAIL PROTECTED] wrote:
  i actually redid the flex store and i wrote alot of comments and 
explantaion on how it works for my practice but i have no idea if i would be 
allowed to release it. does anyone know who i can contact to get permission? 

  - Original Message 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, September 4, 2007 10:16:18 AM
Subject: RE: [flexcoders] newbie - adapting flexstore


Typically, a data-driven control, like DataGrid is “bound” to a 
dataProvider.  When the dataProvider changes, the control automatically 
updates.  
   
  In mxml, this means the DG dataProvider is bound to the instance level 
ArrayCollection variable _acMyData: mx:DataGrid … dataProvider=”{_acMyData}”
   
  When _acMyData changes, the data grid will automatically update.
   
  Tracy
   
  
-
  
  From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On 
Behalf Of g07m5064
Sent: Monday, September 03, 2007 4:36 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] newbie - adapting flexstore

   
Hi,
I am new to flex. I would like to adapt the flexstore example such
that the filtered results are displayed in a grid (this is definitely
inspired by home locator). Anyway, after the filtering, I don't quite
comprehend how the datagrid will be updated. Any ideas?

  









  
-
  Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.   

 

   
-
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.

RE: [flexcoders] Newbie getting annoyed with Drag and Drop :-)

2007-06-06 Thread Martyn Joyce
Cheers Alex, you are a god among men!!

 

I didn't add event.preventDefault() but you put me on the right direction...
I had dropEnabled=true which I assumed could do no harm but it was causing
the problem.

 

cheers

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 05 June 2007 18:30
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Newbie getting annoyed with Drag and Drop :-)

 

Took a quick peek.  I didn't see calls to event.preventDefault() which are
usually required when overriding drag/drop behavior.

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of martz256
Sent: Tuesday, June 05, 2007 7:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie getting annoyed with Drag and Drop :-)

 

Hi Guys,

I have recently started to create a small flex application and the 
major aspect of it is drag and drop functionality.

I am dragging into a TileList and i can't get the thing to accept my 
drag.

I have put up some code for the project, ive cut loads out of it to 
try and simplify but the main problem still exists.

http://www.komodomedia.co.uk/dragdrop/mainscreen.html (right click 
for source)

I want to drag the picture onto the TileList on the right. 
The 'onRightDragEnter' function fires correctly but it will not allow 
me to drop onto it!

My only guess is it is something to do with the Drag source and my 
Slide class, but it all looks ok to me.

A fresh pair of eyes and any pointers would be much appreciated.

Cheers

 



RE: [flexcoders] Newbie getting annoyed with Drag and Drop :-)

2007-06-05 Thread Alex Harui
Took a quick peek.  I didn't see calls to event.preventDefault() which
are usually required when overriding drag/drop behavior.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of martz256
Sent: Tuesday, June 05, 2007 7:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie getting annoyed with Drag and Drop :-)

 

Hi Guys,

I have recently started to create a small flex application and the 
major aspect of it is drag and drop functionality.

I am dragging into a TileList and i can't get the thing to accept my 
drag.

I have put up some code for the project, ive cut loads out of it to 
try and simplify but the main problem still exists.

http://www.komodomedia.co.uk/dragdrop/mainscreen.html
http://www.komodomedia.co.uk/dragdrop/mainscreen.html  (right click 
for source)

I want to drag the picture onto the TileList on the right. 
The 'onRightDragEnter' function fires correctly but it will not allow 
me to drop onto it!

My only guess is it is something to do with the Drag source and my 
Slide class, but it all looks ok to me.

A fresh pair of eyes and any pointers would be much appreciated.

Cheers

 



Re: [flexcoders] Newbie in need of help with graphics

2007-05-05 Thread Daniel Freiman

check out:

http://livedocs.adobe.com/flex/201/html/05_Display_Programming_162_07.html

Daniel Freiman
nondocs http://nondocs.blogspot.com

On 5/5/07, williamkusumo [EMAIL PROTECTED] wrote:


  Please forgive this stupid question. I can't seem to figure out how to
draw a simple rectangle in a Flex app...:(

I know it involve the graphics object and I have to call drawRect at
some point. But where do I put this code, and how do I attach this
rectangle into one of the container?

Any help is much appreciated. I can't seem to find any tutorial that
is actually working either.

Thanks!

 



Re: [flexcoders] Newbie in need of help with graphics

2007-05-05 Thread Manish Jethani
On 5/5/07, williamkusumo [EMAIL PROTECTED] wrote:
 Please forgive this stupid question. I can't seem to figure out how to
 draw a simple rectangle in a Flex app...:(

 I know it involve the graphics object and I have to call drawRect at
 some point. But where do I put this code, and how do I attach this
 rectangle into one of the container?

Here's a simple component that draws a 100x100 rectangle.

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

public class RectangleComponent extends UIComponent {
  override protected function updateDisplayList(w:Number, h:Number):void
  {
super.updateDisplayList();

var g:Graphics = this.graphics;
g.clear();
g.beginFill(0xFF);
g.drawRect(0, 0, w, h);
g.endFill();
  }
}
  }

In your application's MXML code:

 mx:VBox
   local:RectangleComponent xmlns:local=* width=100 height=100 /
 /mx:VBox

Note that in Flex components should ideally delegate any graphics work
to a skin class, and any colours, etc., should come from CSS styles
(as opposed to being hard-coded in the component's code).

http://livedocs.adobe.com/flex/2/langref/flash/display/Graphics.html


RE: [flexcoders] Newbie createPopUp problems

2007-04-17 Thread Kenneth Sutherland
If you want a quick example, try the following, replacing the var's for
something more meaningfull where required. This will do popup's as well
as setting var's inside them.  You used to be able to do this when
creating a popup in flex 1.5, but now you can do it as below as you
don't pass in an object when you addPopUp anymore. 

Public function openUpAPopUp() : void {

var createdPopUp:YourTitleWindow = 

new YourTitleWindow ();

 

createdPopUp.someVar =
whateverYouWishToInitilise;

createdPopUp.width   = 325;

createdPopUp.height  = 125;   



 


PopUpManager.addPopUp( 

createdPopUp, 

DisplayObject(
mx.core.Application.application ), 

true

);



PopUpManager.centerPopUp(
createdPopUp );

}

 

Then just create a file called YourTitleWindow.mxml which is a
titleWindow and you'll have an instant pop up in the center of your
application.

Or just go to
http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html for
some flex 2 examples

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fredsells
Sent: 16 April 2007 20:29
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie createPopUp problems

 

I've copied various examples of using PopUpManager.createPopUp but
cannot get it to work.  I'm running from Eclipse using the flex Eclipse
plug-in under XP.  Eclipse does not show any errors (i.e. red marks) in
either file, but when I run I get a dialog Errors exist in required
application.  

I have tried creating a new project and still have the same problem.  I
have been searching for 2 days now and cannot find a clue.  My code is
below.  

Is there some way to get better debug/diagnostic info in this case.  Can
anyone see what's wrong?

zflex001.mxml

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
   mx:Script
   ![CDATA[
   import dialog;
   function openDialog():Void {
  var popupParent:zflex001 = this;
  var isModal:Boolean = true;
  var initObj:Object = { title:Delete Record };
  var verifyPopUp = mx.managers.PopUpManager.createPopUp(
popupParent, dialog, isModal, initObj );
   }
   ]]
   /mx:Script
   mx:Button label=Verify click=openDialog(); /
/mx:Application


dialog.mxml

?xml version=1.0 encoding=utf-8?
mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; width=300
height=120 title=Verify Action 
   mx:Label id=lblVerify text=Are you sure you want to do this? /
   mx:HBox
  mx:Button label=Ok /
  mx:Button label=Cancel  /
   /mx:HBox
/mx:TitleWindow





 



Re: [flexcoders] Newbie - Hosting requirements

2007-04-16 Thread Kevin
There are no specific hosting requirements to serve the front end SWF  
files from your server. Any webserver will do that. It's the backend  
that you need to be concerned about, however, Flex is extremely  
Flexible when it comes to backend integration so there is not one  
answer.


For example, if all your backend data is coming from WebServices or  
static XML files, then you will not need any 'extra' programing  
languages installed on the server since Flex can communicate with  
these services directly.  However, more complicated Flex programs  
will call Cold Fusion, PHP or Java services which interface with any  
number of difference databases or external APIs.


It is impossible to say what you will need without understanding the  
scope of what you want to do.  It's probably best to spend some time  
outlining your needs in terms of functionality and data storage as  
well as your available skill sets (ie. do you already know some PHP,  
do you have a friend who codes Java?).  Once you know those details  
you will then be able to choose an appropriate host to support your  
backend needs.


I hope that helps.

- Kevin



On Apr 15, 2007, at 7:01 PM, simonhamelech wrote:


Are there any requirements that must be supported by my web hosting
company in order to run an web application built using FlexBuilder and
AS3?







Re: [flexcoders] Newbie createPopUp problems

2007-04-16 Thread Brian Hegeman
check the Problems View for the error. Window  Show View. It's in the
General category. This should show what errors exist in your app.

HTH

On 4/16/2007 3:29 PM, fredsells wrote:
 I've copied various examples of using PopUpManager.createPopUp but
 cannot get it to work.  I'm running from Eclipse using the flex
 Eclipse plug-in under XP.  Eclipse does not show any errors (i.e. red
 marks) in either file, but when I run I get a dialog Errors exist in
 required application. 

 I have tried creating a new project and still have the same problem. 
 I have been searching for 2 days now and cannot find a clue.  My code
 is below. 

 Is there some way to get better debug/diagnostic info in this case. 
 Can anyone see what's wrong?

 _*zflex001.mxml*_

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
mx:Script
![CDATA[
import dialog;
function openDialog():Void {
   var popupParent:zflex001 = this;
! ;   var isModal:Boolean = true;
   var initObj:Object = { title:Delete Record };
   var verifyPopUp = mx.managers.PopUpManager.createPopUp(
 popupParent, dialog, isModal, initObj );
}
]]
/mx:Script
mx:Button label=Verify click=openDialog(); /
 /mx:Application


 _*dialog.mxml*_

 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;
 width=300 height=120 title=Verify Action 
mx:Label id=lblVerify text=Are you sure you want to do
 this? /
mx:HBox
   mx:Button label=Ok /
   mx:Button label=Cancel  /
/mx:HBox
 /mx:TitleWindow



 

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



RE: [flexcoders] newbie question: Timer across components..

2007-03-28 Thread Tracy Spratt
If an event bubbles you can listen for it in any ancestor, like
Application.application.

 

Look at the docs for the timer event, to se if if bubbles.  If it does
not, in the timer component, re-dispatch an event, setting the second
argument to true, to make it bubble.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of iilsley
Sent: Tuesday, March 27, 2007 11:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie question: Timer across components..

 


Is it possible to have a Timer in one component and have another
component 
execute a function when that timer fires ?

eg:

Comp1 has a timer set for 3 seconds .. 

In Comp2 I want to 'capture' the TimerEvent.TIMER from Comp1 to execute
a function defined in Comp2..

---
I currently have something working but I kinda feel its just not the
right way .. :) .. 

In Comp2 I have 

Application.application.ti.addEventListener(TimerEvent.TIMER,fired);

where 'ti' is the Timer . 

Is there a better way to listen for the event  ?


Thanks



 



RE: [flexcoders] newbie question re: BarSeries programatically setting the showDataEffect

2007-03-16 Thread Gordon Smith
myBarSeries.setStyle(showDataEffect, myZoomOutEffect);
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of iilsley
Sent: Thursday, March 15, 2007 10:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie question re: BarSeries programatically
setting the showDataEffect




I have the following mxml code..

mx:BarSeries showDataEffect=zoomIn hideDataEffect=zoomOut ./?

Is there a way in actionScript I can change the show/hide DataEffects ? 

Looking @  the mx.charts.series
http://livedocs.adobe.com/flex/2/langref/mx/charts/series/package-detai
l.html  Class BarSeries docs and I cannot figure it out .. 

I see showDataEffect under Effects and that its triggered by a showData
event ...
but thats when the mental block kicks in ..

any help appreciated .. 

cheers





 


Re: [flexcoders] Newbie question: Datagrid and a WS

2007-01-29 Thread cisnky

Is the data from an xml document?

If so, can I see your xml doc?


On 1/29/07, Tony [EMAIL PROTECTED] wrote:


  hola peeps!

im a newbie, so please bear with me...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
layout=vertical
mx:WebService
id=myService
wsdl=http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl 

mx:operation name=getVehicleDataForCompany
resultFormat=object
mx:request
companyIdNumber1/companyIdNumber
/mx:request
/mx:operation
/mx:WebService
mx:DataGrid dataProvider={
myService.getVehicleDataForCompany.lastResult}
mx:columns
mx:DataGridColumn headerText=Vehicle Name
dataField=vehicleName/
mx:DataGridColumn headerText=Phone Number
dataField=phoneNumber/
mx:DataGridColumn headerText=Ip Address Number
dataField=ipAddressNumber/
/mx:columns
/mx:DataGrid
/mx:Application

is my webservice tag, and the resulting dataProvider param of the
mx:datagrid tag, right?
im close on getting data into a datagrid from a WS, i just want to make
sure...
im getting the datagrid with no data in it??

thanks for all your help!
and hello, im a newbie, but learning fast :)

tony weeg
navtrak, inc.
[EMAIL PROTECTED]





RE: [flexcoders] Newbie question: Datagrid and a WS

2007-01-29 Thread Andrew Trice
I talked to Tony on instant messenger about that... He was missing the
send() method for his web service.

 

_

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cisnky
Sent: Monday, January 29, 2007 3:17 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie question: Datagrid and a WS

 

Is the data from an xml document?

 

If so, can I see your xml doc?

 

On 1/29/07, Tony [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote: 

hola peeps!

im a newbie, so please bear with me...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=vertical
mx:WebService 
id=myService 
wsdl= http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl
http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl 
mx:operation name=getVehicleDataForCompany
resultFormat=object
mx:request
companyIdNumber1/companyIdNumber 
/mx:request
/mx:operation
/mx:WebService
mx:DataGrid
dataProvider={myService.getVehicleDataForCompany.lastResult}
mx:columns
mx:DataGridColumn headerText=Vehicle Name
dataField=vehicleName/
mx:DataGridColumn headerText=Phone Number
dataField=phoneNumber/ 
mx:DataGridColumn headerText=Ip Address Number
dataField=ipAddressNumber/
/mx:columns
/mx:DataGrid
/mx:Application

is my webservice tag, and the resulting dataProvider param of the
mx:datagrid tag, right? 
im close on getting data into a datagrid from a WS, i just want to make
sure...
im getting the datagrid with no data in it??

thanks for all your help!
and hello, im a newbie, but learning fast :)

tony weeg 
navtrak, inc.
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 

 



Re: [flexcoders] Newbie question: Datagrid and a WS

2007-01-29 Thread cisnky

Do you have time for another datagrid related question?

http://tech.groups.yahoo.com/group/flexcoders/message/62788



On 1/29/07, Andrew Trice [EMAIL PROTECTED] wrote:


   I talked to Tony on instant messenger about that… He was missing the
send() method for his web service.



_

*Andrew Trice*

Cynergy Systems, Inc.

http://www.cynergysystems.com



Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *cisnky
*Sent:* Monday, January 29, 2007 3:17 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Newbie question: Datagrid and a WS



Is the data from an xml document?



If so, can I see your xml doc?



On 1/29/07, *Tony* [EMAIL PROTECTED] wrote:

hola peeps!

im a newbie, so please bear with me...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml 
layout=vertical
mx:WebService
id=myService
wsdl= http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl 

mx:operation name=getVehicleDataForCompany
resultFormat=object
mx:request
companyIdNumber1/companyIdNumber
/mx:request
/mx:operation
/mx:WebService
mx:DataGrid dataProvider={
myService.getVehicleDataForCompany.lastResult}
mx:columns
mx:DataGridColumn headerText=Vehicle Name
dataField=vehicleName/
mx:DataGridColumn headerText=Phone Number
dataField=phoneNumber/
mx:DataGridColumn headerText=Ip Address Number
dataField=ipAddressNumber/
/mx:columns
/mx:DataGrid
/mx:Application

is my webservice tag, and the resulting dataProvider param of the
mx:datagrid tag, right?
im close on getting data into a datagrid from a WS, i just want to make
sure...
im getting the datagrid with no data in it??

thanks for all your help!
and hello, im a newbie, but learning fast :)

tony weeg
navtrak, inc.
[EMAIL PROTECTED]







RE: [flexcoders] Newbie question: Datagrid and a WS

2007-01-29 Thread Andrew Trice
In your case, you need to fire the event that sets the source of the
image whenever the data to the cellrenderer is changed.  Not on creation
complete.  You can do this two ways:

 

1)   bind the source of the image tag to the data :

mx:Image source={  data.file_name } /

 

2)   Override the set data function to update the image source
whenever the data has been updated.

 

I would go with #1 first.

 

-Andy

 

_

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cisnky
Sent: Monday, January 29, 2007 3:47 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie question: Datagrid and a WS

 

Do you have time for another datagrid related question?

 

http://tech.groups.yahoo.com/group/flexcoders/message/62788
http://tech.groups.yahoo.com/group/flexcoders/message/62788 



 

On 1/29/07, Andrew Trice [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

I talked to Tony on instant messenger about that... He was missing the
send() method for his web service. 

 

_

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com http://www.cynergysystems.com/ 

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice
http://www.cynergysystems.com/blogs/page/andrewtrice 

Email: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

Office: 866-CYNERGY 

 



From: [EMAIL PROTECTED] ups.com http://ups.com/
[mailto:[EMAIL PROTECTED] ups.com http://ups.com/ ] On Behalf Of
cisnky
Sent: Monday, January 29, 2007 3:17 PM
To: [EMAIL PROTECTED] ups.com http://ups.com/ 
Subject: Re: [flexcoders] Newbie question: Datagrid and a WS 

 

Is the data from an xml document?

 

If so, can I see your xml doc?

 

On 1/29/07, Tony  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote: 

hola peeps!

im a newbie, so please bear with me...

?xml version=1.0 encoding=utf-8? 
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=vertical
mx:WebService 
id=myService 
wsdl= http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl
http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl 
mx:operation name=getVehicleDataForCompany
resultFormat=object
mx:request
companyIdNumber1/companyIdNumber 
/mx:request
/mx:operation
/mx:WebService
mx:DataGrid
dataProvider={myService.getVehicleDataForCompany.lastResult}
mx:columns
mx:DataGridColumn headerText=Vehicle Name
dataField=vehicleName/
mx:DataGridColumn headerText=Phone Number
dataField=phoneNumber/ 
mx:DataGridColumn headerText=Ip Address Number
dataField=ipAddressNumber/
/mx:columns
/mx:DataGrid
/mx:Application

is my webservice tag, and the resulting dataProvider param of the
mx:datagrid tag, right? 
im close on getting data into a datagrid from a WS, i just want to make
sure...
im getting the datagrid with no data in it??

thanks for all your help!
and hello, im a newbie, but learning fast :)

tony weeg 
navtrak, inc.
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 

 

 



Re: [flexcoders] Newbie question: Datagrid and a WS

2007-01-29 Thread cisnky

I tried the first method originally, but I ended up with an icon for a
broken image.

I'm not sure if this because of the datatype?


On 1/29/07, Andrew Trice [EMAIL PROTECTED] wrote:


   In your case, you need to fire the event that sets the source of the
image whenever the data to the cellrenderer is changed.  Not on creation
complete.  You can do this two ways:



1)   bind the source of the image tag to the data :

mx:Image source={  data.file_name } /



2)   Override the set data function to update the image source
whenever the data has been updated.



I would go with #1 first.



-Andy



_

*Andrew Trice*

Cynergy Systems, Inc.

http://www.cynergysystems.com



Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *cisnky
*Sent:* Monday, January 29, 2007 3:47 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Newbie question: Datagrid and a WS



Do you have time for another datagrid related question?



http://tech.groups.yahoo.com/group/flexcoders/message/62788





On 1/29/07, *Andrew Trice* [EMAIL PROTECTED] wrote:

I talked to Tony on instant messenger about that… He was missing the
send() method for his web service.



_

*Andrew Trice*

Cynergy Systems, Inc.

http://www.cynergysystems.com



Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY


 --

*From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] *On
Behalf Of *cisnky
*Sent:* Monday, January 29, 2007 3:17 PM
*To:* [EMAIL PROTECTED] ups.com
*Subject:* Re: [flexcoders] Newbie question: Datagrid and a WS



Is the data from an xml document?



If so, can I see your xml doc?



On 1/29/07, *Tony*  [EMAIL PROTECTED] wrote:

hola peeps!

im a newbie, so please bear with me...

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml 
layout=vertical
mx:WebService
id=myService
wsdl= http://dev.navtrak.net/intranet/crm_cfc.cfc?wsdl 

mx:operation name=getVehicleDataForCompany
resultFormat=object
mx:request
companyIdNumber1/companyIdNumber
/mx:request
/mx:operation
/mx:WebService
mx:DataGrid dataProvider={
myService.getVehicleDataForCompany.lastResult}
mx:columns
mx:DataGridColumn headerText=Vehicle Name
dataField=vehicleName/
mx:DataGridColumn headerText=Phone Number
dataField=phoneNumber/
mx:DataGridColumn headerText=Ip Address Number
dataField=ipAddressNumber/
/mx:columns
/mx:DataGrid
/mx:Application

is my webservice tag, and the resulting dataProvider param of the
mx:datagrid tag, right?
im close on getting data into a datagrid from a WS, i just want to make
sure...
im getting the datagrid with no data in it??

thanks for all your help!
and hello, im a newbie, but learning fast :)

tony weeg
navtrak, inc.
[EMAIL PROTECTED]









RE: [flexcoders] Newbie: Dataprovider sintax for column series with xml dataprovider

2007-01-23 Thread Ely Greenfield
 
 
Hi Guille. See my previous post. You're going to write some actionscript
to pre-process your dataprovider into individual XMLLists, one for each
series.
 
ely.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of g_vaccarezza
Sent: Monday, January 22, 2007 12:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie: Dataprovider sintax for column series with
xml dataprovider



Guy,

I'm a a total dumba$$ trying to fill my column chart with my xml
dataprovider; I have so many doubts but let's concentrate in my current
problem:

I have a column with several series. I should like like this:

http://www.idslab.com.ar/tmp/chartShot.jpg
http://www.idslab.com.ar/tmp/chartShot.jpg 

And my dataprovider looks like:

data

- http://201.216.205.45/timmy/reports/viewXML/volumepayerreport/1/1#
month  label=January vol=12
  payorname label=p1 vol=9 / 
  payorname label=p2 vol=3 / 
  /month
- http://201.216.205.45/timmy/reports/viewXML/volumepayerreport/1/1#
month hidden_name=20052 label=February vol=13
  payorname label=p1 vol=13 / 
  /month
- http://201.216.205.45/timmy/reports/viewXML/volumepayerreport/1/1#
month hidden_name=20053 label=March vol=13
  payorname label=p1 vol=10 / 
  payorname label=p2 vol=3 / 
  /month

/data

So far, so good. I want to see those payornames displayed in series by
month.

Now the question: I know that I need to add series for each one of the
payornames I want to dispay, but I'm having trouble writing my
dataprovider declaration. It's more a sintax problem than a theory
problem, and it's driving me mad.

How shoud I declare the dataprovider for my column chart and each one of
the series? I still don't get how to properly link the xml structure
to work as a data provider so that I can pull the chart as shown.
Should it be something like dataprovider=myData.lastResult.data.month
or dataprovider=myData.lastResult.data.month.payorname... (none of
thos 2 is working correctly anyway).

Thanks for your help!
Guille


 


Re: [flexcoders] Newbie asks why Flex?

2007-01-16 Thread greg h

Mark,

I, like Bruce (aka boy_trike) have been in the industry a while (me only 2
decades :-)  And I, like you, have my roots as a database specialist.

I will reply more fully when I have time.

Hopefully others on the list will share their thoughts and answer your
questions in the mean time.

fyi ... I had posted here to FlexCoders last month re: why we are using Flex
2 rather that the other options.  You can find my post here:
http://tech.groups.yahoo.com/group/flexcoders/message/59697

btw ... just curious, what city or area are you in?  Are you open to
relocation?

Best regards,

g

On 1/15/07, mabrams_us [EMAIL PROTECTED]  wrote:


I write to solicit some recommendations as to why one should invest
in learning Flex as a career move opposed to focusing on other
technologies.

I am a Sr. mainframe database applications developer / architect who
returned to school FT as a web programming student. My technical
exposure and academic projects include Flash8, DW8, Visual Studio,
Premier, Vegas, MSSQL, mySQL, MS Access and writing web apps in
VB.NET, XHTML/CSS2, JavaScript, DOM, and some action script...

When school ends I need to work and I want to build data driven RIA
that incorporate streaming media and ecommerce. I know I can do this
in AJAX with more mainstream technologies and the Flex marketplace is
very small compared to its competitors.

1) Why choose Flex as opposed to developing in .NET? (Please save the
evil empire stuff :-) How important is a JAVA background to becoming
a good Flex programmer?  What other technologies should a Flex
programmer know?

2) Since Flex emerged in 2004, what type of experience are Flex
hiring managers looking for (I find what I consider unrealistic
position memos on the job sites, e.g. 10 years of Flex experience
preferred …) and what's the best way to secure a position as a Flex
programmer if your employer didn't decide this for you?

TIA for your attention and recommendations.
Mark



Re: [flexcoders] Newbie alert - Trying to populate combobox w. httpservice

2007-01-14 Thread Ben Marchbanks
you have to define the labelField when binding to 
dataProvider that has no label field.

mx:ComboBox id=cbEdition  labelField=myItem 
dataProvider={
  xmlEdition.lastResult.action.item}  /

Ben Marchbanks

::: alQemy ::: transforming information into 
intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918

Mark Bjærgager wrote:
 Being a newbie at Flex2 (and AS) I am trying to populate a combobox with
 specific values from a HTTPService.
 
 The xml is retrieved and the datagrid works fine, but the combobox dont
 display the data.
 What I'd like is to have {title} as label and {edition} as value - later I
 will be using the selected value as a parameter for a new http call.
 
 Any help will be really appreciated.
 
 thanks,
 Mark
 
 Here's my code :
 ?xml version=1.0?
 !-- Simple example to demonstrate the HTTPService tag. --
 mx:Application xmlns:mx= http://www.adobe.com/2006/mxml;
creationComplete=xmlEdition.send();
mx:HTTPService
id=xmlEdition
url= http://flex2.dk/mark/xml/ddt/xmlEdition.xml;
useProxy=false
showBusyCursor=true /
mx:Panel title=DDT height=95% width=95%
paddingTop=10 paddingBottom=10 paddingLeft=10
 paddingRight=10
mx:DataGrid id=dgPosts height=50% width=75%
dataProvider={xmlEdition.lastResult.action.item}
mx:columns
mx:DataGridColumn headerText=Posts dataField=edition/
mx:DataGridColumn headerText=Date dataField=title/
/mx:columns
/mx:DataGrid
mx:ComboBox id=cbEdition dataProvider={
 xmlEdition.lastResult.action.item}  /
/mx:Panel
 /mx:Application
 


Re: [flexcoders] Newbie Question: View states or view stack;

2006-12-20 Thread hank williams

On 12/20/06, Tolis Christomanos [EMAIL PROTECTED] wrote:


Hi all!

Can you tell me how to structure this..

I have a login form, a register form and then the main application.
Should i use states or the view stack to go from form to form and from
form to main application.

Thanks in advance.



I think in any context where you can, I would use a viewStack over
viewStates. ViewStates are very powerful when you need to do fancy
transitions, but they are more complex.

Regards,
Hank


--

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






Re: [flexcoders] Newbie help: model bindings work with some but not all

2006-12-16 Thread Rich Tretola

Can you post some code?

Rich
http://www.everythingflex.com


On 12/16/06, Guess! [EMAIL PROTECTED] wrote:


  Hi Everyone,
i am new to the group and new to Flex but not AS.
I have a CF / Flex app with Remoting and remote classes.
I have one class that is bound to the results of a remoting call.

the problem is that not all the results show up.
i can Alert the whole class, and my data is there. i can even alert
on the individual fields in the class and the data is also there.
(doing this on the function that fills the data model.)

I then have my model bound to the class, and my form fields bound to
the model. most of the form fields display data, but not all of them.

i have a few text fields that display nothing, no matter how i try to
bind to the model, those fields are empty, but not empty in the model
when i fill it.

can someone please help me diagnose this frustrating issue?

thanks

tim

 





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


Re: [flexcoders] Newbie question: Showing a vertical scroll bar on application

2006-11-30 Thread Lachlan Cotter

Hi Flexy,

If you create a popup window using the PopupManager than it is not  
part of the normal view hierarchy and so it will not create scroll  
bars on the application object, even if it is placed partially out of  
the visible region. Pop-ups float above the main application window  
so they will not affect the size or scroll policy of that object at all.


From the docs:

The SystemManager maintains multiple lists of children, one each for  
tooltips, cursors, popup windows. This is how it ensures that popup  
windows float above the main application windows and that tooltips  
float above that and cursors above that. If you simply examine the  
numChildren property or call the getChildAt() method on the  
SystemManager, you are accessing the main application window and any  
other windows that aren't popped up. To get the list of all windows,  
including popups, tooltips and cursors, use the rawChildren property.


http://livedocs.macromedia.com/flex/2/langref/mx/managers/ 
SystemManager.html


If you want to scroll them around, perhaps popups are not really what  
you're after?


It is possible to show a scroll bar on the application object, but  
not through pop-ups.


Cheers,
Lach

On 27/11/2006, at 7:36 AM, Flexy wrote:


Hi,



I am adding titlewindows using the popupManager on the application  
canvas, I have many of them so some are beyond the screen height,  
However, no vertical scrollbar shows – how can I make sure the  
vertical scroll bar shows if there are controls beyond the screen  
height?




Thanks,



Flexy.




Re: [flexcoders] Newbie: binding RadioButtonGroup to a boolean database column

2006-11-23 Thread Tom Chiverton
On Thursday 23 November 2006 00:01, jack_freud wrote:
 labels of the two RadioButtons I have), then thought it would be even
 cleaner to have the DB stored proc translate the value from the bit
 field to 'Yes', 'No' or 'null' so the binding statement would be simple.

Does '' work better than null ?

-- 
Tom Chiverton
Helping to seamlessly repurpose clicks-and-mortar systems



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Newbie Question: Paging a Datagrid.

2006-11-18 Thread Igor Costa

PCM.

Just dind't figure out what exactly you need it.

But I guess you are talking about CSS style. you can do it. Just take a
look at the CSS Style section in the Datagrid Docs.


Best.

On 11/17/06, proudestcodemonkey [EMAIL PROTECTED] wrote:


  I'd like to have a datagrid in my Flex application that will show X
records at a time and offer paging functionality. The datagrid
control is very functional, so I assumed this wouldn't be terribly
difficult. I've done some Googling, though, and haven't turned up much.

Any ideas?

Thanks in advance!
- PCM

 





--

Igor Costa
www.igorcosta.com


RE: [flexcoders] Newbie: Why can't I add a button!

2006-11-17 Thread Greg McCreath
Thanks very much for responding Gordon,   I appreciate your's and Matt's
time.

 

Why AS3?  Comfort zone I guess.  I'm coming from a Java background.  I'm
investigating the feasibility of creating an Eclipse like plug-in
framework for adding new screens and functionality that extend a solid
framework core.  The aim?  Having our P/S people being able to added
customer-specific screens and functionality and so on into a
standardized production framework without having to jump through
Struts/JSP/EJB/deployment hoops.

 

I'm pretty familiar with Eclipse having some plug in work there and I
guess that model is my starting point.

 

I'll look further into the XMXL side while I investigate.  Thanks.

 

Greg.

 

PS. If such an architecture already exists for Flex, then do tell!

 

Greg McCreath
Chief Technical Officer
TAFMO Limited
ABN:  94 109 766 592

Level 8, 342 Flinders Street
Melbourne
Victoria, 3000
Australia

http://www.tafmo.com
Ph http://www.tafmo.comPh  : +61 (0) 3 9018 6824
Fax : +61 (0) 3 9018 6899
Mobile : +61 (0) 401 988 957

  _  

From: Gordon Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, 17 November 2006 3:24 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Newbie: Why can't I add a button!

 

Sorry, although we've made it easy to write components in either MXML or
AS3, we haven't done the same with Application. If you are a newbie you
should start out with mx:Application in MXML. You can then use AS3 for
all your components if you really want to. I hope we can make this
better in a future release.

 

What's going on is that when the MXML compiler compiles an
mx:Application it autogenerates code to set up a lot of stuff such as
the default CSS type selectors that various components like Button
depend on. These aren't getting set up when you simply extend
Application as an AS3 class. When Button calls getStyle() to find out
what it's skin class should be, it's getting a null Clas reference.

 

Once you are no longer a newbie, you can use mxmlc's
-keep-generated-actionscript option to see all the generated code, and
set this stuff up yourself it you insist. But I really don't understand
why some developers like AS3 so much better tham MXML. Would you write a
web app all in JS and no HTML?

 

- Gordon

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bookymcnuggett
Sent: Thursday, November 16, 2006 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie: Why can't I add a button!

 

Hi All,

This is my first posting to this forum.

I have taken my first newbie steps to creating a stand-alone AS3 
Application and have come across something I cannot understand. I 
have an Application, and add an Image to it and it is fine. I add a 
Button to it and it blows up with the AS3 equivalent of a null 
pointer exception. The code is below. The error is below that. If I 
comment out the line that does the addChild(button) it correctly 
adds and displays the Image. What am I doing wrong? What is wrong 
with how I am adding a button? Both Button and Image descend from 
UIComponent.

package {

import mx.core.*;
import mx.events.*;
import mx.skins.halo.*;
import mx.styles.*;
import mx.controls.*;
import flash.display.*;

public class FirstApp extends Application
{
[Embed(source=connected_multiple_big.jpg)]
private var ImageClass:Class;

public function FirstApp()
{
super();
this.layout = vertical;
this.setStyle(borderSkin,mx.skins.halo.HaloBorder);
this.addEventListener(FlexEvent.APPLICATION_COMPLETE, doInit); 
}

private function doInit(e:FlexEvent):void {
var img:Image = new Image();
img.setStyle(verticalAlign,top);
img.source = ImageClass; 
addChild(img);

// the troublesome test button. addChild() here causes a null object 
reference exception
var button:Button = new Button();
button.label = label;
addChild(button); 

}
}
}
/// 

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at mx.core::UIComponent/getStyle()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kinForPhase()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kin()
at mx.controls::Button/mx.controls:Button::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/::validateProperties()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/::preloader_preloaderDoneHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction

RE: [flexcoders] Newbie: Why can't I add a button!

2006-11-17 Thread Gordon Smith
 Any ideas anyone?

 

About what? My previous reply explained that an mx:Application in MXML
autogenerates CSS selector setup code that you don't get when you simply
subclass Application in AS3. That's why this works and your previous
code didn't. Turn on -keep-autogenerated-actionscript to see this code.

 

- Gordon

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Greg McCreath
Sent: Thursday, November 16, 2006 8:06 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Newbie: Why can't I add a button!

 

Thanks.

 

It works fine as a MXML app.  Here it is.  Any ideas anyone?  

 

?xml version=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical creationComplete=startMe()

 

mx:Script

![CDATA[

 import mx.core.*;

 import mx.events.*;

 import mx.skins.halo.*;

 import mx.styles.*;

 import mx.controls.*;

 import flash.display.*;

 

  [Embed(source=connected_multiple_big.jpg)]

  private var ImageClass:Class;

   

public function startMe():void {

   var img:Image = new Image();

   img.setStyle(verticalAlign,top);

   img.source = ImageClass;  

   addChild(img);

   

var button:Button = new Button();

button.label = label;

addChild(button);  

}

]]

/mx:Script



/mx:Application

 

Greg McCreath
Chief Technical Officer
TAFMO Limited
ABN:  94 109 766 592

Level 8, 342 Flinders Street
Melbourne
Victoria, 3000
Australia

http://www.tafmo.com
Ph http://www.tafmo.comPh  : +61 (0) 3 9018 6824
Fax : +61 (0) 3 9018 6899
Mobile : +61 (0) 401 988 957



From: Matt Chotin [mailto:[EMAIL PROTECTED] 
Sent: Friday, 17 November 2006 2:35 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Newbie: Why can't I add a button!

 

Looks like the style code may not be loading correctly.  What happens if
you use an MXML file for your application instead of AS?

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bookymcnuggett
Sent: Thursday, November 16, 2006 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie: Why can't I add a button!

 

Hi All,

This is my first posting to this forum.

I have taken my first newbie steps to creating a stand-alone AS3 
Application and have come across something I cannot understand. I 
have an Application, and add an Image to it and it is fine. I add a 
Button to it and it blows up with the AS3 equivalent of a null 
pointer exception. The code is below. The error is below that. If I 
comment out the line that does the addChild(button) it correctly 
adds and displays the Image. What am I doing wrong? What is wrong 
with how I am adding a button? Both Button and Image descend from 
UIComponent.

package {

import mx.core.*;
import mx.events.*;
import mx.skins.halo.*;
import mx.styles.*;
import mx.controls.*;
import flash.display.*;

public class FirstApp extends Application
{
[Embed(source=connected_multiple_big.jpg)]
private var ImageClass:Class;

public function FirstApp()
{
super();
this.layout = vertical;
this.setStyle(borderSkin,mx.skins.halo.HaloBorder);
this.addEventListener(FlexEvent.APPLICATION_COMPLETE, doInit); 
}

private function doInit(e:FlexEvent):void {
var img:Image = new Image();
img.setStyle(verticalAlign,top);
img.source = ImageClass; 
addChild(img);

// the troublesome test button. addChild() here causes a null object 
reference exception
var button:Button = new Button();
button.label = label;
addChild(button); 

}
}
}
/// 

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at mx.core::UIComponent/getStyle()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kinForPhase()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kin()
at mx.controls::Button/mx.controls:Button::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/::validateProperties()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/::preloader_preloaderDoneHandler()
at 
flash.events

RE: [flexcoders] Newbie: Why can't I add a button!

2006-11-16 Thread Matt Chotin
Looks like the style code may not be loading correctly.  What happens if
you use an MXML file for your application instead of AS?

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bookymcnuggett
Sent: Thursday, November 16, 2006 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie: Why can't I add a button!

 

Hi All,

This is my first posting to this forum.

I have taken my first newbie steps to creating a stand-alone AS3 
Application and have come across something I cannot understand. I 
have an Application, and add an Image to it and it is fine. I add a 
Button to it and it blows up with the AS3 equivalent of a null 
pointer exception. The code is below. The error is below that. If I 
comment out the line that does the addChild(button) it correctly 
adds and displays the Image. What am I doing wrong? What is wrong 
with how I am adding a button? Both Button and Image descend from 
UIComponent.

package {

import mx.core.*;
import mx.events.*;
import mx.skins.halo.*;
import mx.styles.*;
import mx.controls.*;
import flash.display.*;

public class FirstApp extends Application
{
[Embed(source=connected_multiple_big.jpg)]
private var ImageClass:Class;

public function FirstApp()
{
super();
this.layout = vertical;
this.setStyle(borderSkin,mx.skins.halo.HaloBorder);
this.addEventListener(FlexEvent.APPLICATION_COMPLETE, doInit); 
}

private function doInit(e:FlexEvent):void {
var img:Image = new Image();
img.setStyle(verticalAlign,top);
img.source = ImageClass; 
addChild(img);

// the troublesome test button. addChild() here causes a null object 
reference exception
var button:Button = new Button();
button.label = label;
addChild(button); 

}
}
}
/// 

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at mx.core::UIComponent/getStyle()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kinForPhase()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kin()
at mx.controls::Button/mx.controls:Button::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/::validateProperties()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/::preloader_preloaderDoneHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/::displayClassCompleteHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::DownloadProgressBar/::timerHandler()
at mx.preloaders::DownloadProgressBar/::initCompleteHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/::dispatchAppEndEvent()
at mx.preloaders::Preloader/::appCreationCompleteHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()

 



RE: [flexcoders] Newbie: Why can't I add a button!

2006-11-16 Thread Gordon Smith
Sorry, although we've made it easy to write components in either MXML or
AS3, we haven't done the same with Application. If you are a newbie you
should start out with mx:Application in MXML. You can then use AS3 for
all your components if you really want to. I hope we can make this
better in a future release.

 

What's going on is that when the MXML compiler compiles an
mx:Application it autogenerates code to set up a lot of stuff such as
the default CSS type selectors that various components like Button
depend on. These aren't getting set up when you simply extend
Application as an AS3 class. When Button calls getStyle() to find out
what it's skin class should be, it's getting a null Clas reference.

 

Once you are no longer a newbie, you can use mxmlc's
-keep-generated-actionscript option to see all the generated code, and
set this stuff up yourself it you insist. But I really don't understand
why some developers like AS3 so much better tham MXML. Would you write a
web app all in JS and no HTML?

 

- Gordon

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bookymcnuggett
Sent: Thursday, November 16, 2006 5:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie: Why can't I add a button!

 

Hi All,

This is my first posting to this forum.

I have taken my first newbie steps to creating a stand-alone AS3 
Application and have come across something I cannot understand. I 
have an Application, and add an Image to it and it is fine. I add a 
Button to it and it blows up with the AS3 equivalent of a null 
pointer exception. The code is below. The error is below that. If I 
comment out the line that does the addChild(button) it correctly 
adds and displays the Image. What am I doing wrong? What is wrong 
with how I am adding a button? Both Button and Image descend from 
UIComponent.

package {

import mx.core.*;
import mx.events.*;
import mx.skins.halo.*;
import mx.styles.*;
import mx.controls.*;
import flash.display.*;

public class FirstApp extends Application
{
[Embed(source=connected_multiple_big.jpg)]
private var ImageClass:Class;

public function FirstApp()
{
super();
this.layout = vertical;
this.setStyle(borderSkin,mx.skins.halo.HaloBorder);
this.addEventListener(FlexEvent.APPLICATION_COMPLETE, doInit); 
}

private function doInit(e:FlexEvent):void {
var img:Image = new Image();
img.setStyle(verticalAlign,top);
img.source = ImageClass; 
addChild(img);

// the troublesome test button. addChild() here causes a null object 
reference exception
var button:Button = new Button();
button.label = label;
addChild(button); 

}
}
}
/// 

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at mx.core::UIComponent/getStyle()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kinForPhase()
at 
mx.controls::Button/http://www.adobe.com/2006/flex/mx/internal::viewS
http://www.adobe.com/2006/flex/mx/internal::viewS 
kin()
at mx.controls::Button/mx.controls:Button::commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/::validateProperties()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.managers::SystemManager/::preloader_preloaderDoneHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/::displayClassCompleteHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::DownloadProgressBar/::timerHandler()
at mx.preloaders::DownloadProgressBar/::initCompleteHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/::dispatchAppEndEvent()
at mx.preloaders::Preloader/::appCreationCompleteHandler()
at 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchE
ventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply
http://adobe.com/AS3/2006/builtin::apply ()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()

 



Re: [flexcoders] Newbie

2006-09-10 Thread Diego Guebel
Hi Steven,
I think this is happening to my posts as I posted two last week and never  
saw them.
Could you please fix this.
thanks in advance.
Diego.

On Sat, 09 Sep 2006 01:49:55 +1200, Steven Webster [EMAIL PROTECTED]  
wrote:

 Your first post to the list is moderated; then once you have posted
 once, your posts should go straight through - it's a simple anti-spam
 measure.
 However, for some reason some people's mail clients don't allow Yahoo!
 to recognise them the 2nd, 3rd, etc time they post -- so every post
 appears as their first post, and so all posts are moderated.  When the
 (several) moderators spot this pattern, we'll go into admin panel and
 change you to unmoderated.
 If you think you're being moderated, just let us know and we'll fix your
 settings for you.
 Best,
 Steven
Steven Webster
 Practice Leader (Rich Internet Applications and LiveCycle)
 Adobe Consulting
 Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
 p: +44 (0) 131 338 6108
 m: +44 (0) 7917 428 947
 [EMAIL PROTECTED]



 

   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of jburkett7
   Sent: 08 September 2006 04:51
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Newbie
   
   

   Hello All,
   
   Just joined today.
   
   I went back and read posts over the past month or so.
   
   Question? Is there a pecking order as to whether a question is

   answered and how long it takes for a post to show up? I was
   interested in comments on a previous post, but have not seen any

   responses. I read where some people have had problems with posts
 not
   showing up or taking hours/days to do so. Also in some cases
   questions had not been answered. I realize everyone is busy, but
 I do
   not want to offend the powers that be when I have to ask a
 question.
   
   So, are these issues from other flexcoders a fluke or did I miss

   something?
   
   J
   
   

   







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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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





RE: [flexcoders] Newbie

2006-09-10 Thread Dimitrios Gianninas

I have corrected this for you.

Dimitrios Gianninas
Optimal Payments Inc.

-Original Message-
From: flexcoders@yahoogroups.com on behalf of Diego Guebel
Sent: Sun 9/10/2006 5:19 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie
 
Hi Steven,
I think this is happening to my posts as I posted two last week and never  
saw them.
Could you please fix this.
thanks in advance.
Diego.

On Sat, 09 Sep 2006 01:49:55 +1200, Steven Webster [EMAIL PROTECTED]  
wrote:

 Your first post to the list is moderated; then once you have posted
 once, your posts should go straight through - it's a simple anti-spam
 measure.
 However, for some reason some people's mail clients don't allow Yahoo!
 to recognise them the 2nd, 3rd, etc time they post -- so every post
 appears as their first post, and so all posts are moderated.  When the
 (several) moderators spot this pattern, we'll go into admin panel and
 change you to unmoderated.
 If you think you're being moderated, just let us know and we'll fix your
 settings for you.
 Best,
 Steven
Steven Webster
 Practice Leader (Rich Internet Applications and LiveCycle)
 Adobe Consulting
 Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
 p: +44 (0) 131 338 6108
 m: +44 (0) 7917 428 947
 [EMAIL PROTECTED]



 

   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of jburkett7
   Sent: 08 September 2006 04:51
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Newbie
   
   

   Hello All,
   
   Just joined today.
   
   I went back and read posts over the past month or so.
   
   Question? Is there a pecking order as to whether a question is

   answered and how long it takes for a post to show up? I was
   interested in comments on a previous post, but have not seen any

   responses. I read where some people have had problems with posts
 not
   showing up or taking hours/days to do so. Also in some cases
   questions had not been answered. I realize everyone is busy, but
 I do
   not want to offend the powers that be when I have to ask a
 question.
   
   So, are these issues from other flexcoders a fluke or did I miss

   something?
   
   J
   
   

   







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






 




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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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

RE: [flexcoders] Newbie

2006-09-08 Thread Steven Webster





Your 
first post to the list is moderated; then once you have posted once, your posts 
should go straight through - it's a simple anti-spam 
measure.

However, for some reason some people's mail clients don't allow Yahoo! to 
recognise them the 2nd, 3rd, etc time they post -- so every post "appears" as 
their first post, and so all posts are moderated. When the (several) 
moderators spot this pattern, we'll go into admin panel and change you to 
unmoderated.

If you 
think you're being moderated, just let us know and we'll fix your settings for 
you.

Best,

Steven



  
  

  


  
  

Steven WebsterPractice Leader (Rich 
Internet Applications and LiveCycle)Adobe 
ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, 
EH12 9DQ, UKp: +44 (0) 131 338 6108
m: +44 (0)7917 428 947[EMAIL PROTECTED] 
  


  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  jburkett7Sent: 08 September 2006 04:51To: 
  flexcoders@yahoogroups.comSubject: [flexcoders] 
  Newbie
  
  
  Hello All,Just joined today.I went back and read posts over 
  the past month or so.Question? Is there a "pecking order" as to 
  whether a question is answered and how long it takes for a post to show 
  up? I was interested in comments on a previous post, but have not seen any 
  responses. I read where some people have had problems with posts not 
  showing up or taking hours/days to do so. Also in some cases questions 
  had not been answered. I realize everyone is busy, but I do not want to 
  "offend" the powers that be when I have to ask a question.So, are 
  these issues from other flexcoders a fluke or did I miss 
  something?J
__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



Re: [flexcoders] Newbie

2006-09-08 Thread Phil Marston






Possibly a fluky perspective - there are over 4000 members I think - I
see over 100 messages a day so the list is very busy and things get
missed or even forgotten. Also sometimes things just seem to get
ignored when it's clear that someone hasn't even bothered to read the
most basic documentation - there are about 5 or 7 pdfs of docs that
come with Flex - while you couldn't be expected to know the 1000's of
pages they amount to - it's worth looking at them for answers to your
questions before coming to the list - I didn't even know they existed
for ages! You can download them from here http://www.flex.org/ (on the
left) and they are very good for a change.

HTH

Phil

jburkett7 wrote:


  
  Hello All,
  
Just joined today.
  
I went back and read posts over the past month or so.
  
Question? Is there a "pecking order" as to whether a question is 
answered and how long it takes for a post to show up? I was 
interested in comments on a previous post, but have not seen any 
responses. I read where some people have had problems with posts not 
showing up or taking hours/days to do so. Also in some cases 
questions had not been answered. I realize everyone is busy, but I do 
not want to "offend" the powers that be when I have to ask a question.
  
So, are these issues from other flexcoders a fluke or did I miss 
something?
  
J
  
  
  



-- 
__ 
Phil Marston 
Technology Enhanced Learning
Centre for Learning  Teaching 
University of Aberdeen
Aberdeen
AB24 3QY

Email: [EMAIL PROTECTED]
Tel: +44(0)1224 273329
Mob: +44(0)7798 723660 
Web: http://www.abdn.ac.uk/clt/
__


__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




RE: [flexcoders] newbie question - HTTP servive

2006-08-18 Thread Cathy Reilly





In Flex 2, you need to use 
'event.lastResult'

- Cathy


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Robin 
BurrerSent: Thursday, August 17, 2006 9:59 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] newbie question - 
HTTP servive




Hi 
there,

I started playing 
around with the HTTP service. However I cant figure out how to access the 
actual result (in my case an xml string) 
If I set up a listener 
it just returns me an object in the onResult event. Why cant I access my xml 
string through event.result?
How do I access 
it?



 
public function 
onResult(event:ResultEvent):void
 
{
 
// why doesnt this work?
 
 
trace (event.result.toString());

 
// this works but its very ugly
 
//trace(event.message.body.toString());
 
}
 


Thanks


Robin


// 
the code of my sample application


?xml 
version="1.0"?
!-- Simple example 
to demonstrate the HTTPService tag. --
mx:Application 
xmlns:mx="http://www.adobe.com/2006/mxml"
 
creationComplete="go();"


 
mx:Script
 
![CDATA[
 
import mx.rpc.events.ResultEvent;
 

 

 
public function go():void
 
{
 

 
feedRequest.addEventListener(ResultEvent.RESULT,onResult); 

 
feedRequest.send();
 
}
 

 

 

 
public function 
onResult(event:ResultEvent):void
 
{
 
trace (event.result.toString());
 
//trace(event.message.body.toString());
 
}
 

 

 

 
]]
 
/mx:Script
 

 

 

 


 
mx:HTTPService 
 
id="feedRequest" 
 
url="" 

 
useProxy="false" /

 

/mx:Application 


__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] newbie question - HTTP servive

2006-08-18 Thread Tracy Spratt












lastResult is only for binding expressions.
You still use event.result in a handler function.



What is the resultFormat of the
HTTPService? If it is object, toString() might not give you anything
useful.



For that matter, when you say doesnt
work, exactly what do you mean?



Tracy















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Cathy Reilly
Sent: Friday, August 18, 2006
10:38 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] newbie
question - HTTP servive











In Flex 2, you need to use
'event.lastResult'



- Cathy









From: [EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Robin Burrer
Sent: Thursday, August 17, 2006
9:59 PM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] newbie
question - HTTP servive







Hi there,

I started playing around with the HTTP service. However I
cant figure out how to access the actual result (in my
case an xml string) 

If I set up a listener it just returns me an object in the
onResult event. Why cant I access my xml string through
event.result?

How do I access it?




public function onResult(event:ResultEvent):void


{


// why doesnt this work?



trace (event.result.toString());


// this works but its very ugly


//trace(event.message.body.toString());


}




Thanks

Robin

// the code of my sample application

?xml version=1.0?

!-- Simple example to demonstrate the HTTPService tag. --

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml

 creationComplete=go();

 mx:Script


![CDATA[


import mx.rpc.events.ResultEvent;








public function go():void


{





feedRequest.addEventListener(ResultEvent.RESULT,onResult);



feedRequest.send();


}











public function onResult(event:ResultEvent):void


{


trace (event.result.toString());


//trace(event.message.body.toString());


}











]]


/mx:Script

 

 

 

 

 mx:HTTPService 


id=feedRequest 

 url="">weblogs.macromedia.com/mchotin/index.xml



useProxy=false /

 

/mx:Application 












__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






Re: [flexcoders] Newbie Question - attaching a Sprite

2006-08-11 Thread Michael Schmalle



Hi,You could..var wrapper:IUIComponent = new UIComponent();wrapper.addChild(contentBg);panelOne.addChild(wrapper);This makes it harder to ref and size.You should look into skin subclasses like ProgrammaticSkin.
If you make a class that subclasses ProgrammaticSkin, then you can use the graphics of that class and override updateDisplayList() (do your drawing there).Then when you create your skin, it will be added to the canvas no problem.
You will also then have access to move() and setActualSize() of the skin that is drawing your graphics. Calling setActualSize() will then call your overriden updateDisplayList() method which will size you graphics rendering correctly.
Peace, MikeOn 8/11/06, soso noso [EMAIL PROTECTED] wrote:













  



Hi all - I've been doing due diligence to find an answer to this, as in I didn't come here first, but I'm not getting exactly how to apply visual coding to the mxml area.  
 For a quick example - I have a simple mxml file:  ?xml version=1.0 encoding=utf-8? customState:StateDev   xmlns:mx=
http://www.adobe.com/2006/mxmlxmlns:customStates=dev.state.*width=300height=100%creationComplete=drawContentArea();
   mx:Panel id=panelOne layout=absolute width=100% height=100% title=My Panel x=0 y=0/  /customState:StateDev
  easy enough. this can run fine alone but I just want to dynamically draw
 something on the stage.   so I figured I could attached a sprite and use the drawing api. like so:  package dev.state {  import mx.containers.Canvas;  import flash.display.Sprite; 
public class StateDev extends Canvas  {   public var contentBg:Sprite;   public var panelOne:Panel;   public function StateDev()   {super();
}  public function drawContentArea ():void   { 
   contentBg = new Sprite();contentBg.graphics.beginFill(0xFF);contentBg.graphics.drawRoundRect(0, 0, 150, 400, 10, 10);contentBg.graphics.endFill();
panelOne.addChild(contentBg);   }  } }   obviously this isn't working. I get the errorr TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED] to 
mx.core.IUIComponent.  can someone clue me in? or just point me in the direction of where maybe I can find the answer online since my searching and reading hasn't seemed to solve it.Thanks -
cb 
	
		Do you Yahoo!? Everyone is raving about the 
 all-new Yahoo! Mail Beta.
  













-- What goes up, does come down.

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] newbie poblem

2006-08-10 Thread Tom Chiverton
On Wednesday 09 August 2006 13:37, erixuss wrote:
 folder or to my server (with crossdomain.xml file) and change url nothing
 happens, the datagrid is empty. Anybody can help me?

Hard to tell with than little info.
Do you have the debug version of the Flash player installed ? Otherwise some 
(all ?) errors are just silently squished.

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

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

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




RE: [flexcoders] Newbie Help - simple login via CFC

2006-08-03 Thread Peter Watson












Property resut 



Typo here: event.resut.UserInfo.BrokerID




resut 
result 













From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of flycl65
Sent: Thursday, August 03, 2006
1:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Help
- simple login via CFC











Trying to do a simple login via CFC. Query SQL db and
return a field
value (BrokerID).

Returning the following error:
ReferenceError: Error #1069: Property resut not found on
mx.rpc.events.ResultEvent and there is no default value.

I tried doing it by returning the query and couldn't get it to work,
and now tried a structure. Help. ??

cffunction name=login access=remote
!-- make sure we have username and password --
cfargument name=username required=true
type=string /
cfargument name=password required=true
type=string /
cfquery name=getUser datasource=dentalsales
SELECT *
FROM Users
WHERE Logon = '#arguments.username#'
AND password = '#arguments.password#'
/cfquery

!-- if username and password are correct --
cfif getUser.recordCount eq 1
cfset userInfo = structNew()
cfset userInfo.isLoggedIn = true
cfset userInfo.username = getUser.logon
cfset userInfo.BrokerID = getUser.BrokerID
cfreturn userInfo /
/cfif 

--

private function login_result(event: Object):void
{


// login successful, remember the user.
if( (event.result) )
{
// assign BrokerID
this.BrokerID = event.resut.UserInfo.BrokerID;
trace(BrokerID);

if( this.rememberLogin.selected )
{
this.lso.data['username'] = this.username.text;
this.lso.data['password'] = this.password.text; 
}
else
{
this.lso.data['username'] = null;
this.lso.data['password'] = null; 
}

this.dispatchEvent( new Event('loginSuccessful') );
}
else
{
// login didn't work. show message
errorMessage(Login unsuccessful); 
}
}

/cffunction






__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






RE: [flexcoders] newbie needs best practices in looping thru XML

2006-07-10 Thread Tracy Spratt












toArray() will not prevent you frm having
multiple items. It must be something else.

Try:

public function afterSend(event:ResultEvent):void

I am surprised you dont get a compiler error here.



And as I recall, you use lastResult only in binding
expressions, and result in handler functions.



Tracy











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of meathead
Sent: Monday, July 10, 2006 5:55
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie needs
best practices in looping thru XML











Hi all and thanks in advance,

I have a combo box that fires off an HTTPService based on results 
from selection. From this HTTPService, I want to make a new pane 
for each record returned in an accordion. I was returning correct 
answers for multiple records, but not for results that numbered in 
one. Then I saw the mx.utils.ArrayUtil.toArray() thing and now I 
can only return results that number in one and not multiple. 

Question #1: Is this a good route to follow if I want to 
dynamically want to fill the panes of an accordion based on results 
from a query via XML. Or should I scrap and do something cooler.

Question #2: This only returns answers for conditions when one 
record is returned. How do I get it to work with multiple answers? 
I'm thinking this has something to do with it not grabbing the 
correct length in the for loop.

Here is some code.

mx:Script
![CDATA[
import mx.collections.*;
import mx.controls.Alert;
import mx.utils.ArrayUtil;
[Bindable]
public var resultArray:ArrayCollection;
public function afterSend():void
{
var arrData:Array = new Array; 
arrData = mx.utils.ArrayUtil.toArray
(event.lastResult.CircSec.CircuitID);

for (var i:int = 0; i  arrData.length; i++) {
Alert.show (arrData[i].FromBusName); 
}

}

Thanks again,
Aaron






__._,_.___





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








   



  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






Re: [flexcoders] newbie needs best practices in looping thru XML

2006-07-10 Thread Pan Troglodytes



I'm not exactly sure where you're running into the problem, as I don't use toArray. But here's how I solved the whole one result/multiple results problems, translated to use your terms: var a:Array; if (httpservice.lastResult.CircSec.CircuitID
 is ArrayCollection) a = httpservice.lastResult.CircSec.CircuitID.source else a = [httpservice.lastResult.CircSec.CircuitID];Hope that helps.On 7/10/06, 
meathead [EMAIL PROTECTED] wrote:













  



Hi all and thanks in advance,

I have a combo box that fires off an HTTPService based on results 
from selection.  From this HTTPService, I want to make a new pane 
for each record returned in an accordion.  I was returning correct 
answers for multiple records, but not for results that numbered in 
one.  Then I saw the mx.utils.ArrayUtil.toArray() thing and now I 
can only return results that number in one and not multiple.  

Question #1:  Is this a good route to follow if I want to 
dynamically want to fill the panes of an accordion based on results 
from a query via XML.  Or should I scrap and do something cooler.

Question #2:  This only returns answers for conditions when one 
record is returned.  How do I get it to work with multiple answers?  
I'm thinking this has something to do with it not grabbing the 
correct length in the for loop.

Here is some code.

mx:Script
![CDATA[
   import mx.collections.*;
   import mx.controls.Alert;
   import mx.utils.ArrayUtil;
	   [Bindable]
	   public var resultArray:ArrayCollection;
	   public function afterSend():void
	 {
  var arrData:Array = new Array; 
  arrData = mx.utils.ArrayUtil.toArray
(event.lastResult.CircSec.CircuitID);

	for (var i:int = 0; i  arrData.length; i++) {
Alert.show (arrData[i].FromBusName);		
	}
   
}

Thanks again,
Aaron


  













-- Jason

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] newbie: deploying

2006-05-31 Thread Will Morgan



Joe - do you have a crossdomain.xml file on your server? http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213Will.
On 5/30/06, josulliv101 [EMAIL PROTECTED] wrote:



Hi,
When I view my flex 2 beta 3 app via the flex builder build button
(viewing it locally), I can see my application fine. But when I move
the files to the real server I cannot get it to work.

Does anyone know a good intro tutorial for me to get this thing working?

help me please.
Thanks,
Joe









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com









  
  
SPONSORED LINKS
  
  
  


Web site design development
  
  

Computer software development
  
  

Software design and development
  
  



Macromedia flex
  
  

Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group flexcoders on the web.

  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
.



  

















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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] newbie question: Populating Datagrid from external complex xml

2006-05-18 Thread Tracy Spratt



Have you tried using a labelFunction on each column?

That function gets run for every element in the dataProvider array and gets passed a reference tothat item.

You can use whatever logic you need to navigate to the data you need, and then return that for the dataGrids use.

Take a look at this, and if you need more help post back. I might be able to do a quick example.

What version of Flex, by the way?

Tracy



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of josulliv101
Sent: Thursday, May 18, 2006 12:48 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] newbie question: Populating Datagrid from external complex xml

Hi,

I don't have any issues populating the datagrid when my external xml
file is very basic. for example:

users
 user
 usernameJoe/username
 useremail[EMAIL PROTECTED]/useremail
 /user
 user
 usernameMaggie/username
 useremail[EMAIL PROTECTED]/useremail
 /user

/users

But when I have many nested elements and attributes - I can never
access the elements deeper within the xml.

Can anyone put up a bare-bones example of populating a datagrid with
something like the following from an xml file.


users
 user
 username gender=maleJoe/username
 useremail[EMAIL PROTECTED]/useremail
 location id=001
 cityBedford/city
 stateMA/state
 /location
 /user
 user
 username gender=femaleMaggie/username
 useremail[EMAIL PROTECTED]/useremail
 location id=002
 cityLexington/city
 stateMA/state
 /location
 /user

/users

Any help is appreciated. 
Thanks,
Joe







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



 











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [flexcoders] newbie: Binary Socket general functionality

2006-05-11 Thread Manish Jethani



On 5/11/06, Suzy Lawson [EMAIL PROTECTED] wrote:

 I think I'm getting confused b/w sending binary data over the socket
 and sending binary (or text) data over a binary protocol.

Binary socket means there's no application-layer protocol (above TCP).
Use your own protocol. You can do anything using the capability to
send and receive raw bytes.

 For example, is it possible to send binary documents (e.g. pdfs and
 jpegs) through this socket via the writeUTFBytes() method? If so, when
 something binary is sent/received...how does it know what type it
 is...i.e. jpeg/video stream.

Develop your own protocol! Send the file type in the first two bytes
or something. The client and the server need to speak a language here.

 Also, can I stream video through this socket if I have a non Flash
 Media Server implementation managing everything?

I'm not sure--you'd have to dig into the RTMP protocol and understand
what Video.publish() does exactly.

One crude way of publishing video is to create a Bitmap object out of
every frame as the video plays and send the bitmap bytes to the
server. Probably very stupid but it'll work.






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Newbie question

2006-04-23 Thread Matt Chotin










Give your services component an id, then
refer to it elsewhere. If you put services in your application you could use
Application.application.myServices.statsRequest, etc.











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex MacCaw
Sent: Saturday, April 22, 2006
1:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie
question





Is it possible to reference a HTTPService from
another file.



For example in services.mxml I create a service:

mx:HTTPService id=statsRequest
url=""
useProxy=false/



And in stats.mxml I reference the service:

 mx:DataGrid id=dgReviews x=40 y=85 width=800 height=134 dataProvider={ statsRequest.result.graphdata.stat} mx:columns mx:DataGridColumn headerText=Ip dataField=ip width=480/ mx:DataGridColumn headerText=When dataField=created-at width=240/ /mx:columns /mx:DataGridHowever this doesnt work, I get Access of undefined property 'statRequest'. Im sure there must be a simple answer to this.Thanks.Alex









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Newbie Question: Error being thrown on Grid Sort

2006-04-17 Thread Matt Chotin
This means that the first value in the dataProvider has a null value, it
shouldn't be because a random field in the middle is null.  You would
workaround this by using a sortCompareFunction for the field OR by
handling the headerRelease by setting up a SortField with the proper
information and then assigning it to the dataProvider's Sort (which you
may also need to create); then don't forget to preventDefault on the
headerPressed event :-)

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike
Sent: Monday, April 17, 2006 8:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Newbie Question: Error being thrown on Grid Sort

Using Flex Beta2, I'm populating a grid via XML through an HTTPService
component. Grid populates fine, but, if I sort the grid with a column
click, and any of the cells are Null, the grid throws the following
error: 

Error: Cannot determine comparator for SortField with name 'LastName'
at
mx.collections::SortField/http://www.adobe.com/2006/flex/mx/internal::in
itCompare()
at mx.collections::Sort/::initSortFields()
at mx.collections::Sort/sort()
at
mx.collections::ListCollectionView/mx.collections:ListCollectionView::in
ternalRefresh()
at mx.collections::ListCollectionView/refresh()
at mx.controls::DataGrid/sortByColumn()
at mx.controls::DataGrid/::headerReleaseHandler()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls::DataGrid/mouseUpHandler()

Question is: Should I prevent NULLs with some server side kludge?
Should I implement a SortField handler that is null-safe ?





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



 





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

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

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

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




RE: [flexcoders] Newbie again: Trouble implementing custom class (Flex2b)

2006-03-18 Thread rick


[Property(name=_siteID, type=String)] // What Is THIS?

Whoops, forgot to take that out.  I came across the metadata section in the
documentation, and thought that might be my problem - that I needed to tell the
compiler about my new property.  I tried the above and it didn't make any
difference, and then I moved on to try something else...

Thanks for the response!  It works now

Rick
-Original Message-
From: Michael Schmalle [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 16, 2006 6:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie again: Trouble implementing custom class
(Flex2b)


Man, time to eat...

SHOULD BE

package com.jbe.picfindr
{

import mx.rpc.http.HTTPService;

public class pfHTTPService extends HTTPService {

public function pfHTTPService(rootURL:String = null)
{
super(rootURL);
public var _siteID:String = ;
public function get siteID()
{
  return _siteID;
  }
  public function set siteID(value:uint)
  {
_siteID = value;
  }
}

}

}



On 3/16/06, Michael Schmalle [EMAIL PROTECTED] wrote:
Well,

for starters;

com.jbe.picfindr

should be

projectroot/com/jbe/picfinder/pfHTTPService.as

Try that, you need the dots to be actuall directory structure.

Are you dead ending the :

HTTPService(rootURL:String = null)

signature?

If not, your super needs to look like

super(rootURL:String = null);

Peace, Mike



On 3/16/06, revanisle [EMAIL PROTECTED] wrote:
Hi all,
  Thanks for all the replies to my previous posts.  You guys are
really helping me learn this stuff.  Hopefully by the time Flex2 ships
I'll be able to start to give back too...

OK.  I'm trying to actually start using my own packages and classes.
I've created a new class that extends HTTPService and simply adds one
new property:

package com.jbe.picfindr
{

import mx.rpc.http.HTTPService;

[Property(name=_siteID, type=String)]
public class pfHTTPService extends HTTPService {

public function pfHTTPService()
{
super();
public var _siteID:String = ;
public function get siteID()
{
  return _siteID;
  }
  public function set siteID(value:uint)
  {
_siteID = value;
  }
}

}

}

This file is called pfHTTPService.as and it lives in a folder called
com.jbe.picfindr, which shows up as a package in Flex code hints.
When I go to create a new instance in an actionscript block (which
includes the line import com.jbe.picfindr.pfHTTPService;, I get not
a compile time constant and trying to access possibly undefined
method errors.  I instatiate it like this:

var service:pfHTTPService = new pfHTTPService();

Any thoughts?

Thanks in advance!

Rick






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



SPONSORED LINKS Web site design development  Computer software development 
Software design and development
Macromedia flex  Software development best practice



YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

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

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.








-- 
What goes up, does come down.



-- 
What goes up, does come down.

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



SPONSORED LINKS Web site design development  Computer software development 
Software design and development
Macromedia flex  Software development best practice



YAHOO! GROUPS LINKS

 Visit your group flexcoders on the web.

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

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.









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

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

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

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




Re: [flexcoders] Newbie again: Trouble implementing custom class (Flex2b)

2006-03-16 Thread Michael Schmalle



Well,

for starters;


com.jbe.picfindr

should be 

projectroot/com/jbe/picfinder/pfHTTPService.as

Try that, you need the dots to be actuall directory structure.

Are you dead ending the :

HTTPService(rootURL:String = null)

signature?

If not, your super needs to look like

super(rootURL:String = null);

Peace, Mike
On 3/16/06, revanisle [EMAIL PROTECTED] wrote:




Hi all,
 Thanks for all the replies to my previous posts. You guys are
really helping me learn this stuff. Hopefully by the time Flex2 ships
I'll be able to start to give back too...

OK. I'm trying to actually start using my own packages and classes. 
I've created a new class that extends HTTPService and simply adds one
new property:

package com.jbe.picfindr 
{
 
import mx.rpc.http.HTTPService;
 
 [Property(name=_siteID, type=String)]
 public class pfHTTPService extends HTTPService {
 
 public function pfHTTPService()
 {
 super();
 public var _siteID:String = ;
 public function get siteID() 
 {
  return _siteID;
  }
  public function set siteID(value:uint)
  {
   _siteID = value;
  }
 }
 
 } 
 
}

This file is called pfHTTPService.as and it lives in a folder called
com.jbe.picfindr, which shows up as a package in Flex code hints. 
When I go to create a new instance in an actionscript block (which
includes the line import com.jbe.picfindr.pfHTTPService;, I get not
a compile time constant and trying to access possibly undefined
method errors. I instatiate it like this:

var service:pfHTTPService = new pfHTTPService();

Any thoughts?

Thanks in advance!

Rick
 










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com









  
  
SPONSORED LINKS
  
  
  


Web site design development
  
  

Computer software development
  
  

Software design and development
  
  



Macromedia flex
  
  

Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group flexcoders on the web.
  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




  









-- What goes up, does come down.






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] Newbie: VBox expanding when it shouldn't

2006-03-09 Thread Manish Jethani
On 3/7/06, revanisle [EMAIL PROTECTED] wrote:

  Part of my UI is a VBox nested inside another VBox. The first VBox
 puts a control bar on top of a results window.  The second VBox is the
 results window which is empty in mxml and gets populated dynamically
 with other containers based on search result.

 mx:VBox width=100% height=100%
 mx:HBox id=header
 mx:TextInput id=imagetag/
 mx:Button label=Go id=go click=get_thumbs()/
 /mx:HBox
 mx:VBox id=thumbs width=100% height=100% /
 /mx:VBox

 Everything is sized by percent (height  width =100%) so it always
 fills the available space.  So far so good, but when thumbs VBox
 should automatically add scroll bars, it just keeps getting taller,
 forcing the parent VBox to scroll.
[snip]

The outer VBox respects the inner's minHeight - which is calculated
based on the number of children inside it.  So the height of the inner
VBox is the larger of the available space and its own minHeight (and
minHeight wins once you've added enough children).

minHeight can be made irrelevant by setting it to 0 explicitly. 
That should work.

If that doesn't work, then maybe try setting maxHeight to an explicit value.

Manish


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

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

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

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




  1   2   >