[flexcoders] Re: strange problem with remote object

2009-03-23 Thread johndoematrix
hey, thanks guys for helping i have it working now. i googled passing flex 
parameters in remoteobject as tracy suggested and the solution was just as 
valdhor had suggested except valdhor missed the arguments tag otherwise this is 
how it is in my remote object




{username.text}
{password.text}




thanks again guys. keep up the good work



[flexcoders] which one is better to use?

2009-03-23 Thread Vikram Singh
hello friends...
i am passing data request to php using RemoteObject from flex.
and php send back processed data to Flex. 
which one is better in performance for flex application operation??
1. ArrayCollection
OR
2. XML
which one is easy and fast accesable??
all the data are storing in ArrayCollection and used it to displaying in flex 
components.
I feel that Array object is little bit slow.
Please suggest me the right option.

Thanks.


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

RE: [flexcoders] Re: strange problem with remote object

2009-03-23 Thread Tracy Spratt
Ah, no, a Flex form does *not* automatically submit any parameters.  

 

Google: flex pass parameters to remoteObject method  (I think I suggested
this already)

 

Look at the first hit.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of johndoematrix
Sent: Tuesday, March 24, 2009 1:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: strange problem with remote object

 

Hi thanks for trying to help but i think you are not geting what am trying
to do here. Valdhor in my updates code i got rid of the creationComplete
thing and i created a button which when clicked fires
"remoteObj.userData.send();" but that didn't work. i guess you did not look
at my updated code. Tracy i am passing arguments to the remote object from
the form inputs (at least thats what i think) so that when my button is
clicked and fires "remoteObj.userData.send();" it can send the parameters
from the form to the cfc. overall i would like to return data corresponding
to the two fields (username and password) from the database to the datagrid.
i hope that what am trying to achieve here is well explained. i have a
feeling am missing something so i beg to be directed. thanks 





RE: [flexcoders] Sorting a list at specified intervals

2009-03-23 Thread Alex Harui
Use two collections.  Every three seconds, copy the entire contents of the 
first into the second.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Rohit Sharma
Sent: Monday, March 23, 2009 12:03 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sorting a list at specified intervals


Hello All,

 I have a requirement in my project where I want the list to be sorted 
every three seconds. The flow goes as follows :-

 1.  As soon as a new room gets added or deleted or the user count changes, it 
gets reflected in the room list which is a list component.
 2.  But the room list should be sorted only on 3 seconds duration.
 What is happening is that as soon as I apply the sort and refresh it, 
it starts working. And the sorting happens as soon as some change
   happens to the list dataprovider. Am not able to restrict the sort at 
three seconds interval. I have also tried using disableautoupdate with
   the data provider but that stops the addition of the new rooms also.  I 
also tried setting sort to null after applying first sort but as soon as
   I refresh the null sort, original sort goes off.

   Please help, I am stuck with this thing.

 Regards,
 Rohit Sharma
 Lead Developer, Mactabilis Arts.
 www.mactabilisarts.com



[flexcoders] RE: mouse events

2009-03-23 Thread Alex Harui
Canvas1 can listen to mainCanvas and test positions to determine if it really 
is over itself

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Kenneth Sutherland
Sent: Monday, March 23, 2009 4:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mouse events

I'm having what seems to be a very trivial issue (maybe its just a Monday 
morning issue), I have 2 canvas containers inside another canvas.  See picture 
for explanation. Canvas 2 has a alpha value so you can see canvas 1, but when 
you mouse over the area where both canvases mix together canvas 1 will not get 
mouse/roll events. Any ideas how to change this? (canvas 1 has a button that 
needs mouse events and canvas 2 must listen for the roll events).
Thanks.
[cid:image001.jpg@01C9AC00.9903A460]


realise

.


Kenneth Sutherland
Technical Developer
Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com

Check out some of our recent flex work:
* Focus on funds UK
* Focus on funds 
Europe
* Fund 
selector
* Video 
view
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.





Disclaimer

This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer.
Registered in Scotland number: SC 172507.
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB.

This email message has been scanned for viruses by Mimecast.


<>

[flexcoders] Re: strange problem with remote object

2009-03-23 Thread johndoematrix
Hi thanks for trying to help but i think you are not geting what am trying to 
do here. Valdhor in my updates code i got rid of the creationComplete thing and 
i created a button which when clicked fires "remoteObj.userData.send();" but 
that didn't work. i guess you did not look at my updated code. Tracy i am 
passing arguments to the remote object from the form inputs (at least thats 
what i think) so that when my button is clicked and fires 
"remoteObj.userData.send();" it can send the parameters from the form to the 
cfc. overall i would like to return data corresponding to the two fields 
(username and password) from the database to the datagrid.  i hope that what am 
trying to achieve here is well explained. i have a feeling am missing something 
so i beg to be directed. thanks 



[flexcoders] validator.validateall

2009-03-23 Thread Scott
I've been banging my head on this issue all afternoon/evening...

In all the examples I've seen for this, the Validator.validateall()
seems to be very straight forward.























I've tried several different iterations but the Validator.validateAll()
seems to be the problem.  (I've tried creating an array and pushing the
objects into the array and I've also tried to manually set the objects
in the call (Validator.validateAll([valid1, valid2, valid3]) but I
always get the following error:

"Error: The source attribute must be specified when the property
attribute is specified.
at
mx.validators::Validator/getValueFromSource()[C:\autobuild\3.2.0\framewo
rks\projects\framework\src\mx\validators\Validator.as:846]
at
mx.validators::Validator/validate()[C:\autobuild\3.2.0\frameworks\projec
ts\framework\src\mx\validators\Validator.as:810]
at
mx.validators::Validator$/validateAll()[C:\autobuild\3.2.0\frameworks\pr
ojects\framework\src\mx\validators\Validator.as:134]
at
com.cfgenerated.views.Contacts::AddContactForm2/__btnAdd_click()[C:\Cold
Fusion8\wwwroot\FT\src\com\cfgenerated\views\Contacts\AddContactForm2.mx
ml:149]"

Anyone know what this error is referring to and/or why I'm getting it?

Thanks.
  Scott


RE: {Disarmed} [flexcoders] How to make "show" event work?

2009-03-23 Thread Tracy Spratt
Show and hide are fired when using a navigation container, like ViewStack
and TabNavigator.  How are you "opening" your component?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Monday, March 23, 2009 9:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: {Disarmed} [flexcoders] How to make "show" event work?

 

but it only call once if I use creationComplete. I want to call a function
if I open the component.which event I can use to do this?

Thanks

Mark





[flexcoders] HTML in the List Component?

2009-03-23 Thread Brandon Krakowsky
I have a List component with both variableRowHeight and wordWrap set to true.  
Is there anyway to leverage the labelField or labelFunction to render html 
text?  Is the only way to create a custom itemRenderer?  I tried it but find it 
very difficult to set the height of a UITextField, added to a Canvas.

Thanks,
Brandon



  

RE: [flexcoders] Bind ComboBox to returning XML (HOW TO)

2009-03-23 Thread Tracy Spratt
Both suggestions so far have what I consider a bad choice.  That is to use
resultFormat="object" which is the default.  This setting converts your xml
into a tree of dynamic objects.  This has many drawbacks.  

I advise setting resultFormat="e4x" which will preserve the xml you get from
the server.

Private function onResult(event:ResultEvent):void
 Var xmlResult:XML = XML(event.result);
 xlDesigners:XMLList = xmlResult.designer;
 trace(xlDesigners.toXMLString());  //is this what you expect?
 myCombo.dataProvider = xlDesigners;

And you will need to set the ComboBox labelField="@name"

Tracy Spratt,
Lariat Services, development services available

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Fidel Viegas
Sent: Monday, March 23, 2009 5:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Bind ComboBox to returning XML (HOW TO)

Here is another alternative:


declare an HTTPService like this:

  

and an array collection



and in your actionscript you create the following handler:

private function onResult(event : ResultEvent) : void {
  if (event.result.response.designers == null ||
event.result.response.designers.designer == null) {
designerAC = new ArrayCollection(); // empty array collection
  } else if (event.result.response.designers.designer is ObjectProxy) {
designerAC = new
ArrayCollection([event.result.response.designers.designer]);
  } else {
designerAC = event.result.response.designers.designer as
ArrayCollection;
  }
}

and your combo box would look like something like this:



 That should give you an idea.

Hope that helped

Fidel.

On Mon, Mar 23, 2009 at 10:23 PM, Wildbore, Brendon
 wrote:
> Here’s an example of one way of doing that.
>
>
>
> Assuming you xml comes from a webservice or httpservice call and you want
> your combobox dataprovider bound to a variable comboboxAC you could try
the
> following function onResult.
>
>
>
>
>
>   private function onResult( event:ResultEvent ):void{
>
>     // put xml into array
>
> var returnedData:ArrayCollection = new ArrayCollection(ArrayUtil.toArray(
> event.result ) );
>
>
>
>     // loop over result array and create a new object
> for each xml item
>
>     for (var i:uint = 0;i
>   // create object
>
>   var obj:Object = new Object();
>
>   obj.label=returnedData[i].name;
>
>   obj.data=returnedData[i].id;
>
>   // add item to combobox dataprovider
>
>
> comboboxAC.addItem(obj);
>
>     }
>
>   }
>
>
>
> T
>
>
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Matthew A. Wilson
> Sent: Tuesday, 24 March 2009 8:12 a.m.
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Bind ComboBox to returning XML (HOW TO)
>
>
>
> Need help with a combobox...
>
> I have a combobox that I want to load from a database. The text will be a
> name, and the value will be an integer.
>
> That's it - pretty straightforward. Just can't seem to figure it out. The
> xml will look like this:
>
> 
> 
> 
> 
>
> Thanks so much in advance for your help!!!
>
> 




--
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-1e62
079f6847
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links







RE: [flexcoders] Re: AIR has different behaviour in XML.appendChild() vs Flex for String values?

2009-03-23 Thread Peter Farland
You're right, I took a closer look into the generated stub code and in the 
subclass of AbstractWebService - they've by-passed the usual RPC 
service/operation behavior and implemented a custom private call() method (and 
it's in there a new SOAPEncoder is constructed). This service stub really 
should expose a delegate to the SOAPEncoder. So. I think it's still worth 
logging a request in Flex Builder for this generated code to be updated in 
general, but I agree that really SDK-19811 needs to be fixed.

(Note: It seems SDK-19598 has become SDK-19811).

Pete


-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Francis Potter
Sent: Monday, March 23, 2009 7:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR has different behaviour in XML.appendChild() vs 
Flex for String values?


Pete,

Thanks for the tip. I can set xmlSpecialCharsFilter on the service, but it 
doesn't get passed into the encoder.

Looking around at the generated code and that in the 3.2 SDK (maybe it's 
changed for 3.3?) I see that the FlexBuilder-generated code is using a class 
called WSDLOperation, and doesn't seem to be using Operation at all -- and it's 
in Operation (as you noted) that the xmlSpecialCharsFilter is passed down. Am I 
missing something?

Francis



--- In flexcoders@yahoogroups.com, Peter Farland  wrote:
>
> https://bugs.adobe.com/jira/browse/SDK-19598
> 
> Not a perfect solution, but to help out with your issue of modifying 
> generated code - your generated Service stub should have a method called 
> getWebService() which retuns a subclass of mx.rpc.soap.AbstractWebService. 
> You should be able to set the xmlSpecialCharsFilter property on this web 
> service instance, and that'll trickle down to any Operation's and then to any 
> SOAPEncoders used by these Operations.
> 
> Pete
> 
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of Francis Potter
> Sent: Monday, March 23, 2009 5:20 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: AIR has different behaviour in XML.appendChild() vs 
> Flex for String values?
> 
> 
> I'm glad you wrote this up because I thought I was going crazy.
> 
> In my case, I'm using the FlexBuilder-generated web services client code in 
> AIR. The SOAPEncoder and XMLEncoder classes actually end up double-escaping 
> any XML characters in strings that are being passed up to my web service so a 
> simple "<" character becomes "<", which is decoded on the other end as 
> "<" instead of as "<".
> 
> I can see where it's happening. XMLEncoder.as, line 1784, looks like this:
> 
> currentChild.appendChild(xmlSpecialCharsFilter(Object(value)));
> 
> The "xmlSpecialCharsFilter" is doing the escaping, then appendChild (as your 
> note points out) escapes the string again.
> 
> Of course, since the problem is too much escaping, pre-escaping the string 
> won't help.
> 
> The only way around it in XMLEncoder is to replace the 
> xmllSpecialCharsFilter. But in my case, I'm using the FlexBuilder-generated 
> web services code (from Data -> Import Web Services). So for now I'm editing 
> that code. Of course that means I have to re-edit the code each time my 
> service changes and I regenerate it. What a pain.
> 
> Here's what I did, in Base.call:
> 
> var enc:SOAPEncoder = new SOAPEncoder();
> enc.xmlSpecialCharsFilter = function(value:Object):String {return 
> value.toString()}
> var soap:Object = new Object;
> 
> That works, but only in AIR (I assume, not really trying it in Flex).
> 
> So there's a hacky workaround. But really this should be fixed. At the very 
> least, the FlexBuilder-generated code should be set up to work in either 
> environment. As it is, "Import Web Services" will err for an AIR app where 
> there is a "<" or "&" in any text property passed to the web service.
> 
> Is there a bug 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
>






--
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] Re: watching and triggering events

2009-03-23 Thread Scott
Thanks, Tracy.

 

sj

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 8:38 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: watching and triggering events

 

Yes.

 

Tracy Spratt,

Lariat Services, development services available



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 4:50 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: watching and triggering events

 

Are you talking about setting up a singleton to handle events for
models?

 

 Scott

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: watching and triggering events

 

Easier, but I would not wait too long to start using an event model.

 

In response to your other question, forget my re-dispatch suggestion.
Use a data model or call the function directly.

 

Tracy Spratt,

Lariat Services, development services available



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE:[flexcoders] Re: watching and triggering events

 

DOH. Ok, that is a LOT easier than what I was trying to do!  I think
it's time for a break. =O

 

Thanks!

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Monday, March 23, 2009 1:39 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: watching and triggering events

 


I agree with Tracy; using an MVC architecture handles this nicely. For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt"  wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _
>
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


Re: {Disarmed} [flexcoders] How to make "show" event work?

2009-03-23 Thread markflex2007
but it only call once if I use creationComplete. I want to call a function if I 
open the component.which event I can use to do this?

Thanks

Mark



RE: [flexcoders] Re: watching and triggering events

2009-03-23 Thread Tracy Spratt
Yes.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 4:50 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: watching and triggering events

 

Are you talking about setting up a singleton to handle events for models?

 

 Scott

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: watching and triggering events

 

Easier, but I would not wait too long to start using an event model.

 

In response to your other question, forget my re-dispatch suggestion.  Use a
data model or call the function directly.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE:[flexcoders] Re: watching and triggering events

 

DOH. Ok, that is a LOT easier than what I was trying to do!  I think it's
time for a break. =O

 

Thanks!

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Monday, March 23, 2009 1:39 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: watching and triggering events

 


I agree with Tracy; using an MVC architecture handles this nicely. For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In flexcod...@yahoogro  ups.com,
"Tracy Spratt"  wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _
>
> From: flexcod...@yahoogro  ups.com
[mailto:flexcod...@yahoogro  ups.com]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcod...@yahoogro  ups.com
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>


-- 
This message has been scanned for viruses and 
dangerous content by   MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by   MailScanner, and is 
believed to be clean. 





[flexcoders] DataService trapping error?

2009-03-23 Thread wayne_badu_johnson
Hi all

I am tryng to catch an error when dynamically assigning a destination to a 
DataService (snippet below). If the destination is invalid (not in my 
data-management.xml file) then I would like to show a nicer error than what's 
below. FaultEvent, DataServiceFaultEvent don't catch this one. Is there a way 
to determine if an assigned destination is valid?

Thanks
Wayne


// Call DataService
dataServiceRef = new DataService(variableDestination);
dataServiceRef.autoCommit = false;
dataServiceRef.addEventListener(ResultEvent.RESULT, handleDSResult);
dataServiceRef.addEventListener(FaultEvent.FAULT, handleDSFault);
dataServiceRef.addEventListener(DataServiceFaultEvent.FAULT, 
handleDataServiceFault);


try {   
 
 dataServiceRef.fill(userResults,"single",{});
}
catch(e:Error)
{
Alert.show("Destinaion error" + e.message); 
}

// THE ERROR 
Error: Unable to initialize destinations on server: ["foobar"]
at 
()[C:\depot\DataServices\branches\lcds26_hotfixes\frameworks\projects\data\src\mx\data\DataStore.as:2338]
at 
()[C:\depot\DataServices\branches\lcds26_hotfixes\frameworks\projects\data\src\mx\data\DataStore.as:2398]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.messaging::MessageAgent/channelConnectHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\MessageAgent.as:785]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.messaging::ChannelSet/channelConnectHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:872]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.messaging::Channel/connectSuccess()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\Channel.as:1036]
at 
mx.messaging.channels::AMFChannel/resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\AMFChannel.as:510]




