[flexcoders] Drag and Drop question

2008-05-01 Thread Rafael Faria
If i'm dragging an element from one tree to another. How do i get the
updated xml of the tree i'm dragging off?

For instance

TREE 1
 - Element 1
 - Element 2


TREE 2



if i get the xml from tree 1 it would be something like
root
   element label=Element 1 /
   element label=Element 2 /
/root

but if i drag the Element 1 into the TREE 2 i want to get the xml
without the Element 1, without that node.

i'm trying to get it creating a handler for dragDrop attribute on
the Tree 2, but everytime i get it the items are not updated.

Anyone know how to get the updated xml that tree 1 will have after i
drop the element?

Please... this is killing me =/

Thanks




Re: [flexcoders] Drag and Drop question

2008-05-01 Thread Josh McDonald
I'm fairly certain that there's no voodoo to automatically delete nodes from
your XML, you need to do that yourself in your drop handler.

-J

On Thu, May 1, 2008 at 4:36 PM, Rafael Faria [EMAIL PROTECTED]
wrote:

   If i'm dragging an element from one tree to another. How do i get the
 updated xml of the tree i'm dragging off?

 For instance

 TREE 1
 - Element 1
 - Element 2

 TREE 2

 if i get the xml from tree 1 it would be something like
 root
 element label=Element 1 /
 element label=Element 2 /
 /root

 but if i drag the Element 1 into the TREE 2 i want to get the xml
 without the Element 1, without that node.

 i'm trying to get it creating a handler for dragDrop attribute on
 the Tree 2, but everytime i get it the items are not updated.

 Anyone know how to get the updated xml that tree 1 will have after i
 drop the element?

 Please... this is killing me =/

 Thanks

  




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] Processing a filtered XMLListCollection as a complete list

2008-05-01 Thread Thind, Aman
good idea... i created a copy as follows:
 
tmplist = new XMLListCollection(resultlist.source);

tmplist.filterFunction = resultlist.filterFunction;
 
and after processing the tmplist, reset resultlist = tmplist
 
Thanks Alex!



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Thursday, May 01, 2008 2:32 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Processing a filtered XMLListCollection as a
complete list



Try using a second XMLListCollection with the same source.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Thind, Aman
Sent: Wednesday, April 30, 2008 10:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Processing a filtered XMLListCollection as a
complete list


Hello,

I have an xmllistcollection bound to a datagrid that can be filtered by
the user.

When certain external events occur, I have to process this collection by
adding / deleting values from it.

However, when the user has the collection filtered, I can access only
the filtered list and not the whole.

For the whole list I started referring to the source property which is
an XMLList but I cannot figure out how to add elements to that as it
does not have the equivalent of addItemAt() like the original
collection.

Can anyone point me out to what is the best way of being able to process
a complete collection (add/delete/edit at a specified index) even when
some of its elements have been filtered out.

Many Thanks,
Aman

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -

This message is intended only for the personal and confidential use of
the designated recipient(s) named above. If you are not the intended
recipient of this message you are hereby notified that any review,
dissemination, distribution or copying of this message is strictly
prohibited. This communication is for information purposes only and
should not be regarded as an offer to sell or as a solicitation of an
offer to buy any financial product, an official confirmation of any
transaction, or as an official statement of Lehman Brothers. Email
transmission cannot be guaranteed to be secure or error-free. Therefore,
we do not represent that this information is complete or accurate and it
should not be relied upon as such. All information is subject to change
without notice.

 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.



[flexcoders] Re: Drag and Drop question

2008-05-01 Thread Rafael Faria
I wouldn't say voodoo but if you drag an item from tree 1 to tree 2
the dataprovider should not contain the item you've dragged to the
other tree... am i wrong?

rafael


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

 I'm fairly certain that there's no voodoo to automatically delete
nodes from
 your XML, you need to do that yourself in your drop handler.
 
 -J
 
 On Thu, May 1, 2008 at 4:36 PM, Rafael Faria [EMAIL PROTECTED]
 wrote:
 
If i'm dragging an element from one tree to another. How do i
get the
  updated xml of the tree i'm dragging off?
 
  For instance
 
  TREE 1
  - Element 1
  - Element 2
 
  TREE 2
 
  if i get the xml from tree 1 it would be something like
  root
  element label=Element 1 /
  element label=Element 2 /
  /root
 
  but if i drag the Element 1 into the TREE 2 i want to get the xml
  without the Element 1, without that node.
 
  i'm trying to get it creating a handler for dragDrop attribute on
  the Tree 2, but everytime i get it the items are not updated.
 
  Anyone know how to get the updated xml that tree 1 will have after i
  drop the element?
 
  Please... this is killing me =/
 
  Thanks
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Re: Showroot - Tree control

2008-05-01 Thread Rafael Faria
This was just an example i got on adobe website so i can show what i
need. On my project i use XML. I just think if i find a solution for
whatever i use as dataprovider i could apply on my project.

Anyone else can help me with it!?

Thanks
Rafael


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

 First, do away with the collections and just try it with XML.  XML works
 extremely well with Tree, since it is inherently hierarchical.  Nested
 collections add a level of complexity you probably do not need.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Rafael Faria
 Sent: Tuesday, April 22, 2008 7:13 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Showroot - Tree control
 
  
 
 any help?! im really tight on it. =/
 
 Thanks
 Raf
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Rafael Faria
 rafaelfaria.grupos@ wrote:
 
  ?xml version=1.0?
  !-- dpcontrols/TreeSimple.mxml --
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
  mx:Tree id=tree1 labelField=@label showRoot=false width=160
  mx:XMLListCollection id=MailBox
  mx:XMLList
  folder label=Mail
  
  /folder
  /mx:XMLList
  /mx:XMLListCollection
  /mx:Tree
  /mx:Application
  
  Whenever i have just 1 node (that is the root one) on the XML it
  doesnt matter if i set the attribute showRoot=false because it keep
  showing.
  
  I need to keep the root to not show on my tree.
  
  
  if i do
  
  
  ?xml version=1.0?
  !-- dpcontrols/TreeSimple.mxml --
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
  mx:Tree id=tree1 labelField=@label showRoot=false width=160
  mx:XMLListCollection id=MailBox
  mx:XMLList
  folder label=Mail
  folder label=INBOX/
  folder label=Personal Folder
  Pfolder label=Business /
  Pfolder label=Demo / 
  Pfolder label=Personal isBranch=true / 
  Pfolder label=Saved Mail / 
  /folder
  folder label=Sent /
  folder label=Trash /
  /folder
  /mx:XMLList
  /mx:XMLListCollection
  /mx:Tree
  /mx:Application
  
  
  The Mail one its not there...
  
  i cant filter, or delete, or whatever... i just need it to work
  exactly how it work on the second example, but whenever i dont have
  the nodes after the root i just want to show a blank tree.
  
  The reason i need to keep root is because i have a drag and drop the
  needs to keep the root on it.
  
  anyone can explain why in the first example even though i set
  showroot=false it still show it?!
  
  thanks
 





[flexcoders] Re: Drag and Drop question

2008-05-01 Thread Rafael Faria
If im moving the object i would assume it will not be in the tree 1
anymore...

anyone would help me how do i drag from tree 1, drop on tree 2 and
after i drop i get the elements on tree 1 without the one i just
dropped on tree 2?

should this be that painfull? do i have to delete manually?!

Thanks

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

 I wouldn't say voodoo but if you drag an item from tree 1 to tree 2
 the dataprovider should not contain the item you've dragged to the
 other tree... am i wrong?
 
 rafael
 
 
 --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
 
  I'm fairly certain that there's no voodoo to automatically delete
 nodes from
  your XML, you need to do that yourself in your drop handler.
  
  -J
  
  On Thu, May 1, 2008 at 4:36 PM, Rafael Faria rafaelfaria.grupos@
  wrote:
  
 If i'm dragging an element from one tree to another. How do i
 get the
   updated xml of the tree i'm dragging off?
  
   For instance
  
   TREE 1
   - Element 1
   - Element 2
  
   TREE 2
  
   if i get the xml from tree 1 it would be something like
   root
   element label=Element 1 /
   element label=Element 2 /
   /root
  
   but if i drag the Element 1 into the TREE 2 i want to get the xml
   without the Element 1, without that node.
  
   i'm trying to get it creating a handler for dragDrop attribute on
   the Tree 2, but everytime i get it the items are not updated.
  
   Anyone know how to get the updated xml that tree 1 will have after i
   drop the element?
  
   Please... this is killing me =/
  
   Thanks
  

  
  
  
  
  -- 
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 





Re: [flexcoders] Re: Drag and Drop question

2008-05-01 Thread Josh McDonald
It makes sense to me that you would. Drag and drop is a visual operation,
not a data operation, and in no way does it always mean that you're removing
something from the first list. For an example think of the components
palette in Builder. There might be some way to enable the sort of automatic
behavior you're talking about, but I doubt it. Drag and drop isn't just for
components bound to an array / IList - you can use it with any component you
like.

-J

On Thu, May 1, 2008 at 5:24 PM, Rafael Faria [EMAIL PROTECTED]
wrote:

   If im moving the object i would assume it will not be in the tree 1
 anymore...

 anyone would help me how do i drag from tree 1, drop on tree 2 and
 after i drop i get the elements on tree 1 without the one i just
 dropped on tree 2?

 should this be that painfull? do i have to delete manually?!

 Thanks

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Rafael
 Faria

 [EMAIL PROTECTED] wrote:
 
  I wouldn't say voodoo but if you drag an item from tree 1 to tree 2
  the dataprovider should not contain the item you've dragged to the
  other tree... am i wrong?
 
  rafael
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald dznuts@ wrote:
  
   I'm fairly certain that there's no voodoo to automatically delete
  nodes from
   your XML, you need to do that yourself in your drop handler.
  
   -J
  
   On Thu, May 1, 2008 at 4:36 PM, Rafael Faria rafaelfaria.grupos@
   wrote:
  
If i'm dragging an element from one tree to another. How do i
  get the
updated xml of the tree i'm dragging off?
   
For instance
   
TREE 1
- Element 1
- Element 2
   
TREE 2
   
if i get the xml from tree 1 it would be something like
root
element label=Element 1 /
element label=Element 2 /
/root
   
but if i drag the Element 1 into the TREE 2 i want to get the xml
without the Element 1, without that node.
   
i'm trying to get it creating a handler for dragDrop attribute on
the Tree 2, but everytime i get it the items are not updated.
   
Anyone know how to get the updated xml that tree 1 will have after i
drop the element?
   
Please... this is killing me =/
   
Thanks
   
   
   
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 

  




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] ROLL_OVER on Componeont does not bubble? HOW??

2008-05-01 Thread James Gardiner

Hi,
I was wondering if anyone could point me at how to archive the folloing.

I make some boxes in Flex as a time line.  But use a label component on top...
The Label componeont blocks the roll_over event on the boxes...

I want the label to ignore the ROLL_OVER event, and let the BOX under it handle 
it.

How do I do this?

Thanks,
James


Re: [flexcoders] ROLL_OVER on Componeont does not bubble? HOW??

2008-05-01 Thread Manish Jethani
On 4/7/08, James Gardiner [EMAIL PROTECTED] wrote:

  I was wondering if anyone could point me at how to archive the folloing.

  I make some boxes in Flex as a time line.  But use a label component on 
 top...
  The Label componeont blocks the roll_over event on the boxes...

  I want the label to ignore the ROLL_OVER event, and let the BOX under it 
 handle it.

You can either set the mouseEnabled property of the label object to
false, or you can handle the roll over/out on the label by checking
the event object's 'relatedObject' property.

Manish


[flexcoders] -compiler.mxml.compatibility-version

2008-05-01 Thread VELO
Hi,

When I use compc or mxmlc with -compiler.mxml.compatibility-version.

Can use swc libraries (e.g. framework.swc) from flex SDK 2.0.1?



VELO


[flexcoders] Reading Flex local shared object from Flash - problem

2008-05-01 Thread Borek
We can't read Flex-created local shared objects from Flash
applications. When I compare .sol files, it looks like Flash and Flex
use a different file format - is that correct? If so, is there any
work around?

Thanks,
Borek



[flexcoders] Re: Need help finding and fixing SQL Error in AIR App

2008-05-01 Thread bredwards358
That's fine, I again figured something out a short while ago while
experimenting with importing the text documents. Turns out you can't
have the special characters such as the - or / in the column
header, the actual data in the rows beneath them can have those
characters. So instead of doing a massive find/replace, I just needed
to change two characters and I was good to go.


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

 There are a few predefined characters that can confuse XML. A good
 article to peruse is at:
 
 http://articles.techrepublic.com.com/5100-22-5032714.html
 
 '-' and '/' aren't listed.
 





Re: [flexcoders] Reading Flex local shared object from Flash - problem

2008-05-01 Thread rrao
Hi Borek,

Are you talking of Shared Objects written by AS2 applications not being able
to read in Flex?
Is your Flash app built in pre Flash CS3? (i.e. In AS2)

Raghu



On 5/1/08 4:35 AM, Borek [EMAIL PROTECTED] wrote:

  
  
 
 We can't read Flex-created local shared objects from Flash
 applications. When I compare .sol files, it looks like Flash and Flex
 use a different file format - is that correct? If so, is there any
 work around?
 
 Thanks,
 Borek
 
  
 



[flexcoders] gif images as renderers

2008-05-01 Thread moonrchand
Hi All,
   in our application we are using 'gif' animated images as item 
renderer. we are able to renderer the image but it is not showing 
animated behaviour.
  basically that image will be rotating/blinking, but when we renderer 
it shows as normal image.
  please help me how can i get animated behaviour of gif image in item 
renderer.

Thanks,
Chandra



[flexcoders] HTTPService and Browser Differences

2008-05-01 Thread Tom Armstrong
Hi All,

As I continue my Flex education I've come across an issue in my first 
production application. I'm using ROR along with Flex and passing XML back and 
forth, etc. I've learned a bunch via Flex Solutions, Flex on Rails, and 
Training from the Source, etc. The issue I'm having seems to be caused by 
differences in IE and FF and how they handle responses from HTTPService calls. 
By using CharlesProxy I can see that everything works great in FF but they 
don't when using IE. I was hoping to remove all the cross-browser issues by 
moving to flex. :-)

Anyway, I'm doing something like this:

1) Create a new record via HTTPService-POST\record.xml
2) The new record is created and an event is fired so that the existing record 
list can be refreshed.
3) HTTPService-GET\record.xml
4) Grid in the List component is refreshed with the additional record.

Everything works great in FF and I can see both the POST and GET along with the 
returned XML item, and then list.

On IE (v6), however, only the POST goes through and it seems like it is 
caching the result from the POST and using as the result for the GET, thereby 
making my list just a list of one, the most recently created record. 
Though, this doesn're really work either as it doesn't have the surrounding 
records type=array element.

Anyway, I'm sure there is something I am missing with this new Flex development 
so I'm hoping you all can direct me to some specific reading to help me 
understand the major behavior differences between the browsers when using Flex, 
etc.

Thanks much,

Tom

[flexcoders] error with old flex data service code

2008-05-01 Thread strykker75
I have some code that was created a couple years ago, when flex data
services was young.  I am trying to use it now, but can't seem to get
the java files working.  I am having trouble in particular with the
ChatAdapter file:

package chat;
 
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
 
import flex.messaging.FlexSession;
import flex.messaging.FlexContext;
import flex.messaging.FlexSessionListener;
import flex.messaging.messages.AsyncMessage;
import flex.messaging.messages.Message;
import flex.messaging.services.MessageService;
import flex.messaging.services.ServiceAdapter;
import flex.messaging.util.UUIDUtils;
 
