[flexcoders] Re: Adobe has open-sourced the Text Layout Framework (TLF)

2009-07-22 Thread Dennis van Nooij
hmm. weird. I'm sure I read it yesterday, but I been reading a lot of articles 
about the TLF as well so it must have be in one of those.. I have searching 
around but can't find it anymore.

anyway. Your response probably also answered my question that tables are not 
yet supported.. Is there any news on when it is planned ?

Dennis


--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote:

 I searched the businesswire article for the word table and didn't find it. 
 Where do you see this?
 
 Gordon Smith
 Adobe Flex SDK Team
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of Dennis van Nooij
 Sent: Tuesday, July 21, 2009 5:07 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Adobe has open-sourced the Text Layout Framework 
 (TLF)
 
 
 
 that's great. The first article states that tables are also supported, but if 
 I remember correct that used to be reserved for a later version?
 
 thanks,
 Dennis
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
 Gordon Smith gosmith@ wrote:
 
  http://eon.businesswire.com/portal/site/eon/permalink/?ndmViewId=news_viewnewsId=20090720006233newsLang=en
 
  http://opensource.adobe.com/wiki/display/tlf/Text+Layout+Framework
 
  Gordon Smith
  Adobe Flex SDK Team
 





[flexcoders] Re: Adobe has open-sourced the Text Layout Framework (TLF)

2009-07-21 Thread Dennis van Nooij
that's great. The first article states that tables are also supported, but if I 
remember correct that used to be reserved for a later version?

thanks,
Dennis

--- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote:

 http://eon.businesswire.com/portal/site/eon/permalink/?ndmViewId=news_viewnewsId=20090720006233newsLang=en
 
 http://opensource.adobe.com/wiki/display/tlf/Text+Layout+Framework
 
 Gordon Smith
 Adobe Flex SDK Team





[flexcoders] Profiling Flex applications for Flash player 10

2009-03-24 Thread Dennis van Nooij
is anyone able to profile a Flex application that is targetted for Flash player 
10 ? Our Air application run, debugs and profiles fine but the web version 
throws an RTE on startup:

ReferenceError: Error #1065: Variable ContextMenuClipboardItems is not defined.

to locate the problem I created a sample project which runs fine at first but 
when adding a library project it falls back to the same error as above ?

I'm using SDK version 3.3

thanks,
Dennis  




[flexcoders] Re: Profiling Flex applications for Flash player 10

2009-03-24 Thread Dennis van Nooij
I followed the instructions from here:

http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10

so I changed flex-config.xml. If I understand it correctly that should make all 
my project compile for Flash Player 10. Which appeared to be working as 
FileReference.save() now showed up in the autocomplete (=Flash Player 1- 
feature).

Anyway, I added the -target-player=10.0.0 to the additional commandline 
parameters for both projects (first tried library project alone). Now I do not 
get the RTE but the application freezes while showing the loading bar (RTE in 
the background ??)




--- In flexcoders@yahoogroups.com, Paresh M More pareshm...@... wrote:

 In flex properties, Flex compiler, set Flash player 10.0.0
 i would work
 
 Regards,
 Paresh M. More
 Software Engineer
 
 Nashik/Pune, Maharashtra, India.
 Email - pareshm...@...
 
 
 On Tue, Mar 24, 2009 at 5:19 PM, Dennis van Nooij den...@...wrote:
 
is anyone able to profile a Flex application that is targetted for Flash
  player 10 ? Our Air application run, debugs and profiles fine but the web
  version throws an RTE on startup:
 
  ReferenceError: Error #1065: Variable ContextMenuClipboardItems is not
  defined.
 
  to locate the problem I created a sample project which runs fine at first
  but when adding a library project it falls back to the same error as above ?
 
  I'm using SDK version 3.3
 
  thanks,
  Dennis
 
   
 





[flexcoders] Re: Air/Flex/Html roundtrip?

2009-02-02 Thread Dennis van Nooij
not sure which part of the solution you're after but:
- from AIR you can create hooks in your html page, using something
like myHtml.htmlLoader.window.customJSHandler = this.onCustomJSHandler
- customJSHandler can be called from within your htmlpage by a
href=javascript:customJSHandler/

