RE: [flexcoders] Watching a class full of bindable properties

2009-06-29 Thread Yves Riel
There are a few glitches with what you propose: 
 
First, you cannot create a watcher that monitors all of your properties
at once. The binding chain contains a hierachy list of parents and
children. The chain is there so that any change on the parents or
children will trigger the binding. Your proposed approach will
definitely not work.
 
Second, the only way to detect a change on a property is to create a
setter/getter pair. And I personally don't think that creating
setters/getters makes a class hard to read but this is just my own
opinion.
 
Finally, if you want to make a read-only property bindable, the class
has to support the IEventDispatcher interface and your class doesn't
seem to. Make sure it derives from EventDispatcher or that it at least
implements the IEventDispatcher interface.
 
If you're still convinced that using setter/getter is ugly, you may want
to look into the Proxy or ObjectProxy class. They should enable you to
do what you're looking for but you'll have to implement the
IEventDispatcher interface for the Binding to work.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of steve horvath
Sent: Friday, June 26, 2009 7:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Watching a class full of bindable properties






I have a class marked Bindable with many properties. The class has a
read-only function which returns come custom XML based on the
properties. I want to fire a bindable event when any of the properties
change.

So far the ways that I've thought of doing it are:
1) Create a ChangeWatcher that monitors each individual property. (The
host would be this and the chain would be an array with every single
property listed in it.)
2) Write a setter and a getter for every single property, with the
setter dispatching a custom bindable event.

The problem with the first method is I'd have to list out every
property. Every time a property was added to this class I'd have to
make sure I updated the chain array. The problem with the second method
is I'd have to write setters and getters for every single property. 
(The actual class has more than 20 properties.) It would make the class
harder to read.

Is there a way I could watch the properties for change with just a
couple lines of code?

[Bindable]
public class TheProperties
{
public var presetName:String=default;
public var presetThumb:String=;
public var presentationTitle:String=;
public var presentationThumb:String=;
public var presentationLogoURL:String=;
// many more properties...

[Bindable(event=propertyChangeEvent)] // necessary to get rid
of binding warnings
public function get xmlCode():XML {
// some funky stuff to create XML based on above properties
}
}






RE: [flexcoders] Dynamically referencing arbitrarily deep arrays?

2009-06-05 Thread Yves Riel
Not sure I understand why you're doing this but you could try to
individually access each nested object until you get to the desired
object; then you access its content. I rewrote the loop of your code to
do this.
 
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
mx:Script
![CDATA[
public function f():void {
var t:Object = new Object();
t.one = [];
t.one.two = content;

// Works:
output1.text = t[one][two];

// Now what?
var indices:String = one.two;

var tmp:String = ;
var obj:Object = t;// Temporary variable
referencing your root object
for each (var item:String in indices.split(.)) {
   if (!obj.hasOwnProperty(item)) break; // Verifies
that the object actually exists
   obj = obj[item];
// Now obj references the nested object
}

output2.text = obj.toString();// obj
should now reference that last nested object

}
]]
/mx:Script
mx:Text text=test id=output1 creationComplete={f()} /
mx:Text text=test id=output2 /
/mx:Application
 
 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Keith Hughitt
Sent: Thursday, June 04, 2009 2:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamically referencing arbitrarily deep arrays?





Does anyone know a method to dynamically index an arbitrarily deep array
or object-literal?

e.g. Given an object t, and the string one.two, how can you access
t.one.two?

Here is some sample code to demonstrate the problem:



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
mx:Script
![CDATA[
public function f():void {
var t:Object = new Object();
 nbs p;  t.one = [];
t.one.two = content;

// Works:
output1.text = t[one][two];

// Now what?
var indices:String = one.two;

var tmp:String = ;
for each (var item:String in indices.split(.))
{
tmp += [ + item + ];
}

output2.text = t + tmp;
  nbsp;  
}
]]
/mx:Script
mx:Text text=test id=output1 creationComplete={f()}
/
mx:Text text=test id=output2 /
/mx:Application



Any help would be greatly appreciated.

Thanks!
Keith





RE: [flexcoders] itemrenderer in popupMenuButton?

2009-06-05 Thread Yves Riel
ItemRenderers are used for list based controls. When you want to
customize the look and feel of buttons, you must do it through their
skins. You can use a programmatic skin to do it.
 
However, from your text, I think that what you want to do is actually
add an icon to each item in the list shown by the PopupMenuButton. That
you can do by changing the style of the menu through the
popUpStyleName style or by directly accessing the display menu
component through the popUp property. Give it a try. It may be a little
bit harder to do but should be possible.
 
 


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of luvfotography
Sent: Thursday, June 04, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] itemrenderer in popupMenuButton?





Is itemRenderer supported in popupMenuButton?

I just want to add an icon to my list of data in my popupMenuButton.
Is this easily possible?

I'm getting 'could not resolve mx:itemRenderer to a component
implementation
when I'm trying to use it with a popupMenuButton.

thanks,






RE: [flexcoders] Use ChangeWatcher with dynamic Object?

2009-06-04 Thread Yves Riel
Maybe you can use the ObjectProxy instead of Object. ObjectProxy
implements a dispatcher mechanism and could be a good candidate for
binding as it dispatches a PROPERTY_CHANGE event when a new property is
added to the object.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Thursday, June 04, 2009 1:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Use ChangeWatcher with dynamic Object?





I want to have a dynamic Object to which I can add properties at will,
making an associative array or hashtable, and Object works fine for
this.

However, I also want to be able to set up changeWatchers for certain
properties, but my watchers are never getting fired.  I know Object is
not bindable, but should an explicit ChangeWatcher fire when a dynamic
property is  added or changed?

Tracy Spratt,

Lariat Services, development services available




RE: [flexcoders] as3 interface syntax ?

2009-05-25 Thread Yves Riel
An interface is basically a contract between two classes. In the example
below, the class containing the mentioned line doesn't care which class
is passed to it from the _textFlow.interactionManager property, it just
makes sure that it implements the interface (i.e. the contract). So,
_textFlow.interactionManager probably returns an untyped Object and the
command IEditManager() casts it so the compiler doesn't throw an error
when the method applyParagraphFormat() is called.
 
In other word, if the IEditManager() command was to be removed, the
compiler would have choked out since _textFlow.interactionManager
returns an Object and that applyParagraphFormat() is not a method
belonging to a standard Object.
 
Interface allows for polymorphism and is a very powerful tool in any OOP
programmer tool belt. You definitely need to read up on it and
understand it. You can find good tutorials on-line or just read the
Programming AS3 section in the help.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of foodyi
Sent: Monday, May 25, 2009 2:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] as3 interface syntax ?





hi,all
i read adobe textlayout framwork's sample code , i don't understand the
code below:

IEditManager(_textFlow.interactionManager).applyParagraphFormat(pf);

thanks for your reply.

foodyi





RE: [flexcoders] BindingUtils question.

2009-05-25 Thread Yves Riel
You can actually bind to a variable by also using the
BindingUtils.bindProperty() method. You just need to you the this
keyword. So:
 
BindingUtils.bindProperty(dogNameText, text, this, myString);
 
Don't forget to enclose your variable in double quotes since that last
parameter must be a string. The only catch is that the myString variable
needs to be a public property otherwise you'll get runtime errors. If
you really want to keep myString protected or private, then you have to
use the BindingUtils.bindSetter() method as it was earlier suggested by
Rajan.




From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Rajan Jain
Sent: Friday, May 22, 2009 5:34 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] BindingUtils question.






Try using
 
BindingUtils.bindSetter and create function.



From: markflex2007 markflex2...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Friday, May 22, 2009 5:07:21 PM
Subject: [flexcoders] BindingUtils question.



I read a demo
BindingUtils. bindProperty( dogNameText, text, myDog, name)

dogNameText is textInput and myDog is a object

how to I bind dogNameText' s Texr property to one variable like
myString

BindingUtils. bindProperty( dogNameText, text, myString) give me
error.

Please give me a idea how to do this.Thanks

Mark







RE: [flexcoders] list itemrenderer

2009-05-25 Thread Yves Riel
You'll have to be a little bit more specific. What are you trying to achieve? 
You can listen to any drag event in any controls and do custom actions.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of thomas parquier
Sent: Sunday, May 24, 2009 4:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] list itemrenderer





Hi,

Is there a possibility to do some code differently in a drag proxy instance of 
itemRenderer ?

thomas
---
http://www.web-attitude.fr/ http://www.web-attitude.fr/ 
msn : thomas.parqu...@web-attitude.fr mailto:thomas.parqu...@web-attitude.fr 
softphone : sip:webattit...@ekiga.net mailto:sip%3awebattit...@ekiga.net 
téléphone portable : +33601 822 056





RE: [flexcoders] NEED more than 15 menu item in Context Menu ????

