Re: [flexcoders] Debug Flash Player 10.0.42.34 ?

2009-12-11 Thread flexcoders . list
On Thu, Dec 10, 2009 at 11:23:38 -0500, Rick Winscot wrote:
 Any ETA or information from Adobe-ites when we might expect to see debug
 packages?

They are available here:
http://www.adobe.com/support/flashplayer/downloads.html

Look for the 12/8/2009 sections.




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

2009-03-18 Thread flexcoders . list
Hello, has anyone else noticed that AIR's XML.appendChild() implementation
differs in behaviour from the regular Flex/Flash Player? In particular,
AIR appears to perform XML escaping of strings, while Flex/FP sort of
expects already-escaped Strings?

The following example yields different results in AIR vs Flex:

mx:Script
![CDATA[
protected function doit(e:Event):void
{
var x:XML = outer /;
var y:XML = inner /;
y.appendChild('hello lt;amp;gt; test');
x.appendChild(y);
txt1.text = x.toString();
txt2.text = x.toXMLString();
}

]]
/mx:Script

mx:Button click='doit(event)' label='Click' /
mx:TextArea id='txt1' width=100% height=50% 
/mx:TextArea
mx:TextArea id='txt2' width=100% height=50% 
/mx:TextArea


Output in Flex:

outer
  innerhello lt;amp;gt; test/inner
/outer


Output in AIR:

outer
  innerhello amp;lt;amp;amp;amp;gt; test/inner
/outer


Note the double XML encoding in AIR. 

The AIR behaviour is of course the most correct; one would
really expect y.appendChild('hello  test'); to be proper API
usage, but that just breaks the flash player. So, to handle
arbitrary user input (including stuff that resembles XML markup) 
to an XML node value in FP it is necessary to manually apply
XMl encoding to the string before passing it into appendChild(),
but in AIR this naturally results in doubly-encoded text nodes.

This is particularly problematic when working with flex library
projects that are shared between flex and air projects. Guess
I'll need to add some air detection code, and only do the
manual XML encoding on the string if running outside of AIR.

(Also, trying to use CDATA notes doesn't work either, especially
if the text to escape contains ]])

Comments?



[flexcoders] E4X normalize() + CDATA = invalid XML, data loss

2008-11-11 Thread flexcoders . list
I'm getting some very strange results from E4X and normalize() when
working with CDATA text nodes, especially when those text nodes may
contain strings that, unescaped, represent CDATA end tags.

Consider the following code:


var x:XML = test /;
x.appendChild('![CDATA[ test1 ');
x.appendChild('![CDATA[ test2 ]]');

trace ('--- before normalize (string value) ---');
trace (x.toString());
trace ('--- before normalize (full xml) ---');
trace (x.toXMLString());
trace (\n);

x.normalize();

trace ('--- after normalize (string value) ---');
trace (x.toString());
trace ('--- after normalize (full xml) ---');
trace (x.toXMLString());
trace (\n);

var xAsString:String = x.toXMLString();
x = XML(xAsString);

trace ('--- after reparse (string value) ---');
trace (x.toString());
trace ('--- after reparse (full xml) ---');
trace (x.toXMLString());
trace (\n);


Here's the output when using Flash Player 10.0.12.36 Debug on Linux:

  --- before normalize (string value) ---
   test1 ]] test2 
  --- before normalize (full xml) ---
  test
![CDATA[ test1 
![CDATA[ test2 ]]
  /test


  --- after normalize (string value) ---
   test1 ]] test2 
  --- after normalize (full xml) ---
  test![CDATA[ test1 ]] test2 ]]/test


  --- after reparse (string value) ---
   test1 test2 ]]
  --- after reparse (full xml) ---
  test
![CDATA[ test1 ]]
test2 ]]gt;
  /test


Note how the call to .normalize() causes the text of test to be
concatenated to one incorrectly formatted CDATA node, containing an
unescaped ]] end-of-CDATA marker. The resulting XML is invalid and
will not parse with other XML parsers, such as libxml2's xmllint:

  badxml.xml:1: parser error : Sequence ']]' not allowed in content
test![CDATA[ test1 ]] test2 ]]/test

Using Flash's E4X to re-parse this XML does not throw an error, but the
resulting XML does not represent the original XML in any way. It appears
that the XML parser switches out of CDATA-mode when reaching the first
end-of-CDATA-marker (between 'test1' and 'test2'), and then enters some
sort of lenient parser mode where it helpfully converts the bare ''
after test2 into gt;. Of course, the resulting string value for
test's text node is very much different from its original contents.
(compare 'after normalize (string value)' to 'after reparse (string
value)')

On the other hand, not calling .normalize() causes the resulting XML to
contain a newline \n character between the two original CDATA text
nodes, which when parsed by other xml readers usually results in
]]\n, or worse ]]\n  . 