public class ChatAdapter extends ServiceAdapter implements
FlexSessionListener {

private Map sessions;
 
private String clientId = UUIDUtils.createUUID(false);

public ChatAdapter() {
sessions = Collections.synchronizedMap(new HashMap());
FlexSession.addSessionCreatedListener(this);
}

public Object invoke(Message message) {
 
// Get Session Id
FlexSession flexSession = FlexContext.getFlexSession();
String sessionId = flexSession.getId();

// Check if Session Id is already registered in HashMap 
if (!sessions.containsKey(sessionId)) {
// Get User Id from message body 
Map body = (Map) message.getBody();
String userId = (String) body.get(userId);
// Register session / userId mapping
System.out.println(*** Registering  + userId
+   + sessionId);
sessions.put(sessionId, userId);
}
 
MessageService msgService = (MessageService) service;
msgService.pushMessageToClients(message, true);
return null;
 
}
 
public void sessionCreated(FlexSession session) {
session.addSessionDestroyedListener(this);
}
 
public void sessionDestroyed(FlexSession session) {
// Get User Id associated with Session Id
String userId = (String) sessions.get(session.getId());
System.out.println(*** Removing  + userId +   +
session.getId());
// Notify interested parties
pushStatus(userId, disconnected);
// Remove Session Id / User Id mapping
sessions.remove(session.getId());
}

private void pushStatus(String userId, String status) {
MessageService msgService = (MessageService) service;
AsyncMessage msg = new AsyncMessage();
msg.setDestination(chat);
msg.setHeader(DSSubtopic, status. + userId);
Map body = new HashMap();
body.put(userId, userId);
body.put(status, status);
msg.setBody(body);
msg.setClientId(clientId);
msg.setMessageId(UUIDUtils.createUUID(false));
msg.setTimestamp(System.currentTimeMillis());
msgService.pushMessageToClients(msg, false);
}
 
}


The lines that read: 
MessageService msgService = (MessageService) service;
throw compile time errors.  I believe that the flex-messaging.jar that
comes with LiveCycle Data Services ES may be different than the
version that shipped with Flex data Services, but that is only
speculation, since I can't seem to find a copy of the older file to
look at.  I'm not sure how to correct this file to work with the
current release.  Any help would be much appreciated.





[flexcoders] Re: gif images as renderers

2008-05-01 Thread valdhor
This has been asked before. Flash Player doesn't support animated GIF
natively.

There are a couple of ways to get this functionality (AFAIK):

http://www.bytearray.org/?p=95 (I cannot reach this site at the moment).

http://dougmccune.com/blog/2007/05/24/animated-gif-loader-flex-component-updated/

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

 Hi All,
in our application we are using 'gif' animated images as item 
 renderer. we are able to renderer the image but it is not showing 
 animated behaviour.
   basically that image will be rotating/blinking, but when we renderer 
 it shows as normal image.
   please help me how can i get animated behaviour of gif image in item 
 renderer.
 
 Thanks,
 Chandra





[flexcoders] Re: Reading Flex local shared object from Flash - problem

2008-05-01 Thread Borek
Hi Raghu,

It's the other way around - we CAN store shared object in a Flash
(AS2) app and then read it in a Flex app, we CAN'T store the shared
object in a Flex app and then read it in a Flash app. I think the
Flash application is compiled using Flash MX.

Thanks,
Borek

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

 Hi Borek,
 
 Are you talking of Shared Objects written by AS2 applications not
being able
 to read in Flex?
 Is your Flash app built in pre Flash CS3? (i.e. In AS2)
 
 Raghu
 
 
 
 On 5/1/08 4:35 AM, Borek [EMAIL PROTECTED] wrote:
 
   
   
  
  We can't read Flex-created local shared objects from Flash
  applications. When I compare .sol files, it looks like Flash and Flex
  use a different file format - is that correct? If so, is there any
  work around?
  
  Thanks,
  Borek
  
   
 





RE: [flexcoders] Re: Reading Flex local shared object from Flash - problem

2008-05-01 Thread Jim Hayes
I believe the as2 app will be using the AMF1 style, and flex the AMF3
style of encoding.
I'm not sure if you can set the encoding used for shared objects in
flex, but it's worth having a look.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Borek
Sent: 01 May 2008 14:09
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Reading Flex local shared object from Flash -
problem
 
Hi Raghu,

It's the other way around - we CAN store shared object in a Flash
(AS2) app and then read it in a Flex app, we CAN'T store the shared
object in a Flex app and then read it in a Flash app. I think the
Flash application is compiled using Flash MX.

Thanks,
Borek

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, rrao [EMAIL PROTECTED] wrote:

 Hi Borek,
 
 Are you talking of Shared Objects written by AS2 applications not
being able
 to read in Flex?
 Is your Flash app built in pre Flash CS3? (i.e. In AS2)
 
 Raghu
 
 
 
 On 5/1/08 4:35 AM, Borek [EMAIL PROTECTED] wrote:
 
  
  
  
  We can't read Flex-created local shared objects from Flash
  applications. When I compare .sol files, it looks like Flash and
Flex
  use a different file format - is that correct? If so, is there any
  work around?
  
  Thanks,
  Borek
  
  
 

 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

RE: [flexcoders] Re: Reading Flex local shared object from Flash - problem

2008-05-01 Thread Jim Hayes
I just had to know.
 
http://livedocs.adobe.com/flex/201/langref/flash/net/SharedObject.html#o
bjectEncoding
 
Looks like you can set the encoding used, so I'd try that if I were you.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Hayes
Sent: 01 May 2008 14:58
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Reading Flex local shared object from
Flash - problem
 
I believe the as2 app will be using the AMF1 style, and flex the AMF3
style of encoding.
I'm not sure if you can set the encoding used for shared objects in
flex, but it's worth having a look.
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Borek
Sent: 01 May 2008 14:09
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Reading Flex local shared object from Flash -
problem
 
Hi Raghu,

It's the other way around - we CAN store shared object in a Flash
(AS2) app and then read it in a Flex app, we CAN'T store the shared
object in a Flex app and then read it in a Flash app. I think the
Flash application is compiled using Flash MX.

Thanks,
Borek

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, rrao [EMAIL PROTECTED] wrote:

 Hi Borek,
 
 Are you talking of Shared Objects written by AS2 applications not
being able
 to read in Flex?
 Is your Flash app built in pre Flash CS3? (i.e. In AS2)
 
 Raghu
 
 
 
 On 5/1/08 4:35 AM, Borek [EMAIL PROTECTED] wrote:
 
  
  
  
  We can't read Flex-created local shared objects from Flash
  applications. When I compare .sol files, it looks like Flash and
Flex
  use a different file format - is that correct? If so, is there any
  work around?
  
  Thanks,
  Borek
  
  
 


__
This communication is from Primal Pictures Ltd., a company registered in
England and Wales with registration No. 02622298 and registered office:
4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received it
in error, please contact the sender immediately by return e-mail or by
telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email
Security System.
__


 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

[flexcoders] Re: Raising Events with Properties

2008-05-01 Thread caffeinewabbit
Thanks for pointing that out Manish, it wasn't something I was aware of!