cheers,
Dennis
--- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote:

 If this were an ideal world I'd be able to specify a function in my
flex/AIR app as an html link in an html page rendered by the application.
 
 Any ideas about how I might achieve this?
 
 Paul





[flexcoders] Flash print: how

2008-10-01 Thread Dennis van Nooij
we're having some issues with printing here. Using FlexReport I've
managed to throw out a decent print, but on some printers it is
apparently very slow. Does anyone know about how this is actually
printed from Flash / AIR in terms of LPR / raw / Postscript levels ?

cheers,
Dennis van Nooij



[flexcoders] Re: Observing collections

2008-08-14 Thread Dennis van Nooij
try this:

package com.adobe.ac
{
import mx.events.CollectionEvent;
import mx.collections.ArrayCollection;
import flash.events.Event;
import mx.core.Application;
import mx.core.UIComponent;


/**
 * 
 * monitors Collections and react on reassining of the variable 
 * and changes in the collection which are bindable
 * 
 */ 
public class ObserveCollection extends Observer
{
private var _handler : Function;
private var _source : Object;

override public function get handler() : Function
{
return _handler;
}

public function set handler( value : Function ) : void
{
_handler = value;
if( value != null )
{
isHandlerInitialized = true;
if( isHandlerInitialized  isSourceInitialized 
)
{
callHandler();
}
}
}
  
override public function get source() : Object
{
return _source;
}

public function set source( value : Object ) : void
{   
if (_source != null){

_source.removeEventListener(CollectionEvent.COLLECTION_CHANGE,collectionChangeHandler);

}
_source = value;

_source.addEventListener(CollectionEvent.COLLECTION_CHANGE,collectionChangeHandler);

isSourceInitialized = true;  

if( isHandlerInitialized  isSourceInitialized )
{
callHandler();
}
}

protected override function callHandler() : void
{
try
{
handler.call( null, source );
}
catch( e : Error )
{
delay( e );
}
}
   
protected override function delay( e : Error ) : void
{
UIComponent( Application.application ).callLater( 
throwException, [
e ] );
}
   
private function throwException( e : Error ) : void
{
throw e;
}   

private function collectionChangeHandler (event:Event) : void 
{

callHandler();
}   


}
}


cheers,
Dennis


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

 Never used Observe, but if it implements IMXMLObject or you subclass and
 do so, then you can use it in MXML
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Richard Rodseth
 Sent: Wednesday, August 13, 2008 4:16 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Observing collections
 
  
 
 For some reason I have an aversion to adding event listeners in
 ActionScript, favouring binding expressions and the Observe tag from
 Adobe Consulting. Not sure how rational this is, but there you have it.
 Binding is just so damn elegant.
 
 However, collections are a problem. It seems that so often you want to
 update something if either the collection itself or its contents
 changes, and you don't really care about the details of the change.
 
 I suppose if you're a DataGrid watching its dataprovider you do care and
 can minimize updates, but in many of the use cases I've encountered,
 that's not the case - my observer is going to do something with the
 whole collection (or maybe I've just been lazy about exploiting possible
 optimizations).
 
 Is there anything like the Observe tag that can be instantiated in MXML
 and can trigger a function call on a COLLECTION_CHANGE event?





[flexcoders] disable type-ahead look-ups in AdvancedDataGrid..

2008-08-05 Thread Dennis van Nooij
currently the AdvancedDataGrid use type-ahead look-ups on the first
column, so if you enter any character it will search for that an item
that matches it and focus that item. Problem is that I have defined a
list of shortcut keys (like CTR+I) to do actions on those items on the
list, so every time I press one of the shortcuts the focus jumps
toanother item.. Is there an way to kill this type-ahead look-ups?

thanks,
Dennis



[flexcoders] Reflect column sorting in AdvancedDataGrid