2009-05-22 Thread Yves Riel
What about intercepting the right-click at the browser level and
displaying your own contextual menu? However, you might have some
browser incompatibility to look at.
 
http://blog.another-d-mention.ro/programming/right-click-and-custom-cont
ext-menu-in-flash-flex/



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dharmendra Chauhan
Sent: Friday, May 22, 2009 3:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] NEED more than 15 menu item in Context Menu 





Hi,
I really need to have more than 15 menu item displayed on Context Menu.
I desperately need some workaround or ideas to achieve this 

My client has invested thousands of dollar in Flex Project, he
definitely need more than 15 menu item.If this project failed , client
will NEVER think to invest in flex.


Had I been aware of this limitation before I would have thought some
solution by now.This comes as a surprise to me at the last moment ,just
fews days before Prod Date.

Pls gents help me get rid of this ...PLEASE provide some ideas.

Thanks in advance.

Thanks,
Dharmendra 






RE: [flexcoders] Custom ItemRenderer in List control and highlight

2009-05-21 Thread Yves Riel
Could be easier to help you out if you post some code ... especially if
it's a really simple application.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of fonqiemp
Sent: Thursday, May 21, 2009 3:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom ItemRenderer in List control and highlight





Hi all

This is probably a really simple question, but I havn't been able to
find the answer.

I've created a really simple application containing a List control and a
mxml component (extending Canvas).

My List width is set to 300. The custom component width is also set to
300.

When I use my component as an itemRenderer for my list, the roll over
and selected highlight border shows up fine on the top, left and
bottom edges. But the right edge is missing.

It's as if the canvas is too wide for the list, but if I specify a width
of 290 in the canvas it's just the same.






RE: [flexcoders] Tree nodes sorting

2009-05-15 Thread Yves Riel
I believe that you will have to do it through your data provider. if
your data provider is an ICollectionView (such as ArrayCollection), you
can sort it using the sort property.
 
Yves



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Friday, May 15, 2009 1:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree nodes sorting





Is it possible to sort a Tree in a such way that folders will be shown
first?

Thanks






[flexcoders] Determining file read-only attribute in AIR

2009-05-14 Thread Yves Riel
Hi guys,
 
Do any of you have a nice simple trick to determine and possibly toggle
the read-only attribute of a file in AIR?
 
Thanks!


RE: [flexcoders] Tree does not show scrollbar after inserting items

2009-05-13 Thread Yves Riel
Funny, the example doesn't work on the adobe server but if you copy the
code and recompile it, it works and I get the scroll bar. Maybe it's an
SDK issue; I'm using the official 3.2 SDK release.
 
Also, if you are using an array collection as data provider, maybe you
can force a refresh of the collection instead of reassigning the
provider?



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dave Kong
Sent: Wednesday, May 13, 2009 1:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree does not show scrollbar after inserting items





After some googling, this seems to be an existing issue with Tree
refreshes and I haven't been able to find a good workaround.

The issue can be repro'ed at one of Adobe's quickstart demo page:
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/ 

Go to the last example, and expand all nodes in the tree on the left.
Height doesn't exceed the container, so no scrollbar. Now drag elements
from the right to the tree to insert them. When the height of tree
extends beyond the container, no v-scrollbar is shown. But a scrollbar
is shown after you collapse/expand the tree.

Invalidating the tree's list/properties/displaylist didn't seem to cause
a refresh. The underlying collection still returns old length when Tree
processes configureScrollBars().

Can anyone suggest a good workaround? (aside from reassigning
dataProvider, since that's too expensive for me.)

A couple of old flexcoder threads also talks about this problem:
http://tech.groups.yahoo.com/group/flexcoders/message/46541
http://tech.groups.yahoo.com/group/flexcoders/message/46541 
http://tech.groups.yahoo.com/group/flexcoders/message/37627
http://tech.groups.yahoo.com/group/flexcoders/message/37627 

Thanks!






RE: [flexcoders] Re: drag drop tree to tree onto node, not between nodes

2009-05-11 Thread Yves Riel
Thanks Alan,
 
I was about to refer to the archive but you beat me to it.
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg117508.html
 
And to avoid any confusion ... Yves is a male name ;-)
 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alan Rother
Sent: Sunday, May 10, 2009 9:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: drag drop tree to tree onto node, not
between nodes [1 Attachment]


[Attachment(s) from Alan Rother included below] 



Yves Riel (r...@cae.com) sent this file to me when I had a similar
problem some time back, it totally saved my life. 


If it helps, drop him(her, not sure...) an email and thank them.


=]



On Sun, May 10, 2009 at 6:19 PM, Mic chigwel...@yahoo.com
mailto:chigwel...@yahoo.com  wrote:




Think I answered this myself - isBranch looks like it will turn
the leaf into branch, which is exactly what I need to do.



--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Mic chigwel...@... wrote:

 Thanks Tracy - for the moment I am having to put a Peer/Child
radio button group so I know what the user wants to do. Next question
:-)
 
 New mgr is a leaf, rb set to child, rep dropped below mgr ...
need to change mgr to branch with new rep as leaf. Does one manipulate
the xml to do this and then invalidate something so the tree
reconfigures itself, or does one manipulate the tree gui? Thanks,
 
 Mic.
 
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Tracy Spratt tracy@ wrote:
 
  I hope someone has a solution for this, I do not. The tree
drop feedback
  lines will show above or below a child node, and will get
longer to indicate
  a drop point at the level above those, but I have found no
way to drop a
  first child node onto an empty node.
  
  
  
  Now, I have not researched this in the last year, so maybe
someone will have
  a fix.
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
  Behalf Of Mic
  Sent: Sunday, May 10, 2009 2:08 AM
  To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] drag drop tree to tree onto node, not
between nodes
  
  
  
  
  
  
  
  
  Will Flex recognize a drop onto a node? The visual position
bar when moving
  the drop up and down the destination tree displays between
nodes. When we
  first add a mgr to the HR tree, that mgr is a leaf. Want to
trap a drop
  directly onto the mgr so can turn him/her into a branch and
add people
  reporting to him/her. Cannot drop beneath as that would be a
legal peer.
  TIA,
  
  Mic.
 









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





RE: [flexcoders] RE: NativeDragManager and nested components

2009-05-07 Thread Yves Riel
Thanks Alex but I need to be able to drag from the Desktop to the App
too. However, maybe I can dynamically swap the NativeDMI for the regular
DMI and vice-versa when I need it. I'll have to look into this. I'll try
to find the tech note but if you have the link, it would be handy.
 
Thanks!
 
Whyves



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alex Harui
Sent: Thursday, May 07, 2009 2:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RE: NativeDragManager and nested components





There are different rules to doing drag/drop totally internally
(DragManagerImpl) and having to work with many OS platforms
(NativeDragManagerImpl).  We just couldn't find enough common ground.

However, if you don't need to drag from your AIR app to the desktop, you
can replace NativeDMI with regular DMI.  There's a technote or
documentation on how to do it.

Alex Harui

Flex SDK Developer

Adobe Systems Inc. http://www.adobe.com/ 

Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Yves Riel
Sent: Wednesday, May 06, 2009 10:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] NativeDragManager and nested components






The DragManagerImpl and NativeDragManagerImpl behaviours are so
different that it drives me nut! I have a Flex component that is
embedded in a Flex and AIR app. So, I used the IDragManager interface to
access the methods and used the standard events. Unfortunately, I can't
get a consistent behaviour across both platforms.

One of my biggest problem is that in AIR, if a parent UIComponent
accepted the drag, a child cannot cancel it through the standard
IDragManager interface. I have a container that can accept or refuse a
drag operation and I have children of the container that can do the
same. So, when I move the mouse over the container, if it accepts the
drag and that I move the mouse over a children and that the children
cannot accept the drag, I simply cannot get the no drag icon over the
child.

I could possibly try to use the NativeDragEvents to do the trick but
since I want my component to be cross platform, I cannot use AIR only
classes. I'm starting to think that Adobe didn't think about this use
case when designing both drag managers.

Anyone has an idea or overcame this issue?

Thanks!

Yves




[flexcoders] NativeDragManager and nested components

2009-05-06 Thread Yves Riel
The DragManagerImpl and NativeDragManagerImpl behaviours are so
different that it drives me nut! I have a Flex component that is
embedded in a Flex and AIR app. So, I used the IDragManager interface to
access the methods and used the standard events. Unfortunately, I can't
get a consistent behaviour across both platforms.
 
One of my biggest problem is that in AIR, if a parent UIComponent
accepted the drag, a child cannot cancel it through the standard
IDragManager interface. I have a container that can accept or refuse a
drag operation and I have children of the container that can do the
same. So, when I move the mouse over the container, if it accepts the
drag and that I move the mouse over a children and that the children
cannot accept the drag, I simply cannot get the no drag icon over the
child.
 