--G

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

 On 5/1/08, caffeinewabbit [EMAIL PROTECTED] wrote:
  You'll need to extend event and create a custom child class.
 
   Custom event code:
 
   package my.package.path
   {
 import flash.events.Event;
 
 public class MyEvent extends Event
 {
public static const PROJECT_SELECTED:String = projectSelected;
 
public var projectID:Number;
public var projectType:Number;
 [snip]
 
 Be sure to override clone in your custom event class!
 

http://manishjethani.com/blog/2008/04/04/why-its-important-to-override-clone-in-your-custom-event-class/
 
 Manish





[flexcoders] Reading a message with SeviceAdapters

2008-05-01 Thread netdeep

I'm using messaging with blazeds and I can send a message with a producer from 
flex, but I 
don't know how to read its contents in my java ServiceAdapter. I have a class:

public class ChannelListener extends ServiceAdapter {

public Object invoke(Message message) { }

}

}

But what do I do in the invoke method to parse out the message?  All I can 
figure out is to 
call message.getBody() which returns an generic Object.  But what should be 
done with this 
Object?  Or is there some other method which will help me extract the info from 
the 
message?





[flexcoders] Extending Alert

2008-05-01 Thread climbfar
How do I extend the Alert class such that the new class cannot be 
created using MXML tags? Taking it a step further is it possible to 
create an ActionScript class extended from Panel that cannot be 
constructed using MXML tags?

G'day Mike



[flexcoders] Re: Reading Flex local shared object from Flash - problem

2008-05-01 Thread Borek
Thank you very much, we will try this. Didn't know of this encoding thing!

Borek

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

 I just had to know.
  
 http://livedocs.adobe.com/flex/201/langref/flash/net/SharedObject.html#o
 bjectEncoding
  
 Looks like you can set the encoding used, so I'd try that if I were you.
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Jim Hayes
 Sent: 01 May 2008 14:58
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: Reading Flex local shared object from
 Flash - problem
  
 I believe the as2 app will be using the AMF1 style, and flex the AMF3
 style of encoding.
 I'm not sure if you can set the encoding used for shared objects in
 flex, but it's worth having a look.
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Borek
 Sent: 01 May 2008 14:09
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Reading Flex local shared object from Flash -
 problem
  
 Hi Raghu,
 
 It's the other way around - we CAN store shared object in a Flash
 (AS2) app and then read it in a Flex app, we CAN'T store the shared
 object in a Flex app and then read it in a Flash app. I think the
 Flash application is compiled using Flash MX.
 
 Thanks,
 Borek
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , rrao raghuonflex@ wrote:
 
  Hi Borek,
  
  Are you talking of Shared Objects written by AS2 applications not
 being able
  to read in Flex?
  Is your Flash app built in pre Flash CS3? (i.e. In AS2)
  
  Raghu
  
  
  
  On 5/1/08 4:35 AM, Borek borekbe@ wrote:
  
   
   
   
   We can't read Flex-created local shared objects from Flash
   applications. When I compare .sol files, it looks like Flash and
 Flex
   use a different file format - is that correct? If so, is there any
   work around?
   
   Thanks,
   Borek
   
   
  
 
 
 __
 This communication is from Primal Pictures Ltd., a company registered in
 England and Wales with registration No. 02622298 and registered office:
 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
 5PA, UK. VAT registration No. 648874577.
 
 This e-mail is confidential and may be privileged. It may be read,
 copied and used only by the intended recipient. If you have received it
 in error, please contact the sender immediately by return e-mail or by
 telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not
 disclose its contents to any person.
 This email has been scanned for Primal Pictures by the MessageLabs Email
 Security System.
 __
 
 
  
 
 __
 This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
 
 This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
 This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
 __





[flexcoders] Flex Profiler Not Connecting

2008-05-01 Thread myspivey2
Having some weirdness with the Flex Profiler. Using Eclipse, current
stable builds of everything. Profiler was working a couple months ago,
haden't used it because of being changed to some other projects,
trying to get back in, it launches IE with the Flex app but never asks
me to connect in Eclipse. Any one had an issue like this? Thanks!

James



RE: [flexcoders] Flex Profiler Not Connecting

2008-05-01 Thread Gaurav. Jain
Can you make sure you are using the debugger version of the player in
IE? Also do you see anything in the console of the Flex Profiling
perspective?

Thanks,
Gaurav

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of myspivey2
Sent: Thursday, May 01, 2008 10:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Profiler Not Connecting

Having some weirdness with the Flex Profiler. Using Eclipse, current
a couple months ago, stable builds of everything. Profiler was working
haden't used it because of being changed to some other projects,
trying to get back in, it launches IE with the Flex app but never asks
me to connect in Eclipse. Any one had an issue like this? Thanks!

James




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





Re: [flexcoders] Extending Alert

2008-05-01 Thread Maciek Sakrejda
Why do you need to prevent usage through MXML? MXML is compiled down to
ActionScript, so it's essentially just syntactic sugar. That is, by
preventing using your components through MXML, you are just removing a
convenient interface, and not restricting functionality.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: climbfar [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Extending Alert
Date: Thu, 01 May 2008 14:18:55 -

How do I extend the Alert class such that the new class cannot be 
created using MXML tags? Taking it a step further is it possible to 
create an ActionScript class extended from Panel that cannot be 
constructed using MXML tags?

G'day Mike




 




RE: [flexcoders] Flex Profiler Not Connecting

2008-05-01 Thread Mike Krotscheck
I had a similar problem: Turns out our newly installed firewall decided
to be helpful and get in the way. Have you guys updated your security
settings recently?

 

Michael Krotscheck

Senior Developer

 
RESOURCE INTERACTIVE

http://www.resource.com/ www.resource.com http://www.resource.com 

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 


___

We support privacy and confidentiality. Please delete this email if it
was received in error.


It's a web-made world.  Is your brand open to the possibilities?
iCitizen 2008 // www.resource.com/icitizen



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of myspivey2
Sent: Thursday, May 01, 2008 10:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Profiler Not Connecting

 

Having some weirdness with the Flex Profiler. Using Eclipse, current
stable builds of everything. Profiler was working a couple months ago,
haden't used it because of being changed to some other projects,
trying to get back in, it launches IE with the Flex app but never asks
me to connect in Eclipse. Any one had an issue like this? Thanks!

James

 



[flexcoders] Bubble chart itemrenderer not updating

2008-05-01 Thread hworke


   Hi I need to use a bubblechart with the button
   as its itemrenderer. So I should get buttons insted
   of circles. Now if I update the dataprovider during
   runtime it shows the same old data with some
   rearrangements. My observarion is that once those
   button child are created they never get removed and
   updated data keeps showing them again and again.

   How can I remove those children and replot the child 
   with new set of dataprovider?

   Regards...



[flexcoders] Re: Extending Alert

2008-05-01 Thread climbfar
I believe this is a restriction brought on by the Adobe developers. 
You cannot do this in MXML:

mx:Panel id=panel
mx:Alert
/mx:Alert
/mx:Panel

If you try to compile, you will get this message:

Could not resolve mx:Alert to a component implementation.

To instantiate an Alert in MXML the proper coding would be:
mx:Panel id=panel
mx:Button click=mx.controls.Alert.show('hello')/
/mx:Panel

Basically I would like to create a similar component that would be 
used for configuring some task modally and presumably extending it 
off the Alert or TitleWindow component.

G'day Mike

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

 Why do you need to prevent usage through MXML? MXML is compiled 
down to
 ActionScript, so it's essentially just syntactic sugar. That is, by
 preventing using your components through MXML, you are just 
removing a
 convenient interface, and not restricting functionality.
 -- 
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com
 
 -Original Message-
 From: climbfar [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Extending Alert
 Date: Thu, 01 May 2008 14:18:55 -
 
 How do I extend the Alert class such that the new class cannot be 
 created using MXML tags? Taking it a step further is it possible to 
 create an ActionScript class extended from Panel that cannot be 
 constructed using MXML tags?
 
 G'day Mike





Re: [flexcoders] ConstraintColumn in VBox- why not?

2008-05-01 Thread Tom Chiverton
On Wednesday 30 Apr 2008, ben.clinkinbeard wrote:
 Before I go whining to bugs.adobe.com, is there a good reason VBox
 couldn't support ConstraintColumn and HBox couldn't support
 ConstraintRow? 

Adobe's answer will probably be that with constraint based layout you don't 
need H or V boxes any more - they were originally going to be deprecated in 
Flex 3 remember, before everyone else told them not to.

-- 
Tom Chiverton
Helping to heterogeneously e-enable performance-oriented models
on: http://thefalken.livejournal.com



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Sort a List Comp?

2008-05-01 Thread Justin Stanczak
I have the following:


 *   mx:HTTPService id=getMajorsVisitdates url=ServiceServlet


mx:List id=majorsList width=342
dataProvider={getMajorsVisitdates.lastResult.root.major}
change=selectMajor() height=200 labelField=name x=10
y=36/mx:List*


How do I sort the majorsList? Seems like it should be easy, but I'm not
totally understanding how to do it with a List. Thanks.

-- 
All that is necessary for the triumph of evil is that good men do nothing.
- Edmund Burke


[flexcoders] Flex3 UIComponents not dispatching addremove events when loaded within Modules

2008-05-01 Thread mrvx23
I ran across this anomaly and wonder if anyone else has encountered it
and what a possible solution would be.

I am trying to create a scenario whereby when a UIComponent becomes
visible (loaded as part of a (application) viewstate change), it
registers listeners to certain events, and when it becomes invisible
(the viewstate changes so it is not in the active view anymore), it
unregisters those listeners.

This works all and well with the add and remove attributes for a given
UIComponent mxml definition, _except_ when that component is
dynamically loaded into the application in the content of a mx:Module.
For some reason, the events (mx.events.FlexEvent.ADD and
mx.events.FlexEvent.REMOVE) are either never dispatched or never
received by the handler in the very same UIComponent subclass that
changes visibility and registers the listener.

Any explanation or suggestion on how to detect UIComponent visibility
(to the user) in this case would be really appreciated, 

thanks,
vx



Re: [flexcoders] ConstraintColumn in VBox- why not?

2008-05-01 Thread Ben Clinkinbeard
they were originally going to be deprecated in Flex 3 remember

Really? Thats an awful idea. Constraints are not even remotely related to
V|HBox in my opinion.

Ben


On Thu, May 1, 2008 at 11:51 AM, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Wednesday 30 Apr 2008, ben.clinkinbeard wrote:
  Before I go whining to bugs.adobe.com, is there a good reason VBox
  couldn't support ConstraintColumn and HBox couldn't support
  ConstraintRow?

 Adobe's answer will probably be that with constraint based layout you
 don't
 need H or V boxes any more - they were originally going to be deprecated
 in
 Flex 3 remember, before everyone else told them not to.

 --
 Tom Chiverton
 Helping to heterogeneously e-enable performance-oriented models
 on: http://thefalken.livejournal.com

 

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

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

 CONFIDENTIALITY

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

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

 

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






[flexcoders] Re: Disabling MenuBar+MenuItem transitions/animations

2008-05-01 Thread nathanpdaniel
You can set the openDuration value to 0 - it's also in the docs 
(that's where I learned) :D
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 I do not know how, probably someone else here will.
 
  
 
 But, believe it or not, many users like that stuff.  Effects like 
that
 are part of the R in RIA, and one of the strengths of Flex/Flash
 applications.  And that is why geeks like us shouldn't be UI 
designers.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of ansury2001
 Sent: Friday, August 10, 2007 11:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Disabling MenuBar+MenuItem 
transitions/animations
 
  
 
 Is there a way to disable or change the speed that MenuItems 
display 
 when they are shown using a MenuBar? 
 
 This is one of those little annoying things that bug some people, 
 even though it's only a split-second delay. When you click on a 
menu 
 in a menu bar, most of the time you'd rather just see the menu 
appear 
 instantly rather than watch it expand all pretty-like before you 
can 
 use it, heh.





RE: [flexcoders] error with old flex data service code

2008-05-01 Thread Jeff Vroom
Instead of using that service variable you can get the same thing with
this statement:

 

MessageService msgService =
(MessageService)getDestination().getService();

 

Jeff

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of strykker75
Sent: Thursday, May 01, 2008 5:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] error with old flex data service code

 

I have some code that was created a couple years ago, when flex data
services was young. I am trying to use it now, but can't seem to get
the java files working. I am having trouble in particular with the
ChatAdapter file:

package chat;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import flex.messaging.FlexSession;
import flex.messaging.FlexContext;
import flex.messaging.FlexSessionListener;
import flex.messaging.messages.AsyncMessage;
import flex.messaging.messages.Message;
import flex.messaging.services.MessageService;
import flex.messaging.services.ServiceAdapter;
import flex.messaging.util.UUIDUtils;

public class ChatAdapter extends ServiceAdapter implements
FlexSessionListener {

private Map sessions;

private String clientId = UUIDUtils.createUUID(false);

public ChatAdapter() {
sessions = Collections.synchronizedMap(new HashMap());
FlexSession.addSessionCreatedListener(this);
}

public Object invoke(Message message) {

// Get Session Id
FlexSession flexSession = FlexContext.getFlexSession();
String sessionId = flexSession.getId();

// Check if Session Id is already registered in HashMap 
if (!sessions.containsKey(sessionId)) {
// Get User Id from message body 
Map body = (Map) message.getBody();
String userId = (String) body.get(userId);
// Register session / userId mapping
System.out.println(*** Registering  + userId
+   + sessionId);
sessions.put(sessionId, userId);
}

MessageService msgService = (MessageService) service;
msgService.pushMessageToClients(message, true);
return null;

}

public void sessionCreated(FlexSession session) {
session.addSessionDestroyedListener(this);
}

public void sessionDestroyed(FlexSession session) {
// Get User Id associated with Session Id
String userId = (String) sessions.get(session.getId());
System.out.println(*** Removing  + userId +   +
session.getId());
// Notify interested parties
pushStatus(userId, disconnected);
// Remove Session Id / User Id mapping
sessions.remove(session.getId());
}

private void pushStatus(String userId, String status) {
MessageService msgService = (MessageService) service;
AsyncMessage msg = new AsyncMessage();
msg.setDestination(chat);
msg.setHeader(DSSubtopic, status. + userId);
Map body = new HashMap();
body.put(userId, userId);
body.put(status, status);
msg.setBody(body);
msg.setClientId(clientId);
msg.setMessageId(UUIDUtils.createUUID(false));
msg.setTimestamp(System.currentTimeMillis());
msgService.pushMessageToClients(msg, false);
}

}

The lines that read: 
MessageService msgService = (MessageService) service;
throw compile time errors. I believe that the flex-messaging.jar that
comes with LiveCycle Data Services ES may be different than the
version that shipped with Flex data Services, but that is only
speculation, since I can't seem to find a copy of the older file to
look at. I'm not sure how to correct this file to work with the
current release. Any help would be much appreciated.

 



[flexcoders] Animation Delays...

2008-05-01 Thread nathanpdaniel
I'm working on a project with a lot of animation.  I've noticed when I 
do something that causes animation - the first instance the animation 
runs, it seems to load something - though there's nothing to be 
loaded - no processing, etc.  With this delay, it skips to the point in 
the animation where it would have been had it not been delayed - so for 
short animations (menu popups, etc), there is no animation the first 
time it's run.  Every instace the animation runs after the first time 
works great and does what it should. 
Any ideas?

-Nathan



Re: [flexcoders] Flex3 UIComponents not dispatching addremove events when loaded within Modules

2008-05-01 Thread Veiko Sammelselg
I bet it's some named law that an explanation presents itself right after you 
have left all hope and posted a public cry for help. 

In case the UIComponent is part of a Flex Module, it is the module itself that 
dispatches the FlexEvent.REMOVE, since it is the hierarchically topmost element 
that gets removed. Now this makes sense at least, although how to propagate 
this knowledge of removal down to the component that I need, still needs 
solving.

vx


- Original Message 
From: mrvx23 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, May 1, 2008 5:59:22 PM
Subject: [flexcoders] Flex3 UIComponents not dispatching addremove events when 
loaded within Modules


I ran across this anomaly and wonder if anyone else has encountered it
and what a possible solution would be.

I am trying to create a scenario whereby when a UIComponent becomes
visible (loaded as part of a (application) viewstate change), it
registers listeners to certain events, and when it becomes invisible
(the viewstate changes so it is not in the active view anymore), it
unregisters those listeners.

This works all and well with the add and remove attributes for a given
UIComponent mxml definition, _except_ when that component is
dynamically loaded into the application in the content of a mx:Module.
For some reason, the events (mx.events.FlexEven t.ADD and
mx.events.FlexEvent .REMOVE) are either never dispatched or never
received by the handler in the very same UIComponent subclass that
changes visibility and registers the listener.

Any explanation or suggestion on how to detect UIComponent visibility
(to the user) in this case would be really appreciated, 

thanks,
vx




  

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

[flexcoders] Re: compc and manifest file

2008-05-01 Thread mt1_18
ok, I used a javascsript script to create the manifest file.  Now
however when I run the compc command I am getting errors on all the
embedded images:
FileName.as(72): col: 6: Error: unable to resolve /path/to/image.png'
for transcoding
[Embed(source='path/to/image.png')]

I tried using the -include-file fileName
/src/resources/images/fileName.png command but it is still giving this
error.  

Any ideas on how to include embedded images in compc?


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

 Automation of the manifest is a nice feature request..
 
 Hopefully we can get it into FB4.
 
 Has anyone logged it yet?
 
 
 
 --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakrejda@ wrote:
 
  I don't think that this is a compc issue: if memory serves (from a
  couple of months ago when I looked at the source), the compc ant task
  just calls out to the command line compc compiler. The limits are
in the
  OS's command line length...
  -- 
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso.com
  
  -Original Message-
  From: Gordon Smith gosmith@
  Reply-To: flexcoders@yahoogroups.com
  To: flexcoders@yahoogroups.com
  Subject: RE: [flexcoders] Re: compc and manifest file
  Date: Tue, 29 Apr 2008 15:23:45 -0700
  
   it seems that there is a maximum number of *.as or *.mxml
   files that can be passed in to the compc command 
  
   
  
  There shouldn't be. Can you please file a bug on this?
  
   
  
   how would I automate the creation of the manifest file?
  
   I dont want to update it each time I create a new file.
  
   
  
  Sorry, Flex doesn't provide any scripts for automatically generating a
  manifest. The SDK team maintains our manifests by hand and hasn't find
  it enough of a burden to bother automating the process. But a manifest
  has a simple format and you should be able to generate one based on a
  directory enumeration. You can use Perl, Python, or whatever your
  favorite scripting language is, and call your script using Ant's
exec
  task.
  
   
  
  Gordon Smith
  
  Adobe Flex SDK Team
  
   
  
  
 

  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of mt1_18
  Sent: Tuesday, April 29, 2008 12:34 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: compc and manifest file
  
  
   
  
  sorry I meant to say that I am trying to use ant and compc not and
  and compc :)
  --- In flexcoders@yahoogroups.com, mt1_18 mt1_18@ wrote:
  
   I am trying to use and and compc to compile my swc. However, compc
   only takes a list of files and not a directory. So I did something
   like this hoping it would work:
   compc output=framework.swc
   include-sources dir=${FRAMEWORK_ROOT} 
   includes=**/*.as **/*.mxml /
   source-path path-element=${FRAMEWORK_ROOT}/
   /compc
   
   However it seems that there is a maximum number of *.as or *.mxml
   files that can be passed in to the compc command. So from my
research
   it seems that I need to create a manifest file. But how would I
   automate the creation of the manifest file? I dont want to update it
   each time I create a new file. I am not too familiar with ant so any
   guidance would help. 
   
   Thanks
  
 





[flexcoders] Re: compc and manifest file

2008-05-01 Thread mt1_18
I resolved the issue.  It was simply a relative path issue.
--- In flexcoders@yahoogroups.com, mt1_18 [EMAIL PROTECTED] wrote:

 ok, I used a javascsript script to create the manifest file.  Now
 however when I run the compc command I am getting errors on all the
 embedded images:
 FileName.as(72): col: 6: Error: unable to resolve /path/to/image.png'
 for transcoding
 [Embed(source='path/to/image.png')]
 
 I tried using the -include-file fileName
 /src/resources/images/fileName.png command but it is still giving this
 error.  
 
 Any ideas on how to include embedded images in compc?
 
 
 --- In flexcoders@yahoogroups.com, Bjorn Schultheiss
 bjorn.mailinglists@ wrote:
 
  Automation of the manifest is a nice feature request..
  
  Hopefully we can get it into FB4.
  
  Has anyone logged it yet?
  
  
  
  --- In flexcoders@yahoogroups.com, Maciek Sakrejda msakrejda@ wrote:
  
   I don't think that this is a compc issue: if memory serves (from a
   couple of months ago when I looked at the source), the compc ant
task
   just calls out to the command line compc compiler. The limits are
 in the
   OS's command line length...
   -- 
   Maciek Sakrejda
   Truviso, Inc.
   http://www.truviso.com
   
   -Original Message-
   From: Gordon Smith gosmith@
   Reply-To: flexcoders@yahoogroups.com
   To: flexcoders@yahoogroups.com
   Subject: RE: [flexcoders] Re: compc and manifest file
   Date: Tue, 29 Apr 2008 15:23:45 -0700
   
it seems that there is a maximum number of *.as or *.mxml
files that can be passed in to the compc command 
   

   
   There shouldn't be. Can you please file a bug on this?
   

   
how would I automate the creation of the manifest file?
   
I dont want to update it each time I create a new file.
   

   
   Sorry, Flex doesn't provide any scripts for automatically
generating a
   manifest. The SDK team maintains our manifests by hand and
hasn't find
   it enough of a burden to bother automating the process. But a
manifest
   has a simple format and you should be able to generate one based
on a
   directory enumeration. You can use Perl, Python, or whatever your
   favorite scripting language is, and call your script using Ant's
 exec
   task.
   

   
   Gordon Smith
   
   Adobe Flex SDK Team
   

   
   
  
 
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of mt1_18
   Sent: Tuesday, April 29, 2008 12:34 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: compc and manifest file
   
   

   
   sorry I meant to say that I am trying to use ant and compc not
and
   and compc :)
   --- In flexcoders@yahoogroups.com, mt1_18 mt1_18@ wrote:
   
I am trying to use and and compc to compile my swc. However, compc
only takes a list of files and not a directory. So I did something
like this hoping it would work:
compc output=framework.swc
include-sources dir=${FRAMEWORK_ROOT} 
includes=**/*.as **/*.mxml /
source-path path-element=${FRAMEWORK_ROOT}/
/compc

However it seems that there is a maximum number of *.as or *.mxml
files that can be passed in to the compc command. So from my
 research
it seems that I need to create a manifest file. But how would I
automate the creation of the manifest file? I dont want to
update it
each time I create a new file. I am not too familiar with ant
so any
guidance would help. 

Thanks
   
  
 





[flexcoders] online docs seem to be unavailable

2008-05-01 Thread ivo
Have recently been using the online docs again, as of a few minutes I am 
getting:

502 Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /flex/3/langref/index.html.

Reason: DNS lookup failure for: d65app-vip.macromedia.com


- Ivo



Re: [flexcoders] online docs seem to be unavailable

2008-05-01 Thread Maciek Sakrejda
I'm seeing the same thing. Fortunately, the offline docs are available:

http://livedocs.adobe.com/flex/3/flex3_documentation.zip

(warning: ~70MB download).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: ivo [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: FlexCoders flexcoders@yahoogroups.com
Subject: [flexcoders] online docs seem to be unavailable
Date: Thu, 1 May 2008 10:57:45 -0700 (PDT)

Have recently been using the online docs again, as of a few minutes I am
getting:

502 Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
GET /flex/3/langref/index.html.

Reason: DNS lookup failure for: d65app-vip.macromedia.com

- Ivo




 




[flexcoders] Image Resampling

2008-05-01 Thread Ezekiel48
I want to create a thumbnail of a picture, but if I just resize the
picture to say, 95X95 pixels the data of the 6MP picture is still
loaded into memory so the program take up A LOT of memory.  I want to
resize and/or resample the image to be of a lower resolution so the
unused data can be cleaned out of memory.

I have looked around and heard about sending an image to a server to
be resized but when I need thumbs for a TileList and sending all those
images to the server would take too long.  Does anyone have any
suggestions? Thanks in advance.



[flexcoders] Dynamic combobox from JSON request

2008-05-01 Thread timgerr
Hello all, I have a Json request that I get from PHP backend.  I am
learning so I have created a dynamic list for a combo box.  The
problem is that when I press a button and it gets the data, I then go
to the combo box and I see 1 entry.  If I then select the combo box
again I then will see all the entries. Not sure how to have all the
entries show  the first time I select the combo box.  Here is my code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import com.adobe.serialization.json.JSON;

[Bindable]
public var myList:Array = new Array();

public function personJSON(event:ResultEvent):void
{
var rawData:String = String(event.result);
var person:Object = JSON.decode(rawData);
trace(person[0].item1);
trace(person.length);
var x:Number;

for(x=0;xperson.length;x++){
trace(person[x].item1);
myList.push(person[x].item1);
}
trace(myList.length);
}
public function clearArray():void
{
myList = [];
cmboOne.text = 'Choose';
}
]]
/mx:Script
mx:HTTPService id=personRequest
url=http://127.0.0.1/test/Class/InventoryRequest.php; 
useProxy=false method=GET resultFormat=text 
result=personJSON(event)
mx:request xmlns=
getPersontrue/getPerson
/mx:request
/mx:HTTPService
mx:Panel x=401 y=294 width=250 height=275 layout=absolute

mx:Button x=69 y=121 label=Get Info
click=personRequest.send() id=send_btn/
mx:Button id=aryClear click=clearArray() label=Clear 
x=78
y=151/
/mx:Panel
mx:ComboBox id=cmboOne dataProvider={myList}  rowCount=6
x=157 y=44/

/mx:Application


Thanks,
timgerr 



[flexcoders] DataGrid and exporting values

2008-05-01 Thread Dominic Pazula
Like a lot of people, I've been wanting to export values out of a 
data grid and into a file.  I decided that I didn't want to go with 
the round trip to the server.