2008-06-06 Thread Dennis van Nooij
I'm using an AdvancedDatagrid where my sorting is done on the server
(total result set is bigger than the list shown at client). So when I
click a header, sort info is added to the request and result comes
back sorted correctly. My question is: How can I provide feedback on
how the results are sorted? Arrows on the columns are gone, probably
because dataprovider was refreshed. Is there a way to manually enable
those arrows again ?



[flexcoders] load video bytes in VideoDisplay

2008-01-23 Thread Dennis van Nooij
Hi all,

my video files are grabbed from a bytestream which also contains other
data and I was wondering how I could throw those video bytes into a
VideoDisplay component. For images I use loader.loadBytes and
image.source = loader.content and I was hoping to use a similiar
construction for my videos but could't find anything..

any ideas ?



[flexcoders] Upload file in chunks

2007-10-31 Thread Dennis van Nooij
Hi all,

I'm a bit stuck here in finding a solution for uploading files to our
server. Problem is that is has to be sent in DIME format (binary data
with some xml in it). What I was wondering is that for this solution
it looks like I have to read the file first, wrap it in a bytearray
and then convert it to a DIME record. Meaning that the complete file
has to be in memory before sending it. So for a 50MB file (Indesign
for instance) that would mean Flex needs at least 50 MB of memory extra...

so.. Ideally I'm looking for a URLStream solution, but then the upload
version, where I read a file in chunks and send those chunks to the
server. Any chance of building this on URLLoader or do I need to step
down to Socket for this ?

Dennis



[flexcoders] Re: Deep binding with Cairngorm question

2007-10-30 Thread Dennis van Nooij
I've created an add-on to Alex Uhlman observe tag
(http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s.cfm)
that not only monitors the settings of a collection but also tracks
changes in it.

package com.adobe.ac
{
import mx.events.CollectionEvent;
import flash.events.Event;

public class ObserveCollection extends Observe
{

private var _source : Object;


override public function get source() : Object
{
return _source;
}

public override function set source( value : Object ) : void
{   
if (_source != null)

_source.removeEventListener(CollectionEvent.COLLECTION_CHANGE,collectionChangeHandler);

_source = value;

_source.addEventListener(CollectionEvent.COLLECTION_CHANGE,collectionChangeHandler);

isSourceInitialized = true; 
if( isHandlerInitialized  isSourceInitialized )
{
callHandler();
}
}

private function collectionChangeHandler (event:Event) : void 
{

callHandler();
}   
}
}

Different approach, same result. :)

Dennis







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

 I have a VO:
 
 [Bindable]
 public class Product
 {
 public var productName : String;
 // several more attributes here
 }
 
 I place a large number of Products in my Cairngorm Singleton
 SellModelLocator in var productList : ArrayCollection;
 
 The entire SellModelLocator is declared Bindable.  In one of my mxml
 views I have the following:
 
 mx:Binding source=SellModelLocator.getInstance().productList
 destination=refreshFilters /
 
 I need this binding to execute refreshFilters whenever I add/remove a
 Product to productList as well as when I change an attribute in one of
 the Products contained in productList.  How do I do this?
 
 The follow will fire the refreshFilters:
 - SellModelLocator.getInstance().productList = new ArrayCollection();
 - SellModelLocator.getInstance().productList = someOtherArrayCollection;
 
 The following will NOT fire the refreshFilters:
 - SellModelLocator.getInstance().productList.addItem( new Product() );
 -
 Product(SellModelLocator.getInstance().productList.getItemAt(0)).status
 = ACTIVE;
 
 Any help on how to do a deep bind would be appreciated.
 
 Thanks,
 Dale





[flexcoders] Re: Yahoo maps api for flex 2

2007-10-30 Thread Dennis van Nooij
http://developer.yahoo.com/maps/flash/flexGettingStarted.html