I could possibly try to use the NativeDragEvents to do the trick but
since I want my component to be cross platform, I cannot use AIR only
classes. I'm starting to think that Adobe didn't think about this use
case when designing both drag managers.
 
Anyone has an idea or overcame this issue?
 
Thanks!
 
Yves
 


RE: [flexcoders] Re: Tree custom renderer

2009-04-29 Thread Yves Riel
In your treeRendererFilter class, override the updateDisplayList method.
In there, set the position of your customerReportingFilter based on the
label property. Be careful since the label property, in the base
class, is made to be the entire lenght of the item renderer minus the
icons. So, you want to calculate the size of your
customerReportingFilter component, in the measure function, and in the
updateDisplayList function, you do something like:
 
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 label.width -= filter.width;
 filter.x = label.x + label.width;
}
 
where filter is you customerReportingFilter.
 
Yves


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Tuesday, April 28, 2009 7:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree custom renderer





Actually it adds it behind the label. I have spent some time trying to
tweak it with no success.
Anybody, any idea?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, markgoldin_2000 markgoldin_2...@... wrote:

 Yes, that was a problem to show an additional component.
 Now when I see it, I realize that it's going to be added in a front of
a node text, while I want it to be after. How to do that?
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Tracy Spratt tracy@ wrote:
 
  One thing to watch for is that manual instantiation does not always
set a
  default height and width. Explicitly set these to see if the child
controls
  display
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
  Behalf Of markgoldin_2000
  Sent: Tuesday, April 28, 2009 3:54 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: [flexcoders] Re: Tree custom renderer
  
  
  
  
  
  
  
  
  Thanks, Tracy, I have looked into your example.
  
  Here is what I got so far. It compiles fine, but when it runs I dont
see
  anything except regular nodes with a text.
  
  package
  {
  import mx.controls.treeClasses.*;
  public class treeRendererFilter extends TreeItemRenderer
  {
  private var _oTreeListData:TreeListData;
  public function treeRendererFilter()
  {
  super();
  }
  override public function set data(value:Object):void 
  {
  super.data = value;
  _oTreeListData = TreeListData(super.listData);
  } 
  override protected function createChildren():void 
  {
  super.createChildren();
  var filter:customerReportingFilter = new customerReportingFilter(); 
  addChild(filter);
  validateDisplayList();
  }
  }
  }
  //customerReportingFilter
  ?xml version=1.0 encoding=utf-8?
  mx:FormItem xmlns:mx=http://www.adobe.
http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml 
  com/2006/mxml height=22 
  direction=horizontal visible=true
  mx:HBox 
  mx:RadioButtonGroup id=reportfilter/
  mx:RadioButton label=Button 1 groupName=reportfilter/
  mx:RadioButton label=Button 2 groupName=reportfilter/
  /mx:HBox 
  /mx:FormItem
  
  // tree definition
  mx:Tree id=customerServiceTree fontSize=11 width=100%
height=99%
  labelField=@name textAlign=left
itemRenderer=treeRendererFilter 
  creationComplete=userNavigation(Number(category4.name),
  customerServiceTree)
  itemClick=itemClickEvt(event);
  showRoot=false borderStyle=solid borderThickness=1
  /mx:Tree
  
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com,
  Tracy Spratt tracy@ wrote:
  
   I have an example on www.cflex.net http://www.cflex.
  http://www.cflex.net/ http://www.cflex.net/  net/ that extends
   TreeItemRenderer and adds the tree sibling lines. It might be a
good
   starting point.
   
   
   
   Tracy Spratt,
   
   Lariat Services, development services available
   
   _ 
   
   From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com
  [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com]
  On
   Behalf Of markgoldin_2000
   Sent: Tuesday, April 28, 2009 2:42 PM
   To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com
ups.com
   Subject: [flexcoders] Tree custom renderer
   
   
   
   
   
   
   
   
   I am looking for design ideas to extend an item renderer for a
tree
  control.
   Specifically, I want to have a node that would show a regular
label for
  its
   name plus a radiogroup with 3-4 radio buttons shown horizontally
with a
   node. So, the user can specify some filters for an upcoming
interface when
   he selects a node.
   
   Any clue?
   
   Thanks
  
 







RE: [flexcoders] Re: Tree custom renderer

2009-04-29 Thread Yves Riel
Works fine for me. You probably have another issue in there. This is
what I had for item renderer. The other classes were not touched.
 
package
{
 import mx.controls.treeClasses.*;
 public class treeRendererFilter extends TreeItemRenderer
 {
  private var _oTreeListData:TreeListData;
  public var filter:customerReportingFilter = null;
  
  public function treeRendererFilter()
  {
   super();
  }
  override public function set data(value:Object):void
  {
   super.data = value;
   _oTreeListData = TreeListData(super.listData);
  }
  override protected function createChildren():void
  {
   super.createChildren();
   filter = new customerReportingFilter();
   filter.width = 200;
   addChild(filter);
   validateDisplayList();
  }
  
  override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
   super.updateDisplayList(unscaledWidth, unscaledHeight);
   label.width -= filter.width;
   filter.x = label.x + label.width;
  }
 }
}




From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Wednesday, April 29, 2009 9:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree custom renderer






Not so fast :)
My item renderer with additional objects is shown properly. But the
whole tree is not working they way it should. First, open/close symbol
for the top folder node is shown now on a far right side, while it
should be on a left. Second, when I open and close it, my special item
renderer gets messed up.
Any idea?

Thanks

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, markgoldin_2000 markgoldin_2...@... wrote:

 Yep, that was it, thanks!
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Yves Riel riel@ wrote:
 
  In your treeRendererFilter class, override the updateDisplayList
method.
  In there, set the position of your customerReportingFilter based on
the
  label property. Be careful since the label property, in the base
  class, is made to be the entire lenght of the item renderer minus
the
  icons. So, you want to calculate the size of your
  customerReportingFilter component, in the measure function, and in
the
  updateDisplayList function, you do something like:
  
  override protected function updateDisplayList(unscaledWidth:Number,
  unscaledHeight:Number):void {
  super.updateDisplayList(unscaledWidth, unscaledHeight);
  label.width -= filter.width;
  filter.x = label.x + label.width;
  }
  
  where filter is you customerReportingFilter.
  
  Yves
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
  Behalf Of markgoldin_2000
  Sent: Tuesday, April 28, 2009 7:17 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

  Subject: [flexcoders] Re: Tree custom renderer
  
  
  
  
  
  Actually it adds it behind the label. I have spent some time trying
to
  tweak it with no success.
  Anybody, any idea?
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  , markgoldin_2000 markgoldin_2000@ wrote:
  
   Yes, that was a problem to show an additional component.
   Now when I see it, I realize that it's going to be added in a
front of
  a node text, while I want it to be after. How to do that?
   
   --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com , Tracy Spratt tracy@
wrote:
   
One thing to watch for is that manual instantiation does not
always
  set a
default height and width. Explicitly set these to see if the
child
  controls
display



Tracy Spratt,

Lariat Services, development services available

_ 

From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  ] On
Behalf Of markgoldin_2000
Sent: Tuesday, April 28, 2009 3:54 PM
To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  
Subject: [flexcoders] Re: Tree custom renderer








Thanks, Tracy, I have looked into your example.

Here is what I got so far. It compiles fine, but when it runs I
dont
  see
anything except regular nodes with a text.