Instead, I use the ExternalInterface to call a js function that opens 
a new window and writes the values into a HTML table (uses js and the 
DOM).  I have a copy all button that selects the table and copies 
it to the clip board.  The user has to just then open Excel and 
hit paste.

Slick, or so I thought.

I'm having performance issues -- any table of decent size takes 
forever to write to the window.  

The js that is doing the heavy lifting is:
for (i=0; i  data.length; i++){
j = 0;
var newRow = winTable.insertRow(-1);
for (j; j  data[i].length; j++){
   var newCell = newRow.insertCell(j);
   var newText = win.document.createTextNode(data[i][j]);
   newCell.appendChild(newText);
}
}

Does anyone have suggestions on what I can do to speed this up?

Thanks
Dominic

PS Once I have this in decent working order, I will be happy post all 
the code.



RE: [flexcoders] online docs seem to be unavailable

2008-05-01 Thread Stephen Gilson
Our apologies - there seems to be an issue with adobe.com today.
 
Stephen



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Maciek Sakrejda
Sent: Thursday, May 01, 2008 2:10 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] online docs seem to be unavailable



I'm seeing the same thing. Fortunately, the offline docs are available:

http://livedocs.adobe.com/flex/3/flex3_documentation.zip
http://livedocs.adobe.com/flex/3/flex3_documentation.zip 

(warning: ~70MB download).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com http://www.truviso.com 

-Original Message-
From: ivo [EMAIL PROTECTED] mailto:cervantes_vive%40yahoo.com

Reply-To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
To: FlexCoders flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] online docs seem to be unavailable
Date: Thu, 1 May 2008 10:57:45 -0700 (PDT)

Have recently been using the online docs again, as of a few minutes I am
getting:

502 Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
GET /flex/3/langref/index.html.

Reason: DNS lookup failure for: d65app-vip.macromedia.com

- Ivo



 


Re: [flexcoders] DataGrid and exporting values

2008-05-01 Thread Maciek Sakrejda
Well, that ExternalInterface performs really poorly with moderate-sized
data sets is a known issue:
http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Dominic Pazula [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid and exporting values
Date: Thu, 01 May 2008 18:54:02 -

Like a lot of people, I've been wanting to export values out of a 
data grid and into a file. I decided that I didn't want to go with 
the round trip to the server.

Instead, I use the ExternalInterface to call a js function that opens 
a new window and writes the values into a HTML table (uses js and the 
DOM). I have a copy all button that selects the table and copies 
it to the clip board. The user has to just then open Excel and 
hit paste.

Slick, or so I thought.

I'm having performance issues -- any table of decent size takes 
forever to write to the window. 

The js that is doing the heavy lifting is:
for (i=0; i  data.length; i++){
j = 0;
var newRow = winTable.insertRow(-1);
for (j; j  data[i].length; j++){
var newCell = newRow.insertCell(j);
var newText = win.document.createTextNode(data[i][j]);
newCell.appendChild(newText);
}
}

Does anyone have suggestions on what I can do to speed this up?

Thanks
Dominic

PS Once I have this in decent working order, I will be happy post all 
the code.




 




RE: [flexcoders] DataGrid and exporting values

2008-05-01 Thread Tracy Spratt
There was a thread sometime ago about performance problems with large
data sets and ExtenalInterface.

 

Why not skip that part.  You could generate the HTML in Flex and put it
on the clipboard directly using System.setClipboard(sHTML);

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dominic Pazula
Sent: Thursday, May 01, 2008 2:54 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid and exporting values

 

Like a lot of people, I've been wanting to export values out of a 
data grid and into a file. I decided that I didn't want to go with 
the round trip to the server.

Instead, I use the ExternalInterface to call a js function that opens 
a new window and writes the values into a HTML table (uses js and the 
DOM). I have a copy all button that selects the table and copies 
it to the clip board. The user has to just then open Excel and 
hit paste.

Slick, or so I thought.

I'm having performance issues -- any table of decent size takes 
forever to write to the window. 

The js that is doing the heavy lifting is:
for (i=0; i  data.length; i++){
j = 0;
var newRow = winTable.insertRow(-1);
for (j; j  data[i].length; j++){
var newCell = newRow.insertCell(j);
var newText = win.document.createTextNode(data[i][j]);
newCell.appendChild(newText);
}
}

Does anyone have suggestions on what I can do to speed this up?

Thanks
Dominic

PS Once I have this in decent working order, I will be happy post all 
the code.

 



RE: [flexcoders] HTTPService and Browser Differences

2008-05-01 Thread Tracy Spratt
This does sound like a caching issue.  I understand that POST does not
cache.  You could change the GET to a POST to see if that is so.
Alternatively, you can append some unique string to the GET url.  Many
folks use Date.time for this.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Armstrong
Sent: Wednesday, April 30, 2008 10:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTPService and Browser Differences

 

Hi All,

 

As I continue my Flex education I've come across an issue in my first
production application. I'm using ROR along with Flex and passing XML
back and forth, etc. I've learned a bunch via Flex Solutions, Flex on
Rails, and Training from the Source, etc. The issue I'm having seems
to be caused by differences in IE and FF and how they handle responses
from HTTPService calls. By using CharlesProxy I can see that everything
works great in FF but they don't when using IE. I was hoping to remove
all the cross-browser issues by moving to flex. :-)

 

Anyway, I'm doing something like this:

 

1) Create a new record via HTTPService-POST\record.xml

2) The new record is created and an event is fired so that the existing
record list can be refreshed.

3) HTTPService-GET\record.xml

4) Grid in the List component is refreshed with the additional record.

 

Everything works great in FF and I can see both the POST and GET along
with the returned XML item, and then list.

 

On IE (v6), however, only the POST goes through and it seems like it is
caching the result from the POST and using as the result for the GET,
thereby making my list just a list of one, the most recently created
record. Though, this doesn're really work either as it doesn't have the
surrounding records type=array element.

 

Anyway, I'm sure there is something I am missing with this new Flex
development so I'm hoping you all can direct me to some specific reading
to help me understand the major behavior differences between the
browsers when using Flex, etc.

 

Thanks much,

 

Tom

 



RE: [flexcoders] Drag and Drop question

2008-05-01 Thread Tracy Spratt
Actually I am pretty sure the list-based component's built-in drag/drop
functionality does do this on a MOVE.  The docs describe this.  Are the
XML structures the same?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, May 01, 2008 2:46 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drag and Drop question

 

I'm fairly certain that there's no voodoo to automatically delete nodes
from your XML, you need to do that yourself in your drop handler.

-J

On Thu, May 1, 2008 at 4:36 PM, Rafael Faria
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:

If i'm dragging an element from one tree to another. How do i get the
updated xml of the tree i'm dragging off?

For instance

TREE 1
- Element 1
- Element 2

TREE 2

if i get the xml from tree 1 it would be something like
root
element label=Element 1 /
element label=Element 2 /
/root

but if i drag the Element 1 into the TREE 2 i want to get the xml
without the Element 1, without that node.

i'm trying to get it creating a handler for dragDrop attribute on
the Tree 2, but everytime i get it the items are not updated.

Anyone know how to get the updated xml that tree 1 will have after i
drop the element?

Please... this is killing me =/

Thanks




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



[flexcoders] Re: DataGrid and exporting values

2008-05-01 Thread Dominic Pazula
That is a good idea.

Actually pushing the data across didn't seem to be the problem.  That 
loop is what was taking forever.  I could literally watch the 
individual cells get added.  A couple hundred rows took 10 seconds.  
Of course I could always be missing something...

Thanks

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

 There was a thread sometime ago about performance problems with 
large
 data sets and ExtenalInterface.
 
  
 
 Why not skip that part.  You could generate the HTML in Flex and 
put it
 on the clipboard directly using System.setClipboard(sHTML);
 
  
 
 Tracy
 
  




Re: [flexcoders] HTTPService and Browser Differences

2008-05-01 Thread Tom Armstrong
Thanks Tracy,

Well, given ROR's focus on using REST techniques I can't really change the 
method. IOW, The router identifies requests by the HTTP method + URL, etc. I'll 
continue my research and see what I can do. In the meantime I'll do my 
development with FF and won't release to prod until I figure this out. I now 
see that some of these issues are discussed in Flex on Rails in the later 
chapters so I'll have a look.

Thanks,

Tom


  - Original Message - 
  From: Tracy Spratt 
  To: flexcoders@yahoogroups.com 
  Sent: Thursday, May 01, 2008 2:29 PM
  Subject: RE: [flexcoders] HTTPService and Browser Differences



  This does sound like a caching issue.  I understand that POST does not cache. 
 You could change the GET to a POST to see if that is so.  Alternatively, you 
can append some unique string to the GET url.  Many folks use Date.time for 
this.



  Tracy




--

  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom 
Armstrong
  Sent: Wednesday, April 30, 2008 10:56 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] HTTPService and Browser Differences



  Hi All,



  As I continue my Flex education I've come across an issue in my first 
production application. I'm using ROR along with Flex and passing XML back and 
forth, etc. I've learned a bunch via Flex Solutions, Flex on Rails, and 
Training from the Source, etc. The issue I'm having seems to be caused by 
differences in IE and FF and how they handle responses from HTTPService calls. 
By using CharlesProxy I can see that everything works great in FF but they 
don't when using IE. I was hoping to remove all the cross-browser issues by 
moving to flex. :-)



  Anyway, I'm doing something like this:



  1) Create a new record via HTTPService-POST\record.xml

  2) The new record is created and an event is fired so that the existing 
record list can be refreshed.

  3) HTTPService-GET\record.xml

  4) Grid in the List component is refreshed with the additional record.



  Everything works great in FF and I can see both the POST and GET along with 
the returned XML item, and then list.



  On IE (v6), however, only the POST goes through and it seems like it is 
caching the result from the POST and using as the result for the GET, thereby 
making my list just a list of one, the most recently created record. 
Though, this doesn're really work either as it doesn't have the surrounding 
records type=array element.



  Anyway, I'm sure there is something I am missing with this new Flex 
development so I'm hoping you all can direct me to some specific reading to 
help me understand the major behavior differences between the browsers when 
using Flex, etc.



  Thanks much,



  Tom


   

[flexcoders] ListCollectionView.contains()

2008-05-01 Thread Maciek Sakrejda
Does ListCollectionView.contains() use reference equality to check if
the collection contains a given object? Is there a simple way of using
value equality (besides the obvious iteration)?
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




[flexcoders] Re: error with old flex data service code

2008-05-01 Thread strykker75
Thanks Jeff, that took care of it.  I guess they changed the class
when they released it as LiveCycle data services instead of Flex data
services.  Thanks again for the help

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

 Instead of using that service variable you can get the same thing with
 this statement:
 
  
 
 MessageService msgService =
 (MessageService)getDestination().getService();
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of strykker75
 Sent: Thursday, May 01, 2008 5:44 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] error with old flex data service code
 
  
 
 I have some code that was created a couple years ago, when flex data
 services was young. I am trying to use it now, but can't seem to get
 the java files working. I am having trouble in particular with the
 ChatAdapter file:
 
 package chat;
 
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
 import flex.messaging.FlexSession;
 import flex.messaging.FlexContext;
 import flex.messaging.FlexSessionListener;
 import flex.messaging.messages.AsyncMessage;
 import flex.messaging.messages.Message;
 import flex.messaging.services.MessageService;
 import flex.messaging.services.ServiceAdapter;
 import flex.messaging.util.UUIDUtils;
 
 public class ChatAdapter extends ServiceAdapter implements
 FlexSessionListener {
 
 private Map sessions;
 
 private String clientId = UUIDUtils.createUUID(false);
 
 public ChatAdapter() {
 sessions = Collections.synchronizedMap(new HashMap());
 FlexSession.addSessionCreatedListener(this);
 }
 
 public Object invoke(Message message) {
 
 // Get Session Id
 FlexSession flexSession = FlexContext.getFlexSession();
 String sessionId = flexSession.getId();
 
 // Check if Session Id is already registered in HashMap 
 if (!sessions.containsKey(sessionId)) {
 // Get User Id from message body 
 Map body = (Map) message.getBody();
 String userId = (String) body.get(userId);
 // Register session / userId mapping
 System.out.println(*** Registering  + userId
 +   + sessionId);
 sessions.put(sessionId, userId);
 }
 
 MessageService msgService = (MessageService) service;
 msgService.pushMessageToClients(message, true);
 return null;
 
 }
 
 public void sessionCreated(FlexSession session) {
 session.addSessionDestroyedListener(this);
 }
 
 public void sessionDestroyed(FlexSession session) {
 // Get User Id associated with Session Id
 String userId = (String) sessions.get(session.getId());
 System.out.println(*** Removing  + userId +   +
 session.getId());
 // Notify interested parties
 pushStatus(userId, disconnected);
 // Remove Session Id / User Id mapping
 sessions.remove(session.getId());
 }
 
 private void pushStatus(String userId, String status) {
 MessageService msgService = (MessageService) service;
 AsyncMessage msg = new AsyncMessage();
 msg.setDestination(chat);
 msg.setHeader(DSSubtopic, status. + userId);
 Map body = new HashMap();
 body.put(userId, userId);
 body.put(status, status);
 msg.setBody(body);
 msg.setClientId(clientId);
 msg.setMessageId(UUIDUtils.createUUID(false));
 msg.setTimestamp(System.currentTimeMillis());
 msgService.pushMessageToClients(msg, false);
 }
 
 }
 
 The lines that read: 
 MessageService msgService = (MessageService) service;
 throw compile time errors. I believe that the flex-messaging.jar that
 comes with LiveCycle Data Services ES may be different than the
 version that shipped with Flex data Services, but that is only
 speculation, since I can't seem to find a copy of the older file to
 look at. I'm not sure how to correct this file to work with the
 current release. Any help would be much appreciated.





[flexcoders] Re: BlazeDS Security Confusion

2008-05-01 Thread Jim Boone
Mete,

Thank you for the response. Unfortunately, I am still having troubles.

I have:
* confirmed that the Tomcat Valve is being loaded correctly. 
* defined the TomcatLoginCommand in services-config.xml (see below).  
* secured the destination (see remoting-config.xml below). 
* configured JBoss to use a UsersRolesLoginModule and added the user
  and basic_access role (same concept as adding Tomcat users and 
  roles).
* not set any credentials in the Actionscript code. 
* DID NOT secure the endpoint in the web.xml since your guidance 
  didn't included it and therefore implies you don't need to. 

The results?  I was not prompted with the web browser Basic login
prompt and the destination was not secured. I could contact the
destination even though I was not authenticated. It didn't work!
A. Any other thoughts?

Jim

=== services-config.xml ===
?xml version=1.0 encoding=UTF-8?
services-config

services
service-include file-path=remoting-config.xml /
service-include file-path=messaging-config.xml /
/services

factories
factory id=ejb class=com.adobe.ac.ejb.EJB3Factory /
/factories

security
login-command
class=flex.messaging.security.TomcatLoginCommand server=JBoss/

security-constraint id=basic-access
auth-methodBasic/auth-method
roles
rolebasic_access/role
/roles
/security-constraint
/security

=== remoting-config.xml ===
?xml version=1.0 encoding=UTF-8?
service id=remoting-service
class=flex.messaging.services.RemotingService

adapters
adapter-definition id=java-object

class=flex.messaging.services.remoting.adapters.JavaAdapter
default=true /
/adapters

default-channels
channel ref=polling-channel /
/default-channels

destination id=DataGenerator
properties
factoryejb/factory
sourcedashboard/DataGeneratorBean/source
/properties
security
security-constraint id=basic-access/
/security
/destination

/service

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

 Hi Jim,
 
 The short answer is that TomcatLoginCommand uses Tomcat valve to do
 its authentication/authorization but here's a writeup I have on
 BlazeDS security that should clarify things.
 
 -Mete



[flexcoders] SOT: ColdFusion backend for Flex, what the heck am i doing wrong...

2008-05-01 Thread Derrick Anderson
i see nothing in the CF community about this and since many here have CF for
their back-end apps I figured I'd give it a try.

I'm using CF7 standard on the backend and communicating to my CFC's with
remote object.  The problem I've had for months now is every now and then
the onApplicationStart and onSessionStart methods stop firing in my
Application.cfc when a Flex request comes in.  It actually appears to ignore
the Application.cfc altogether.  The reason I suspect this is because none
of my application or session variables exist in my CFC's when this problem
happens, aren't those functions supposed to fire automatically? What would
cause them not to?