Anyone have any experience with how to properly embed strings containing
xml-ish content with E4X?



[flexcoders] Using ampersand character in contextmenuitem label

2008-10-27 Thread flexcoders . list
Does anyone know if it's possible to use the ampersand () character
in a contextmenuitem label? (i.e. as an entry in a custom 
right-click flash menu)

It appears that the underlying GUI framework interprets the 
character in various ways depending on OS, most of the time causing the
following character to be underlined, as if it was the hotkey for the
menu item in question.

These are some results I've observed:

Label 'Test  test':
  * On windowsxp + ff3 + FP 9:   Test  test 
  * On windowsxp + ie7 + FP 10:  Test  test 
  * On linux + ff3 + FP 10:  Test _test   
  * On mac os x  + ff3 + FP 9:   Test  test
  * On mac os x  + safari + FP9: Test  test

Label 'Test  test':
  * On windowsxp + ff3 + FP 9:   Test  test 
  * On windowsxp + ie7 + FP 10:  Test  test 
  * On linux + ff3 + FP 10:  Test  test with  underlined
  * On mac os x  + ff3 + FP 9:   Test  test
  * On mac os x  + safari + FP9: Test  test
   

Some sample code:
package {
import flash.display.Sprite;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;

public class test_as3 extends Sprite
{
public function test_as3()
{
var menu:ContextMenu = new ContextMenu;
menu.customItems.push(new ContextMenuItem('1Test  test'));
menu.customItems.push(new ContextMenuItem('2Test  test'));
contextMenu = menu;
}
}
}

Should I file this as a bug on the flash player jira tracker?




Re: [flexcoders] Re: Using ampersand character in contextmenuitem label

2008-10-27 Thread flexcoders . list
On Mon, Oct 27, 2008 at 19:05:11 -, diehlryan wrote:
 I haven't tried this, but try using the amp; in place of  like you
 would have to do in MXML...
 
 menu.customItems.push(new ContextMenuItem('1Test amp; test'));

Thanks for the suggestion, but unfortunately that doesn't work either.
At least on Windows it renders as Test amp; test with the 'a' in
'amp;' underlined. (didn't bother to test the other platforms9.


 


[flexcoders] Connecting to flexbuilder debugger from flash player without launching a new debug session?

2008-06-26 Thread flexcoders . list
(Resending since the first mail never showed up, sorry for
any duplicates that may appear)


Hello list,

Is there a way to configure Flex Builder 3 to always be listening in the
background for debugger connections from the Flash Player?

In other words, I'd like to be able to right click in the flash player,
choose Debugger.., click Connect and have Flex Builder enter debug
mode on a SWF that has already been running for a while in the browser. 

I've figured out a hack that sort-of gets me there - by configuring a
debug profile in flex builder with about:blank as the launch URL, I
can hit F11 in flexbuilder, click Debug, close the about:blank window
in Firefox, switch back to the running SWF, rightclick, choose
Debugger and click Connect. But it would be much better if one could
avoid having to do the whole F11-about:blank-closetab dance, and just
click Debugger-Connect and go.

For what it's worth, this is on Linux with Firefox 3.

- Frode 



[flexcoders] Connecting to flexbuilder debugger from flash player without launching a new debug session?

2008-06-26 Thread flexcoders . list
Hello list,

Is there a way to configure Flex Builder 3 to always be listening in the
background for debugger connections from the Flash Player?

In other words, I'd like to be able to right click in the flash player,
choose Debugger.., click Connect and have Flex Builder enter debug
mode on a SWF that has already been running for a while in the browser. 

I've figured out a hack that sort-of gets me there - by configuring a
debug profile in flex builder with about:blank as the launch URL, I
can hit F11 in flexbuilder, click Debug, close the about:blank window
in Firefox, switch back to the running SWF, rightclick, choose
Debugger and click Connect. But it would be much better if one could
avoid having to do the whole F11-about:blank-closetab dance, and just
click Debugger-Connect and go.

For what it's worth, this is on Linux with Firefox 3.

- Frode 



Re: [flexcoders] Encoding Problem in linux

2008-06-19 Thread flexcoders . list
On Thu, Jun 19, 2008 at 09:30:01 -, Deniz Davutoglu wrote:
 Hello Guys,
 Today I switched completely to Ubuntu Linux. Last month I produced
 some CMS for our corporate website in FLEX. From Linux I tried to
 update some content but I experienced something wear. When I try to
 enter new data from keyboard characters which are in Turkish like
 öü#351;ç become öüçş but same chars which comes from MYSQl seems ok. 
 do you have any idea about this problem. 

Could it be related to this Linux Flash player bug?
http://bugs.adobe.com/jira/browse/FP-40