Dennis


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

 As far as I know they haven't. They're AS2 map stuff has a version  
 that works in Flex, but it uses the old AVM1, and either a js or lc  
 bridge between that and your AS3 flex stuff.
 
 John
 
 
 On Oct 30, 2007, at 10:20 AM, Nate Pearson wrote:
 
  I thought that Yahoo made a new api for flex 2...maybe I dreamed it up
  because I can't find it on the net!
 
  Can anyone link me?
 
  Thanks,
 
  Nate
 
 
 
  --
  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
 
 
 
 
 John Robinson - Flash/Flex Developer at large
 Blog: http://jrobinsonmedia.wordpress.com





[flexcoders] Re: Yahoo maps api for flex 2

2007-10-30 Thread Dennis van Nooij
nevermind. Looks like its the old AVM1 version indeed.

Dennis

--- In flexcoders@yahoogroups.com, Dennis van Nooij [EMAIL PROTECTED] wrote:

 http://developer.yahoo.com/maps/flash/flexGettingStarted.html
 
 Dennis
 
 
 --- In flexcoders@yahoogroups.com, John Robinson jrobinso@ wrote:
 
  As far as I know they haven't. They're AS2 map stuff has a version  
  that works in Flex, but it uses the old AVM1, and either a js or lc  
  bridge between that and your AS3 flex stuff.
  
  John
  
  
  On Oct 30, 2007, at 10:20 AM, Nate Pearson wrote:
  
   I thought that Yahoo made a new api for flex 2...maybe I dreamed
it up
   because I can't find it on the net!
  
   Can anyone link me?
  
   Thanks,
  
   Nate
  
  
  
   --
   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
  
  
  
  
  John Robinson - Flash/Flex Developer at large
  Blog: http://jrobinsonmedia.wordpress.com
 





[flexcoders] ModuleManager.getAssociatedFactory returning wrong result ?

2007-10-25 Thread Dennis van Nooij
Hi,

I'm trying to split up my application into modules but ran into this
weird behaviour. According to the docs getAssociatedFactory should
return See if the referenced object is associated with (or, in the
managed ApplicationDomain of) a known IFlexModuleFactory implementation


The thing is when I startup my app without modules it returns null (as
it should) but when I load a module it returns the same factory for
objects in the module as well as in the shell .. ?

Here's the code:

Shell:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=loadModule()
mx:Script
![CDATA[
import mx.modules.ModuleLoader;
import mx.modules.ModuleManager;

private function loadModule () : void {

var factory = ModuleManager.getAssociatedFactory(shellButton);
trace(factory  + factory);
if (factory != null)
trace(factory name  + factory.name);
var module_ldr:ModuleLoader = new ModuleLoader();
module_ldr.url = ButtonModule.swf;
module_ldr.loadModule();
this.addChild(module_ldr);
}

private function traceFactory () : void {

var factory = ModuleManager.getAssociatedFactory(shellButton);
trace(factory  + factory);
if (factory != null)
trace(factory name  + factory.name);
}   
]]
/mx:Script
mx:Button id=shellButton x=166 y=41 label=Shell Button
click=traceFactory()/
/mx:Application


Module:

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
width=400 height=300
mx:Script
![CDATA[
import mx.core.IFlexModuleFactory;
import mx.modules.ModuleManager;

private function traceFactory () : void {

var factory = ModuleManager.getAssociatedFactory(button);
trace(factory  + factory);
if (factory != null)
trace(factory name  + factory.name);
}   
]]
/mx:Script
mx:Button id=button x=166 y=141 label=Module Button
click=traceFactory()/
/mx:Module


With this output:

[SWF]
Users:dennisvannooij:Documents:workspace:ModuleTest:bin:ModuleTest.swf
- 522,921 bytes after decompression
factory null
[SWF]
Users:dennisvannooij:Documents:workspace:ModuleTest:bin:ButtonModule.swf
- 518,830 bytes after decompression
factory [object _ButtonModule_mx_core_FlexModuleFactory]
factory name instance16
factory [object _ButtonModule_mx_core_FlexModuleFactory]
factory name instance16

Last two traces are from clicking first the shell button, then the
module button..

am I missing something here ?

Dennis





[flexcoders] Using conditional compilation to switch between Air and Web deploy

2007-10-23 Thread Dennis van Nooij
Hi,