A restart of the server might fix it, might not- i never know until i tinker
with the CFC's and application.cfc file settings until it magically starts
working again.  Then a few days later, it's back again.  The relevant parts
of my application.cfc are pasted below- has anyone ever seen behavior like
this???

cfcomponent
displayname=Application
output=true
hint=Handle the application.

cfscript
   this.name = MyApp;
   this.applicationTimeout = createTimeSpan(1,0,0,0);
   this.sessionmanagement = yes;
   this.sessiontimeout = createTimeSpan(0,1,0,0);
   this.scriptProtect = all;
   /cfscript

cffunction
name=OnApplicationStart
access=public
returntype=boolean
output=false
hint=Fires when the application is first created.

cfscript
 application.portalDSN = portal;
 application.sessions = 0;
   /cfscript

cflog file=#this.name# type=Information text=Application #
this.name# Started

cfreturn true /
/cffunction

cffunction name=onSessionStart output=false
cfscript
   session.started = now();
   session.projectID = 0;
   if(cgi.SERVER_NAME CONTAINS local)
   {
   session.clientDSN = clientBase;
   }
   else
   {
   session.clientDSN = ListFirst(cgi.SERVER_NAME,.);
   }
/cfscript

cfquery datasource=#application.portalDSN# name=qGetClientID
SELECT clientID FROM clients WHERE folderName = cfqueryparam
cfsqltype=cf_sql_varchar value=#session.clientDSN#
/cfquery
cfset session.clientID = qGetClientID.clientID

cflock scope=application timeout=5 type=Exclusive
   cfset application.sessions = application.sessions + 1
/cflock
   /cffunction


Re: [flexcoders] Re: BlazeDS Security Confusion

2008-05-01 Thread Robert Cadena
try setting server to Tomcat instead of JBoss in your
services-config.xml  security  login command node?

/r

On Thu, May 1, 2008 at 12:50 PM, Jim Boone [EMAIL PROTECTED] wrote:

 Mete,

 Thank you for the response. Unfortunately, I am still having troubles.

 I have:
 * confirmed that the Tomcat Valve is being loaded correctly.
 * defined the TomcatLoginCommand in services-config.xml (see below).
 * secured the destination (see remoting-config.xml below).
 * configured JBoss to use a UsersRolesLoginModule and added the user
  and basic_access role (same concept as adding Tomcat users and
  roles).
 * not set any credentials in the Actionscript code.
 * DID NOT secure the endpoint in the web.xml since your guidance
  didn't included it and therefore implies you don't need to.

 The results?  I was not prompted with the web browser Basic login
 prompt and the destination was not secured. I could contact the
 destination even though I was not authenticated. It didn't work!
 A. Any other thoughts?

 Jim

 === services-config.xml ===
 ?xml version=1.0 encoding=UTF-8?
 services-config

services
service-include file-path=remoting-config.xml /
service-include file-path=messaging-config.xml /
/services

factories
factory id=ejb class=com.adobe.ac.ejb.EJB3Factory /
/factories

security
login-command
 class=flex.messaging.security.TomcatLoginCommand server=JBoss/

security-constraint id=basic-access
 auth-methodBasic/auth-method
 roles
rolebasic_access/role
/roles
/security-constraint
/security

 === remoting-config.xml ===
 ?xml version=1.0 encoding=UTF-8?
 service id=remoting-service
class=flex.messaging.services.RemotingService

adapters
adapter-definition id=java-object

  class=flex.messaging.services.remoting.adapters.JavaAdapter
default=true /
/adapters

default-channels
channel ref=polling-channel /
/default-channels

destination id=DataGenerator
properties
factoryejb/factory
sourcedashboard/DataGeneratorBean/source
/properties
security
security-constraint id=basic-access/
/security
/destination

 /service

 --- In flexcoders@yahoogroups.com, meteatamel [EMAIL PROTECTED] wrote:
 
  Hi Jim,
 
  The short answer is that TomcatLoginCommand uses Tomcat valve to do
  its authentication/authorization but here's a writeup I have on
  BlazeDS security that should clarify things.
 
  -Mete


 

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






[flexcoders] Lose my state instance when opening and closesing a popup modal window

2008-05-01 Thread kpjj31
Is a specific reason why I would lose my ability to use state management
after I open and close a modal title window?



[flexcoders] Re: BlazeDS Security Confusion

2008-05-01 Thread Jim Boone
Robert,

Well that certain made it spring to life! Thank you. It now throws an
exception back to the front end with a Client.Authentication faultCode
and faultString = Login required before authorization can proceed.
The developers doc imply that the browser should pop a login dialog
box, but that isn't happening. I ultimately want to capture the
exception and login in my Flex app anyway. 

server=JBoss must have worked at one point because I have seen
several references on the web that use it...

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

 try setting server to Tomcat instead of JBoss in your
 services-config.xml  security  login command node?
 
 /r
 
 On Thu, May 1, 2008 at 12:50 PM, Jim Boone [EMAIL PROTECTED] wrote:
 
  Mete,
 
  Thank you for the response. Unfortunately, I am still having troubles.
 
  I have:
  * confirmed that the Tomcat Valve is being loaded correctly.
  * defined the TomcatLoginCommand in services-config.xml (see below).
  * secured the destination (see remoting-config.xml below).
  * configured JBoss to use a UsersRolesLoginModule and added the user
   and basic_access role (same concept as adding Tomcat users and
   roles).
  * not set any credentials in the Actionscript code.
  * DID NOT secure the endpoint in the web.xml since your guidance
   didn't included it and therefore implies you don't need to.
 
  The results?  I was not prompted with the web browser Basic login
  prompt and the destination was not secured. I could contact the
  destination even though I was not authenticated. It didn't work!
  A. Any other thoughts?
 
  Jim
 
  === services-config.xml ===
  ?xml version=1.0 encoding=UTF-8?
  services-config
 
 services
 service-include file-path=remoting-config.xml /
 service-include file-path=messaging-config.xml /
 /services
 
 factories
 factory id=ejb
class=com.adobe.ac.ejb.EJB3Factory /
 /factories
 
 security
 login-command
  class=flex.messaging.security.TomcatLoginCommand server=JBoss/
 
 security-constraint id=basic-access
  auth-methodBasic/auth-method
  roles
 rolebasic_access/role
 /roles
 /security-constraint
 /security
 
  === remoting-config.xml ===
  ?xml version=1.0 encoding=UTF-8?
  service id=remoting-service
 class=flex.messaging.services.RemotingService
 
 adapters
 adapter-definition id=java-object
 
   class=flex.messaging.services.remoting.adapters.JavaAdapter
 default=true /
 /adapters
 
 default-channels
 channel ref=polling-channel /
 /default-channels
 
 destination id=DataGenerator
 properties
 factoryejb/factory
 sourcedashboard/DataGeneratorBean/source
 /properties
 security
 security-constraint id=basic-access/
 /security
 /destination
 
  /service
 
  --- In flexcoders@yahoogroups.com, meteatamel meteatamel@ wrote:
  
   Hi Jim,
  
   The short answer is that TomcatLoginCommand uses Tomcat valve to do
   its authentication/authorization but here's a writeup I have on
   BlazeDS security that should clarify things.
  
   -Mete
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
  Links
 
 
 
 





Re: [flexcoders] Drag and Drop question

2008-05-01 Thread Josh McDonald
How do you mark a drag/drop operation as having a certain type (ie Move)?

-J

On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt [EMAIL PROTECTED] wrote:

Actually I am pretty sure the list-based component's built-in drag/drop
 functionality does do this on a MOVE.  The docs describe this.  Are the XML
 structures the same?



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, May 01, 2008 2:46 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Drag and Drop question



 I'm fairly certain that there's no voodoo to automatically delete nodes
 from your XML, you need to do that yourself in your drop handler.

 -J

 On Thu, May 1, 2008 at 4:36 PM, Rafael Faria [EMAIL PROTECTED]
 wrote:

 If i'm dragging an element from one tree to another. How do i get the
 updated xml of the tree i'm dragging off?

 For instance

 TREE 1
 - Element 1
 - Element 2

 TREE 2

 if i get the xml from tree 1 it would be something like
 root
 element label=Element 1 /
 element label=Element 2 /
 /root

 but if i drag the Element 1 into the TREE 2 i want to get the xml
 without the Element 1, without that node.

 i'm trying to get it creating a handler for dragDrop attribute on
 the Tree 2, but everytime i get it the items are not updated.

 Anyone know how to get the updated xml that tree 1 will have after i
 drop the element?

 Please... this is killing me =/

 Thanks




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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]

  




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Flex Flash Animation slowdown woes and Long(!) Flex Builder Build Times

2008-05-01 Thread cougar_shuttle
Hi Group,

We are building a large, complex, highly-skinned Flex site with maybe
30 modules and maybe 100 flash components built with the kit.  Our
performance on flash-animated graphics throughout the site is terrible
right now and we're researching how to optimize to make the animations
smooth and site experience as liquid as the individual flash
components appear when they are compiled in flash.  We'd appreciate
any info or resources that would help with this task.

We are also experiencing impossibly long build times in Flex Builder 3
and looking into how to make this large project build more quickly. 
It seems like FB is deleting the binary resources (mp3s, flas, images)
in our previous build may be a big part of the holdup.  Is there a
good way to separate binary things from the sources so that they don't
have to be continually copied over and deleted every time we build?

Thankyou
PUNY dev team 



[flexcoders] E4X vs Array Collection

2008-05-01 Thread Nate Pearson
What's faster, E4X or array collections with typed classes?

I can have my data nested three levels in XML or I can have it pretty
flat in an array collection.

I'll be using this data with graphs, but will also be do analysis of
the selected area on the graph.

Thanks,

Nate



RE: [flexcoders] Drag and Drop question

2008-05-01 Thread Tracy Spratt
Move is the default, there is extra work to copy.

 

http://livedocs.adobe.com/flex/3/html/dragdrop_8.html

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, May 01, 2008 5:05 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Drag and Drop question

 

How do you mark a drag/drop operation as having a certain type (ie
Move)?

-J

On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Actually I am pretty sure the list-based component's built-in drag/drop
functionality does do this on a MOVE.  The docs describe this.  Are the
XML structures the same?

 

Tracy

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Josh McDonald
Sent: Thursday, May 01, 2008 2:46 AM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Drag and Drop question

 

I'm fairly certain that there's no voodoo to automatically delete nodes
from your XML, you need to do that yourself in your drop handler.

-J

On Thu, May 1, 2008 at 4:36 PM, Rafael Faria
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:

If i'm dragging an element from one tree to another. How do i get the
updated xml of the tree i'm dragging off?

For instance

TREE 1
- Element 1
- Element 2

TREE 2

if i get the xml from tree 1 it would be something like
root
element label=Element 1 /
element label=Element 2 /
/root

but if i drag the Element 1 into the TREE 2 i want to get the xml
without the Element 1, without that node.

i'm trying to get it creating a handler for dragDrop attribute on
the Tree 2, but everytime i get it the items are not updated.

Anyone know how to get the updated xml that tree 1 will have after i
drop the element?

Please... this is killing me =/

Thanks







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

:: Josh 'G-Funk' McDonald

:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



[flexcoders] Re: pending item

2008-05-01 Thread annouss79
here is the code , i hope it can help :

myFirstArray = usertest.offres;
counteurMarked = 0;
var count:int=myFirstArray.length;
for(var i:int = 0; i  count; i++){
var offreCollection:Offre = myFirstArray.getItemAt(0) as Offre;
mySecondArray = offreCollection.markings;
counteurMarked += mySecondArray.length;
}




[flexcoders] execute external application in adobe air

2008-05-01 Thread Carlo Gulliani
can i execute another external application through adobe air app? for example, 
i want to run .app file, which kind as shell file. there is command line 
stroke, which move files from location 1 to location 2, can i execute it from 
air or, maybe, can i call terminal (i work on mac os) and send to it some code, 
such as mv ~/Desktop/file.jpg ~/Desktop/myAirProject/ ?


  

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

[flexcoders] execute external application in adobe air

2008-05-01 Thread Carlo Gulliani
can i execute another external application through adobe air app? for example, 
i want to run .app file, which kind as shell file. there is command line 
stroke, which move files from location 1 to location 2, can i execute it from 
air or, maybe, can i call terminal (i work on mac os) and send to it some code, 
such as mv ~/Desktop/file.jpg ~/Desktop/myAirProject/ ?


  

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

[flexcoders] Cairngorm - always event, always command?

2008-05-01 Thread chigwell23
pseudocode:

creationComplete
var ipAddress:String
ipAddress = getUserIP()


function getuserIP():String{

   // use Services to go out to ColdFusion which can tell me user IP
   return IP
   }

But Cairngorm encapsulates actions into commands which are driven by
an event and a delegate. So how does it handle examples like the one
above? Should I create a getIP event, which is dispatched from
creationComplete, and use the standard command/delegate path. If the
event is not necessary, and it still makes sense to put the action
in a command, how would that command get activated without the
Cairngorm event process? I know what I mean grin. TIA,

Mic.



Re: [flexcoders] Drag and Drop question

2008-05-01 Thread Josh McDonald
Ew =)

All my dragdrop stuff is funky custom components so I never noticed. But ew.

-J

On Fri, May 2, 2008 at 7:49 AM, Tracy Spratt [EMAIL PROTECTED] wrote:

Move is the default, there is extra work to copy.



 http://livedocs.adobe.com/flex/3/html/dragdrop_8.html

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, May 01, 2008 5:05 PM

 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Drag and Drop question



 How do you mark a drag/drop operation as having a certain type (ie Move)?

 -J

 On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt [EMAIL PROTECTED]
 wrote:

 Actually I am pretty sure the list-based component's built-in drag/drop
 functionality does do this on a MOVE.  The docs describe this.  Are the XML
 structures the same?



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, May 01, 2008 2:46 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Drag and Drop question



 I'm fairly certain that there's no voodoo to automatically delete nodes
 from your XML, you need to do that yourself in your drop handler.

 -J

 On Thu, May 1, 2008 at 4:36 PM, Rafael Faria [EMAIL PROTECTED]
 wrote:

 If i'm dragging an element from one tree to another. How do i get the
 updated xml of the tree i'm dragging off?

 For instance

 TREE 1
 - Element 1
 - Element 2

 TREE 2

 if i get the xml from tree 1 it would be something like
 root
 element label=Element 1 /
 element label=Element 2 /
 /root

 but if i drag the Element 1 into the TREE 2 i want to get the xml
 without the Element 1, without that node.

 i'm trying to get it creating a handler for dragDrop attribute on
 the Tree 2, but everytime i get it the items are not updated.

 Anyone know how to get the updated xml that tree 1 will have after i
 drop the element?

 Please... this is killing me =/

 Thanks





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

 :: Josh 'G-Funk' McDonald

 :: 0437 221 380 :: [EMAIL PROTECTED]




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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]

  




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] execute external application in adobe air

2008-05-01 Thread Jeffry Houser

  Officially no.

  I blogged about one possible work around. 
http://www.jeffryhouser.com/index.cfm/2008/4/22/Using-AIR-to-launch-other-applications
 




Carlo Gulliani wrote:
 
 
 can i execute another external application through adobe air app? for 
 example, i want to run .app file, which kind as shell file. there is 
 command line stroke, which move files from location 1 to location 2, can 
 i execute it from air or, maybe, can i call terminal (i work on mac os) 
 and send to it some code, such as mv ~/Desktop/file.jpg 
 ~/Desktop/myAirProject/ ?
 

-- 
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711  | Phone: 1-203-379-0773
--
Adobe Community Expert 
http://www.adobe.com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com



Re: [flexcoders] SOT: ColdFusion backend for Flex, what the heck am i doing wrong...

2008-05-01 Thread Jeffry Houser

  I thought that the application.cfc was ignored for Flex Remoting 
requests.  I have no idea why I think that, though, especially since it 
is documented that OnRequest can interfere with Flex remoting requests.

  I'll add that, I think it's a very bad idea to have Remote use CFCs 
that rely on shared scope variables, such as session.