[flexcoders] Re: AIR has different behaviour in XML.appendChild() vs Flex for String values?

2009-03-23 Thread Francis Potter

Pete,

Thanks for the tip. I can set xmlSpecialCharsFilter on the service, but it 
doesn't get passed into the encoder.

Looking around at the generated code and that in the 3.2 SDK (maybe it's 
changed for 3.3?) I see that the FlexBuilder-generated code is using a class 
called WSDLOperation, and doesn't seem to be using Operation at all -- and it's 
in Operation (as you noted) that the xmlSpecialCharsFilter is passed down. Am I 
missing something?

Francis



--- In flexcoders@yahoogroups.com, Peter Farland  wrote:
>
> https://bugs.adobe.com/jira/browse/SDK-19598
> 
> Not a perfect solution, but to help out with your issue of modifying 
> generated code - your generated Service stub should have a method called 
> getWebService() which retuns a subclass of mx.rpc.soap.AbstractWebService. 
> You should be able to set the xmlSpecialCharsFilter property on this web 
> service instance, and that'll trickle down to any Operation's and then to any 
> SOAPEncoders used by these Operations.
> 
> Pete
> 
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of Francis Potter
> Sent: Monday, March 23, 2009 5:20 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: AIR has different behaviour in XML.appendChild() vs 
> Flex for String values?
> 
> 
> I'm glad you wrote this up because I thought I was going crazy.
> 
> In my case, I'm using the FlexBuilder-generated web services client code in 
> AIR. The SOAPEncoder and XMLEncoder classes actually end up double-escaping 
> any XML characters in strings that are being passed up to my web service so a 
> simple "<" character becomes "<", which is decoded on the other end as 
> "<" instead of as "<".
> 
> I can see where it's happening. XMLEncoder.as, line 1784, looks like this:
> 
> currentChild.appendChild(xmlSpecialCharsFilter(Object(value)));
> 
> The "xmlSpecialCharsFilter" is doing the escaping, then appendChild (as your 
> note points out) escapes the string again.
> 
> Of course, since the problem is too much escaping, pre-escaping the string 
> won't help.
> 
> The only way around it in XMLEncoder is to replace the 
> xmllSpecialCharsFilter. But in my case, I'm using the FlexBuilder-generated 
> web services code (from Data -> Import Web Services). So for now I'm editing 
> that code. Of course that means I have to re-edit the code each time my 
> service changes and I regenerate it. What a pain.
> 
> Here's what I did, in Base.call:
> 
> var enc:SOAPEncoder = new SOAPEncoder();
> enc.xmlSpecialCharsFilter = function(value:Object):String {return 
> value.toString()}
> var soap:Object = new Object;
> 
> That works, but only in AIR (I assume, not really trying it in Flex).
> 
> So there's a hacky workaround. But really this should be fixed. At the very 
> least, the FlexBuilder-generated code should be set up to work in either 
> environment. As it is, "Import Web Services" will err for an AIR app where 
> there is a "<" or "&" in any text property passed to the web service.
> 
> Is there a bug 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
>




Re: [flexcoders] Bind ComboBox to returning XML (HOW TO)

2009-03-23 Thread Fidel Viegas
Here is another alternative:


declare an HTTPService like this:

  

and an array collection



and in your actionscript you create the following handler:

private function onResult(event : ResultEvent) : void {
  if (event.result.response.designers == null ||
event.result.response.designers.designer == null) {
designerAC = new ArrayCollection(); // empty array collection
  } else if (event.result.response.designers.designer is ObjectProxy) {
designerAC = new
ArrayCollection([event.result.response.designers.designer]);
  } else {
designerAC = event.result.response.designers.designer as ArrayCollection;
  }
}

and your combo box would look like something like this:



 That should give you an idea.

Hope that helped

Fidel.

On Mon, Mar 23, 2009 at 10:23 PM, Wildbore, Brendon
 wrote:
> Here’s an example of one way of doing that.
>
>
>
> Assuming you xml comes from a webservice or httpservice call and you want
> your combobox dataprovider bound to a variable comboboxAC you could try the
> following function onResult.
>
>
>
>
>
>   private function onResult( event:ResultEvent ):void{
>
>     // put xml into array
>
> var returnedData:ArrayCollection = new ArrayCollection(ArrayUtil.toArray(
> event.result ) );
>
>
>
>     // loop over result array and create a new object
> for each xml item
>
>     for (var i:uint = 0;i
>   // create object
>
>   var obj:Object = new Object();
>
>   obj.label=returnedData[i].name;
>
>   obj.data=returnedData[i].id;
>
>   // add item to combobox dataprovider
>
>
> comboboxAC.addItem(obj);
>
>     }
>
>   }
>
>
>
> T
>
>
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Matthew A. Wilson
> Sent: Tuesday, 24 March 2009 8:12 a.m.
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Bind ComboBox to returning XML (HOW TO)
>
>
>
> Need help with a combobox...
>
> I have a combobox that I want to load from a database. The text will be a
> name, and the value will be an integer.
>
> That's it - pretty straightforward. Just can't seem to figure it out. The
> xml will look like this:
>
> 
> 
> 
> 
>
> Thanks so much in advance for your help!!!
>
> 




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

<*> 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:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

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



RE: [flexcoders] Re: watching and triggering events

2009-03-23 Thread Scott
Are you talking about setting up a singleton to handle events for
models?

 

 Scott

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: watching and triggering events

 

Easier, but I would not wait too long to start using an event model.

 

In response to your other question, forget my re-dispatch suggestion.
Use a data model or call the function directly.

 

Tracy Spratt,

Lariat Services, development services available



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE:[flexcoders] Re: watching and triggering events

 

DOH. Ok, that is a LOT easier than what I was trying to do!  I think
it's time for a break. =O

 

Thanks!

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Monday, March 23, 2009 1:39 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: watching and triggering events

 


I agree with Tracy; using an MVC architecture handles this nicely. For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt"  wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _
>
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


[flexcoders] Re: Flex Preloader issue

2009-03-23 Thread carloscarvalhar
Application will load only when it receives a complete event.

So you can load one swf, listen for INIT_COMPLETE (that's before complete)
preloader.addEventListener(FlexEvent.INIT_COMPLETE, myHandleInitEnd);

At myHandleInitEnd loads another swf and so on...

then at last preload you dispatch the last event:
dispatchEvent(new Event(Event.COMPLETE));

When application detects Event.COMPLETE, i think flex will go to frame 2, so 
preloader isn't reachable anymore, only application.

I didn't test, so I'm not sure, but i think this way can work.



[flexcoders] changing more than the outline on a validator

2009-03-23 Thread Scott

Ok, I'm going back through my code and adding validators.  Sample code:




...





This puts a simple and thin red line around the box and if the user
mousse over the box then text appears with what is wrong. The problem is
that it's hard to see this thin red outline.  I tried playing with the
colors but it doesn't show that well.

I need to do one or all of the following:
 - Make the outline thicker
 - Make the whole textbox turn red
 - Make the text turn red

... or any other way to enhance the visual queue to the user that there
is something wrong with the text.

Thanks!


RE: {Disarmed} [flexcoders] How to make "show" event work?

2009-03-23 Thread Scott
If I'm not mistaken, the component is created and kept in memory once
you call it.

 

I don't think you can call the "show" the way you are trying to call it
in the constructor.

 

Instead you would have to do a creationComplete="Alert.show('test')"

 

The re-calling the function would be dependent on what you are trying to
do.  I believe you would have to create a function in your initializer
function based on a timer.  Or at least that's what I can think of off
the top of my head...

 

 

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markflex2007
Sent: Monday, March 23, 2009 3:12 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] How to make "show" event work?

 

Hi,

I have a mxml component and I want it run a function when it is loaded 
(not only first time),I did the following test for the component and I
do not know why the show event never work.

Please help me.

Thanks

Mark

component code:

http://www.adobe.com/2006/mxml
 " width="912" height="444"
show="Alert.show('test')" >

...






-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


RE: [flexcoders] Re: AIR has different behaviour in XML.appendChild() vs Flex for String values?

2009-03-23 Thread Peter Farland
https://bugs.adobe.com/jira/browse/SDK-19598

Not a perfect solution, but to help out with your issue of modifying generated 
code - your generated Service stub should have a method called getWebService() 
which retuns a subclass of mx.rpc.soap.AbstractWebService. You should be able 
to set the xmlSpecialCharsFilter property on this web service instance, and 
that'll trickle down to any Operation's and then to any SOAPEncoders used by 
these Operations.

Pete


-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Francis Potter
Sent: Monday, March 23, 2009 5:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR has different behaviour in XML.appendChild() vs 
Flex for String values?


I'm glad you wrote this up because I thought I was going crazy.

In my case, I'm using the FlexBuilder-generated web services client code in 
AIR. The SOAPEncoder and XMLEncoder classes actually end up double-escaping any 
XML characters in strings that are being passed up to my web service so a 
simple "<" character becomes "<", which is decoded on the other end as 
"<" instead of as "<".

I can see where it's happening. XMLEncoder.as, line 1784, looks like this:

currentChild.appendChild(xmlSpecialCharsFilter(Object(value)));

The "xmlSpecialCharsFilter" is doing the escaping, then appendChild (as your 
note points out) escapes the string again.

Of course, since the problem is too much escaping, pre-escaping the string 
won't help.

The only way around it in XMLEncoder is to replace the xmllSpecialCharsFilter. 
But in my case, I'm using the FlexBuilder-generated web services code (from 
Data -> Import Web Services). So for now I'm editing that code. Of course that 
means I have to re-edit the code each time my service changes and I regenerate 
it. What a pain.

Here's what I did, in Base.call:

var enc:SOAPEncoder = new SOAPEncoder();
enc.xmlSpecialCharsFilter = function(value:Object):String {return 
value.toString()}
var soap:Object = new Object;

That works, but only in AIR (I assume, not really trying it in Flex).

So there's a hacky workaround. But really this should be fixed. At the very 
least, the FlexBuilder-generated code should be set up to work in either 
environment. As it is, "Import Web Services" will err for an AIR app where 
there is a "<" or "&" in any text property passed to the web service.

Is there a bug 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





Re: [flexcoders] Do you guys consider Lynda .com Flexs tutorials a must to learn the material?