after reading this link
(http://blogs.adobe.com/flexdoc/2007/10/conditional_compilation_in_mox_1.html)
about conditional compilation I decided to see if I could get it to
work for my Air / web switch.

looks like it does work but one major drawback is that you can't
debug. According to a comment on the link this will be fixed before
release though.

here's the code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute creationComplete=initDragAndDrop() 
mx:Script
![CDATA[
CONFIG::web { 
  trace(web);
  private function initDragAndDrop():void{} 
}   
CONFIG::air { 

  trace(air); 
  import flash.desktop.DragActions;
  import flash.desktop.ClipboardFormats
  import flash.events.NativeDragEvent;  
  
  private function initDragAndDrop():void{ 
this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,onDragIn);
this.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP,onDrop); 

  }

  public function onDragIn(event:NativeDragEvent):void{ 
flash.desktop.DragManager.acceptDragDrop(this);
  }

  public function onDrop(event:NativeDragEvent):void{   
flash.desktop.DragManager.dropAction = DragActions.COPY;
trace(onDrop);
var dropFiles:Array =
event.clipboard.dataForFormat(ClipboardFormats.FILE_LIST_FORMAT) as Array;
var path = ;
if(Capabilities.os.search(Mac) = 0)
   path = file:// + dropFiles[0].nativePath;
image.source = path;
  }
}   
]]
/mx:Script
mx:Image id=image width=100 height=100 horizontalCenter=0
verticalCenter=0/
mx:Button horizontalCenter=0 y=5 label=Button width=100
height=20/   
/mx:Application


Use these additional compiler arguments:
 -define=CONFIG::web,true -define=CONFIG::air,false

Also make sure you have a AIR project. For the web version create a
new run configuration, and type in the project name (it doesn't appear
in the combobox). So now if you run your application you'l be asked to
run as either Flex or Air. By changing the compiler arguments you can
switch between the two.


Dennis





[flexcoders] Share Code for Flex and Air projects

2007-10-22 Thread Dennis van Nooij
Hi,

Our project here has to run on both the web and in Air and I'm looking
for a solution how to structure my project. Lots of articles about how
to convert a Flex project to Air, but it's all no way back. I found
this link
http://www.simplifiedchaos.com/2007/08/09/how-to-compile-both-flex-and-air-application-from-the-same-codebase/
buth as the author says it has some issues (next to the listed ones
you can't use mxml for the parent views). Is there anyone who uses a
different approach ?

thanx,
Dennis



[flexcoders] Re: Share Code for Flex and Air projects

2007-10-22 Thread Dennis van Nooij
sounds good but some of my mxml components are 5 views deep. Meaning
that all mxml files above the AIR / Flex specific files will be AIR /
Flex specific to. :( 




in both the Air and Flex project I have to specify all specific Air
/Flex mxml

--- In flexcoders@yahoogroups.com, Samuel R. Neff [EMAIL PROTECTED]
wrote:

 
 I'd suggest creating three projects, one for Flex, one for Air, and one
 Shared.  Flex and Air project can reference Shared (either as a
library or
 as a source path).  That will also help prevent accidentally referencing
 Flex/Air specific code from something that's supposed to be Shared.
 
 HTH,
 
 Sam 
 
 
 ---
 We're Hiring! Seeking a passionate developer to join our team
building Flex
 based products. Position is in the Washington D.C. metro area. If
interested
 contact [EMAIL PROTECTED]
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Dennis van Nooij
 Sent: Monday, October 22, 2007 10:21 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Share Code for Flex and Air projects
 
 Hi,
 
 Our project here has to run on both the web and in Air and I'm looking
 for a solution how to structure my project. Lots of articles about how
 to convert a Flex project to Air, but it's all no way back. I found
 this link

http://www.simplifiedchaos.com/2007/08/09/how-to-compile-both-flex-and-air-a
 pplication-from-the-same-codebase/
 buth as the author says it has some issues (next to the listed ones
 you can't use mxml for the parent views). Is there anyone who uses a
 different approach ?
 
 thanx,
 Dennis