package
{
import mx.controls.treeClasses.*;
public class treeRendererFilter extends TreeItemRenderer
{
private var _oTreeListData:TreeListData;
public function treeRendererFilter()
{
super();
}
override public function set data(value:Object):void 
{
super.data = value;
_oTreeListData = TreeListData(super.listData);
} 
override protected function createChildren():void

RE: [flexcoders] Access Tree's current item renderer

2009-04-29 Thread Yves Riel
The ListEvent return from the itemClick event contains a property called
itemRenderer.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Wednesday, April 29, 2009 10:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Access Tree's current item renderer





when I click on Tree's node how can I access the underlying item
renderer?

Thanks






RE: re: [flexcoders] Problem drag and drop

2009-04-13 Thread Yves Riel
I tried to do it while modifying your code as little as possible.
Copying is a lot more complex than moving and it can become a nightmare
if you have children embedded inside your Title Window. I think that you
may also have to clean up the BitmapData used as a drag proxy image to
avoid memory leaks. There are not only one way of doing this and it
might not be the best way but it's a start.
 
Good luck!
 
Whyves
 
 
 BEGIN OF CODE ---
 
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=init(); 
 
 mx:Panel x=47 y=78 width=200 height=200
backgroundColor=#FF
 layout=absolute
 id=pan1 
  mx:TitleWindow id=myTitleWindow title=My Title Window x=10
y=10 label=Button mouseMove=mouseOverHandler(event); width=160
  backgroundColor=#F60B0B height=77/
  mx:Button x=40 y=118 label=Button2/
 
 /mx:Panel
 mx:Panel x=460 y=78 width=200 height=200
backgroundColor=#FF
 dragDrop=dragDropHandler(event) id=pan2
 dragEnter=dragEnterHandler(event)
 /mx:Panel
 

 mx:Script
 ![CDATA[
  import mx.core.BitmapAsset;
  import mx.core.FlexBitmap;
  import mx.core.IFlexDisplayObject;
 import mx.events.CloseEvent;
 import mx.containers.TitleWindow;
 import mx.managers.DragManager;
 import mx.core.DragSource;
 import mx.events.DragEvent;
 import mx.containers.Canvas;
 
 public function init():void
 {
  DragManager.showFeedback(DragManager.COPY);
 }
 
 private function mouseOverHandler(event:MouseEvent):void
 {
  // You need to make a copy of the window and pass it to the drag
source
  var dragData:TitleWindow = copyTitleWindow(myTitleWindow);
  var ds:DragSource= new DragSource();
  ds.addData(dragData, can);
  
  // Drag Image
  var bd:BitmapData = new BitmapData(dragData.width, dragData.height);
  bd.draw(myTitleWindow);
  var dragImage:IFlexDisplayObject = new BitmapAsset(bd);
   
  DragManager.doDrag(myTitleWindow, ds, event, dragImage);
 }
 
 /**
  * Makes a copy of a Title Window 
  * 
  */
 protected function
copyTitleWindow(originalWindow:TitleWindow):TitleWindow {
  var newWindow:TitleWindow = new TitleWindow();
  with (newWindow) {
   title = originalWindow.title.concat( copy);
   width = originalWindow.width;
   height = originalWindow.height;
   setStyle(backgroundColor,
originalWindow.getStyle(backgroundColor));
  }
  return newWindow;
 }
 
 private function dragEnterHandler(event:DragEvent):void
 {
  if (event.dragSource.hasFormat(can))
  {
   event.preventDefault();
   DragManager.showFeedback(DragManager.COPY);
   DragManager.acceptDragDrop(pan2);
  }
 }
 
 
 private function dragDropHandler(event:DragEvent):void
 {
  var window:TitleWindow= event.dragSource.dataForFormat(can) as
TitleWindow;
  window.x = 10;
  window.y = 10;
  window.showCloseButton=true;
  window.addEventListener(CloseEvent.CLOSE, fermer_h)
  pan2.addChild(window);
 }
 
 public function fermer_h(event:CloseEvent):void
 {
 pan2.removeChild(TitleWindow(event.currentTarget));
 }
 
 ]]
 /mx:Script
/mx:Application



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of soulflow132
Sent: Saturday, April 11, 2009 9:18 AM
To: flexcoders@yahoogroups.com
Subject: Re: re: [flexcoders] Problem drag and drop






I've tried what you said but its not working dude :confused::confused:
any suggestions please ?
-- 
View this message in context:
http://www.nabble.com/Problem-drag-and-drop-tp22997154p23001090.html
http://www.nabble.com/Problem-drag-and-drop-tp22997154p23001090.html 
Sent from the FlexCoders mailing list archive at Nabble.com.






RE: [flexcoders] Re: Framework Caching Affecting Security Settings?

2009-03-13 Thread Yves Riel
Don't know if I'm the only one but I cannot access that page!?



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alex Harui
Sent: Friday, March 13, 2009 1:03 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Framework Caching Affecting Security
Settings?



Vote for this bug: https://bugs.adobe.com/jira/browse/SDK-16050.

Alex Harui

Flex SDK Developer

Adobe Systems Inc. http://www.adobe.com/ 

Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of jedierikb
Sent: Wednesday, March 11, 2009 8:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Framework Caching Affecting Security Settings?

[Hello. New to the list. Found you from a google search for a bug I've
encountered. Looks like I've found the right people!]

I have encountered this same bug and wonder if there was ever a
resolution?

As a work around, I have removed every bit of security enabled code
(no javascript to actionscript calls) from my home-rolled rsl libraries.

Is there a way to build the SWC/SWFs or link to them or some
crossdomain.xml trickery which can properly solve this problem?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Jamie S jsjph...@... wrote:

 Does Framework Caching affect the security settings?
 
 I was banging my head against a wall because my app was throwing
 security violations all over the place when an outside swf ( or
 JavaScript ) tried to access the main app. I was using
 Security.allowDomain(*) but it was being ignored completely. I
 turned framework caching off and everything worked again.
 
 What is the connection? How can I use framework caching and still keep
 my security settings intact?
 
 Jamie





RE: [flexcoders] Question from a C developper

2009-03-12 Thread Yves Riel
Salut Christophe,
 
Other will definitely pitch in but here are some answers:
 
 Is it possible to define a variable as a long ?
 
The data type is Number. It's a IEEE-754 double-precision
floating-point number.
 
 How to program the overloading of an operator like the equal between 2
objects of a same class.
 
There are no operator overloading in AS3. You would have to code a
specific function (such as compare(a, b):Boolean) to achieve this. You
can only compare object instances using the == and === operators.
 
 What is the equivalent of a structure ?
 
You can use the Object data type. Basically {pair1:value1,
{pair1:value1}. It is not a structure but can be used for its
replacement I guess. You can also just code a plain old class.
 
 When I call a function with a parameter, did this parameter is
modified when I return from this function ?
 
All parameters are passed as reference except for the fundamental data
types (String, Number, int, uint, Boolean).

 How to convert an int to a Number ?
 
Numeric types are implicitely converted into each other. However, you
can cast it like this Number() if you want to make it clear in your
code.
 
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=138809/stime=1236868087/nc1=1/nc2=2/nc3=3 


RE: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-11 Thread Yves Riel
You're welcome Romu.
 
It's not the first time people are looking for a better tree component.
Maybe it would be worth while to create a new tree component in FlexLib.
We could start with the basic functionality that I added.
 
Yves
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=138704/stime=1236765221/nc1=1/nc2=2/nc3=3 




RE: [flexcoders] Question about binding and circular reference

2009-03-11 Thread Yves Riel
The problem you are experiencing is caused by the fact that when the
player executes the line [ mf.foo = bar ], your text input is not even
created in your form yet. So, the foo-myText binding does nothing and
when the text input is finally created, the myText-foo binding executes
and thus overwrite what was in foo.
 
If you want to avoid this, you need to do:
 
protected var mf:MyForm = new MyForm();
mf.addEventListener(FlexEvent.CREATION_COMPLETE, formCreatedHandler);
addChild(mf);
 
protected function formCreatedHandler(event:FlexEvent):void {
mf.removeEventListener(FlexEvent.CREATION_COMPLETE,
formCreatedHandler);
mf.foo = bar;
}



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of enriirne
Sent: Wednesday, March 11, 2009 8:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question about binding and circular reference



Say I have this:

// MyForm.mxml
[Bindable]
public var foo:String;

mx:Bindable source=foo destination=myText.text/
mx:Bindable source=myText.text destination=foo/

mx:TextInput id=myText/

Is there an elegant way to avoid that foo is cleared upon creation of
MyForm?
Indeed, if I do this in the main app:

var mf:MyForm = new MyForm();
mf.foo = bar;
addChild(mf);

then myText is empty, probably because it's empty content is first
assigned to foo due to the second binding.
The real problem I'm trying to solve is to use the same value object to
show data to the user and to receive his/her changes.

Of course it works if I use two vos: say voIn and voOut, binding them
accordingly.

Any ideas?

Enri






RE: [flexcoders] Flex 3 Tree - Moving Nodes

2009-03-10 Thread Yves Riel
I have done something similar lately except for the spring loaded
opening mechanism. The problem that I saw with Alex Harui's approach was
that you had to turn a leaf into a branch before being able to drop a
node on it. That impacts the icons that represent the nodes and I still
wanted a leaf node to be represented with a leaf icon up to the point
where it contains children. If all your nodes (leaf or branch) have the
same icon, then you could make all the nodes branches through a custom
ITreeDataDescriptor. You'll have to live with having the small arrow to
the left on every node.
 
What I finally did was to overload some tree methods. If the drag  drop
is over the bottom half portion of a node, I highlight it and rewrite
the parent and rowIndex properties of the _dropData property. That works
well. You could extend the logic to open up the folder after the drop
and add a spring loaded opening mechanism.
 
I'm attaching some code but I had to clean it up to remove proprietary
information. Not sure if it still compiles but that's a starting point
:-)
 
Hope it helps!
 
 
 
 



TreeEx.as
Description: TreeEx.as


RE: [flexcoders] TitleWindow and CloseButton

2009-02-25 Thread Yves Riel
 
The button of a title window is located in the Panel component. You can
directly access it thought the mx_internal::closeButton
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=137608/stime=1235567809/nc1=4507179/nc2=3848640/nc3=4836036
variable. Just make sure to import the mx_internal namespace first.
 
Yves




RE: [flexcoders] Wicked Memory Leaks and Massive Loitering Objects

2009-02-20 Thread Yves Riel
I like your humour Adrian!
 
The loitering objects can be caused by many things. During my track down
on leaks, I found out that most of the time, it was forgetting to set a
property to null, not removing listeners as I expected, etc. Without
seeing code, it's difficult to help you out properly. However, here are
some things to ponder:

*   
Allow for null values on all properties. When the null values
are received, do a clean up and release all references. This is
especially useful when you have bindings going on.
*   
If you can't easily remove a listener, make it week by setting
the last parameters of AddEventListeners() to true.
*   
If you are using a Dictionary, allow for weak references: new
Dictionary(true).
*   
Item renderers do not release their reference to the data. You
can built a helper function that can do this for you. (See attached
file)
*   
Alex Harui made a nice tutorial if you're not too familiar with
the profiler (
http://blogs.adobe.com/aharui/2008/09/using_the_flex_builder_3x_prof.htm
l)

And be patient, at the end, you'll be able (unless there's a bug) to
remove all bad references using the profiler.
 
Yves
 


CleanUp.as
Description: CleanUp.as


RE: [flexcoders] I'm just not seeing it guys/gals... (events/scopes)

2009-02-11 Thread Yves Riel
Your e-mail is not very clear. There are many ways to get the array
collection to update. Anyway, if you are using a drop-in item renderer,
I suggest that you access the listData property of the itemRenderer.
listData has a property called owner. So you could have your item
renderer dispatch an event using the owner property. This way, the
event will be seen as coming from the list itself.
 
so, from inside the item renderer:
 
listData.owner.dispatchEvent(your event);
 
and attach listeners to the list itself to get notified.
 
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=136557/stime=1234359703/nc1=4507179/nc2=3848640/nc3=4836038 




[flexcoders] And survey says: private VS protected VS namespace

2009-02-10 Thread Yves Riel
I'm sure that a lot of us have tried over the years to extend some Flex
controls. We all have soon realized that a lot of important methods are
private and that if we want to tweak something, we have to copy these
private functions into our derived class. Fortunately, there is the
mx_internal namespace that sometime saves us many headaches.
 
My question is: If you want to build something that's easy to extend
from, what do you do? Have almost all methods protected? Use another
namespace? When do you use static methods? I like the namespace twist
but then, it also makes the methods and variables available to outside
classes when they import and use the namespace. I know that sound design
should alleviate a good portion of these but it's inevitable, developers
will always try to use your work in ways you never thought of ...
 
So, what's your take on this?


RE: [flexcoders] Can PopUpMenuButton have scrollbars??

2009-02-03 Thread Yves Riel
FlexLib contains a scrollable popup menu and popup menu button. Take a
look. However, there are some issues that we had to correct to get it
working the way we wanted. Maybe it will work out-of-the-box for you.
 
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=135885/stime=1233662739/nc1=4507179/nc2=3848642/nc3=5579902
http://code.google.com/p/flexlib/

 


RE: [flexcoders] Re: Tree Control Drag and Drop Help

2009-02-03 Thread Yves Riel
Glad I could help! I had to to change the tree a few days ago so it
could allow droping nodes onto a branch. I spent a few hours figuring it
out so if I was able to save you time then great. If you dig deep into
the Flex Components code, you'll see that they often use mx_internal.
Also, just as a side note. If you import the namespace and that there
are no collision, i.e. no two variables share the same name, you don't
need to prefix the variable name with it's namespace. So, you could have
just written:
 
var parent:String = event.dragInitiator._dropData.parent.label
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=135844/stime=1233608798/nc1=4507179/nc2=3848642/nc3=5597441 
 


RE: [flexcoders] Tree Control Drag and Drop Help

2009-02-02 Thread Yves Riel
When a drag  drop operation occurs on a tree, the drag  drop handlers
call the public calculateDropIndex() function. This function stores all
the properties that you want in an mx_internal variable called _dropData
of Object data type.
 
So, make sure that your class import and use the mx_internal namespace
and attach a listener to the tree's dragDrop event. In the event
handler, look up the _dropData variable and specifically the parent
and index properties. If this drop operation should not be allowed,
call the preventDefault() method on the event.
 
That should do the trick.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of David Kramer
Sent: Monday, February 02, 2009 12:34 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Tree Control Drag and Drop Help



Adrian,
 
I am up against the same problem.  Please share your knowledge on it so
far.  kramer.da...@consultant.com mailto:kramer.da...@consultant.com 
 
Many thanks.
 
David



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of adrianpomilio
Sent: Monday, February 02, 2009 8:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree Control Drag and Drop Help



This is a two part question.

1 - How can I keep a child from being dropped outside of it's parent?
I want to be able to drag and drop within a nodes parent.

2 - How do I get a handle on the new index of the node that has been
dropped.

I can get the current index, the parents name, but not the location it
was dropped.

I am using an ArrayCollection to populate the tree, using the children
attribute to create the child nodes. I am stuck with having to use
the ArrayCollection.

Any pointers would be great.



 


RE: [flexcoders] BindingUtils and ResourceManager Question

2009-01-28 Thread Yves Riel
What we have done is to separate ourselves from the resource manager a
bit. We have created a new class that basically has a bindable property
called value. This class is passed the name of the string that is
localized in the resource manager and hooks to the resource manager. It
monitor for changes on the resource manager and when they are detected,
the class sends an event that triggers the binding. So, it can be used
directly in MXML  or in the .as file by using the BindingUtils class.
 
In pseudo code (.as file):
 
var localizedProp:LocalizedProperty = LocalizedProperty.create(Bundle,
localized property);
BindingUtils.bindProperty( this, your variable, localizedProp,
value);
 
 
In pseudo code (.mxml file):
 
[Bindable] var localizedProp:LocalizedProperty =
LocalizedProperty.create(Bundle, localized property);
mx:label text={localizedProp.value}/
 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=135445/stime=1233144154/nc1=4507179/nc2=3848640/nc3=4836040 
 


RE: [flexcoders] FB debug constantly logs to console

2009-01-21 Thread Yves Riel
You say it was a bug in your code. Did you find a way to remove the
traces from the console? We do load a lot of images in our project and
those unwanted trace statements really annoy me! I never looked into it
but if you found a way to suppress these traces, do you mind sharing it?
 
 


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of John Van Horn
Sent: Tuesday, January 20, 2009 7:35 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] FB debug constantly logs to console



Yep, that was it...a bug in our code. Thanks Josh.

FlexBuilder, I take back every bad thing I said about you.well, at
least in the last hour.


On Tue, Jan 20, 2009 at 5:53 PM, Josh McDonald dzn...@gmail.com
mailto:dzn...@gmail.com  wrote:


You're probably loading images or something along those lines
using a SWFLoader or one of its subclasses such as Image. This is simply
Player telling you about it decoding the results and adding them to the
VM.

-Josh



2009/1/21 John Van Horn jmvanh...@gmail.com
mailto:jmvanh...@gmail.com  


All of a sudden a few days ago, launching a debug
session in FB3, results in FB (or maybe debug player) logging constantly
to the console. I get about 2 of these messages a second, and it doesnt
stop till I terminate the debug session. This does not output to
flashlog.txt. It makes reading traces in FB console very difficult.

Anybody experienced this or know a solution?

[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 2,747 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 997 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 1,646 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 985 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 985 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 1,646 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 3,798 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 686,596 bytes
after decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression
[SWF] Users:jvanhorn:player.swf - 0 bytes after
decompression

-- 
John Van Horn
jmvanh...@gmail.com mailto:jmvanh...@gmail.com 





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

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com mailto:j...@gfunk007.com 
:: http://flex.joshmcdonald.info/
http://flex.joshmcdonald.info/ 
:: http://twitter.com/sophistifunk
http://twitter.com/sophistifunk 






-- 
John Van Horn
jmvanh...@gmail.com mailto:jmvanh...@gmail.com 


 


RE: [flexcoders] internationalization

2009-01-21 Thread Yves Riel
The only problem I have with resource modules is that they are compiled
into swf. Our users require that the language files be accessible using
notepad or any text editor so I cannot use Flex. A typical example would
be a lexicon file where the user could add terms at any time. We had to
load the file separately and push it into the resource manager. Of
course we lose bandwidth but it's what our user base needs. I was just
curious to see if other were doing it this way. 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Haykel BEN JEMIA
Sent: Wednesday, January 21, 2009 5:12 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] internationalization



Yes, they are called resource modules! Thanks Gordon!

http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277
http://livedocs.adobe.com/flex/3/html/l10n_5.html#158277 


Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com http://www.allmas-tn.com 





On Tue, Jan 20, 2009 at 10:37 PM, Gordon Smith gosm...@adobe.com
mailto:gosm...@adobe.com  wrote:




Haykel is probably talking about loading a resource module. The
resource bundles in a resource module automatically get added to the
ResourceManager.

 

Gordon Smith

Adobe Flex SDK Team

 

From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Yves Riel
Sent: Tuesday, January 20, 2009 4:16 AM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: RE: [flexcoders] internationalization

 

Haykel, out of curiosity, when you load them dynamically at
run-time, do you pass them to the resource bundle manager? That's what
we did but I'm curious to see what other did and if there are a open
source libraries that do just that. We didn't find any at the time so we
had to do it all ourselves.

 



From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of Haykel BEN JEMIA
Sent: Tuesday, January 20, 2009 3:33 AM
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] internationalization