Derrick Anderson wrote:
 
 
 i see nothing in the CF community about this and since many here have CF 
 for their back-end apps I figured I'd give it a try.
 
 I'm using CF7 standard on the backend and communicating to my CFC's with 
 remote object.  The problem I've had for months now is every now and 
 then the onApplicationStart and onSessionStart methods stop firing in my 
 Application.cfc when a Flex request comes in.  It actually appears to 
 ignore the Application.cfc altogether.  The reason I suspect this is 
 because none of my application or session variables exist in my CFC's 
 when this problem happens, aren't those functions supposed to fire 
 automatically? What would cause them not to?
 
 A restart of the server might fix it, might not- i never know until i 
 tinker with the CFC's and application.cfc file settings until it 
 magically starts working again.  Then a few days later, it's back 
 again.  The relevant parts of my application.cfc are pasted below- has 
 anyone ever seen behavior like this???
 
 cfcomponent
 displayname=Application
 output=true
 hint=Handle the application.

 cfscript
this.name http://this.name = MyApp;
this.applicationTimeout = createTimeSpan(1,0,0,0);
this.sessionmanagement = yes;
this.sessiontimeout = createTimeSpan(0,1,0,0);
this.scriptProtect = all;
/cfscript
  
 cffunction
 name=OnApplicationStart
 access=public
 returntype=boolean
 output=false
 hint=Fires when the application is first created.
 
 cfscript
  application.portalDSN = portal;
  application.sessions = 0;
/cfscript

 cflog file=#this.name# http://this.name# type=Information 
 text=Application #this.name# http://this.name# Started

 cfreturn true /
 /cffunction

 cffunction name=onSessionStart output=false
 cfscript
session.started = now();
session.projectID = 0;
if(cgi.SERVER_NAME CONTAINS local)
{
session.clientDSN = clientBase;
}
else
{
session.clientDSN = ListFirst(cgi.SERVER_NAME,.);
}
 /cfscript

 cfquery datasource=#application.portalDSN# name=qGetClientID
 SELECT clientID FROM clients WHERE folderName = cfqueryparam 
 cfsqltype=cf_sql_varchar value=#session.clientDSN#
 /cfquery
 cfset session.clientID = qGetClientID.clientID
  
 cflock scope=application timeout=5 type=Exclusive
cfset application.sessions = application.sessions + 1
 /cflock
/cffunction
 

-- 
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711  | Phone: 1-203-379-0773
--
Adobe Community Expert 
http://www.adobe.com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com



[flexcoders] Re: resizing a textArea to fit Text of the container.

2008-05-01 Thread Dmitri Girski
TextField has a problem calculating numLines if text contains CR/LF
symbols.


Dmitri.


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

 At measure time, it's width may not have been passed to the internal
 textfield.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Frederico Garcia
 Sent: Sunday, March 09, 2008 7:37 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: resizing a textArea to fit Text of the
 container.
 
  
 
 targetplanet escreveu:
  I thought about that, initially the width was wet to 100%, so I tried
  changing it to a fixed width of 400 and it still returned the crazy
  textHeight numbers. The only thing I can think it might be is that I
  am creating the textArea in actionscript, so it may not be initialized
  or something. 
 
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
  
  What is the width (not textWidth) of the TextArea? If it is narrow,
 it
  will affect textHeight. If you look at measurement code in Text.as or
  in ListItemRenderer.as, you'll see that we fix the width before
 getting
  textHeight.
 
  
 
  
 
  From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of targetplanet
  Sent: Wednesday, March 05, 2008 1:08 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: resizing a textArea to fit Text of the
  container.
 
  
 
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Manish Jethani
  manish.jethani@ wrote:
  
  On 2/28/08, targetplanet rsprague@ wrote:
 
  
  but it seems the textHeight can't be relied on, because it gives me
  crazy numbers that can't be right, like for 3 lines of text it says
  its 250.
  I am using htmlText, so I don't know if that matters.
  
  Do you have a lot of whitespace before and after those 3 lines of
  text? You could set 'condenseWhite' to true, that might help.
 
  Manish
 
  
  I have set condenseWhite to true, but it is still returning a
  ridiculous number: 5 lines of text it says is 510 heigh. I set
  condenseWhite to false, and it added 20 to the height, so I know the
  condenseWhite is working some what. I am calling validateNow, so that
  doesn't seem to be the issue.
 
  
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
 http://www.mail-archive.com/flexcoders%40yahoogroups.com  
  Yahoo! Groups Links
 
 
 
 
  __ NOD32 2932 (20080309) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com http://www.eset.com 
 
 
 
  
 Hi,
 
 Take a look at PrintTextArea in 
 http://code.google.com/p/flexreport/source/browse
 http://code.google.com/p/flexreport/source/browse  
 (trunk/flexreport/org/print/PrintTextArea.mxml). It's not exactly for 
 what you want (since it's pageable) but you can see how I get the text 
 metrics.
 
 Hope this helps,
 
 Frederico Garcia





[flexcoders] Re: resizing a textArea to fit Text of the container.

2008-05-01 Thread Dmitri Girski
--- In flexcoders@yahoogroups.com, Dmitri Girski [EMAIL PROTECTED] wrote:

 TextField has a problem calculating numLines if text contains CR/LF
 symbols.
 

Still, I don't know why you've got such a difference in your case.

I am using the following thing: 
override public function set text(val:String)
{
  super.text = val;
  for (var i:uint = 0; i  super.text.length; i++)
  {
   if (super.text.charAt(i) == '\r' || super.text.charAt(i) == '\n')
   {
  m_iParagraphNo++;
} 
  }
}

and then use iParagraphNo in set height() - adding the corresponding
number of extra lines.

Cheers,
Dmitri. 



RE: [flexcoders] Cairngorm - always event, always command?

2008-05-01 Thread Jim Hayes

I can't see how you'd benefit from sidestepping the cairngorm event - command 
way of working in this case.
If you use a service to get the IP address then it's asynchronous, and has a 
few possible outcomes.
I can't see why you wouldn't want to wait for it's got one of those results or 
an error event and then deal with the outcome.
Which is where the cairngorm way of doing things is really helpful.

If it's synchronous (like opening a database or prefs file in AIR, say), then 
you could maybe skip cairngorm (I do, and get away with it, mostly).
In which case I can't see the benefit of thinking of (or packaging ) it as a 
cairngorm command. I'd rather put it somewhere else and know it was a different 
thing.

But what I've found most of the time is that if you're going to do a cairngorm 
app then it's really worth going with the flow and doing pretty well everything 
that way,
even if it does mean writing 3 classes when you could get away with a local 
method.
Generally, when I've made short cuts like that it's come back and bitten me on 
the arse.
I do still do it when I'm in experimental/creative or lazy mode, but now I'll 
try to refactor it into the cairngorm way sooner rather than later.
Which is sometimes a bit boring, but there you go.

Hope that makes (at least some) sense!



-Original Message-
From: flexcoders@yahoogroups.com on behalf of chigwell23
Sent: Thu 01/05/2008 22:51
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm - always event, always command?
 
pseudocode:

creationComplete
var ipAddress:String
ipAddress = getUserIP()


function getuserIP():String{

   // use Services to go out to ColdFusion which can tell me user IP
   return IP
   }

But Cairngorm encapsulates actions into commands which are driven by
an event and a delegate. So how does it handle examples like the one
above? Should I create a getIP event, which is dispatched from
creationComplete, and use the standard command/delegate path. If the
event is not necessary, and it still makes sense to put the action
in a command, how would that command get activated without the
Cairngorm event process? I know what I mean grin. TIA,

Mic.



__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__winmail.dat

Re: [flexcoders] E4X vs Array Collection

2008-05-01 Thread Daniel Gold
It doesn't get any faster than a typed class as far as data access, but
there are some things to think about. To get the data into the typed class
you have to parse the XML at some point, so it will probably come down to
how often each property is accessed. If you're only going to hit each
property once or twice, probably not worth a typed class as far as speed
goes.

I always use typed classes for code readability, code hinting, maintenance,
etc, but some people don't like having to write a VO for each object they'll
get back from the server.

Alex Harui did a simple test of data access times using different methods a
while back:
http://blogs.adobe.com/aharui/2007/10/actionscript_readwrite_perform_1.html

On Thu, May 1, 2008 at 4:36 PM, Nate Pearson [EMAIL PROTECTED] wrote:

   What's faster, E4X or array collections with typed classes?

 I can have my data nested three levels in XML or I can have it pretty
 flat in an array collection.

 I'll be using this data with graphs, but will also be do analysis of
 the selected area on the graph.

 Thanks,

 Nate

  



Re: [flexcoders] Re: DataGrid and exporting values

2008-05-01 Thread Daniel Gold
Is the server round trip a huge problem? I have a loopback CSV servlet
that I hit quite often in our application. Most of our datagrids are
subclassed and have an Export CSV button at the bottom. Simple function to
convert all the rows to CSV and send it the server as a parameter to a
FileDownload, server responds with the data and the right MIME type and
they've got their CSV, no copy and paste or reliance on external code.

On Thu, May 1, 2008 at 2:22 PM, Dominic Pazula [EMAIL PROTECTED] wrote:

   That is a good idea.

 Actually pushing the data across didn't seem to be the problem. That
 loop is what was taking forever. I could literally watch the
 individual cells get added. A couple hundred rows took 10 seconds.
 Of course I could always be missing something...

 Thanks


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tracy
 Spratt [EMAIL PROTECTED] wrote:
 
  There was a thread sometime ago about performance problems with
 large
  data sets and ExtenalInterface.
 
 
 
  Why not skip that part. You could generate the HTML in Flex and
 put it
  on the clipboard directly using System.setClipboard(sHTML);
 
 
 
  Tracy
 
 

  



Re: [flexcoders] ListCollectionView.contains()

2008-05-01 Thread Daniel Gold
contains is an object comparison, so it is by reference except when dealing
with primitives I believe. The collection wouldn't know how you wanted to
compare your objects so you'll have to iterate and check the relevant
properties or extend a collection class, add a containsByValue, and have
your objects implement a Comparable interface of some kind.

On Thu, May 1, 2008 at 2:29 PM, Maciek Sakrejda [EMAIL PROTECTED]
wrote:

   Does ListCollectionView.contains() use reference equality to check if
 the collection contains a given object? Is there a simple way of using
 value equality (besides the obvious iteration)?
 --
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com

  



[flexcoders] Weird list item height problem.

2008-05-01 Thread Josh McDonald
Hey guys,

I googled this and can't seem to find where I'm going wrong. I've got a list
with an inline itemRenderer, with variableHeight turned on, but all
non-visible items are losing their height. What I mean is that when you
scroll down, all revealed items having standard list-item height, and when
you scroll back up, the ones that used to be alright are now also too short.
Any ideas where I'm going wrong?

Code below:

mx:List dataProvider={ tempNotes } id=existingNotes width=100%
maxHeight=400 variableRowHeight=true
mx:itemRenderer
mx:Component
mx:VBox horizontalAlign=left
horizontalScrollPolicy=off  width=100% verticalScrollPolicy=off
backgroundColor=#ee verticalGap=2
mx:Text width=100% text={data.text}
fontSize=9 fontStyle=italic/
mx:HBox horizontalGap=10
mx:Text text=From  fontSize=9/
mx:Text fontWeight=bold
text={data.userId} fontSize=9/
mx:Text text=11-11-08 fontSize=9
width=60/
/mx:HBox
/mx:VBox
/mx:Component
/mx:itemRenderer
/mx:List

Cheers,
-J

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Sort a List Comp?

2008-05-01 Thread Daniel Gold
The List is simply the view for your data. You need to sort the dataProvider
of the list so when the List is iterating over your data rendering it, it
will be accessing the data in the order specified.

I would pull the data from lastResult, store it in an ArrayCollection or
XMLListCollection(since it seems like you might be using XML), and then you
can set the Sort on the collection as specified in the docs:

http://livedocs.adobe.com/flex/3/langref/mx/collections/Sort.html

Sort also allows you to set a custom compareFunction if you need more than a
simple ascending/descending sort on the dataFields.

On Thu, May 1, 2008 at 10:53 AM, Justin Stanczak [EMAIL PROTECTED] wrote:

   I have the following:


  *   mx:HTTPService id=getMajorsVisitdates url=ServiceServlet


 mx:List id=majorsList width=342
 dataProvider={getMajorsVisitdates.lastResult.root.major}
 change=selectMajor() height=200 labelField=name x=10
 y=36/mx:List*


 How do I sort the majorsList? Seems like it should be easy, but I'm not
 totally understanding how to do it with a List. Thanks.

 --
 All that is necessary for the triumph of evil is that good men do
 nothing. - Edmund Burke
  



[flexcoders] Re: Drag and Drop question

2008-05-01 Thread Rafael Faria
That's nice that everybody is learning from my question :p

I'm hereee o/ ehheheh

someone can help me? :0

i still don't know how to get an updated tree after i move the node...

or there is any easy way to remove a node from an xml?!

thanks
rafael

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

 Ew =)
 
 All my dragdrop stuff is funky custom components so I never noticed.
But ew.
 
 -J
 
 On Fri, May 2, 2008 at 7:49 AM, Tracy Spratt [EMAIL PROTECTED] wrote:
 
 Move is the default, there is extra work to copy.
 
 
 
  http://livedocs.adobe.com/flex/3/html/dragdrop_8.html
 
  Tracy
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Josh McDonald
  *Sent:* Thursday, May 01, 2008 5:05 PM
 
  *To:* flexcoders@yahoogroups.com
  *Subject:* Re: [flexcoders] Drag and Drop question
 
 
 
  How do you mark a drag/drop operation as having a certain type (ie
Move)?
 
  -J
 
  On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt [EMAIL PROTECTED]
  wrote:
 
  Actually I am pretty sure the list-based component's built-in
drag/drop
  functionality does do this on a MOVE.  The docs describe this. 
Are the XML
  structures the same?
 
 
 
  Tracy
 
 
   --
 
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Josh McDonald
  *Sent:* Thursday, May 01, 2008 2:46 AM
  *To:* flexcoders@yahoogroups.com
  *Subject:* Re: [flexcoders] Drag and Drop question
 
 
 
  I'm fairly certain that there's no voodoo to automatically delete
nodes
  from your XML, you need to do that yourself in your drop handler.
 
  -J
 
  On Thu, May 1, 2008 at 4:36 PM, Rafael Faria [EMAIL PROTECTED]
  wrote:
 
  If i'm dragging an element from one tree to another. How do i get the
  updated xml of the tree i'm dragging off?
 
  For instance
 
  TREE 1
  - Element 1
  - Element 2
 
  TREE 2
 
  if i get the xml from tree 1 it would be something like
  root
  element label=Element 1 /
  element label=Element 2 /
  /root
 
  but if i drag the Element 1 into the TREE 2 i want to get the xml
  without the Element 1, without that node.
 
  i'm trying to get it creating a handler for dragDrop attribute on
  the Tree 2, but everytime i get it the items are not updated.
 
  Anyone know how to get the updated xml that tree 1 will have after i
  drop the element?
 
  Please... this is killing me =/
 
  Thanks
 
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
  :: Josh 'G-Funk' McDonald
 
  :: 0437 221 380 :: [EMAIL PROTECTED]
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Drag and Drop question

2008-05-01 Thread Josh McDonald
Does it disappear from the first tree (i mean visually)?

On Fri, May 2, 2008 at 9:57 AM, Rafael Faria [EMAIL PROTECTED]
wrote:

   That's nice that everybody is learning from my question :p

 I'm hereee o/ ehheheh

 someone can help me? :0

 i still don't know how to get an updated tree after i move the node...

 or there is any easy way to remove a node from an xml?!

 thanks

 rafael

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Ew =)
 
  All my dragdrop stuff is funky custom components so I never noticed.
 But ew.
 
  -J
 
  On Fri, May 2, 2008 at 7:49 AM, Tracy Spratt [EMAIL PROTECTED] wrote:
 
   Move is the default, there is extra work to copy.
  
  
  
   http://livedocs.adobe.com/flex/3/html/dragdrop_8.html
  
   Tracy
  
  
   --
  
   *From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On
   Behalf Of *Josh McDonald
   *Sent:* Thursday, May 01, 2008 5:05 PM
  
   *To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   *Subject:* Re: [flexcoders] Drag and Drop question
  
  
  
   How do you mark a drag/drop operation as having a certain type (ie
 Move)?
  
   -J
  
   On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt [EMAIL PROTECTED]
   wrote:
  
   Actually I am pretty sure the list-based component's built-in
 drag/drop
   functionality does do this on a MOVE. The docs describe this.
 Are the XML
   structures the same?
  
  
  
   Tracy
  
  
   --
  
   *From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On
   Behalf Of *Josh McDonald
   *Sent:* Thursday, May 01, 2008 2:46 AM
   *To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   *Subject:* Re: [flexcoders] Drag and Drop question
  
  
  
   I'm fairly certain that there's no voodoo to automatically delete
 nodes
   from your XML, you need to do that yourself in your drop handler.
  
   -J
  
   On Thu, May 1, 2008 at 4:36 PM, Rafael Faria [EMAIL PROTECTED]
   wrote:
  
   If i'm dragging an element from one tree to another. How do i get the
   updated xml of the tree i'm dragging off?
  
   For instance
  
   TREE 1
   - Element 1
   - Element 2
  
   TREE 2
  
   if i get the xml from tree 1 it would be something like
   root
   element label=Element 1 /
   element label=Element 2 /
   /root
  
   but if i drag the Element 1 into the TREE 2 i want to get the xml
   without the Element 1, without that node.
  
   i'm trying to get it creating a handler for dragDrop attribute on
   the Tree 2, but everytime i get it the items are not updated.
  
   Anyone know how to get the updated xml that tree 1 will have after i
   drop the element?
  
   Please... this is killing me =/
  
   Thanks
  
  
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
   :: Josh 'G-Funk' McDonald
  
   :: 0437 221 380 :: [EMAIL PROTECTED]
  
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: [EMAIL PROTECTED]
  
  
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] Re: Drag and Drop question