2009-03-23 Thread Paul Andrews
- Original Message - 
From: "fred44455" 
To: 
Sent: Monday, March 23, 2009 9:36 PM
Subject: [flexcoders] Do you guys consider Lynda .com Flexs tutorials a must 
to learn the material?


>I am extremely lazy , have been all my life. I have troubles leartning by 
>reading books.I am not a programmer , however I did some light web design a 
>few years ago. AS3 seems to be difficult to me but not impossible. I am 48 
>so if I learn Flex 3 , my goal would be to become a Flex 3 freelance 
>developer. So anyways do you guys values Lynda.com videos to learn Flex 3?? 
>What about Total training Flex # and AIR? Thanks again for your time. I 
>promise next time my questions will be related to Flex or AS3. Regards, 
>Fred.

Fred, given your self-assesment, I'd say that the lynda.com tutorials are an 
easier ride than the total training ones. It might be an idea just to go for 
'Flex in a week' at http://www.adobe.com/devnet/flex/videotraining/ as a 
good starting point.

Paul 



[flexcoders] Re: AIR has different behaviour in XML.appendChild() vs Flex for String values?

2009-03-23 Thread Francis Potter

I'm glad you wrote this up because I thought I was going crazy.

In my case, I'm using the FlexBuilder-generated web services client code in 
AIR. The SOAPEncoder and XMLEncoder classes actually end up double-escaping any 
XML characters in strings that are being passed up to my web service so a 
simple "<" character becomes "<", which is decoded on the other end as 
"<" instead of as "<".

I can see where it's happening. XMLEncoder.as, line 1784, looks like this:

currentChild.appendChild(xmlSpecialCharsFilter(Object(value)));

The "xmlSpecialCharsFilter" is doing the escaping, then appendChild (as your 
note points out) escapes the string again.

Of course, since the problem is too much escaping, pre-escaping the string 
won't help.

The only way around it in XMLEncoder is to replace the xmllSpecialCharsFilter. 
But in my case, I'm using the FlexBuilder-generated web services code (from 
Data -> Import Web Services). So for now I'm editing that code. Of course that 
means I have to re-edit the code each time my service changes and I regenerate 
it. What a pain.

Here's what I did, in Base.call:

var enc:SOAPEncoder = new SOAPEncoder();
enc.xmlSpecialCharsFilter = function(value:Object):String {return 
value.toString()}
var soap:Object = new Object;

That works, but only in AIR (I assume, not really trying it in Flex).

So there's a hacky workaround. But really this should be fixed. At the very 
least, the FlexBuilder-generated code should be set up to work in either 
environment. As it is, "Import Web Services" will err for an AIR app where 
there is a "<" or "&" in any text property passed to the web service.

Is there a bug for this?




[flexcoders] Do you guys consider Lynda .com Flexs tutorials a must to learn the material?

2009-03-23 Thread fred44455
I am extremely lazy , have been all my life. I have troubles leartning by 
reading books.I am not a programmer , however I did some light web design a few 
years ago. AS3 seems to be difficult to me but not impossible. I am 48 so if I 
learn Flex 3 , my goal would be to become a Flex 3 freelance developer. So 
anyways do you guys values Lynda.com videos to learn Flex 3?? What about Total 
training Flex # and AIR? Thanks again for your time. I promise next time my 
questions will be related to Flex or AS3. Regards, Fred.



Re: [flexcoders] Re: Is it possible to query Flash Player attributes e.g. "allowFullScreen"?

2009-03-23 Thread Dave Kong
Thanks Carlos,

That's not what I need though. I need to know if fullscreen is enabled via
html tag (a security safeguard) before I show the button to go into
fullscreen.

-dave

On Sat, Mar 21, 2009 at 8:46 PM, carloscarvalhar
wrote:

>   about full screen:
> switch (Application.application.stage.displayState) {
> case StageDisplayState.FULL_SCREEN:
> /* If already in full screen mode, switch to normal mode. */
> Application.application.stage.displayState = StageDisplayState.NORMAL;
> break;
> default:
> /* If not in full screen mode, switch to full screen mode. */
> Application.application.stage.displayState = StageDisplayState.FULL_SCREEN;
> }
>
>  
>


RE: [flexcoders] Bind ComboBox to returning XML (HOW TO)

2009-03-23 Thread Wildbore, Brendon
Here's an example of one way of doing that.

