[flexcoders] Re: DataGrid scroll size on data load

2008-06-11 Thread jmfillman
I have horizontalScrollPolicy=on, which doesn't make a difference. 
The field gets cut off whether on, off, or auto. My issue is knowing 
how big to set the column, based on the data.

My preference would be a column itemRenderer using a TextArea with 
word wrap, but that doesn't appear to work either.

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

 You can set column sizes whenever you feel like it, but if you have
 hScrollPolicy=off, the other columns may adjust since all columns 
must
 fit on screen under that policy.  If you look in the archives, 
several
 folks have struggled with it.  To determine the exact size for a 
column
 requires visiting every row in the data which is expensive so having
 some other way is recommended.  
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of jmfillman
 Sent: Tuesday, June 10, 2008 8:21 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] DataGrid scroll size on data load
 
  
 
 When I load data into a DataGrid, the right most field often gets 
cut 
 off. The column widths are set when the application loads. The 
question 
 is, how do I make it expand dynamically to adjust to the width of 
the 
 longest field in the column?





[flexcoders] Blocking Dialog In Felx

2008-06-11 Thread Parkash
Hi All

 

I have created a custom yes/no dialog using TileWindow and I am displaying it 
with the help of Popup Manager. Note this is Modal Dialog.

Now I am deleting ten records all at once so this dialog opens up and ask for 
user confirmation r you sure you delete this record, but the problem is this 
dialog in non-blocking dialog and displays all ten confirmation message at the 
same time, please tell me how to create blocking Dialog in flex . 

Is multithreading is allowed in flex or can callLater () method is a solution 
of this problem if yes please tell me how .

Thanks 

Parkash Arjan


RE: [flexcoders] Math.abs() Limitation?

2008-06-11 Thread Gordon Smith
 Number.MAX_VALUE doesn't have enough precision to handle what I was
trying to do.



What do you mean by this? A Number, being 64 bits, actually has both
more precision and more range than int, which is 32 bits. For example,
in addition to storing fractional values, it can store integers much
larger than int.MAX_VALUE.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Freiman
Sent: Friday, June 06, 2008 2:10 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.abs() Limitation?

 

I figured it out.  The trace made it obvious (as opposed the debugger
which is what I was previously using).  I was using Number.MAX_VALUE,
not int.MAX_VALUE.  Number.MAX_VALUE doesn't have enough precision to
handle what I was trying to do.

Thanks,

- Daniel Freiman

On Fri, Jun 6, 2008 at 2:29 PM, Gordon Smith [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

What do you get when you trace out the following values?

 

int.MAX_VALUE - 1290

Math.abs(int.MAX_VALUE - 1290)

int.MAX_VALUE - 1284

Math.abs(int.MAX_VALUE - 1284)

 

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 Alex Harui
Sent: Friday, June 06, 2008 11:18 AM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: RE: [flexcoders] Math.abs() Limitation?

 

What if you use temporary variables?

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Daniel Freiman
Sent: Friday, June 06, 2008 9:09 AM
To: flexcoders
Subject: [flexcoders] Math.abs() Limitation?

 

According to my code the following statement returns true.

Math.abs(int.MAX_VALUE - 1290) == Math.abs(int.MAX_VALUE - 1284)

I tried converting everything to type Number that didn't help.  Getting
ride of the abs() makes the calculation work correctly but then I don't
have the absolute value.

Thoughts?

- Daniel Freiman

 

 



RE: [flexcoders] Re: Object name from a mouse click

2008-06-11 Thread Gordon Smith
 I want to know objDG 

 

Sorry, that doesn't make sense. objDG isn't the name of the DataGrid,
it's the name of a variable that points to a DataGrid instance. You
could lots of variables pointing to the same DataGrid instance.
Instances don't keep track of the names of variables that point to them.


 

Can you clarify what you're really trying to do from a user's point of
view rather than from a programming point of view?

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Friday, June 06, 2008 11:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Object name from a mouse click

 

objDG = new myDG();
I want to know objDG. I have a number of GDs based on the same class. 
Based on objDG I need to run different parts of my code.

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

 What do you mean by the actual object name? The 'id' that you
 specified in MXML?
 
 
 
 And what object are you talking about? A component inside your item
 renderer?
 
 
 
 Gordon Smith
 
 Adobe Flex SDK Team
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of markgoldin_2000
 Sent: Friday, June 06, 2008 7:12 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Object name from a mouse click
 
 
 
 I am overriding mouseDoubleClickHandler event for a custom dataGrid.
 How can I get the actual object name (not a class name) when I 
dblclick?
 
 Thanks


 



RE: [flexcoders] Datagrid Password Column?

2008-06-11 Thread flexcoders
A TextInput just contains a TextField and draws border and background
around it.  DGIR extends TextField.  If you're ok with popup editors,
I'd extends both DGIR as the renderer and TextInput as the editor.

 

If you really need TextInput as the renderer, try setting
backgroundColor=.  I'm not sure I understand what was wrong about
backgroundAlpha=0

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dennis Falling
Sent: Tuesday, June 10, 2008 10:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Datagrid Password Column?

 

I'm trying to make an editable password column in a datagrid that
displays asterisks instead of the characters of the string that it's
displaying.  Simply using a TextInput with displayAsPassword does
exactly this, but when the row is selected (whether the password field
is selected or not), the password field has a solid white background.
This looks inconsistent compared to other editable column fields, so I'm
hoping someone has a trick to fix this.  As Tracy suggested, I can make
it's background alpha 0, but then it doesn't look right when it's
selected.  This may seem petty, but it looks wrong.

I can always create an item renderer that emulates the TextInput's
displayAsPassword property, but I'm so close now, and was hoping there's
a trick I'm missing to get this working.




On Tue, Jun 10, 2008 at 11:56 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Maybe I don't understand what you want.  Do you want rendererIsEditor or
do you want an editor to popup over the cell?  My first instinct would
be to have an editor popup over the cell so rendererIsEditor=false, and
I subclass DGIR as the column renderer, and supply a custom TextInput as
the editor with displayAsPassword=false.

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Dennis Falling
Sent: Tuesday, June 10, 2008 9:44 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Datagrid Password Column?

 

I tried doing the same thing I'm doing now, except moving the TextInput
into an external item renderer and listening for begin/end edit events
to toggle the alpha, but that seemed really clunky.  So you're saying
that is probably the best way?

On Tue, Jun 10, 2008 at 11:34 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

You should be able to use DataGridItemRenderer and set its
displayAsPassword=true in a subclass or in a custom classFactory

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Tracy Spratt
Sent: Tuesday, June 10, 2008 6:06 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: RE: [flexcoders] Datagrid Password Column?

 

Maybe set backgroundAlpha=0?

Tracy

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Dennis Falling
Sent: Tuesday, June 10, 2008 7:28 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Datagrid Password Column?

 

I have an editable DataGrid that displays usernames and masked passwords
().  To hide the password, I'm just using an inline item
renderer:

mx:DataGridColumn dataField=password headerText=Password
editorDataField=text rendererIsEditor=true
mx:itemRenderer
mx:Component
mx:TextInput displayAsPassword=true borderStyle=none/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn

This works exactly how I want it to, with very little code...except it
doesn't look too hot when that row is selected: the TextInput always has
a solid white background whether it's selected or not.  Is there an easy
way to tell it to make it not show a background except when selected
(appear like the default item editor)?  I've listened to the various
edit events but can't figure out a clean way of doing this.

Thanks!

 

 

 



RE: [flexcoders] Re: DataGrid scroll size on data load

2008-06-11 Thread Alex Harui
Just set wordWrap=true on the column? And variableRowHeight=true?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Tuesday, June 10, 2008 11:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: DataGrid scroll size on data load

 

I have horizontalScrollPolicy=on, which doesn't make a difference. 
The field gets cut off whether on, off, or auto. My issue is knowing 
how big to set the column, based on the data.

My preference would be a column itemRenderer using a TextArea with 
word wrap, but that doesn't appear to work either.

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

 You can set column sizes whenever you feel like it, but if you have
 hScrollPolicy=off, the other columns may adjust since all columns 
must
 fit on screen under that policy. If you look in the archives, 
several
 folks have struggled with it. To determine the exact size for a 
column
 requires visiting every row in the data which is expensive so having
 some other way is recommended. 
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of jmfillman
 Sent: Tuesday, June 10, 2008 8:21 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] DataGrid scroll size on data load
 
 
 
 When I load data into a DataGrid, the right most field often gets 
cut 
 off. The column widths are set when the application loads. The 
question 
 is, how do I make it expand dynamically to adjust to the width of 
the 
 longest field in the column?


 



[flexcoders] Memory leak caused by Image and String objects

2008-06-11 Thread akila_ksri
I have an application that makes use of 3 to 4 'Image' objects and
quite a few labels. The memory grows enormously when an Image.load()
occurs even though I have only one instance of the Image object at a
time. (I need to execute the load() method since the image needs to be
loaded dynamically).

When run with the flex profiler, I observed that 'String' objects are
consuming lot of memory and hence causing memory leaks. This results
in the application crashing after running continuously for couple of
hours in IE 7.

Would really appreciate it if anyone has any suggestions on how to
reduce the memory leak and improve performance.



Re: [flexcoders] Re: Any best-practice for labelField=field.innerField on things like DataGridC

2008-06-11 Thread Doug McCune
I've done something like this before, where fullField is the String
representation of the field (like field1.field2.field3) and item is the
top-level data object:

var split:Array = fullField.split(.);

var valueObj:Object = item;
for(var i:int=0; isplit.length; i++) {
valueObj = valueObj[split[i]];
}


On Tue, Jun 10, 2008 at 9:30 PM, Alex Harui [EMAIL PROTECTED] wrote:

There's a DeepDataGridColumn example on my blog that can do simple
 field.subfield


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *ben.clinkinbeard
 *Sent:* Tuesday, June 10, 2008 7:50 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: Any best-practice for
 labelField=field.innerField on things like DataGridC



 I don't think you can do field.subField but you could use
 labelFunctions to accomplish essentially the same thing. Heck, you
 might even be able to set dataField = field.subField and then use a
 generic labelFunction that does something like return
 data[column.dataField]. Just a guess on that part but labelFunction is
 definitely the core of what you'll need.

 HTH,
 Ben

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Hey guys,
  Is there a well-used trick to reference field.subField rather than
 just
  field when setting up datagrid columns? I'd rather not have to
 flatten my
  DTOs or add a bunch of redundant get functions if possible - the DTO is
  bindable and the fields are just public vars.
 
  Cheers,
  -Josh
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

  



[flexcoders] HTTPService Bug

2008-06-11 Thread Rafael Faria
Any reason why HTTPService when return my XML as an Object transform
the following array into strings that was suppose to contain strings

item key=version
label![CDATA[Version]]/label
type![CDATA[dropdown]]/type
source
item key=![CDATA[Choose]]/item

item key=2.0![CDATA[2.0]]/item
item key=1.2![CDATA[1.2]]/item
item key=1.0![CDATA[1.0]]/item
/source
default![CDATA[Choose]]/default
width![CDATA[100]]/width
rules![CDATA[trim|required]]/rules
/item

I'm populating my combobox with the source node. I'm using
HTTPService and the resultFormaat = object.

It adds but whenever i have 1.0 or 2.0 flex just assume it's an string
and use 1 or 2 removing the .0. 

there is anyway to tell flex to NOT remove that i want an string and
not an integer?

raf



[flexcoders] How would i layout different objects in grid form

2008-06-11 Thread anuj181
Hi 
I have few objects containing of type image in my HBOX container. I am
letting user drag and drop those objects within the HBOX. I want to
provide user the option to arrange those objects in grid layout form.
There is radio button on the main application saying 'Grid' and if
user selects that button then depending on the number of objects, the
grid layout will be generated in HBOX (to arrange those objects). For
example if there are 2-4 objects then they will be generated in form
of 2x2 matrix, if 5-9 objects then they will be generated in 3x3
matrix and if 10-16 objects then they will be arranged in 4x4 matrix.
For the time being I am just considering 16 objects in the HBOX. The
size of the objects can be shrunk depending on the layout generated.
Definitely if user selects grid option he cannot drag and drop any more.
Does anyone know which is the best approach to achieve this? And is
there any inbuilt Flex 3 component that will take care of this.
Any help will be highly appreciated.
Thanks a lot.
Anuj




Re: [flexcoders] Re: DataGrid scroll size on data load

2008-06-11 Thread Parkash
This Might Help you ... and is much better way then wraping header text

mx:DataGridColumn  headerRenderer=HeaderRenderer .  /

//HeaderRenderer.mxml
?xml version=1.0 encoding=utf-8?
mx:Label xmlns:mx=http://www.adobe.com/2006/mxml; text={data.headerText} 
truncateToFit=true
 
/mx:Label

  - Original Message - 
  From: jmfillman 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, June 11, 2008 11:00 AM
  Subject: [flexcoders] Re: DataGrid scroll size on data load


  I have horizontalScrollPolicy=on, which doesn't make a difference. 
  The field gets cut off whether on, off, or auto. My issue is knowing 
  how big to set the column, based on the data.

  My preference would be a column itemRenderer using a TextArea with 
  word wrap, but that doesn't appear to work either.

  --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:
  
   You can set column sizes whenever you feel like it, but if you have
   hScrollPolicy=off, the other columns may adjust since all columns 
  must
   fit on screen under that policy. If you look in the archives, 
  several
   folks have struggled with it. To determine the exact size for a 
  column
   requires visiting every row in the data which is expensive so having
   some other way is recommended. 
   
   
   
   
   
   From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On
   Behalf Of jmfillman
   Sent: Tuesday, June 10, 2008 8:21 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] DataGrid scroll size on data load
   
   
   
   When I load data into a DataGrid, the right most field often gets 
  cut 
   off. The column widths are set when the application loads. The 
  question 
   is, how do I make it expand dynamically to adjust to the width of 
  the 
   longest field in the column?
  



   

RE: [flexcoders] Flex 3.1 - The Marshall Plan

2008-06-11 Thread Gregor Kiddie
Are you really asking whether remote content will be allowed
application-level access to the computer?

In essence, yes. Or at least the ability to trust remote modules
somehow.

I thought about this some more last night after I had posted my original
message, and I'm pretty sure that this solution is for a problem that is
quite specific. But it would be nice to discuss and expand upon.

The example I've been given in the past is that man in the middle
attacks are the main reason for not allowing remote module loading in
AIR. Fair enough I understand the risks. But when the AIR file is
downloaded for the first time, exactly the same caveat applies, how do
you know that what you are downloading is what you think you are
downloading?

The counter argument is that there is a user agreement so if the
downloaded application steals every password they have it's their fault.
Fair enough, that's the standard practice.

I'd suggest that we extend this paradigm so that the application can
download remote modules and trust them, as long as the user gives their
agreement.

Counter argument, bad User experience (see Vistas constant Are you sure
you want to do this dialogs).

So the only real solution to this is to apply some level of trust to the
remote modules whether it be signing, encryption, or whatever. After
all, if you cannot trust the modules you download, how can you trust the
AIR files you download?

 