2008-05-01 Thread Alex Harui
The answer should be to wait for dragComplete on the source tree.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, May 01, 2008 5:08 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Drag and Drop question

 

Does it disappear from the first tree (i mean visually)?

On Fri, May 2, 2008 at 9:57 AM, Rafael Faria
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:

That's nice that everybody is learning from my question :p

I'm hereee o/ ehheheh

someone can help me? :0

i still don't know how to get an updated tree after i move the node...

or there is any easy way to remove a node from an xml?!

thanks


rafael

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Josh McDonald [EMAIL PROTECTED] wrote:


 Ew =)
 
 All my dragdrop stuff is funky custom components so I never noticed.
But ew.
 
 -J
 

 On Fri, May 2, 2008 at 7:49 AM, Tracy Spratt [EMAIL PROTECTED] wrote:
 
  Move is the default, there is extra work to copy.
 
 
 
  http://livedocs.adobe.com/flex/3/html/dragdrop_8.html
http://livedocs.adobe.com/flex/3/html/dragdrop_8.html 
 
  Tracy
 
 
  --
 
  *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] *On
  Behalf Of *Josh McDonald
  *Sent:* Thursday, May 01, 2008 5:05 PM
 
  *To:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  *Subject:* Re: [flexcoders] Drag and Drop question
 
 
 
  How do you mark a drag/drop operation as having a certain type (ie
Move)?
 
  -J
 

  On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt [EMAIL PROTECTED]


  wrote:
 
  Actually I am pretty sure the list-based component's built-in
drag/drop
  functionality does do this on a MOVE. The docs describe this. 
Are the XML
  structures the same?
 
 
 
  Tracy
 
 
  --
 
  *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] *On
  Behalf Of *Josh McDonald
  *Sent:* Thursday, May 01, 2008 2:46 AM
  *To:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  *Subject:* Re: [flexcoders] Drag and Drop question
 
 
 
  I'm fairly certain that there's no voodoo to automatically delete
nodes
  from your XML, you need to do that yourself in your drop handler.
 
  -J
 

  On Thu, May 1, 2008 at 4:36 PM, Rafael Faria
[EMAIL PROTECTED]


  wrote:
 
  If i'm dragging an element from one tree to another. How do i get
the
  updated xml of the tree i'm dragging off?
 
  For instance
 
  TREE 1
  - Element 1
  - Element 2
 
  TREE 2
 
  if i get the xml from tree 1 it would be something like
  root
  element label=Element 1 /
  element label=Element 2 /
  /root
 
  but if i drag the Element 1 into the TREE 2 i want to get the xml
  without the Element 1, without that node.
 
  i'm trying to get it creating a handler for dragDrop attribute on
  the Tree 2, but everytime i get it the items are not updated.
 
  Anyone know how to get the updated xml that tree 1 will have after i
  drop the element?
 
  Please... this is killing me =/
 
  Thanks
 
 
 
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
  :: Josh 'G-Funk' McDonald
 

  :: 0437 221 380 :: [EMAIL PROTECTED]
 
 
 
 
  --


  Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
  :: Josh 'G-Funk' McDonald

  :: 0437 221 380 :: [EMAIL PROTECTED]


 
  
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald

 :: 0437 221 380 :: [EMAIL PROTECTED]





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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



RE: [flexcoders] Weird list item height problem.

2008-05-01 Thread Alex Harui
Scour the archives.  Folks ask about using Text in a renderer often.
You always have to supply a custom measure() method that uses the
explicitWidth of the renderer to measure the Text properly.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, May 01, 2008 4:45 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Weird list item height problem.

 

Hey guys,

I googled this and can't seem to find where I'm going wrong. I've got a
list with an inline itemRenderer, with variableHeight turned on, but all
non-visible items are losing their height. What I mean is that when you
scroll down, all revealed items having standard list-item height, and
when you scroll back up, the ones that used to be alright are now also
too short. Any ideas where I'm going wrong?

Code below:

mx:List dataProvider={ tempNotes } id=existingNotes width=100%
maxHeight=400 variableRowHeight=true
mx:itemRenderer
mx:Component
mx:VBox horizontalAlign=left
horizontalScrollPolicy=off  width=100% verticalScrollPolicy=off
backgroundColor=#ee verticalGap=2
mx:Text width=100% text={data.text}
fontSize=9 fontStyle=italic/
mx:HBox horizontalGap=10
mx:Text text=From  fontSize=9/
mx:Text fontWeight=bold
text={data.userId} fontSize=9/
mx:Text text=11-11-08 fontSize=9
width=60/
/mx:HBox
/mx:VBox
/mx:Component
/mx:itemRenderer
/mx:List

Cheers,
-J

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



RE: [flexcoders] Dynamic combobox from JSON request

2008-05-01 Thread Alex Harui
Arrays don't notify when you push items onto them, so you have to use
ArrayCollection or use a temporary Array and assign it to myList

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of timgerr
Sent: Thursday, May 01, 2008 11:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic combobox from JSON request

 

Hello all, I have a Json request that I get from PHP backend. I am
learning so I have created a dynamic list for a combo box. The
problem is that when I press a button and it gets the data, I then go
to the combo box and I see 1 entry. If I then select the combo box
again I then will see all the entries. Not sure how to have all the
entries show the first time I select the combo box. Here is my code:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import com.adobe.serialization.json.JSON;

[Bindable]
public var myList:Array = new Array();

public function personJSON(event:ResultEvent):void
{
var rawData:String = String(event.result);
var person:Object = JSON.decode(rawData);
trace(person[0].item1);
trace(person.length);
var x:Number;

for(x=0;xperson.length;x++){
trace(person[x].item1);
myList.push(person[x].item1);
}
trace(myList.length);
}
public function clearArray():void
{
myList = [];
cmboOne.text = 'Choose';
}
]]
/mx:Script
mx:HTTPService id=personRequest
url=http://127.0.0.1/test/Class/InventoryRequest.php
http://127.0.0.1/test/Class/InventoryRequest.php  
useProxy=false method=GET resultFormat=text 
result=personJSON(event)
mx:request xmlns=
getPersontrue/getPerson
/mx:request
/mx:HTTPService
mx:Panel x=401 y=294 width=250 height=275 layout=absolute

mx:Button x=69 y=121 label=Get Info
click=personRequest.send() id=send_btn/
mx:Button id=aryClear click=clearArray() label=Clear x=78
y=151/
/mx:Panel
mx:ComboBox id=cmboOne dataProvider={myList} rowCount=6
x=157 y=44/

/mx:Application

Thanks,
timgerr 

 



RE: [flexcoders] Image Resampling

2008-05-01 Thread Alex Harui
Scale it, use bitmapData.draw to get the new results

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ezekiel48
Sent: Thursday, May 01, 2008 11:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Image Resampling

 

I want to create a thumbnail of a picture, but if I just resize the
picture to say, 95X95 pixels the data of the 6MP picture is still
loaded into memory so the program take up A LOT of memory. I want to
resize and/or resample the image to be of a lower resolution so the
unused data can be cleaned out of memory.

I have looked around and heard about sending an image to a server to
be resized but when I need thumbs for a TileList and sending all those
images to the server would take too long. Does anyone have any
suggestions? Thanks in advance.

 



RE: [flexcoders] -compiler.mxml.compatibility-version

2008-05-01 Thread Alex Harui
No, it just sets different code paths in Flex 3

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of VELO
Sent: Thursday, May 01, 2008 4:04 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] -compiler.mxml.compatibility-version

 

Hi,

When I use compc or mxmlc with -compiler.mxml.compatibility-version.

Can use swc libraries (e.g. framework.swc) from flex SDK 2.0.1?



VELO

 



RE: [flexcoders] execute external application in adobe air [Windows]

2008-05-01 Thread zoltan
(For Windows only) here is the first release of the Aperture framework (it
should be considered alpha-quality)
The installer comes with the framework, help and samples
 
http://www.fluorinefx.com/aperture/download/1.0.0.1/aperture.exe
 
Zoli
http://www.fluorinefx.com


  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeffry Houser
Sent: Friday, May 02, 2008 1:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] execute external application in adobe air




Officially no.

I blogged about one possible work around. 
http://www.jeffryho
http://www.jeffryhouser.com/index.cfm/2008/4/22/Using-AIR-to-launch-other-a
pplications
user.com/index.cfm/2008/4/22/Using-AIR-to-launch-other-applications 

Carlo Gulliani wrote:
 
 
 can i execute another external application through adobe air app? for 
 example, i want to run .app file, which kind as shell file. there is 
 command line stroke, which move files from location 1 to location 2, can 
 i execute it from air or, maybe, can i call terminal (i work on mac os) 
 and send to it some code, such as mv ~/Desktop/file.jpg 
 ~/Desktop/myAirProject/ ?
 

-- 
Jeffry Houser
Flex, ColdFusion, AIR
AIM: Reboog711 | Phone: 1-203-379-0773
--
Adobe Community Expert 
http://www.adobe.
http://www.adobe.com/communities/experts/members/JeffryHouser.html
com/communities/experts/members/JeffryHouser.html
My Company: http://www.dot- http://www.dot-com-it.com com-it.com
My Podcast: http://www.theflexs http://www.theflexshow.com how.com
My Blog: http://www.jeffryho http://www.jeffryhouser.com user.com



 


Re: [flexcoders] Re: BlazeDS Security Confusion

2008-05-01 Thread Robert Cadena
weird.  should just popup with an auth box.

good luck with the rest of your app.

/r

On Thu, May 1, 2008 at 1:51 PM, Jim Boone [EMAIL PROTECTED] wrote:

 Robert,

 Well that certain made it spring to life! Thank you. It now throws an
 exception back to the front end with a Client.Authentication faultCode
 and faultString = Login required before authorization can proceed.
 The developers doc imply that the browser should pop a login dialog
 box, but that isn't happening. I ultimately want to capture the
 exception and login in my Flex app anyway.

 server=JBoss must have worked at one point because I have seen
 several references on the web that use it...

 --- In flexcoders@yahoogroups.com, Robert Cadena [EMAIL PROTECTED]
 wrote:
 
  try setting server to Tomcat instead of JBoss in your
  services-config.xml  security  login command node?
 
  /r
 
  On Thu, May 1, 2008 at 12:50 PM, Jim Boone [EMAIL PROTECTED] wrote:
 
   Mete,
  
   Thank you for the response. Unfortunately, I am still having troubles.
  
   I have:
   * confirmed that the Tomcat Valve is being loaded correctly.
   * defined the TomcatLoginCommand in services-config.xml (see below).
   * secured the destination (see remoting-config.xml below).
   * configured JBoss to use a UsersRolesLoginModule and added the user
and basic_access role (same concept as adding Tomcat users and
roles).
   * not set any credentials in the Actionscript code.
   * DID NOT secure the endpoint in the web.xml since your guidance
didn't included it and therefore implies you don't need to.
  
   The results?  I was not prompted with the web browser Basic login
   prompt and the destination was not secured. I could contact the
   destination even though I was not authenticated. It didn't work!
   A. Any other thoughts?
  
   Jim
  
   === services-config.xml ===
   ?xml version=1.0 encoding=UTF-8?
   services-config
  
  services
  service-include file-path=remoting-config.xml /
  service-include file-path=messaging-config.xml /
  /services
  
  factories
  factory id=ejb
 class=com.adobe.ac.ejb.EJB3Factory /
  /factories
  
  security
  login-command
   class=flex.messaging.security.TomcatLoginCommand server=JBoss/
  
  security-constraint id=basic-access
   auth-methodBasic/auth-method
   roles
  rolebasic_access/role
  /roles
  /security-constraint
  /security
  
   === remoting-config.xml ===
   ?xml version=1.0 encoding=UTF-8?
   service id=remoting-service
  class=flex.messaging.services.RemotingService
  
  adapters
  adapter-definition id=java-object
  
class=flex.messaging.services.remoting.adapters.JavaAdapter
  default=true /
  /adapters
  
  default-channels
  channel ref=polling-channel /
  /default-channels
  
  destination id=DataGenerator
  properties
  factoryejb/factory
  sourcedashboard/DataGeneratorBean/source
  /properties
  security
  security-constraint id=basic-access/
  /security
  /destination
  
   /service
  
   --- In flexcoders@yahoogroups.com, meteatamel meteatamel@ wrote:
   
Hi Jim,
   
The short answer is that TomcatLoginCommand uses Tomcat valve to do
its authentication/authorization but here's a writeup I have on
BlazeDS security that should clarify things.
   
-Mete
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
   Links
  
  
  
  
 



 

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






[flexcoders] Re: Drag and Drop question

2008-05-01 Thread Rafael Faria
Yes it does...

I found a solution. I used callLater and apparently it works now.

I couldn't understand callLater before but it is a function that it's
saving my life a lot lately! :P


Now the question i have is there is anyway to get the XML from the
tree without getting from the dataprovider? i'm getting
tree.dataProvider and for some things it works fine... but i'm
wondering if there is any other way to do that.

someone?!
raf


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

 Does it disappear from the first tree (i mean visually)?
 
 On Fri, May 2, 2008 at 9:57 AM, Rafael Faria [EMAIL PROTECTED]
 wrote:
 
That's nice that everybody is learning from my question :p
 
  I'm hereee o/ ehheheh
 
  someone can help me? :0
 
  i still don't know how to get an updated tree after i move the node...
 
  or there is any easy way to remove a node from an xml?!
 
  thanks
 
  rafael
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   Ew =)
  
   All my dragdrop stuff is funky custom components so I never noticed.
  But ew.
  
   -J
  
   On Fri, May 2, 2008 at 7:49 AM, Tracy Spratt tspratt@ wrote:
  
Move is the default, there is extra work to copy.
   
   
   
http://livedocs.adobe.com/flex/3/html/dragdrop_8.html
   
Tracy
   
   
--
   
*From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On
Behalf Of *Josh McDonald
*Sent:* Thursday, May 01, 2008 5:05 PM
   
*To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
*Subject:* Re: [flexcoders] Drag and Drop question
   
   
   
How do you mark a drag/drop operation as having a certain type (ie
  Move)?
   
-J
   
On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt tspratt@
wrote:
   
Actually I am pretty sure the list-based component's built-in
  drag/drop
functionality does do this on a MOVE. The docs describe this.
  Are the XML
structures the same?
   
   
   
Tracy
   
   
--
   
*From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On
Behalf Of *Josh McDonald
*Sent:* Thursday, May 01, 2008 2:46 AM
*To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
*Subject:* Re: [flexcoders] Drag and Drop question
   
   
   
I'm fairly certain that there's no voodoo to automatically delete
  nodes
from your XML, you need to do that yourself in your drop handler.
   
-J
   
On Thu, May 1, 2008 at 4:36 PM, Rafael Faria rafaelfaria.grupos@
wrote:
   
If i'm dragging an element from one tree to another. How do i
get the
updated xml of the tree i'm dragging off?
   
For instance
   
TREE 1
- Element 1
- Element 2
   
TREE 2
   
if i get the xml from tree 1 it would be something like
root
element label=Element 1 /
element label=Element 2 /
/root
   