Use resource bundles. If you only have 2 or 3 languages and the
resources are not heavy in size, you can simply compile them in the
application, otherwise load them at runtime.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com http://www.allmas-tn.com 





On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us
mailto:h...@netprof.us  wrote:

I'm working on a project that requires multiple languages. I'm
thinking
I have two choices...

1) Use an XML file to change the text to different languages
2) Create a query/remote object through coldfusion to pull the
different
language.

Are those my only options? Or should I say, what is the best way
to do
this? Has anyone done this or come across any articles? The
articles
I've found thus far deal with changing the
currency/calendar/etc..
While that is something that I need to use, it's not the whole
story...

Thanks much.
Scott

 






 


RE: [flexcoders] Re: Roles Based UI

2009-01-21 Thread Yves Riel
And now to answer ilikeflex last questions ...
 
Yes you will need to store the mapping between permissions and roles. When you 
create a new role, you need to have a UI that will help the user assign a list 
of permissions. You can also create a role from a template that already has a 
set of permissions assigned to it. You then just add or remove the required 
permissions to customize the role. This approach, as stated earlier in the 
e-mail trail, has the benefit of allowing to easily customize the UI for any 
type of users but it has the drawback that you must develop a role/permission 
model and all the UI that comes with it.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of ilikeflex
Sent: Tuesday, January 20, 2009 1:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Roles Based UI



