[flexcoders] Installing Apollo extensions to Eclipse

2007-05-22 Thread tobiaspatton
Hello list;

I am using the Flex 2 plugins for Eclipse *not* the stand-alone Flex Builder.

I'm trying to install the Apollo Extenions for Flex Builder. This website:

http://labs.adobe.com/wiki/index.php/
Apollo:Documentation:Set_up_instructions_for_Flex_Builder_users

says 

The extensions work with both the stand-alone and the plug-in configurations

but I can't get it to work.

The fourth step of the Extensions installer (Confirm Flex Builder Folder) 
wants me to 
select a folder containing subfolders named Flex SDK 2 and Player. I know 
these folders 
are present in the standalone FlexBuilder, but they're nowhere to be found in 
the plug-in 
version.

Any advice?

Thanks.
Tobias.



[flexcoders] KeyCode and CharCode in KeyboardEvent on Macintosh

2007-01-24 Thread tobiaspatton
Hi all;

I'm trying to trap the ctrl-a keypress to do a select all operation.
On Windows (running Firefox or IE) in my event handler I look for
ctrlKey == true and charCode == 0x61. Strangely, on the Mac (running
Safari -- I haven't tested Firefox), hitting cmd-a yields an event
with ctrlKey == true and charCode == 0x01.

Why the difference?

Thanks,
Tobias.



[flexcoders] Scroll wheel doesn't work on Mac

2007-01-16 Thread tobiaspatton
Hello list;

Has anyone else noticed that the mouse scroll wheel does not scroll
lists on Mac OS X? I've tried in Safari and Firefox.

Thanks.
Tobias.



[flexcoders] Unable to resolve class for ResourceBundle

2006-12-21 Thread tobiaspatton
Hello list;

I am getting the error Unable to resolve class for ResourceBundle in
my project every time FlexBuilder does an automatic build, or when I
chose Build Project if automatic builds are disabled. The only way to
get the build to succeed is to chose Project-Clean. This works every
time.

I've tried using the compiler option -incremental=false, but it has no
effect.

I've created a very simple project that illustrates the problem.

Localization.mxml

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

MyCanvas.mxml:

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=400
height=300
 mx:Label text=@Resource( bundle='strings', key='Hello' )/
/mx:Canvas

../locale/en_US/Strings.properties:

Hello=Hello World

(the locale directory is in the parent directory of the project to
avoid the overlapping class-path warning.)

In the project's settings I have added a source path that points to
the ../locale/en_US directory.

To see the problem, do a clean and then make a change in
Localization.mxml. Save the file and let FlexBuilder do an automatic
build. You should see the unable to resolve class for ResourceBundle:
strings_properties error.

Any ideas?

Thanks.
Tobias.




[flexcoders] Embedding XML document in Actionscript

2006-12-12 Thread tobiaspatton
Hello list;

I can't do this in MXML:

mx:XML id=summary source=Data/summary.xml/

But I can't do this in ActionScript

[Embed( 'Data/Summary.xml' )]
private var summary : XML

(I get this compiler error: Embed only supported with variables of 
type Class or String. )

Any workarounds?



[flexcoders] Re: Embedding XML document in Actionscript

2006-12-12 Thread tobiaspatton
Thanks Roger;

I figured that out through some sneaky use of the debugger. 

Tobias.

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

 You always need to embed onto a variable of type class or string.  
Using
 [Embed] on XML is actually an undocumented trick, I believe, but it
 works something like this:
  
 [Embed('Data/Summary.xml')]
 private var summaryClass:Class;
  
 If I remember correctly, it creates a class with a (static?) data
 member of type XML.
  
 -rg
  
 
 
 
 
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton
   Sent: Tuesday, December 12, 2006 1:55 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Embedding XML document in Actionscript
   
   
 
   Hello list;
   
   I can't do this in MXML:
   
   mx:XML id=summary source=Data/summary.xml/
   
   But I can't do this in ActionScript
   
   [Embed( 'Data/Summary.xml' )]
   private var summary : XML
   
   (I get this compiler error: Embed only supported with 
variables
 of 
   type Class or String. )
   
   Any workarounds?





[flexcoders] XML.child() and namespaces

2006-12-11 Thread tobiaspatton

Hello list;

My tests have shown that the child() method on an XML document returns
children in the anonymous namespace, even if a namespace is specified in
the argument to child(). Can anyone confirm that this behavior is
correct? It seems wrong to me.

 var x : XML =
 ns:x xmlns:ns=foo.bar.com
  ns:foo/
  ns:foo/
  ns:foo/
 /ns:x;

 var x2 : XML =
 x
  foo/
  foo/
  foo/
 /x;

 var n  : QName = new QName( foo.bar.com, foo );
 var n2  : QName = new QName( bim.bam.com, foo );

 trace( x.child( n ).length() );  // output - 3
 trace( x.child( n2 ).length() ); // output - 0
 trace( x2.child( n ).length() ); // output - 3
 trace( x2.child( n2 ).length() ); // output - 3




[flexcoders] Re: crossdomain file and ports

2006-11-24 Thread tobiaspatton

According to this:

(http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/w\
whelp.htm?ontext=LiveDocs_Partsfile=1950.html
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/w\
whelp.htm?ontext=LiveDocs_Partsfile=1950.html )


A policy file affects access only to the particular server on which it
resides. For example, a policy file located at
https://www.adobe.com:8080/crossdomain.xml
https://www.adobe.com:8080/crossdomain.xml  will apply only to
data-loading calls made to www.adobe.com http://www.adobe.com  over
HTTPS at port 8080.


I can't do what I want to do. That is, I can't deliver a policy file on
port 80, that affects access on port 9998.

I resorted to extending the Python XML-RPC server to support the GET
method in that particular case where the requested path is
/crossdomain.xml.

Thanks for your help.
Tobias


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

 If a 501 is returned, then the flash player is able to make the call.
 The problem is that it issued a GET and your server is telling you
that
 GET is not supported. You likely need to post the request.


 Carson

 

 Carson Hager
 Cynergy Systems, Inc.
 http://www.cynergysystems.com http://www.cynergysystems.com/

 Email: [EMAIL PROTECTED]
 Office: 866-CYNERGY
 Mobile: 1.703.489.6466



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of tobiaspatton
 Sent: Thursday, November 23, 2006 9:22 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: crossdomain file and ports



 That's what I thought, but it's not working.

 I have this crossdomain.xml file on the XML-RPC server, being
delivered
 by IIS on port 80:

 ?xml version=1.0?
 cross-domain-policy
 allow-access-from domain=* to-ports=*/
 /cross-domain-policy

 In the creationComplete handler for my main application, have this:

 Security.loadPolicyFile( http://cscperf1.creo.com:80/crossdomain.xml
 http://cscperf1.creo.com:80/crossdomain.xml  );

 Even with all this in place, I still get the following runtime error:

 *** Security Sandbox Violation ***
 Connection to http://cscperf1.creo.com:9998/RPC2
 http://cscperf1.creo.com:9998/RPC2 halted - not permitted from
 http://
 adp.creo.com/PerforceBuildClient/BuildClient-debug.swf

 (adp.creo.com is the server that is hosting the swf file)

 By using tcpflow to capture the TCP packets being sent to and from my
 client, I can see
 that when the application starts up, the crossdomain.xml file is being
 requested by
 localhost from cscperf1.creo.com/crossdomain.xml on port 80. The file
is
 delivered to
 localhost. Then, when I first do something in the UI that makes an
 XML-RPC call using port
 9998, localhost again requests the crossdomain.xml file from
 cscsperf1.creo.com, but this
 time the request is made to port 9998. This results in an error 501
 being returned.

 Any suggestion are welcome.

 Thanks.
 Tobias.

 Here's the tcpflow output:

 010.001.065.086.61869-010.001.066.013.00080: GET /crossdomain.xml
 HTTP/1.1
 Accept: */*
 Accept-Language: en
 Accept-Encoding: gzip, deflate
 Cookie: SITESERVER=ID=206230141e3ce3607abc5ad08e8e9cd3;
 ASPSESSIONIDSSBCSDTS=GBCHHDHCMCJGGMOMHMHACHED
 Referer:

http://adp.creo.com/PerforceBuildClient/BuildClient-debug.html?debug=tru
 e

http://adp.creo.com/PerforceBuildClient/BuildClient-debug.html?debug=tr
 ue
 User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
 AppleWebKit/418.9 (KHTML,
 like Gecko) Safari/419.3
 Connection: keep-alive
 Host: cscperf1.creo.com:80

 010.001.066.013.00080-010.001.065.086.61869: HTTP/1.1 200 OK
 Content-Length: 118
 Content-Type: text/xml
 Last-Modified: Thu, 23 Nov 2006 16:42:04 GMT
 Accept-Ranges: bytes
 ETag: e9aa64e1efc71:29f
 Server: Microsoft-IIS/6.0
 X-Powered-By: ASP.NET
 Date: Thu, 23 Nov 2006 17:15:37 GMT

 ?xml version=1.0?

 cross-domain-policy
 allow-access-from domain=* to-ports=*/
 /cross-domain-policy

 010.001.065.086.61870-010.001.066.013.09998: GET /crossdomain.xml
 HTTP/1.1
 Accept: */*
 Accept-Language: en
 Accept-Encoding: gzip, deflate
 Cookie: SITESERVER=ID=206230141e3ce3607abc5ad08e8e9cd3;
 ASPSESSIONIDSSBCSDTS=GBCHHDHCMCJGGMOMHMHACHED
 Referer:

http://adp.creo.com/PerforceBuildClient/BuildClient-debug.html?debug=tru
 e

http://adp.creo.com/PerforceBuildClient/BuildClient-debug.html?debug=tr
 ue
 User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
 AppleWebKit/418.9 (KHTML,
 like Gecko) Safari/419.3
 Connection: keep-alive
 Host: cscperf1.creo.com:9998

 010.001.066.013.09998-010.001.065.086.61870: HTTP/1.0 501 Unsupported
 method
 ('GET')

 010.001.066.013.09998-010.001.065.086.61870: Server: BaseHTTP/0.3
 Python/2.4.2
 Date: Thu, 23 Nov 2006 17:15:49 GMT
 Content-Type: text/html
 Connection: close

 head
 titleError response/title
 /head
 body
 h1Error response/h1
 pError code 501.
 pMessage: Unsupported method ('GET').
 pError code explanation: 501 = Server

[flexcoders] Re: crossdomain file and ports

2006-11-23 Thread tobiaspatton
That's what I thought, but it's not working.

I have this crossdomain.xml file on the XML-RPC server, being delivered by IIS 
on port 80:

?xml version=1.0?
cross-domain-policy
allow-access-from domain=* to-ports=*/
/cross-domain-policy

In the creationComplete handler for my main application, have this:

Security.loadPolicyFile( http://cscperf1.creo.com:80/crossdomain.xml; );

Even with all this in place, I still get the following runtime error:

*** Security Sandbox Violation ***
Connection to http://cscperf1.creo.com:9998/RPC2 halted - not permitted from 
http://
adp.creo.com/PerforceBuildClient/BuildClient-debug.swf

(adp.creo.com is the server that is hosting the swf file)

By using tcpflow to capture the TCP packets being sent to and from my client, I 
can see 
that when the application starts up, the crossdomain.xml file is being 
requested by 
localhost from cscperf1.creo.com/crossdomain.xml on port 80. The file is 
delivered to 
localhost. Then, when I first do something in the UI that makes an XML-RPC call 
using port 
9998, localhost again requests the crossdomain.xml file from 
cscsperf1.creo.com, but this 
time the request is made to port 9998. This results in an error 501 being 
returned.

Any suggestion are welcome.

Thanks.
Tobias.

Here's the tcpflow output:

010.001.065.086.61869-010.001.066.013.00080: GET /crossdomain.xml HTTP/1.1
Accept: */*
Accept-Language: en
Accept-Encoding: gzip, deflate
Cookie: SITESERVER=ID=206230141e3ce3607abc5ad08e8e9cd3; 
ASPSESSIONIDSSBCSDTS=GBCHHDHCMCJGGMOMHMHACHED
Referer: 
http://adp.creo.com/PerforceBuildClient/BuildClient-debug.html?debug=true
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.9 
(KHTML, 
like Gecko) Safari/419.3
Connection: keep-alive
Host: cscperf1.creo.com:80


010.001.066.013.00080-010.001.065.086.61869: HTTP/1.1 200 OK
Content-Length: 118
Content-Type: text/xml
Last-Modified: Thu, 23 Nov 2006 16:42:04 GMT
Accept-Ranges: bytes
ETag: e9aa64e1efc71:29f
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Thu, 23 Nov 2006 17:15:37 GMT

?xml version=1.0?

cross-domain-policy
allow-access-from domain=* to-ports=*/
/cross-domain-policy

010.001.065.086.61870-010.001.066.013.09998: GET /crossdomain.xml HTTP/1.1
Accept: */*
Accept-Language: en
Accept-Encoding: gzip, deflate
Cookie: SITESERVER=ID=206230141e3ce3607abc5ad08e8e9cd3; 
ASPSESSIONIDSSBCSDTS=GBCHHDHCMCJGGMOMHMHACHED
Referer: 
http://adp.creo.com/PerforceBuildClient/BuildClient-debug.html?debug=true
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.9 
(KHTML, 
like Gecko) Safari/419.3
Connection: keep-alive
Host: cscperf1.creo.com:9998


010.001.066.013.09998-010.001.065.086.61870: HTTP/1.0 501 Unsupported method 
('GET')

010.001.066.013.09998-010.001.065.086.61870: Server: BaseHTTP/0.3 Python/2.4.2
Date: Thu, 23 Nov 2006 17:15:49 GMT
Content-Type: text/html
Connection: close

head
titleError response/title
/head
body
h1Error response/h1
pError code 501.
pMessage: Unsupported method ('GET').
pError code explanation: 501 = Server does not support this operation.
/body


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

 Yes, you can.
  
 
 Carson
 
  
 Carson Hager
 Cynergy Systems, Inc.
 http://www.cynergysystems.com http://www.cynergysystems.com/ 
  
 Email:  [EMAIL PROTECTED]
 Office:  866-CYNERGY
 Mobile: 1.703.489.6466
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of tobiaspatton
 Sent: Wednesday, November 22, 2006 5:05 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] crossdomain file and ports
 
 
 
 Hello list;
 
 Here's my problem. I have written a Flex application that communicates 
 with an XML-RPC server on port 9998. I want to host the SWF file on a 
 different server, and serve it on port 80. The XML-RPC server does not 
 support the HTTP GET method, so I cannot deliver a crossdomain.xml 
 file on port 9998. However, there is a web server on the machine 
 hosting the XML-RPC server, so it can serve the crossdomain.xml file 
 on port 80.
 
 My question is this: if server A provides a crossdomain.xml file on 
 port 80, does that extend permission for an SWF file to connect on 
 port 9998? I.e. can I call Security.loadPolicy
 ( http://server:80/crossdomain.xml http://server:80/crossdomain.xml 
 ) and expect my HTTPService that 
 uses http://server:9998/RPC2 http://server:9998/RPC2  to work?
 
 Thanks.
 Tobias.






[flexcoders] BindingWatcher and XML

2006-11-07 Thread tobiaspatton
Hello list;

Is there way to use the BindingWatcher class to detect changes to 
nodes in an XML object? So far, I've not been able to get this to 
work.

I've looked at the compiler-generated code that implements this sort 
of binding for MXML files, but it uses classes like XMLWatcher that 
are in the mx:internal namespace. I understand that developers are 
not meant to use these classes.

Thanks.
Tobias.

Here's the code I'm using for my tests:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=vertical
creationComplete=OnCreationComplete()

mx:Script
![CDATA[
import mx.binding.utils.ChangeWatcher;

private function OnCreationComplete() : void
{
_watcher = ChangeWatcher.watch( 
this, [ x1, leaf[ 0 ] ], OnChange );
trace( _watcher.isWatching() );
}

private  function OnChange( change : 
Object ) : void
{
trace( Change );
}

private var _watcher : ChangeWatcher;
]]
/mx:Script

mx:HBox
mx:Label id=l1 text={x1.leaf[ 0 ]}/
mx:TextInput id=ti1/
mx:Button label=Change click=x1.leaf[ 0 ] = 
ti1.text/ 
/mx:HBox


mx:XML id=x1 format=e4x xmlns=
root
leafInitial Value 0/leaf
group1
leafInitial Value/leaf
leafInitial Value 2/leaf
/group1
/root
/mx:XML
/mx:Application





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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: three and a half FlexBuilder bugs that drive me buggy

2006-11-01 Thread tobiaspatton
Here are my favorite FlexBuilder bugs.

1. Place the mouse pointer over a class name, or something else that 
you can control-click to jump to the definition. Click and hold the 
mouse button. Now hit the control key. The definition for the word 
under the pointer is immediately opened. This happens to me all the 
time when I'm pasting text into place. I'll click to the location I 
want to paste into, then hit control-v. If I time it wrong, the 
mouse button is still down and when I hit the control key, my editor 
window changes.

2. Drag and drop text. This is the 21st century, right? Why can't I 
select some text and drag it to a new location. I can do this in 
wordpad, why not Eclipse?

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

 I finally remembered the fourth bug.
 
 When you have a line like this:
 
   public function foo()
 
 (note the spaces before public)
 
 Highlight all the spaces, from the beginning of the line to the 
word
 public.  Hit tab.  The spaces are deleted, but the cursor now sits 
between
 the u and b in public, rather than being right before the p.  This 
happens
 in both the AS and MXML editors.
 
 
 
 On 10/25/06, Nick Collins [EMAIL PROTECTED] wrote:
 
  I have also noticed occassionally the cursor tends to jump 
when I'm
  typing. Like I'll click into one tag, and begin to type an 
attribute or
  something, and in mid-type the cursor will sometimes jump up or 
down several
  lines, putting the rest of what I'm typing at that new location.
 
  On 10/25/06, Pan Troglodytes [EMAIL PROTECTED] wrote:
 
 Okay, I have to mention this before all hope is lost of 
getting it
   fixed in the next patch.  I keep putting it off and putting it 
off.
  
   First:
   Occasionally, when I'm holding down shift and using the 
up/down arrow
   keys to highlight blocks of text, FB loses the first line of 
text.  I
   might have:
  
   line1
   line2
   line3
   line4
  
   I put my cursor on the line after line4, hold down shift and 
hold the up
   arrow for a few lines.  It changes from having lines 1-4 
highlighted to
   having 1-3.  I thought at first it was just my keyboard acting 
up.  But I've
   found this happens on two different machines and only in Flex 
Builder.  Very
   frustrating.
  
  
   Second:
   I have my tabs and indents set to two spaces.  When you 
highlight a line
   and hit tab, it indents it 2 spaces.  If you hit shift-tab, it 
unindents it
   *4* spaces instead of two.  It's always four (ie it doesn't do 
some smart
   unindent).
  
  
   Third:
   In the mxml editor, if I type in something like mx:DataGrid 
and hit
   enter, it looks like this:
  
   mx:DataGrid
   (space)(caret indicator)(space)
   /mx:DataGrid
  
   In other words, it doesn't put my caret at the end of the 
autoindented
   two spaces.  It puts it in the middle.  If I hit end, it 
positions it after
   that second space.  The autoinsert/autoindent works fine in 
the actionscript
   editor for curly braces, however.
  
  
   Third.5:
   Unfortunately, I can't remember exactly how this one happens 
but it
   happens every once in a while and really bugs me.  So I'll 
have to describe
   it very vaguely.  Sometimes the cursor gets put two characters 
into the
   block I've selected after I've done some action on it.  Really 
wish I could
   remember more.  Maybe someone else will recognize it.  Or 
maybe I'll run
   into it later and post a followup.
  
  
  
   Could I get some confirmation from other users on these bugs?  
Will help
   when I fill out bug reports.
  
   --
   Jason
  
 
  
 
 
 
 
 -- 
 Jason






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: XML XML XML

2006-10-23 Thread tobiaspatton
Here's a little application that traverses the XML and output the 
categories and items:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute initialize=OnInit()

mx:Script
![CDATA[
private function OnInit() : void
{
var cats: XMLList = myXml.categoria;

for each( var cat : XML in cats )
{
trace( Category:, [EMAIL PROTECTED] );


var items   : XMLList = cat.item;

for each( var item : XML in items )
{
trace( Item:, item );
}
}
}
]]
/mx:Script

mx:XML id=myXml xmlns=
itens
categoria nome=categoria 1
  itemitem 1/item 
  itemitem 2/item 
  itemitem 3/item 
/categoria
categoria nome=categoria 2
  itemitem 1/item 
/categoria
categoria nome= categoria 3
  itemitem 1/item 
  itemitem 2/item 
/categoria
categoria nome=categoria 4
  itemitem 1/item 
/categoria
/itens
/mx:XML


/mx:Application


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

 I'm getting messed up with XML :-)
 
  
 
 My HTTPService returns this XML
 
  
 
 myService.lastResult =
 
  
 
 itens
 
 categoria nome=categoria 1
 
   itemitem 1/item 
 
   itemitem 2/item 
 
   itemitem 3/item 
 
 /categoria
 
  
 
 categoria nome=categoria 2
 
   itemitem 1/item 
 
 /categoria
 
  
 
 categoria nome= categoria 3
 
   itemitem 1/item 
 
   itemitem 2/item 
 
 /categoria
 
  
 
 categoria nome=categoria 4
 
   itemitem 1/item 
 
 /categoria
 
 /itens
 
  
 
  
 
 I need na example or some help...I need to show this: 
 
  
 
 Categoria 1
 
 Item 1
 
 Item 2
 
 Item 3
 
 Categoria 2
 
 Item 1
 
 Categoria 3
 
 Item 1
 
 Item 2
 
 Categoria 4
 
 Item 1
 
  
 
  
 
  
 
 I've tried ArrayCollection, XMLList etc, but still did not get the 
result I
 want :-(
 
  
 
  
 
 Thanks!






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: show xml node

2006-10-19 Thread tobiaspatton
To get the length of an XMLList object call the length() function, 
no the length property.

In your case: Alert.show( xmlMenu.itens.categoria.length() )

Tobias.

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

 Guys, I have a doubt..
 
 Why does the code below is not working?
 
 And how to show a node attirbute?
 
  
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
 initialize=mostra()
 
 mx:Script
 
 ![CDATA[
 
 import mx.collections.ArrayCollection;
 
 import mx.containers.Canvas;
 
 import mx.controls.Alert;
 
  
 
 function mostra() {
 
  
 Alert.show(xmlMenu.itens.categoria.length.toString());
 
 }
 
 ]]
 
 
 
 /mx:Script
 
  
 
 mx:XML id=xmlMenu format=e4x
 
 itens
 
 categoria nome=Cadastros
 
 item nome=Usuarios /
 
 item nome=Grupos /
 
 /categoria
 
 categoria nome=Ferramentas
 
 item nome=Alunos /
 
 item nome=Forum /
 
 item nome=Chat /
 
 /categoria
 
 /itens
 
 /mx:XML
 
 /mx:Application






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Binary Sockets, and Folder Browser

2006-10-18 Thread tobiaspatton
Two Flash application running on the same machine can communicate 
using LocalConnection objects.

http://livedocs.macromedia.com/flex/2/langref/flash/net/LocalConnecti
on.html


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

 Flash can connect to a socket but not listen for a connection. 
Therefore
 direct p2p is not possible.
  
 You could create a server with which both flash movies connect to 
with
 data passing through the server between them, but not directly 
from one
 to the other.
  
  
  
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of grunz1234
 Sent: 17 October 2006 19:50
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Binary Sockets, and Folder Browser
  
 thanks for your replys.
 1. so it should be possible to create a connection between 2 flash 
 users from the same domain(website)?
 
 2. would be pleased to hear more :)
 
 thanks
 
  --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com, grunz1234 grunz1234@ wrote:
  
   Hello
   I have some questions on Flex.
   
   1. Is it possible to create a socket on a flash client?
   2. Is it possible to open a file from the users OS and upload 
it?
   
   thanks
  
  
  Looks like the Socket class in the flash.net package will be 
able to
  handle the first part of your question. 
  
  For the second part, if I understand correctly, I believe there 
are 
 a
  couple of ways to accomplish this. Any one have any insight on
  implementation techniques that were successfull for them?
  
  Thanks.
 






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] getDefinitionByName(): Variable ... is not defined.

2006-10-10 Thread tobiaspatton
Hello List;

I'm trying to create an interface where a user's selection in a menu 
component results in other components being created. Right now I'm 
just prototyping, and experimenting with different ways I might do 
this.

One way I've thought of is to use an XML data provider for the list 
where an attribute of each menu entry describes a class that should 
be instantiated when that item is selected.

e.g.

menu item label=classOne 
childClass=com.Kodak.Galiano.Test.classOne/

I'm running into a problem, though. Because classOne is never 
actually used in the source code, classOne is not being compiled 
and linked into the application. When I call getDefinitionByName
( com.Kodak.Galiano.Test.classOne ), there is an error: Variable 
classOne is not defined.

Is there some trick I can use to force classOne to be compiled and 
linked into the application? Right now my solution is to add a 
private function that defines a local variable of the appropriate 
type.

private function TrickCompiler() : void
{
 var x : classOne;
}

This does the trick, but it sure seems hacky.

Thanks.
Tobias.






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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: Custom component inside custom component issues

2006-10-04 Thread tobiaspatton
'states' is an attribute of your custom component, and should be 
prefixed with the namespace in which your component resides.

Try this:

sl:StatsWidget
sl:states

/sl:states
/sl:StatsWidget

Tobias.

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

 I'm having trouble with mx related packages when they are inside a
 custom component.
 
 My structure is as follows:
 
 - I have a component, 'Widget', which is an ActionScript class that
 extends the TitleWindow container (it just adds a few custom
 show/hide/close methods, it doesn't override any default
 functionality)
 
 - I have a 'StatsWidget' in MXML that is just a few charts inside a
 sl:Widget/sl:Widget as a custom component (xmlns:sl is defined
 properly)
 
 - I have declared xmlns:mx properly so that I can use the mx 
packages
 
 - All mx related packages compile and work inside the 'StatsWidget'
 component with the exception of mx:states which is giving me the
 following error message: 'Could not resolve mx:states to a 
component
 implementation'
 
 I suspect I am missing something -- perhaps my states should be 
used
 at the parent level (the 'Widget' class)?
 
 Any ideas would be appreciated.
 
 Thanks for your time,
 
 Brian








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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: MXML Constructor

2006-09-26 Thread tobiaspatton
I think you just need a public function in your component with the same 
name as the component with no arguments. This will be called as the 
constructor of your component. You can't have a constructor that takes 
parameters though.

eg.

MyComp.mxml

mx:Script
 ![CDATA[
public function MyComp()
{
super();

// do some constructor stuff
}
  ]]
/mx:Script

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

 Is possible to create a Constructor in MXML files?
 
 Marvin








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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: Compiler warning about unused CSS type selector

2006-09-19 Thread tobiaspatton
That's right. I have three related applications and I would like to 
use a single style sheet for all three. One of the applications does 
not use the ComboBox control, so reports this warning. 

I'm hoping there's a switch in flex-config.xml to disable this 
warning, but can't find one.

Tobias.

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

 Tobias,
 You are probably referencing an external .css file in your code 
which
 has a reference to a style for ComboBox, but you are not using a
 combobox in your app???
 
 Hilary
 
 www.bridel.org
 
 
 On 9/19/06, tobiaspatton [EMAIL PROTECTED] wrote:
  Anyone know how to get rid this warning?
 
  Warning: The type selector 'ComboBox' was not processed, because 
the
  type was not used in the application.
 
  Thanks.
  Tobias.
 
 
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
 
 
 
 
 
 -- 
 Hilary
 
 --







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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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




[flexcoders] Re: Compiler warning about unused CSS type selector

2006-09-19 Thread tobiaspatton
Thanks for the reply Darron; I had high hopes that you were right, 
but sadly the warning still appears:

mxmlc  -source-
path=D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client/classes -
compiler.keep-all-type-selectors -include-
libraries=locale\EN\lib\Galiano.swc,D:\PerforceDepot\galiano\Galiano.
Tobias_Patton\tools\compiler\Flex2frameworks\locale\en_US\framework_r
b.swc DashboardDiag.mxml
[mxmlc] Loading configuration file 
D:\PerforceDepot\galiano\Galiano.Tobias_Patton\tools\compiler\Flex2
\frameworks\flex-config.xml
[mxmlc] 
D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client\DashboardJobsVi
ew\DashboardDiag.mxml: Warning: The type selector 'Alert' was not 
processed, because the type was not used in the application.
[mxmlc]
[mxmlc] 
D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client\DashboardJobsVi
ew\DashboardDiag.mxml: Warning: The type selector 'ComboBox' was not 
processed, because the type was not used in the application.
[mxmlc]
[mxmlc] 
D:\PerforceDepot\galiano\Galiano.Tobias_Patton\Client\DashboardJobsVi
ew\DashboardDiag.swf (252655 bytes)

--- In flexcoders@yahoogroups.com, Darron J. Schall [EMAIL PROTECTED] 
wrote:

 Have you tried the -compiler.keep-all-type-selectors flag or 
 keep-all-type-selectorstrue/keep-all-type-selectors tag?  It 
might 
 add a tiny bit to the file size (since unused types won't be 
pruned), 
 but it might eliminate the warnings.
 
 There doesn't seem to be a specific compiler option to disable the 
css 
 warning.
 
 -d
 
 tobiaspatton wrote:
 
  That's right. I have three related applications and I would like 
to
  use a single style sheet for all three. One of the applications 
does
  not use the ComboBox control, so reports this warning.
 
  I'm hoping there's a switch in flex-config.xml to disable this
  warning, but can't find one.
 
  Tobias.
 







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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Embedding Arial Unicode

2006-09-07 Thread tobiaspatton
Hello;

I'm trying to embed a single font that can render Roman and non-
Roman scripts. I think that Arial Unicode should be able to do this, 
so I'm trying to embed the font with the entry in my style sheet:
 
@font-face
{
src:url( fonts/arialuni.ttf );
fontStyle:  normal;
fontWeight: normal;
fontFamily: embeddedVerdana;
}

 
But I get this error:

exception during transcoding: Unexpected exception encountered while 
reading font 
file :/PerforceDepot/galiano/Galiano.Tobias_Patton/Client/DashboardJo
bsView/fonts/arialuni.ttf'
 

Any advice?


Tobias.








 Yahoo! Groups Sponsor ~-- 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/3EuRwD/bOaOAA/yQLSAA/nhFolB/TM
~- 

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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] setStyle( selectionColor, color) changes focus.

2006-03-14 Thread tobiaspatton
I've noticed that calling mx.control.list.setStyle(selectionColor, 
color) removes focus from a previously focused TextInput control in 
the list. Based on the relatedeObject parameters of the FocusEvent 
object sent the focusOut callback that the newly focused object is 
null.

Is this the intended behavior?

Here's a sample app to demonstrate. Running in debug mode, click 
inside of the TextInput fields in the list. Now click the button. 
From the messages in the debug console, you'll see that the 
TextInput is no longer focused.

Thanks.
Tobias.

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=* layout=absolute
mx:Script
![CDATA[
import mx.utils.ObjectProxy;
import mx.collections.ArrayCollection;

private function DoIt() : void
{
var color : uint = l1.getStyle
( selectionColor );
color += 0x101010;

l1.setStyle( selectionColor, 
color );
}

[Bindable]
public var ac : ArrayCollection = new 
ArrayCollection( [
new ObjectProxy( one ),
new ObjectProxy( two ),
new ObjectProxy( three ),
new ObjectProxy( four ) ] );
]]
/mx:Script

mx:HBox

mx:List id=l1
width=200
dataProvider={ac}
rowHeight=30
useRollOver=false

mx:listItemRenderer
mx:Component
mx:HBox   

mx:TextInput 

editable=true 

text={dataObject}
width=150

focusIn=trace('FocusIn', dataObject, event.relatedObject)

focusOut=trace('FocusOut', dataObject, 
event.relatedObject)/
/mx:HBox
/mx:Component
/mx:listItemRenderer

/mx:List

mx:Button label=DoIt 
click=DoIt()
focusEnabled=false/

/mx:HBox

/mx:Application







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

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

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

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





[flexcoders] Re: How to implement custom drawing for selected list items?

2006-03-13 Thread tobiaspatton
Hi Manish.

I never knew about the implements tag for MXML components. It 
seems obvious now, but I never saw it mentioned in documentation or 
example code.

My custom selection behavior is mostly working now. I've got one 
anomaly that I need to track down. If it starts looking like a bug, 
I'll post a follow-up.

Thanks again for your help. It's nice to have a mailing list with 
representatives from Adobe that are so repsonsive.

Tobias.

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

 On 3/11/06, tobiaspatton [EMAIL PROTECTED] wrote:
 
  I take this to mean that my VBox-based list item renderer should
  implement this interface,  but I don't know how to accomplish 
this.
  If my component were an AS file, it would be simple. But how can 
an
  MXML component implement an interface?
 
 Simply use the implements attribute:
 
 VBox implements=mx.controls.listClasses.IDropInListItemRenderer
  ...
 /VBox
 
 Or you can just reference the DataGrid directly from your item
 renderer's code (there's no need to implement this interface).
 
 Manish







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

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

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

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




[flexcoders] list.selectedIndices has the wrong values

2006-03-13 Thread tobiaspatton
Hello list;

I have a list with multiple selection turned on. When I examine the 
selectedIndices attribute of the list, the values seem to be 
erroneous. For example, if my list looks like this:

one
two
three
four
five

I click on one and then shift-click on two. At this point 
selectedIndices contains [1,2] when it should be [0,1]. If I click 
on one and shift-click on five, selectedIndices contains 
[4,8,5,6,7] when it should contain [0,1,2,3,4]. Strangely, 
selectedItems contains the correct dataObjects. However, I want 
access to the item renderers, not the data objects, so this is not 
of no use to me.

Using ctrl-click to create a multi-selection works fine. That is, 
the value of selectedIndices is correct when ctrl-click is used 
instead of shift-click.

Here's small program to illustrate the problem:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=* 
layout=absolute

mx:List id=l1
width=200
multipleSelection=true

dataProvider=[ 'one', 'two', 'three', 'four', 'five' ]

/mx:List
mx:Button x=10 y=152 
label=Trace 
click=trace( l1.selectedIndices, 
l1.selectedItems )/
/mx:Application


Thanks.
Tobias.






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

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

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

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




[flexcoders] Re: list.selectedIndices has the wrong values

2006-03-13 Thread tobiaspatton
One more strange thing: if I select five and then shift-
select one, the selectedIndices attribute is correct.

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

 Hello list;
 
 I have a list with multiple selection turned on. When I examine 
the 
 selectedIndices attribute of the list, the values seem to be 
 erroneous. For example, if my list looks like this:
 
 one
 two
 three
 four
 five
 
 I click on one and then shift-click on two. At this point 
 selectedIndices contains [1,2] when it should be [0,1]. If I click 
 on one and shift-click on five, selectedIndices contains 
 [4,8,5,6,7] when it should contain [0,1,2,3,4]. Strangely, 
 selectedItems contains the correct dataObjects. However, I want 
 access to the item renderers, not the data objects, so this is not 
 of no use to me.
 
 Using ctrl-click to create a multi-selection works fine. That is, 
 the value of selectedIndices is correct when ctrl-click is used 
 instead of shift-click.
 
 Here's small program to illustrate the problem:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
   xmlns=* 
   layout=absolute
   
   mx:List id=l1
   width=200
   multipleSelection=true
   
   dataProvider=[ 'one', 'two', 'three', 'four', 'five' ]
   
   /mx:List
   mx:Button x=10 y=152 
   label=Trace 
   click=trace( l1.selectedIndices, 
 l1.selectedItems )/
 /mx:Application
 
 
 Thanks.
 Tobias.







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

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

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

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





[flexcoders] Re: Deselected list row uses roll-over color.

2006-03-10 Thread tobiaspatton
The color stays when the mouse is moved.

Actually, for my test the list had the style use-roll-over set 
to false.

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

 On 3/11/06, tobiaspatton [EMAIL PROTECTED] wrote:
 
  I have a list that uses the standard item renderer and 
has multiple-
  select set to true. If I select a range of rows, and then 
ctrl-
  click to deselect one of the rows, the de-selected row is drawn 
with
  its background color set to the roll-over color of this list.
  Shouldn't the background color of the row be the background 
color of
  the list?
 
 Is the mouse still over the item?  If not, it's a bug.
 
 Manish







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

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

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

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




[flexcoders] Re: How to implement custom drawing for selected list items?

2006-03-10 Thread tobiaspatton
Hi Manish

My listItemRenderer is an MXML component that dervies from VBox. It 
doesn't have a listData attribute.

I looked up listData renderer and found that components that wish to 
be a drop-in renderer should implement the IDropInListItemRenderer 
interface. 

I take this to mean that my VBox-based list item renderer should 
implement this interface,  but I don't know how to accomplish this. 
If my component were an AS file, it would be simple. But how can an 
MXML component implement an interface?

I tried adding get listData and set listData functions, hoping 
that they would be discovered at runtime. It would seem that they 
are, since get listData is being called frequently, but set 
listData is never called.

Any advice?

Thanks.
Tobias.

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

 On 3/11/06, tobiaspatton [EMAIL PROTECTED] wrote:
 
 [snip]
 
  When the user changes the selection in the list, 
updateDisplayList()
  is called for the newly deselected and selected items. My first
  thought was to inspect the selectedItems attribute of the parent
  list and adjust the drawing accordingly. However, it seems that 
the
  item renderer's updateDisplayList() method is invoked prior to 
the
  list's selectedItems attribute being updated.
 [snip]
 
 In your item renderer's updateDisplayList() you can do the 
following:
 
   if (ListBase(listData.owner).isItemSelected(this)) // selected
 drawSelectedStuff();
   else
 drawUnselectedStuff();
 
 Manish







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

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

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

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




[flexcoders] Deselected list row uses roll-over color.

2006-03-10 Thread tobiaspatton
I think this is a bug.

I have a list that uses the standard item renderer and has multiple-
select set to true. If I select a range of rows, and then ctrl-
click to deselect one of the rows, the de-selected row is drawn with 
its background color set to the roll-over color of this list. 
Shouldn't the background color of the row be the background color of 
the list?

Thanks.
Tobias.





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

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

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

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




[flexcoders] How to implement custom drawing for selected list items?

2006-03-10 Thread tobiaspatton
I have a custom list item renderer and would like to change the 
behavior of its updateDisplayList() method depending on whether the 
item is currently selected.

When the user changes the selection in the list, updateDisplayList() 
is called for the newly deselected and selected items. My first 
thought was to inspect the selectedItems attribute of the parent 
list and adjust the drawing accordingly. However, it seems that the 
item renderer's updateDisplayList() method is invoked prior to the 
list's selectedItems attribute being updated.

What I've ended up doing seems really clunky to me. The parent list 
component listens for change events. The event handler gets the 
list item renderer for each selected row and invokes 
invalidateDisplayList(). In response, the list item renderers' 
updateDisplayList() methods are invoked. At this point, the parent 
list's selectedItems attribute correctly reflects the current 
selection, so the list item renderer can draw correctly. Of course, 
the list component must also keep track of the array of most-
recently selected items so they can be redrawn in the unselected 
state when the selection changes.

What a mess. Does anyone have a better technique?

Thanks.
Tobias.






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

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

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

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





[flexcoders] Internal compiler error

2006-03-09 Thread tobiaspatton
Hello;

I'm stuck! When compiling my project I am getting an internal 
compiler error, and can't for the life of me figure out why. I've 
reproduced the problem with a very small set of files that implement 
the same structure as my project. 

Essentially, I have a custom component, COMP_List, that derives from 
mx:List and implements some custom behaviors. I have another custom 
component DSHB_List that dervies from COMP_List. The main 
application instantiates a DSHB_List object.


/com/foo/bar/COMP/COMP_List.mxml:

?xml version=1.0 encoding=utf-8?
mx:List xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=*
/mx:List

/com/foo/bar/DSHB/DSHB_List.mxml:

?xml version=1.0 encoding=utf-8?
COMP:COMP_List xmlns:COMP=com.foo.bar.COMP.*
/COMP:COMP_List

/CompilerError.mxml:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns:DSHB=com.foo.bar.DSHB.*
xmlns=* 
layout=absolute
DSHB:DSHB_List/
/mx:Application

This is the command line I'm using to compile, along with the 
compiler output:

C:\Program Files\Adobe\Flex Builder 2 Beta 1\Flex Framework 2
\binmxmlc --load-config ..\frameworks\flex-config.xml c:\Documents 
and Settings\tpatton\My 
Documents\Flex\CompilerError\CompilerError.mxml

Loading configuration file C:\Program Files\Adobe\Flex Builder 2 
Beta 1\Flex Framework 2\frameworks\flex-config.xml, root element 
flex-config
Initial setup: 343ms
Loaded 6 SWCs: 594ms
License Service: Flex 2.0 Developer Edition enabled (beta period 
ends May 1, 2006)
Compiling...
Error: null

java.lang.AssertionError
at flex2.compiler.mxml.lang.StandardDefs.isIUIComponent
(StandardDefs.java:267)
at 
flex2.compiler.mxml.builder.ComponentBuilder.constructComponent
(ComponentBuilder.java:78)
at flex2.compiler.mxml.builder.ApplicationBuilder.analyze
(ApplicationBuilder.java:102)
at flex2.compiler.mxml.dom.Node.analyze(Node.java:36)
at flex2.compiler.mxml.ImplementationCompiler.parse
(ImplementationCompiler.java:130)
at flex2.compiler.mxml.Compiler.parse(Compiler.java:73)
at flex2.compiler.API.parse(API.java:1104)
at flex2.compiler.API.parse(API.java:1072)
at flex2.compiler.API.batchInner(API.java:156)
at flex2.compiler.API.batch(API.java:260)
at flex2.compiler.API.compile(API.java:361)
at flex2.compiler.API.compile(API.java:289)
at flex2.tools.Compiler.main(Compiler.java:167)
Total time: 3062ms
Peak memory usage: 49 MB (Heap: 31, Non-Heap: 18)

Am I doing something obviously wrong here? Does anyone have any 
suggestions as to how I can track down an eliminate the internal 
compiler error?

Thanks.
Tobias











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

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

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

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




[flexcoders] Re: Internal compiler error

2006-03-09 Thread tobiaspatton
Hi Roger;

Thanks for replying.

For this test, I'm actually using the command-line compiler. If I 
explicitly link against framworks.swc I get the same error:

C:\Program Files\Adobe\Flex Builder 2 Beta 1\Flex Framework 2
\binmxmlc --load-config ..\frameworks\flex-config.xml c:\Documents 
and Settings\tpatton\My 
Documents\Flex\CompilerError\CompilerError.mxml -library-
path=c:\Program Files\Adobe\Flex Builder 2 Beta 1\Flex Framework 2
\frameworks\libs\framework.swc

Also, if frameworks.swc were corrupt or missing, wouldn't I have 
problems compiling *any* project? It's only this particular project 
that I'm having trouble with.

Tobias.

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

 I'm guessing that your project isn't finding the frameworks SWC.  
There
 are a few key classes that really irk the compiler if it can't find
 them.  Did you remove it from your project, or perhaps move the 
file?
 
 -rg 
 
  -Original Message-
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton
  Sent: Thursday, March 09, 2006 9:03 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Internal compiler error
  
  Hello;
  
  I'm stuck! When compiling my project I am getting an internal 
  compiler error, and can't for the life of me figure out why. 
I've 
  reproduced the problem with a very small set of files that 
implement 
  the same structure as my project. 
  
  Essentially, I have a custom component, COMP_List, that derives 
from 
  mx:List and implements some custom behaviors. I have another 
custom 
  component DSHB_List that dervies from COMP_List. The main 
  application instantiates a DSHB_List object.
  
  
  /com/foo/bar/COMP/COMP_List.mxml:
  
  ?xml version=1.0 encoding=utf-8?
  mx:List xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=*
  /mx:List
  
  /com/foo/bar/DSHB/DSHB_List.mxml:
  
  ?xml version=1.0 encoding=utf-8?
  COMP:COMP_List xmlns:COMP=com.foo.bar.COMP.*
  /COMP:COMP_List
  
  /CompilerError.mxml:
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
  xmlns:DSHB=com.foo.bar.DSHB.*
  xmlns=* 
  layout=absolute
  DSHB:DSHB_List/
  /mx:Application
  
  This is the command line I'm using to compile, along with the 
  compiler output:
  
  C:\Program Files\Adobe\Flex Builder 2 Beta 1\Flex Framework 2
  \binmxmlc --load-config ..\frameworks\flex-
config.xml c:\Documents 
  and Settings\tpatton\My 
  Documents\Flex\CompilerError\CompilerError.mxml
  
  Loading configuration file C:\Program Files\Adobe\Flex Builder 2 
  Beta 1\Flex Framework 2\frameworks\flex-config.xml, root element 
  flex-config
  Initial setup: 343ms
  Loaded 6 SWCs: 594ms
  License Service: Flex 2.0 Developer Edition enabled (beta period 
  ends May 1, 2006)
  Compiling...
  Error: null
  
  java.lang.AssertionError
  at flex2.compiler.mxml.lang.StandardDefs.isIUIComponent
  (StandardDefs.java:267)
  at 
  flex2.compiler.mxml.builder.ComponentBuilder.constructComponent
  (ComponentBuilder.java:78)
  at flex2.compiler.mxml.builder.ApplicationBuilder.analyze
  (ApplicationBuilder.java:102)
  at flex2.compiler.mxml.dom.Node.analyze(Node.java:36)
  at flex2.compiler.mxml.ImplementationCompiler.parse
  (ImplementationCompiler.java:130)
  at flex2.compiler.mxml.Compiler.parse(Compiler.java:73)
  at flex2.compiler.API.parse(API.java:1104)
  at flex2.compiler.API.parse(API.java:1072)
  at flex2.compiler.API.batchInner(API.java:156)
  at flex2.compiler.API.batch(API.java:260)
  at flex2.compiler.API.compile(API.java:361)
  at flex2.compiler.API.compile(API.java:289)
  at flex2.tools.Compiler.main(Compiler.java:167)
  Total time: 3062ms
  Peak memory usage: 49 MB (Heap: 31, Non-Heap: 18)
  
  Am I doing something obviously wrong here? Does anyone have any 
  suggestions as to how I can track down an eliminate the internal 
  compiler error?
  
  Thanks.
  Tobias
  
  
  
  
  
  
  
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links
  
  
  
   
  
  
 








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

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

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

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





[flexcoders] Re: Internal compiler error

2006-03-09 Thread tobiaspatton
Thanks Roger;

For now, I've changed COMP_List from an mxml component to an 
ActionScript class that derives from mx.controls.List. This seems to 
have worken around the compiler error.

Tobias.

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

 I know this isn't going to help you at the moment, but I just 
tested
 your code against our latest compiler, and it compiled without any
 error.
 
 I'm CC'ing the guy on our team who I suspect fixed the issue, to 
see if
 there are any workarounds to hold you until Beta 2 is out.
 
 Cheers,
 
 -rg 
 
  -Original Message-
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton
  Sent: Thursday, March 09, 2006 9:03 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Internal compiler error
  
  Hello;
  
  I'm stuck! When compiling my project I am getting an internal 
  compiler error, and can't for the life of me figure out why. 
I've 
  reproduced the problem with a very small set of files that 
implement 
  the same structure as my project. 
  
  Essentially, I have a custom component, COMP_List, that derives 
from 
  mx:List and implements some custom behaviors. I have another 
custom 
  component DSHB_List that dervies from COMP_List. The main 
  application instantiates a DSHB_List object.
  
  
  /com/foo/bar/COMP/COMP_List.mxml:
  
  ?xml version=1.0 encoding=utf-8?
  mx:List xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=*
  /mx:List
  
  /com/foo/bar/DSHB/DSHB_List.mxml:
  
  ?xml version=1.0 encoding=utf-8?
  COMP:COMP_List xmlns:COMP=com.foo.bar.COMP.*
  /COMP:COMP_List
  
  /CompilerError.mxml:
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
  xmlns:DSHB=com.foo.bar.DSHB.*
  xmlns=* 
  layout=absolute
  DSHB:DSHB_List/
  /mx:Application
  
  This is the command line I'm using to compile, along with the 
  compiler output:
  
  C:\Program Files\Adobe\Flex Builder 2 Beta 1\Flex Framework 2
  \binmxmlc --load-config ..\frameworks\flex-
config.xml c:\Documents 
  and Settings\tpatton\My 
  Documents\Flex\CompilerError\CompilerError.mxml
  
  Loading configuration file C:\Program Files\Adobe\Flex Builder 2 
  Beta 1\Flex Framework 2\frameworks\flex-config.xml, root element 
  flex-config
  Initial setup: 343ms
  Loaded 6 SWCs: 594ms
  License Service: Flex 2.0 Developer Edition enabled (beta period 
  ends May 1, 2006)
  Compiling...
  Error: null
  
  java.lang.AssertionError
  at flex2.compiler.mxml.lang.StandardDefs.isIUIComponent
  (StandardDefs.java:267)
  at 
  flex2.compiler.mxml.builder.ComponentBuilder.constructComponent
  (ComponentBuilder.java:78)
  at flex2.compiler.mxml.builder.ApplicationBuilder.analyze
  (ApplicationBuilder.java:102)
  at flex2.compiler.mxml.dom.Node.analyze(Node.java:36)
  at flex2.compiler.mxml.ImplementationCompiler.parse
  (ImplementationCompiler.java:130)
  at flex2.compiler.mxml.Compiler.parse(Compiler.java:73)
  at flex2.compiler.API.parse(API.java:1104)
  at flex2.compiler.API.parse(API.java:1072)
  at flex2.compiler.API.batchInner(API.java:156)
  at flex2.compiler.API.batch(API.java:260)
  at flex2.compiler.API.compile(API.java:361)
  at flex2.compiler.API.compile(API.java:289)
  at flex2.tools.Compiler.main(Compiler.java:167)
  Total time: 3062ms
  Peak memory usage: 49 MB (Heap: 31, Non-Heap: 18)
  
  Am I doing something obviously wrong here? Does anyone have any 
  suggestions as to how I can track down an eliminate the internal 
  compiler error?
  
  Thanks.
  Tobias
  
  
  
  
  
  
  
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links
  
  
  
   
  
  
 







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

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

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

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




[flexcoders] Re: Warning about unconverted Bindable data

2006-02-16 Thread tobiaspatton
The problem turned out to be that I had the [Bindable] attribute 
associated with a couple classes, thinking that this would make all 
the public data members bindable (not sure why I thought that.)

Taking the [Binding] attribute off the class, and putting it on each 
public data member solved the problem.

Here's a related question:

Suppose I have a private data member that's a String and a public 
getter method. I want the string to be bindable, so I have to apply 
the [Bindable] metadata to the getter method. Also, I have to 
specify the event fired when the data changes. What event should I 
specify? If the getter returns an ArrayCollection, I've succesfully 
used [Bindable(event=collectionChanged)], but I don't know what 
the equivalent event is for a string. Do I have to implement a 
setter method and dispatch a specially-named event?

Thanks.
Tobias

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

 Maybe you had [Bindable] metadata in a class from the Alpha and the
 format changed in Beta?  I don't remember if we did anything 
significant
 there, maybe check the release notes?
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of tobiaspatton
 Sent: Wednesday, February 15, 2006 2:58 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Warning about unconverted Bindable data
 
 Can anyone tell me what this error means?
 
 warning: unconverted Bindable metadata in class ...
 
 Thanks.
 Tobias.
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links







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

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

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

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




[flexcoders] Warning about unconverted Bindable data

2006-02-15 Thread tobiaspatton
Can anyone tell me what this error means?

warning: unconverted Bindable metadata in class ...

Thanks.
Tobias.







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

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

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

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




[flexcoders] How to deselect all items in a list?

2006-02-14 Thread tobiaspatton
In my experience standard list widgets on various platform implement a 
behaviour where clicking in an empty row of the list deselects all the 
list rows. The Flex list component doesn't seem to behave this way by 
default. Is there a way of enabling this behaviour without resorting 
to event listeners?

Thanks.
Tobias.





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

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

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

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




[flexcoders] Re: Problem with listItemRenderer and AddChild

2006-02-10 Thread tobiaspatton
I think I sorted out why you are not seeing the problem. In the file 
ItemRenderer.mxml, the top-level component tag (mx:VBox) has 
the height attribute set. Remove this attribute and run the 
application.

--- In flexcoders@yahoogroups.com, Eric D Anderson [EMAIL PROTECTED] 
wrote:

 Hi,
 
 I tried this with the Flex 2 beta and I don't see any problem.  
Can you confirm you're using Flex 2 beta?
 
 Thanks
 
 Eric
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton
 Sent: Thursday, February 09, 2006 6:42 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problem with listItemRenderer and AddChild
 
 Hi again;
 
 This might be a bug. The code at the end of this message creates a 
 list with a custom item renderer. The renderer handles clicks by 
 changing the component's state, effectively adding a button.
 
 This works fine as long as the list property `variableRowHeight' 
is 
 set to `false'. If it it set to true, very strange things happen. 
 Clicking on the first row adds a button to the second row. 
 Repeatedly clicking on the first row will add a button to the 
second 
 row, remove it, add it to the first row and then remove it.
 
 Does anyone know a way to dynamically add and remove children from 
a 
 custom list item renderer that allows variable height rows?
 
 Thanks.
 Tobias.
 
 Here's the code:
 
 - TestAddChild.mxml -
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
 xmlns=* layout=absolute
   mx:ArrayCollection id=ac
   mx:Array
   mx:StringAlpha/mx:String
   mx:StringBeta/mx:String
   /mx:Array
   /mx:ArrayCollection
   
   mx:VBox id=vb width=300   
   mx:List variableRowHeight=true
   rowHeight=60
   dataProvider={ac} 
   listItemRenderer=ItemRenderer
   width=300/
   /mx:VBox
 /mx:Application
 
 - ItemRenderer.mxml -
 
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=* 
 click=DoItemClick(event)
   height=60
   mx:Script
   ![CDATA[   
   public function DoItemClick( 
 event:MouseEvent ):void
   {
   currentState = ( currentState == 
 null ) ? openState : null;
   }
   ]]
   /mx:Script
   
   mx:states
   mx:State name=openState
   mx:AddChild
   mx:Button label={dataObject}/
   
   /mx:AddChild
   /mx:State
   /mx:states
   
   mx:Label text={dataObject}/
 
 /mx:VBox
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com 
 Yahoo! Groups Links







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

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

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

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




[flexcoders] Re: Problem with listItemRenderer and AddChild

2006-02-10 Thread tobiaspatton
I think I sorted out why you are not seeing the problem. In the file 
ItemRenderer.mxml, the top-level component tag (mx:VBox) has 
the height attribute set. Remove this attribute and run the 
application.

--- In flexcoders@yahoogroups.com, Eric D Anderson [EMAIL PROTECTED] 
wrote:

 Hi,
 
 I tried this with the Flex 2 beta and I don't see any problem.  
Can you confirm you're using Flex 2 beta?
 
 Thanks
 
 Eric
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton
 Sent: Thursday, February 09, 2006 6:42 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problem with listItemRenderer and AddChild
 
 Hi again;
 
 This might be a bug. The code at the end of this message creates a 
 list with a custom item renderer. The renderer handles clicks by 
 changing the component's state, effectively adding a button.
 
 This works fine as long as the list property `variableRowHeight' 
is 
 set to `false'. If it it set to true, very strange things happen. 
 Clicking on the first row adds a button to the second row. 
 Repeatedly clicking on the first row will add a button to the 
second 
 row, remove it, add it to the first row and then remove it.
 
 Does anyone know a way to dynamically add and remove children from 
a 
 custom list item renderer that allows variable height rows?
 
 Thanks.
 Tobias.
 
 Here's the code:
 
 - TestAddChild.mxml -
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
 xmlns=* layout=absolute
   mx:ArrayCollection id=ac
   mx:Array
   mx:StringAlpha/mx:String
   mx:StringBeta/mx:String
   /mx:Array
   /mx:ArrayCollection
   
   mx:VBox id=vb width=300   
   mx:List variableRowHeight=true
   rowHeight=60
   dataProvider={ac} 
   listItemRenderer=ItemRenderer
   width=300/
   /mx:VBox
 /mx:Application
 
 - ItemRenderer.mxml -
 
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=* 
 click=DoItemClick(event)
   height=60
   mx:Script
   ![CDATA[   
   public function DoItemClick( 
 event:MouseEvent ):void
   {
   currentState = ( currentState == 
 null ) ? openState : null;
   }
   ]]
   /mx:Script
   
   mx:states
   mx:State name=openState
   mx:AddChild
   mx:Button label={dataObject}/
   
   /mx:AddChild
   /mx:State
   /mx:states
   
   mx:Label text={dataObject}/
 
 /mx:VBox
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com 
 Yahoo! Groups Links










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

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

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

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





[flexcoders] Re: Problem with listItemRenderer and AddChild

2006-02-10 Thread tobiaspatton
Hi Manish;

Well, your suggestion *almost* works. Click on Beta a couple 
times, and you'll see the Alpha row's size being increased, though 
no button is added.

I could fix this by adding:

mx:SetProperty property=height value=60/

to the openState state declaration. I have no idea why this would 
work :(

On that note: how can I better arm myself to sort out these problems 
on my own? I've read the documentation on custom renderers and 
states, but nothing in there would have led me to your conclusion 
that the list was shuffling cell renderers. Is there more I can 
read? Books? Sample code? Blogs?


Thanks.



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

 On 2/10/06, tobiaspatton [EMAIL PROTECTED] wrote:
  I think I sorted out why you are not seeing the problem. In the 
file
  ItemRenderer.mxml, the top-level component tag (mx:VBox) has
  the height attribute set. Remove this attribute and run the
  application.
 
 Okay, this works:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml;
 xmlns=* layout=absolute
mx:ArrayCollection id=ac
mx:Array
  mx:Object label=Alpha /
  mx:Object label=Beta /
/mx:Array
/mx:ArrayCollection
 
mx:VBox id=vb width=300
mx:List labelField=label
   variableRowHeight=true
rowHeight=60
dataProvider={ac}
width=300
   mx:listItemRenderer
   mx:Component
 mx:VBox xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=*
 click=DoItemClick(event)
currentState={dataObject.state}
mx:Script
![CDATA[
public function DoItemClick(
 event:MouseEvent ):void
{
dataObject.state = ( currentState ==
 null ) ? openState : null;
   // 
trigger binding
   
dataObject = dataObject;
}
]]
/mx:Script
 
mx:states
mx:State name=openState
mx:AddChild
mx:Button 
label={dataObject.label}/
 
/mx:AddChild
/mx:State
/mx:states
 
mx:Label text={dataObject.label}/
 
 /mx:VBox
   /mx:Component
   /mx:listItemRenderer
/mx:List
/mx:VBox
 /mx:Application
 
 I'm using an inline renderer, but you can remove it outside (it was
 just for my convenience).
 
 So basically what was happening is that the List was reshuffling 
the
 cell renderer objects after the click - so the object you clicked 
on
 ended up in a new position.  My solution is to save the state in 
the
 data provider instead and have it bound to the currentState
 property.  Check it out.







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

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

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

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





[flexcoders] Re: set dataObject() and null properties

2006-02-09 Thread tobiaspatton
Hi Manish;

As always, your response was prompt and, even better, helpful! 

Is it fair to say that the documentation included with Beta 1 is 
incorrect with respect to this procedure? The sample code I was 
working from can be found at

Flex Help-Developing Flex Applications-Using Cell Renderers and 
Cell Editors-Overriding the dataObject property

The procedure outlined here makes the implicit assumption that the 
child objects of an HBox have all been created at the time the 
dataObject setter is called.

(It's also doing something else I think is weird. It only calls 
super.dataObject=value if value is not NULL. If the goal of the 
override is to supplement the base class's behaviour, not replace 
it, shouldn't this call always be made?)

Thanks.
Tobias.

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

 On 2/8/06, tobiaspatton [EMAIL PROTECTED] wrote:
 
  override public function set dataObject
  (value:Object):void
  {
  super.dataObject = value;
  trace( value.image, image);
 
  if( image != null )
  {
  image.source = 
value.image;
  }
  }
 
 [snip]
  From the output we can see that the dataObject setter function is
  being called once when the image parameter is a real value, but 
for
  all subsequent calls, the image parameter is null.
 
  Why would this be? It's hard to set the source parameter of null.
 
 Child objects are created in the component's createChildren 
method,
 which is called only when the component is added to the display 
list -
 which, in the case of cell renderers, is after their dataObject
 property is set.  Property setters should be coded to assume that
 child objects have not been created.  This is what I'd do:
 
  function set dataObject(value)
  {
super.dataObject = value;
invalidateDisplayList();
  }
 
  function updateDisplayList()
  {
   image.source = value.image;
  }
 
 It's also more efficient if you set the image's source in 
updateDisplayList.







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

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

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

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




[flexcoders] Problem with listItemRenderer and AddChild

2006-02-09 Thread tobiaspatton
Hi again;

This might be a bug. The code at the end of this message creates a 
list with a custom item renderer. The renderer handles clicks by 
changing the component's state, effectively adding a button.

This works fine as long as the list property `variableRowHeight' is 
set to `false'. If it it set to true, very strange things happen. 
Clicking on the first row adds a button to the second row. 
Repeatedly clicking on the first row will add a button to the second 
row, remove it, add it to the first row and then remove it.

Does anyone know a way to dynamically add and remove children from a 
custom list item renderer that allows variable height rows?

Thanks.
Tobias.

Here's the code:

- TestAddChild.mxml -

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=* layout=absolute
mx:ArrayCollection id=ac
mx:Array
mx:StringAlpha/mx:String
mx:StringBeta/mx:String
/mx:Array
/mx:ArrayCollection

mx:VBox id=vb width=300   
mx:List variableRowHeight=true
rowHeight=60
dataProvider={ac} 
listItemRenderer=ItemRenderer
width=300/
/mx:VBox
/mx:Application

- ItemRenderer.mxml -

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=* 
click=DoItemClick(event)
height=60
mx:Script
![CDATA[   
public function DoItemClick( 
event:MouseEvent ):void
{
currentState = ( currentState == 
null ) ? openState : null;
}
]]
/mx:Script

mx:states
mx:State name=openState
mx:AddChild
mx:Button label={dataObject}/

/mx:AddChild
/mx:State
/mx:states

mx:Label text={dataObject}/

/mx:VBox







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

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

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

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




[flexcoders] Re: Problem with listItemRenderer and AddChild

2006-02-09 Thread tobiaspatton
Yes. I am using Flex 2 Beta 1.

When you run the application and click on Alpha, is a button 
appearing underneath Alpha, or Beta? It should be Alpha.

Thanks.
Tobias.

--- In flexcoders@yahoogroups.com, Eric D Anderson [EMAIL PROTECTED] 
wrote:

 Hi,
 
 I tried this with the Flex 2 beta and I don't see any problem.  
Can you confirm you're using Flex 2 beta?
 
 Thanks
 
 Eric
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton
 Sent: Thursday, February 09, 2006 6:42 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problem with listItemRenderer and AddChild
 
 Hi again;
 
 This might be a bug. The code at the end of this message creates a 
 list with a custom item renderer. The renderer handles clicks by 
 changing the component's state, effectively adding a button.
 
 This works fine as long as the list property `variableRowHeight' 
is 
 set to `false'. If it it set to true, very strange things happen. 
 Clicking on the first row adds a button to the second row. 
 Repeatedly clicking on the first row will add a button to the 
second 
 row, remove it, add it to the first row and then remove it.
 
 Does anyone know a way to dynamically add and remove children from 
a 
 custom list item renderer that allows variable height rows?
 
 Thanks.
 Tobias.
 
 Here's the code:
 
 - TestAddChild.mxml -
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
 xmlns=* layout=absolute
   mx:ArrayCollection id=ac
   mx:Array
   mx:StringAlpha/mx:String
   mx:StringBeta/mx:String
   /mx:Array
   /mx:ArrayCollection
   
   mx:VBox id=vb width=300   
   mx:List variableRowHeight=true
   rowHeight=60
   dataProvider={ac} 
   listItemRenderer=ItemRenderer
   width=300/
   /mx:VBox
 /mx:Application
 
 - ItemRenderer.mxml -
 
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.macromedia.com/2005/mxml; xmlns=* 
 click=DoItemClick(event)
   height=60
   mx:Script
   ![CDATA[   
   public function DoItemClick( 
 event:MouseEvent ):void
   {
   currentState = ( currentState == 
 null ) ? openState : null;
   }
   ]]
   /mx:Script
   
   mx:states
   mx:State name=openState
   mx:AddChild
   mx:Button label={dataObject}/
   
   /mx:AddChild
   /mx:State
   /mx:states
   
   mx:Label text={dataObject}/
 
 /mx:VBox
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com 
 Yahoo! Groups Links








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

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

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

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




[flexcoders] set dataObject() and null properties

2006-02-08 Thread tobiaspatton
Hello;

I'm trying to get some understanding of renderers for lists and data 
grids. I'm working with, and adapting, the sample code presented in 
the Flex 2 documentation. Here's what I have (catalog.xml is from 
the flexstore example):

-- prototype.mxml -

?xml version=1.0?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns:local=*

mx:Model id=catalog source=assets/catalog.xml/

mx:HorizontalList
dataProvider={catalog.product}
width=100%
listItemRenderer=Thumbnail
columnWidth=120
height=140 hScrollPolicy=on/
/mx:Application

- Thumbnail.mxml -

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2005/mxml;
 horizontalAlign=center
 verticalGap=0 
 borderStyle=none 

mx:Script
![CDATA[

override public function set dataObject
(value:Object):void
{
super.dataObject = value;
trace( value.image, image);

if( image != null )
{
image.source = value.image;
}
}
]]
/mx:Script
 
mx:Image id=image width=60 height=60 
horizontalAlign=center/  
/mx:VBox

-- debugger output --

[SWF] C:\Documents and Settings\tpatton\My Documents\Flex\Prototype1
\bin\Prototype1-debug.swf - 615,987 bytes after decompression
assets/pic/Nokia_6010.gif 
Application_5._HorizontalList1:HorizontalList.ListBaseContentHolder_1
0.hiddenItem:VBox.image:Image
assets/pic/Nokia_6010.gif null
assets/pic/Nokia_3100_blue.gif null
assets/pic/Nokia_3100_pink.gif null
assets/pic/Nokia_3120.gif null
assets/pic/Nokia_3220.gif null
assets/pic/Nokia_3650.gif null
assets/pic/Nokia_6820.gif null
assets/pic/Nokia_6670.gif null
assets/pic/Nokia_6620.gif null
[Unload SWF] C:\Documents and Settings\tpatton\My 
Documents\Flex\Prototype1\bin\Prototype1-debug.swf


From the output we can see that the dataObject setter function is 
being called once when the image parameter is a real value, but for 
all subsequent calls, the image parameter is null.

Why would this be? It's hard to set the source parameter of null.

Thanks.
Tobias.









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

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

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

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





[flexcoders] Control with focus when application starts

2006-02-07 Thread tobiaspatton
Hello;

I'm trying to find a way to give a particular field focus when the 
application starts. The code that I think should work is at the 
bottom of this message. 

What it does is this: when the application starts, 'ti1' is drawn 
with a focus ring, as though it had focus, but it does not receive 
keyboard events. If I hit Tab once, the browser's location text 
edit field is highlighted.  The second Tab press brings focus 
to 'ti1'.

Does anyone know how to make this work the way I want it? That 
is, 'ti1' has focus and receives keyboard events as soon as the 
application has finished loading.

Thanks.
Tobias

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; 
xmlns=* layout=absolute 
creationComplete=Init()
mx:Script
![CDATA[
private function Init()
{
application.getFocusManager
().setFocus( ti2 );
}
]]
/mx:Script
mx:TextInput x=10 y=10 id=ti1/
mx:TextInput x=10 y=40 id=ti2/
/mx:Application






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

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

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

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




[flexcoders] Support for datagram sockets in Flex 2.0?

2006-02-06 Thread tobiaspatton
The subject line says it all.

I can't find a way to create a datagram socket in Flex 2.0. Is there one?

Thanks.
Tobias.





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

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

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

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




[flexcoders] WebService stopped working in 2.0 Beta 1

2006-02-01 Thread tobiaspatton
Hello;

I finally got my web service experiment off the ground by rewriting 
the server as an .asmx file. However, now that I've downloaded and 
installed 2.0 Beta 1, it's stopped working.  Here's some code I 
adapted from the Restaurants sample included in the Alpha 
distribution (but missing from the Beta. I wonder why?). The logger 
output is at the bottom of this email.

Using tcpflow (http://www.entropy.ch/software/macosx/) to monitor 
network activity, it seems that the Flex application is not putting 
any data on the wire.

Does anybody have any insight as to what I might be doing wrong?

As should be clear from the code and the above explanation, I'm not 
using the Flex Enterprise server. I'm communicating directly with 
the WS.

Thanks.

Tobias.


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

mx:Script
![CDATA[   
import mx.collections.*;
import mx.rpc.soap.*;
import mx.rpc.events.*;
import mx.logging.targets.TraceTarget;
import mx.logging.*;

public function wsResult( event : 
ResultEvent ) : void
{
ta1.text = event.result.toString();
}


public function wsFault( event : 
FaultEvent ) : void
{
ta1.text = Fault:  + 
event.fault.faultstring;
}

public function UseWebService() : void
{
var logTarget:TraceTarget = new 
TraceTarget();
logTarget.filters=[mx.rpc.*];
logTarget.level=LogEventLevel.ALL;
Log.addTarget(logTarget);

var ws:WebService = new 
mx.rpc.soap.WebService();   
ws.wsdl 
= http://flexapps.macromedia.com/ws/services/RestaurantWS?wsdl;;
ws.fetchWSDL(); 


ws.addEventListener(result, 
wsResult);
ws.addEventListener(fault, wsFault);

ws.GetRestaurants();

ta1.text = Request sent...;   

}
]]
/mx:Script

mx:Canvas width=100% height=100%
mx:Button x=5 y=7 label=Do It 
click=UseWebService()/
mx:TextArea x=66 y=8 width=572 height=56 
id=ta1/
/mx:Canvas
/mx:Application

[SWF] /Flash/WebService1-debug.swf - 761,066 bytes after 
decompression
Registering schema namespace: http://www.w3.org/1999/XMLSchema
Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
Registering schema namespace: http://www.w3.org/2001/XMLSchema
Registering schema namespace: 
http://schemas.xmlsoap.org/soap/encoding/
Registering schema namespace: http://xml.apache.org/xml-soap
Registering schema namespace: http://rpc.xml.coldfusion
Creating SOAP Operation for fetchWSDL
Queueing SOAP operation fetchWSDL
Creating SOAP Operation for GetRestaurants
Queueing SOAP operation GetRestaurants
[Unload SWF] /Flash/WebService1-debug.swf






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

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

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

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




[flexcoders] Web services that have multiple 'out' parameters

2006-02-01 Thread tobiaspatton
Hello everyone;

(I'm trying hard to limit myself to just two questions a day. I don't 
want all of you automatically rolling your eyes when you see my name 
in the from: field)

I have a web service that returns two parameters in the reply. I can 
confirm that they're both there by looking at the debug trace of the 
SOAP reply, or by setting resultFormat=e4x. However, when Flex 
parses the reply into ActionScript objects, only the first 'out' 
parameter is included in the result.

Is this expected behaviour? I can work around it by grouping the 'out' 
parameters in a trivial class on the server, but would prefer not to.

Thanks.
Tobias.






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

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

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

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




[flexcoders] Problems accessing .NET 2.0 web service

2006-01-31 Thread tobiaspatton
Hello everyone;

I'm having dificulty accessing a web service using ws:WebService. 
The service was created using .NET 2.0 and Windows Communication 
Foundation. It's hosted on my local machine. A client written in C# 
has no problem accessing it. When accessed through a small Flex 2.0 
application, the fault handler is invoked with this message: There 
are no valid ports in the WSDL file for the JobHierarchyService 
service.

I've run the Restaurant example project to confirm that web services 
work on my machine.

I'm new to Flash and Flex and would appreciate any help.

Thanks.

Tobias.

Here's the relevant code:

var ws:WebService = new WebService();   
ws.wsdl = http://localhost:8080/JobHierarchyService?wsdl;;
ws.fetchWSDL();
ws.addEventListener(result, wsResult);
ws.addEventListener(fault, wsFault);
var call : Object  = ws.Echo( Hello World );

Here's the debug trace:

[SWF] /Flash/WebService1-debug.swf - 1,016,919 bytes after 
decompression
Registering schema namespace: http://www.w3.org/1999/XMLSchema
Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
Registering schema namespace: http://www.w3.org/2001/XMLSchema
Registering schema namespace: 
http://schemas.xmlsoap.org/soap/encoding/
Registering schema namespace: http://xml.apache.org/xml-soap
Registering schema namespace: http://rpc.xml.coldfusion
Creating WSDL object for http://localhost:8080/JobHierarchyService?
wsdl
Fetching document http://localhost:8080/JobHierarchyService?wsdl for 
destination 'defaultHttp'
Creating SOAP Operation for Echo
Queueing SOAP operation Echo
Processing imports
Parsing schemas
Done parsing schemas: 0 ms
Fetching document http://localhost:8080/JobHierarchyService?
wsdl=wsdl1 for destination 'defaultHttp'
Processing imports
Parsing schemas
Registering schema namespace: 
http://kodak.com/WPE/Dashboard/JobServer/Imports
Done parsing schemas: 1 ms
Done processing imports: 258 ms
Parsing services
Parsing individual services
Parsing service: JobHierarchyService
Parsed service: 1 ms
Done parsing services: 3 ms
WSDL parse took 263 ms
WSDL loaded
Faulting previously queued operation calls Echo
Service stub found fault upon receiving WSDL
(http://localhost:8080/JobHierarchyService?wsdl): 
There are no valid ports in the WSDL file for the 
JobHierarchyService service.
[UnloadSWF] /Flash/WebService1-debug.swf

Here's the WSDL:

  ?xml version=1.0 encoding=utf-8 ? 
- wsdl:definitions name=JobHierarchyService 
targetNamespace=http://tempuri.org/; 
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
xmlns:i0=http://kodak.com/WPE/Dashboard/JobServer; 
xmlns:tns=http://tempuri.org/; 
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; 
xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; 
xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; 
xmlns:ci=http://schemas.microsoft.com/ws/2005/01/WSDL/Extensions/Con
tractInheritance xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex; 
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-utility-1.0.xsd 
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
- wsp:Policy wsu:Id=WSHttpBinding_IJobHierarchyService_policy
- wsp:ExactlyOne
- wsp:All
- sp:SymmetricBinding 
xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy;
- wsp:Policy
- sp:ProtectionToken
- wsp:Policy
- sp:SecureConversationToken 
sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
/IncludeToken/AlwaysToRecipient
- wsp:Policy
  sp:RequireDerivedKeys / 
  mssp:RequireCancel wsp:Optional=true 
xmlns:mssp=http://schemas.microsoft.com/ws/2005/07/securitypolicy; /
 
- sp:BootstrapPolicy
- wsp:Policy
- sp:SymmetricBinding
- wsp:Policy
- sp:ProtectionToken
- wsp:Policy
- sp:SpnegoContextToken 
sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
/IncludeToken/AlwaysToRecipient
- wsp:Policy
  sp:RequireDerivedKeys / 
  mssp:RequireCancel wsp:Optional=true 
xmlns:mssp=http://schemas.microsoft.com/ws/2005/07/securitypolicy; /
 
  /wsp:Policy
  /sp:SpnegoContextToken
  /wsp:Policy
  /sp:ProtectionToken
- sp:AlgorithmSuite
- wsp:Policy
  sp:Basic256 / 
  /wsp:Policy
  /sp:AlgorithmSuite
- sp:Layout
- wsp:Policy
  sp:Strict / 
  /wsp:Policy
  /sp:Layout
  sp:IncludeTimestamp / 
  sp:OnlySignEntireHeadersAndBody / 
  /wsp:Policy
  /sp:SymmetricBinding
- sp:Wss11
- wsp:Policy
  sp:MustSupportRefKeyIdentifier / 
  sp:MustSupportRefIssuerSerial / 
  sp:MustSupportRefThumbprint / 
  sp:MustSupportRefEncryptedKey / 
  /wsp:Policy
  /sp:Wss11
- sp:Trust10
- wsp:Policy
  sp:MustSupportIssuedTokens / 
  sp:RequireClientEntropy / 
  sp:RequireServerEntropy / 
  /wsp:Policy
  /sp:Trust10
  /wsp:Policy
  /sp:BootstrapPolicy
  /wsp:Policy
  /sp:SecureConversationToken
  /wsp:Policy
  /sp:ProtectionToken
- sp:AlgorithmSuite
- wsp:Policy
  sp:Basic256 / 
  /wsp:Policy
  /sp:AlgorithmSuite
- sp:Layout
- wsp:Policy
  sp:Strict / 
  /wsp:Policy
  

[flexcoders] Re: Problems accessing .NET 2.0 web service

2006-01-31 Thread tobiaspatton
The WSDL is at the bottom of the original message. Given that there 
are tags using the SOAP12 namespace, I think your guess is right.

Thanks.
Tobias.

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

 This is likely using the WSDL 1.2 specification in which case the 
Flex
 client cannot currently communicate with it. If you post the WSDL, 
I can
 verify this.
 
 
 Carson 
 
 
 
  
 Carson Hager
 Cynergy Systems, Inc.
 http://www.cynergysystems.com
  
 Email:  [EMAIL PROTECTED]
 Office:  866-CYNERGY
 Mobile: 1.703.489.6466
  
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of tobiaspatton
 Sent: Tuesday, January 31, 2006 8:25 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Problems accessing .NET 2.0 web service
 
 Hello everyone;
 
 I'm having dificulty accessing a web service using ws:WebService. 
 The service was created using .NET 2.0 and Windows Communication 
 Foundation. It's hosted on my local machine. A client written in 
C# 
 has no problem accessing it. When accessed through a small Flex 
2.0 
 application, the fault handler is invoked with this 
message: There 
 are no valid ports in the WSDL file for the JobHierarchyService 
 service.
 
 I've run the Restaurant example project to confirm that web 
services 
 work on my machine.
 
 I'm new to Flash and Flex and would appreciate any help.
 
 Thanks.
 
 Tobias.
 
 Here's the relevant code:
 
 var ws:WebService = new WebService(); 
 ws.wsdl = http://localhost:8080/JobHierarchyService?wsdl;;
 ws.fetchWSDL();
 ws.addEventListener(result, wsResult);
 ws.addEventListener(fault, wsFault);
 var call : Object  = ws.Echo( Hello World );
 
 Here's the debug trace:
 
 [SWF] /Flash/WebService1-debug.swf - 1,016,919 bytes after 
 decompression
 Registering schema namespace: http://www.w3.org/1999/XMLSchema
 Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
 Registering schema namespace: http://www.w3.org/2001/XMLSchema
 Registering schema namespace: 
 http://schemas.xmlsoap.org/soap/encoding/
 Registering schema namespace: http://xml.apache.org/xml-soap
 Registering schema namespace: http://rpc.xml.coldfusion
 Creating WSDL object for http://localhost:8080/JobHierarchyService?
 wsdl
 Fetching document http://localhost:8080/JobHierarchyService?wsdl 
for 
 destination 'defaultHttp'
 Creating SOAP Operation for Echo
 Queueing SOAP operation Echo
 Processing imports
 Parsing schemas
 Done parsing schemas: 0 ms
 Fetching document http://localhost:8080/JobHierarchyService?
 wsdl=wsdl1 for destination 'defaultHttp'
 Processing imports
 Parsing schemas
 Registering schema namespace: 
 http://kodak.com/WPE/Dashboard/JobServer/Imports
 Done parsing schemas: 1 ms
 Done processing imports: 258 ms
 Parsing services
 Parsing individual services
 Parsing service: JobHierarchyService
 Parsed service: 1 ms
 Done parsing services: 3 ms
 WSDL parse took 263 ms
 WSDL loaded
 Faulting previously queued operation calls Echo
 Service stub found fault upon receiving WSDL
 (http://localhost:8080/JobHierarchyService?wsdl): 
   There are no valid ports in the WSDL file for the 
 JobHierarchyService service.
 [UnloadSWF] /Flash/WebService1-debug.swf
 
 Here's the WSDL:
 
   ?xml version=1.0 encoding=utf-8 ? 
 - wsdl:definitions name=JobHierarchyService 
 targetNamespace=http://tempuri.org/; 
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
 xmlns:i0=http://kodak.com/WPE/Dashboard/JobServer; 
 xmlns:tns=http://tempuri.org/; 
 xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; 
 xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; 
 xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; 
 
xmlns:ci=http://schemas.microsoft.com/ws/2005/01/WSDL/Extensions/Con
 tractInheritance 
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; 
 xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
 xmlns:wsx=http://schemas.xmlsoap.org/ws/2004/09/mex; 
 xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
 wssecurity-utility-1.0.xsd 
 xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
 - wsp:Policy wsu:Id=WSHttpBinding_IJobHierarchyService_policy
 - wsp:ExactlyOne
 - wsp:All
 - sp:SymmetricBinding 
 xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy;
 - wsp:Policy
 - sp:ProtectionToken
 - wsp:Policy
 - sp:SecureConversationToken 
 
sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
 /IncludeToken/AlwaysToRecipient
 - wsp:Policy
   sp:RequireDerivedKeys / 
   mssp:RequireCancel wsp:Optional=true 
 
xmlns:mssp=http://schemas.microsoft.com/ws/2005/07/securitypolicy; /
  
 - sp:BootstrapPolicy
 - wsp:Policy
 - sp:SymmetricBinding
 - wsp:Policy
 - sp:ProtectionToken
 - wsp:Policy
 - sp:SpnegoContextToken 
 
sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
 /IncludeToken/AlwaysToRecipient
 - wsp:Policy
   sp:RequireDerivedKeys / 
   mssp:RequireCancel wsp:Optional=true

[flexcoders] FlexBuilder on Mac

2006-01-26 Thread tobiaspatton
Anyone get this to work?

I installed Eclipse 3.1 on my Mac and copied over the features, plugins, etc. 
from a Windows install of FlexBuilder. The IDE launches but will not open the 
MXML editor. The following exception is logged to console: 

java.lang.NullPointerException
at zorn.editors.mxml.MXMLEditor.init(MXMLEditor.java:165)

A couple things I've noticed: in the About Eclipse dialog (under the Help 
menu), the Flex logo does not appear alongside the Eclipse logo. Also, under 
installed features, none of the zorn.* features appear. Worst of all, the 
zorn features xml files have the following lines at the top:

os=win32
ws=win32

Anyone know if it will ever be possible to run FlexBuilder on a Mac?

Thanks.
Tobias.






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

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

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

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