But that is a little scary, so I stopped thinking about it ;)

 

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/ 

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 [EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 10 June 2008 18:42
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 3.1 - The Marshall Plan

 

If your remoteModule contains UI, it could be a remote application and
work under the Marshall Plan.

 

Are you really asking whether remote content will be allowed
application-level access to the computer?

Recent Activity

*  99

New Members
http://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnNWFvNGhyB
F9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsB
HNsawN2bWJycwRzdGltZQMxMjEzMTE5NzE5 

Visit Your Group
http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmNWJzYmxoBF9TAzk3M
zU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z
2hwBHN0aW1lAzEyMTMxMTk3MTk- 

Yahoo! Finance

It's Now Personal
http://us.ard.yahoo.com/SIG=13ool56uu/M=493064.12016257.12445664.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1213126919/L=/B=ESZtAtFJq10-/J=12
13119719951204/A=4507179/R=0/SIG=12de4rskk/*http:/us.rd.yahoo.com/evt=50
284/*http:/finance.yahoo.com/personal-finance 

Guides, news,

advice  more.

New web site?

Drive traffic now.
http://us.ard.yahoo.com/SIG=13od9v5lv/M=493064.12016308.12445700.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1213126919/L=/B=EiZtAtFJq10-/J=12
13119719951204/A=3848642/R=0/SIG=131eshi2t/*http:/searchmarketing.yahoo.
com/arp/srchv2.php?o=US2004cmp=Yahooctv=Groups3s=Ys2=s3=b=50 

Get your business

on Yahoo! search.

Yahoo! Groups

Find balance
http://us.ard.yahoo.com/SIG=13ose663d/M=493064.12016238.12823558.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1213126919/L=/B=EyZtAtFJq10-/J=12
13119719951204/A=528/R=0/SIG=11in3uvr5/*http:/new.groups.yahoo.com/p
lanforabalancedlife 

between nutrition,

activity  well-being.

.

 
http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=115756/stime=1213119719/nc1=4507179/nc2=3848642/nc3=528 
 



Re: [flexcoders] Math.abs() Limitation?

2008-06-11 Thread John McCormack
Inside a Flex Builder 3 Actionscript project, when debugging..

Code:
var n1:int=Math.abs(int.MAX_VALUE - 1290);
var n2:int=Math.abs(int.MAX_VALUE - 1284);
var n3:Number=Math.abs(int.MAX_VALUE - 1290);
var n4:Number=Math.abs(int.MAX_VALUE - 1284);

if (Math.abs(int.MAX_VALUE - 1290) == Math.abs(int.MAX_VALUE - 1284)) {
   var nh:int=2;   // with a breakpoints here to see if the
   nh++;//  condition is true. It never arrived here.
} 

In the variables pane:
n1 2147482357 [0x7af5] 
n2 2147482363 [0x7afb] 
n3 2147482357 [0x7af5] 
n4 2147482363 [0x7afb] 

Everything works as expected.

John

  - Original Message - 
  From: Daniel Freiman 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, June 06, 2008 10:10 PM
  Subject: Re: [flexcoders] Math.abs() Limitation?


  I figured it out.  The trace made it obvious (as opposed the debugger which 
is what I was previously using).  I was using Number.MAX_VALUE, not 
int.MAX_VALUE.  Number.MAX_VALUE doesn't have enough precision to handle what I 
was trying to do.

  Thanks,

  - Daniel Freiman


  On Fri, Jun 6, 2008 at 2:29 PM, Gordon Smith [EMAIL PROTECTED] wrote:


What do you get when you trace out the following values?



int.MAX_VALUE - 1290

Math.abs(int.MAX_VALUE - 1290)

int.MAX_VALUE - 1284

Math.abs(int.MAX_VALUE - 1284)



Gordon Smith

Adobe Flex SDK Team






From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Alex Harui
Sent: Friday, June 06, 2008 11:18 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Math.abs() Limitation?



What if you use temporary variables?






From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
Daniel Freiman
Sent: Friday, June 06, 2008 9:09 AM
To: flexcoders
Subject: [flexcoders] Math.abs() Limitation?



According to my code the following statement returns true.

Math.abs(int.MAX_VALUE - 1290) == Math.abs(int.MAX_VALUE - 1284)

I tried converting everything to type Number that didn't help.  Getting 
ride of the abs() makes the calculation work correctly but then I don't have 
the absolute value.

Thoughts?

- Daniel Freiman



   

[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
Don't put your bollocks to my bollocks dude :) :)

Steve White: Oh I think it's across the board. Typically, whenever
people are in a position of power, or think they're in a position of
power, is when it most likely arises.

Yes, there are clients who will screw your happiness in every way they
could. I guess you have to be careful when picking the clients. If you
feel that something might go bad, talk to them and discuss, usually
that's all it takes. In my work for hire experience not only that I
reused my code, but with clients we collectively worked in improving
each other's the code base. 

So if you one wants to be completely covered I suggest before doing
the coding you take a pill that will erase your memory completely
after the project. 

Of course, I would never sell the exact same solution I did for a
client to somebody else. 




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

 
 BOLLOCKS to your BOLLOCKS!
 
 (no offence intended, Alen)
 
 
 I wish it was as clear-cut as you say, but there's a large grey areas
 there (this is just dealing with a class library, not a whole
application)
 
 http://www.abc.net.au/rn/talks/8.30/lawrpt/stories/s295800.htm
 
 (about half way down)
 
 Steve White: The key factor is that Section 35-6 of the Copyright Act
 says that works written by an employee within the scope of their
 employment belonged to their employer. In a nutshell, that's the key.
 And this mistake is often made by a lot of people that think that when
 they work for someone else the things that they write for their
 employer actually belong to them, rather than belonging to their
 employer. And that I think is the most important part of the decision.
 
 What also was very interesting was the way that the judge actually
 worked out what was written within the scope of one's employment, and
 what wasn't. And it's true to say a bit of time was spent looking at
 the date and time stamps on various files to see when they were
 written, were they written during the day, outside business hours, or
 when they were written; and we certainly spent some time doing a bit
 of expert analysis on getting that and working that out.
 
 
 
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, b_alen alen.balja@ wrote:
 
  BOLLOCKS!! Of course you can reuse your code. You're code is not
  stored in AS files anyway, but in your head. So unless you can erase
  memory how you cracked the algorithm or designed a system, there's no
  way you could not reuse the code. Since every project is different in
  nature, there's a very small chance you will end up copy pasting the
  entire solution for the new client. So in reality you will take bits
  and pieces from old projects, even improve the code a bit, write some
  new stuff and that's it.
  
  
  
  
  
  --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
  
   I was recently asked to sign an agreement that would designate a
Flex 
   project as Work for Hire.  I.e. I would not retain any
ownership of 
   the code I wrote for the project.  This seems to defeat the
 purpose of 
   OOP, if I create a whole body of code that I can't then reuse. 
 How do 
   most Flex developers handle the idea of Work for Hire?
   
   Thanks;
   
   Amy
  
 





[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
No, the floor is not Employee's. But if the employee by doing the
finishing of the floor realizes how to do it with different tools and
techniques better, then he has every right to apply his knowledge on
another floor with different client.

-


As an example: A Employer hires a Employee to re-finish a hard-wood
floor, does the employee then have the right to claim the floor is
theirs? Most assuredly not, this same argument has been upheld in
almost all State courts.



 Amy - If you seriously want the position then sign the agreement and
take the fair pay they are offering for the job. If the pay isn't
fair, then negotiate a more lucrative deal. If you don't like their
terms and conditions, you can attempt to negotiate them away,
butdon't be surprised if they aren't receptive to that approach.
What you have to ask yourself is Do I have a complete corner on the
skill set that they are looking for that they have no choice but to
accept my demands to maintain the IP - I am most sure that the vast
majority of the world don't have such skill sets
 
 BTW, I think you need to re-consider your definition of OOP.it
has absolutely nothing to do with maintaining IP.
 
 GB,
 Bubba
 
 
 From: b_alen 
 Sent: Tuesday, June 10, 2008 10:45 PM
 To: flexcoders@yahoogroups.com 
 Subject: [flexcoders] Re: OOP and Work for Hire
 
 
 BOLLOCKS!! Of course you can reuse your code. You're code is not
 stored in AS files anyway, but in your head. So unless you can erase
 memory how you cracked the algorithm or designed a system, there's no
 way you could not reuse the code. Since every project is different in
 nature, there's a very small chance you will end up copy pasting the
 entire solution for the new client. So in reality you will take bits
 and pieces from old projects, even improve the code a bit, write some
 new stuff and that's it.
 
 --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
 
  I was recently asked to sign an agreement that would designate a Flex 
  project as Work for Hire. I.e. I would not retain any ownership of 
  the code I wrote for the project. This seems to defeat the purpose of 
  OOP, if I create a whole body of code that I can't then reuse. How do 
  most Flex developers handle the idea of Work for Hire?
  
  Thanks;
  
  Amy
 





[flexcoders] Finding the last day of the month

2008-06-11 Thread Indra Prastha
Hi,

I used to work with Coldfusion where they have this function like
DaysInMonth(date), to obtain the last day of the month (31 / 30, or 28 /
29 for feb / leap year)
,and it's very handy, is there anyway I could achieve the same function
in Flex?

Thanks.

Cheers!

Indra Prastha,
[EMAIL PROTECTED]
ERP Team @ DataOn Corp.





Re: [flexcoders] Re: Possible to add some data to load to the default preloader?

2008-06-11 Thread Tom Chiverton
On Wednesday 11 Jun 2008, b_alen wrote:
 Yes it's a bit messy, and the loader bar would not show the exact
 progress, it would only stay there at 100% until the data arrives.

We fade up to white at the end of the preloader, then fire the 'done' event 
when the effect finishes, and when the app is ready it fades back from white.

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Possible to add some data to load to the default preloader?

2008-06-11 Thread b_alen
Ignoring the default preloader and rolling your own? Do you have link
to more info on that? That might be half way there. 

Anyway, I guess my question is answered - it is not possible. But
wouldn't it be an interesting feature?




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

 I'll bet you had to handroll it in Flash 5, and you can hand-roll it in
 Flex 3.  It will just take some work like it did in Flash 5.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of b_alen
 Sent: Tuesday, June 10, 2008 8:40 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Possible to add some data to load to the
 default preloader?
 
  
 
 Yes it's a bit messy, and the loader bar would not show the exact
 progress, it would only stay there at 100% until the data arrives.
 That's why it would be good, IMHO, if there would be a way to do it
 seamlessly, by just specifying data paths that have to be loaded with
 the app itself. At the end of the day, most web apps have to load some
 dynamic data at the beginning. So it's a bit disappointing that what I
 could do with Flash 5 in 2001, I can't do with Flex 3 in 2008. 
 



Re: [flexcoders] Blocking Dialog In Felx

2008-06-11 Thread David Pariente
Hi, 

I'm quite new to flex...so i dont know what tools there are to do this.
I'm so new that i must look for other ways to solve problems,
so I would make an array, and for each element of the array i would throw that 
popup. 
Check first one, and when confirmed or cancelled, call a function that throws 
the next one in the array.

I guess there is a Flex friendly approach already implemented...just i really 
dont know the environment that much :)

I just said something in case noone answers u. But i would also want that info 
as often i will have to program sequencial code.


- Mensaje original 
De: Parkash [EMAIL PROTECTED]
Para: flexcoders@yahoogroups.com
Enviado: miércoles, 11 de junio, 2008 9:05:14
Asunto: [flexcoders] Blocking Dialog In Felx


Hi 
All
 
I have created a 
custom yes/no dialog using TileWindow and I am displaying it with the help of 
Popup Manager. Note this is Modal Dialog.
Now I am 
deleting ten records all at once so this dialog opens up and ask for user 
confirmation r you sure you delete this record, but the problem is this dialog 
in non-blocking dialog and displays all ten confirmation message at the same 
time, please tell me how to create blocking Dialog in flex . 
Is 
multithreading is allowed in flex or can callLater () method is a 
solution of this problem if yes please tell me how 
.
Thanks 
Parkash 
Arjan


  __ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.

Re: [flexcoders] Flash Player Debug version

2008-06-11 Thread Tom Chiverton
On Wednesday 11 Jun 2008, Kerry Thompson wrote:
 redirected me to the Adobe install page.

To the *debug* version, or the main runtime ?

 So I duly re-installed the latest Flash Player, and I'm still getting the
 error. What makes it even more odd is that I'm able to debug in Flash CS3
 with no problems.

Load a Flash page in your browser (the one Builder invokes). Right click the 
Flash element - is there a 'show redraw' and 'debuger' menu item ? If not, 
it's not a debug version.

 What do I need to do to get the right debug version of the Flash Player
 that will work with Flex?

Just download the latest debug version and install it.


-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Blocking Dialog In Felx

2008-06-11 Thread Tom Chiverton
On Wednesday 11 Jun 2008, Parkash wrote:
 this dialog in non-blocking dialog and displays all ten confirmation
 message at the same time, please tell me how to create blocking Dialog in
 flex .

If you were subclassing Alert, you could hook into the yes/no button clicks, 
and fire the ten deletes from there: 
http://livedocs.adobe.com/flex/3/langref/mx/controls/Alert.html (see end for 
example)

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] breakpoints stopped working

2008-06-11 Thread Tom Chiverton
On Tuesday 10 Jun 2008, Sherif Abdou wrote:
 something that needs to be opened? I did install Live Care Today so that
 may be the problem.

Does uninstalling or disabling it (whatever it is) help then ?

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] lcds references to same item

2008-06-11 Thread Thierry V.
Hello all !

I use LCDS to retrieve data from my database and display it on a tree.

I have the following tables : model, model_media and media.

I have made an hibernate model mapping with a Set from model to 
model_media, to get for each model their medias, like this :

set name=children table=model_media lazy=false
 key column=modelid /
 many-to-many column=mediaid class=MediaVO /
/set


I could retrieve data correctly, each model have their own media listed 
in the children Set. Some medias are used by several models at same 
time, for exemple :

model1
- media1
- media2
- media3

model2
- media1
- media3
- media4

Now, when I display my hierarchical list into a Tree, there is stange 
behaviours... When I display all the hierarchy for all models, and roll 
over an item used several times, the selection focus is displayed on the 
last item... ie if I roll over the media1 from model1, the focus is 
displayed on the media1 from model2... It seems that the items used some 
times are referenced at the same memory allocation... Flex doesn't 
recognize each item as single item, it see item used several times as 
the same item...

Anybody have encounted the same behaviours ?? I don't know how to 
resolve it...

any suggestion are welcome, thanks in advance


Thierry


RE: [flexcoders] Datagrid Password Column?

2008-06-11 Thread Cato Paus Skrede
Do this on the textInput borderStyle=none alpha=0.0

-Opprinnelig melding-
Fra:
[EMAIL PROTECTED]
.com
[mailto:[EMAIL PROTECTED]
ps.yahoo.com] 
Sendt: 11. juni 2008 08:31
Emne: RE: [flexcoders] Datagrid Password Column?

A TextInput just contains a TextField and draws border and background
around it.  DGIR extends TextField.  If you're ok with popup editors, I'
d extends both DGIR as the renderer and TextInput as the editor.

 

If you really need TextInput as the renderer, try setting
backgroundColor=.  I'm not sure I understand what was wrong about
backgroundAlpha=0

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dennis Falling
Sent: Tuesday, June 10, 2008 10:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Datagrid Password Column?

 

I'm trying to make an editable password column in a datagrid that
displays asterisks instead of the characters of the string that it's
displaying.  Simply using a TextInput with displayAsPassword does
exactly this, but when the row is selected (whether the password field
is selected or not), the password field has a solid white background.
This looks inconsistent compared to other editable column fields, so I'm
hoping someone has a trick to fix this.  As Tracy suggested, I can make
it's background alpha 0, but then it doesn't look right when it's
selected.  This may seem petty, but it looks wrong.

I can always create an item renderer that emulates the TextInput's
displayAsPassword property, but I'm so close now, and was hoping there's
a trick I'm missing to get this working.




On Tue, Jun 10, 2008 at 11:56 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Maybe I don't understand what you want.  Do you want rendererIsEditor or
do you want an editor to popup over the cell?  My first instinct would
be to have an editor popup over the cell so rendererIsEditor=false, and
I subclass DGIR as the column renderer, and supply a custom TextInput as
the editor with displayAsPassword=false.

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Dennis Falling
Sent: Tuesday, June 10, 2008 9:44 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] Datagrid Password Column?

 

I tried doing the same thing I'm doing now, except moving the TextInput
into an external item renderer and listening for begin/end edit events
to toggle the alpha, but that seemed really clunky.  So you're saying
that is probably the best way?

On Tue, Jun 10, 2008 at 11:34 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

You should be able to use DataGridItemRenderer and set its
displayAsPassword=true in a subclass or in a custom classFactory

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Tracy Spratt
Sent: Tuesday, June 10, 2008 6:06 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: RE: [flexcoders] Datagrid Password Column?

 

Maybe set backgroundAlpha=0?

Tracy

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Dennis Falling
Sent: Tuesday, June 10, 2008 7:28 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Datagrid Password Column?

 

I have an editable DataGrid that displays usernames and masked passwords
().  To hide the password, I'm just using an inline item
renderer:

mx:DataGridColumn dataField=password headerText=Password
editorDataField=text rendererIsEditor=true
mx:itemRenderer
mx:Component
mx:TextInput displayAsPassword=true borderStyle=none/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn

This works exactly how I want it to, with very little code...except it
doesn't look too hot when that row is selected: the TextInput always has
a solid white background whether it's selected or not.  Is there an easy
way to tell it to make it not show a background except when selected
(appear like the default item editor)?  I've listened to the various
edit events but can't figure out a clean way of doing this.

Thanks!

 

 

 

No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 270.2.0/1495 - Release Date: 10.06.2008
17:11



RE: [flexcoders] Solution similair to f-in-box (actionscript - c#)

2008-06-11 Thread Mikhail Pauw
Hi Steve,

 

Thank you for your reply. I've look through the f-in-box site for socket
connection but I can't find anything on it. Is this something your
company wrote yourself on top of f-in-box or is this a standalone
solution?

 

How do you mean that ExternalInterfaces can convert some basic types?
Because when I use the C# class I only can send strings to Actionscript
ExternalInterfaces. 

 

Greetings,

 

Mikhail

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve Mathews
Sent: dinsdag 10 juni 2008 19:11
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Solution similair to f-in-box (actionscript
- c#)

 

I have been working on the Flash side of an application like this for
just over a year now. We originally were using the default C# COM
object and later switched to f-in-box. Although ExternalInterface has
held up like a champ (it can auto convert some basic types) it is a
bit too slow for the hundreds of calls we are now making. We recently
switched to using a socket connection and so far it is working out
pretty good.

As to your question about other wrappers, I don't think there are
really any other viable ones out there.

Steve Mathews
Senior Team Lead
Flypaper Studio, Inc.
www.flypaper.com

On 6/10/08, dievanmijislanger [EMAIL PROTECTED]
mailto:m.pauw%40yucat.com  wrote:
 Hello flex'ers,

 I'm looking for solutions to integrate a flex/flash swf in a desktop
 C# .NET application.

 I've found one so far (www.f-in-box.com) and it works pretty okee, but
 I want to know if there are others. One big downfall of f-in-box is
 that you only can send strings between C# and actionscript via
 externalInterface.

 The reason why i'm so interested in this construction is that i want
 to have beautiful charts in my desktop application.

 Thanks in advance,

 Mikhail


 

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





 



Re: [flexcoders] Blocking Dialog In Felx

2008-06-11 Thread Paul Andrews
The problem is not really in handling blocking dialogs, but the way that you 
are approaching the problem.

If you have ten records to delete and MUST have confirmation for each one, 
delete them one by one and ask for each one, but don't try to delete a record 
until the previous one has been confirmed or rejected. You need to make the 
code wait for confirmation of deletion before trying to delete the next record. 
Usually this will require the code to use event handlers to queue the deletion. 
It all depends what your code looks like.

Asking a user to approve deletion of multiple records one at a time, is not 
likely to lead to a good user experience. It would be better to ask in one 
dialog if the ten records can be deleted (you can even create a datagrid 
showing the records and and allow the user to uncheck ones they don't want 
deleted). Think hard about how you are handling this - users don't always like 
being repeatedly asked the same question over and over again.

How would your user feel if they changed their mind after seeing the first 
confirmation dialog but then had to be asked the same question another nine 
times over?

Paul
  - Original Message - 
  From: Parkash 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, June 11, 2008 8:05 AM
  Subject: [flexcoders] Blocking Dialog In Felx


  Hi All

   

  I have created a custom yes/no dialog using TileWindow and I am displaying it 
with the help of Popup Manager. Note this is Modal Dialog.

  Now I am deleting ten records all at once so this dialog opens up and ask for 
user confirmation r you sure you delete this record, but the problem is this 
dialog in non-blocking dialog and displays all ten confirmation message at the 
same time, please tell me how to create blocking Dialog in flex . 

  Is multithreading is allowed in flex or can callLater () method is a solution 
of this problem if yes please tell me how .

  Thanks 

  Parkash Arjan

   

[flexcoders] Order datagrid by date in DD/MM/YYYY format

2008-06-11 Thread David Pariente
Hi everyone,

I have a datagrid with a Date column.
I want user to be able to order by that date column, but the Dates in that 
column are in DD/MM/ format, and flex doesn't order them propertly.

Does anyone have a solution for that?

Could tell Flex how should the column be ordered, by specifiyng format or 
something...?

I actually have no idea how to solve this :(

Thnx a lot



  __ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.

[flexcoders] Re: hiding a cell within a datagrid dynamically

2008-06-11 Thread anthony_morsey
Thanks TH -- your solution works great!!

Tony

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

 
 Here's another way:
 
 mx:DataGrid id=mygrid dataProvider={initDG} 
  mx:columns
  mx:DataGridColumn id=grant_year dataField=grant_year/
  mx:DataGridColumn id=cashoutshares
dataField=cashoutshares
  mx:itemRenderer
  mx:Component
  mx:Canvas
  mx:Script
  ![CDATA[
  override public function set
 data(value:Object):void
 {
 super.data = value;
 
 if (value != null)
{
 myCheckBox.selected =
 data.cashoutshares;
 myCheckBox.visible =
 data.grant_year == '1995' ? true : false; // your logic
 super.invalidateDisplayList();
 }
 ]]
  /mx:Script
 
  mx:CheckBox id=myCheckBox
 click=data.cashoutshares=myCheckBox.selected/
 /mx:Canvas
  /mx:Component
  /mx:itemRenderer
  /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid
 
 This works because the data property in an itemRenderer contains all of
 the fields for a row in a dataGrid's dataProvider.
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Manu Dhanda manuraj.dhanda@
 wrote:
 
 
  Ok, one more idea, but not sure about it's performance.
  Just use a viewstack with your custom itemrenderer and use a text
 component
  to implement your blank box logic, keeping the text=.
  Here is my idea:
 
  mx:DataGrid id=mygrid dataProvider={initDG} 
  mx:columns
 
  mx:DataGridColumn id=grant_year dataField=grant_year/
  mx:DataGridColumn id=cashoutshares dataField=cashoutshares
  itemRenderer=..MyCheckBox /
 
  /mx:columns
  /mx:DataGrid
 
  MyCheckBox.mxml:
  ?xml version=1.0 encoding=utf-8?
  mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
  horizontalAlign=center
 
  mx:Script
  ![CDATA[
 
  import mx.events.FlexEvent;
  import com.live.flats.view.assets.FlatAssets;
  import mx.controls.Alert;
 
  public function getStackView(value:Object):void {
  //return ur view here..
  }
  ]]
  /mx:Script
 
  mx:ViewStack selectedChild={ getStackView( data.cashoutshares) }
  mx:CheckBox id=aCB selected=true
  mx:Text id=aText text=/
  mx:ViewStack
  /mx:HBox
 
  Thanks,
  Manu.
 
 
  anthony_morsey wrote:
  
   Thanks, but this technique seems to work for all values in the
 column,
   not just the value in each individual row. It seems that if one of
   the values for grant_year in a column meets the condition, then all
   checkboxes are either hidden or visible. I want to do this row by
 row
   and turn visible on or off based on the grant_year value in that
 row.
  
   Any other ideas?
  
   Thanks
  
   --- In flexcoders@yahoogroups.com, Manu Dhanda manuraj.dhanda@
 wrote:
  
  
   Here it is:
   mx:DataGrid id=mygrid dataProvider={initDG} 
   mx:columns
  
   mx:DataGridColumn id=grant_year dataField=grant_year/
  
   mx:DataGridColumn id=cashoutshares dataField=cashoutshares
   itemRenderer=mx.controls.CheckBox
 visible={!grant_year=='somevalue'
   implement ur logic here}/
  
   /mx:columns
   /mx:DataGrid
  
  
  
   anthony_morsey wrote:
   
Here is my code:
   
mx:DataGrid id=mygrid dataProvider={initDG} 
mx:columns
   
mx:DataGridColumn id=grant_year dataField=grant_year/
   
mx:DataGridColumn id=cashoutshares dataField=cashoutshares
itemRenderer=mx.controls.CheckBox /
   
/mx:columns
/mx:DataGrid
   
   
   
I want to hide the cashoutshares column (or turn off the
itemrenderer in that column) based on the data value of
 grant_year.
   
Thanks
   
   
   
   
   
   
--- In flexcoders@yahoogroups.com, jmfillman jmfillman@
 wrote:
   
Anthony,
   
If you are passing the data from the columns of each row to the
itemRenderer, you should be able to set visibility conditions
   from the
itemRenderer.
   
If you post your code, I or someone else here might be able to
   provide
a more specific suggestion.
   
JF
--- In flexcoders@yahoogroups.com, anthony_morsey tmorsey@
 wrote:

 I have a datagrid with multiple columns and rows. One of the
   columns
 contains a checkbox which is rendered with an itemRenderer.
   I'd like
 to conditionally hide some of these checkboxes based on values
 from
 other columns with the same row.

 Any ideas?

 Thanks

   
   
   
   
   
  
   --
   View this message in context:
  

http://www.nabble.com/hiding-a-cell-within-a-datagrid-dynamically-tp1767\
 3007p17688100.html
   Sent from the FlexCoders mailing list archive at Nabble.com.

Re: [flexcoders] Order datagrid by date in DD/MM/YYYY format

2008-06-11 Thread Scott Melby

David -

What you want to do is sort the data in your data provider.  Typically I 
do this by storing the date as a number field (milliseconds since epoch) 
in the class that I am rendering.  This allows numeric sorting on the 
date that is rendered in the column.  The following snippet creates a 
Sort object which can then be set as the sort on your data provider when 
the date column is clicked.


var sort:Sort = new Sort();   
var dateMillisField:SortField = new SortField(dateMillis, 
true, false, true);

sort.fields = [dateMillisField];

Here is a pretty good livedocs entry on sorting data in datagrids 
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=0598.html.


hth
Scott

--
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com



David Pariente wrote:

Hi everyone,

I have a datagrid with a Date column.
I want user to be able to order by that date column, but the Dates in that 
column are in DD/MM/ format, and flex doesn't order them propertly.

Does anyone have a solution for that?

Could tell Flex how should the column be ordered, by specifiyng format or 
something...?

I actually have no idea how to solve this :(

Thnx a lot



  __ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.
  


--
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com
http://blog.fastlanesw.com



RES: [flexcoders] Finding the last day of the month

2008-06-11 Thread Michel Scoz
 

There you go...

 

public function getLastDayOfMonth(month:Number, year:Number):Number

{

  var lastDay:Number;

  

   if (month == FEBRUARYNUMBER) 

 {

 if (((year % 4) == 0  (year % 100)!=0) ||
(year % 400)==0) {

  lastDay = 29;

 } else {

  lastDay = 28;

 }

   } else if((month  7  month % 2 == 0)||(month = 7
 month % 2 == 1)) {

lastDay = 31;

   } else{

lastDay = 30;

  }

  return lastDay; 

}

 



De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em
nome de Indra Prastha
Enviada em: quarta-feira, 11 de junho de 2008 05:33
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Finding the last day of the month

 

Hi,

I used to work with Coldfusion where they have this function like
DaysInMonth(date), to obtain the last day of the month (31 / 30, or 28 /
29 for feb / leap year)
,and it's very handy, is there anyway I could achieve the same function
in Flex?

Thanks.

Cheers!

Indra Prastha,
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
ERP Team @ DataOn Corp.



 

 



Re: [flexcoders] Finding the last day of the month

2008-06-11 Thread Ralf Bokelberg
Pass in -1 as the day, eg. the date of the last day of February is
Date(2008,2,-1);
Cheers
Ralf.

On Wed, Jun 11, 2008 at 2:02 PM, Michel Scoz [EMAIL PROTECTED] wrote:


 There you go...



 public function getLastDayOfMonth(month:Number, year:Number):Number

 {

   var lastDay:Number;



if (month == FEBRUARYNUMBER)

  {

  if (((year % 4) == 0  (year % 100)!=0) || (year %
 400)==0) {

   lastDay = 29;

  } else {

   lastDay = 28;

  }

} else if((month  7  month % 2 == 0)||(month = 7 
 month % 2 == 1)) {

 lastDay = 31;

} else{

 lastDay = 30;

   }

   return lastDay;

 }



 

 De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome
 de Indra Prastha
 Enviada em: quarta-feira, 11 de junho de 2008 05:33
 Para: flexcoders@yahoogroups.com
 Assunto: [flexcoders] Finding the last day of the month



 Hi,

 I used to work with Coldfusion where they have this function like
 DaysInMonth(date), to obtain the last day of the month (31 / 30, or 28 / 29
 for feb / leap year)
 ,and it's very handy, is there anyway I could achieve the same function in
 Flex?

 Thanks.

 Cheers!

 Indra Prastha,
 [EMAIL PROTECTED]
 ERP Team @ DataOn Corp.

 



 



-- 
Ralf Bokelberg [EMAIL PROTECTED]
Flex  Flash Consultant based in Cologne/Germany


Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Jeffry Houser


No argument there, however that employee cannot work on the other 
employers floor w/ the same equipment provided by the first employer. 



b_alen wrote:


No, the floor is not Employee's. But if the employee by doing the
finishing of the floor realizes how to do it with different tools and
techniques better, then he has every right to apply his knowledge on
another floor with different client.








.

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



Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread bubbamorse
Maybe. If said tools and techniques are uncovered while being paid to 
accomplish this floor re-finishing, then No they do not have any legal right 
to re-use it. In reality, will folks re-use/re-purpose what they've done? 
Absolutely but they have no legal right to it and by taking such actions they 
are placing themselves (albeit how greatly some people like to argue about) in 
peril of legal proceedings against them. How often would that happen? More 
often then people might realize. 

Another alternative is that they could simply establish themselves with a 
reputation of not respecting their agreements with customers (and believe me 
word will get around quicker than a brushfire in the middle of August in 
California hillside country) and they have effectively black-balled themselves.

Then again the employer could simply be fat, stupid and lazy thereby never 
catching on to what is actually happening and the employee can take the 
employer for all they can get.

My recommendation is to simply sign the agreement, adhere to the letter and 
(even more importantly) the spirit of the agreement and get on with your life: 
I.e. Getting paid to do something that you enjoy and are proficient at, then 
using the proceeds to behave like a twisted, salted pretzel with your 
significant other... 

GB,
Bubba



From: b_alen 
Sent: Wednesday, June 11, 2008 3:31 AM
To: flexcoders@yahoogroups.com 
Subject: [flexcoders] Re: OOP and Work for Hire


No, the floor is not Employee's. But if the employee by doing the
finishing of the floor realizes how to do it with different tools and
techniques better, then he has every right to apply his knowledge on
another floor with different client.

-

As an example: A Employer hires a Employee to re-finish a hard-wood
floor, does the employee then have the right to claim the floor is
theirs? Most assuredly not, this same argument has been upheld in
almost all State courts.

 Amy - If you seriously want the position then sign the agreement and
take the fair pay they are offering for the job. If the pay isn't
fair, then negotiate a more lucrative deal. If you don't like their
terms and conditions, you can attempt to negotiate them away,
butdon't be surprised if they aren't receptive to that approach.
What you have to ask yourself is Do I have a complete corner on the
skill set that they are looking for that they have no choice but to
accept my demands to maintain the IP - I am most sure that the vast
majority of the world don't have such skill sets
 
 BTW, I think you need to re-consider your definition of OOP.it
has absolutely nothing to do with maintaining IP.
 
 GB,
 Bubba
 
 
 From: b_alen 
 Sent: Tuesday, June 10, 2008 10:45 PM
 To: flexcoders@yahoogroups.com 
 Subject: [flexcoders] Re: OOP and Work for Hire
 
 
 BOLLOCKS!! Of course you can reuse your code. You're code is not
 stored in AS files anyway, but in your head. So unless you can erase
 memory how you cracked the algorithm or designed a system, there's no
 way you could not reuse the code. Since every project is different in
 nature, there's a very small chance you will end up copy pasting the
 entire solution for the new client. So in reality you will take bits
 and pieces from old projects, even improve the code a bit, write some
 new stuff and that's it.
 
 --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
 
  I was recently asked to sign an agreement that would designate a Flex 
  project as Work for Hire. I.e. I would not retain any ownership of 
  the code I wrote for the project. This seems to defeat the purpose of 
  OOP, if I create a whole body of code that I can't then reuse. How do 
  most Flex developers handle the idea of Work for Hire?
  
  Thanks;
  
  Amy
 




 Emoticon1.gif

[flexcoders] Re: HTTPService Bug

2008-06-11 Thread tspyro2002
All XML attribute values, names, and text values are String data types, and you 
may need 
to convert these to other data types. For example, the following code uses the 
Number() 
function to convert text values to numbers:

var myXML:XML = 
order
item
price3.95/price
/item
item
price1.00/price
/item
/order;

var total:XML = total0/total;
myXML.appendChild(total);

for each (var item:XML in myXML.item)
{
myXML.total.children()[0] = Number(myXML.total.children()[0]) 
+ 
Number(item.price.children()[0]);
}
trace(myXML.total); // 4.35;

If this code did not use the Number() function, the code would interpret the + 
operator as 
the string concatenation operator, and the trace() method in the last line 
would output the 
following:

01.003.95

-- Taken from Adobe Flex 3 Help File


Hope this helps,
David


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

 Any reason why HTTPService when return my XML as an Object transform
 the following array into strings that was suppose to contain strings
 
 item key=version
   label![CDATA[Version]]/label
   type![CDATA[dropdown]]/type
   source
   item key=![CDATA[Choose]]/item
 
   item key=2.0![CDATA[2.0]]/item
   item key=1.2![CDATA[1.2]]/item
   item key=1.0![CDATA[1.0]]/item
   /source
   default![CDATA[Choose]]/default
   width![CDATA[100]]/width
   rules![CDATA[trim|required]]/rules
   /item
 
 I'm populating my combobox with the source node. I'm using
 HTTPService and the resultFormaat = object.
 
 It adds but whenever i have 1.0 or 2.0 flex just assume it's an string
 and use 1 or 2 removing the .0. 
 
 there is anyway to tell flex to NOT remove that i want an string and
 not an integer?
 
 raf






[flexcoders] flex and struts

2008-06-11 Thread kamel
I want to develop an application flex combining struts.
can anybody help me.



[flexcoders] Re: Display datatips from lookup field

2008-06-11 Thread kirilminevgroups
--- In flexcoders@yahoogroups.com, kirilminevgroups 
[EMAIL PROTECTED] wrote:

 I have a feature build in to my Flex Plots chart that searches my 
data
 points by given value and than it select the points on chart. This
 part works fine, but also need to display the datatips associated 
with
 this data point and let them remain opened.
 
 Any help!!! will very much appreciated.
 
 Thanks in advance.
 
 Here is some of the code I am using to select the data points:
 
   public function selectItems(event:Event):void {
   
   
   // Create an array of all the chart's series.

   var allSeries:Array = bigChart.series;
   
   // Iterate over each series.
   for (var i:int=0; i  allSeries.length; i++) 
   {
   var selectedData:Array = [];
   
   for (var j:int=0; j 
mainData.length; j++) 
   {
   if (mainData.getItemAt
(j).A == Number(txtOrderNum.text)) 
   {
   
selectedData.push(j);
   }
   
   }
   
   allSeries[i].selectedIndices = selectedData;
 
   }
   txtOrderNum.text = '';
   
 txtOrderNum.text, 'Alert Box', mx.controls.Alert.OK);
   //}
   }



Anybody who can help me with that? Just some ideas on how can that be 
done.

Thanks in advance



[flexcoders] Re: Socket HTTP/1.1 connection not closed even after Response is sent

2008-06-11 Thread e_baggg
Thanks for your response...I have a full access cross domain on my
server and loading it via Security.loadPolicyFile() does nothing as
well. Hmm...

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

--- In flexcoders@yahoogroups.com, å`¨æŒ¯å®‡ [EMAIL PROTECTED] wrote:

 When you use a socket or xmlsocket in a remote swf file,
 flashplayer would send a policy-request to the server.
 Check 

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html
 
 When you run it locally, flashplayer won't do this.
 
 I'm not sure if this is the reason.
 Maybe you should call Security.loadPolicyFile() yourself and let the 
 server give it a correct respond.
 
 
 Josh McDonald wrote:
 
  It sounds to me like your server is simply holding the connection for 
  a few seconds in order to prevent brute-force password attacks.
 
  -Josh
 
  On Wed, Jun 11, 2008 at 6:23 AM, e_baggg [EMAIL PROTECTED] 
  mailto:[EMAIL PROTECTED] wrote:
 
  This is baffling me. For authentication reasons, I am doing all my
  HTTP traffic via a custom flash.net.Socket where I create and
parse
  the HTTP request/response myself (using Digest authorization).
  Everything works fine when I run the generated html/swf files
locally,
  but once I deploy them to the unprotected part of a webserver, the
  response connection is not dropped by the server for several
seconds.
  I do a GET and receive the 401 immediately...send the same GET
request
  again with the Digest info. I receive the correct response
from the
  server immediately but the socket is not closed for 4 seconds
by the
  server. Has anyone seen this?
 
  I have Connection: close in my request but the socket is
still kept
  open. If I access this URI via browser URL bar, the delay is not
  there. I sniffed the packets and even if I mimic the request
String
  exactly, the socket still hangs for 4 seconds. I suspect I am not
  closing the socket request, though '\r\n\r\n' seems to be the
standard
  (and it works when it runs locally). Any ideas???
 
  Here is my exact request that hangs though the 200 response is
  received immediately:
 
  GET /myapp/mydata.xml HTTP/1.1\r\n
  Host: www.mydomain.com http://www.mydomain.com\r\n
  Content-Type: application/x-www-form-urlencoded\r\n
  Keep-Alive: 1\r\n
  Connection: close\r\n
  Cookie: JSESSIONID=8CCB32BBEDB875F082709FE17AA93679;\r\n
  Authorization: Digest username=user1, realm=MYAPP,
 
nonce=MTIxMzEyODYwOTE0MDo1Njg5NTllYTUxMDYyN2VmNGNmMjViMTA4MDFiMDRjMA==,
  uri=/myapp/mydata.xml,
response=1175bbe7d5840a0d94fb5de3ef16a2a3,
  qop=auth, nc=1, cnonce=0a4f113b\r\n\r\n
 
 
 
 
  -- 
  Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 





[flexcoders] How to change border around the defaultButton

2008-06-11 Thread kenoveandersen
I cant find a way to change the default thick blue border around the
button that is default. 

I want to remove the border on the button when I am in the input
field. I have tried various styles but cant find the one that that
applies. 

Does anyone have an idea how to do this?

See example below:

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

  mx:Canvas defaultButton={btn} width=100% height=100%
mx:TextInput x=51 y=40/
mx:Button id=btn x=51 y=85 label=Button/
  /mx:Canvas

/mx:Application





Re: [flexcoders] How to change border around the defaultButton

2008-06-11 Thread Michael Schmalle
I don't think Flex 3 implemented this.

I know there is some free button skins out there.

Try googling 'flex button border skin'.

Mike

On Wed, Jun 11, 2008 at 9:02 AM, kenoveandersen [EMAIL PROTECTED] wrote:

   I cant find a way to change the default thick blue border around the
 button that is default.

 I want to remove the border on the button when I am in the input
 field. I have tried various styles but cant find the one that that
 applies.

 Does anyone have an idea how to do this?

 See example below:

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

 mx:Canvas defaultButton={btn} width=100% height=100%
 mx:TextInput x=51 y=40/
 mx:Button id=btn x=51 y=85 label=Button/
 /mx:Canvas

 /mx:Application

  




-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: Socket HTTP/1.1 connection not closed even after Response is sent

2008-06-11 Thread e_baggg
Actually, I stand corrected. Once I added in my port # to the
cross-domain...it worked. Thanks again gang! Big help!


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



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

 Thanks for your response...I have a full access cross domain on my
 server and loading it via Security.loadPolicyFile() does nothing as
 well. Hmm...
 
 cross-domain-policy
 allow-access-from domain=*/
 /cross-domain-policy
 
 --- In flexcoders@yahoogroups.com, å`¨æŒ¯å®‡ zhenyu.zhou@ wrote:
 
  When you use a socket or xmlsocket in a remote swf file,
  flashplayer would send a policy-request to the server.
  Check 
 

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html
  
  When you run it locally, flashplayer won't do this.
  
  I'm not sure if this is the reason.
  Maybe you should call Security.loadPolicyFile() yourself and let the 
  server give it a correct respond.
  
  
  Josh McDonald wrote:
  
   It sounds to me like your server is simply holding the
connection for 
   a few seconds in order to prevent brute-force password attacks.
  
   -Josh
  
   On Wed, Jun 11, 2008 at 6:23 AM, e_baggg e_baggg@ 
   mailto:e_baggg@ wrote:
  
   This is baffling me. For authentication reasons, I am doing
all my
   HTTP traffic via a custom flash.net.Socket where I create and
 parse
   the HTTP request/response myself (using Digest authorization).
   Everything works fine when I run the generated html/swf files
 locally,
   but once I deploy them to the unprotected part of a
webserver, the
   response connection is not dropped by the server for several
 seconds.
   I do a GET and receive the 401 immediately...send the same GET
 request
   again with the Digest info. I receive the correct response
 from the
   server immediately but the socket is not closed for 4 seconds
 by the
   server. Has anyone seen this?
  
   I have Connection: close in my request but the socket is
 still kept
   open. If I access this URI via browser URL bar, the delay is not
   there. I sniffed the packets and even if I mimic the request
 String
   exactly, the socket still hangs for 4 seconds. I suspect I
am not
   closing the socket request, though '\r\n\r\n' seems to be the
 standard
   (and it works when it runs locally). Any ideas???
  
   Here is my exact request that hangs though the 200 response is
   received immediately:
  
   GET /myapp/mydata.xml HTTP/1.1\r\n
   Host: www.mydomain.com http://www.mydomain.com\r\n
   Content-Type: application/x-www-form-urlencoded\r\n
   Keep-Alive: 1\r\n
   Connection: close\r\n
   Cookie: JSESSIONID=8CCB32BBEDB875F082709FE17AA93679;\r\n
   Authorization: Digest username=user1, realm=MYAPP,
  

nonce=MTIxMzEyODYwOTE0MDo1Njg5NTllYTUxMDYyN2VmNGNmMjViMTA4MDFiMDRjMA==,
   uri=/myapp/mydata.xml,
 response=1175bbe7d5840a0d94fb5de3ef16a2a3,
   qop=auth, nc=1, cnonce=0a4f113b\r\n\r\n
  
  
  
  
   -- 
   Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@ mailto:josh@
  
 





[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
Definitely not with equipment, that would be called theft. But with
the knowledge gained yes. 

The question here wasn't could I take the code of the company and use
it, but could I use the code (i.e. knowledge) that I have developed
for the company on other projects. 




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

 
  No argument there, however that employee cannot work on the other 
 employers floor w/ the same equipment provided by the first employer. 
 
 
 b_alen wrote:
 
  No, the floor is not Employee's. But if the employee by doing the
  finishing of the floor realizes how to do it with different tools and
  techniques better, then he has every right to apply his knowledge on
  another floor with different client.
 
 
 
 
 
 
  .
 -- 
 Jeffry Houser
 Flex, ColdFusion, AIR
 AIM: Reboog711  | Phone: 1-203-379-0773
 --
 Adobe Community Expert
http://www.adobe.com/communities/experts/members/JeffryHouser.html
 My Company: http://www.dot-com-it.com 
 My Podcast: http://www.theflexshow.com
 My Blog: http://www.jeffryhouser.com





[flexcoders] Re: List item selection on mouse right click?

2008-06-11 Thread Robert Csiki
Bump.. anyone??


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


 Is that possible in Flex 3? If so, how? I want to select an item in a
 list grid with the right mouse click the same way it is done when
using
 the mouse's left button (e.g. Windows Explorer native behavior).

 Thanks,  Robert





Re: [flexcoders] How would i layout different objects in grid form

2008-06-11 Thread Tom Chiverton
On Wednesday 11 Jun 2008, anuj181 wrote:
 user selects that button then depending on the number of objects, the
 grid layout will be generated in HBOX (to arrange those objects). For

Sounds like you could put your current HBox along with a Grid into a 
ViewStack, binding them both to the same data provider.
Then change viewStack.selectedIndex from the click event of your radio button.

-- 
Tom Chiverton



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

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

CONFIDENTIALITY

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

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



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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Paul Andrews
I think the real problem is that many people build up class libraries over 
time that get incorporated into various projects. The sticky question is 
where does work-for-hire leave that code (particularly if most of the 
library code used for a particular project was created beforehand).

It may be for a given project, that library gets enhanced, so it's tricky. 
Nobody would want a work-for-hire project to cut off their trusty class 
library from further use.

Paul



- Original Message - 
From: b_alen [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, June 11, 2008 2:32 PM
Subject: [flexcoders] Re: OOP and Work for Hire


 Definitely not with equipment, that would be called theft. But with
 the knowledge gained yes.

 The question here wasn't could I take the code of the company and use
 it, but could I use the code (i.e. knowledge) that I have developed
 for the company on other projects.




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


  No argument there, however that employee cannot work on the other
 employers floor w/ the same equipment provided by the first employer.


 b_alen wrote:
 
  No, the floor is not Employee's. But if the employee by doing the
  finishing of the floor realizes how to do it with different tools and
  techniques better, then he has every right to apply his knowledge on
  another floor with different client.
 





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




 

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



 



[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
So you're saying if I find a way how to get into a tight corner and
polish it with a specially pimped tooth brush, while doing this for
the almighty Employer, I can never ever use that technique and the
similar tooth brush again? So I will be staring at the corner
helpless, thinking, man I can't use the tooth brush trick now because
the other one will sue me. 

What if I took the first tooth brush from my home, because I'm a smart
problem solver and didn't want to wait for boss to buy it?

Another example I create a really nice collision detection algorithm
on one project. What to do on the next project where I need collision
detection? Write worse code just so that it's not the same? 

Or if I work for a company for three years, since I was a fresher.
Legally I have to come out as an idiot, with no knowledge, no
solutions and I have no right to reimplement any of the code I
developed there.

It just doesn't work like that in real life. 




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

 Maybe. If said tools and techniques are uncovered while being paid
to accomplish this floor re-finishing, then No they do not have any
legal right to re-use it. In reality, will folks re-use/re-purpose
what they've done? Absolutely but they have no legal right to it and
by taking such actions they are placing themselves (albeit how greatly
some people like to argue about) in peril of legal proceedings against
them. How often would that happen? More often then people might realize. 
 
 Another alternative is that they could simply establish themselves
with a reputation of not respecting their agreements with customers
(and believe me word will get around quicker than a brushfire in the
middle of August in California hillside country) and they have
effectively black-balled themselves.
 
 Then again the employer could simply be fat, stupid and lazy thereby
never catching on to what is actually happening and the employee can
take the employer for all they can get.
 
 My recommendation is to simply sign the agreement, adhere to the
letter and (even more importantly) the spirit of the agreement and get
on with your life: I.e. Getting paid to do something that you enjoy
and are proficient at, then using the proceeds to behave like a
twisted, salted pretzel with your significant other... 
 
 GB,
 Bubba
 
 
 
 From: b_alen 
 Sent: Wednesday, June 11, 2008 3:31 AM
 To: flexcoders@yahoogroups.com 
 Subject: [flexcoders] Re: OOP and Work for Hire
 
 
 No, the floor is not Employee's. But if the employee by doing the
 finishing of the floor realizes how to do it with different tools and
 techniques better, then he has every right to apply his knowledge on
 another floor with different client.
 
 -
 
 As an example: A Employer hires a Employee to re-finish a hard-wood
 floor, does the employee then have the right to claim the floor is
 theirs? Most assuredly not, this same argument has been upheld in
 almost all State courts.
 
  Amy - If you seriously want the position then sign the agreement and
 take the fair pay they are offering for the job. If the pay isn't
 fair, then negotiate a more lucrative deal. If you don't like their
 terms and conditions, you can attempt to negotiate them away,
 butdon't be surprised if they aren't receptive to that approach.
 What you have to ask yourself is Do I have a complete corner on the
 skill set that they are looking for that they have no choice but to
 accept my demands to maintain the IP - I am most sure that the vast
 majority of the world don't have such skill sets
  
  BTW, I think you need to re-consider your definition of OOP.it
 has absolutely nothing to do with maintaining IP.
  
  GB,
  Bubba
  
  
  From: b_alen 
  Sent: Tuesday, June 10, 2008 10:45 PM
  To: flexcoders@yahoogroups.com 
  Subject: [flexcoders] Re: OOP and Work for Hire
  
  
  BOLLOCKS!! Of course you can reuse your code. You're code is not
  stored in AS files anyway, but in your head. So unless you can erase
  memory how you cracked the algorithm or designed a system, there's no
  way you could not reuse the code. Since every project is different in
  nature, there's a very small chance you will end up copy pasting the
  entire solution for the new client. So in reality you will take bits
  and pieces from old projects, even improve the code a bit, write some
  new stuff and that's it.
  
  --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:
  
   I was recently asked to sign an agreement that would designate a
Flex 
   project as Work for Hire. I.e. I would not retain any
ownership of 
   the code I wrote for the project. This seems to defeat the
purpose of 
   OOP, if I create a whole body of code that I can't then reuse.
How do 
   most Flex developers handle the idea of Work for Hire?
   
   Thanks;
   
   Amy
  
 





Re: [flexcoders] Datagrid Password Column?

2008-06-11 Thread sLangeberg
Did you try the 'itemEditor' property, instead of 'itemRenderer'? If memory
serves, the row will toggle between your textinput and the default text
renderer, when you use the editor setup.

-Scott

On Tue, Jun 10, 2008 at 6:27 PM, Dennis Falling [EMAIL PROTECTED] wrote:

   I have an editable DataGrid that displays usernames and masked passwords
 ().  To hide the password, I'm just using an inline item renderer:

 mx:DataGridColumn dataField=password headerText=Password
 editorDataField=text rendererIsEditor=true
 mx:itemRenderer
 mx:Component
 mx:TextInput displayAsPassword=true borderStyle=none/
 /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn

 This works exactly how I want it to, with very little code...except it
 doesn't look too hot when that row is selected: the TextInput always has a
 solid white background whether it's selected or not.  Is there an easy way
 to tell it to make it not show a background except when selected (appear
 like the default item editor)?  I've listened to the various edit events but
 can't figure out a clean way of doing this.

 Thanks!
  




-- 
: : ) Scott

Helping your grandma on the interweb
at: http://blog.criticalpile.com


[flexcoders] not sure why COLLECTION_CHANGE listener is not firing.

2008-06-11 Thread Derrick Anderson
Hi,  I'm using the Guasax framework in my application- and in my model I am
adding a collection change event listener, but it is never getting fired-
here is my code (is there something with adding event listeners in a
constructor maybe??)

*EmployeesModel.as*
package com.winn.model
{
import com.winn.vo.EmployeeVO;

import conf.Constants;

import es.guasax.container.GuasaxContainer;
import es.guasax.view.ViewLocator;

import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.CollectionEvent;

public class EmployeesModel
{
private static var instance:EmployeesModel;
public static function getInstance():EmployeesModel
{
if( instance==null ) instance = new EmployeesModel();
return instance;
}

[Bindable] public var selectedEmployee:EmployeeVO;
[Bindable] public var employeesList:ArrayCollection;
[Bindable] public var employeeStatusList:ArrayCollection;

public function EmployeesModel(){
employeesList = new ArrayCollection();
employeeStatusList = new ArrayCollection();

*employeeStatusList.addEventListener (
CollectionEvent.COLLECTION_CHANGE,employeeStatusListChange );*
}

   * public function
employeeStatusListChange(event:CollectionEvent):void
{
Alert.show('firing listener function');//never shows
GuasaxContainer.getInstance().executeViewUpdate(

[ViewLocator.getInstance().getViewObject(Constants.EMPLOYEES_VIEW)],
'setEmployeeTypes',[]);
}*
}
}

now here is where I load content into that arrayCollection and expect to see
my listener function fire off

*EmployeeBO.as
private var employeesModel:EmployeesModel = EmployeesModel.getInstance();
*public function getEmployeesAuxData():void
{
var params:Array = [];

ServiceLocator.getInstance().executeService(employeeCFC,getEmployeesAuxData,params,employeesAuxDataHandler,faultHandler,this);
}

public function employeesAuxDataHandler(event:* = null ):void
{
   *employeesModel.employeeStatusList =
event.result.EMPLOYEESTATUSES;//i assumed this would be enough to trigger
the collectionChange***
   //employeesModel.employeeStatusList.refresh();*//thought this
would make the collectionEvent fire, but didn't*
   employeesModel.employeeStatusList.dispatchEvent(new
CollectionEvent(CollectionEvent.COLLECTION_CHANGE));*//then tried to fire it
manually, but my listener is still never registered*
}

can anybody see why it seems my event listener is never registered?

thanks,
d.


RE: [flexcoders] flex and struts

2008-06-11 Thread Battershall, Jeff
http://www.adobe.com/devnet/flex/articles/struts.html - but this is from
the original Flex Beta time period.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kamel
Sent: Wednesday, June 11, 2008 8:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex and struts


I want to develop an application flex combining struts.
can anybody help me.




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





Re: [flexcoders] not sure why COLLECTION_CHANGE listener is not firing.

2008-06-11 Thread Michael Schmalle
Hi,

Your wiping the reference to the original collection looks like.

When you receive your data, try using removeAll(), addItem() or
ICollectionView.

OR

set the 'source' property on the collection you added the listener to.

Mike

On Wed, Jun 11, 2008 at 9:56 AM, Derrick Anderson 
[EMAIL PROTECTED] wrote:

   Hi,  I'm using the Guasax framework in my application- and in my model I
 am adding a collection change event listener, but it is never getting fired-
 here is my code (is there something with adding event listeners in a
 constructor maybe??)

 *EmployeesModel.as*
 package com.winn.model
 {
 import com.winn.vo.EmployeeVO;

 import conf.Constants;

 import es.guasax.container.GuasaxContainer;
 import es.guasax.view.ViewLocator;

 import mx.collections.ArrayCollection;
 import mx.controls.Alert;
 import mx.events.CollectionEvent;

 public class EmployeesModel
 {
 private static var instance:EmployeesModel;
 public static function getInstance():EmployeesModel
 {
 if( instance==null ) instance = new EmployeesModel();
 return instance;
 }

 [Bindable] public var selectedEmployee:EmployeeVO;
 [Bindable] public var employeesList:ArrayCollection;
 [Bindable] public var employeeStatusList:ArrayCollection;

 public function EmployeesModel(){
 employeesList = new ArrayCollection();
 employeeStatusList = new ArrayCollection();

 *employeeStatusList.addEventListener (
 CollectionEvent.COLLECTION_CHANGE,employeeStatusListChange );*
 }

* public function
 employeeStatusListChange(event:CollectionEvent):void
 {
 Alert.show('firing listener function');//never shows
 GuasaxContainer.getInstance().executeViewUpdate(

 [ViewLocator.getInstance().getViewObject(Constants.EMPLOYEES_VIEW)],
 'setEmployeeTypes',[]);
 }*
 }
 }

 now here is where I load content into that arrayCollection and expect to
 see my listener function fire off

 *EmployeeBO.as
 private var employeesModel:EmployeesModel = EmployeesModel.getInstance();
 *public function getEmployeesAuxData():void
 {
 var params:Array = [];

 ServiceLocator.getInstance().executeService(employeeCFC,getEmployeesAuxData,params,employeesAuxDataHandler,faultHandler,this);
 }

 public function employeesAuxDataHandler(event:* = null ):void
 {
*employeesModel.employeeStatusList =
 event.result.EMPLOYEESTATUSES;//i assumed this would be enough to trigger
 the collectionChange***
//employeesModel.employeeStatusList.refresh();*//thought
 this would make the collectionEvent fire, but didn't*
employeesModel.employeeStatusList.dispatchEvent(new
 CollectionEvent(CollectionEvent.COLLECTION_CHANGE));*//then tried to fire
 it manually, but my listener is still never registered*
 }

 can anybody see why it seems my event listener is never registered?

 thanks,
 d.

  




-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: not sure why COLLECTION_CHANGE listener is not firing.

2008-06-11 Thread Cato Paus
look at this mx.events.CollectionEventKind


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

 Hi,  I'm using the Guasax framework in my application- and in my 
model I am
 adding a collection change event listener, but it is never getting 
fired-
 here is my code (is there something with adding event listeners in a
 constructor maybe??)
 
 *EmployeesModel.as*
 package com.winn.model
 {
 import com.winn.vo.EmployeeVO;
 
 import conf.Constants;
 
 import es.guasax.container.GuasaxContainer;
 import es.guasax.view.ViewLocator;
 
 import mx.collections.ArrayCollection;
 import mx.controls.Alert;
 import mx.events.CollectionEvent;
 
 public class EmployeesModel
 {
 private static var instance:EmployeesModel;
 public static function getInstance():EmployeesModel
 {
 if( instance==null ) instance = new EmployeesModel();
 return instance;
 }
 
 [Bindable] public var selectedEmployee:EmployeeVO;
 [Bindable] public var employeesList:ArrayCollection;
 [Bindable] public var employeeStatusList:ArrayCollection;
 
 public function EmployeesModel(){
 employeesList = new ArrayCollection();
 employeeStatusList = new ArrayCollection();
 
 *employeeStatusList.addEventListener (
 CollectionEvent.COLLECTION_CHANGE,employeeStatusListChange );*
 }
 
* public function
 employeeStatusListChange(event:CollectionEvent):void
 {
 Alert.show('firing listener function');//never shows
 GuasaxContainer.getInstance().executeViewUpdate(
 
 [ViewLocator.getInstance().getViewObject(Constants.EMPLOYEES_VIEW)],
 'setEmployeeTypes',[]);
 }*
 }
 }
 
 now here is where I load content into that arrayCollection and 
expect to see
 my listener function fire off
 
 *EmployeeBO.as
 private var employeesModel:EmployeesModel = 
EmployeesModel.getInstance();
 *public function getEmployeesAuxData():void
 {
 var params:Array = [];
 
 ServiceLocator.getInstance().executeService
(employeeCFC,getEmployeesAuxData,params,employeesAuxDataHandler,fa
ultHandler,this);
 }
 
 public function employeesAuxDataHandler(event:* = 
null ):void
 {
*employeesModel.employeeStatusList =
 event.result.EMPLOYEESTATUSES;//i assumed this would be enough to 
trigger
 the collectionChange***
//employeesModel.employeeStatusList.refresh
();*//thought this
 would make the collectionEvent fire, but didn't*
employeesModel.employeeStatusList.dispatchEvent(new
 CollectionEvent(CollectionEvent.COLLECTION_CHANGE));*//then tried 
to fire it
 manually, but my listener is still never registered*
 }
 
 can anybody see why it seems my event listener is never registered?
 
 thanks,
 d.





Re: [flexcoders] Datagrid Password Column?

2008-06-11 Thread Dennis Falling
With backgroundAlpha=1, the box always has the white background, whether
it's selected or not:
http://dl.getdropbox.com/u/15760/alpha1.PNG

With backgroundAlpha=0, the box never has a white background, even when it
is selected:
http://dl.getdropbox.com/u/15760/alpha0.PNG

Both of these ways are inconsistent with the typical appearance of a
DataGridColumn.  That's all I'm going for- for it to look white when it
should (when it's in edit mode) and not white when it shouldn't (when it's
not being edited.)

I was completely overlooking the fact that you can have a renderer and an
editor.  I got it looking right by doing this:

mx:DataGridColumn dataField=username headerText=Username/
mx:DataGridColumn dataField=password headerText=Password
editorDataField=text
mx:itemEditor
mx:Component
mx:TextInput displayAsPassword=true borderStyle=none
backgroundAlpha=1/
/mx:Component
/mx:itemEditor
mx:itemRenderer
mx:Component
mx:TextInput displayAsPassword=true borderStyle=none
backgroundAlpha=0/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn

The look I was going for:
http://dl.getdropbox.com/u/15760/correct.PNG


Thanks for the help!


On Wed, Jun 11, 2008 at 1:31 AM,  wrote:

A TextInput just contains a TextField and draws border and background
 around it.  DGIR extends TextField.  If you're ok with popup editors, I'd
 extends both DGIR as the renderer and TextInput as the editor.



 If you really need TextInput as the renderer, try setting
 backgroundColor=.  I'm not sure I understand what was wrong about
 backgroundAlpha=0


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Dennis Falling
 *Sent:* Tuesday, June 10, 2008 10:04 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Datagrid Password Column?



 I'm trying to make an editable password column in a datagrid that displays
 asterisks instead of the characters of the string that it's displaying.
 Simply using a TextInput with displayAsPassword does exactly this, but when
 the row is selected (whether the password field is selected or not), the
 password field has a solid white background.  This looks inconsistent
 compared to other editable column fields, so I'm hoping someone has a trick
 to fix this.  As Tracy suggested, I can make it's background alpha 0, but
 then it doesn't look right when it's selected.  This may seem petty, but it
 looks wrong.

 I can always create an item renderer that emulates the TextInput's
 displayAsPassword property, but I'm so close now, and was hoping there's a
 trick I'm missing to get this working.


  On Tue, Jun 10, 2008 at 11:56 PM, Alex Harui [EMAIL PROTECTED] wrote:

 Maybe I don't understand what you want.  Do you want rendererIsEditor or do
 you want an editor to popup over the cell?  My first instinct would be to
 have an editor popup over the cell so rendererIsEditor=false, and I subclass
 DGIR as the column renderer, and supply a custom TextInput as the editor
 with displayAsPassword=false.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Dennis Falling
 *Sent:* Tuesday, June 10, 2008 9:44 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Datagrid Password Column?



 I tried doing the same thing I'm doing now, except moving the TextInput
 into an external item renderer and listening for begin/end edit events to
 toggle the alpha, but that seemed really clunky.  So you're saying that is
 probably the best way?

 On Tue, Jun 10, 2008 at 11:34 PM, Alex Harui [EMAIL PROTECTED] wrote:

 You should be able to use DataGridItemRenderer and set its
 displayAsPassword=true in a subclass or in a custom classFactory


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Tracy Spratt
 *Sent:* Tuesday, June 10, 2008 6:06 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Datagrid Password Column?



 Maybe set backgroundAlpha=0?

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Dennis Falling
 *Sent:* Tuesday, June 10, 2008 7:28 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Datagrid Password Column?



 I have an editable DataGrid that displays usernames and masked passwords
 ().  To hide the password, I'm just using an inline item renderer:

 mx:DataGridColumn dataField=password headerText=Password
 editorDataField=text rendererIsEditor=true
 mx:itemRenderer
 mx:Component
 mx:TextInput displayAsPassword=true borderStyle=none/
 /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn

 This works exactly how I want it to, with very little code...except it
 doesn't look too hot when that row is selected: the TextInput always has a
 solid white background whether it's selected or not.  Is there an 

Re: [flexcoders] not sure why COLLECTION_CHANGE listener is not firing.

2008-06-11 Thread Derrick Anderson
hey mike, i realized i was writing over the original array collection
shortly after posting- i am now just overwriting source like you suggested
and my listener is back, thanks!

d.

On Wed, Jun 11, 2008 at 10:07 AM, Michael Schmalle [EMAIL PROTECTED]
wrote:

   Hi,

 Your wiping the reference to the original collection looks like.

 When you receive your data, try using removeAll(), addItem() or
 ICollectionView.

 OR

 set the 'source' property on the collection you added the listener to.

 Mike


 On Wed, Jun 11, 2008 at 9:56 AM, Derrick Anderson 
 [EMAIL PROTECTED] wrote:

   Hi,  I'm using the Guasax framework in my application- and in my model
 I am adding a collection change event listener, but it is never getting
 fired- here is my code (is there something with adding event listeners in a
 constructor maybe??)

 *EmployeesModel.as*
 package com.winn.model
 {
 import com.winn.vo.EmployeeVO;

 import conf.Constants;

 import es.guasax.container.GuasaxContainer;
 import es.guasax.view.ViewLocator;

 import mx.collections.ArrayCollection;
 import mx.controls.Alert;
 import mx.events.CollectionEvent;

 public class EmployeesModel
 {
 private static var instance:EmployeesModel;
 public static function getInstance():EmployeesModel
 {
 if( instance==null ) instance = new EmployeesModel();
 return instance;
 }

 [Bindable] public var selectedEmployee:EmployeeVO;
 [Bindable] public var employeesList:ArrayCollection;
 [Bindable] public var employeeStatusList:ArrayCollection;

 public function EmployeesModel(){
 employeesList = new ArrayCollection();
 employeeStatusList = new ArrayCollection();

 *employeeStatusList.addEventListener (
 CollectionEvent.COLLECTION_CHANGE,employeeStatusListChange );*
 }

* public function
 employeeStatusListChange(event:CollectionEvent):void
 {
 Alert.show('firing listener function');//never shows
 GuasaxContainer.getInstance().executeViewUpdate(

 [ViewLocator.getInstance().getViewObject(Constants.EMPLOYEES_VIEW)],
 'setEmployeeTypes',[]);
 }*
 }
 }

 now here is where I load content into that arrayCollection and expect to
 see my listener function fire off

 *EmployeeBO.as
 private var employeesModel:EmployeesModel = EmployeesModel.getInstance();
 *public function getEmployeesAuxData():void
 {
 var params:Array = [];

 ServiceLocator.getInstance().executeService(employeeCFC,getEmployeesAuxData,params,employeesAuxDataHandler,faultHandler,this);
 }

 public function employeesAuxDataHandler(event:* = null ):void
 {
*employeesModel.employeeStatusList =
 event.result.EMPLOYEESTATUSES;//i assumed this would be enough to trigger
 the collectionChange***
//employeesModel.employeeStatusList.refresh();*//thought
 this would make the collectionEvent fire, but didn't*
employeesModel.employeeStatusList.dispatchEvent(new
 CollectionEvent(CollectionEvent.COLLECTION_CHANGE));*//then tried to fire
 it manually, but my listener is still never registered*
 }

 can anybody see why it seems my event listener is never registered?

 thanks,
 d.




 --
 Teoti Graphix, LLC
 http://www.teotigraphix.com

 Teoti Graphix Blog
 http://www.blog.teotigraphix.com

 You can find more by solving the problem then by 'asking the question'.
 



Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Jeffry Houser


It really depends on what that knowledge is. ;) 


b_alen wrote:


Definitely not with equipment, that would be called theft. But with
the knowledge gained yes.

The question here wasn't could I take the code of the company and use
it, but could I use the code (i.e. knowledge) that I have developed
for the company on other projects.

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



 No argument there, however that employee cannot work on the other
 employers floor w/ the same equipment provided by the first employer.


 b_alen wrote:
 
  No, the floor is not Employee's. But if the employee by doing the
  finishing of the floor realizes how to do it with different tools and
  techniques better, then he has every right to apply his knowledge on
  another floor with different client.
 





  .
 --
 Jeffry Houser
 Flex, ColdFusion, AIR
 AIM: Reboog711 | Phone: 1-203-379-0773
 --
 Adobe Community Expert
http://www.adobe.com/communities/experts/members/JeffryHouser.html 
http://www.adobe.com/communities/experts/members/JeffryHouser.html

 My Company: http://www.dot-com-it.com http://www.dot-com-it.com
 My Podcast: http://www.theflexshow.com http://www.theflexshow.com
 My Blog: http://www.jeffryhouser.com http://www.jeffryhouser.com


 


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



[flexcoders] Re: Datagrid Password Column?

2008-06-11 Thread Cato Paus

you can do this to:

?xml version=1.0 encoding=utf-8?

mx:TextInput xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=initThis() displayAsPassword=true
borderStyle=none alpha=0.0 focusEnabled=true



mx:Script

![CDATA[



private function initThis():void

{

this.addEventListener(FocusEvent.FOCUS_IN, changeState);

this.addEventListener(FocusEvent.FOCUS_OUT, changeState);



}



private function changeState(event:FocusEvent):void

{

if(event.type == FocusEvent.FOCUS_IN)

{

currentState = 'selected';



}

else{

currentState = '';



}



}



]]

/mx:Script





mx:states

mx:State name=selected

mx:SetProperty name=alpha value=1.0/

mx:SetStyle name=borderStyle value=solid/

/mx:State

/mx:states



/mx:TextInput




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

 I have an editable DataGrid that displays usernames and masked
passwords
 (). To hide the password, I'm just using an inline item
renderer:

 mx:DataGridColumn dataField=password headerText=Password
 editorDataField=text rendererIsEditor=true
 mx:itemRenderer
 mx:Component
 mx:TextInput displayAsPassword=true borderStyle=none/
 /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn

 This works exactly how I want it to, with very little code...except it
 doesn't look too hot when that row is selected: the TextInput always
has a
 solid white background whether it's selected or not. Is there an easy
way
 to tell it to make it not show a background except when selected
(appear
 like the default item editor)? I've listened to the various edit
events but
 can't figure out a clean way of doing this.

 Thanks!





Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Jeffry Houser


The answer is it depends.  If you're using any old toothbrush in an 
obvious way, you can probably re-use the technique / materials.
If you create your own brush for the purpose, it (and any related 
patents) would probably be property of the employer.


If you created a nice collision detection algorithm for one project, 
then that would belong to the employer [most likely].  You'd have to 
re-create one from scratch during the next project for a different 
client or else you open yourself, and your new client / employer, up to 
a lengthy legal battle.


I'm not sure where you're from, but in my world, real life is exactly 
like this. 



b_alen wrote:


So you're saying if I find a way how to get into a tight corner and
polish it with a specially pimped tooth brush, while doing this for
the almighty Employer, I can never ever use that technique and the
similar tooth brush again? So I will be staring at the corner
helpless, thinking, man I can't use the tooth brush trick now because
the other one will sue me.

What if I took the first tooth brush from my home, because I'm a smart
problem solver and didn't want to wait for boss to buy it?

Another example I create a really nice collision detection algorithm
on one project. What to do on the next project where I need collision
detection? Write worse code just so that it's not the same?

Or if I work for a company for three years, since I was a fresher.
Legally I have to come out as an idiot, with no knowledge, no
solutions and I have no right to reimplement any of the code I
developed there.

It just doesn't work like that in real life.

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


 Maybe. If said tools and techniques are uncovered while being paid
to accomplish this floor re-finishing, then No they do not have any
legal right to re-use it. In reality, will folks re-use/re-purpose
what they've done? Absolutely but they have no legal right to it and
by taking such actions they are placing themselves (albeit how greatly
some people like to argue about) in peril of legal proceedings against
them. How often would that happen? More often then people might realize.

 Another alternative is that they could simply establish themselves
with a reputation of not respecting their agreements with customers
(and believe me word will get around quicker than a brushfire in the
middle of August in California hillside country) and they have
effectively black-balled themselves.

 Then again the employer could simply be fat, stupid and lazy thereby
never catching on to what is actually happening and the employee can
take the employer for all they can get.

 My recommendation is to simply sign the agreement, adhere to the
letter and (even more importantly) the spirit of the agreement and get
on with your life: I.e. Getting paid to do something that you enjoy
and are proficient at, then using the proceeds to behave like a
twisted, salted pretzel with your significant other...

 GB,
 Bubba



 From: b_alen
 Sent: Wednesday, June 11, 2008 3:31 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: OOP and Work for Hire


 No, the floor is not Employee's. But if the employee by doing the
 finishing of the floor realizes how to do it with different tools and
 techniques better, then he has every right to apply his knowledge on
 another floor with different client.

 -

 As an example: A Employer hires a Employee to re-finish a hard-wood
 floor, does the employee then have the right to claim the floor is
 theirs? Most assuredly not, this same argument has been upheld in
 almost all State courts.

  Amy - If you seriously want the position then sign the agreement and
 take the fair pay they are offering for the job. If the pay isn't
 fair, then negotiate a more lucrative deal. If you don't like their
 terms and conditions, you can attempt to negotiate them away,
 butdon't be surprised if they aren't receptive to that approach.
 What you have to ask yourself is Do I have a complete corner on the
 skill set that they are looking for that they have no choice but to
 accept my demands to maintain the IP - I am most sure that the vast
 majority of the world don't have such skill sets
 
  BTW, I think you need to re-consider your definition of OOP.it
 has absolutely nothing to do with maintaining IP.
 
  GB,
  Bubba
 
 
  From: b_alen
  Sent: Tuesday, June 10, 2008 10:45 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: OOP and Work for Hire
 
 
  BOLLOCKS!! Of course you can reuse your code. You're code is not
  stored in AS files anyway, but in your head. So unless you can erase
  memory how you cracked the algorithm or designed a system, there's no
  way you could not reuse the code. Since every project is different in
  nature, there's a very small chance you will end up copy 

[flexcoders] Quiz Program

2008-06-11 Thread Ravichandran J
Hello!

I am developing a online quiz program in flex using tile and data grid. Could 
any one have developed before?

Is there any online recourses for the same.

with warm wishes,
ravi 



  

Re: [flexcoders] OOP and Work for Hire

2008-06-11 Thread Samuel Neff
Depends on the work for hire agreement.  A good one would designate that the
developer retains a perpetual non-exclusive rights to any works previously
developed and used in the project and all general purpose code such as
libraries and generic controls that are not unique to the business
requirements or design of the project.

Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer.
Position is in the Washington D.C. metro area. Contact
[EMAIL PROTECTED]

On Tue, Jun 10, 2008 at 5:27 PM, Amy [EMAIL PROTECTED] wrote:

 I was recently asked to sign an agreement that would designate a Flex
 project as Work for Hire.  I.e. I would not retain any ownership of
 the code I wrote for the project.  This seems to defeat the purpose of
 OOP, if I create a whole body of code that I can't then reuse.  How do
 most Flex developers handle the idea of Work for Hire?

 Thanks;

 Amy




Re: [flexcoders] Order datagrid by date in DD/MM/YYYY format

2008-06-11 Thread David Pariente
mmm Thnx!

i got another solution involving reformating the dates to /MM/DD, but using 
epoch dates looks nice too, and might use several less lines of code.

Thnx a lot :)


- Mensaje original 
De: Scott Melby [EMAIL PROTECTED]
Para: flexcoders@yahoogroups.com
Enviado: miércoles, 11 de junio, 2008 13:51:41
Asunto: Re: [flexcoders] Order datagrid by date in DD/MM/ format


David - 

What you want to do is sort the data in your data provider.  Typically
I do this by storing the date as a number field (milliseconds since
epoch) in the class that I am rendering.  This allows numeric sorting
on the date that is rendered in the column.  The following snippet
creates a Sort object which can then be set as the sort on your data
provider when the date column is clicked.

 var sort:Sort = new Sort();
 var dateMillisField: SortField = new SortField(dateMill is,
true, false, true);
 sort.fields = [dateMillisField] ;

Here is a pretty good livedocs
entry on sorting data in datagrids.

hth
Scott

-- 
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlane sw.com 

David Pariente wrote: 
Hi everyone,

I have a datagrid with a Date column.
I want user to be able to order by that date column, but the Dates in that 
column are in DD/MM/ format, and flex doesn't order them propertly.

Does anyone have a solution for that?

Could tell Flex how should the column be ordered, by specifiyng format or 
something... ?

I actually have no idea how to solve this :(

Thnx a lot



   _ _ _ ___ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.


-- 
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlane sw.com
http://blog. fastlanesw. com


  __ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.

[flexcoders] Re: DataGrid scroll size on data load

2008-06-11 Thread jmfillman
Thank you!

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

 Just set wordWrap=true on the column? And variableRowHeight=true?
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of jmfillman
 Sent: Tuesday, June 10, 2008 11:01 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: DataGrid scroll size on data load
 
  
 
 I have horizontalScrollPolicy=on, which doesn't make a 
difference. 
 The field gets cut off whether on, off, or auto. My issue is 
knowing 
 how big to set the column, based on the data.
 
 My preference would be a column itemRenderer using a TextArea with 
 word wrap, but that doesn't appear to work either.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  You can set column sizes whenever you feel like it, but if you 
have
  hScrollPolicy=off, the other columns may adjust since all 
columns 
 must
  fit on screen under that policy. If you look in the archives, 
 several
  folks have struggled with it. To determine the exact size for a 
 column
  requires visiting every row in the data which is expensive so 
having
  some other way is recommended. 
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com
 ] On
  Behalf Of jmfillman
  Sent: Tuesday, June 10, 2008 8:21 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%
40yahoogroups.com 
  Subject: [flexcoders] DataGrid scroll size on data load
  
  
  
  When I load data into a DataGrid, the right most field often gets 
 cut 
  off. The column widths are set when the application loads. The 
 question 
  is, how do I make it expand dynamically to adjust to the width of 
 the 
  longest field in the column?
 





Re: [flexcoders] Warning: Source path entry XXXX is a subdirectory of source path entry

2008-06-11 Thread Ralf Bokelberg
Maybe  -allow-source-path-overlap=true helps
Cheers
Ralf.

On Wed, Jun 11, 2008 at 4:39 PM, bjorn [EMAIL PROTECTED] wrote:
 I'm cleaning up my (proje)act and trying to remove all warnings.

 This one is bugging me:
 Source path entry, C:\dev\flexworkspace\project\src\assets\locale\en_US' is
 a subdirectory of source path entry, 'C:\dev\flexworkspace\project\src\

 It's becuase I have these additional compiler arguments:
 -locale en_US -source-path+=assets/locale/{locale}
 -default-background-color=0x00

 It's needed to find the locale properties file, if I remove it from
 the build path I get this error: Unable to resolve class for
 ResourceBundle: myresourcebundle
 It's probably fixable by moving the /assets/locale/ folder out of the src
 path. However, we have our src folder checked into Subversion which has an
 'external' link to the assets folder. So the assets need to be a subfolder
 to src (for the externals link to work when we update the src folder)

 Anyhow - why doesn't it find the ResourceBundle when I don't include it in
 the additional compiler settings (it's in the source path, as it says in the
 warning ..)
 --

 
 http://www.juicability.com - flex blog
 http://www.43min.com - funny movies
 



-- 
Ralf Bokelberg [EMAIL PROTECTED]
Flex  Flash Consultant based in Cologne/Germany


Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread bubbamorse
The reality is that the Toothbrush that you took from your home wasn't yours 
to take home in the first place. The obligation is on you and your new 
employer to be able to prove a chain of custody and that no prior art exists. 

That is how the world worksinternationally and well as domestically. I've 
no problem of agreeing to disagree, but I do ask that you let me know your 
particulars so I can avoid doing business with you... :-o

GB,
Bubba


From: b_alen 
Sent: Wednesday, June 11, 2008 8:43 AM
To: flexcoders@yahoogroups.com 
Subject: [flexcoders] Re: OOP and Work for Hire


So you're saying if I find a way how to get into a tight corner and
polish it with a specially pimped tooth brush, while doing this for
the almighty Employer, I can never ever use that technique and the
similar tooth brush again? So I will be staring at the corner
helpless, thinking, man I can't use the tooth brush trick now because
the other one will sue me. 

What if I took the first tooth brush from my home, because I'm a smart
problem solver and didn't want to wait for boss to buy it?

Another example I create a really nice collision detection algorithm
on one project. What to do on the next project where I need collision
detection? Write worse code just so that it's not the same? 

Or if I work for a company for three years, since I was a fresher.
Legally I have to come out as an idiot, with no knowledge, no
solutions and I have no right to reimplement any of the code I
developed there.

It just doesn't work like that in real life. 

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

 Maybe. If said tools and techniques are uncovered while being paid
to accomplish this floor re-finishing, then No they do not have any
legal right to re-use it. In reality, will folks re-use/re-purpose
what they've done? Absolutely but they have no legal right to it and
by taking such actions they are placing themselves (albeit how greatly
some people like to argue about) in peril of legal proceedings against
them. How often would that happen? More often then people might realize. 
 
 Another alternative is that they could simply establish themselves
with a reputation of not respecting their agreements with customers
(and believe me word will get around quicker than a brushfire in the
middle of August in California hillside country) and they have
effectively black-balled themselves.
 
 Then again the employer could simply be fat, stupid and lazy thereby
never catching on to what is actually happening and the employee can
take the employer for all they can get.
 
 My recommendation is to simply sign the agreement, adhere to the
letter and (even more importantly) the spirit of the agreement and get
on with your life: I.e. Getting paid to do something that you enjoy
and are proficient at, then using the proceeds to behave like a
twisted, salted pretzel with your significant other... 
 
 GB,
 Bubba
 
 
 
 From: b_alen 
 Sent: Wednesday, June 11, 2008 3:31 AM
 To: flexcoders@yahoogroups.com 
 Subject: [flexcoders] Re: OOP and Work for Hire
 
 
 No, the floor is not Employee's. But if the employee by doing the
 finishing of the floor realizes how to do it with different tools and
 techniques better, then he has every right to apply his knowledge on
 another floor with different client.
 
 -
 
 As an example: A Employer hires a Employee to re-finish a hard-wood
 floor, does the employee then have the right to claim the floor is
 theirs? Most assuredly not, this same argument has been upheld in
 almost all State courts.
 
  Amy - If you seriously want the position then sign the agreement and
 take the fair pay they are offering for the job. If the pay isn't
 fair, then negotiate a more lucrative deal. If you don't like their
 terms and conditions, you can attempt to negotiate them away,
 butdon't be surprised if they aren't receptive to that approach.
 What you have to ask yourself is Do I have a complete corner on the
 skill set that they are looking for that they have no choice but to
 accept my demands to maintain the IP - I am most sure that the vast
 majority of the world don't have such skill sets
  
  BTW, I think you need to re-consider your definition of OOP.it
 has absolutely nothing to do with maintaining IP.
  
  GB,
  Bubba
  
  
  From: b_alen 
  Sent: Tuesday, June 10, 2008 10:45 PM
  To: flexcoders@yahoogroups.com 
  Subject: [flexcoders] Re: OOP and Work for Hire
  
  
  BOLLOCKS!! Of course you can reuse your code. You're code is not
  stored in AS files anyway, but in your head. So unless you can erase
  memory how you cracked the algorithm or designed a system, there's no
  way you could not reuse the code. Since every project is different in
  nature, there's a very small chance you will end up copy pasting the
  entire solution for the new client. So in reality you will take bits
  and pieces from old projects, even improve the code a bit, write some
  

Re: [flexcoders] OOP and Work for Hire

2008-06-11 Thread bubbamorse
Sam,

I like this approach! That could work, butunless it was in place with the 
originating partythe problem still exists, or rather it can be picked-up 
only from this specific point forward...I've not found a lot of companies open 
to these stipulations, but if you can swing it then more power to you...

GB,
Bubba



From: Samuel Neff 
Sent: Wednesday, June 11, 2008 9:50 AM
To: flexcoders@yahoogroups.com 
Subject: Re: [flexcoders] OOP and Work for Hire



Depends on the work for hire agreement.  A good one would designate that the 
developer retains a perpetual non-exclusive rights to any works previously 
developed and used in the project and all general purpose code such as 
libraries and generic controls that are not unique to the business requirements 
or design of the project.

Sam

-
We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer. 
Position is in the Washington D.C. metro area. Contact [EMAIL PROTECTED] 



On Tue, Jun 10, 2008 at 5:27 PM, Amy [EMAIL PROTECTED] wrote:

  I was recently asked to sign an agreement that would designate a Flex
  project as Work for Hire.  I.e. I would not retain any ownership of
  the code I wrote for the project.  This seems to defeat the purpose of
  OOP, if I create a whole body of code that I can't then reuse.  How do
  most Flex developers handle the idea of Work for Hire?

  Thanks;

  Amy





 

[flexcoders] Re: ComboBox Question

2008-06-11 Thread Hemkarna
There is actually a FoxyComboBox component already out there..

http://www.defusion.org.uk/code/foxycombobox-for-flex/


I have also combined this with a Look A Head Combo Box component


Let me know if you need to code.



Re: [flexcoders] Quiz Program

2008-06-11 Thread Sherif Abdou
Yes, I remb someone maybe 4-6 months ago did the same thing and posted it here, 
but I have not idea who it was or what the email subject was. 


- Original Message 
From: Ravichandran J [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, June 11, 2008 8:43:59 AM
Subject: [flexcoders] Quiz Program


Hello!

I am developing a online quiz program in flex using tile and data grid. Could 
any one have developed before?

Is there any online recourses for the same.

with warm wishes,
ravi 
 



  

[flexcoders] Font Leading Problem in Browsers

2008-06-11 Thread jbeck_sound
I'm seeing different font rendering issues in various browsers.

Using the Arial system font, the leading (spacing between lines)
rendering is different across browsers. For example, Internet Explorer
is very relaxed in comparison to Firefox or Safari which makes laying
out text in the application extremely difficult to project.

Has anyone been seeing the same issue and what's best practice to work
around that?

Thanks,

JB



Re: [flexcoders] Math.abs() Limitation?

2008-06-11 Thread Daniel Freiman
What did I mean?  I'm not sure.  For some reason I thought that floats loose
precision at near the end of their range, but even if that is true, that
wouldn't explain the lose of precision that large.  In any event, I retried
the following code:

var t1:Number = Number.MAX_VALUE;
var t3:Number = Number.MAX_VALUE - 1290;
var t4:Number = Number.MAX_VALUE - 1284;
var t5:Number = Math.abs(Number.MAX_VALUE - 1290);
var t6:Number = Math.abs(Number.MAX_VALUE - 1284);

var a1:Number = t3 - t4;
var a2:Number = Math.abs(t3 - t4);
var a3:Number = t5 - t6;
var a4:Number = (Number.MAX_VALUE - 1290) - (Number.MAX_VALUE -
1284);
var a5:Number = Math.abs(Number.MAX_VALUE - 1290) -
Math.abs(Number.MAX_VALUE - 1284);
var a6:Number = Math.abs((Number.MAX_VALUE - 1290) -
(Number.MAX_VALUE - 1284));


The debugger reported all of the first group of variable values as
9223372036854775807 [0x7fff] and the traces of these values
reported all of the values as 1.79769313486231e+308
This is not the same results that I remember getting previously where t3 !=
t4.  The second group all have values of 0.  When i have time I'll look into
this more.

- Daniel Freiman

On Wed, Jun 11, 2008 at 2:04 AM, Gordon Smith [EMAIL PROTECTED] wrote:

 Number.MAX_VALUE doesn't have enough precision to handle what I was
 trying to do.

  What do you mean by this? A Number, being 64 bits, actually has both more
 precision and more range than int, which is 32 bits. For example, in
 addition to storing fractional values, it can store integers much larger
 than int.MAX_VALUE.



 Gordon Smith

 Adobe Flex SDK Team


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Daniel Freiman
 *Sent:* Friday, June 06, 2008 2:10 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Math.abs() Limitation?



 I figured it out.  The trace made it obvious (as opposed the debugger which
 is what I was previously using).  I was using Number.MAX_VALUE, not
 int.MAX_VALUE.  Number.MAX_VALUE doesn't have enough precision to handle
 what I was trying to do.

 Thanks,

 - Daniel Freiman

 On Fri, Jun 6, 2008 at 2:29 PM, Gordon Smith [EMAIL PROTECTED] wrote:

 What do you get when you trace out the following values?



 int.MAX_VALUE - 1290

 Math.abs(int.MAX_VALUE - 1290)

 int.MAX_VALUE - 1284

 Math.abs(int.MAX_VALUE - 1284)



 Gordon Smith

 Adobe Flex SDK Team


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Alex Harui
 *Sent:* Friday, June 06, 2008 11:18 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] Math.abs() Limitation?



 What if you use temporary variables?


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Daniel Freiman
 *Sent:* Friday, June 06, 2008 9:09 AM
 *To:* flexcoders
 *Subject:* [flexcoders] Math.abs() Limitation?



 According to my code the following statement returns true.

 Math.abs(int.MAX_VALUE - 1290) == Math.abs(int.MAX_VALUE - 1284)

 I tried converting everything to type Number that didn't help.  Getting
 ride of the abs() makes the calculation work correctly but then I don't have
 the absolute value.

 Thoughts?

 - Daniel Freiman



  



RE: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Kerry Thompson
Jeffry Houser wrote:

 It really depends on what that knowledge is. 

That's really key. Let me give you a real-world example involving code,
rather than hardwood floors and toothbrushes ;-)

I've specialized in localization and internationalization for 15-20 years.
I'm bilingual, so that helps--that's a pre-existing skill I bring to every
job, and no contract is ever going to take that away from me.

About 10-15 years ago, in the Windows 3.1 days, I wrote a library, in C, to
display Chinese characters on English Windows 3.1. It was breakthrough
technology back then, and Sony paid me well for it. There is no way I could
ethically or legally use that code again (it's a moot point now, of course).

Last year I had a Director project in 8 languages, including 4 Asian
languages. The current version of Director then, MX 2004, didn't support
Unicode, and had no way to display Chinese. So I did what a genius friend of
mine, Mark Jonkman, did--I used a Flash sprite to display the CCJK text.

I can't legally or ethically re-use that same code. But I can darn sure use
Flash to display Unicode text within a Director movie. It might soon be a
moot point also, since Director 11 supports Unicode, and Director 12 might
be usable, but the point is that I'm using a known, pre-existing technique.
Sure, I refined and polished it, and I'll take that skill and knowledge with
me to the next gig. Just not the code. Snippets, maybe, but not the whole
shebang.

Cordially,

Kerry Thompson



[flexcoders] Re: HTTPService Bug

2008-06-11 Thread LazerWonder
Wherever you get the returned XML object from... does it pass in a 1 
or 2?  Or does it pass a 1.0 / 2.0.  As far as I know, 
HTTPService does not transform data (some one more experience can 
correct me if I am wrong).  It just spits back to you what it 
receives.

If you have control over the server side of things (that is, where 
the HTTPService connects to) you might need to see if 1.0/2.0 is 
being passed to the XML object or maybe only 1 / 2 is being 
passed to the object.  If you have no control over this, then you 
might need to add the .0 manually; or if you do have control but 
Flex still trip the .0 off, then try adding quotation marks 
around 1.0 / 2.0 on the server side.

You can also do a trace (which I'm sure you already did - but I 
thought I'll just plug this in here anyways) statement on the 
returned object, just to see what you get.

Happy Coding.  :)


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

 Any reason why HTTPService when return my XML as an Object transform
 the following array into strings that was suppose to contain strings
 
 item key=version
   label![CDATA[Version]]/label
   type![CDATA[dropdown]]/type
   source
   item key=![CDATA[Choose]]/item
 
   item key=2.0![CDATA[2.0]]/item
   item key=1.2![CDATA[1.2]]/item
   item key=1.0![CDATA[1.0]]/item
   /source
   default![CDATA[Choose]]/default
   width![CDATA[100]]/width
   rules![CDATA[trim|required]]/rules
   /item
 
 I'm populating my combobox with the source node. I'm using
 HTTPService and the resultFormaat = object.
 
 It adds but whenever i have 1.0 or 2.0 flex just assume it's an 
string
 and use 1 or 2 removing the .0. 
 
 there is anyway to tell flex to NOT remove that i want an string and
 not an integer?
 
 raf





[flexcoders] Conditional Statement Problem

2008-06-11 Thread tspyro2002
Hi, 

I have a problem where I am processing dates and cross checking them
across two Arrays. One array holds user selected dates, the other
holds dates which are disabled.

The loop I have at the minute checks them OK but outputs an Alert box
for every date which is the same. 

How can I adjust the code so that only one alert box is displayed? 

CODE SEGMENT

var i:int = 0;

while ( startDate = endDate ){ 

for (var a:int = 0; a = disabledDates.length; a++) {

stayLength[i] = year.toString() + , + month.toString() + , +
startDate.toString();   

if ( disabledDates[a] == stayLength[i] ) {

Alert.show(Date Overbooked!, Sorry, Alert.OK);} 

}   

i++;
startDate++;

}





RE: [flexcoders] Flash Player Debug version

2008-06-11 Thread Kerry Thompson
Tom Chiverton wrote:

 To the *debug* version, or the main runtime ?

Well, I thought it was to the debug version. I went back to the Adobe site,
and, with some poking around, found and installed the debug version. Works
fine with Flex now. Thanks.

Cordially,

Kerry Thompson



[flexcoders] Chart with missing values

2008-06-11 Thread Richard Rodseth
My understanding is that Flex charts assume that the series data provider
contains an entry for each point on the axis.

Ely's sampler has an example of missing values (gap vs interpolate),
achieved by having a missing *field* in the data.

I was hoping there might be a way to give an axis a different data provider,
but it looks as though I must either

1) manually construct the collection
2) create a custom implementation of ICollectionView or some such
3) press to have the server return a complete array with null fields (which
I can detect in a data function).

Tips appreciated.


Re: [flexcoders] Conditional Statement Problem

2008-06-11 Thread Michael Schmalle
Hi,

This might help;

var i:int = 0;
var overbooked:Boolean = false;

while ( startDate = endDate ){

for (var a:int = 0; a = disabledDates.length; a++) {

stayLength[i] = year.toString() + , + month.toString() + , +
startDate.toString();

if ( disabledDates[a] == stayLength[i] ) {
overbooked = true;
}

i++;
startDate++;

}

if (overbooked)
{
Alert.show(Date Overbooked!, Sorry, Alert.OK);
}

Mike

On Wed, Jun 11, 2008 at 12:24 PM, tspyro2002 [EMAIL PROTECTED]
wrote:

   Hi,

 I have a problem where I am processing dates and cross checking them
 across two Arrays. One array holds user selected dates, the other
 holds dates which are disabled.

 The loop I have at the minute checks them OK but outputs an Alert box
 for every date which is the same.

 How can I adjust the code so that only one alert box is displayed?

 CODE SEGMENT

 var i:int = 0;

 while ( startDate = endDate ){

 for (var a:int = 0; a = disabledDates.length; a++) {

 stayLength[i] = year.toString() + , + month.toString() + , +
 startDate.toString();

 if ( disabledDates[a] == stayLength[i] ) {

 Alert.show(Date Overbooked!, Sorry, Alert.OK);}

 }

 i++;
 startDate++;

 }

  




-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] chart legend help needed

2008-06-11 Thread Mark
I have a plotChart that has 2 PlotSeries the first is always shown 
while the second is hidden until the user wants to show it.  How can I 
get that to reflect in the legend?  If the second one is hidden I 
don't want it to show in the Legend.  Any Ideas?

Thanks,
Mark



[flexcoders] About Adobe LiveCycle Data Services ES 2.6 Beta?

2008-06-11 Thread markflex2007
Hi,

I just download Adobe LiveCycle Data Services ES 2.6 Beta.I want to 
know what is the different between trial version and production version.
and what is different between LiveCycle Data Services and BlazeDS.

I can not figture out this,Please help me.

Thank you in advance


Mark



Re: [flexcoders] Conditional Statement Problem

2008-06-11 Thread Doug McCune
or just do:

f ( disabledDates[a] == stayLength[i] ) {
Alert.show(Date Overbooked!, Sorry, Alert.OK);}
break;
}

Doug

On Wed, Jun 11, 2008 at 9:55 AM, Michael Schmalle [EMAIL PROTECTED]
wrote:

   Hi,

 This might help;

 var i:int = 0;
 var overbooked:Boolean = false;


 while ( startDate = endDate ){

 for (var a:int = 0; a = disabledDates.length; a++) {

 stayLength[i] = year.toString() + , + month.toString() + , +
 startDate.toString();

 if ( disabledDates[a] == stayLength[i] ) {
 overbooked = true;
 }

 i++;
 startDate++;

 }

 if (overbooked)
 {
 Alert.show(Date Overbooked!, Sorry, Alert.OK);
 }

 Mike

 On Wed, Jun 11, 2008 at 12:24 PM, tspyro2002 [EMAIL PROTECTED]
 wrote:

   Hi,

 I have a problem where I am processing dates and cross checking them
 across two Arrays. One array holds user selected dates, the other
 holds dates which are disabled.

 The loop I have at the minute checks them OK but outputs an Alert box
 for every date which is the same.

 How can I adjust the code so that only one alert box is displayed?

 CODE SEGMENT

 var i:int = 0;

 while ( startDate = endDate ){

 for (var a:int = 0; a = disabledDates.length; a++) {

 stayLength[i] = year.toString() + , + month.toString() + , +
 startDate.toString();

 if ( disabledDates[a] == stayLength[i] ) {

 Alert.show(Date Overbooked!, Sorry, Alert.OK);}

 }

 i++;
 startDate++;

 }




 --
 Teoti Graphix, LLC
 http://www.teotigraphix.com

 Teoti Graphix Blog
 http://www.blog.teotigraphix.com

 You can find more by solving the problem then by 'asking the question'.
 



Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread bubbamorse
Kerry,

You are absolutely correct!  The artifacts remained property of the company 
that hired you. The knowledge of how you went about it is of course yours and 
can never be taken away

GB,
Bubba


From: Kerry Thompson 
Sent: Wednesday, June 11, 2008 10:57 AM
To: flexcoders@yahoogroups.com 
Subject: RE: [flexcoders] Re: OOP and Work for Hire


Jeffry Houser wrote:

 It really depends on what that knowledge is. 

That's really key. Let me give you a real-world example involving code,
rather than hardwood floors and toothbrushes ;-)

I've specialized in localization and internationalization for 15-20 years.
I'm bilingual, so that helps--that's a pre-existing skill I bring to every
job, and no contract is ever going to take that away from me.

About 10-15 years ago, in the Windows 3.1 days, I wrote a library, in C, to
display Chinese characters on English Windows 3.1. It was breakthrough
technology back then, and Sony paid me well for it. There is no way I could
ethically or legally use that code again (it's a moot point now, of course).

Last year I had a Director project in 8 languages, including 4 Asian
languages. The current version of Director then, MX 2004, didn't support
Unicode, and had no way to display Chinese. So I did what a genius friend of
mine, Mark Jonkman, did--I used a Flash sprite to display the CCJK text.

I can't legally or ethically re-use that same code. But I can darn sure use
Flash to display Unicode text within a Director movie. It might soon be a
moot point also, since Director 11 supports Unicode, and Director 12 might
be usable, but the point is that I'm using a known, pre-existing technique.
Sure, I refined and polished it, and I'll take that skill and knowledge with
me to the next gig. Just not the code. Snippets, maybe, but not the whole
shebang.

Cordially,

Kerry Thompson



 

Re: [flexcoders] Conditional Statement Problem

2008-06-11 Thread Michael Schmalle
Yeah Doug, thats easy...

To many commitProperties() calls for my, my head is templated.

Mike

On Wed, Jun 11, 2008 at 1:10 PM, Doug McCune [EMAIL PROTECTED] wrote:

   or just do:


 f ( disabledDates[a] == stayLength[i] ) {
 Alert.show(Date Overbooked!, Sorry, Alert.OK);}
 break;
 }

 Doug

 On Wed, Jun 11, 2008 at 9:55 AM, Michael Schmalle [EMAIL PROTECTED]
 wrote:

   Hi,

 This might help;

 var i:int = 0;
 var overbooked:Boolean = false;


 while ( startDate = endDate ){

 for (var a:int = 0; a = disabledDates.length; a++) {

 stayLength[i] = year.toString() + , + month.toString() + , +
 startDate.toString();

 if ( disabledDates[a] == stayLength[i] ) {
 overbooked = true;
 }

 i++;
 startDate++;

 }

 if (overbooked)
 {
 Alert.show(Date Overbooked!, Sorry, Alert.OK);
 }

 Mike

 On Wed, Jun 11, 2008 at 12:24 PM, tspyro2002 [EMAIL PROTECTED]
 wrote:

   Hi,

 I have a problem where I am processing dates and cross checking them
 across two Arrays. One array holds user selected dates, the other
 holds dates which are disabled.

 The loop I have at the minute checks them OK but outputs an Alert box
 for every date which is the same.

 How can I adjust the code so that only one alert box is displayed?

 CODE SEGMENT

 var i:int = 0;

 while ( startDate = endDate ){

 for (var a:int = 0; a = disabledDates.length; a++) {

 stayLength[i] = year.toString() + , + month.toString() + , +
 startDate.toString();

 if ( disabledDates[a] == stayLength[i] ) {

 Alert.show(Date Overbooked!, Sorry, Alert.OK);}

 }

 i++;
 startDate++;

 }




 --
 Teoti Graphix, LLC
 http://www.teotigraphix.com

 Teoti Graphix Blog
 http://www.blog.teotigraphix.com

 You can find more by solving the problem then by 'asking the question'.


  




-- 
Teoti Graphix, LLC
http://www.teotigraphix.com

Teoti Graphix Blog
http://www.blog.teotigraphix.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Re: book errata

2008-06-11 Thread crazyluck55
Where on the Peachpit site would it be?  I can see the book but nothing 
about an errata sheet.  I'm looking here:

http://www.peachpit.com/store/product.aspx?isbn=0321529189



[flexcoders] Re: Conditional Statement Problem

2008-06-11 Thread tspyro2002
Hey guys, 

Thanks for your help, 

I ended up having to use both methods because of the nested
conditionals - they kept trying to loop. 

So I now have - 

var overbooked:Boolean = false;

while ( startDate = endDate )
{   
for (var a:int = 0; a = disabledDates.length; a++) {

stayLength[i] = year.toString() + , + 
month.toString() +
, + startDate.toString(); 

if ( disabledDates[a] == stayLength[i] 
) {
overbooked = true;
}
}   
if (overbooked)
{
Alert.show(Date Overbooked!, Sorry, Alert.OK);
break;
}   
i++;
startDate++;
}

Thanks for your help!

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

 Yeah Doug, thats easy...
 
 To many commitProperties() calls for my, my head is templated.
 
 Mike
 
 On Wed, Jun 11, 2008 at 1:10 PM, Doug McCune [EMAIL PROTECTED] wrote:
 
or just do:
 
 
  f ( disabledDates[a] == stayLength[i] ) {
  Alert.show(Date Overbooked!, Sorry, Alert.OK);}
  break;
  }
 
  Doug
 
  On Wed, Jun 11, 2008 at 9:55 AM, Michael Schmalle [EMAIL PROTECTED]
  wrote:
 
Hi,
 
  This might help;
 
  var i:int = 0;
  var overbooked:Boolean = false;
 
 
  while ( startDate = endDate ){
 
  for (var a:int = 0; a = disabledDates.length; a++) {
 
  stayLength[i] = year.toString() + , + month.toString()
+ , +
  startDate.toString();
 
  if ( disabledDates[a] == stayLength[i] ) {
  overbooked = true;
  }
 
  i++;
  startDate++;
 
  }
 
  if (overbooked)
  {
  Alert.show(Date Overbooked!, Sorry, Alert.OK);
  }
 
  Mike
 
  On Wed, Jun 11, 2008 at 12:24 PM, tspyro2002 [EMAIL PROTECTED]
  wrote:
 
Hi,
 
  I have a problem where I am processing dates and cross checking them
  across two Arrays. One array holds user selected dates, the other
  holds dates which are disabled.
 
  The loop I have at the minute checks them OK but outputs an
Alert box
  for every date which is the same.
 
  How can I adjust the code so that only one alert box is displayed?
 
  CODE SEGMENT
 
  var i:int = 0;
 
  while ( startDate = endDate ){
 
  for (var a:int = 0; a = disabledDates.length; a++) {
 
  stayLength[i] = year.toString() + , + month.toString() + , +
  startDate.toString();
 
  if ( disabledDates[a] == stayLength[i] ) {
 
  Alert.show(Date Overbooked!, Sorry, Alert.OK);}
 
  }
 
  i++;
  startDate++;
 
  }
 
 
 
 
  --
  Teoti Graphix, LLC
  http://www.teotigraphix.com
 
  Teoti Graphix Blog
  http://www.blog.teotigraphix.com
 
  You can find more by solving the problem then by 'asking the
question'.
 
 
   
 
 
 
 
 -- 
 Teoti Graphix, LLC
 http://www.teotigraphix.com
 
 Teoti Graphix Blog
 http://www.blog.teotigraphix.com
 
 You can find more by solving the problem then by 'asking the question'.





[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
the Toothbrush that you took from your home wasn't yours to take
home in the first place

LOL, I rest my case...




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

 The reality is that the Toothbrush that you took from your home
wasn't yours to take home in the first place. The obligation is on
you and your new employer to be able to prove a chain of custody and
that no prior art exists. 
 
 That is how the world worksinternationally and well as
domestically. I've no problem of agreeing to disagree, but I do ask
that you let me know your particulars so I can avoid doing business
with you... :-o
 
 GB,
 Bubba
 
 
 From: b_alen 
 Sent: Wednesday, June 11, 2008 8:43 AM
 To: flexcoders@yahoogroups.com 
 Subject: [flexcoders] Re: OOP and Work for Hire
 
 
 So you're saying if I find a way how to get into a tight corner and
 polish it with a specially pimped tooth brush, while doing this for
 the almighty Employer, I can never ever use that technique and the
 similar tooth brush again? So I will be staring at the corner
 helpless, thinking, man I can't use the tooth brush trick now because
 the other one will sue me. 
 
 What if I took the first tooth brush from my home, because I'm a smart
 problem solver and didn't want to wait for boss to buy it?
 
 Another example I create a really nice collision detection algorithm
 on one project. What to do on the next project where I need collision
 detection? Write worse code just so that it's not the same? 
 
 Or if I work for a company for three years, since I was a fresher.
 Legally I have to come out as an idiot, with no knowledge, no
 solutions and I have no right to reimplement any of the code I
 developed there.
 
 It just doesn't work like that in real life. 
 
 --- In flexcoders@yahoogroups.com, bubbamorse@ wrote:
 
  Maybe. If said tools and techniques are uncovered while being paid
 to accomplish this floor re-finishing, then No they do not have any
 legal right to re-use it. In reality, will folks re-use/re-purpose
 what they've done? Absolutely but they have no legal right to it and
 by taking such actions they are placing themselves (albeit how greatly
 some people like to argue about) in peril of legal proceedings against
 them. How often would that happen? More often then people might
realize. 
  
  Another alternative is that they could simply establish themselves
 with a reputation of not respecting their agreements with customers
 (and believe me word will get around quicker than a brushfire in the
 middle of August in California hillside country) and they have
 effectively black-balled themselves.
  
  Then again the employer could simply be fat, stupid and lazy thereby
 never catching on to what is actually happening and the employee can
 take the employer for all they can get.
  
  My recommendation is to simply sign the agreement, adhere to the
 letter and (even more importantly) the spirit of the agreement and get
 on with your life: I.e. Getting paid to do something that you enjoy
 and are proficient at, then using the proceeds to behave like a
 twisted, salted pretzel with your significant other... 
  
  GB,
  Bubba
  
  
  
  From: b_alen 
  Sent: Wednesday, June 11, 2008 3:31 AM
  To: flexcoders@yahoogroups.com 
  Subject: [flexcoders] Re: OOP and Work for Hire
  
  
  No, the floor is not Employee's. But if the employee by doing the
  finishing of the floor realizes how to do it with different tools and
  techniques better, then he has every right to apply his knowledge on
  another floor with different client.
  
  -
  
  As an example: A Employer hires a Employee to re-finish a hard-wood
  floor, does the employee then have the right to claim the floor is
  theirs? Most assuredly not, this same argument has been upheld in
  almost all State courts.
  
   Amy - If you seriously want the position then sign the agreement and
  take the fair pay they are offering for the job. If the pay isn't
  fair, then negotiate a more lucrative deal. If you don't like their
  terms and conditions, you can attempt to negotiate them away,
  butdon't be surprised if they aren't receptive to that approach.
  What you have to ask yourself is Do I have a complete corner on the
  skill set that they are looking for that they have no choice but to
  accept my demands to maintain the IP - I am most sure that the vast
  majority of the world don't have such skill sets
   
   BTW, I think you need to re-consider your definition of OOP.it
  has absolutely nothing to do with maintaining IP.
   
   GB,
   Bubba
   
   
   From: b_alen 
   Sent: Tuesday, June 10, 2008 10:45 PM
   To: flexcoders@yahoogroups.com 
   Subject: [flexcoders] Re: OOP and Work for Hire
   
   
   BOLLOCKS!! Of course you can reuse your code. You're code is not
   stored in AS files anyway, but in your head. So unless you can erase
   memory how you cracked the algorithm or designed a system,
there's no
   way you 

[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
That's exactly what I was saying from the beginning. Typing code is
not programming, as some on this thread think. Using your experience
and knowledge to solve problems is programming. And nobody can take
away that. I can delete all the code I have and I'll make even better
in no time, once I cracked the problems and figured out the best
architecture for certain business needs.




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

 Jeffry Houser wrote:
 
  It really depends on what that knowledge is. 
 
 That's really key. Let me give you a real-world example involving code,
 rather than hardwood floors and toothbrushes ;-)
 
 I've specialized in localization and internationalization for 15-20
years.
 I'm bilingual, so that helps--that's a pre-existing skill I bring to
every
 job, and no contract is ever going to take that away from me.
 
 About 10-15 years ago, in the Windows 3.1 days, I wrote a library,
in C, to
 display Chinese characters on English Windows 3.1. It was breakthrough
 technology back then, and Sony paid me well for it. There is no way
I could
 ethically or legally use that code again (it's a moot point now, of
course).
 
 Last year I had a Director project in 8 languages, including 4 Asian
 languages. The current version of Director then, MX 2004, didn't support
 Unicode, and had no way to display Chinese. So I did what a genius
friend of
 mine, Mark Jonkman, did--I used a Flash sprite to display the CCJK text.
 
 I can't legally or ethically re-use that same code. But I can darn
sure use
 Flash to display Unicode text within a Director movie. It might soon
be a
 moot point also, since Director 11 supports Unicode, and Director 12
might
 be usable, but the point is that I'm using a known, pre-existing
technique.
 Sure, I refined and polished it, and I'll take that skill and
knowledge with
 me to the next gig. Just not the code. Snippets, maybe, but not the
whole
 shebang.
 
 Cordially,
 
 Kerry Thompson





[flexcoders] Re: Conditional Statement Problem

2008-06-11 Thread tspyro2002
Yeh, I dont know why its not indented here, in Flex it is. Cheers for
the help. 

P.S. loved the coverflow component!

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

 Ah, right, I didn't even notice that the for loop was in a while
loop (hard
 to read without indenting). If you go ahead and add another break
into the
 for loop, right below the overbooked = true line, then you will save
a few
 loop cylces.
 
 Doug
 
 On Wed, Jun 11, 2008 at 10:37 AM, tspyro2002 [EMAIL PROTECTED]
 wrote:
 
Hey guys,
 
  Thanks for your help,
 
  I ended up having to use both methods because of the nested
  conditionals - they kept trying to loop.
 
  So I now have -
 
  var overbooked:Boolean = false;
 
  while ( startDate = endDate )
  {
  for (var a:int = 0; a = disabledDates.length; a++) {
 
  stayLength[i] = year.toString() + , + month.toString() +
  , + startDate.toString();
 
  if ( disabledDates[a] == stayLength[i] ) {
  overbooked = true;
  }
  }
  if (overbooked)
  {
  Alert.show(Date Overbooked!, Sorry, Alert.OK);
  break;
  }
  i++;
  startDate++;
  }
 
  Thanks for your help!
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Michael
  Schmalle
  teoti.graphix@ wrote:
  
   Yeah Doug, thats easy...
  
   To many commitProperties() calls for my, my head is templated.
  
   Mike
  
   On Wed, Jun 11, 2008 at 1:10 PM, Doug McCune doug@ wrote:
  
or just do:
   
   
f ( disabledDates[a] == stayLength[i] ) {
Alert.show(Date Overbooked!, Sorry, Alert.OK);}
break;
}
   
Doug
   
On Wed, Jun 11, 2008 at 9:55 AM, Michael Schmalle teoti.graphix@
wrote:
   
Hi,
   
This might help;
   
var i:int = 0;
var overbooked:Boolean = false;
   
   
while ( startDate = endDate ){
   
for (var a:int = 0; a = disabledDates.length; a++) {
   
stayLength[i] = year.toString() + , + month.toString()
  + , +
startDate.toString();
   
if ( disabledDates[a] == stayLength[i] ) {
overbooked = true;
}
   
i++;
startDate++;
   
}
   
if (overbooked)
{
Alert.show(Date Overbooked!, Sorry, Alert.OK);
}
   
Mike
   
On Wed, Jun 11, 2008 at 12:24 PM, tspyro2002 david@
 
wrote:
   
Hi,
   
I have a problem where I am processing dates and cross
checking them
across two Arrays. One array holds user selected dates, the
other
holds dates which are disabled.
   
The loop I have at the minute checks them OK but outputs an
  Alert box
for every date which is the same.
   
How can I adjust the code so that only one alert box is
displayed?
   
CODE SEGMENT
   
var i:int = 0;
   
while ( startDate = endDate ){
   
for (var a:int = 0; a = disabledDates.length; a++) {
   
stayLength[i] = year.toString() + , + month.toString() + , +
startDate.toString();
   
if ( disabledDates[a] == stayLength[i] ) {
   
Alert.show(Date Overbooked!, Sorry, Alert.OK);}
   
}
   
i++;
startDate++;
   
}
   
   
   
   
--
Teoti Graphix, LLC
http://www.teotigraphix.com
   
Teoti Graphix Blog
http://www.blog.teotigraphix.com
   
You can find more by solving the problem then by 'asking the
  question'.
   
   
   
   
  
  
  
   --
   Teoti Graphix, LLC
   http://www.teotigraphix.com
  
   Teoti Graphix Blog
   http://www.blog.teotigraphix.com
  
   You can find more by solving the problem then by 'asking the
question'.
  
 
   
 





[flexcoders] Re: hiding a cell within a datagrid dynamically

2008-06-11 Thread Tim Hoff
Cool. -TH

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

 Thanks TH -- your solution works great!!
 
 Tony
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
  
  Here's another way:
  
  mx:DataGrid id=mygrid dataProvider={initDG} 
   mx:columns
   mx:DataGridColumn id=grant_year 
dataField=grant_year/
   mx:DataGridColumn id=cashoutshares
 dataField=cashoutshares
   mx:itemRenderer
   mx:Component
   mx:Canvas
   mx:Script
   ![CDATA[
   override public function set
  data(value:Object):void
  {
  super.data = value;
  
  if (value != null)
 {
  myCheckBox.selected =
  data.cashoutshares;
  myCheckBox.visible =
  data.grant_year == '1995' ? true : false; // your logic
  
super.invalidateDisplayList();
  }
  ]]
   /mx:Script
  
   mx:CheckBox id=myCheckBox
  click=data.cashoutshares=myCheckBox.selected/
  /mx:Canvas
   /mx:Component
   /mx:itemRenderer
   /mx:DataGridColumn
  /mx:columns
  /mx:DataGrid
  
  This works because the data property in an itemRenderer contains 
all of
  the fields for a row in a dataGrid's dataProvider.
  
  -TH
  
  --- In flexcoders@yahoogroups.com, Manu Dhanda manuraj.dhanda@
  wrote:
  
  
   Ok, one more idea, but not sure about it's performance.
   Just use a viewstack with your custom itemrenderer and use a 
text
  component
   to implement your blank box logic, keeping the text=.
   Here is my idea:
  
   mx:DataGrid id=mygrid dataProvider={initDG} 
   mx:columns
  
   mx:DataGridColumn id=grant_year dataField=grant_year/
   mx:DataGridColumn id=cashoutshares dataField=cashoutshares
   itemRenderer=..MyCheckBox /
  
   /mx:columns
   /mx:DataGrid
  
   MyCheckBox.mxml:
   ?xml version=1.0 encoding=utf-8?
   mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
   horizontalAlign=center
  
   mx:Script
   ![CDATA[
  
   import mx.events.FlexEvent;
   import com.live.flats.view.assets.FlatAssets;
   import mx.controls.Alert;
  
   public function getStackView(value:Object):void {
   //return ur view here..
   }
   ]]
   /mx:Script
  
   mx:ViewStack selectedChild={ getStackView( 
data.cashoutshares) }
   mx:CheckBox id=aCB selected=true
   mx:Text id=aText text=/
   mx:ViewStack
   /mx:HBox
  
   Thanks,
   Manu.
  
  
   anthony_morsey wrote:
   
Thanks, but this technique seems to work for all values in the
  column,
not just the value in each individual row. It seems that if 
one of
the values for grant_year in a column meets the condition, 
then all
checkboxes are either hidden or visible. I want to do this 
row by
  row
and turn visible on or off based on the grant_year value in 
that
  row.
   
Any other ideas?
   
Thanks
   
--- In flexcoders@yahoogroups.com, Manu Dhanda manuraj.dhanda@
  wrote:
   
   
Here it is:
mx:DataGrid id=mygrid dataProvider={initDG} 
mx:columns
   
mx:DataGridColumn id=grant_year dataField=grant_year/
   
mx:DataGridColumn id=cashoutshares 
dataField=cashoutshares
itemRenderer=mx.controls.CheckBox
  visible={!grant_year=='somevalue'
implement ur logic here}/
   
/mx:columns
/mx:DataGrid
   
   
   
anthony_morsey wrote:

 Here is my code:

 mx:DataGrid id=mygrid dataProvider={initDG} 
 mx:columns

 mx:DataGridColumn id=grant_year dataField=grant_year/

 mx:DataGridColumn id=cashoutshares 
dataField=cashoutshares
 itemRenderer=mx.controls.CheckBox /

 /mx:columns
 /mx:DataGrid



 I want to hide the cashoutshares column (or turn off the
 itemrenderer in that column) based on the data value of
  grant_year.

 Thanks






 --- In flexcoders@yahoogroups.com, jmfillman jmfillman@
  wrote:

 Anthony,

 If you are passing the data from the columns of each row 
to the
 itemRenderer, you should be able to set visibility 
conditions
from the
 itemRenderer.

 If you post your code, I or someone else here might be 
able to
provide
 a more specific suggestion.

 JF
 --- In flexcoders@yahoogroups.com, anthony_morsey 
tmorsey@
  wrote:
 
  I have a datagrid with multiple columns and rows. One 
of the
columns
  contains a checkbox which is rendered with an 
itemRenderer.
I'd like
  to conditionally hide some of these checkboxes based on 
values
  from
  other columns 

RE: [flexcoders] Re: HTTPService Bug

2008-06-11 Thread Tracy Spratt
One reason to use resultFormat=e4x, and not let Flex do the conversion
for you.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of tspyro2002
Sent: Wednesday, June 11, 2008 4:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: HTTPService Bug

 

All XML attribute values, names, and text values are String data types,
and you may need 
to convert these to other data types. For example, the following code
uses the Number() 
function to convert text values to numbers:

var myXML:XML = 
order
item
price3.95/price
/item
item
price1.00/price
/item
/order;

var total:XML = total0/total;
myXML.appendChild(total);

for each (var item:XML in myXML.item)
{
myXML.total.children()[0] = Number(myXML.total.children()[0]) 
+ Number(item.price.children()[0]);
}
trace(myXML.total); // 4.35;

If this code did not use the Number() function, the code would interpret
the + operator as 
the string concatenation operator, and the trace() method in the last
line would output the 
following:

01.003.95

-- Taken from Adobe Flex 3 Help File

Hope this helps,
David

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

 Any reason why HTTPService when return my XML as an Object transform
 the following array into strings that was suppose to contain strings
 
 item key=version
 label![CDATA[Version]]/label
 type![CDATA[dropdown]]/type
 source
 item key=![CDATA[Choose]]/item
 
 item key=2.0![CDATA[2.0]]/item
 item key=1.2![CDATA[1.2]]/item
 item key=1.0![CDATA[1.0]]/item
 /source
 default![CDATA[Choose]]/default
 width![CDATA[100]]/width
 rules![CDATA[trim|required]]/rules
 /item
 
 I'm populating my combobox with the source node. I'm using
 HTTPService and the resultFormaat = object.
 
 It adds but whenever i have 1.0 or 2.0 flex just assume it's an string
 and use 1 or 2 removing the .0. 
 
 there is anyway to tell flex to NOT remove that i want an string and
 not an integer?
 
 raf


 



Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Doug McCune
Typed code is what you are paid to deliver. That is what the client is
buying. When the client pays you you are selling those digital lines of
code.

I just wrote a book for wiley. I cannot copy and paste any of the prose that
I wrote and post it on my blog. It belongs to wiley. I sold it to them (for
almost nothing, but that's beside the point). Yes, I can take the knowledge
I gained while writing that book and write completely new tutorials that I
post on my blog (although a non-compete prohibits me from writing a
competitive book). But the instant I copy and paste something I am breaking
the legal contract that I signed.

The original question was about taking the exact code that was created for
one client and using it in another project (either for a client or as open
source code for the community). I don't think there's much of a legal gray
area here. Yes, everyone agrees that the knowledge and techniques that you
gain while writing code are yours and can often be used in other projects.
But that is not at all the same as saying it's ok to copy a class or chunks
of code verbatim.

Doug

On Wed, Jun 11, 2008 at 10:48 AM, b_alen [EMAIL PROTECTED] wrote:

   That's exactly what I was saying from the beginning. Typing code is
 not programming, as some on this thread think. Using your experience
 and knowledge to solve problems is programming. And nobody can take
 away that. I can delete all the code I have and I'll make even better
 in no time, once I cracked the problems and figured out the best
 architecture for certain business needs.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Kerry
 Thompson [EMAIL PROTECTED] wrote:
 
  Jeffry Houser wrote:
 
   It really depends on what that knowledge is.
 
  That's really key. Let me give you a real-world example involving code,
  rather than hardwood floors and toothbrushes ;-)
 
  I've specialized in localization and internationalization for 15-20
 years.
  I'm bilingual, so that helps--that's a pre-existing skill I bring to
 every
  job, and no contract is ever going to take that away from me.
 
  About 10-15 years ago, in the Windows 3.1 days, I wrote a library,
 in C, to
  display Chinese characters on English Windows 3.1. It was breakthrough
  technology back then, and Sony paid me well for it. There is no way
 I could
  ethically or legally use that code again (it's a moot point now, of
 course).
 
  Last year I had a Director project in 8 languages, including 4 Asian
  languages. The current version of Director then, MX 2004, didn't support
  Unicode, and had no way to display Chinese. So I did what a genius
 friend of
  mine, Mark Jonkman, did--I used a Flash sprite to display the CCJK text.
 
  I can't legally or ethically re-use that same code. But I can darn
 sure use
  Flash to display Unicode text within a Director movie. It might soon
 be a
  moot point also, since Director 11 supports Unicode, and Director 12
 might
  be usable, but the point is that I'm using a known, pre-existing
 technique.
  Sure, I refined and polished it, and I'll take that skill and
 knowledge with
  me to the next gig. Just not the code. Snippets, maybe, but not the
 whole
  shebang.
 
  Cordially,
 
  Kerry Thompson
 

  



[flexcoders] Advanced DataGrid XMLListCollection tree

2008-06-11 Thread brian_garcia81
Hello, 

I have been trying to setup the tree function of that advanced
datagrid but keep running into problems. 

I get the error:
TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to mx.collections.ICollectionView.



I have made some progress, Now instead of getting no data populating
the Advanced Datagrid I get a single Folder that says Not Available







public function handleResultRecords(event:ResultEvent):void{

records = new XMLListCollection(event.result.ini.record);   


var fields:Array = [];
fields.push(new GroupingField(record));

gc = new GroupingCollection();
gc.source = records;

gc.grouping = new Grouping();   
gc.grouping.fields = fields;
gc.refresh(true);   
adg.dataProvider = gc;
   }



mx:AdvancedDataGrid id=adg designViewDataType=tree height=100%
width=100% 
 mx:columns   
   mx:AdvancedDataGridColumn dataField=@id width=125 /
   mx:AdvancedDataGridColumn dataField=@name  /
   mx:AdvancedDataGridColumn dataField=id width=125 /
   mx:AdvancedDataGridColumn dataField=name /
   mx:AdvancedDataGridColumn dataField=value /
/mx:columns
/mx:AdvancedDataGrid




Data From the Debugger:


gc  mx.collections.GroupingCollection (@7328a2f1)   
[inherited] 
groupingmx.collections.Grouping (@73356421) 
optimizeSummaries   false   
source  mx.collections.XMLListCollection (@733d5d41)
[inherited] 
[0] XML 
[1] XML 
[2] XML 
[3] XML 








records mx.collections.XMLListCollection (@733d5d41)
[inherited] 
[0] XML 
record id=180013 name=SHC VIEW ONLY CLINICAL  
item id=11 name=  
value 500307
item id=130 name= 
item id=3060 name=
item id=70 name=  
item id=71 name=  
item id=17 name=  
item id=2 name=   
item id=30 name=  
item id=65 name=  
item id=50 name=  
item id=120 name= 
item id=40 name=  
item id=75 name=  
item id=9 name=   
item id=12 name=  
item id=20 name=  
item id=60 name=  
item id=45 name=  
item id=10 name=  
[1] XML 
[2] XML 
[3] XML 
[4] XML 
source  XMLList (@734c0731) 






[0] mx.collections.GroupingField (@734fc351)
caseInsensitive false   
compareFunction null
descending  false   
groupingFunctionnull
groupingObjectFunction  null
namerecord
numeric false   
summaries   null





References I have been reading
http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_2.html
http://flexpearls.blogspot.com/2008/05/grouping-xml-data-using.html
http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_08.html




Thank you for your help ! 

-Brian 





RE: [flexcoders] Re: HTTPService Bug

2008-06-11 Thread Tracy Spratt
If you leave the resultFormat property at its default, which is
object, Flex converts your XML into a nested structure of dynamic
objects.  While this can be convenient for creating an ArrayCollection,
it is rarely desirable.

 

The consensus seems to be, especially with many visible itemRenderers,
that best overall performance is obtained by receiving the data as e4x,
then looping over that to build an ArrayCollection of strongly typed
value objects.

 

Search the archives for plenty of discussion.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of LazerWonder
Sent: Wednesday, June 11, 2008 12:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: HTTPService Bug

 

Wherever you get the returned XML object from... does it pass in a 1 
or 2? Or does it pass a 1.0 / 2.0. As far as I know, 
HTTPService does not transform data (some one more experience can 
correct me if I am wrong). It just spits back to you what it 
receives.

If you have control over the server side of things (that is, where 
the HTTPService connects to) you might need to see if 1.0/2.0 is 
being passed to the XML object or maybe only 1 / 2 is being 
passed to the object. If you have no control over this, then you 
might need to add the .0 manually; or if you do have control but 
Flex still trip the .0 off, then try adding quotation marks 
around 1.0 / 2.0 on the server side.

You can also do a trace (which I'm sure you already did - but I 
thought I'll just plug this in here anyways) statement on the 
returned object, just to see what you get.

Happy Coding. :)

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

 Any reason why HTTPService when return my XML as an Object transform
 the following array into strings that was suppose to contain strings
 
 item key=version
 label![CDATA[Version]]/label
 type![CDATA[dropdown]]/type
 source
 item key=![CDATA[Choose]]/item
 
 item key=2.0![CDATA[2.0]]/item
 item key=1.2![CDATA[1.2]]/item
 item key=1.0![CDATA[1.0]]/item
 /source
 default![CDATA[Choose]]/default
 width![CDATA[100]]/width
 rules![CDATA[trim|required]]/rules
 /item
 
 I'm populating my combobox with the source node. I'm using
 HTTPService and the resultFormaat = object.
 
 It adds but whenever i have 1.0 or 2.0 flex just assume it's an 
string
 and use 1 or 2 removing the .0. 
 
 there is anyway to tell flex to NOT remove that i want an string and
 not an integer?
 
 raf


 



[flexcoders] Re: Any best-practice for labelField=field.innerField on things like DataGridC

2008-06-11 Thread Tim Hoff

The only problem with using labelFunctions or itemRenderers for this, is
that the default sort mechanism (column header click) doesn't work (see
historical low).  To avoid having to write sortCompareFunctions,
sometimes its easier to just bite the bullet and manually add the nested
fields to the top level of the VO; so the object is flat.  I know its
redundant, but it works with little effort.

-TH

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

 There's a DeepDataGridColumn example on my blog that can do simple
 field.subfield



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of ben.clinkinbeard
 Sent: Tuesday, June 10, 2008 7:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Any best-practice for
 labelField=field.innerField on things like DataGridC



 I don't think you can do field.subField but you could use
 labelFunctions to accomplish essentially the same thing. Heck, you
 might even be able to set dataField = field.subField and then use a
 generic labelFunction that does something like return
 data[column.dataField]. Just a guess on that part but labelFunction is
 definitely the core of what you'll need.

 HTH,
 Ben

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Josh McDonald dznuts@ wrote:
 
  Hey guys,
  Is there a well-used trick to reference field.subField rather than
 just
  field when setting up datagrid columns? I'd rather not have to
 flatten my
  DTOs or add a bunch of redundant get functions if possible - the DTO
 is
  bindable and the fields are just public vars.
 
  Cheers,
  -Josh
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 






[flexcoders] Re: Moving Nodes across Trees (with in the tree is works fine)

2008-06-11 Thread sk_acura
Hi All,

  How can i find the new Parent of a moved Node ?? I have tried all
the options with no luck..

  i have the following method ( Pls refer my earlier post for the def
of CollectionBrowserNode)

[CODE]
private function onDragDrop(event:DragEvent):void{
 var draggedItems:Array = (event.dragSource.dataForFormat(treeItems)
as Array);
trace(draggedItems =+draggedItems);
var changedNode:ChangedNode = null;
for each(var draggedItem:CollectionBrowserNode in draggedItems){
var parentTarget:CollectionBrowserNode = (Tree
(event.currentTarget)).getParentItem(draggedItem);
trace(dragged Item =+draggedItem+Parent Node =+parentTarget);
draggedItem.parentId = changedNode.parentNodeId;
}
}
[/CODE]

Even when i pass the seclted Instance as an argument to

   tree.getParentItem() is returning the Original Parent Before the Drag..

  How can i get the new Parent of the Dragged Item ??

Thanks
Mars



[flexcoders] Adding event to an image set as titleIcon property

2008-06-11 Thread pratikshah83
Hi ,

I am currently using a collapsible panel. It expands or collapse when
we click the panel header. Currently I have an event on the titleBar.
I have an open and close arrow image set as titleIcon property, I
would like to add a click event on that arrow image property instead
of the titleBar. 

Any help in this regards is appreciated. 

Thanks
Pratik




[flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread b_alen
So if I create a great algorithm for collision detection while working
for a client I can not use it ever again? And if I have to make it for
10 different clients in a year, I have to create 10 completely
different solutions for the same problem, so I don't copy. First of
all that's impossible. Second, if I do use the same knowledge and
techniques like you said, then the code is of secondary importance
anyway. I can heavily refactor the code and change all the variable
names but the heart of the algorithm will stay the same.





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

 Typed code is what you are paid to deliver. That is what the client is
 buying. When the client pays you you are selling those digital lines of
 code.
 
 I just wrote a book for wiley. I cannot copy and paste any of the
prose that
 I wrote and post it on my blog. It belongs to wiley. I sold it to
them (for
 almost nothing, but that's beside the point). Yes, I can take the
knowledge
 I gained while writing that book and write completely new tutorials
that I
 post on my blog (although a non-compete prohibits me from writing a
 competitive book). But the instant I copy and paste something I am
breaking
 the legal contract that I signed.
 
 The original question was about taking the exact code that was
created for
 one client and using it in another project (either for a client or
as open
 source code for the community). I don't think there's much of a
legal gray
 area here. Yes, everyone agrees that the knowledge and techniques
that you
 gain while writing code are yours and can often be used in other
projects.
 But that is not at all the same as saying it's ok to copy a class or
chunks
 of code verbatim.
 
 Doug
 
 On Wed, Jun 11, 2008 at 10:48 AM, b_alen [EMAIL PROTECTED] wrote:
 
That's exactly what I was saying from the beginning. Typing code is
  not programming, as some on this thread think. Using your experience
  and knowledge to solve problems is programming. And nobody can take
  away that. I can delete all the code I have and I'll make even better
  in no time, once I cracked the problems and figured out the best
  architecture for certain business needs.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Kerry
  Thompson alpha@ wrote:
  
   Jeffry Houser wrote:
  
It really depends on what that knowledge is.
  
   That's really key. Let me give you a real-world example
involving code,
   rather than hardwood floors and toothbrushes ;-)
  
   I've specialized in localization and internationalization for 15-20
  years.
   I'm bilingual, so that helps--that's a pre-existing skill I bring to
  every
   job, and no contract is ever going to take that away from me.
  
   About 10-15 years ago, in the Windows 3.1 days, I wrote a library,
  in C, to
   display Chinese characters on English Windows 3.1. It was
breakthrough
   technology back then, and Sony paid me well for it. There is no way
  I could
   ethically or legally use that code again (it's a moot point now, of
  course).
  
   Last year I had a Director project in 8 languages, including 4 Asian
   languages. The current version of Director then, MX 2004, didn't
support
   Unicode, and had no way to display Chinese. So I did what a genius
  friend of
   mine, Mark Jonkman, did--I used a Flash sprite to display the
CCJK text.
  
   I can't legally or ethically re-use that same code. But I can darn
  sure use
   Flash to display Unicode text within a Director movie. It might soon
  be a
   moot point also, since Director 11 supports Unicode, and Director 12
  might
   be usable, but the point is that I'm using a known, pre-existing
  technique.
   Sure, I refined and polished it, and I'll take that skill and
  knowledge with
   me to the next gig. Just not the code. Snippets, maybe, but not the
  whole
   shebang.
  
   Cordially,
  
   Kerry Thompson
  
 
   
 





[flexcoders] scrolling prob on itemrenderers

2008-06-11 Thread ibo
I have created a custom ItemRenderer with a textarea in it. This ItemRenderer 
is being used in a DataGrid. If the mouse pointer is over the 
textarea(ItemRenderer), the datagrid doesnt react to any mouse wheel movement. 
How I enable the DataGrid to receive the mouse wheel events when the mouse is 
over that textarea?


[flexcoders] right way to bubble 'show' event in nested viewstacks

2008-06-11 Thread Derrick Anderson
hi,

i have a tabnavigator in a viewstack, my tabnavigator children control a
menu parented by the main application.  the 'show' event is what i'm using
to setup the menu.

so that means that each time the outer viewstack changes, i need to pass the
'show' event down to the current item in the inner viewstack.  this is how
i've been doing it, on each child of the outer viewstack, i add this.

public function onCreationComplete():void
{

ViewLocator.getInstance().register(Constants.EMPLOYEES_VIEW,this);
*this.addEventListener(FlexEvent.SHOW,bubbleShowEvent);*
}
*private function bubbleShowEvent(event:FlexEvent):void
{
employeesTabNavigator.selectedChild.dispatchEvent(new
FlexEvent(FlexEvent.SHOW));
}

*there must be a better way of doing this, maybe?

thanks,
d.


Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread Doug McCune
The company that you worked for has the right to patent the implementation
of that great algorithm that you came up with. So if that's really an
inventive algorithm then yeah, they have the right to use it and you do
not. In the real world is this how things play out? often no, but I'm just
trying to explain my (non-professional) understanding of intellectual
property law.

Doug

On Wed, Jun 11, 2008 at 11:55 AM, b_alen [EMAIL PROTECTED] wrote:

   So if I create a great algorithm for collision detection while working
 for a client I can not use it ever again? And if I have to make it for
 10 different clients in a year, I have to create 10 completely
 different solutions for the same problem, so I don't copy. First of
 all that's impossible. Second, if I do use the same knowledge and
 techniques like you said, then the code is of secondary importance
 anyway. I can heavily refactor the code and change all the variable
 names but the heart of the algorithm will stay the same.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Doug
 McCune [EMAIL PROTECTED] wrote:
 
  Typed code is what you are paid to deliver. That is what the client is
  buying. When the client pays you you are selling those digital lines of
  code.
 
  I just wrote a book for wiley. I cannot copy and paste any of the
 prose that
  I wrote and post it on my blog. It belongs to wiley. I sold it to
 them (for
  almost nothing, but that's beside the point). Yes, I can take the
 knowledge
  I gained while writing that book and write completely new tutorials
 that I
  post on my blog (although a non-compete prohibits me from writing a
  competitive book). But the instant I copy and paste something I am
 breaking
  the legal contract that I signed.
 
  The original question was about taking the exact code that was
 created for
  one client and using it in another project (either for a client or
 as open
  source code for the community). I don't think there's much of a
 legal gray
  area here. Yes, everyone agrees that the knowledge and techniques
 that you
  gain while writing code are yours and can often be used in other
 projects.
  But that is not at all the same as saying it's ok to copy a class or
 chunks
  of code verbatim.
 
  Doug
 
  On Wed, Jun 11, 2008 at 10:48 AM, b_alen [EMAIL PROTECTED] wrote:
 
   That's exactly what I was saying from the beginning. Typing code is
   not programming, as some on this thread think. Using your experience
   and knowledge to solve problems is programming. And nobody can take
   away that. I can delete all the code I have and I'll make even better
   in no time, once I cracked the problems and figured out the best
   architecture for certain business needs.
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,

 Kerry
   Thompson alpha@ wrote:
   
Jeffry Houser wrote:
   
 It really depends on what that knowledge is.
   
That's really key. Let me give you a real-world example
 involving code,
rather than hardwood floors and toothbrushes ;-)
   
I've specialized in localization and internationalization for 15-20
   years.
I'm bilingual, so that helps--that's a pre-existing skill I bring to
   every
job, and no contract is ever going to take that away from me.
   
About 10-15 years ago, in the Windows 3.1 days, I wrote a library,
   in C, to
display Chinese characters on English Windows 3.1. It was
 breakthrough
technology back then, and Sony paid me well for it. There is no way
   I could
ethically or legally use that code again (it's a moot point now, of
   course).
   
Last year I had a Director project in 8 languages, including 4 Asian
languages. The current version of Director then, MX 2004, didn't
 support
Unicode, and had no way to display Chinese. So I did what a genius
   friend of
mine, Mark Jonkman, did--I used a Flash sprite to display the
 CCJK text.
   
I can't legally or ethically re-use that same code. But I can darn
   sure use
Flash to display Unicode text within a Director movie. It might soon
   be a
moot point also, since Director 11 supports Unicode, and Director 12
   might
be usable, but the point is that I'm using a known, pre-existing
   technique.
Sure, I refined and polished it, and I'll take that skill and
   knowledge with
me to the next gig. Just not the code. Snippets, maybe, but not the
   whole
shebang.
   
Cordially,
   
Kerry Thompson
   
  
  
  
 

  



[flexcoders] Re: Moving Nodes across Trees (with in the tree is works fine)

2008-06-11 Thread sk_acura
Hi All,

  After spending some time on the API Docs i am able to find a way to
get hold of the new parent of the Dropped Item at runtime..

[CODE]
 var r:int = tree.calculateDropIndex(event);
 tree.selectedIndex = r;
[/CODE]

How ever when i add this code to the onDragDrop() method..

I am unable to drop the Items !!

How ever when i added the code to add the dragged items as Child
Elements of the target parent everything seems to work fine..

Thanks
Mars



Re: [flexcoders] Re: OOP and Work for Hire

2008-06-11 Thread bubbamorse
And if you share it across companies, then you will have violated every known 
law on IPif there exists a Work for Hire agreement or anything closely 
approaching such an agreement.


From: b_alen 
Sent: Wednesday, June 11, 2008 1:55 PM
To: flexcoders@yahoogroups.com 
Subject: [flexcoders] Re: OOP and Work for Hire


So if I create a great algorithm for collision detection while working
for a client I can not use it ever again? And if I have to make it for
10 different clients in a year, I have to create 10 completely
different solutions for the same problem, so I don't copy. First of
all that's impossible. Second, if I do use the same knowledge and
techniques like you said, then the code is of secondary importance
anyway. I can heavily refactor the code and change all the variable
names but the heart of the algorithm will stay the same.

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

 Typed code is what you are paid to deliver. That is what the client is
 buying. When the client pays you you are selling those digital lines of
 code.
 
 I just wrote a book for wiley. I cannot copy and paste any of the
prose that
 I wrote and post it on my blog. It belongs to wiley. I sold it to
them (for
 almost nothing, but that's beside the point). Yes, I can take the
knowledge
 I gained while writing that book and write completely new tutorials
that I
 post on my blog (although a non-compete prohibits me from writing a
 competitive book). But the instant I copy and paste something I am
breaking
 the legal contract that I signed.
 
 The original question was about taking the exact code that was
created for
 one client and using it in another project (either for a client or
as open
 source code for the community). I don't think there's much of a
legal gray
 area here. Yes, everyone agrees that the knowledge and techniques
that you
 gain while writing code are yours and can often be used in other
projects.
 But that is not at all the same as saying it's ok to copy a class or
chunks
 of code verbatim.
 
 Doug
 
 On Wed, Jun 11, 2008 at 10:48 AM, b_alen [EMAIL PROTECTED] wrote:
 
  That's exactly what I was saying from the beginning. Typing code is
  not programming, as some on this thread think. Using your experience
  and knowledge to solve problems is programming. And nobody can take
  away that. I can delete all the code I have and I'll make even better
  in no time, once I cracked the problems and figured out the best
  architecture for certain business needs.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Kerry
  Thompson alpha@ wrote:
  
   Jeffry Houser wrote:
  
It really depends on what that knowledge is.
  
   That's really key. Let me give you a real-world example
involving code,
   rather than hardwood floors and toothbrushes ;-)
  
   I've specialized in localization and internationalization for 15-20
  years.
   I'm bilingual, so that helps--that's a pre-existing skill I bring to
  every
   job, and no contract is ever going to take that away from me.
  
   About 10-15 years ago, in the Windows 3.1 days, I wrote a library,
  in C, to
   display Chinese characters on English Windows 3.1. It was
breakthrough
   technology back then, and Sony paid me well for it. There is no way
  I could
   ethically or legally use that code again (it's a moot point now, of
  course).
  
   Last year I had a Director project in 8 languages, including 4 Asian
   languages. The current version of Director then, MX 2004, didn't
support
   Unicode, and had no way to display Chinese. So I did what a genius
  friend of
   mine, Mark Jonkman, did--I used a Flash sprite to display the
CCJK text.
  
   I can't legally or ethically re-use that same code. But I can darn
  sure use
   Flash to display Unicode text within a Director movie. It might soon
  be a
   moot point also, since Director 11 supports Unicode, and Director 12
  might
   be usable, but the point is that I'm using a known, pre-existing
  technique.
   Sure, I refined and polished it, and I'll take that skill and
  knowledge with
   me to the next gig. Just not the code. Snippets, maybe, but not the
  whole
   shebang.
  
   Cordially,
  
   Kerry Thompson
  
 
  
 




 

[flexcoders] Re: scrolling prob on itemrenderers

2008-06-11 Thread Tim Hoff

Hi Ibo,

Try setting  mouseEnable=false and mouseChildren=false on the
container in the itemRenderer (not the textArea, rather it's parent
container).

-TH

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

 I have created a custom ItemRenderer with a textarea in it. This
ItemRenderer is being used in a DataGrid. If the mouse pointer is over
the textarea(ItemRenderer), the datagrid doesnt react to any mouse wheel
movement.
 How I enable the DataGrid to receive the mouse wheel events when the
mouse is over that textarea?






[flexcoders] Flex, LCDS, FlexUnit, and Maven 2

2008-06-11 Thread jeffreyr6915
I have a Flex application that uses LCDS. I was wondering if someone
help me find tutorials/samples on how to do the following:

1. Build the Flex application (which uses LCDS) with Maven 2 (what to
put in the pom.xml)

2. How to integrate my existing flexunit tests into the Maven 2 build

3. Run my FlexUnit tests using Maven 2


Thanks do much!



[flexcoders] what RIA-to-PDF conversion means in LCDS?

2008-06-11 Thread markflex2007
Hi,

I want to make sure if it mean it can convert the Flex screen to PDF 
file? Do you know s demo for this.

Thanks

Mark



RE: [flexcoders] lcds references to same item

2008-06-11 Thread Seth Hodgson
If I'm understanding your email correctly, you're actually looking at a feature 
of Data Management. When you fill multiple client side collections and there's 
an overlap in the items each collection contains, Data Management ensures that 
only a single instance of any specific item exists on the client. This 
guarantees that your client side-data remains in a consistent state. Say you 
had two copies of 'media1' on the client, and then you change one and then the 
other. Which copy is the true copy? Which should be committed back to the 
server? There's no way to know, and this is a problem folks hit when using 
simple remoting to manage data. By maintaining a single instance on the client, 
your client-side data stays in a consistent, well-understood state.

If your media instances really shouldn't be shared by your model instances, 
then you'll need to adjust your domain model (always create unique media 
instances for each model?).

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Thierry 
V.
Sent: Wednesday, June 11, 2008 2:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] lcds references to same item

Hello all !

I use LCDS to retrieve data from my database and display it on a tree.

I have the following tables : model, model_media and media.

I have made an hibernate model mapping with a Set from model to 
model_media, to get for each model their medias, like this :

set name=children table=model_media lazy=false
key column=modelid /
many-to-many column=mediaid class=MediaVO /
/set

I could retrieve data correctly, each model have their own media listed 
in the children Set. Some medias are used by several models at same 
time, for exemple :

model1
- media1
- media2
- media3

model2
- media1
- media3
- media4

Now, when I display my hierarchical list into a Tree, there is stange 
behaviours... When I display all the hierarchy for all models, and roll 
over an item used several times, the selection focus is displayed on the 
last item... ie if I roll over the media1 from model1, the focus is 
displayed on the media1 from model2... It seems that the items used some 
times are referenced at the same memory allocation... Flex doesn't 
recognize each item as single item, it see item used several times as 
the same item...

Anybody have encounted the same behaviours ?? I don't know how to 
resolve it...

any suggestion are welcome, thanks in advance

Thierry
 


  1   2   >