Hi

It make sense the way you have implemented.
Then you need to store the mapping between the permissions and role. 
correct and what do you do when a new role is added.

Thanks
ilikeflex

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Yves 
Riel r...@... wrote:

 In our case, we use a similar scheme except that we have roles and 
permissions. It is the permission that defines the access to the 
component. If the user, in his role, has the permission set to true, 
then the user gain access to the component. It is very flexible as 
you can create many roles will similar or different permissions. At 
the end, you do not tie up the UI to a specific role but to a 
permission.
 
 E.g.
 
 mx:Button id=btndelete1 enabled=User.hasPermission
('CanDelete') /
 mx:Button id=btndelete2 enabled=User.hasPermission
('CanDelete') /
 mx:Button id=btnAdd enabled=User.hasPermission('CanAdd') /
 
 etc...
 
 You can see here that two buttons can be displayed using the same 
permission.
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On 
Behalf Of ilikeflex
 Sent: Tuesday, January 20, 2009 12:00 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Roles Based UI
 
 
 
 Hi
 
 Do you mean to say that i should do something like this
 mx:Button id=btndelete visiblieUser.hasAccess(btndelete)/
 
 In the above i am passing the id of the component.
 
 Then this means that i have to make some mapping between the 
 component and Role.
 
 I think this will be more difficult to manage. 
 
 Let me know as you are already implementing it. If you could some 
 psuedo code then it will be great.
 
 Thanks
 ilikeflex
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
 mailto:flexcoders%
40yahoogroups.com , Gregor Kiddie gkiddie@ 
 wrote:
 
  As someone who is currently re-working their Role Based Access 
 Control mechanism, point 2 is the wrong way around.
  
  It leaks the roles into the rest of the client and stops all your 
 business logic being in one place. Incidentally, this is how we 
 currently do it, and I can show how it's a pain when new roles are 
 added.
  
  The better solution is to bind the visibility (enabled, etc, 
 however you deal with not having the correct authorization) of the 
 UIComponent to a hasAccess( componentKey : String ) method on the 
 User class.
  
  This has benefits of meaning that all the code for deciding on 
 access is in one place (and makes it very easy to alter / add / 
 remove roles and components), and by binding it, if the 
 authentication changes for any reason, the view can be updated 
 quickly and cleanly.
  
  
  
  A pitfall to watch out for is hiding pieces of UI which has 
 unexpected behaviour. For example, not showing a piece of the form 
if 
 the user doesn't have the auth to change that data, if your backend 
 deletes any data it isn't sent by the client, it is easy to turn 
 a not authorised into a delete lots of data. So make sure your 
 client behaviour fits the use cases defined by your back end.
  
  
  
  Gk.
  
  Gregor Kiddie
  Senior Developer
  INPS
  
  Tel: 01382 564343
  
  Registered address: The Bread Factory, 1a Broughton Street, 
London 
 SW8 3QJ
  
  Registered Number: 1788577
  
  Registered in the UK
  
  Visit our Internet Web site at www.inps.co.uk 
 blocked::http://www.inps.co.uk/ http://www.inps.co.uk/  
 http://www.inps.co.uk/ http://www.inps.co.uk/   
  
  The information in this internet email is confidential and is 
 intended solely for the addressee. Access, copying or re-use of 
 information in it by anyone else is not authorised. Any views or 
 opinions presented are solely those of the author and do not 
 necessarily represent those of INPS or any of its affiliates. If 
you 
 are not the intended recipient please contact is.helpdesk@
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
  mailto:flexcoders

RE: [flexcoders] Navigational Design Patterns?