Assuming you xml comes from a webservice or httpservice call and you want your 
combobox dataprovider bound to a variable comboboxAC you could try the 
following function onResult.


  private function onResult( event:ResultEvent ):void{
// put xml into array
var returnedData:ArrayCollection = new ArrayCollection(ArrayUtil.toArray( 
event.result ) );

// loop over result array and create a new object for 
each xml item
for (var i:uint = 0;imailto:flexcod...@yahoogroups.com] On Behalf 
Of Matthew A. Wilson
Sent: Tuesday, 24 March 2009 8:12 a.m.
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bind ComboBox to returning XML (HOW TO)


Need help with a combobox...

I have a combobox that I want to load from a database. The text will be a name, 
and the value will be an integer.

That's it - pretty straightforward. Just can't seem to figure it out. The xml 
will look like this:






Thanks so much in advance for your help!!!



Re: [flexcoders] How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread Jeffry Houser

 W/ any programming experience, you're going to pick up all you need to 
know about ActionScript 3 in an hour or two.  It's just a slightly 
different syntax (or often the same syntax depending on your language 
experience) than other languages for things like classes, loops, 
conditionals, variable creation, etc...

 I would say there is no reason not to know AS3. 

 The real learning curve is going to be learning the Flex Framework 
classes, how they interact, and how to extend them in the context of the 
framework.  These things are independent of both MXML and ActionScript3. 

fred44455 wrote:
> Flex is a mix of mxml and actionscript 3. Now my questions is simple. How 
> much AS3 do you need to know in order to develop seriously using Flex 3 
> technology? Thanks.
>
>
>   


-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust




[flexcoders] Pop-up's close event not firing after multiple clicks on pop-up's components

2009-03-23 Thread blee3467

I'm a newbie flex developer so I'm hoping someone with more experience
will have some insight into my problem.

I have an application that has a canvas which contains icons for
different tools. The icons are within canvases that I disable when the
users clicks on them. Also when the canvas is clicked on a new pop-up
opens and the currently opened one closes (moves off screen). On the
pop-ups there are different components (buttons, combo boxes,
datagrids). Everything works wonderfully if there is only one set of
clicks on the pop-up, such as selecting from the combobox and clicking
on the button. But if there are multiple clicks the Close event doesn't
fire off and the pop-up isn't removed. So if I select from the combobox
and click the button more than once it doesn't work.
But I can close it by clicking the close button...but sometimes that
doesn't even work. Also, after a pop-up is not closed because of
multiple clicks, clicking on a 3rd tool will close the one that didn't
close when the 2nd tool was clicked on. Clicking a 4th tool will close
the 2nd one and so on, it's like it skips one and then is one behind.
Does that make sense?

I hope I can explain this well enough and hopefully I haven't written
really confused code. The tools are in the main application which calls
an action script that opens the pop-up. The pop-ups have different
options for searches and return the results in another pop-up. When a
new tool icon is clicked all open pop-ups close.

In my actionscript file which opens the pop-up:
private function openListPop():void
{
   // Close all open pop-ups
   closePopups();

   // Open pop-up
   winList= FindHOA(PopUpManager.createPopUp(this, FindHOA, false,
PopUpManagerChildList.POPUP));
   winList.x = Application.application.SearchCanvas.x - 350;
   winList.y = 85;
   winList.addEventListener(CloseEvent.CLOSE, closeListPop, false, 0,
true);
}

protected function closeListPop(event : CloseEvent) : void
{
  // Make button in toolbar clickable again
  FindListCan.enabled=true;
  winList.removeEventListener(CloseEvent.CLOSE, closeListPop);
}

Each pop-up implements the following:

package components
{
  import mx.core.IFlexDisplayObject;
  import mx.events.CloseEvent;

  public interface iPopup extends IFlexDisplayObject
  {
   function closeWindow():void;
  }
}

In the pop-up closeWindow function I have:

public function closeWindow():void
  {
   PopUpManager.removePopUp(this);
   pop1.dispatchEvent(new CloseEvent(CloseEvent.CLOSE));
  }

Pop1 is a pop-up launched from the 1st pop-up and displays the results
of a query:

private function showPop(content:String, ... args):void
{
   if ( pop1 == null )
   {
// pop up is NOT already open
pop1 = ResultsPop_Image(PopUpManager.createPopUp(this,  
ResultsPop_Image, false, PopUpManagerChildList.POPUP));
   pop1.x=80;
   pop1.y=Application.application.height - 350;
   pop1.content = content;
   pop1.address = args[0];
   pop1.image = args[1];
   pop1.addEventListener(CloseEvent.CLOSE, pop1_close);
   }
   else
   {
 // refresh the data on the pop up
 pop1.content = content;
 pop1.address = args[0];
 pop1.image = args[1];
   }
  }

  // Close the pop up with identify results
  protected function pop1_close(event : CloseEvent) : void
  {
pop1 = null;
pop1.removeEventListener(CloseEvent.CLOSE, pop1_close);
  }

I have a function that closes all pop-ups that are open:

  // Call close event on all open popups so that effects run
  private function closePopups():void
  {
   var popupPackage:Array;
   var popup:iPopup;
   for (var i:Number=0; i

[flexcoders] Re: How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread oneworld95
I'd echo what others have said; I didn't know AS 3 before doing Flex 3. Flex 
has helped me learn AS. If you spend the time to look at examples on the web 
and ask questions here, it will all make sense. Programming is programming; you 
still have iterative and conditional statements; still have functions (now 
called methods in AS). Just the syntax/architecture are a little different if 
you're coming from a non-object oriented programming language. 

- Alex C

--- In flexcoders@yahoogroups.com, Alan Rother  wrote:
>
> As another total newbie to Flex and AS, Flex is a great way to learn AS. You
> can totally build a Flex app using nothing but MXML, it'll be limited, but
> you can do it.
> Once you get into and start following the tutorials out there you'll pick up
> the AS pretty quickly.
> 
> =]
> -- 
> Alan Rother
> Adobe Certified Advanced ColdFusion MX 7 Developer
> Manager, Phoenix Cold Fusion User Group, AZCFUG.org
>




[flexcoders] Re: How to add more context menu???

2009-03-23 Thread valdhor
Is there any reason you can't use the workaround they suggest in Jira?

Main Application:

http://www.adobe.com/2006/mxml";
creationComplete="init()" xmlns:custom="*">
 



myTextArea.as:
package
{
 import flash.events.ContextMenuEvent;
 import flash.text.TextField;
 import flash.ui.ContextMenu;
 import flash.ui.ContextMenuItem;
 import mx.controls.Alert;
 import mx.controls.TextArea;

 public class myTextArea extends TextArea
 {
 private var cm:ContextMenu;
 private var cmi:ContextMenuItem;

 public function myTextArea()
 {
 super();
 callLater(addCTMenu);
 }

 private function addCTMenu():void
 {
 cmi = new ContextMenuItem("View item...", true);
 cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
contextMenuItem_menuItemSelect);
 cm = new ContextMenu();
 cm.hideBuiltInItems();
 cm.customItems = [cmi];
 (textField as TextField).contextMenu = cm;
 }

 private function
contextMenuItem_menuItemSelect(evt:ContextMenuEvent):void
 {
 Alert.show("You just used a custom context menu on a
TextArea.");
 }
 }
}

NB: The reason I used callLater was that the textField was not
instanciated when the textArea was first created.


HTH.


Steve


--- In flexcoders@yahoogroups.com, "lehaianh1986" 
wrote:
>
> Thank kenneth. I want to add context menu in text area. Here is the
code
> 
> http://www.adobe.com/2006/mxml";
creationComplete="init()" >
>
> 
> 
> 
>
> 
>
> 
>
> I search and see in http://bugs.adobe.com/jira/browse/SDK-17684
>
> seem the bug is not fixed :(
>
> I don't know how to correct it. Can anyone help me!!!
>
> --- In flexcoders@yahoogroups.com, "Kenneth Sutherland"
kenneth.sutherland@ wrote:
> >
> > Try something like
> >
> >  >
> >   contextMenu="{getyourMenu()}"
> >
> >
> >
> > />
> >
> >
> >
> > private function getyourMenu () : ContextMenu {
> >
> > var paste:ContextMenuItem = new ContextMenuItem("paste");
> >
> > paste.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
pasteHandler);
> >
> >
> >
> > var cm:ContextMenu = new ContextMenu();
> >
> >  cm.hideBuiltInItems();
> >
> >  cm.customItems.push(paste);
> >
> > return cm;
> >
> > }
>



[flexcoders] How to make "show" event work?

2009-03-23 Thread markflex2007
Hi,

I have a mxml component and I want it run a function when it is loaded 
(not only first time),I did the following test for the component and I do not 
know why the show event never work.

Please help me.

Thanks

Mark

component code:

http://www.adobe.com/2006/mxml"; width="912" height="444" 
show="Alert.show('test')" >

...





RE: [flexcoders] Re: watching and triggering events

2009-03-23 Thread Tracy Spratt
Easier, but I would not wait too long to start using an event model.

 

In response to your other question, forget my re-dispatch suggestion.  Use a
data model or call the function directly.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE:[flexcoders] Re: watching and triggering events

 

DOH. Ok, that is a LOT easier than what I was trying to do!  I think it's
time for a break. =O

 

Thanks!

 

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Monday, March 23, 2009 1:39 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: watching and triggering events

 


I agree with Tracy; using an MVC architecture handles this nicely. For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In flexcod...@yahoogro  ups.com,
"Tracy Spratt"  wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _
>
> From: flexcod...@yahoogro  ups.com
[mailto:flexcod...@yahoogro  ups.com]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcod...@yahoogro  ups.com
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>


-- 
This message has been scanned for viruses and 
dangerous content by   MailScanner, and is 
believed to be clean. 





[flexcoders] Re: Horizontal and Vertical gradients?

2009-03-23 Thread Tim Hoff

You can draw another gradiant on the graphics and rotate it 90 degrees. 
this will darken your colors, so you'll have to play with it.

-TH

--- In flexcoders@yahoogroups.com, "tchredeemed"  wrote:
>
> Basically, I have an arrow that I draw graphically, it has a vertical
gradient from the top to the bottom.
>
> I want it to fade in from left to right, so I was wanting to put a
horizontal gradient on it too...
>
> I am not sure if it is possible to do this, or if this can be done a
different way.
>
> Here is the arrow: http://www.andrewthorp.com/green-arrow.png
>
> I could just do an inner drop shadow - but the background behind the
arrows is changing, so a black drop shadow would look pretty weird...
>
> Halp!
>





[flexcoders] Bind ComboBox to returning XML (HOW TO)

2009-03-23 Thread Matthew A. Wilson
Need help with a combobox...

I have a combobox that I want to load from a database. The text will be a name, 
and the value will be an integer.

That's it - pretty straightforward. Just can't seem to figure it out. The xml 
will look like this:


  
  


Thanks so much in advance for your help!!!



RE:[flexcoders] Re: watching and triggering events

2009-03-23 Thread Scott
DOH. Ok, that is a LOT easier than what I was trying to do!  I think
it's time for a break. =O

 

Thanks!

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Monday, March 23, 2009 1:39 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: watching and triggering events

 


I agree with Tracy; using an MVC architecture handles this nicely. For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In flexcoders@yahoogroups.com 
, "Tracy Spratt"  wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _
>
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


RE: [flexcoders] watching and triggering events

2009-03-23 Thread Scott
(BTW sorry all for the duplicate message; it looked like the first one
didn't go through on my side so I did a resend )

 

Hmm, interesting thought... I do have a singleton in place to track the
user login.  I could place a bindable variable there to trigger a view
update.  I was trying stay away from the global variable argument.

 

When you say re-dispatch the event; are you saying to  do another
dispatchevent( new event("evtAddedNewContact"); ?  Or should I fire a
different event? Would that trigger the parent to react to the event
over and over in a loop?  

 

 Thanks!

 

 sj

 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 1:11 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] watching and triggering events

 

Have the parent re-dispatch the event and listen for it in "listAndshow"

 

One way to handle issues like this it to have a central bindable data
model.  A 'singleton" is often used for this.  Any component anywhere in
the app that needs to react when some data value changes can listen to
the model, either by binding for simple values, or by using a
changeWatcher if some action needs to occur.

 

The data service call result handler (which can be in the model) will
set the appropriate model property, and the child components will
respond.

 

 

Tracy Spratt,

Lariat Services, development services available



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 12:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] watching and triggering events

 


I think I'm making this more difficult than it should be; or at least I
hope I am...

I've got a parent viewer called AddContactandReminder.mxml and that has
two child objects, AddContact.mxml and ListAndShowContacts.mxml.  

When I add a new contact in the contact object I trigger an event
evtAddedNewContact which is watched in the parent object and triggers
the AddContact window to close.  I also want it to trigger the
ListAndShowContacts.mxml to reload the contacts from the server and
display the new list.  However, since it's another child object at the
same level as the AddContact.mxml I can't see the evtAddedNewContact
fire.  

Is there an easy way to watch this event from ListAndShowContacts?

Thanks!




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner  , and is

believed to be clean. 


Re: [flexcoders] How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread Alan Rother
As another total newbie to Flex and AS, Flex is a great way to learn AS. You
can totally build a Flex app using nothing but MXML, it'll be limited, but
you can do it.
Once you get into and start following the tutorials out there you'll pick up
the AS pretty quickly.

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


RE: [flexcoders] How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread Tracy Spratt
Hmm, how high is "up"?  Another simple question.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of fred44455
Sent: Monday, March 23, 2009 1:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How much actionscript 3 do you need to know in order
to develop in Flex 3

 

Flex is a mix of mxml and actionscript 3. Now my questions is simple. How
much AS3 do you need to know in order to develop seriously using Flex 3
technology? Thanks.





[flexcoders] Alternative to using ToolTips for popup

2009-03-23 Thread Charles Galpin

Hi All

I am trying to use ToolTip and ToolTipManager to implement a popup  
that comes up when I click an icon. I want the popup to be associated  
with my object, and it will have additional controls in it. Basically  
looking for similar behavior as a ToolTip in that I want it to popup  
above other components and have it's location tied to my object.


The problem is that I don't want to invoke the tooltip on hover but  
when I want it, and therefore can't intercept the event as the  
examples show to put in my custom ToolTip.   I monkey patched  
ToolTipManagerImpl to fix a problem with the createToolTip method to  
get it to use my custom tooltip and managed to get it working with


var savedClass:Class = ToolTipManager.toolTipClass;
ToolTipManager.toolTipClass = MyTip;
var myTip:MyTip = ToolTipManager.createToolTip(s,10,10) as MyTip;
ToolTipManager.toolTipClass = savedClass;

But aside from the negatives of monkey patching this feels wrong.

Can anyone suggest an alternative method to get the same behavior  
without using ToolTips?


thanks
charles

[flexcoders] Re: watching and triggering events

2009-03-23 Thread Tim Hoff

I agree with Tracy; using an MVC architecture handles this nicely.  For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _
>
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>





[flexcoders] Horizontal and Vertical gradients?

2009-03-23 Thread tchredeemed
Basically, I have an arrow that I draw graphically, it has a vertical gradient 
from the top to the bottom.

I want it to fade in from left to right, so I was wanting to put a horizontal 
gradient on it too...

I am not sure if it is possible to do this, or if this can be done a different 
way.

Here is the arrow: http://www.andrewthorp.com/green-arrow.png

I could just do an inner drop shadow - but the background behind the arrows is 
changing, so a black drop shadow would look pretty weird...

Halp!



[flexcoders] Re: How to add more context menu???

2009-03-23 Thread lehaianh1986
Thank kenneth. I want to add context menu in text area. Here is the code 

http://www.adobe.com/2006/mxml"; 
creationComplete="init()" >









I search and see in http://bugs.adobe.com/jira/browse/SDK-17684

seem the bug is not fixed :(

I don't know how to correct it. Can anyone help me!!!

--- In flexcoders@yahoogroups.com, "Kenneth Sutherland" 
 wrote:
>
> Try something like
> 
>  
>   contextMenu="{getyourMenu()}"
> 
>  
> 
> />
> 
>  
> 
> private function getyourMenu () : ContextMenu {
> 
> var paste:ContextMenuItem = new ContextMenuItem("paste");
> 
> paste.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, pasteHandler);
> 
>  
> 
> var cm:ContextMenu = new ContextMenu();
> 
>  cm.hideBuiltInItems();
> 
>  cm.customItems.push(paste);
> 
> return cm;
> 
> }





Re: [flexcoders] How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread Paul Andrews
- Original Message - 
From: "fred44455" 
To: 
Sent: Monday, March 23, 2009 5:05 PM
Subject: [flexcoders] How much actionscript 3 do you need to know in order 
to develop in Flex 3


> Flex is a mix of mxml and actionscript 3. Now my questions is simple. How 
> much AS3 do you need to know in order to develop seriously using Flex 3 
> technology? Thanks.

Some, kinda depends on the project.. 



[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
Thanks :)
I have progress,
When I put my renderer in the AdvancedDataGrid Tag 


I get the Tree with all hierarchy and values, and I can manipulate the cells 
and thats great..

But what I cant find a way to send a property to this renderer this way.

I sent it before when I called this function:

[Bindable]
private function createRendererProvider():void{
var rendererProvider:AdvancedDataGridRendererProvider;
var rendererProviders:Array = new Array();
var columns:ArrayCollection = tableDataProvider.columnNames as 
ArrayCollection;
for (var i:int = 0; i < columns.length; i++){
var colName:String = columns.getItemAt(i) as String;
rendererProvider = new AdvancedDataGridRendererProvider();
rendererProvider.columnIndex=i; 
var renderer_:IFactory= new ClassFactory(ItemRenderer);
// Sending variables to the renderer constructor
   (renderer_ as ClassFactory).properties 
  =  {tableDataProvider_:tableDataProvider};
   rendererProvider.renderer= renderer_;
   rendererProvider.dataField=colName;
   rendererProviders.push(rendererProvider);
}
for each(var Item:AdvancedDataGridRendererProvider in 
rendererProviders){
adg.rendererProviders.push(Item);
}
}

But using that, produce my problem again not showing the hierarchy :(

Is there a way to put the renderer in AdvancedDataGrid tag and still
use the ClassFactory to send proerties??

Thanks



--- In flexcoders@yahoogroups.com, "Amy"  wrote:
>
> --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> >
> > Thanks,
> > Well, I tried extending AdvancedDataGridItemRenderer & 
> > IDropInListItemRenderer
> 
> Try reading my series on how to make AdvancedDataGrid accept background 
> colors in the styleFunction
> 
> http://flexdiary.blogspot.com/2008/06/musings-on-advanceddatagrid-part-2.html
>




[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
Greate, its working like a charm..
The solution was to put the renderer inside the AdvancedDataGrid tag
in the mxml.

I created an IFactory var:
public var  renderer_:IFactory= new ClassFactory(ItemRenderer);

Initialized it with the relevant property I need to send 
to the renderer:

(renderer_ as ClassFactory).properties = 
{tableDataProvider_:tableDataProvider};

and then put this variable inside the AdvancedDataGrid tag:


Thanks Amy, your article helped me grasping things,
and Gregorg of course :

Jo

--- In flexcoders@yahoogroups.com, "Amy"  wrote:
>
> --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> >
> > Thanks,
> > Well, I tried extending AdvancedDataGridItemRenderer & 
> > IDropInListItemRenderer
> 
> Try reading my series on how to make AdvancedDataGrid accept background 
> colors in the styleFunction
> 
> http://flexdiary.blogspot.com/2008/06/musings-on-advanceddatagrid-part-2.html
>




RE: [flexcoders] watching and triggering events

2009-03-23 Thread Tracy Spratt
Have the parent re-dispatch the event and listen for it in "listAndshow"

 

One way to handle issues like this it to have a central bindable data model.
A 'singleton" is often used for this.  Any component anywhere in the app
that needs to react when some data value changes can listen to the model,
either by binding for simple values, or by using a changeWatcher if some
action needs to occur.

 

The data service call result handler (which can be in the model) will set
the appropriate model property, and the child components will respond.

 

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 12:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] watching and triggering events

 


I think I'm making this more difficult than it should be; or at least I hope
I am...

I've got a parent viewer called AddContactandReminder.mxml and that has two
child objects, AddContact.mxml and ListAndShowContacts.mxml.  

When I add a new contact in the contact object I trigger an event
evtAddedNewContact which is watched in the parent object and triggers the
AddContact window to close.  I also want it to trigger the
ListAndShowContacts.mxml to reload the contacts from the server and display
the new list.  However, since it's another child object at the same level as
the AddContact.mxml I can't see the evtAddedNewContact fire.  

Is there an easy way to watch this event from ListAndShowContacts?

Thanks!





Re: [flexcoders] How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread Wesley Acheson
Best off thinking of it like the following. Your entire presentation "could"
be in mxml but the logic needs to be in AS.  However you can mix the AS in
mxml files via the script tag.

To do anything non trivial requires AS in my opinion.  The answer really
depends on your definiation of seriously.  90% of the AS you need to know is
quite simple for most cases.

Regards,

Wes

2009/3/23 fred44455 

> Flex is a mix of mxml and actionscript 3. Now my questions is simple. How
> much AS3 do you need to know in order to develop seriously using Flex 3
> technology? Thanks.
>
>
>
> 
>
> --
> 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] Negative Mask

2009-03-23 Thread Michael Wills
Is the mask you want an image or going to be drawn dynamically? Do you 
have a movieclip or some other graphic that will be the mask and you 
want to invert its masking effect so it cuts out instead?

Also, related to what Kenneth posted, which Flash player are you 
targeting? 9 or 10?

Michael

app.developer wrote:
>
> If I wanted to have an image, would someone point me to a negative or 
> reverse mask tutorial. I'm having a dickens of a time locating a 
> current AS 3.0 or Flex 3 or 4 example.
>
> TIA,
> P
>
> 


RE: [flexcoders] Re: strange problem with remote object

2009-03-23 Thread Tracy Spratt
The html form is passing arguments to the CFC in hidden input fields.  How
are you passing arguments to the remoteObject method?

 

Hint, google: passing arguments to remoteObject method

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of johndoematrix
Sent: Monday, March 23, 2009 10:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: strange problem with remote object

 

guys any help? frankly i can't see whats wrong with my code. probably
something i dont see.





RE: [flexcoders] Negative Mask

2009-03-23 Thread Kenneth Sutherland
You could always try out some of the new pixel bender effects.

http://labs.adobe.com/technologies/pixelbender/

 

they have a invert filter that you can use without having to create your
own one, plus others can be found here
http://www.adobe.com/cfusion/exchange/index.cfm?event=productHome&exc=26

 

video tuts can be seen here

http://tv.adobe.com/#se+pixel%20bender 

 

Also here's a pixel bender explorer

http://extjs.com/blog/2009/02/19/pixel-bender-explorer/

 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of app.developer
Sent: 23 March 2009 15:34
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Negative Mask

 

If I wanted to have an image, would someone point me to a negative or
reverse mask tutorial. I'm having a dickens of a time locating a current
AS 3.0 or Flex 3 or 4 example.

TIA, 
P



Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---

[flexcoders] How much actionscript 3 do you need to know in order to develop in Flex 3

2009-03-23 Thread fred44455
Flex is a mix of mxml and actionscript 3. Now my questions is simple. How much 
AS3 do you need to know in order to develop seriously using Flex 3 technology? 
Thanks.



Re: [flexcoders] Re: How to separate Flex code and server code in different servevr?

2009-03-23 Thread Wesley Acheson
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213&sliceId=1basically
it needs to go on the web root of the server the data is served
from.

2009/3/23 markflex2007 

>
> What is the syntax for crossdomain.xml ?
>
> where I have to save the file? webroot?
>
> Thanks
>
> Mark
>
>
>
> 
>
> --
> 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
>
>
>
>


[flexcoders] watching and triggering events

2009-03-23 Thread Scott

I think I'm making this more difficult than it should be; or at least I hope I 
am...

I've got a parent viewer called AddContactandReminder.mxml and that has two 
child objects, AddContact.mxml and ListAndShowContacts.mxml.  

When I add a new contact in the contact object I trigger an event 
evtAddedNewContact which is watched in the parent object and triggers the 
AddContact window to close.  I also want it to trigger the 
ListAndShowContacts.mxml to reload the contacts from the server and display the 
new list.  However, since it's another child object at the same level as the 
AddContact.mxml I can't see the evtAddedNewContact fire.  

Is there an easy way to watch this event from ListAndShowContacts?

Thanks!


[flexcoders] Flex Preloader issue

2009-03-23 Thread syrgak
Good day everybody,

I was about to write a custom preloader for my flex application. I had a wide 
overlook on the Internet about this stuff and one moment is still confusing me.

Is there any way to keep the Flex Preloader showing even after the application 
has been already loaded and initialized. I need to do so because I have to load 
a bunch data for the application to work (e.g. set "visible = false" for the 
application while loading data through service). The thing I want to show is a 
custom Preloader showing text status message smth. like "Loading application" 
and then "Loading data"etc. Any help would be greatly appreciated.


Thank you,

Syrgak 



[flexcoders] watching and triggering events

2009-03-23 Thread Scott
 

I think I'm making this more difficult than it should be; or at least I
hope I am...

 

I've got a parent viewer called AddContactandReminder.mxml and that has
two child objects, AddContact.mxml and ListAndShowContacts.mxml.  

 

When I add a new contact in the contact object I trigger an event
evtAddedNewContact which is watched in the parent object and triggers
the AddContact window to close.  I also want it to trigger the
ListAndShowContacts.mxml to reload the contacts from the server and
display the new list.  However, since it's another child object at the
same level as the AddContact.mxml I can't see the evtAddedNewContact
fire.  

 

Is there an easy way to watch this event from ListAndShowContacts?

 

Thanks!



[flexcoders] Re: How to separate Flex code and server code in different servevr?

2009-03-23 Thread markflex2007
 
What is the syntax for crossdomain.xml ?

where I have to save the file? webroot?

Thanks

Mark



[flexcoders] Flex builder compiler

2009-03-23 Thread diehlryan
I have many, many issues with the Flex Builder compiler.  I will start
with this one: incremental compilation.  The docs state that by default,
FB compiler has incremental compilation turned on, which I don't believe
in the slightest.  If you run a command line build with
-incremental=true, the compiler generates .cache files.  FB doesn't
generate anything, does it just use a different mechanism to detect
changes?

I have a somewhat complex project structure, 1 Flex project with 6
supporting library projects.  If I make a simple change in one of the
library projects, I get a 7 minute compile time as FB goes and rebuilds
everything under the sun.

I have done any optimizations I can think of, including giving FB a full
gig of ram in the heap, using RSLs, closing unused projects, etc.  What
am I missing here?



[flexcoders] ANN: AmFast AMF encoder/decoder for Python released!

2009-03-23 Thread limscoder
AmFast   is a new AMF0/AMF3
encoder/decoder for Python.

* AmFast's core encoder and decoder are written in C, so it's around
18x faster than PyAmf  .
* The encoder and decoder accept user-defined Python objects that
allow customization of the encoding/decoding process.

* Supports custom class mapping.
* Supports remoting with NetConnection and RemoteObject.
* Remoting headers can be exposed to callable targets to allow for
quick implementation of authentication and other AMF features that rely
on headers.
* Supports data persistence with SQLAlchemy
 , including remotely-loadable lazy-loaded
attributes.
* Supports Actionscript code generation for mapped classes.
Check out the project page   and my
blog   for more information.


[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread Amy
--- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
>
> Thanks,
> Well, I tried extending AdvancedDataGridItemRenderer & IDropInListItemRenderer

Try reading my series on how to make AdvancedDataGrid accept background colors 
in the styleFunction

http://flexdiary.blogspot.com/2008/06/musings-on-advanceddatagrid-part-2.html



Re: [flexcoders] Getting Error when trying to destroy a tooltip

2009-03-23 Thread Charles Galpin
Tim, you have to declare myTip to be of the type IToolTip.

public var myTip:IToolTip;

hth
charles

On Mar 19, 2009, at 4:05 PM, timgerr wrote:

> Hello all,
> I am creating my own tooltip and I am getting an error, this code  
> comes from adobe examples.  Here is the code:
>
> http://www.adobe.com/2006/mxml";>
>

[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
Hi Gregor,
Dont want to bother, but I'll do a little :)
Any success with what I sent?

--- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
>
> Sure,
> This is the example I'm based on, you can just copy/paste to a new project 
> and it should work...
> 
> temp1.mxml:
> http://www.adobe.com/2006/mxml"; width="800" 
> height="400"
> creationComplete="init()">
> 
> 
> 
> 
> 
>  paddingTop="0" width="100%" height="100%" >  
>  height="300">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The ObjectHierarchicalData class exactly as in the link I sent
> 
> general.as:
> 
> import mx.collections.*;
> import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
> import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup;
> import mx.controls.advancedDataGridClasses.AdvancedDataGridRendererProvider;
> 
> 
> [Bindable]
> private var ohd:ObjectHierarchicalData;
> [Bindable]
> private var ohdTHeader:ObjectHierarchicalData;
> [Bindable]
> private var hCollView:HierarchicalCollectionView;
> 
> /* here's the huge object that we're going to use to populate our
> ObjectHierarchicalData object */
> private var largeObject:Object =
> [
> { id:"1", "name":"Misc", "type":"parent","quantity":"32", "parentTask":"0"},
> {id:"2", "name":"Clean the kitchen", "type":"parent", "parentTask":"0"},
> {id:"3", "name":"Pay the bills", "type":"parent", "parentTask":"0"},
> {id:"4", "name":"Paint the shed", "type":"parent", "parentTask":"1"},
> {id:"5", "name":"Get ready for party", "type":"parent","parentTask":"1"},
> {id:"6", "name":"Do the dishes", "type":"child","op1":"1", 
> "op2":"2","parentTask":"2"},
> {id:"7", "name":"Take out trash", "type":"child", 
> "op1":"11","parentTask":"2"},
> {id:"8", "name":"Gas Bill", "type":"child", "op3":23,"parentTask":"3"},
> {id:"9", "name":"Registration", "type":"child", "op1":"2","parentTask":"3"},
> {id:"10", "name":"Fix the car", "type":"parent", "parentTask":"0"},
> {id:"11", "name":"New tires", "type":"child","op4":14,"op1":"3" 
> ,"parentTask":"10"},
> {id:"12", "name":"Emissions test", "type":"child","op1":"4", 
> "parentTask":"10"},
> {id:"13", "name":"Get new paint", 
> "type":"child","quantity":"33::44","op1":"5", "parentTask":"4"},
> {id:"14", "name":"Buy brushes", "type":"child", 
> "op1":"6","quantity":"32::42","revenue":"rev","sale":"sal","parentTask":"4"},
> {id:"15", "name":"Buy Drinks", "type":"child","op1":"7", "parentTask":"5"},
> {id:"16", "name":"clean living room", "type":"child","op1":"8", 
> "parentTask":"5"},
> {id:"17", "name":"finish invitations", 
> "type":"parent","op1":"9","parentTask":"5"},{"id":"18", "name":"sub finish", 
> "type":"parent","parentTask":"17"},{"id":"19", "name":"sub sub finish", 
> "type":"child","parentTask":"18"}];
> 
> private var columns:ArrayCollection = new ArrayCollection();
> 
> 
> public var headerObj:Object=
> [
> {id:1,name:"Africa",type:"parent" ,parentTask:"0"},
> {id:2,name:"somalia",type:"parent", parentTask:"1"},
> {id:3,name:"Macro",type:"parent", parentTask:"1"},
> {id:4,name:"op1",type:"child",parentTask:"2"},
> {id:4,name:"op2",type:"child",parentTask:"2"},
> {id:5,name:"Europe",type:"parent" ,parentTask:"0"},
> {id:6,name:"Itly",type:"parent", parentTask:"5"},
> {id:7,name:"Japan",type:"parent", parentTask:"5"},
> {id:8,name:"op3",type:"child", parentTask:"6"},
> {id:9,name:"op4",type:"child", parentTask:"6"},
> {id:10,name:"op5",type:"child", parentTask:"7"}
> ];
> 
> private var colGroup:AdvancedDataGridColumnGroup;
> 
> private var columnGroup2:AdvancedDataGridColumnGroup;
> 
> public var colsArray:Array=[];
> 
> 
> private var columnGroup3:AdvancedDataGridColumnGroup;
> 
> [Bindable]
> private var flag:Boolean = false;
> 
> private function buildHeader():void
> {
> if(!flag){
> flag = true;
> var advancedDGCol:AdvancedDataGridColumn = new AdvancedDataGridColumn();
> ohdTHeader = new ObjectHierarchicalData(headerObj);
> resultTBLADG.expandAll();
> var colsArray1:Array=[];
> hCollView = new HierarchicalCollectionView(ohdTHeader);
> advancedDGCol.dataField = "name";
> advancedDGCol.width=300;
> advancedDGCol.headerText='';
> colsArray.push(advancedDGCol);
> for each(var hObj:Object in headerObj)
> { 
> if(hObj.parentTask=="0")
> {
> var 
> children:ICollectionView=hCollView.getChildren(hCollView.source.getData({id:hObj.id}));
> var cursor:IViewCursor=children.createCursor();
> colGroup = new AdvancedDataGridColumnGroup();
> colGroup.headerText = hObj.name;
> prepareColumns(cursor,colGroup);
> colsArray.push(colGroup);
> }
> 
> }
> 
> this.resultTBLADG.groupedColumns=colsArray;
> this.resultTBLADG.validateNow();
>   // here I load the Item renderer
>   var rendererProviders:Array = new Array();
>   rendererProviders = setRendererProvider();  
> 
>   for each(var 
> Item:AdvancedDataGridRendererProvider in 

[flexcoders] Re: strange problem with remote object

2009-03-23 Thread valdhor
The problem is that you are not sending any data from Flex. You have

remoteObj.userData.send()

on creationComplete but you do not have any parameters for that function so no 
data is sent. The CF code requires the username and password parameters but 
does not get them.

You obviously want to send this data with your call but you can't if you invoke 
the remoteObject call on creationComplete.

So, the first thing to do is remove the invocation from creationComplete. Next, 
you should add a button to your form and create a function to run on click of 
the button.



private function doLogin():void
{
  remoteObj.userData.send();
}



{username}
{password}



This is only one way of doing it. There are others.

I would recommend using Charles (http://www.charlesproxy.com) to debug these 
kinds of errors. You would see very quickly that Flex did not send any data.

HTH


Steve


--- In flexcoders@yahoogroups.com, "johndoematrix"  wrote:
>
> guys i just read up on this and am doing it the same way as the example. here 
> is the example i refered to just to be sure i got this right.
> 
> Passing parameters using a form
> 
> To pass parameters to components using an HTML or ColdFusion form, the names 
> of the client input controls must match the names of the parameter definition 
> in the component file.
> To pass parameters using a form:
> 
>1. Open the corpFind.cfm file and modify the code so that it appears as 
> follows:
> 
>   Find People and Products
>   
> Enter employee's last Name:
> 
> 
> 
>   
>   
> Enter maximum product price:
> 
> 
> 
>   
> 
>   In the example, the form tag action attribute points to the corpQuery 
> component. The input tags invoke the component method.
>2. Open corpQuery.cfc and add access="remote" to each cffunction tag, as 
> the following example shows:
> 
>   
> 
>
>
>  SELECT LASTNAME, FIRSTNAME, EMAIL
>  FROM tblEmployees
> WHERE LASTNAME LIKE '#arguments.lastName#'
>
>Results filtered by #arguments.lastName#:
>
> 
> 
>  
>   
>  SELECT ItemName, ItemDescription, ItemCost
>  FROM tblItems
> WHERE ItemCost <= #arguments.cost#
>
>Results filtered by #arguments.cost#:
>
> 
>   
> 
>   In this example, the cffunction access attribute lets remote clients, 
> such as web browsers and Flash applications, to access component methods.
> 
> this is not different from what am doing the only difference may is that am 
> using a flex form but i think that doesn't matter.
>




Re: [flexcoders] ADG Memory leak.

2009-03-23 Thread Wesley Acheson
Thanks Adrian

On Mon, Mar 23, 2009 at 1:55 PM, Adrian Williams
wrote:

>  Hi Wesley,
>
> We work with ADG's extensively including some intense custom renderers
> and have had horrible problems with memory leaks.  Turns out, there are
> known problems with the ADG's internal renderers leaking like a sieve.  And
> as an experiment, we setup a custom renderer that simply returned .this and
> it leaked like crazy. We have a fairly large ADG (100+ columns) and every
> time we'd scroll right to see more columns, more renderers would be created
> in addition to the one's already present...and scrolling back left would
> recreate them again instead of using the one's that had already been
> created...at one point, we had several hundred instances of renderers
> running for a single grid.  Insanity! And, because the ADG and the DG are
> maintained by two separate teams at Adobe, one is not related to the other
> and in this case, the DG does not have the same leaks as the ADG.
>
> In the end, we had to write a serious piece of code to manage our
> renderers, which finally rid us of the leaks we were encountering.  I've
> been working on trying to encapsulate our logic so I can post it here as I
> know a lot of other folks have run into the same problems and could probably
> use the help.
>
> Best,
> Adrian
>
> Wesley Acheson wrote:
>
>  I've wasted most of the day trying to figure out why my application was
> leaking memory.
>
>  I was dynamically adding and removing columns from the AdvancedDataGrid. I
> noticed that it was slowing down a lot.  I naturally assumed that it was my
> custom item renderer and even after reading Alex's blog entry about using
> the profiler I couldn't figure out what was holding references to my item
> renderer.
>
>  Anyway the error continued to happen after I commented out all the code in
> my item renderer.  I even changed it to subclass
> AdvancedDataGridItemRenderer, still no joy.  So I removed the custom item
> renderer and noticed that instead of my ItemRenderer the ADG didn't remove
> references to its own item renderer.
>
> Anyway I changed to a standard DataGrid and all worked correctly.  The
> references were removed when garbage collection occurred I had to change my
> code a bit.
>
> This isn't really a question more of a complaint really.  I don't know if
> it was my code or just a problem with the ADG though I suspect the latter.
>
> A couple of things I noticed with the standard DG.  Firstly if setting the
> itemrenderer on the DG itself it also uses the same ItemRenderer on the
> header rows.  Is this correct behaviour.  Setting the ItemRenderer on the
> column seems to keep the normal header renderer.  This I admit has me
> confused is this the way its supposed to work?  How would I set all the
> cells to a custom IR and leave the headers alone?  It seems inconsistent.
>
> I have read the excellent Articles on Alex's blog.
>
> Anyway that's all.
>
> Regards,
>
> Wes
>
>
>
> 
>


[flexcoders] Negative Mask

2009-03-23 Thread app.developer
If I wanted to have an image, would someone point me to a negative or reverse 
mask tutorial.  I'm having a dickens of a time locating a current AS 3.0 or 
Flex 3 or 4 example.

TIA, 
P



Re: [flexcoders] ADG Memory leak.

2009-03-23 Thread Tom Chiverton
On Monday 23 Mar 2009, Adrian Williams wrote:
> a sieve.  And as an experiment, we setup a custom renderer that simply
> returned .this and it leaked like crazy. We have a fairly large ADG
> (100+ columns) and every time we'd scroll right to see more columns,

Could you attach this as a test case to an issue in the DMV project on 
bugs.adobe.com ?

-- 
Tom Chiverton
Helping to continuously mesh compelling e-tailers as part of the IT team of 
the year, '09 and '08



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 together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. 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] Re: strange problem with remote object

2009-03-23 Thread johndoematrix
guys any help? frankly i can't see whats wrong with my code. probably something 
i dont see.



[flexcoders] Remove 'maximize'-icon from window (Adobe AIR)?

2009-03-23 Thread bjorn
I'd think setting maximizable = false in the application xml would remove
the icon from the title bar, however this does not seem to do the trick.
I know I can set showFlexChrome to false and then make my own title bar
(without the maximize button), but this seems a bit backwards when all I
want to do is remove the maximize button.

Tried styling maximizeButtonSkin/restoreButtonSkin with ClassReference(null)
as well. It did work, but messed up the positioning of the minimize button +
seems like a hack.

Anyone know an easy way?

Bjørn--

http://www.bie.no/blog/ <- yes, a tech blog.


Re: [flexcoders] ADG Memory leak.

2009-03-23 Thread Adrian Williams

Hi Wesley,

   We work with ADG's extensively including some intense custom 
renderers and have had horrible problems with memory leaks.  Turns out, 
there are known problems with the ADG's internal renderers leaking like 
a sieve.  And as an experiment, we setup a custom renderer that simply 
returned .this and it leaked like crazy. We have a fairly large ADG 
(100+ columns) and every time we'd scroll right to see more columns, 
more renderers would be created in addition to the one's already 
present...and scrolling back left would recreate them again instead of 
using the one's that had already been created...at one point, we had 
several hundred instances of renderers running for a single grid.  
Insanity! And, because the ADG and the DG are maintained by two separate 
teams at Adobe, one is not related to the other and in this case, the DG 
does not have the same leaks as the ADG.


   In the end, we had to write a serious piece of code to manage our 
renderers, which finally rid us of the leaks we were encountering.  I've 
been working on trying to encapsulate our logic so I can post it here as 
I know a lot of other folks have run into the same problems and could 
probably use the help.


Best,
Adrian

Wesley Acheson wrote:


I've wasted most of the day trying to figure out why my application 
was leaking memory.


 I was dynamically adding and removing columns from the 
AdvancedDataGrid. I noticed that it was slowing down a lot.  I 
naturally assumed that it was my custom item renderer and even after 
reading Alex's blog entry about using the profiler I couldn't figure 
out what was holding references to my item renderer.


 Anyway the error continued to happen after I commented out all the 
code in my item renderer.  I even changed it to subclass 
AdvancedDataGridItemRenderer, still no joy.  So I removed the custom 
item renderer and noticed that instead of my ItemRenderer the ADG 
didn't remove references to its own item renderer.


Anyway I changed to a standard DataGrid and all worked correctly.  The 
references were removed when garbage collection occurred I had to 
change my code a bit.


This isn't really a question more of a complaint really.  I don't know 
if it was my code or just a problem with the ADG though I suspect the 
latter.


A couple of things I noticed with the standard DG.  Firstly if setting 
the itemrenderer on the DG itself it also uses the same ItemRenderer 
on the header rows.  Is this correct behaviour.  Setting the 
ItemRenderer on the column seems to keep the normal header renderer.  
This I admit has me confused is this the way its supposed to work?  
How would I set all the cells to a custom IR and leave the headers 
alone?  It seems inconsistent.


I have read the excellent Articles on Alex's blog.

Anyway that's all.

Regards,

Wes




[flexcoders] Push XML with BladzDS

2009-03-23 Thread johnpagetbourke
Hi,

I have a Flex app which I need to push XML.

Is there is simple, reliable way to do this.

I would prefer not to pseudo push using polling.

john




[flexcoders] hide accordion headers

2009-03-23 Thread carloscarvalhar
Hi,

I have a flex application with an accordion 100% width/height and i'd like to 
show the accordion headers only when the mouse is at the corners.

Is it possible to hide accordion headers and show it only when i want?

Is there any possibility to implement this?
how can i do this?
thanks,
Carlos



RE: [flexcoders] How to add more context menu???

2009-03-23 Thread Kenneth Sutherland
Try something like



 

private function getyourMenu () : ContextMenu {

var paste:ContextMenuItem = new ContextMenuItem("paste");

paste.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, pasteHandler);

 

var cm:ContextMenu = new ContextMenu();

 cm.hideBuiltInItems();

 cm.customItems.push(paste);

return cm;

}

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of lehaianh1986
Sent: 23 March 2009 10:58
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to add more context menu???

 

Hi every body. I want to add my function when I click on word in text
area (like copy, paste, ..etc). I follow the guide in
http://www.adobe.com/devnet/air/flex/quickstart/adding_menus.html
But what i want is add my function to default context menu, not instead
of remove default context menu.
Can anyone help me? Thank in advanced!!!



Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---

[flexcoders] Sorting a list at specified intervals

2009-03-23 Thread Rohit Sharma
Hello All,

 I have a requirement in my project where I want the list to be
sorted every three seconds. The flow goes as follows :-


   1. As soon as a new room gets added or deleted or the user count changes,
   it gets reflected in the room list which is a list component.
   2. But the room list should be sorted only on 3 seconds duration.

 What is happening is that as soon as I apply the sort and refresh
it, it starts working. And the sorting happens as soon as some change
   happens to the list dataprovider. Am not able to restrict the sort at
three seconds interval. I have also tried using disableautoupdate with
   the data provider but that stops the addition of the new rooms also.
I also tried setting sort to null after applying first sort but as soon as
   I refresh the null sort, original sort goes off.

   Please help, I am stuck with this thing.

 Regards,
 Rohit Sharma
 Lead Developer, Mactabilis Arts.
 www.mactabilisarts.com


[flexcoders] compc: using -namespace and -include-sources together cause circular inheritance

2009-03-23 Thread ltkavanagh
Hi.

I am trying to write an Ant script to complie a swc and am stuck on the 
following problem:

I used -include-sources to specify the src directory
I have a manifest.xml - all fine and dandy
I have correctly specified the namespace using -namespace and 
-include-namespaces

However I am getting an error for each component defined in the manifast. 
'Error: The definition is in circular inheritance.'

The library compiles fine using the FB builder (ie not using the Ant script). 
Here i defined the manifest using the compiler section of the Properties dialog.

Also, if in the Ant script I change -include-sources to -include-classes and 
then use a config xml to list the classes then it compiles successfully.

For convenience I would prefer to use -include-sources rather than 
-include-classes but I just can't get it to work.

Can anyone explain to me what I am doing wrong?

Thanks





[flexcoders] mouse events

2009-03-23 Thread Kenneth Sutherland
I'm having what seems to be a very trivial issue (maybe its just a
Monday morning issue), I have 2 canvas containers inside another canvas.
See picture for explanation. Canvas 2 has a alpha value so you can see
canvas 1, but when you mouse over the area where both canvases mix
together canvas 1 will not get mouse/roll events. Any ideas how to
change this? (canvas 1 has a button that needs mouse events and canvas 2
must listen for the roll events).

Thanks.

 

 



realise

.


Kenneth Sutherland

Technical Developer

Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com  

Check out some of our recent flex work:
* Focus on funds UK  
* Focus on funds Europe
 
* Fund selector
 

* Video view
 
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.

 

 

Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---<>

[flexcoders] How to add more context menu???

2009-03-23 Thread lehaianh1986
Hi every body. I want to add my function when I click on word in text area 
(like copy, paste, ..etc). I follow the guide in 
http://www.adobe.com/devnet/air/flex/quickstart/adding_menus.html
But what i want is add my function to default context menu, not instead of 
remove default context menu.
Can anyone help me? Thank in advanced!!!



[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
Sure,
This is the example I'm based on, you can just copy/paste to a new project and 
it should work...

temp1.mxml:
http://www.adobe.com/2006/mxml"; width="800" 
height="400"
creationComplete="init()">





  










The ObjectHierarchicalData class exactly as in the link I sent

general.as:

import mx.collections.*;
import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup;
import mx.controls.advancedDataGridClasses.AdvancedDataGridRendererProvider;


[Bindable]
private var ohd:ObjectHierarchicalData;
[Bindable]
private var ohdTHeader:ObjectHierarchicalData;
[Bindable]
private var hCollView:HierarchicalCollectionView;

/* here's the huge object that we're going to use to populate our
ObjectHierarchicalData object */
private var largeObject:Object =
[
{ id:"1", "name":"Misc", "type":"parent","quantity":"32", "parentTask":"0"},
{id:"2", "name":"Clean the kitchen", "type":"parent", "parentTask":"0"},
{id:"3", "name":"Pay the bills", "type":"parent", "parentTask":"0"},
{id:"4", "name":"Paint the shed", "type":"parent", "parentTask":"1"},
{id:"5", "name":"Get ready for party", "type":"parent","parentTask":"1"},
{id:"6", "name":"Do the dishes", "type":"child","op1":"1", 
"op2":"2","parentTask":"2"},
{id:"7", "name":"Take out trash", "type":"child", "op1":"11","parentTask":"2"},
{id:"8", "name":"Gas Bill", "type":"child", "op3":23,"parentTask":"3"},
{id:"9", "name":"Registration", "type":"child", "op1":"2","parentTask":"3"},
{id:"10", "name":"Fix the car", "type":"parent", "parentTask":"0"},
{id:"11", "name":"New tires", "type":"child","op4":14,"op1":"3" 
,"parentTask":"10"},
{id:"12", "name":"Emissions test", "type":"child","op1":"4", "parentTask":"10"},
{id:"13", "name":"Get new paint", "type":"child","quantity":"33::44","op1":"5", 
"parentTask":"4"},
{id:"14", "name":"Buy brushes", "type":"child", 
"op1":"6","quantity":"32::42","revenue":"rev","sale":"sal","parentTask":"4"},
{id:"15", "name":"Buy Drinks", "type":"child","op1":"7", "parentTask":"5"},
{id:"16", "name":"clean living room", "type":"child","op1":"8", 
"parentTask":"5"},
{id:"17", "name":"finish invitations", 
"type":"parent","op1":"9","parentTask":"5"},{"id":"18", "name":"sub finish", 
"type":"parent","parentTask":"17"},{"id":"19", "name":"sub sub finish", 
"type":"child","parentTask":"18"}];

private var columns:ArrayCollection = new ArrayCollection();


public var headerObj:Object=
[
{id:1,name:"Africa",type:"parent" ,parentTask:"0"},
{id:2,name:"somalia",type:"parent", parentTask:"1"},
{id:3,name:"Macro",type:"parent", parentTask:"1"},
{id:4,name:"op1",type:"child",parentTask:"2"},
{id:4,name:"op2",type:"child",parentTask:"2"},
{id:5,name:"Europe",type:"parent" ,parentTask:"0"},
{id:6,name:"Itly",type:"parent", parentTask:"5"},
{id:7,name:"Japan",type:"parent", parentTask:"5"},
{id:8,name:"op3",type:"child", parentTask:"6"},
{id:9,name:"op4",type:"child", parentTask:"6"},
{id:10,name:"op5",type:"child", parentTask:"7"}
];

private var colGroup:AdvancedDataGridColumnGroup;

private var columnGroup2:AdvancedDataGridColumnGroup;

public var colsArray:Array=[];


private var columnGroup3:AdvancedDataGridColumnGroup;

[Bindable]
private var flag:Boolean = false;

private function buildHeader():void
{
if(!flag){
flag = true;
var advancedDGCol:AdvancedDataGridColumn = new AdvancedDataGridColumn();
ohdTHeader = new ObjectHierarchicalData(headerObj);
resultTBLADG.expandAll();
var colsArray1:Array=[];
hCollView = new HierarchicalCollectionView(ohdTHeader);
advancedDGCol.dataField = "name";
advancedDGCol.width=300;
advancedDGCol.headerText='';
colsArray.push(advancedDGCol);
for each(var hObj:Object in headerObj)
{ 
if(hObj.parentTask=="0")
{
var 
children:ICollectionView=hCollView.getChildren(hCollView.source.getData({id:hObj.id}));
var cursor:IViewCursor=children.createCursor();
colGroup = new AdvancedDataGridColumnGroup();
colGroup.headerText = hObj.name;
prepareColumns(cursor,colGroup);
colsArray.push(colGroup);
}

}

this.resultTBLADG.groupedColumns=colsArray;
this.resultTBLADG.validateNow();
// here I load the Item renderer
var rendererProviders:Array = new Array();
rendererProviders = setRendererProvider();  

for each(var 
Item:AdvancedDataGridRendererProvider in rendererProviders){

this.resultTBLADG.rendererProviders.push(Item);
}
}
}
private function 
prepareColumns(cursor:IViewCursor,columnGroup:AdvancedDataGridColumnGroup):void
{

while(!cursor.afterLast)
{
var node:Object = cursor.current;

if(node.type=="parent")
{
var columnGroup2:AdvancedDataGridColumnGroup= new AdvancedDataGridColumnGroup();
columnGroup2.headerText = node.name;
columnGroup.children.p

RE: [flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread Gregor Kiddie
 Looking at the renderers source, it is a bit manky internally, though
what you've posted shouldn't cause too many problems. Is your renderer
doing anything else? Can you post the whole class?

 

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
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 yossi.baram
Sent: 23 March 2009 09:57
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
DataProvider

 

The link I sent may be incorrect,
look at http://inovativeflexdevolopment.blogspot.com/
 
(Flex3 Dynamic population of data in Advanced datagrid with customn
header...) example

--- In flexcoders@yahoogroups.com 
, "yossi.baram"  wrote:
>
> It make sense what you asked,
> Yes it looks good, with hierarchy, when I eliminate the Itemrenderer
call, my data structure is as in the example:
>
http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-popul
ation-of
 \-data-in.html
> 
> I am building a flat data (a list of rows) with parentId and type
(child/parent) in my java server using blazeds i send it by RemoteObject
to the Flex app.
> Then I use;
> ohd = new ObjectHierarchicalData(rows);
> adg.dataProvider = ohd;
> 
> If I dont use the Itemrenderer the Treegrid looks good with all data
and correct hierarchy,
> 
> Please advise if you need some thing else,
> 
> Thanks for your time :)
> 
> 
> --- In flexcoders@yahoogroups.com
 , "Gregor Kiddie" 
wrote:
> >
> > Not to be funny, but does the structure look right when you aren't
using
> > a custom renderer? I.e. is your data correct?
> > 
> > 
> > 
> > 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
> > 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.helpdesk@
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com

[mailto:flexcoders@yahoogroups.com 
] On
> > Behalf Of yossi.baram
> > Sent: 23 March 2009 09:30
> > To: flexcoders@yahoogroups.com 

> > Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
> > DataProvider
> > 
> > 
> > 
> > Thanks,
> > Well, I tried extending AdvancedDataGridItemRenderer &
> > IDropInListItemRenderer
> > 
> > and my set data I'm overriding:
> > override public function set data(value:Object):void {
> > 
> > super.data = value;
> > if (this.listData)
> > {
> > // get the owner AdvnacedDataGrid
> > var listOwner:AdvancedDataGrid =
AdvancedDataGrid(this.listData.owner); 
> > if (listData!=null && data != null)
> > { 
> > this.background = true;
> > this.backgroundColor = 0xFFB6B6;
> > }
> > } 
> > }
> > 
> > As you can see for the example its just should paint the rows.
> > 
> > But still the data is flat I cannot see child1 as the parent :(((
> > 
> > can you give me simple example how should set data() should look
like to
> > allow me manipulation on the data but still preserve the hierarchy?
> > 
> > I tried many things but nothing
> > 
> > Thanks
> >
>





[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
The link I sent may be incorrect,
look at http://inovativeflexdevolopment.blogspot.com/
(Flex3 Dynamic population of data in Advanced datagrid with customn header...) 
example


--- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
>
> It make sense what you asked,
> Yes it looks good, with hierarchy, when I eliminate the Itemrenderer call, my 
> data structure is as in the example:
> http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-population-of\-data-in.html
> 
> I am building a flat data (a list of rows) with parentId and type 
> (child/parent) in my java server using blazeds i send it by RemoteObject to 
> the Flex app.
> Then I use;
> ohd = new ObjectHierarchicalData(rows);
> adg.dataProvider = ohd;
> 
> If I dont use the Itemrenderer the Treegrid looks good with all data and 
> correct hierarchy,
> 
> Please advise if you need some thing else,
> 
> Thanks for your time :)
>  
> 
> --- In flexcoders@yahoogroups.com, "Gregor Kiddie"  wrote:
> >
> > Not to be funny, but does the structure look right when you aren't using
> > a custom renderer? I.e. is your data correct?
> > 
> >  
> > 
> > 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
> > 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.helpdesk@
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> > Behalf Of yossi.baram
> > Sent: 23 March 2009 09:30
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
> > DataProvider
> > 
> >  
> > 
> > Thanks,
> > Well, I tried extending AdvancedDataGridItemRenderer &
> > IDropInListItemRenderer
> > 
> > and my set data I'm overriding:
> > override public function set data(value:Object):void {
> > 
> > super.data = value;
> > if (this.listData)
> > {
> > // get the owner AdvnacedDataGrid
> > var listOwner:AdvancedDataGrid = AdvancedDataGrid(this.listData.owner); 
> > if (listData!=null && data != null)
> > { 
> > this.background = true;
> > this.backgroundColor = 0xFFB6B6;
> > }
> > } 
> > }
> > 
> > As you can see for the example its just should paint the rows.
> > 
> > But still the data is flat I cannot see child1 as the parent :(((
> > 
> > can you give me simple example how should set data() should look like to
> > allow me manipulation on the data but still preserve the hierarchy?
> > 
> > I tried many things but nothing
> > 
> > Thanks
> >
>




[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
It make sense what you asked,
Yes it looks good, with hierarchy, when I eliminate the Itemrenderer call, my 
data structure is as in the example:
http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-population-of\-data-in.html

I am building a flat data (a list of rows) with parentId and type 
(child/parent) in my java server using blazeds i send it by RemoteObject to the 
Flex app.
Then I use;
ohd = new ObjectHierarchicalData(rows);
adg.dataProvider = ohd;

If I dont use the Itemrenderer the Treegrid looks good with all data and 
correct hierarchy,

Please advise if you need some thing else,

Thanks for your time :)
 

--- In flexcoders@yahoogroups.com, "Gregor Kiddie"  wrote:
>
> Not to be funny, but does the structure look right when you aren't using
> a custom renderer? I.e. is your data correct?
> 
>  
> 
> 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
> 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...@...
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of yossi.baram
> Sent: 23 March 2009 09:30
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
> DataProvider
> 
>  
> 
> Thanks,
> Well, I tried extending AdvancedDataGridItemRenderer &
> IDropInListItemRenderer
> 
> and my set data I'm overriding:
> override public function set data(value:Object):void {
> 
> super.data = value;
> if (this.listData)
> {
> // get the owner AdvnacedDataGrid
> var listOwner:AdvancedDataGrid = AdvancedDataGrid(this.listData.owner); 
> if (listData!=null && data != null)
> { 
> this.background = true;
> this.backgroundColor = 0xFFB6B6;
> }
> } 
> }
> 
> As you can see for the example its just should paint the rows.
> 
> But still the data is flat I cannot see child1 as the parent :(((
> 
> can you give me simple example how should set data() should look like to
> allow me manipulation on the data but still preserve the hierarchy?
> 
> I tried many things but nothing
> 
> Thanks
>




RE: [flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread Gregor Kiddie
Not to be funny, but does the structure look right when you aren't using
a custom renderer? I.e. is your data correct?

 

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
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 yossi.baram
Sent: 23 March 2009 09:30
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
DataProvider

 

Thanks,
Well, I tried extending AdvancedDataGridItemRenderer &
IDropInListItemRenderer

and my set data I'm overriding:
override public function set data(value:Object):void {

super.data = value;
if (this.listData)
{
// get the owner AdvnacedDataGrid
var listOwner:AdvancedDataGrid = AdvancedDataGrid(this.listData.owner); 
if (listData!=null && data != null)
{ 
this.background = true;
this.backgroundColor = 0xFFB6B6;
}
} 
}

As you can see for the example its just should paint the rows.

But still the data is flat I cannot see child1 as the parent :(((

can you give me simple example how should set data() should look like to
allow me manipulation on the data but still preserve the hierarchy?

I tried many things but nothing

Thanks





[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
Thanks,
Well, I tried extending AdvancedDataGridItemRenderer & IDropInListItemRenderer

and my set data I'm overriding:
override public function set data(value:Object):void {
 
   super.data = value;
  if (this.listData)
  {
  //  get the owner AdvnacedDataGrid
  var listOwner:AdvancedDataGrid = AdvancedDataGrid(this.listData.owner);   
 
if (listData!=null && data != null)
{ 
   this.background = true;
   this.backgroundColor = 0xFFB6B6;
}
}   
}

As you can see for the example its just should paint the rows.

But still the data is flat I cannot see child1 as the parent :(((

can you give me simple example how should set data() should look like to allow 
me manipulation on the data but still preserve the hierarchy?

I tried many things but nothing

Thanks

--- In flexcoders@yahoogroups.com, "Gregor Kiddie"  wrote:
>
> You are losing the indentation and icon because the item renderer
> handles all that for you.
> 
> Either extend the AdvancedDataGridItemRenderer
> (http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridCl
> asses/AdvancedDataGridGroupItemRenderer.html ) and include what you
> need, or see if the renderer provider can give you any help
> (http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridCl
> asses/AdvancedDataGridRendererProvider.html ).
> 
> If neither of these do, you will have to implement the indentation and
> icon stuff yourself.
> 
>  
> 
> 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
> 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...@...
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of yossi.baram
> Sent: 23 March 2009 08:58
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
> DataProvider
> 
>  
> 
> No,
> Lets say I have parent1 and he has a child1 which is a parent also,
> when I click on parent1 I should see the child1 as a parent(with icon)
> to allow me drill deeper but now I see child1 as text,
> The hierarchy:
> parent1
> | 
> child1
> |
> child-child text
> 
> please advise if Im not understud
> 
> Thanks for your help man
> 
> --- In flexcoders@yahoogroups.com 
> , Wesley Acheson  wrote:
> >
> > Sorry I'm not really understanding. Are you saing that you want all
> > children nodes automatically expanded?-
> > 
> > On Mon, Mar 23, 2009 at 8:55 AM, yossi.baram  wrote:
> > 
> > > Guys,
> > > There mast be somebody knows how to preserve hierarchy and to allow
> the
> > > TreeGrid to look the same with parents and childrens,
> > > using the ItemRenderer
> > >
> > > Sorry for the resending the question. I realy need
> > > a clue here,
> > >
> > > Thanks
> > > --- In flexcoders@yahoogroups.com
>  , "yossi.baram" 
> wrote:
> > > >
> > > > Hi,
> > > > My problem is simple,
> > > > In my TreeTable The ItemRenderer show me only one level.
> > > > When I click the parent it will show only the level beneath it,
> > > > although it has childrens, WHY???
> > > > When I use depth, I can see the tree but it doesnt activate the
> > > ItemRenderer.
> > > > How can I set the Itemrenderer to manipulate and show ALL
> branches?
> > > >
> > > > Please advice guys, I have been looking every where but couldnt
> find a
> > > solution.
> > > >
> > > > Thanks in advance
> > > >
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com
>  , "yossi.baram" 
> wrote:
> > > > >
> > > > > Hi,
> > > > > There is a greate example in the following link that allows us
> to
> > > create simple hirarchical grid with AdvancedDataGrid, implementing
> > > IHierarchicalData.
> > > > >
> > > > >
> > >
> http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-popul
> ation-of-data-in.html
>  lation-of-data-in.html> 
> > > > >
> > > > > I couldnt find a way to include ItemRenderer using this kind of
> > > dataProvider,
> > > > > I tried everything but all I get when using a simple
> ItemRenderer is a
> > > flat tree with no hirarchy :(
> > > > >
> > > > > Please please advice
> > > > >
> > > > > Thanks
> > > > >
> > > > > Jo
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > > --
> > > 

Re: [flexcoders] Re: Convert Air app. to Flex

2009-03-23 Thread Tom Chiverton
On Saturday 21 Mar 2009, Amy wrote:
> Has anyone successfully managed to have this make the change?  I've had AIR

Just now, to prove it worked, yes.

-- 
Tom Chiverton
Helping to assertively e-enable seamless solutions as part of the IT team of 
the year, '09 and '08



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 together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. 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.

RE: [flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread Gregor Kiddie
You are losing the indentation and icon because the item renderer
handles all that for you.

Either extend the AdvancedDataGridItemRenderer
(http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridCl
asses/AdvancedDataGridGroupItemRenderer.html ) and include what you
need, or see if the renderer provider can give you any help
(http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridCl
asses/AdvancedDataGridRendererProvider.html ).

If neither of these do, you will have to implement the indentation and
icon stuff yourself.

 

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
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 yossi.baram
Sent: 23 March 2009 08:58
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using ItemRenderer with IHierarchicalData
DataProvider

 

No,
Lets say I have parent1 and he has a child1 which is a parent also,
when I click on parent1 I should see the child1 as a parent(with icon)
to allow me drill deeper but now I see child1 as text,
The hierarchy:
parent1
| 
child1
|
child-child text

please advise if Im not understud

Thanks for your help man

--- In flexcoders@yahoogroups.com 
, Wesley Acheson  wrote:
>
> Sorry I'm not really understanding. Are you saing that you want all
> children nodes automatically expanded?-
> 
> On Mon, Mar 23, 2009 at 8:55 AM, yossi.baram  wrote:
> 
> > Guys,
> > There mast be somebody knows how to preserve hierarchy and to allow
the
> > TreeGrid to look the same with parents and childrens,
> > using the ItemRenderer
> >
> > Sorry for the resending the question. I realy need
> > a clue here,
> >
> > Thanks
> > --- In flexcoders@yahoogroups.com
 , "yossi.baram" 
wrote:
> > >
> > > Hi,
> > > My problem is simple,
> > > In my TreeTable The ItemRenderer show me only one level.
> > > When I click the parent it will show only the level beneath it,
> > > although it has childrens, WHY???
> > > When I use depth, I can see the tree but it doesnt activate the
> > ItemRenderer.
> > > How can I set the Itemrenderer to manipulate and show ALL
branches?
> > >
> > > Please advice guys, I have been looking every where but couldnt
find a
> > solution.
> > >
> > > Thanks in advance
> > >
> > >
> > >
> > > --- In flexcoders@yahoogroups.com
 , "yossi.baram" 
wrote:
> > > >
> > > > Hi,
> > > > There is a greate example in the following link that allows us
to
> > create simple hirarchical grid with AdvancedDataGrid, implementing
> > IHierarchicalData.
> > > >
> > > >
> >
http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-popul
ation-of-data-in.html
 
> > > >
> > > > I couldnt find a way to include ItemRenderer using this kind of
> > dataProvider,
> > > > I tried everything but all I get when using a simple
ItemRenderer is a
> > flat tree with no hirarchy :(
> > > >
> > > > Please please advice
> > > >
> > > > Thanks
> > > >
> > > > Jo
> > > >
> > >
> >
> >
> >
> >
> > 
> >
> > --
> > 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
> >
> >
> >
> >
>





[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
No,
Lets say I have parent1 and he has a child1 which is a parent also,
when I click on parent1 I should see the child1 as a parent(with icon) to allow 
me drill deeper but now I see child1 as text,
The hierarchy:
parent1
| 
  child1
   |
child-child  text


please advise if Im not understud

Thanks for your help man

--- In flexcoders@yahoogroups.com, Wesley Acheson  wrote:
>
> Sorry I'm not really understanding.  Are you saing that you want all
> children nodes automatically expanded?-
> 
> On Mon, Mar 23, 2009 at 8:55 AM, yossi.baram  wrote:
> 
> > Guys,
> > There mast be somebody knows how to preserve hierarchy and to allow the
> > TreeGrid to look the same with parents and childrens,
> > using the ItemRenderer
> >
> > Sorry for the resending the question. I realy need
> > a clue here,
> >
> > Thanks
> > --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> > >
> > > Hi,
> > > My problem is simple,
> > > In my TreeTable The ItemRenderer show me only one level.
> > > When I click the parent it will show only the level beneath it,
> > > although it has childrens, WHY???
> > > When I use depth, I can see the tree but it doesnt activate the
> > ItemRenderer.
> > > How can I set the Itemrenderer to manipulate and show ALL branches?
> > >
> > > Please advice guys, I have been looking every where but couldnt find a
> > solution.
> > >
> > > Thanks in advance
> > >
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> > > >
> > > > Hi,
> > > > There is a greate example in the following link that allows us to
> > create simple hirarchical grid with AdvancedDataGrid, implementing
> > IHierarchicalData.
> > > >
> > > >
> > http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-population-of-data-in.html
> > > >
> > > > I couldnt find a way to include ItemRenderer using this kind of
> > dataProvider,
> > > > I tried everything but all I get when using a simple ItemRenderer is a
> > flat tree with no hirarchy :(
> > > >
> > > > Please please advice
> > > >
> > > > Thanks
> > > >
> > > > Jo
> > > >
> > >
> >
> >
> >
> >
> > 
> >
> > --
> > 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] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread Wesley Acheson
Sorry I'm not really understanding.  Are you saing that you want all
children nodes automatically expanded?-

On Mon, Mar 23, 2009 at 8:55 AM, yossi.baram  wrote:

> Guys,
> There mast be somebody knows how to preserve hierarchy and to allow the
> TreeGrid to look the same with parents and childrens,
> using the ItemRenderer
>
> Sorry for the resending the question. I realy need
> a clue here,
>
> Thanks
> --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> >
> > Hi,
> > My problem is simple,
> > In my TreeTable The ItemRenderer show me only one level.
> > When I click the parent it will show only the level beneath it,
> > although it has childrens, WHY???
> > When I use depth, I can see the tree but it doesnt activate the
> ItemRenderer.
> > How can I set the Itemrenderer to manipulate and show ALL branches?
> >
> > Please advice guys, I have been looking every where but couldnt find a
> solution.
> >
> > Thanks in advance
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> > >
> > > Hi,
> > > There is a greate example in the following link that allows us to
> create simple hirarchical grid with AdvancedDataGrid, implementing
> IHierarchicalData.
> > >
> > >
> http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-population-of-data-in.html
> > >
> > > I couldnt find a way to include ItemRenderer using this kind of
> dataProvider,
> > > I tried everything but all I get when using a simple ItemRenderer is a
> flat tree with no hirarchy :(
> > >
> > > Please please advice
> > >
> > > Thanks
> > >
> > > Jo
> > >
> >
>
>
>
>
> 
>
> --
> 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] How to separate Flex code and server code in different servevr?

2009-03-23 Thread Gregor Kiddie
Does the server have a crossdomain.xml file on it?

 

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
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 markflex2007
Sent: 23 March 2009 04:21
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to separate Flex code and server code in
different servevr?

 

Hi,

I test Flex code and php server code in same server and it works fine.I
use the following line code.

private var amf:RemoteObject = new RemoteObject();

amf.source = "something.something";
amf.destination ="something";
amf.endpoint = "http://localhost/amfphp/amfphp/gateway.php
 ";

I use same Flex code and different endpoint after I move the same php
code to other server.

private var amf:RemoteObject = new RemoteObject();

amf.source = "something.something";
amf.destination ="something";
amf.endpoint = "http://192.168.0.188/amfphp/amfphp/gateway.php
 ";

I get the error:

RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend"
faultDetail="Channel.Security.Error error Error #2048: Security sandbox
violation: http://localhost/AMFTest2/bin-debug/AMFconnect.swf
  cannot load data
from http://127.0.0.1/amfphp/amfphp/gateway.php.
  url:
'http://192.168.0.188/amfphp/amfphp/gateway.php
 '"]

which config file I have to change to make it work.
Thanks for your help.

Mark







RE: [flexcoders] Architecting for extensibility

2009-03-23 Thread Gregor Kiddie
If your renderers are all in a library, they all get included AFAIK. So
separate them out and use compc rather than mxmlc to generate the swf
for them.

 

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
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 jimmy5804
Sent: 22 March 2009 07:24
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Architecting for extensibility

 

I'm looking for some architecture advise.

My AIR application has the ability to render certain kinds of data, each
of which has a unique string descriptor (e.g. "red"). I would like to
make it easy for others to add renderers for other kinds of data. To
accomplish this, I created a renderer directory (Object) where the data
descriptor is a key to the class path for the renderer and I planned to
make extensive use of dynamic instantiation - when I ran into "red"
data, I could just look up the "red" renderer, instantiate it, etc. My
thinking was that the new developer would just need to create a renderer
that implemented the requiste interface, create an entry in the
directory, and would need very minimal understanding of the rest of the
architecture to get their data to render. But I ran into the problem
described here:
http://thillerson.wordpress.com/2007/03/01/runtime-class-instantiation-i
n-actionscript-30/
  
If you don't want to read it all, basically you need to make sure the
referenced class has been loaded into your swf before you try to
reference it (at least, that's my understanding). So, in my directory, I
created something that creates and then destroys (for memory
conservation) an instance of each renderer, and now my directory looks
something like this: 

public class RendererDirectory {

private var dir:Object { red:"com.blah.renderers.MyRenderer",
blue:"com.joedata.renderers.BlueRenderer", ...};

// to make sure everything is in .swf
private static function kluge():void {

var a:Array = [new MyRenderer(), new BlueRenderer(), ...];
a = null;

}

public function getRenderer(datakey:String):IMyInterface {

// all error checking omitted for brevity
var classPath:String = dir[datakey];
var classRef:Class = getDefinitionByName(classPath) as Class;
return new classRef();

}

} 

I'm looking for advise on whether there is a better way to accomplish my
big picture goal (ease of extensibility) or improve on my current scheme
in some way.

TIA!





[flexcoders] Re: Using ItemRenderer with IHierarchicalData DataProvider

2009-03-23 Thread yossi.baram
Guys,
There mast be somebody knows how to preserve hierarchy and to allow the 
TreeGrid to look the same with parents and childrens, 
using the ItemRenderer

Sorry for the resending the question. I realy need
a clue here,

Thanks
--- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
>
> Hi,
> My problem is simple,
> In my TreeTable The ItemRenderer show me only one level.
> When I click the parent it will show only the level beneath it,
> although it has childrens, WHY??? 
> When I use depth, I can see the tree but it doesnt activate the ItemRenderer.
> How can I set the Itemrenderer to manipulate and show ALL branches?
> 
> Please advice guys, I have been looking every where but couldnt find a 
> solution.
> 
> Thanks in advance
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "yossi.baram"  wrote:
> >
> > Hi,
> > There is a greate example in the following link that allows us to create 
> > simple hirarchical grid with AdvancedDataGrid, implementing 
> > IHierarchicalData.
> > 
> > http://inovativeflexdevolopment.blogspot.com/2008/07/flex3-dynamic-population-of-data-in.html
> > 
> > I couldnt find a way to include ItemRenderer using this kind of 
> > dataProvider,
> > I tried everything but all I get when using a simple ItemRenderer is a flat 
> > tree with no hirarchy :(
> > 
> > Please please advice
> > 
> > Thanks
> > 
> > Jo
> >
>




[flexcoders] ItemRenderer unscaledHeight = NaN?

2009-03-23 Thread Ken Dunnington
I've got a fairly simple custom itemRenderer inside a TileList that's giving
me problems. The renderer is simply an HBox with an Image and a few Label
controls. The problem is the renderers all show up squished at the top of
the list, piled on top of each other. I've overridden updateDisplayList()
and can see that unscaledWidth is being set properly, but unscaledHeight is
always NaN. I've set the width and height explicity in the renderer, as well
as set columnWidth and rowHeight in the TileList. I've also set maxColumns,
since I need it to be limited to 2 columns (side question: does columnCount
do anything in a TileList?) I've tried converting the renderer to a Canvas,
overriding measure(), tried every combination of
width/height/columnWidth/rowHeight settings, but nothing seems to work. The
highlights show up in the TileList where they should be, but none of the
renderers display properly.
I think the problem has to be in the TileList, as I've tried using the built
in renderer, and that also screws up. Has anybody ever seen anything like
this before? I've used TileLists in the past, and never had this problem.
I'm using AIR 1.5, and the TileList is rendering itself properly (if I set a
background color, I can see it occupies the proper space.)

- Ken


[flexcoders] Re: strange problem with remote object

2009-03-23 Thread johndoematrix
guys i just read up on this and am doing it the same way as the example. here 
is the example i refered to just to be sure i got this right.

Passing parameters using a form

To pass parameters to components using an HTML or ColdFusion form, the names of 
the client input controls must match the names of the parameter definition in 
the component file.
To pass parameters using a form:

   1. Open the corpFind.cfm file and modify the code so that it appears as 
follows:

  Find People and Products
  
Enter employee's last Name:



  
  
Enter maximum product price:



  

  In the example, the form tag action attribute points to the corpQuery 
component. The input tags invoke the component method.
   2. Open corpQuery.cfc and add access="remote" to each cffunction tag, as the 
following example shows:

  

   
   
 SELECT LASTNAME, FIRSTNAME, EMAIL
 FROM tblEmployees
WHERE LASTNAME LIKE '#arguments.lastName#'
   
   Results filtered by #arguments.lastName#:
   


 
  
 SELECT ItemName, ItemDescription, ItemCost
 FROM tblItems
WHERE ItemCost <= #arguments.cost#
   
   Results filtered by #arguments.cost#:
   

  

  In this example, the cffunction access attribute lets remote clients, 
such as web browsers and Flash applications, to access component methods.

this is not different from what am doing the only difference may is that am 
using a flex form but i think that doesn't matter.