but if i drag the Element 1 into the TREE 2 i want to get the xml
without the Element 1, without that node.
   
i'm trying to get it creating a handler for dragDrop
attribute on
the Tree 2, but everytime i get it the items are not updated.
   
Anyone know how to get the updated xml that tree 1 will have
after i
drop the element?
   
Please... this is killing me =/
   
Thanks
   
   
   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
   
:: Josh 'G-Funk' McDonald
   
:: 0437 221 380 :: josh@
   
   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
   
  
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
   
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





RE: [flexcoders] Re: Drag and Drop question

2008-05-01 Thread Alex Harui
You still should be able to use dragComplete instead.

 

The dataProvider wraps the XML and is the only good way to get it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rafael Faria
Sent: Thursday, May 01, 2008 7:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Drag and Drop question

 

Yes it does...

I found a solution. I used callLater and apparently it works now.

I couldn't understand callLater before but it is a function that it's
saving my life a lot lately! :P

Now the question i have is there is anyway to get the XML from the
tree without getting from the dataprovider? i'm getting
tree.dataProvider and for some things it works fine... but i'm
wondering if there is any other way to do that.

someone?!
raf

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Josh McDonald [EMAIL PROTECTED] wrote:

 Does it disappear from the first tree (i mean visually)?
 
 On Fri, May 2, 2008 at 9:57 AM, Rafael Faria [EMAIL PROTECTED]
 wrote:
 
  That's nice that everybody is learning from my question :p
 
  I'm hereee o/ ehheheh
 
  someone can help me? :0
 
  i still don't know how to get an updated tree after i move the
node...
 
  or there is any easy way to remove a node from an xml?!
 
  thanks
 
  rafael
 
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com,
Josh
  McDonald dznuts@ wrote:
  
   Ew =)
  
   All my dragdrop stuff is funky custom components so I never
noticed.
  But ew.
  
   -J
  
   On Fri, May 2, 2008 at 7:49 AM, Tracy Spratt tspratt@ wrote:
  
Move is the default, there is extra work to copy.
   
   
   
http://livedocs.adobe.com/flex/3/html/dragdrop_8.html
http://livedocs.adobe.com/flex/3/html/dragdrop_8.html 
   
Tracy
   
   
--
   
*From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com]
*On
Behalf Of *Josh McDonald
*Sent:* Thursday, May 01, 2008 5:05 PM
   
*To:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com
*Subject:* Re: [flexcoders] Drag and Drop question
   
   
   
How do you mark a drag/drop operation as having a certain type
(ie
  Move)?
   
-J
   
On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt tspratt@
wrote:
   
Actually I am pretty sure the list-based component's built-in
  drag/drop
functionality does do this on a MOVE. The docs describe this.
  Are the XML
structures the same?
   
   
   
Tracy
   
   
--
   
*From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com]
*On
Behalf Of *Josh McDonald
*Sent:* Thursday, May 01, 2008 2:46 AM
*To:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  flexcoders%40yahoogroups.com
*Subject:* Re: [flexcoders] Drag and Drop question
   
   
   
I'm fairly certain that there's no voodoo to automatically
delete
  nodes
from your XML, you need to do that yourself in your drop
handler.
   
-J
   
On Thu, May 1, 2008 at 4:36 PM, Rafael Faria
rafaelfaria.grupos@
wrote:
   
If i'm dragging an element from one tree to another. How do i
get the
updated xml of the tree i'm dragging off?
   
For instance
   
TREE 1
- Element 1
- Element 2
   
TREE 2
   
if i get the xml from tree 1 it would be something like
root
element label=Element 1 /
element label=Element 2 /
/root
   
but if i drag the Element 1 into the TREE 2 i want to get the
xml
without the Element 1, without that node.
   
i'm trying to get it creating a handler for dragDrop
attribute on
the Tree 2, but everytime i get it the items are not updated.
   
Anyone know how to get the updated xml that tree 1 will have
after i
drop the element?
   
Please... this is killing me =/
   
Thanks
   
   
   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls
for
  thee.
   
:: Josh 'G-Funk' McDonald
   
:: 0437 221 380 :: josh@
   
   
   
   
--
Therefore, send not to know For whom the bell tolls. It tolls
for
  thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
   
  
  
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
  
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]


 



Re: [flexcoders] Weird list item height problem.

2008-05-01 Thread Josh McDonald
Thanks for that, I eventually found what I needed:

http://flexnaut.blogspot.com/2007/11/adding-mxcontrolstext-component-to.html

-J

On Fri, May 2, 2008 at 10:18 AM, Alex Harui [EMAIL PROTECTED] wrote:

Scour the archives.  Folks ask about using Text in a renderer often.
  You always have to supply a custom measure() method that uses the
 explicitWidth of the renderer to measure the Text properly.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, May 01, 2008 4:45 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Weird list item height problem.



 Hey guys,

 I googled this and can't seem to find where I'm going wrong. I've got a
 list with an inline itemRenderer, with variableHeight turned on, but all
 non-visible items are losing their height. What I mean is that when you
 scroll down, all revealed items having standard list-item height, and when
 you scroll back up, the ones that used to be alright are now also too short.
 Any ideas where I'm going wrong?

 Code below:

 mx:List dataProvider={ tempNotes } id=existingNotes width=100%
 maxHeight=400 variableRowHeight=true
 mx:itemRenderer
 mx:Component
 mx:VBox horizontalAlign=left
 horizontalScrollPolicy=off  width=100% verticalScrollPolicy=off
 backgroundColor=#ee verticalGap=2
 mx:Text width=100% text={data.text}
 fontSize=9 fontStyle=italic/
 mx:HBox horizontalGap=10
 mx:Text text=From  fontSize=9/
 mx:Text fontWeight=bold
 text={data.userId} fontSize=9/
 mx:Text text=11-11-08 fontSize=9
 width=60/
 /mx:HBox
 /mx:VBox
 /mx:Component
 /mx:itemRenderer
 /mx:List

 Cheers,
 -J

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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
   




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: Extending Alert

2008-05-01 Thread Daniel Gold
This peaked my interested and I quickly flipped through the Alert class to
see what was going on. Nothing really caught my attention so it seems like
this is enforced by the MXML compiler. I verified this by adding an Alert in
AS without using the static show funciton. In a simple test application I
added a button that called this:

var alert:Alert = new Alert();
addChild(alert);

An empty Alert window was added to the application. Seems kind of bizarre
the way this component works. Are there any other cases of flex components
extending UIComponent that aren't allowed to be instantiated through MXML?

One thing you could do is follow their pattern of having a class with a
static show() function. If you don't mind building the entire component in
ActionScript that function could create a TitleWindow/Panel, apply the
styles, add the children you want, and add the container to the application
or specified parent. As long as the class doing this isn't a UIComponent
itself, noone will be able to add it to a container in MXML.

On Thu, May 1, 2008 at 10:08 AM, climbfar [EMAIL PROTECTED] wrote:

   I believe this is a restriction brought on by the Adobe developers.
 You cannot do this in MXML:

 mx:Panel id=panel
 mx:Alert
 /mx:Alert
 /mx:Panel

 If you try to compile, you will get this message:

 Could not resolve mx:Alert to a component implementation.

 To instantiate an Alert in MXML the proper coding would be:
 mx:Panel id=panel
 mx:Button click=mx.controls.Alert.show('hello')/
 /mx:Panel

 Basically I would like to create a similar component that would be
 used for configuring some task modally and presumably extending it
 off the Alert or TitleWindow component.

 G'day Mike

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Maciek
 Sakrejda [EMAIL PROTECTED]
 wrote:

 
  Why do you need to prevent usage through MXML? MXML is compiled
 down to
  ActionScript, so it's essentially just syntactic sugar. That is, by
  preventing using your components through MXML, you are just
 removing a
  convenient interface, and not restricting functionality.
  --
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso.com
 
  -Original Message-
  From: climbfar [EMAIL PROTECTED]
  Reply-To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: [flexcoders] Extending Alert
  Date: Thu, 01 May 2008 14:18:55 -
 
  How do I extend the Alert class such that the new class cannot be
  created using MXML tags? Taking it a step further is it possible to
  create an ActionScript class extended from Panel that cannot be
  constructed using MXML tags?
 
  G'day Mike
 

  



[flexcoders] Switching between RTMP and HTTP

2008-05-01 Thread Shailesh Mangal
We are using RTMP as our main protocol and HTTP as a fall back. I have bunch of 
questions.

1. We observed that when RTMP fails, DataService in client automatically falls 
back to HTTP. 
But when RTMP comes back, it doesn't reconnects and continues with HTTP. Is 
there an API to 
do this (other then client attempting to connect periodically)

2. How does RTMP fall back on to RTMPT (Tunnel). Is there any configuration for 
this?

3. DataServiceTransaction doesn't seem to work in case of HTTP mode. Is there 
any work 
around to push data from server to client in case RTMP is not available.

4. When RTMP becomes unavailable, does message subscriber and publisher have  
to re-
connect to server?

Has anybody experienced these issues? WIll appreciate any quick help.

-Shailesh





[flexcoders] Re: Drag and Drop question

2008-05-01 Thread Rafael Faria
The thing is ... if the dataprovider is blank and i drop some element
there, i'm not able to retrieve it.

For instance i create a tree 1 and i set the dataprovider
root
 element label=test 1 /
 element label=test 2 /
/root

and create a second tree without any dataprovider.

At the moment i drop an element to the second tree i even though it
show the element there the dataprovider is blank.

can you explain this?

or how do i get what is there? 

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

 You still should be able to use dragComplete instead.
 
  
 
 The dataProvider wraps the XML and is the only good way to get it.
 
  
 



[flexcoders] How can i refresh the mx:XML runtime.

2008-05-01 Thread Swamy Nathan
Hi Folks,

I am working with the Dragndrop app. When i finished the dragndrop images to
the canvas, i saved into the xml file. and also load into the canvas.

My problem is when i edit the saved xml file at runtime after i saved. but i
open to load the same file after i saving the file.

this time the file not yet updated. loading the old file only. but am
checking to open the xml file manually. it is updated the latest nodes.

How can i refresh the xml file at runtime. please any one reply me...

-- 
Thanks  Regards
Swaminathan. M


[flexcoders] Re: How can i refresh the mx:XML runtime.

2008-05-01 Thread Swamy Nathan
Am using to load the xml file via URLLoader();
-- 
Thanks  Regards
Swaminathan. M


RE: [flexcoders] itemFocusOut for dataGid ItemRenderer

2008-05-01 Thread jitendra jain
Its an Datagrid itemFocusOut Event

See what iam doing is.


public function handleRendererFocusOut(event: DataGridEvent):void{
 if(event.reason == DataGridEventReason.CANCELLED || 
event.reason == DataGridEventReason.OTHER){
 return; 
 }
   var numValidator : NumberValidator = new NumberValidator()
var validationResult : ValidationResultEvent;

validationResult=numValidator.validate(array.getItemAt(event.rowIndex).num);
if(validationResult.type == ValidationResultEvent.INVALID){
event.preventDefault();
Alert.show(Enter the numeric value);



}

Alex Harui [EMAIL PROTECTED] wrote:   
  You may need to call preventDefault() if you are handling itemEditEnd.
   
  
-
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
jitendra jain
 Sent: Wednesday, April 30, 2008 10:05 PM
 To: flex group flex
 Subject: [flexcoders] itemFocusOut for dataGid ItemRenderer
  
   
Hi ,
 
I have a datagrid with some item renderers. I want to write a function that 
will validate a number when the item lost its focus. But it seems that the item 
calls the destroyItemEditor() which throws an error #1009. And this function is 
called twice.
 
 Thanks,
 
 with regards,
 JJain
 
 
 Thanks,
 
 with Regards,
 Jitendra Jain
 Software Engineer
 91-9979960798


-
  
  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
  
  
 


 
   


Thanks,

with Regards,
Jitendra Jain
Software Engineer
91-9979960798
   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

[flexcoders] Re: Drag and Drop question

2008-05-01 Thread Rafael Faria
So here is a example to what i'm talking about.

someone can tell me why:

1 - First test
on this example if i drag an item from a branch(NOT the WHOLE BRANCH)
from tree1 and drop to tree2, and than click on get elements from
tree 2 button. it shows nothing... and if you keep adding elements it
will show commas. 

How could i get the elements in the first place, and why it is showing
the commas (apparently is behaving as an ArrayColletion but why?
although this is not what i need to get... i need to get the elements).

2 - Second test
If i drop the 2 branches that sits on the tree 1 and click to see what
dataprovider is on tree2, it show the elements but in between the commas.

i'm not sure what to do =/

someone help... what i need is to be able to drop fomr tree1 to tree2
and get an xml from tree2 with exactly the same structure that shows
the elemnets. is this possible?




?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 

mx:Script
![CDATA[
import mx.controls.Alert;

]]
/mx:Script
 mx:XML id=capitals
root
Capitals label=U.S. State Capitals
capital label=AL value=Montgomery/
capital label=AK value=Juneau/
capital label=AR value=Little Rock/
capital label=AZ value=Phoenix/   
/Capitals
Capitals label=Canadian Province Capitals
capital label=AB value=Edmonton/
capital label=BC value=Victoria/
capital label=MB value=Winnipeg/
capital label=NB value=Fredericton/
/Capitals
/root
/mx:XML

mx:HBox

mx:Tree id=tree1 dataProvider={capitals} showRoot=false
labelField=@label dragEnabled=true dropEnabled=true /
mx:Tree id=tree2 showRoot=false labelField=@label
dropEnabled=true dragEnabled=true /
/mx:HBox

mx:Button click=Alert.show(tree1.dataProvider.toString())
label=Get Dataprovider tree 1 /
mx:Button click=Alert.show(tree2.dataProvider.toString())
label=Get Dataprovider tree 2 /

/mx:Application






[flexcoders] Re: How can i refresh the mx:XML runtime.

2008-05-01 Thread Rafael Faria
hi Swamy,

i'm not sure if i got that right, but you can try to use callLater
functin.

callLater(function():void { functionyouload() });

or set the dataprovider with the xml you load again.

like i said, it's not clear what you want, but i think that one of
those solution might work.

good lucky :p
raf


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

 Hi Folks,
 
 I am working with the Dragndrop app. When i finished the dragndrop
images to
 the canvas, i saved into the xml file. and also load into the canvas.
 
 My problem is when i edit the saved xml file at runtime after i
saved. but i
 open to load the same file after i saving the file.
 
 this time the file not yet updated. loading the old file only. but am
 checking to open the xml file manually. it is updated the latest nodes.
 
 How can i refresh the xml file at runtime. please any one reply me...
 
 -- 
 Thanks  Regards
 Swaminathan. M





[flexcoders] Re: How can i refresh the mx:XML runtime.

2008-05-01 Thread Tim Hoff

So, the data is saved to the file, but the tree's dataProvider isn't
getting updated with the saved data.  URLLoader is a type of HTTP
service.  If you want to refresh the data that persists in the client,
you will probably want to make an aditional request for the data, after
each transaction has been performed to the file.  You say that you are
loading to the canvas; but that may be where the flow is stopping.   You
are probably making the initial request on creationComplete; or some
other component event.  Are you making an additional request for the
data after you update the file?  Also, are you binding the result data
of load request to the dataprovider of the tree?  Casting works real
well here.  If so, the display will automatically refresh when the
dataProvider is refreshed.

-TH

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

 Hi Folks,

 I am working with the Dragndrop app. When i finished the dragndrop
images to
 the canvas, i saved into the xml file. and also load into the canvas.

 My problem is when i edit the saved xml file at runtime after i saved.
but i
 open to load the same file after i saving the file.

 this time the file not yet updated. loading the old file only. but am
 checking to open the xml file manually. it is updated the latest
nodes.

 How can i refresh the xml file at runtime. please any one reply me...

 --
 Thanks  Regards
 Swaminathan. M






[flexcoders] ComboBox binding

2008-05-01 Thread Richard Rodseth
ComboBox binding is driving me crazy.

[Bindable]
public var selectedGranularity:String;


mx:ComboBox id=granularityCombo dataProvider={source}
selectedIndex={findSelectedIndex(this.selectedGranularity)}
labelFunction=labelFunction /

If I set a breakpoint on selectedGranularity, it's setter is reached,
but the findSelectedIndex function does not trigger. Any obvious
mistakes?


  1   2   >