2009-01-21 Thread Yves Riel
Someone in this list once pointed to this framework
(http://code.google.com/p/flex-slide/). I have not looked at it but it
seems very interesting.
 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of nwebb
Sent: Wednesday, January 21, 2009 7:08 AM
To: flexcoders
Subject: [flexcoders] Navigational Design Patterns?



Hi, 

We have a modular Flex project. 
Each screen has back and next  buttons.

There are various routes through the application and I'm about to
re-write the logic which determines where the buttons take the user when
they are pressed (what is already in place is overly complex).

I'm guessing that there are fairly established methods for achieving
this and would be interested to see what exists, rather than roll out a
bespoke solution. Can anyone point me in the direction of a good
resource?

Cheers,
Neil





 


[flexcoders] Re-parenting Tree nodes using drag drop

2009-01-21 Thread Yves Riel
I looked in the archive but didn't find any useful information for this.
So, here it is: I have a Flex Tree component in which I want to
re-parent a node using drag  drop. Basically, I want to be able to take
a node, drag it on top of another node and that the dragged node be
added as a child. The standard Flex Tree will not allow this (unless I
don't know how to set it up) and I didn't find any open source component
on the net. Does any one have or has seen such a tree?
 
Thanks!


RE: [flexcoders] Re: Big issue with keyboard mapping on Windows

2009-01-21 Thread Yves Riel
I have a French Canadian keyboard mapping on my Windows machine and I can type 
all of the accentuated characters in any TextArea or TextInput. The only thing 
that I have witnessed is that I need to toggle on my French Canadian keyboard 
every time after the browser opens. It seems that Flash doesn't initially read 
the keyboard mapping correctly. As soon as I toggle the keyboard mapping on, 
once inside the browser, the keyboard works perfectly. Maybe that's your 
problem too. Looks more like a keyboard configuration issue to me than a Flex 
issue.
 


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Sebastien ARBOGAST
Sent: Wednesday, January 21, 2009 12:23 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Big issue with keyboard mapping on Windows



Does anybody have an idea about this one? 
Because I'm still stuck on it and I'm going crazy!

Sébastien Arbogast

http://sebastien-arbogast.com http://sebastien-arbogast.com 



2008/12/18 Sebastien ARBOGAST sebastien.arbog...@gmail.com 
mailto:sebastien.arbog...@gmail.com 


I'm currently developing a Flex 3 business application on a Mac laptop 
with a French Belgian keyboard.
Everything worked great until some customers started to notice that 
they can't type some characters in my app under Windows.
It seems like the main problem is with the top digit keys on the main 
keyboard: accentuated characters are correctly typed. For example '2' and 'é' 
are on the same key and normally I have to press Shift+'2' to actually get a 
'2'. Yet, on Windows (XP or Vista), all I get is a 'é', whether I press Shift 
or not. Furthermore, Ctrl+Alt characters like '@' are simply impossible to type.

Is anyone aware of any problem with internationalization and keyboard 
mapping? Is there a way to solve that? (I hope so because this one is likely to 
ruin my entire project!)

Sébastien Arbogast

http://sebastien-arbogast.com http://sebastien-arbogast.com 



 


RE: [flexcoders] Re-parenting Tree nodes using drag drop

2009-01-21 Thread Yves Riel
Thanks but this is exactly what I tried before writing this question. I
was not able to actually take a node and make it a child of another
node. The only exception to this is when the target node already has
children and that the children are already visible in the tree. If the
target node is close or has no children ... it's impossible ... at least
for me :-)




From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Wednesday, January 21, 2009 12:37 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re-parenting Tree nodes using drag  drop



Yes, there is an example in the docs under the heading:

Using drag-and-drop with list-based controls

Subheading:

Dragging and dropping in the same control

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Wednesday, January 21, 2009 12:14 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re-parenting Tree nodes using drag  drop

Hmm, that should be standard functionality.  I have used Tree DnD to
rearrange xml regularly, though not recently.  I wil look for a simple
example.  Have you tried this?

As I recall, it can be difficult to drop the first child node into an
empty parent.

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Yves Riel
Sent: Wednesday, January 21, 2009 11:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re-parenting Tree nodes using drag  drop

I looked in the archive but didn't find any useful information for this.
So, here it is: I have a Flex Tree component in which I want to
re-parent a node using drag  drop. Basically, I want to be able to take
a node, drag it on top of another node and that the dragged node be
added as a child. The standard Flex Tree will not allow this (unless I
don't know how to set it up) and I didn't find any open source component
on the net. Does any one have or has seen such a tree?

Thanks!

 


RE: [flexcoders] Flash Detection

2009-01-21 Thread Yves Riel
Maybe you could, through InstallShield, look at the
ShockwaveFlash.ShockwaveFlash key under the HKEY_CLASSES_ROOT in the
registry. The CurVer sub-key will give you the current version of the
Flash Plugin. You can then decide to force the upgrade before you
install your app. I have done that once but I don't know if it will
properly work for non English based OS. I assume so but I'm not sure.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Mike Chang
Sent: Wednesday, January 21, 2009 1:05 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flash Detection



Hi,

I have a program which has a normal desktop setup (installshield). After
install and on launch it launches an IE window and inside it's Flex.
Now I want to require minimum version of 10, but it's breaking my
program using javascript detection as in
http://www.adobe.com/products/flashplayer/download/detection_kit/
http://www.adobe.com/products/flashplayer/download/detection_kit/ .

My question is, is it possible to detect version of Flash not through
the browser? I want to be able to read some registry. 
Otherwise, can I bypass the automatic detection and upgrade mechanism by
any chance? I'm having major problem with the way Adobe is doing it,
which is upgrading, closing the window, and relaunching the same page.
Can I detect that it's less than 10, than just give user a link
(redirect to some other page), without going through how Adobe upgrades
inside the browser?

Thanks,

Mike


 


RE: [flexcoders] configuring trace

2009-01-21 Thread Yves Riel
You mean in the sense that you want to change the level for a production
release without recompiling the swf? We use a configuration file. If the
trace level is not in the config file or if the config file is not there
altogether, the level defaults to 8.



RE: [flexcoders] internationalization

2009-01-20 Thread Yves Riel
Haykel, out of curiosity, when you load them dynamically at run-time, do
you pass them to the resource bundle manager? That's what we did but I'm
curious to see what other did and if there are a open source libraries
that do just that. We didn't find any at the time so we had to do it all
ourselves.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Haykel BEN JEMIA
Sent: Tuesday, January 20, 2009 3:33 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] internationalization



Use resource bundles. If you only have 2 or 3 languages and the
resources are not heavy in size, you can simply compile them in the
application, otherwise load them at runtime.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com http://www.allmas-tn.com 





On Tue, Jan 20, 2009 at 6:46 AM, Scott h...@netprof.us
mailto:h...@netprof.us  wrote:


I'm working on a project that requires multiple languages. I'm
thinking
I have two choices...

1) Use an XML file to change the text to different languages
2) Create a query/remote object through coldfusion to pull the
different
language.

Are those my only options? Or should I say, what is the best way
to do
this? Has anyone done this or come across any articles? The
articles
I've found thus far deal with changing the
currency/calendar/etc..
While that is something that I need to use, it's not the whole
story...

Thanks much.
Scott





 


RE: [flexcoders] Re: Roles Based UI

2009-01-20 Thread Yves Riel
In our case, we use a similar scheme except that we have roles and permissions. 
It is the permission that defines the access to the component. If the user, in 
his role, has the permission set to true, then the user gain access to the 
component. It is very flexible as you can create many roles will similar or 
different permissions. At the end, you do not tie up the UI to a specific role 
but to a permission.
 
E.g.
 
mx:Button id=btndelete1 enabled=User.hasPermission('CanDelete') /
mx:Button id=btndelete2 enabled=User.hasPermission('CanDelete') /
mx:Button id=btnAdd enabled=User.hasPermission('CanAdd') /
 
etc...
 
You can see here that two buttons can be displayed using the same permission.


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of ilikeflex
Sent: Tuesday, January 20, 2009 12:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Roles Based UI



Hi

Do you mean to say that i should do something like this
mx:Button id=btndelete visiblieUser.hasAccess(btndelete)/

In the above i am passing the id of the component.

Then this means that i have to make some mapping between the 
component and Role.

I think this will be more difficult to manage. 

Let me know as you are already implementing it. If you could some 
psuedo code then it will be great.

Thanks
ilikeflex

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
Gregor Kiddie gkid...@... 
wrote:

 As someone who is currently re-working their Role Based Access 
Control mechanism, point 2 is the wrong way around.
 
 It leaks the roles into the rest of the client and stops all your 
business logic being in one place. Incidentally, this is how we 
currently do it, and I can show how it's a pain when new roles are 
added.
 
 The better solution is to bind the visibility (enabled, etc, 
however you deal with not having the correct authorization) of the 
UIComponent to a hasAccess( componentKey : String ) method on the 
User class.
 
 This has benefits of meaning that all the code for deciding on 
access is in one place (and makes it very easy to alter / add / 
remove roles and components), and by binding it, if the 
authentication changes for any reason, the view can be updated 
quickly and cleanly.
 
 
 
 A pitfall to watch out for is hiding pieces of UI which has 
unexpected behaviour. For example, not showing a piece of the form if 
the user doesn't have the auth to change that data, if your backend 
deletes any data it isn't sent by the client, it is easy to turn 
a not authorised into a delete lots of data. So make sure your 
client behaviour fits the use cases defined by your back end.
 
 
 
 Gk.
 
 Gregor Kiddie
 Senior Developer
 INPS
 
 Tel: 01382 564343
 
 Registered address: The Bread Factory, 1a Broughton Street, London 
SW8 3QJ
 
 Registered Number: 1788577
 
 Registered in the UK
 
 Visit our Internet Web site at www.inps.co.uk 
blocked::http://www.inps.co.uk/ http://www.inps.co.uk/  
 
 The information in this internet email is confidential and is 
intended solely for the addressee. Access, copying or re-use of 
information in it by anyone else is not authorised. Any views or 
opinions presented are solely those of the author and do not 
necessarily represent those of INPS or any of its affiliates. If you 
are not the intended recipient please contact is.helpd...@...
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On 
Behalf Of Dimitrios Gianninas
 Sent: 20 January 2009 14:33
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Roles Based UI
 
 
 
 Pretty simple:
 
 
 
 1) Once you app is loaded, call your server to load the user info
 
 2) Assuming you have a User class with a method isUserInRole( 
role:String ); ... then use this on various Buttons/fields/views to 
show/hide based on if the user has a particuliar role or not
 
 
 
 Dimitrios Gianninas
 
 RIA Developer Team Lead
 
 Optimal Payments Inc.
 
 
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On 
Behalf Of ilikeflex
 Sent: Monday, January 19, 2009 1:18 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Roles Based UI
 
 Hi
 
 I am developing role based GUI. Can anybody please point to best 
 practices or any flex article which can help to achieve this.
 
 Thanks
 ilikeflx
 
 AVIS IMPORTANT
 
 WARNING
 
 Ce message électronique et ses pièces jointes peuvent contenir des 
renseignements confidentiels, exclusifs ou légalement privilégiés 
destinés au seul usage du destinataire visé. L'expéditeur original ne 
renonce à aucun privilège ou à aucun autre droit si le présent 
message a été transmis involontairement ou s'il est 

RE: [flexcoders] disclosureOpenIcon/disclosureClosedIcon + Tree + change position

2009-01-16 Thread Yves Riel
I believe that the position of these icons is done in the
TreeItemRenderer. They are calculated so the icons come first, then the
label. You'll have to derive this class, make the adjustments and then
use it as the new item renderer for your tree.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of ilikeflex
Sent: Thursday, January 15, 2009 2:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] disclosureOpenIcon/disclosureClosedIcon + Tree +
change position



Hi 

I have a Tree Control and i am using the 
disclosureOpenIcon
disclosureClosedIcon

styles.

But i want to change the location where are the disclosureOpenIcon/
disclosureClosedIcon icons are displayed. 

I want to display them after the label of the tree. Bydefault icons are 
displayed before the label.

Any pointers are highly appreciated.

Thanks
ilikeflex



 


RE: [flexcoders] Source Control in Flex Builder

2009-01-08 Thread Yves Riel
Yes there is a command line tool but this is the approach I would like
to avoid. I could build an Ant Task that would get the latest from VSS
and then call eclipse.refreshLocal. However, this has the disadvantage
of having to put in an Ant file all the VSS parameters (including
password). The parameters are already in eclipse through the Team
Provider plugin. Would be much more elegant to trigger the process
directly from eclipse instead.
 
As for the wider question: It's a rather small team (2 or 3 members) and
it's nice to see what's changed during the day and to make sure that
someone's changes didn't screw up our work. On top of that,  we don't
necessarily lock down a developer into a localized portion of the
project. We do it from time to time but mainly with new or less
experienced developers. Are you able, in your projects, to consistently
lock down a developer to a specific branch without any impact to the
rest of the project?



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tom Chiverton
Sent: Thursday, January 08, 2009 9:06 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Source Control in Flex Builder



On Wednesday 07 Jan 2009, Yves Riel wrote:
 plugin for Eclipse. My problem is that I'm tired to manually refresh
all
 the projects. Every morning, I have to highlight the project,
 right-click and select the Team - Refresh sub-menu. I would like to

Is there a command line tool for VSS ? If so you could easily have a
scheduled 
task do it.

The wider question is why you have to update daily. If you are working
in a 
team, shouldn't you all be on different branches ?

-- 
Tom Chiverton
Helping to seamlessly exploit robust low-risk networks


 

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

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office
address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB. A list of members is available for inspection at the
registered office together with a list of those non members who are
referred to as partners. We use the word ?partner? to refer to a member
of the LLP, or an employee or consultant with equivalent standing and
qualifications. Regulated by the Solicitors Regulation Authority.

CONFIDENTIALITY

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

For more information about Halliwells LLP visit www.halliwells.com
http://www.halliwells.com/ .

 


RE: [flexcoders] Source Control in Flex Builder

2009-01-08 Thread Yves Riel
I haven't built any batch or Ant file just yet. I wanted to see if
others had tackled triggering the Team Refresh functionality form an Ant
file before.



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tom Chiverton
Sent: Thursday, January 08, 2009 10:23 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Source Control in Flex Builder



On Thursday 08 Jan 2009, Yves Riel wrote:
 Yes there is a command line tool but this is the approach I would like
 to avoid. I could build an Ant Task that would get the latest from VSS
 and then call eclipse.refreshLocal. However, this has the disadvantage
 of having to put in an Ant file all the VSS parameters (including
 password).

So you want to replace a scheduled batch file with a scheduled ant file
? Why 
bother...

 As for the wider question: It's a rather small team (2 or 3 members)
and
 it's nice to see what's changed during the day and to make sure that
 someone's changes didn't screw up our work. 

I just keep an eye on the change log from the server, which as we use 
Subversion is just an RSS feed.

 Are you able, in your projects, to consistently 
 lock down a developer to a specific branch without any impact to the
 rest of the project?

Well, we use Subversion, so it might not be relevant :-)

We're a small team, and not all in the same place at the same time. But
we can 
co-ordinate via Skype or email well enough that we're not going to tread
on 
anyones toes. 
Updates to any shared components are done and tested in isolation and 
then 'released' for the rest of the team to upgrade to when they are
ready. 
Typically that won't be the following day because they'll be wanting to 
finish their existing block of work first.

-- 
Tom Chiverton
Helping to completely engage dot-com total cross-media e-markets


 

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

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office
address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB. A list of members is available for inspection at the
registered office together with a list of those non members who are
referred to as partners. We use the word ?partner? to refer to a member
of the LLP, or an employee or consultant with equivalent standing and
qualifications. Regulated by the Solicitors Regulation Authority.

CONFIDENTIALITY

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

For more information about Halliwells LLP visit www.halliwells.com
http://www.halliwells.com/ .

 


[flexcoders] Source Control in Flex Builder

2009-01-07 Thread Yves Riel
Just throwing a line here to see if someone did this as I'm sure someone
did at some point. I have a few projects in Flex Builder and all of them
are under source control using the Visual SourceSafe Team Provider
plugin for Eclipse. My problem is that I'm tired to manually refresh all
the projects. Every morning, I have to highlight the project,
right-click and select the Team - Refresh sub-menu. I would like to
build an Ant Task that would automatically do this for all the projects.
I saw someone using an Ant Task that was actually getting all the latest
files from SourceSafe and then calling the eclipse.refreshLocal. I'm not
sure about this approach as I believe that it could possibly start
adding unwanted files in my projects since only the src folder is put
under source control. I would rather be able to trigger the Team Refresh
function directly from Ant and for a specific folder. Did anyone do
something like this? Did anyone had success controlling the Team
Provider plugin functionalities from Ant?
 
And if you did, how did you work around the problem when getting the
latest files for a Flex Library project? Each time I have to manually go
and include the new files in the library through the Flex Library Build
Path property of the project.


RE: [flexcoders] Dragging to Super Tab Navigator

2009-01-06 Thread Yves Riel
It's not clear where you want the dragged image to appear. Is it on the
tab itself or on the container contained in the SuperTabNavigator? If
it's on the container, then just implement drag and drop operations for
your container and that should do the trick. If you are looking to drag
the image on top of the SuperTabNavigator's SuperTabBar and expect it to
create a container that will hold the image, then it's a bit more
complicated.
 
The SuperTabNavigator, through its SuperTabBar handles the drag and drop
operations but only of SuperTab controls. Anything else is ignored. If
you want the SuperTabBar to handle other type of drag and drop
operation, you'll need to extend the classes or listen to the drag and
drop events of the SuperTabBar. If you use the mx_internal namespace,
you can get a handle on the SuperTabBar of the SuperTabNavigator by
using the method getTabBar() and casting the returned object to a
SuperTabBar. Just remember that you cannot add an Image as a child of a
SuperTabNavigator, only Containers can be child of this object.
 
Hope it helps!



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Evan
Sent: Monday, January 05, 2009 4:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dragging to Super Tab Navigator



I have a grid this is filled with images. I have a SuperTabNavigator 
on the same screen. How do I set it up, so I can drag images to each 
tab in the navigator? That is, if I have ten tabs, I want to drag 
different objects to each one. 

The dragging works fine to a separate canvas, but how do I add a 
separate canvas to each tab? I think I need to do something at the 
point where the child is added that shows the contents for each tab, 
but I'm missing something. 

Thank you so much 



 


RE: [flexcoders] Re: objects bound to datagrid not gc'd when dataprovider set to null

2008-12-02 Thread Yves Riel
I had a similar problem with lists. I found out that the itemRenderer
does not release its reference to the data member. While digging into
the code, I've found out that Adobe has access to the list through the
mx_internal namespace. So, I cooked up a small helper function to
release the itemRenderer. Try to adapt it to the grid.
 
BEGIN CODE
import mx.core.mx_internal;

use namespace mx_internal;

/**
* Helper function that cleans up a list's item renderers.
* 
* PThe item renderers contain a data member that holds a reference to
the data the list was
* trying to display. The list doesn't clean up the item renderers data
member when the list provider is set
* to null. So, this reference prevents elements from being garbage
collected and needs to be manually cleaned up/P.
* 
* @param list The list for wich the Item Renderers need to be cleaned
up.
* 
*/
 
public static function cleanItemRenderersData(list:ListBase):void {
 
var renderers:Array = list.rendererArray; // two dimensional array
var renderer:IDataRenderer = null;
for (var row:int = 0 ; row  renderers.length ; row++) {
for (var col:int = 0 ; col  renderers[row].length ; col ++) {
renderer = renderers[row][col] as IDataRenderer;
renderer.data = null;
}
}
}



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lmurphy
Sent: Monday, December 01, 2008 8:39 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: objects bound to datagrid not gc'd when
dataprovider set to null



Could anyone point me in the right direction?

I've removed -

* data binding references
* remote object call references - clearResult

However, after setting the dataprovider for my grid to null - the grid
shows no items, in the debugger the dataprovider has a length of 0 -
there are still references to the objects.

All of the references seem to be coming from datagriditemrenderers (I
do not use any special item renderer, simply the default). The
reference list/tree is large with and incomprehensible to me - but
they all seem to be coming from classes I don't control.

Any thoughts?