[flexcoders] Re: LinearAxis - need help with value ordering! (Repost with sample code)

2007-05-04 Thread simonjpalmer
That was going to be my next suggestion, create yourself an inverted
chart space and plot points in that space.  You shouldn't have to
change your raw data.  In your shoes I would either have a specialised
getter for your y value e.g.

public function get chartYValue():Number
{
   return value+((50-value)*2);
}

and bind to that, or if you really need to, have a custom object and
probably a factory class to manage them.  I have used this second
approach quite successfully.  

Simon

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

 Hi Simon,
 
 Thanks for the reply.  There are custom label functions for the
 various axes, but I need my datapoints to map to reverse order as
 well, so I don't think this would work.
 
 My best hack solution right now is to force a reverse by transforming
 the data in my dataProvider before charting it: in my case, I'm
 charting values 0-100, so I can do something like:
 
 invertedValue = value+((50-value)*2);
 
 Works, but I have to change the data itself, which is going to cause
 other problems.
 
 Ely's site is fabulous, but I didn't find an answer there in my
searches.
 
 -Peter
 
 --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@
 wrote:
 
  I'd look at using a custom renderer for the y-axis labels.  I'm not
  exactly sure how but I am willing to bet that you can do it.  Is there
  a label function or something similar on the LinearAxis?  
  
  Have you poked around on Ely's blog (quietlyscheming.com)  
  
  In the extreme case you can always create your own linear axis which
  handles the labelling.
  
  Simon
  
  --- In flexcoders@yahoogroups.com, Peter Demling pdemling@ wrote:
  
   Hi All,
   
   Any suggestions on how to get a numerical y-axis to start at the
   maximum value and descend on up?  For example, the sample app below
   starts the y-axis at zero and goes up to 5; I want it to start at 5
   and go up to zero: VerticalAxis.reverseDefaultSortOrder() or
   something.  I've tried and failed with manipulating the
baseAtZero,
   autoAdjust, minimum and maximum properties.
   
   Any ideas, kludgey or otherwise??
   
   Many thanks!
   
   -Peter Demling
   Lexington, MA
   
   
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:Script
   ![CDATA[ 
 import mx.collections.ArrayCollection;
   
 [Bindable]
  private var sampleData:ArrayCollection =
  new ArrayCollection([
 {xValue:10, yValue:1 },
 {xValue:20, yValue:2 },
 {xValue:30, yValue:3 },
 {xValue:40, yValue:4 },
 {xValue:50, yValue:5 }
 ]); 
   ]]
   /mx:Script
   
   mx:LineChart  width=100%  height=100%
 dataProvider={sampleData}
   mx:verticalAxis
 mx:LinearAxis id=yAxis/
 /mx:verticalAxis
 mx:series
 mx:LineSeries id=primaryLine
 xField=xValue
 yField=yValue/
 /mx:series
   /mx:LineChart
   
   /mx:Application
  
 





[flexcoders] Re: Help! Object integrity across DataService.commit()

2007-05-04 Thread simonjpalmer
Thanks again Pete.

So I have this in my application code which is stolen directly from
the docs:

mx:TraceTarget
mx:filters
mx:Array
mx:Stringmx.data.DataService/mx:String
mx:Stringmx.data.ConflictResolver/mx:String
/mx:Array
/mx:filters
!-- 2 is represents the LogEventLevel.DEBUG constant. --
mx:level2/mx:level
/mx:TraceTarget

I created an mm.cfg file for myself after checking where my HOMEDRIVE
and HOMEPATH were and put the following in it:

ErrorReportingEnable=1
TraceOutputFileEnable=1

I re-started my server and ran the client in the debugger but I don't
get any log files created.  I am judiciously ignoring the instructions
about log paths as you suggested.  Any ideas what I have done wrong? 
I get a whole whack of output into the console window, but no log file.

Two other questions for you (or anyone else who knows the answers):
1) where do I go to find out what the integer values of the log levels
are?
2) how do I get at an object's address in memory?  This may sound a
little weird.  What I am looking for is that piece of information
which shows up in the debugger and looks like @afe634.  I am
presuming this is an address or an identifer of some kind and I think
this is the key to me identifying what is happening to my objects. 
Their UIDs remain the same, but they are clearly not the same objects
as their property values are different.  I appear to have several
managed objects with the same uid but different property values.

Simon

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

 mx:TraceTarget level=0 is the MXML tag that maps to the
 mx.logging.targets.TraceTarget class. This is just one implementation of
 the ILoggingTarget API that happens to use the Flash Player trace() API.
 
  
 As you noticed, trace() only works with the debug Flash Player... but
 you don't have to actually debug to see this output (although that is
 a common way to do so because of Flex Builder's Console panel records
 this output too). The other way is to setup mm.cfg in your OS user
 directory to write out trace info to flashlog.txt.
  
 See:
 http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19323
  
 But be careful of older comments in articles like this about the
 property TraceOutputFileName - you can no longer customize the location
 of flashlog.txt. That is, from FP9 onwards this file appears in a fixed
 location and cannot be customized. e.g. on typical Windows XP
 installation, the latest player writes to: C:\Documents and
 Settings\username\Application Data\Macromedia\Flash
 Player\Logs\flashlog.txt
  
 If you just use mx:TraceTarget level=0 you'll get all events for all
 categories. You can add filters to cut down on the amount of info too...
  
 See:
 http://livedocs.adobe.com/flex/2/langref/mx/logging/targets/TraceTarget.
 html
 http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?
 href=1534.html
  
 It's largely the rpc, messaging and data services classes that make use
 of mx.logging.* btw.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Friday, May 04, 2007 2:45 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Help! Object integrity across
 DataService.commit()
 
 
 
 Thanks for the tip Pete, anything to reduce the noise in the logs is
 good.
 
 Jeff mentioned the TraceTarget tag on the client side and I have been
 doing some digging there. I'm not completely clear how to use it. 
 Are there any light docs I can read to get me started? I am used to
 writing trace commands into my code but I don't seem to be able to use
 the TraceTarget meaningfully. Does it only work if running in debug?
 
 Simon
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Peter Farland pfarland@ wrote:
 
  Just a minor note Simon, for the logging categories, I'd suggest using
  either Endpoint.* OR Message.* rather than both at the same time
 as
  they give two different views for virtually the same information. The
  other categories are fine, but these two in particular are some what
  best treated as mutually exclusive to cut down on noise.
  
  (The endpoint.* is a raw property view of what is going through the
  serializer and deserializer, the message.* is what is seen by the
  message broker from a POJO sense of each message).
  
  Pete
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of simonjpalmer
  Sent: Thursday, May 03, 2007 3:21 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Help! Object integrity across
  DataService.commit()
  
  
  
  thanks, that did it, I now have copious debug logs. Onto fence two...
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders

[flexcoders] Re: filter array collection property.

2007-05-04 Thread simonjpalmer
in that case you want a filter function on a ListView representing
your child objects.  To bind it to your combo box you could have
several functions, one for each state and alter the filter function on
the ListView when the combo box contents changes.

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

 OK, I get it. Do you always show all daysAry instances or are they
 themselves filtered?
 
  
 
 At this iteration, they are always displayed.  This should be a fairly
 solid requirement.
 
 
 Confidentiality Notice:  This message including any
 attachments is for the sole use of the intended
 recipient(s) and may contain confidential and privileged
 information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the
 intended recipient, please contact the sender and
 delete any copies of this message.
 
 
 OK, I get it. Do you always show all daysAry instances or are they
 themselves filtered?
 
 --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
ups.com, Ian Skinner ian.skinner@ wrote:
 
  You appear to have a parent child relationship (or at least a
  one-to-many) between daysAry and drawsQry. Are you rendering this
  parent-child in a tree? I can't quite figure out what you are showing
  where.
  
  
  
  Yes, each parent daysAry element has zero to many drawsQry children
  elements. I am not using a tree, but data wise the concept is similar.
  Each parent daysAry elements renders a VBox inside of which the
various
  properties of a daysAry element are displayed, including a series of
  HBoxes for each drawsQry child. It is these HBox children I want
  filtered based on the values of one or another combo box.
  
  
  
  
  
  
  Confidentiality Notice: This message including any
  attachments is for the sole use of the intended
  recipient(s) and may contain confidential and privileged
  information. Any unauthorized review, use, disclosure or
  distribution is prohibited. If you are not the
  intended recipient, please contact the sender and
  delete any copies of this message.
  
  
  You appear to have a parent child relationship (or at least a
  one-to-many) between daysAry and drawsQry. Are you rendering this
  parent-child in a tree? I can't quite figure out what you are showing
  where.
  
  --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com
 ups.com, Ian Skinner ian.skinner@ wrote:
  
   I have a remote object call that returns an array of elements 
   ['daysAry'] each with several properties, including one
['drawsQry'] 
   that is also an array collection. I want my display that is built 
   showing all the daysAry elements with each drawsQry element to be
 able 
   to filter which drawsQry elements are displayed based on a combobox
  value.
   
   I understand I use the filterFunction property to assign a
 function to 
   determine which elements to show. I am not sure how to best set
this 
   property on each and every drawsQry element in the daysAry array 
   collection.
   
   Is it as simple as looping over the daysAry collection in my 
   remoteObject handler and assign the function to each array
collection 
   property. Could I just assign a filter function to the main daysAry 
   collection and inside that function loop over the drawsQry
 property and 
   set something there. Or is there another more elegant solution I am 
   over looking.
   
   Thank You
  
 





[flexcoders] Re: Help! Object integrity across DataService.commit()

2007-05-03 Thread simonjpalmer
Jeff, 

I have fallen at the first fence trying to switch on the debug logs. 
I presumed this happened in the logging section of
services-config.xml, so this is what I did:

logging
target class=flex.messaging.log.ConsoleTarget level=Debug
properties
prefix[Flex] /prefix
includeDatefalse/includeDate
includeTimefalse/includeTime
includeLevelfalse/includeLevel
includeCategoryfalse/includeCategory
/properties
filters
patternEndpoint.*/pattern
patternService.*/pattern
patternConfiguration/pattern
patternDataService.*/pattern
patternMessage.*/pattern
/filters
/target
/logging

then I started my server and did some things through my UI which cause
data to be read/written.  I was watching my server stdout through a
console and saw no additional messages.  So I went to my server log
which is where teh rest of my debug logging shows up to see what I
got.  Unfortunately I have nothing more than I was previously getting.

What have I done wrong?  Where should I be looking?  Have I put the
patterns in the config file correctly?

If you would repfer to take this off flexcoders I can get in touch
directly or you can email me simon.palmer @ gmail.com

Simon

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

 Jeff,
 
 thank you for your response, I realaly appreciate it, this is driving
 me slightly mad and there's a lot in here for me to try.  Thanks also
 for the offer of help decoding the logs, I may well take you up on
 that.  It's going to take me a couple of days to get into a position
 to try this out properly but I will be back...
 
 Regards
 Simon
 
 --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote:
 
  One of the features of Data Management is that the assembler can
modify
  the objects involved in a create or an update.   After the commit,
these
  changes are applied to the managed copy.  One common change made
on the
  server is that during the create the server assigns new ids to the
newly
  created items.   If the assembler does not make any changes, nothing
  should be changed after the commit.  
  
   
  
  So I think the first step would be to turn on the debug level for the
  Message.* and DataService.* patterns in the server logs, and
compare
  the before and after create and update events in the logs. 
For lazy
  associations, the state of the association properties is stored in the
  referencedIds headers in the messages.  For non-lazy
associations, if
  you put toString methods in your DTOs to dump out relevant info
that is
  helpful. 
  
   
  
  One more thing to try that may help.  When the objects have
lazy=true
  (not the default) only the references to objects are updated.  At
most,
  data management has to update references to objects so the instances
  would only change if the ids were changed.  When lazy=false we
  recursively update the object graph for the properties changed
which is
  more involved so you might try adding lazy=true.  In particular,
make
  sure that parent has lazy=true as backptrs tend to perform and
behave
  better when you are not sending the parent's state along with an
update
  of the child.  This does sometimes mean you have to catch and ignore
  ItemPendingErrors but usually this doesn't happen for parents. 
  
   
  
  If you could use help analyzing the logs, send them along.  Sometimes
  the client side debug log is useful in these situations too
  (mx:TraceTarget/).
  
   
  
  Jeff 
  
   
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of simonjpalmer
  Sent: Tuesday, April 17, 2007 7:20 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Help! Object integrity across
DataService.commit()
  
   
  
  I seem to be getting object instances changing across a commit()
  boundary. Half the object ID's change through a commit for no
  apparent reason. This means I have no capability to manage a
  parent-child relationship in data. Utter disaster!
  
  Here's the situation. I have a parent child hierarchy of objects,
  from the root to the leaves:
  PO
  PP
  SS
  SC
  OP
  So PO's contain PP's, PP's contain SS's and so forth.
  
  I converse with a single data service which delivers a set of PO's and
  the PP's are thereafter lazily loaded. I don't break the dataservice
  or object model anywhere below that, so a PP is treated as a single
  entity and read and written as such with its entire sub-graph of
  objects.
  
  I have two destinations, one for PO's and one for PP's and this all
  works fine.
  
  However, when I create a graph such as the one above and commit it to
  the server through the PO destination I have different object
  instances for SS, SC and OP's after the call to commit returns.
  
  This is a problem

[flexcoders] Re: Help! Object integrity across DataService.commit()

2007-05-03 Thread simonjpalmer
thanks, that did it, I now have copious debug logs.  Onto fence two...

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

 That certainly looks right to me.  That version of ConsoleTarget just
 uses the System.out to print messages so you might look around to see if
 they are going into a separate log file.  You might try changing
 ConsoleTarget to ServletLogTarget which uses the Servlet's log method.
 That sometimes works better on app servers which like to redirect
 System.out to some other log file.  
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Thursday, May 03, 2007 10:41 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Help! Object integrity across
 DataService.commit()
 
  
 
 Jeff, 
 
 I have fallen at the first fence trying to switch on the debug logs. 
 I presumed this happened in the logging section of
 services-config.xml, so this is what I did:
 
 logging
 target class=flex.messaging.log.ConsoleTarget level=Debug
 properties
 prefix[Flex] /prefix
 includeDatefalse/includeDate
 includeTimefalse/includeTime
 includeLevelfalse/includeLevel
 includeCategoryfalse/includeCategory
 /properties
 filters
 patternEndpoint.*/pattern
 patternService.*/pattern
 patternConfiguration/pattern
 patternDataService.*/pattern
 patternMessage.*/pattern
 /filters
 /target
 /logging
 
 then I started my server and did some things through my UI which cause
 data to be read/written. I was watching my server stdout through a
 console and saw no additional messages. So I went to my server log
 which is where teh rest of my debug logging shows up to see what I
 got. Unfortunately I have nothing more than I was previously getting.
 
 What have I done wrong? Where should I be looking? Have I put the
 patterns in the config file correctly?
 
 If you would repfer to take this off flexcoders I can get in touch
 directly or you can email me simon.palmer @ gmail.com
 
 Simon
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , simonjpalmer simonjpalmer@
 wrote:
 
  Jeff,
  
  thank you for your response, I realaly appreciate it, this is driving
  me slightly mad and there's a lot in here for me to try. Thanks also
  for the offer of help decoding the logs, I may well take you up on
  that. It's going to take me a couple of days to get into a position
  to try this out properly but I will be back...
  
  Regards
  Simon
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , Jeff Vroom jvroom@ wrote:
  
   One of the features of Data Management is that the assembler can
 modify
   the objects involved in a create or an update. After the commit,
 these
   changes are applied to the managed copy. One common change made
 on the
   server is that during the create the server assigns new ids to the
 newly
   created items. If the assembler does not make any changes, nothing
   should be changed after the commit. 
   
   
   
   So I think the first step would be to turn on the debug level for
 the
   Message.* and DataService.* patterns in the server logs, and
 compare
   the before and after create and update events in the logs. 
 For lazy
   associations, the state of the association properties is stored in
 the
   referencedIds headers in the messages. For non-lazy
 associations, if
   you put toString methods in your DTOs to dump out relevant info
 that is
   helpful. 
   
   
   
   One more thing to try that may help. When the objects have
 lazy=true
   (not the default) only the references to objects are updated. At
 most,
   data management has to update references to objects so the instances
   would only change if the ids were changed. When lazy=false we
   recursively update the object graph for the properties changed
 which is
   more involved so you might try adding lazy=true. In particular,
 make
   sure that parent has lazy=true as backptrs tend to perform and
 behave
   better when you are not sending the parent's state along with an
 update
   of the child. This does sometimes mean you have to catch and ignore
   ItemPendingErrors but usually this doesn't happen for parents. 
   
   
   
   If you could use help analyzing the logs, send them along. Sometimes
   the client side debug log is useful in these situations too
   (mx:TraceTarget/).
   
   
   
   Jeff 
   
   
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
   Behalf Of simonjpalmer
   Sent: Tuesday, April 17, 2007 7:20 AM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 
   Subject: [flexcoders] Help! Object integrity across
 DataService.commit()
   
   
   
   I seem to be getting object instances changing across a commit()
   boundary. Half the object ID's change through a commit for no
   apparent reason

[flexcoders] Re: Help! Object integrity across DataService.commit()

2007-05-02 Thread simonjpalmer
Jeff,

thank you for your response, I realaly appreciate it, this is driving
me slightly mad and there's a lot in here for me to try.  Thanks also
for the offer of help decoding the logs, I may well take you up on
that.  It's going to take me a couple of days to get into a position
to try this out properly but I will be back...

Regards
Simon

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

 One of the features of Data Management is that the assembler can modify
 the objects involved in a create or an update.   After the commit, these
 changes are applied to the managed copy.  One common change made on the
 server is that during the create the server assigns new ids to the newly
 created items.   If the assembler does not make any changes, nothing
 should be changed after the commit.  
 
  
 
 So I think the first step would be to turn on the debug level for the
 Message.* and DataService.* patterns in the server logs, and compare
 the before and after create and update events in the logs.  For lazy
 associations, the state of the association properties is stored in the
 referencedIds headers in the messages.  For non-lazy associations, if
 you put toString methods in your DTOs to dump out relevant info that is
 helpful. 
 
  
 
 One more thing to try that may help.  When the objects have lazy=true
 (not the default) only the references to objects are updated.  At most,
 data management has to update references to objects so the instances
 would only change if the ids were changed.  When lazy=false we
 recursively update the object graph for the properties changed which is
 more involved so you might try adding lazy=true.  In particular, make
 sure that parent has lazy=true as backptrs tend to perform and behave
 better when you are not sending the parent's state along with an update
 of the child.  This does sometimes mean you have to catch and ignore
 ItemPendingErrors but usually this doesn't happen for parents. 
 
  
 
 If you could use help analyzing the logs, send them along.  Sometimes
 the client side debug log is useful in these situations too
 (mx:TraceTarget/).
 
  
 
 Jeff 
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Tuesday, April 17, 2007 7:20 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Help! Object integrity across DataService.commit()
 
  
 
 I seem to be getting object instances changing across a commit()
 boundary. Half the object ID's change through a commit for no
 apparent reason. This means I have no capability to manage a
 parent-child relationship in data. Utter disaster!
 
 Here's the situation. I have a parent child hierarchy of objects,
 from the root to the leaves:
 PO
 PP
 SS
 SC
 OP
 So PO's contain PP's, PP's contain SS's and so forth.
 
 I converse with a single data service which delivers a set of PO's and
 the PP's are thereafter lazily loaded. I don't break the dataservice
 or object model anywhere below that, so a PP is treated as a single
 entity and read and written as such with its entire sub-graph of
 objects.
 
 I have two destinations, one for PO's and one for PP's and this all
 works fine.
 
 However, when I create a graph such as the one above and commit it to
 the server through the PO destination I have different object
 instances for SS, SC and OP's after the call to commit returns.
 
 This is a problem because there are some properties which are specific
 to the object instance, in particular an object reference to its
 parent. The object instance of the parent is changing across the
 commit boundary.
 
 Before commit everything is joined up nicely as you would expect:
 
 PO @42f2451
 PP @43f3629 parent @42f2451
 SS @4c0ee71 parent @43f3629
 SC @a5d69d1 parent @4c0ee71
 OP @a2f5a01 parent @a5d69d1
 
 after commit these are the same...
 
 PO @42f2451
 PP @43f3629 parent @42f2451
 
 however everything else is different
 
 SS @4c0e151 parent @a94d3d1
 SC @4ba2d31 parent @4c0e151
 OP @new parent @4ba2d31 
 
 what's worse is that the new parent instance of PP held on the new SS
 (i.e. whatever is under @a94d3d1) has itself a null parent reference.
 That means that after the commit my tree below SS is dangling in the
 wind and I cannot find the parentage up to PO!
 
 This is a complete disaster. It effectively means I have no
 bi-directional one-to-many support, e.g. no Parent-Child, the most
 basic of relationships!
 
 Worse, if I traverse down from PO to OP I cannot traverse back up
 again! It goes down one path and up another which ends before it gets
 to PO.
 
 So I have three questions:
 
 What am I doing wrong? 
 How do I prevent my object instances from being screwed around with
 during commit? 
 How do I tell when commit() has finished? Is there an Event I can
 trap for its completion? Then I could at least repair my tree.
 
 very glum...
 
 SP





[flexcoders] Re-post... Help! Object integrity across DataService.commit()

2007-05-01 Thread simonjpalmer
Anyone bold enough to have a look at this one?  It is a real headache
for me and the cause of increasing amounts of BS code to cope with it.
 I would really appreciate some help.

I seem to be getting object instances changing across a commit()
boundary. Half the object ID's change through a commit for no
apparent reason. This means I have no capability to manage a
parent-child relationship in data. Utter disaster!

Here's the situation. I have a parent child hierarchy of objects,
from the root to the leaves:
PO
PP
SS
SC
OP
So PO's contain PP's, PP's contain SS's and so forth.

I converse with a single data service which delivers a set of PO's and
the PP's are thereafter lazily loaded. I don't break the dataservice
or object model anywhere below that, so a PP is treated as a single
entity and read and written as such with its entire sub-graph of objects.

I have two destinations, one for PO's and one for PP's and this all
works fine.

However, when I create a graph such as the one above and commit it to
the server through the PO destination I have different object
instances for SS, SC and OP's after the call to commit returns.

This is a problem because there are some properties which are specific
to the object instance, in particular an object reference to its
parent. The object instance of the parent is changing across the
commit boundary.

Before commit everything is joined up nicely as you would expect:

PO @42f2451
PP @43f3629 parent @42f2451
SS @4c0ee71 parent @43f3629
SC @a5d69d1 parent @4c0ee71
OP @a2f5a01 parent @a5d69d1

after commit these are the same...

PO @42f2451
PP @43f3629 parent @42f2451

however everything else is different

SS @4c0e151 parent @a94d3d1
SC @4ba2d31 parent @4c0e151
OP @new parent @4ba2d31

what's worse is that the new parent instance of PP held on the new SS
(i.e. whatever is under @a94d3d1) has itself a null parent reference.
That means that after the commit my tree below SS is dangling in the
wind and I cannot find the parentage up to PO!

This is a complete disaster. It effectively means I have no
bi-directional one-to-many support, e.g. no Parent-Child, the most
basic of relationships!

Worse, if I traverse down from PO to OP I cannot traverse back up
again! It goes down one path and up another which ends before it gets
to PO.

So I have three questions:

What am I doing wrong?
How do I prevent my object instances from being screwed around with
during commit?
How do I tell when commit() has finished? Is there an Event I can
trap for its completion? Then I could at least repair my tree.

very glum...

SP



[flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?

2007-05-01 Thread simonjpalmer
isn't that what the previous message button is for ;-)

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

 
 
 Tom Chiverton wrote:
  On Monday 30 Apr 2007, emendezgonzalez wrote:

  Just an idea,
  
 
  Why would you want to do it though ?
 

 When editing out content, can you keep the context of the previous 
 message? I have no idea what this one is about :)





[flexcoders] Re: FDS licensing

2007-05-01 Thread simonjpalmer
Oh boy, do I feel your pain...

1) Without breaking the licensing agreement I don't see any way round it
2) It is a potentially very valuable piece of technology, but I am
increasingly questioning it, especially as it is is largely unproven
and still pretty wobbly (and confusing).  It will be interesting to
see if Adobe have sharpened it all up with LCDS which is currently in
beta. I hope so.  meanwhile I am engineering its demise in our
solution as soon as we have the absolute necessity to go above a
single CPU.
3) There are some alternatives floating around.  I suspect that a lot
of people (myself included) will go back to their server roots and
handle this all through HTTP.  If you have any existing investment in
that technology on your server it is almost certainly worth pursuing
that route.  FDS/LCDS promises a lot but between the pricing and the
opacity it is a hard call to make.

Personally I think that the CPU based pricing is ridiculous and is
going to prevent the broad uptake of what could be a real
differentiator for Adobe of they got it right.  Like you I have an
impossible task justifying the cost and I can't just pass it on to my
customers so it cuts directly into my margin.  I wouldn't mind so much
if it was solid and proven, but it isn't.  This whole problem stands
out like a sore thumb for me in what is otherwise a truly excellent
platform.

Or maybe Adobe are just going to make it all open source and therefore
un-licensable.  With Microsoft looming, that may not be such a silly
proposition.

There have been other similar discussions on this board but nobody
from Adobe has had much to say about it.  I suspect talking about
pricing on a technical board such as this is a no-no.  However for
those of us wearing architect and technologist hats it is a very
relevant point and I'd love to hear from Product Management.

Simon

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

 I'm having a real tough time justifying the licensing costs of FDS. I 
 know it's free for single CPU, but the big jump (10k/cpu) for a
 multi-cpu license effectively kills this for me.
 
 I'm curious about:
  1) How other folks have got around this?
  2) Or do you just not use FDS mostly?
  3) Or any other cheaper alternatives?
 
 thanx
 -jb





[flexcoders] Re: FDS licensing

2007-05-01 Thread simonjpalmer
Thanks for chipping in Matt, I appreciate your input, and I hope I
have not offended Adobe PM by suggesting that they have been quiet.  

However, talk to the sales rep is a step that I don't believe many
people will get to, especially the smaller dev shops.  John and I seem
to be in similar positions as technology evangelists strongly selling
the merits of RIA and especially Flex but having to tack onto the end
of our pitch oh by the way it costs 750/developer for the IDE and
10k/CPU when we put it into production, so someone had better call
Adobe  It's hard to get the conversation past that.

And I'm not suggesting you are trying to rip anyone off.  I also
appreciate that Adobe is not a charity and has to make money like the
rest of us, I just think as it stands you have a prohibitively
expensive pricing policy based on a model which has been shown to be
unfavourable both for my customer and me as a vendor (Adobe are not
the first people to have a CPU based pricing policy for server
components).  It would be naive to believe that it is not excluding a
portion of the software development community and a big ask that
everyone who does evaulation contacts a sales rep.  

Like you I think you have a useful and compelling offering otherwise I
wouldn't be placing a large bet on it.  The reality though is that I
am going to have to switch away from FDS/LCDS precisely because of the
effect on my bottom line.  Adobe can choose to ignore that, but I
doubt I am alone.

Simon

PS Anecdotally, my attempts at negotiating with the Adobe reps has not
been an accommodating experience where they are interested in the
merits of my solution, but rather one about the Adobe pricing policy
(and their sales targets).  And that is exactly what I would expect of
a software salesperson, so I am not criticising that, just stating the
practical reality.  I have no negotiating position.

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

 So I'm one of the Product Managers and we've said this repeatedly on the
 forums, if you have a use-case and the price is an issue, talk to our
 sales reps and see if something can be worked out.  We're not trying to
 be in the business of ripping anyone off, and we believe we have an
 offering that is useful and compelling.  We are always evaluating
 pricing and distributions and will continue to do so, but I have no news
 about changes right now.
  
 Matt
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Tuesday, May 01, 2007 10:47 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: FDS licensing
 
 
 
 Oh boy, do I feel your pain...
 
 1) Without breaking the licensing agreement I don't see any way round it
 2) It is a potentially very valuable piece of technology, but I am
 increasingly questioning it, especially as it is is largely unproven
 and still pretty wobbly (and confusing). It will be interesting to
 see if Adobe have sharpened it all up with LCDS which is currently in
 beta. I hope so. meanwhile I am engineering its demise in our
 solution as soon as we have the absolute necessity to go above a
 single CPU.
 3) There are some alternatives floating around. I suspect that a lot
 of people (myself included) will go back to their server roots and
 handle this all through HTTP. If you have any existing investment in
 that technology on your server it is almost certainly worth pursuing
 that route. FDS/LCDS promises a lot but between the pricing and the
 opacity it is a hard call to make.
 
 Personally I think that the CPU based pricing is ridiculous and is
 going to prevent the broad uptake of what could be a real
 differentiator for Adobe of they got it right. Like you I have an
 impossible task justifying the cost and I can't just pass it on to my
 customers so it cuts directly into my margin. I wouldn't mind so much
 if it was solid and proven, but it isn't. This whole problem stands
 out like a sore thumb for me in what is otherwise a truly excellent
 platform.
 
 Or maybe Adobe are just going to make it all open source and therefore
 un-licensable. With Microsoft looming, that may not be such a silly
 proposition.
 
 There have been other similar discussions on this board but nobody
 from Adobe has had much to say about it. I suspect talking about
 pricing on a technical board such as this is a no-no. However for
 those of us wearing architect and technologist hats it is a very
 relevant point and I'd love to hear from Product Management.
 
 Simon
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , johnypboyd johnypboyd@ wrote:
 
  I'm having a real tough time justifying the licensing costs of FDS. I 
  know it's free for single CPU, but the big jump (10k/cpu) for a
  multi-cpu license effectively kills this for me.
  
  I'm curious about:
  1) How other folks have got around this?
  2) Or do you just not use FDS mostly?
  3) Or any other

[flexcoders] Re: Formattin dates in DataGrid with itemRenderer

2007-04-30 Thread simonjpalmer
what's wrong with your current method?  I think that is exactly the
way to do it.

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

 Hello all...
 
 I need your advices once more time.
 
 I need to format some dates in a datagrid, data comes in MMDD
 format, and I have to show as DD/MM/ date. I've read some articles
 about this, but I do not manage to understand too much.
 
 I'm using a custom DataGridItemRenderer extension Class, overriding
 set text function and, at this moment, it works fine, but I'm quite
 sure that better ways exist.
 
 Has someone used some better method?
 
 
 
 Thankyou very much for your help.
 
 
 
 J Pablo





[flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?

2007-04-30 Thread simonjpalmer
...and therein lies another horrible truth, the MBP hardware is a
winner, OS/X is not.  I myself am using a MBP and it is awesome, but
guess what, I'm not using OS/X (although I return for doses of
sanity).  My anecdotal study of the three Starbucks in walking
distance from my house shows 75% of people with MBP's.  Closer
inspection reveals 90% running Windows.  Bottom line is that (normal)
people don't really care what software they are running as long as it
is good enough, and Windows has made this a reality by ubiquity, not
excellence.  It is shameful that you need so much processing power
just for the operating system, it is lazy coding, but who really
cares?  Ask your Mum/Mom whether she is bothered whether she uses
flash or silverlight.

And the previous poster was right, Microsoft do live in their own
bubble and their intellectual protectionism is shocking, especially to
a European mindset (why don't they just participate rather than trying
to own absolutely everything?).  However, when your bubble includes
85% of all computers ever built, it is understandable that life
outside the bubble may seem somewhat irrelevant, especially if your
goals are commercial rather than principled, which Microsoft's
undoubtedly are.

However, they do have a serious credibility issue in the software
development community as this thread (and our avid support of Flash)
is a minor testimony to.  When I'm placing a trust bet I don't choose
Microsoft.  As a result I don't think Microsoft are going to retain
their position of dominance forever as more and more becomes available
through open source initiatives.  But the Microsoft monster is here
for now and it is smarter as a commercial software developer to use
the fact to your advantage than to stubbornly attempt to ignore the
reality.  

And speaking of the tao of programming, I think the only haiku worth
remembering in commercial software is that best never wins, and
neither does first.  As a species we are optimised for compromise,
evolution insists on it.


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

 Bjorn Schultheiss wrote:
  
  
  I am of the same opinion.
  
  At the recent WebDU conference I spotted 1 presenter with a PC
notebook, 
  all the rest were macbooks. 
 
 Yeah, I was using Windows on my MBP ;-)
 
  I am quite a fan of a lot of non-windows based software, and i enjoy 
  building flash-based applications that can be deployed on either OS.
 
 Indeed! Developing GUI components for Windows is fun too, though. 
 Creating Grid components and such!
 
 Yours,
 Weyert de Boer





[flexcoders] Re: where do I go to get the com.adobe.ac.mxeffects package?

2007-04-29 Thread simonjpalmer
Thanks Dave,

My flex version is 2.0.143459, does that sound right?

I downloaded the zip file from this blog - which all looks excellent -
and naively presumed that the enclosed swc would contain what I
needed.  I have put it in my project's library path and I get some
strange compile errors when I do that.  Do I need to incorporate the
source files into my project?

Thanks
Simon

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

 Assuming you're using Flex 2.0.1 (because this is the updated package),
 you're looking for the Distortion Effects found here:
 
 http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects.zip
 
 And here's the supporting blog entry for how to use them:
 

http://weblogs.macromedia.com/auhlmann/archives/2007/03/distortion_effe.cfm
 
 They are not part of the standard Flex framework.
 
 Regards,
 Dave.
 Cynergy Systems, Inc.
 
 
 On 4/28/07, simonjpalmer [EMAIL PROTECTED] wrote:
 
probably a bit of a newbie question, but I don't appear to have this
  library anywhere and I'm wondering if it is a standard part of flex or
  whether I have to go and grab it from somewhere.
 
  Can anyone point me in the right direction?
 
  Thanks
  Simon
 
  
 





[flexcoders] Re: Where is the data stored..?

2007-04-29 Thread simonjpalmer
My bet is that it is not in the datagrid at all but in the result
object from your dataservice request, i.e. it belongs to
teachernameRequest.lastResult.  Is either teacherlist or teacherid an
array (one of them must be)?  If you were to make an explicitly typed
model on your client side it would probably be quite obvious where the
data resided.

For this type of issue I have found it a more useful model to think of
controls like the datagrid, lists, comboboxes, etc as renderers rather
than custodians of data.  It also seems to fit with the renderer
pattern to displaying data which permeates flex.

Hope that helps.
SP

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

 Hi All,
 
 I am populating a datagrid with 
 dataProvider={teachernameRequest.lastResult.teacherlist.teacherid}
 
 The data provider is, id=teachernameRequest
 url=http://192.168.0.5/amfphp/services/teachername.php;  method=POST
 
 
 The datagrid shows the data from a Mysql db fine.
 
 I have not created an array to hold the returned data nor have I used
 e4x, it mearly appears to be populating the datagrid directly.
 
 My question is:
 What property (or attribute) in the datagrid is actually holding the
 data???
 
 
 TIA
 Danny





[flexcoders] Re: where do I go to get the com.adobe.ac.mxeffects package?

2007-04-29 Thread simonjpalmer
...wait, cracked it...

I didn't have the updater installed.  All works fine now.

Awesome effects...

Thanks for your help.

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

 Thanks Dave,
 
 My flex version is 2.0.143459, does that sound right?
 
 I downloaded the zip file from this blog - which all looks excellent -
 and naively presumed that the enclosed swc would contain what I
 needed.  I have put it in my project's library path and I get some
 strange compile errors when I do that.  Do I need to incorporate the
 source files into my project?
 
 Thanks
 Simon
 
 --- In flexcoders@yahoogroups.com, Dave Carabetta dcarabetta@
 wrote:
 
  Assuming you're using Flex 2.0.1 (because this is the updated
package),
  you're looking for the Distortion Effects found here:
  
  http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects.zip
  
  And here's the supporting blog entry for how to use them:
  
 

http://weblogs.macromedia.com/auhlmann/archives/2007/03/distortion_effe.cfm
  
  They are not part of the standard Flex framework.
  
  Regards,
  Dave.
  Cynergy Systems, Inc.
  
  
  On 4/28/07, simonjpalmer simonjpalmer@ wrote:
  
 probably a bit of a newbie question, but I don't appear to
have this
   library anywhere and I'm wondering if it is a standard part of
flex or
   whether I have to go and grab it from somewhere.
  
   Can anyone point me in the right direction?
  
   Thanks
   Simon
  
   
  
 





[flexcoders] Re: Will Microsoft's new Silverlight Player Kill our beloved Flex ?

2007-04-29 Thread simonjpalmer
Does C# kill Java?
Does IE kill Firefox?
Does SQLServer kill Oracle?
Does Windows kill UNIX?
Will Silverlight kill Flex?

From my 20 odd years of software development, during which time the
Microsoft hegemony has been at its apogee, none of the above are true.
 In fact if you want a really scalable enterprise platform you would
choose the right hand side of the list above rather than the left.  

Where Microsoft win hands down is in Office Applications and desktop
operating systems.  Excel is quite possibly the best piece of desktop
software ever written (Word being the worst) and long may it reign as
such.  Windows is crap, but it's more than good enough for your
average user and most Microsoft desktop products are actually pretty
good (c'mon, be generous).

I regret deeply that the rest of the world doesn't have a house full
of beautiful, stable, simple Macs like I do, but the reality is that
they don't as Jason points out.  Instead the three or four computers
the normal person interacts with in their daily lives are almost
exclusively running Windows (even the ATM machines and tills at the
supermarket).  Not a pleasant truth, but a truth nonetheless.  If you
are looking for broad adoption and commercial success as a software
company you start with Windows.

The wonderful reality, however, is that the software industry, like
all others in the history of human endeavour, thrives on competition
and there is space for more than one company/product/offering to
survive.  Adobe are not going to be Microsoft.  THANK GOD!  They have
and in my opinion will always have, a distinct and separate offering.
 If they can't retain that differentiation then they don't deserve to
remain in business and the market will take care of them.

So this is a bit of a silly thread as far as I am concerned.  The
answer for me is clearly No for all the same reasons that Microsoft
haven't killed any of the other things on the list at the top.  They
might try, but I think they should be more worried about Google and
web based desktop software than Adobe and the flash player.

Simon

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

 
 
 
 Hey Jason,
 
 Even if 90% of internet's users are running Windows, how many  
 millions aren't..
 If you can deploy applications that is guaranteed to only be used by  
 Windows users, well good luck to you.
 
 Here we target creatives in the advertising industry and I don't have  
 that luxury.
 
 
 
 
 Regards,
 
 Bjorn Schultheiss
 Senior Developer
 
 Personalised Communication Power
 
 Level 2, 31 Coventry St.
 South Melbourne 3205,
 VIC Australia
 
 T:  +61 3 9674 7400
 F:  +61 3 9645 9160
 W:  http://www.qdc.net.au
 
 ((This transmission is confidential and intended solely  
 for the person or organization to whom it is addressed. It may  
 contain privileged and confidential information. If you are not the  
 intended recipient, you should not copy, distribute or take any  
 action in reliance on it. If you believe you received this  
 transmission in error, please notify the sender.---))
 
 
 
 One person wrote:
   Everybody uses Windows, almost all the workstations are windows. Macs
   have IE working OK.
 
 Another responded:
  Think again.
 Think again?  What kind of an argument is that?  People keep  
 brining up certain technlogies not working on Mac OS or Linux as a  
 bad thing.  Personally, I've never bought into the, that technology  
 does not support obscure browser X or non-Windows operating system  
 Y and therefore is doomed to fail argument.  As much as I wish it  
 were not true, Microsoft is one example of a company who has time and  
 again developed solutions for Windows only and been quite successful  
 at it.  Not supporting Mac or Linux WILL hurt you a little, but it's  
 still a Windows world (unfortunately) and thus there is a huge market  
 there to tap.   The world is changing, sure, but very very slowly in  
 this regard.
 
 At the same time, I think Silverlight is coming out a little too late  
 - the RIA runtime has already left the barn IMO.
 
 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development
 eTools  Multimedia Team





[flexcoders] where do I go to get the com.adobe.ac.mxeffects package?

2007-04-28 Thread simonjpalmer
probably a bit of a newbie question, but I don't appear to have this
library anywhere and I'm wondering if it is a standard part of flex or
whether I have to go and grab it from somewhere.

Can anyone point me in the right direction?

Thanks
Simon



[flexcoders] Using RPC for an RSS feed reader in an FDS project

2007-04-28 Thread simonjpalmer
I have an FDS app and I want to add an RSS feed reader to the main
page, allowing the user to supply the URL of the feed they want to
display.  I have a nice ticker based feed reader which I developed
separately using an HTTPService.  When I drop it into my fds app I get
all sorts of errors about using proxies.

Some research through the docs would appear to suggest that I need
pre-configured destinations for my HTTPService because I am using FDS.
 That in turn would seem to imply that I can't have customisable URL's
for the feed loactions.  Am I wrong?

How do I go about finding out how to do this?  Anyone tried anything
similar?

Thanks
Simon



[flexcoders] Re: Setting the $title field in index .template.html

2007-04-27 Thread simonjpalmer
Interesting, let me try that out...  not sure if I need more or not.

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

 You can set it via the pageTitle property of the Application tag.  Are 
 you specifically looking for something other than that?
 
 
 --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ 
 wrote:
 
  where do I set the field $title which is referred to at the top of the
  template filed used to generate index.html?
 





[flexcoders] Rotation transition - looking for help

2007-04-27 Thread simonjpalmer
Hi,

I have a view stack with a bubble chart on one page and a set of
controls (sliders etc) on another.  At the moment I have a button
which causes one or the other to be shown and the user can switch back
and forth.

What I am looking for is a sexy transition between the two.  Ideally I
would have the whole display rotate around a vertical line in the
middle of the screen so that it apears that the user is looking at the
back of the display when they are using the controls.

Anyone care to give me a pointer about how I go about this?  I have
been looking at the rotate effect and transitions but am struggling to
make head or tail of it.  What I could do with is a good sample of
something similar.  I am hoping I don;t have to write a huge amount of
custom effect code, although I will go there if necessary.

Thanks
Simon



[flexcoders] Setting the $title field in index .template.html

2007-04-26 Thread simonjpalmer
where do I set the field $title which is referred to at the top of the
template filed used to generate index.html?



[flexcoders] Help! Object integrity across DataService.commit()

2007-04-17 Thread simonjpalmer
I seem to be getting object instances changing across a commit()
boundary.  Half the object ID's change through a commit for no
apparent reason.  This means I have no capability to manage a
parent-child relationship in data.  Utter disaster!

Here's the situation.  I have a parent child hierarchy of objects,
from the root to the leaves:
PO
PP
SS
SC
OP
So PO's contain PP's, PP's contain SS's and so forth.

I converse with a single data service which delivers a set of PO's and
the PP's are thereafter lazily loaded.  I don't break the dataservice
or object model anywhere below that, so a PP is treated as a single
entity and read and written as such with its entire sub-graph of objects.

I have two destinations, one for PO's and one for PP's and this all
works fine.

However, when I create a graph such as the one above and commit it to
the server through the PO destination I have different object
instances for SS, SC and OP's after the call to commit returns.

This is a problem because there are some properties which are specific
to the object instance, in particular an object reference to its
parent.  The object instance of the parent is changing across the
commit boundary.

Before commit everything is joined up nicely as you would expect:

PO @42f2451
PP @43f3629 parent @42f2451
SS @4c0ee71 parent @43f3629
SC @a5d69d1 parent @4c0ee71
OP @a2f5a01 parent @a5d69d1

after commit these are the same...

PO @42f2451
PP @43f3629 parent @42f2451

however everything else is different

SS @4c0e151 parent @a94d3d1
SC @4ba2d31 parent @4c0e151
OP @new parent @4ba2d31 

what's worse is that the new parent instance of PP held on the new SS
(i.e. whatever is under @a94d3d1) has itself a null parent reference.
 That means that after the commit my tree below SS is dangling in the
wind and I cannot find the parentage up to PO!

This is a complete disaster.  It effectively means I have no
bi-directional one-to-many support, e.g. no Parent-Child, the most
basic of relationships!

Worse, if I traverse down from PO to OP I cannot traverse back up
again!  It goes down one path and up another which ends before it gets
to PO.

So I have three questions:

What am I doing wrong?  
How do I prevent my object instances from being screwed around with
during commit?  
How do I tell when commit() has finished?  Is there an Event I can
trap for its completion?  Then I could at least repair my tree.

very glum...

SP



[flexcoders] updateTransform question on BubbleSeries

2007-04-16 Thread simonjpalmer
anyone know what I have to alter to force a BubbleSeries to go through
updateTransform?  

I have a situation where a user action causes the radius of one of my
bubbles to change.  I trap the change and I want to cause the bubble
chart to redraw itself taking into account the new radius.  I can't do
this through raw data binding because of other features of the bubbles
on the chart.

I have tried invalidating all sorts of properties but no luck.

Any clues?



[flexcoders] Re: Grid columns of fixed and equal width

2007-04-15 Thread simonjpalmer
Since you asked so nicely... here's what I understand about column
widths in the datagrid control after some experimentation.

First off it is the width property of the DataGridColumn that I'm
talking about.

If you put a value in the definition of all columns, when they get
rendered the relative size of the column widths is honored, even
through scaling of the width of the grid itself, so the widths seem to
be treated as proportions.

If you leave one or more of them blank the widths are treated as
pixels as far as I can tell.

What I routinely now do is have a numbering scheme for the widths
where I look at the narrowest column, call that, say, 10 then do
everything from there.  Here is a fragment of code from my app which
has nicely proportioned columns which keep their relative proportions
as the window the datagrid is in changes size.

mx:DataGridColumn headerText=Name width=30/
mx:DataGridColumn headerText=Owner width=25/
mx:DataGridColumn headerText=Potential width=15/
mx:DataGridColumn headerText=Target width=12 /
mx:DataGridColumn headerText=% width=10 /
mx:DataGridColumn headerText=Geography width=15/
mx:DataGridColumn headerText=Sector width=15/
mx:DataGridColumn headerText=Product width=15/
mx:DataGridColumn headerText=Currency width=7/
mx:DataGridColumn headerText=Access width=10/

So in your case I would be tempted to try 1, 1 and 1 for your widths
and see what happens.

SP

--- In [EMAIL PROTECTED], Alex Harui [EMAIL PROTECTED] wrote:

 What happened when you gave each column the same fixed width?
 
  
 
 
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of [EMAIL PROTECTED]
 Sent: Friday, April 13, 2007 9:30 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [flexcoders] Grid columns of fixed and equal width
 
  
 
 Pretty please? Even a response telling me that it's a bonehead question
 and I'm a dolt for asking would tell me _something_. ;-)
 
  
 
 Thanks!
 
  
 
 --
 
 Martin Cooper
 
  
 

 
   
 
 
 
   From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
   Sent: Tuesday, April 10, 2007 11:41 AM
   To: [EMAIL PROTECTED]
   Subject: [flexcoders] Grid columns of fixed and equal width
 
   What is the right way to create a Grid that has a fixed number
 of
   columns of equal width?
   
   What I need is a fixed 3-column layout to which I can
 dynamically add
   cells. Regardless of the content of the cells, the column widths
 should
   remain the same. Also, the columns would need to resize when the
 Grid is
   resized. I'm basing this on the Grid layout because I also need
 the
   column spanning capability that Grid gives me.
   
   Any hints would be a great help in getting me going.
   
   For extra bonus points ... what I *really* want is something
 more like
   three VBoxes of equal width, so that the contents are not forced
 to
   align vertically, as with a Grid, but where I also get the
 column
   spanning that a Grid gives me. (This is more like newspaper
 layout,
   except that I don't care about content flowing from one column
 to the
   next.) However working with a Grid will get me going for now.
   
   Thanks very much!
   
   --
   Martin Cooper





[flexcoders] Re: Zooming in on the x-axis of the AreaChart

2007-04-15 Thread simonjpalmer
I'd go straight to Ely's blog...

http://www.quietlyscheming.com/blog/

--- In [EMAIL PROTECTED], {reduxdj} [EMAIL PROTECTED] wrote:

 Is this possible to do?  any examples of this anywhere, thanks?
 
 Patrick





[flexcoders] Re: Dynamically accessing properties of an object

2007-04-15 Thread simonjpalmer
sounds like introspection

take a look at Eric Feminella's site...

http://www.ericfeminella.com/blog/2006/12/08/as3-util-api-available/

--- In [EMAIL PROTECTED], frank_sommers [EMAIL PROTECTED] wrote:

 I'm wondering how to dynamically access the properties of an object.
I've already looked into 
 flash.utils.describeType, which does provide a list of accessors of
an object. What I'd like to 
 be able to do is iterate through that list, and obtain the value of
each accessor (if the 
 property is readable, that is). 
 
 One way I was thinking of doing this was to invoke
flash.utils.getDefinitionByName on the 
 class name + the accessor name, hoping that this would return a
function object that I can 
 invoke on the target object (this is how I would do this in Java,
for instance). However, this 
 doesn't seem to work, as I'm getting an error message to the effect
that the property, e..g, 
 myclass.myProperty, is not defined. 
 
 Any suggestions would be appreciated. 
 
 Thanks, 
 
 -- Frank





[flexcoders] Re: Versioning swf files for bug reporting

2007-04-15 Thread simonjpalmer
'scuse the ignorant question, but what is a CI system?

--- In [EMAIL PROTECTED], bhaq1972 [EMAIL PROTECTED] wrote:

 Thanks Johannes. Can you suggest one. At the moment we just take the 
 bin folder generated by Flexbuilder and copy that to our webservers.
 
 what i was thinking was, if flexbuilder could add a build number 
 into the html wrapper, then we could use an ExternalInterface call 
 to extract that number and show it in our flex apps.
 
 
 --- In [EMAIL PROTECTED], Johannes Nel johannes.nel@ 
 wrote:
 
  why not get a proper CI system going. that will solve many issues 
 you had
  not even noticed you had.
  
  On 12 Apr 2007 06:49:12 -0700, bhaq1972 mbhaque@ wrote:
  
 Is there anything flexbuilder could generate and place into 
 the html
   wrapper 
  
   --- In [EMAIL PROTECTED] flexcoders%
 40yahoogroups.com, Tom
   Chiverton tom.chiverton@
  
   wrote:
   
On Thursday 12 Apr 2007, simonjpalmer wrote:
 Does anyone have a good practice for holding version numbers 
 in
   a flex
 swf file for display to the user and magically incrementing 
 them
   as
 part of the build process?
   
We had ColdFusion generate the HTML wrapper page.
It looked up the SVN revision and branch/tag information, and 
 put
   that in the
HTML title tag.
   
--
Tom Chiverton
Helping to preemptively empower B2B portals
on: http://thefalken.livejournal.com
   

   
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 St James's Court Brown Street Manchester M2
   2JF. 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
   Law Society.
   
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 8008.
   
For more information about Halliwells LLP visit 
 www.halliwells.com.
   
  

  
  
  
  
  -- 
  j:pn
  http://www.lennel.org
 





[flexcoders] Re: Bubble Charts (size of the bubble)

2007-04-15 Thread simonjpalmer
check your yahoo account

--- In [EMAIL PROTECTED], gaurav1146 [EMAIL PROTECTED] wrote:

 Please mail me the overloaded bubble series class. My email address is
 gaurav1146 at yahoo.com
 TIA 
 Gaurav
 
 --- In [EMAIL PROTECTED], simonjpalmer simonjpalmer@
 wrote:
 
  I think it would be illuminating for you to set a breakpoint in the
  updateTransform method of the BubbleSeries class and check out what
  flex is doing with renderData.filteredCache.  This is what it uses to
  compute the bubble sizes.
  
  You are right, there is no min bubble size, and the basic transform
  scales the radius, not the area of the bubble, which I find very
  misleading.  What it means is that two bubbles that are a factor of
  two different in terms of their radiusField value are actually 4 times
  different in area.  This confused the hell out of our users and was
  logged against us as a bug.
  
  I can share an overloaded bubbleseries class with you that I have
  adjusted to have a min bubble size and which scales the area according
  to the radiusField and not the radius.  Ely Greenfield deserves a
  mention here for helping me out with it.
  
  Let me know if you want the class and I'll email it to you.
  
  SP
  
  --- In [EMAIL PROTECTED], gaurav1146 gaurav1146@ wrote:
  
   What you say seems fine that the size of bubbles should change based
   on the data set that is displayed. But the problem is that the
size of
   all the bubbles that are on display after the slide do not change.
   Lets say if initially 6 bubbles were displayed on the chart and
after
   the slide motion only 3 are displayed. Then what is happening is
that
   in remaining 3, the sizes of only 1 or 2 bubbles change while
the size
   of one of them may remain totally unaffected by the slide. Also the
   size changes are drastic such that even big bubbles are reduced to
   nearly point sized bubbles.
   
   I do have a maxRadius set up im my bubbleSeries but there seems
to be
   no option for minRadius.
   
   TIA 
   Gaurav
   
   --- In [EMAIL PROTECTED], simonjpalmer simonjpalmer@
   wrote:
   
do you have the same set of bubbles visible after your slider
magnification as before?  

The default bubbleseries sizes the bubbles *that are displayed*
relative to one another based on the radius field (the series
has a
display list that it uses for sizing).  

If you add or remove bubbles the relative sizes of the remaining
bubbles change.  They still refer to the radius field, but because
they are a different set they will have different proportions.

Do you have max and min bubble sizes set?

--- In [EMAIL PROTECTED], gaurav1146 gaurav1146@
wrote:

 Hi,
  I have created a chart which consists of LineSeries and bubble
  series
 something like
  mx:CartesianChart
     
  mx:Seriesmx:LineSeries../mx:BubbleSeries
//mx:Series 
  /mx:CartesianChart  
 
  The sizes of the bubble initially displayed proportionately
  based on
 the radiusField in the BubbleSeries. But, now I have added a
 HSlider
 based of which a user can see/magnify different section of the
  chart. 
 Based on position of the slider I slice the ArrayCollection that
 provides data to the series.
 But, the problem after adding the slider is that the bubble
sizes
 sometimes do not appear proportionate to the radiusField of the
  bubble
 series. I could not figure out the reason for this. Any help
  would be
 greatly appreciated.
 TIA
 Gaurav

   
  
 





[flexcoders] Versioning swf files for bug reporting

2007-04-12 Thread simonjpalmer
Does anyone have a good practice for holding version numbers in a flex
swf file for display to the user and magically incrementing them as
part of the build process?

What I am looking for is suggestions about automatic incrementing of a
piece of a version number, say major.minor.build, where the build
number gets incremented when I compile (or perform some custom
increment build number step) and then the version is visible
somewhere in the UI so I can check what version people are running
when they report issues.  I can show a string in the UI, it's the
automatic update I'm looking for suggestions on.

Anyone done this and have a good mechanism?

While I'm on the topic, does anyone have an example of an ANT script
to do a similar thing to an XML file in a Java project?

Cheers
SP



[flexcoders] Re: Removing compiler problem markers?

2007-04-12 Thread simonjpalmer
Hate to be the one to suggest it, but does it persst if you close and
re-start Eclipse?

I find that I get a high degree of instability in Eclipse if I switch
between the Flex Builder perspective (especially in design mode) and a
Java perspective such as the debugger or J2EE.

I often get permgen errors and abnormal termination which leave the
Eclipse project locked and require a re-boot to free.  Occasionally I
get out of memory errors (in spite of a huge VM allocation to Eclipse)
and I seem to lose all my workspace perspective settings.

Quite often I get very weird compiler errors from the MXML compiler
which are bogus and only go away after a clean, close Eclipse,
re-open, re-save file in question, re-build.

I hope yours is as simple as re-starting Eclipse.

--- In [EMAIL PROTECTED], Steve Kellogg [EMAIL PROTECTED] wrote:

 Hello,
 
  
 
 All of the sudden, I'm getting a bunch of these errors when I try to
 compile..
 
  
 
 Removing compiler problem markers (time of error:  xxx)
 
  
 
 And then, An internal error occurred during Removing compiler problem
 markers.
 
 Java.lang.NullPointerException
 
  
 
 
 
 Does anyone know the proper solution?  So far, a CLEAN has not helped.
 
  
 
 TIA
 
  
 
 Steve





[flexcoders] swf player file name

2007-04-12 Thread simonjpalmer
anyone know what the swf player file name is that forms the file
association on Windows?  



[flexcoders] Re: Bubble Charts (size of the bubble)

2007-04-12 Thread simonjpalmer
do you have the same set of bubbles visible after your slider
magnification as before?  

The default bubbleseries sizes the bubbles *that are displayed*
relative to one another based on the radius field (the series has a
display list that it uses for sizing).  

If you add or remove bubbles the relative sizes of the remaining
bubbles change.  They still refer to the radius field, but because
they are a different set they will have different proportions.

Do you have max and min bubble sizes set?

--- In [EMAIL PROTECTED], gaurav1146 [EMAIL PROTECTED] wrote:

 Hi,
  I have created a chart which consists of LineSeries and bubble series
 something like
  mx:CartesianChart
     
  mx:Seriesmx:LineSeries../mx:BubbleSeries //mx:Series 
  /mx:CartesianChart  
 
  The sizes of the bubble initially displayed proportionately based on
 the radiusField in the BubbleSeries. But, now I have added a HSlider
 based of which a user can see/magnify different section of the chart. 
 Based on position of the slider I slice the ArrayCollection that
 provides data to the series.
 But, the problem after adding the slider is that the bubble sizes
 sometimes do not appear proportionate to the radiusField of the bubble
 series. I could not figure out the reason for this. Any help would be
 greatly appreciated.
 TIA
 Gaurav





[flexcoders] Re: Removing compiler problem markers?

2007-04-12 Thread simonjpalmer
thanks Tom, been wondering how I could do that without resorting to
such a Dickensian measure as a reboot.  Incidentally out of
frustration I decided to get rid of some Eclipse plug-ins and one in
particular seems to have altered my startup times and (so far)
stability.  Not wishing to point fingers, but it was a Hibernate code
generator...

--- In [EMAIL PROTECTED], Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Thursday 12 Apr 2007, simonjpalmer wrote:
  I often get permgen errors and abnormal termination which leave the
  Eclipse project locked and require a re-boot to free.  Occasionally I
 
 Of your whole box ?
 That shouldn't be needed - just make sure all the Eclipse process'
have gone, 
 and remove the lock file (in workspace/.metadata iirc) by hand.
 
 -- 
 Tom Chiverton
 Helping to elementarily aggregate virtual content
 on: http://thefalken.livejournal.com
 
 
 
 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 St James's Court Brown Street Manchester M2 2JF.
 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 Law Society.
 
 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 8008.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Re: FDS example

2007-04-12 Thread simonjpalmer
Don't have an example which is neatly wrapped up, but do have a
successful fds deployment.  What have you so far tried?  Have you been
to Conraet's blog and followed any of teh samples there?  It is a good
primer.

http://www.coenraets.org/blog/

--- In [EMAIL PROTECTED], Robs [EMAIL PROTECTED] wrote:

 Hi all,
   Does anyone have a good example of a FDS application with proper 
 deployment instructions? I've just started with it  am finding some 
 things a bit confusing.
   PLease help !
 
 Regards,
 Robi.





[flexcoders] Re: user configuration file

2007-04-12 Thread simonjpalmer
check out flex sharedobject

--- In [EMAIL PROTECTED], lruinelli [EMAIL PROTECTED] wrote:

 Hello!
 
 I'm developing an application which need some configuration parameter
 to run correctly. E.g. the url of servlet used change frequently (the
 application is in develop!)...and I have to update every time all the
 MXML file and recompile the application:-(
 ...in desktop win application for this kind of configuration I usually
 use somthing like file .ini where I put my configuration, wich are
 loaded by the application:
 e.g.
 config.ini:
 SERVLET_PATH=http://localhost:8080/servlethome/
 
 what is the flex-as best pratices for this kind of stuff?
 
 
 thanks
 Lorenzo





[flexcoders] Re: swf player file name

2007-04-12 Thread simonjpalmer
yes, exactly!  thanks very much.  It was the flashplayer.exe that I
was really looking for.

--- In [EMAIL PROTECTED], Muzak [EMAIL PROTECTED] wrote:

 You mean the executable that is used to display swf files when you
open them?
 If so, it depends on which editor you installed last.
 
 You can check file type associations by going to:
 Control Panel -- Folder Options -- select the File Types tab,
then look for the swf file type, select it and click Advanced
 Select Open from the actions list, click Edit to see the path to
the executable.
 
 Should be something like:
 (if FCS3 is the last editor you installed):
 C:\Program Files\Adobe\Adobe Flash CS3\Players\FlashPlayer.exe
 
 (if Flex Builder 2 is the last editor you installed)
 C:\Program Files\Adobe\Flex Builder 2\Player\debug\SAFlashPlayer.exe
 
 (if Flash 8 is the last editor you installed)
 C:\Program Files\Macromedia\Flash 8\Players\SAFlashPlayer.exe
 or
 C:\Program Files\Macromedia\Flash 8\Players\Debug\SAFlashPlayer.exe
 
 Is this what you're after?
 
 regards,
 Muzak
 
 - Original Message - 
 From: simonjpalmer [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, April 12, 2007 12:47 PM
 Subject: [flexcoders] swf player file name
 
 
 anyone know what the swf player file name is that forms the file
 association on Windows?





[flexcoders] Re: Bubble Charts (size of the bubble)

2007-04-12 Thread simonjpalmer
I think it would be illuminating for you to set a breakpoint in the
updateTransform method of the BubbleSeries class and check out what
flex is doing with renderData.filteredCache.  This is what it uses to
compute the bubble sizes.

You are right, there is no min bubble size, and the basic transform
scales the radius, not the area of the bubble, which I find very
misleading.  What it means is that two bubbles that are a factor of
two different in terms of their radiusField value are actually 4 times
different in area.  This confused the hell out of our users and was
logged against us as a bug.

I can share an overloaded bubbleseries class with you that I have
adjusted to have a min bubble size and which scales the area according
to the radiusField and not the radius.  Ely Greenfield deserves a
mention here for helping me out with it.

Let me know if you want the class and I'll email it to you.

SP

--- In [EMAIL PROTECTED], gaurav1146 [EMAIL PROTECTED] wrote:

 What you say seems fine that the size of bubbles should change based
 on the data set that is displayed. But the problem is that the size of
 all the bubbles that are on display after the slide do not change.
 Lets say if initially 6 bubbles were displayed on the chart and after
 the slide motion only 3 are displayed. Then what is happening is that
 in remaining 3, the sizes of only 1 or 2 bubbles change while the size
 of one of them may remain totally unaffected by the slide. Also the
 size changes are drastic such that even big bubbles are reduced to
 nearly point sized bubbles.
 
 I do have a maxRadius set up im my bubbleSeries but there seems to be
 no option for minRadius.
 
 TIA 
 Gaurav
 
 --- In [EMAIL PROTECTED], simonjpalmer simonjpalmer@
 wrote:
 
  do you have the same set of bubbles visible after your slider
  magnification as before?  
  
  The default bubbleseries sizes the bubbles *that are displayed*
  relative to one another based on the radius field (the series has a
  display list that it uses for sizing).  
  
  If you add or remove bubbles the relative sizes of the remaining
  bubbles change.  They still refer to the radius field, but because
  they are a different set they will have different proportions.
  
  Do you have max and min bubble sizes set?
  
  --- In [EMAIL PROTECTED], gaurav1146 gaurav1146@ wrote:
  
   Hi,
I have created a chart which consists of LineSeries and bubble
series
   something like
mx:CartesianChart
   
mx:Seriesmx:LineSeries../mx:BubbleSeries //mx:Series 
/mx:CartesianChart  
   
The sizes of the bubble initially displayed proportionately
based on
   the radiusField in the BubbleSeries. But, now I have added a HSlider
   based of which a user can see/magnify different section of the
chart. 
   Based on position of the slider I slice the ArrayCollection that
   provides data to the series.
   But, the problem after adding the slider is that the bubble sizes
   sometimes do not appear proportionate to the radiusField of the
bubble
   series. I could not figure out the reason for this. Any help
would be
   greatly appreciated.
   TIA
   Gaurav
  
 





[flexcoders] Re: Versioning swf files for bug reporting

2007-04-12 Thread simonjpalmer
wouldn't that be nice!  Got anything in mind?

I'd settle for an ANT task run from Eclipse which updated an XMl file
or something.  I was hoping that someone may have stepped in with an
example to save me having to go and learn ANT.

Nothing forthcoming... yet...

--- In [EMAIL PROTECTED], bhaq1972 [EMAIL PROTECTED] wrote:

 Is there anything flexbuilder could generate and place into the html 
 wrapper 
 
 --- In [EMAIL PROTECTED], Tom Chiverton tom.chiverton@ 
 wrote:
 
  On Thursday 12 Apr 2007, simonjpalmer wrote:
   Does anyone have a good practice for holding version numbers in 
 a flex
   swf file for display to the user and magically incrementing them 
 as
   part of the build process?
  
  We had ColdFusion generate the HTML wrapper page. 
  It looked up the SVN revision and branch/tag information, and put 
 that in the 
  HTML title tag.
  
  -- 
  Tom Chiverton
  Helping to preemptively empower B2B portals
  on: http://thefalken.livejournal.com
  
  
  
  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 St James's Court Brown Street Manchester M2 
 2JF.  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 
 Law Society.
  
  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 8008.
  
  For more information about Halliwells LLP visit www.halliwells.com.
 





[flexcoders] Bubble charts with only one bubble

2007-04-12 Thread simonjpalmer
Has anyone experienced the problem of a bubble chart with a single
bubble not showing that bubble?  

If I add a second bubble the pair appear, if I remove one of them they
both disappear.

I have been inspecting the contents of the renderData on the
BubbleSeries.  When there is a single data point in the biinding the
cache contains it as a BubbleSeriesItem and the filteredCache is
empty.  The cache value has no x, y, z or itemRenderer set up.

When a second gets added they both appear in the filteredCache and
they have their values populated.

I have tried various hacks like moving data from one to another and
messing around with the x, y and z values myself, all with pretty
disastrous effects.  

It seems too much of an oversight for the bubble chart to not work
with a single bubble, so what am I missing?



[flexcoders] Re: Flex Installation\Compilation Guidelines for AIX OS

2007-04-09 Thread simonjpalmer
I should start by saying that I have not done this with flex, but I
have both lead and been involved in many projects where we have had to
retro-fit to IBM.  The experience has been chastening and it is never
a straighforward task.  Have you got your AIX hardware up and running
with the IBM software actually operating yet?  Have you identified any
expertise either internally or externally who has experience in AIX? 
Have you teased out of your client (or whoever is requesting this
step) whether it stops at AIX or whether you need to go to DB2 and
WebSphere?  If not then go and do that first.

I'm not sure why you would need to compile any flex code under AIX. 
The only reason to do that would be if your clients were running their
browsers on AIX.  Is that the case?  The swf and html you generate in
flex is piped across to the client machine and run there inside the
FlashPlayer, not on the server.  So I don't think you need the Flex
Builder anywhere other than Windows (or maybe Mac if you prefer to
work on a Mac) because your clients are probably running IE on Windows.

As for the server, how you should do it and how hard your job will be
will depend upon the language you have implemented your server side
components in, the application server you are using and the features
of your app.  If you have a database my bet is the next question
you'll get asked is to put it on DB2 and WebSphere, it's part of the
IBM religious canon.

If you have a C++ back end then you'll need to get familiar with the
AIX compiler and get ready to have to change all your code.  If you
are C# I have no clue how you would go about it, although I bet there
is a story.  If you are Java you are in better shape, but watch out
for differences in XML parsers and compliance to standard interfaces
like SQL/JDBC.  IBM are as bad as Microsoft for implementing their own
versions of standards.

You have done the right thing by downloading the AIX server components
from Adobe.  Now you need to assemble your server in whatever AIX
technology is available.  Get AIX releases of your app server,
database etc. and get it all that stood up and running and delivering
pages of any kind.  You will probably find all sorts of challenges
with that alone if this is your first time with IBM.

Once you have done that, and presuming you have been reasonably well
behaved, then in theory you should be able to recompile your Java code
under AIX and it should run (in theory you should be able to just
deploy the same Java component, but that is very unlikely to work).  I
think you have enough work just to get there.  I suspect your
situation will either change or become clearer once you have got to
that point.

Best of luck
SP

Unrequested editorial comment:  If it wasn't for IBM strong-arming its
partners, AIX/DB2/WebSphere would have been consigned to the dustbin
years ago.  It's not that they are really that bad - although DB2 is a
bit of a nightmare - it's not even because they are very difficult and
subtle and the skills are not widely available - although that is all
true too, the real kicker is that there are better things out there
which are either free or lower cost.  The IBM blue stack only exists
because IBM would look very silly taking anything else into its
clients and it forces its partners and customers to comply because of
its size and because it wants license revenue from its software
products which it would otherwise never get.  Eventually this rigging
of the market will have to stop and I thought they had seen sense with
their investment in Linux, but the AIX dinosaur rolls on.

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

 Hi All,
 
 I have developed an application for windows... Its working fine 
 everywhere but now I have to make the whole application running on 
 AIX too... 
 
 Can anyone tell me, how can I do it?
 
 I mean What are the steps or some installation guidelines to compile 
 the MXMLs for AIX..
 
 I have already downloaded Flex Data Services 2 Express for AIX 
 from ADOBE.com.
 
 I have already Flex Build for Windows, Do I need to download Flex 
 Builder 2 for MAC or other OS?
 
 Once I get these sofwares, which steps do I need to follow to make 
 my application working on AIX?
 
 Please help to do the same.
 
 Thanks in Advance
 SS





[flexcoders] Re: Flex Installation\Compilation Guidelines for AIX OS

2007-04-09 Thread simonjpalmer
I must be missing something obvious because I'm not seeing why you
would fiddle around with compiling mxml files on the server, just put
the binaries there.  I think this step needs looking at:

 2. Compile MXML using Flex builder on AIX.

Is there a flex builder for AIX?  I doubt it and I don't really see
why you need it.  Flex builder will generate a *.swf file for you. 
That swf file runs in the FlashPlayer running in the browser of the
end user, not on the server.  The target O/S for the swf is Windows
unless your client is a very weird world of the end users having AIX
on their desktop.  If they do, turn the job down, change your phone
numbers and run in the opposite direction very fast :-)

Your application server just delivers the swf file to the end user's
browser.  What you do need is AIX software on the server end to
respond to the requests that the swf will make back to the server. 
That's what you downloaded when you went and got the Adobe fds for AIX.

What you need to do is get all the bits together on the AIX machine in
a WAR file which will run on AIX under the application server in
question.  Once you have done that, then try deploying it.

If you are expected to support this then you'll end up buying AIX
hardware, you'll have no choice.  

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

 Hi SP,
 
 Thanks for your quick response Though AIX hardware is up and 
 running at client end so that wouldn't be an issue.. Here we are 
 using Java components to communicate with the backend.
 
 Actually this needs to be test at the client end so I need to tell 
 them some instruction to follow. I have made 2 scenarios to do the 
 same, which I have given below:
 
 First of all you need to figure out whether Server is AIX and 
 Clients are Windows or Server is AIX and Clients are AIX as well.
 If the first scenario is implanted at ING, you need to configure FDS 
 with the swallowtech application on AIX and no need to compile MXML 
 file. If the second scenario is there, you will have to do both the 
 task:
 
 1. Configure FDS with SwallowTech application on AIX
 2. Compile MXML using Flex builder on AIX.
 
 
 The steps to compile the file:
 
 Once you through these steps:
 
 1 Make a fresh project using FlexBuilder. 
 2 Place all the enclosed files in the same project folder.
 3 Place the assets folder also from the existing 
 4 path swallowtech.war\jsp\work
 5 Open enclosed workFlowmonitor.mxml.
 
 Since you have much experience in AIX and much expertise in AIX, 
 kindly suggest more scenarios or correct me if I am wrong somewhere.
 
 It would be a great help from your side.
 
 Thanks in Advance,
 SS
 
 
 
 --- In flexcoders@yahoogroups.com, simonjpalmer simonjpalmer@ 
 wrote:
 
  I should start by saying that I have not done this with flex, but I
  have both lead and been involved in many projects where we have 
 had to
  retro-fit to IBM.  The experience has been chastening and it is 
 never
  a straighforward task.  Have you got your AIX hardware up and 
 running
  with the IBM software actually operating yet?  Have you identified 
 any
  expertise either internally or externally who has experience in 
 AIX? 
  Have you teased out of your client (or whoever is requesting this
  step) whether it stops at AIX or whether you need to go to DB2 and
  WebSphere?  If not then go and do that first.
  
  I'm not sure why you would need to compile any flex code under 
 AIX. 
  The only reason to do that would be if your clients were running 
 their
  browsers on AIX.  Is that the case?  The swf and html you generate 
 in
  flex is piped across to the client machine and run there inside the
  FlashPlayer, not on the server.  So I don't think you need the Flex
  Builder anywhere other than Windows (or maybe Mac if you prefer to
  work on a Mac) because your clients are probably running IE on 
 Windows.
  
  As for the server, how you should do it and how hard your job will 
 be
  will depend upon the language you have implemented your server side
  components in, the application server you are using and the 
 features
  of your app.  If you have a database my bet is the next question
  you'll get asked is to put it on DB2 and WebSphere, it's part of 
 the
  IBM religious canon.
  
  If you have a C++ back end then you'll need to get familiar with 
 the
  AIX compiler and get ready to have to change all your code.  If you
  are C# I have no clue how you would go about it, although I bet 
 there
  is a story.  If you are Java you are in better shape, but watch out
  for differences in XML parsers and compliance to standard 
 interfaces
  like SQL/JDBC.  IBM are as bad as Microsoft for implementing their 
 own
  versions of standards.
  
  You have done the right thing by downloading the AIX server 
 components
  from Adobe.  Now you need to assemble your server in whatever AIX
  technology is available.  Get AIX releases of your app server,
  database etc. and get it all

[flexcoders] Re: Finding / Displaying Values in a combo Box

2007-04-08 Thread simonjpalmer
here are some ideas...

second case first...

you could create a TermsCode object with the fields code and
description and a magic toString() function, something like this...

package blah
{
public class TermsCode
{
public var code:String;
public var description:String;
public function toString():String{return description;}
}
}

and populate it with whatever gets returned from your db call.  how
you do that will depend entirely on your data access tier.  Having
populated the array you can then just bind the dataProvider of your
combo to a collection of these classes and the display will be taken
from toString().  You can then either use selectedItem or
selectedObject on the combo object to manage your selection.

for the first one you have a couple of choices and you'll have to
decide how to go based on extensibility etc. of your app.  

Since there are so few things in your list you could just create a
static array of strings with your descripive text in it and
stick-handle the value of the selected index based on inspection of
the text field, i.e.

if (it = A)
{
myCombo.selectedIndex = 1;
}
else if (it = B)
{
myCombo.selectedIndex = 2;
}
etc.

If you wanted to be clever you could probably create an array of
objects indexed by the value of the letter using the somewhat
mysterious object syntax

var x:Object = {}

If you are afraid to tread in those murky waters (as I am) then there
is an interesting possible alternative offered here

http://www.ericfeminella.com/blog/2006/12/05/as3-hashmap-for-flex/

which is a hashmap.

best of luck.

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

 I have an maintenance screen with a couple of combo boxes.  One of
 them has 4 static options, the other one is loaded from a database
 with about 40-50 choices.  Here is my question:
 
 I want to display the correct values in the combo box after I read
 the record to be displayed.  What is the best way to convert my data
 from the file to the correct index / item in the combo box?  In the
 first case, I am storing a single character A,B,O or E and I have one
 of 4 strings / labels to be displayed.  In the 2nd case, I have a
 terms code (2 characters) and my query result returns terms code,
 description and I want the description displayed.
 
 Thanks
 Bruce





[flexcoders] Standard approach for itemPendingError handling

2007-04-08 Thread simonjpalmer
does anyone have a standard approach for handling itemPendingError? 
In an asynchronous, lazy data loading app it seems to be a crucial
issue.  I have basically had to re-design my app because I can never
quite tell when the data is going to show up.  

Does anyone have and guidelines to follow or recommendations?  

So far I have just had to keep the code very flat and to have
everything repeatable when the data finally shows up and hope that the
user hasn't got bored or moved on.  Not really satisfactory.  Hope. 
Not a very good strategy...



[flexcoders] Passing an argument to DataService.commit()

2007-04-08 Thread simonjpalmer
Anyone know how I can do the equivalent of passing an argument to
commit()?

I understand that a lot goes on behind the scenes when commit() gets
called, but it would be very handy to be able to provide some sort of
context, such as credentials, which I could anticipate on the server
end of the commit.

What is the standard preocedure for detecting context of a set of
asynchronous server requests such as are fired by commit?

Any clues?  Any good reading material on the subject?  

Jeff, any ideas?

Simon



[flexcoders] Re: question about string equality

2007-04-06 Thread simonjpalmer
that's really helpful, thanks for taking the time to reply in such detail

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

  I have also long wondered about primitives in AS3. What is an int? 
  What primitives are there? What is a Boolean?
  
 Here are the types where you don't need to (or can't) use the 'new'
 operator because AS3 has literal notation for values of that type:
  
 int: 32-bit signed integer
  
 var i:int; // i is 0 by default
 i = -7;
  
 uint: 32-bit unsigned integer
  
 var u:uint; // u is 0 by default
 u = 0xFFCC88;
  
 Number: 64-bit floating-point number
  
 var n:Number; // n is NaN (not 0) by default
 n = 99.9;
  
 Boolean: true or false
  
 var b:Boolean; // b is false by default
 b = true;
  
 String: null or a sequence of 0 or more Unicode characters
  
 var s:String; // s is null (not ) by default
 s = abc;
  
 Array: null or a reference to an instance of the Array class
  
 var a:Array; // a is null (not []) by default
 a = [ 1, 2, 3 ];
  
 Object: null or a reference to an instance of the Object class
  
 var o:Object; // o is null (not {}) by default
 o = { a: 1, b: 2 };
  
 Class: null or a reference to a class
  
 import flash.display.DisplayObject;
 var c:Class; // c is null by default
 c = DisplayObject;
  
 RegExp: null or a reference to a instance of the RegExp class
  
 var r:RegExp; // r is null by default
 r = /\w+/; // same as r = new RegExp(\\w+ file://\\w );
  
 XML/XMLList: null or a reference to an instance of the XML/XMLList class
  
 var x:XML; // x is null by default
 x = afoo/a; // same as x = new XML(afoo/a;);
  
 - Gordon
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Peter Farland
 Sent: Thursday, April 05, 2007 8:37 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: question about string equality
 
 
 
 Oops, I deleted part of a sentence, it should have been:
 
 or you're trying to do more and, say, cater for a case where you want
 the empty string and null to be equivalent as uninitialized states in
 your program?
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
 Behalf Of Peter Farland
 Sent: Thursday, April 05, 2007 11:23 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Re: question about string equality
 
 For AS3, I think it is fine to use the new operator in general - I was
 clutching-at-straws as to why something might be different in your
 scenario (largely because I know in AS2 there was a difference between
  and new String() as there was the concept of primitives and object
 forms of the string type and the object form wouldn't serialize
 correctly in AMF 0, for instance).
 
 To be honest, I've lost track of the original question in this thread
 and am not sure whether you're just looking for the best way to compare
 strings in AS3 or you're trying to do more and, say, cater for a case
 where you want the empty string being to be equivalent to an
 uninitialized state in your program?
 
 I know one scenario that can be confusing is this:
 
 var s1:String = ;
 var s2:String = null;
 
 if (s1)
 {
 trace(s1 was true); 
 }
 
 if (s2)
 {
 trace(s2 was true);
 }
 
 Neither of these trace statements will execute. I always avoid this
 short-cut syntax because it leads to further confusion that all
 non-zero-length strings evaluate to true, and a string like false will
 just be seen as a String of length  0 and hence true. To be safe, I
 always write the condition I'm trying to test explicitly...
 
 if (s1 != null  s1 == true)
 {
 //...
 }
 
 Pete
 
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
 Behalf Of simonjpalmer
 Sent: Thursday, April 05, 2007 11:02 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: question about string equality
 
 huh, thanks again Pete, I am obviously have my Java roots showing. 
 This is the sort of thing that it is hard to get to know about AS3
 without coding for some time, and I am relatively new to it.
 
 How do I distinguish between types that need initialisation through
 new and those that don't? For instance an ArrayCollection needs a new
 whereas a Number (and apparently a String) does not. I naively
 considered them all to be objects and as such need initialising,
 although I am clearly not religious about it in my code.
 
 I have also long wondered about primitives in AS3. What is an int? 
 What primitives are there? What is a Boolean?
 
 Is there a good reference source for this sort of AS3 information? I
 think I have travelled far enough that it is about

[flexcoders] Re: question about string equality

2007-04-05 Thread simonjpalmer
huh, thanks again Pete, I am obviously have my Java roots showing. 
This is the sort of thing that it is hard to get to know about AS3
without coding for some time, and I am relatively new to it.

How do I distinguish between types that need initialisation through
new and those that don't?  For instance an ArrayCollection needs a new
whereas a Number (and apparently a String) does not.  I naively
considered them all to be objects and as such need initialising,
although I am clearly not religious about it in my code.

I have also long wondered about primitives in AS3.  What is an int? 
What primitives are there?  What is a Boolean?

Is there a good reference source for this sort of AS3 information?  I
think I have travelled far enough that it is about time I went back to
the beginning.

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

 I would guess that === is actually faster than == as the latter has to
 check whether it needs to perform any casting before checking equality. 
  
 Out of curiousity, have you tried to use  instead of new String() to
 initialize category (it's unconventional to use new String() in AS3)?
  
 Otherwise, you could send the complete source in a bug for the team to
 take a look.
  
 Pete
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Wednesday, April 04, 2007 12:42 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: question about string equality
 
 
 
 Good point, I didn't include the declarations. 
 
 They are both strongly typed Strings, I don't use objects anywhere in
 my code.
 
 co is a custom AS object of type Competitor, here's the declaration
 of the name member:
 
 public var name:String;
 
 oc is a custom AS object of type ObjectCategory and here is the
 declaration of the category member:
 
 public var category:String = new String();
 
 The strong typing answers the question about whether they just happen
 to contain strings.
 
 Other than the fact that they belong to custom objects I have written,
 there is nothing peculiar about either the string variables or their
 contents.
 
 I don't think they are in a custom namespace, but to be honest I'm not
 exactly sure what that means, so I can't say with certainty that they
 aren't. I think the answer is no.
 
 co.name gets populated by various means, either though a user gesture
 in a custom page or by retrieval from a java data adaptor to my
 server. oc.category is populated programmatically during execution of
 the code in question.
 
 I appreciate you guys looking at this. Right now I have it working as
 I expect but it is a bit worrying that I need to do the comparison in
 this way only in this instance. That says to me that I don't properly
 understand something.
 
 If I want to check equality of the content of two strings should I
 always be testing valueOf()? 
 
 What is the overhead of using ===?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Peter Farland pfarland@ wrote:
 
  What are the type declarations of the properties sc.name and
  sc.category? Do they just happen to hold String values or are they
 typed
  to enforce that they hold String values? Is there anything else unique
  about these properties? Are they in a custom namespace? Are they
  read-only? How were they populated in the first place?
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of simonjpalmer
  Sent: Monday, April 02, 2007 6:14 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] question about string equality
  
  
  
  take a look at this code snippet...
  
  01 // check one doesn't already exist with this name
  02 bFound = false;
  03 for (isc = 0; isc  ss.scenarios.length  !bFound; isc++)
  04 {
  05 sc = Scenario(ss.scenarios.getItemAt(isc));
  06 if (sc.name.valueOf() == oc.category.valueOf()) bFound = true;
  07 }
  08 if (!bFound)
  09 {
  10 // Make a new scenario
  11 sc = PlanPointFactory.makeScenario(uli, null, true, false);
  12
  13 // add it to the snapshot
  14 ss.addScenario(sc);
  15
  16 // add it to the local array of categories
  17 oc.objects.push(sc);
  18 }
  
  line 06 is the offending line.
  
  if I have:
  
  06 if (sc.name == oc.category) bFound = true;
  
  the bFound flag never gets set true. I have to have the valueOf()
  function in order for the equality to fire correctly.
  
  This is not what I expected. I thought that regular equality would
  have sufficed here since sc.name and oc.category are both Strings.
  
  Why am I wrong and why do I need valueOf()?
 





[flexcoders] Re: question about string equality

2007-04-04 Thread simonjpalmer
Good point, I didn't include the declarations.  

They are both strongly typed Strings, I don't use objects anywhere in
my code.

co is a custom AS object of type Competitor, here's the declaration
of the name member:

public var name:String;

oc is a custom AS object of type ObjectCategory and here is the
declaration of the category member:

public var category:String = new String();

The strong typing answers the question about whether they just happen
to contain strings.

Other than the fact that they belong to custom objects I have written,
there is nothing peculiar about either the string variables or their
contents.

I don't think they are in a custom namespace, but to be honest I'm not
exactly sure what that means, so I can't say with certainty that they
aren't.  I think the answer is no.

co.name gets populated by various means, either though a user gesture
in a custom page or by retrieval from a java data adaptor to my
server.  oc.category is populated programmatically during execution of
the code in question.

I appreciate you guys looking at this.  Right now I have it working as
I expect but it is a bit worrying that I need to do the comparison in
this way only in this instance.  That says to me that I don't properly
understand something.

If I want to check equality of the content of two strings should I
always be testing valueOf()?  

What is the overhead of using ===?

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

 What are the type declarations of the properties sc.name and
 sc.category? Do they just happen to hold String values or are they typed
 to enforce that they hold String values? Is there anything else unique
 about these properties? Are they in a custom namespace? Are they
 read-only? How were they populated in the first place?
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Monday, April 02, 2007 6:14 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] question about string equality
 
 
 
 take a look at this code snippet...
 
 01 // check one doesn't already exist with this name
 02 bFound = false;
 03 for (isc = 0; isc  ss.scenarios.length  !bFound; isc++)
 04 {
 05 sc = Scenario(ss.scenarios.getItemAt(isc));
 06 if (sc.name.valueOf() == oc.category.valueOf()) bFound = true;
 07 }
 08 if (!bFound)
 09 {
 10 // Make a new scenario
 11 sc = PlanPointFactory.makeScenario(uli, null, true, false);
 12
 13 // add it to the snapshot
 14 ss.addScenario(sc);
 15
 16 // add it to the local array of categories
 17 oc.objects.push(sc);
 18 }
 
 line 06 is the offending line.
 
 if I have:
 
 06 if (sc.name == oc.category) bFound = true;
 
 the bFound flag never gets set true. I have to have the valueOf()
 function in order for the equality to fire correctly.
 
 This is not what I expected. I thought that regular equality would
 have sufficed here since sc.name and oc.category are both Strings.
 
 Why am I wrong and why do I need valueOf()?





[flexcoders] Re: Labelling the bubbles of a bubble chart

2007-04-04 Thread simonjpalmer
Thanks Ely,

for now I think I am stuck with option 1, just because of time.

If I were to embark on 3, which sounds like the right solution, can
you give me some pointers on where to start looking before I dive off
into the jungle and get hopelessly lost.

Thanks
Simon

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

  
  
 three ways, in order of difficulty:
  
 1) custom bubble renderer.  easy to do, but hard to do anything smart so
 the labels don't overlap.
 2) custom annotation using the post from my blog.  Easy to do, but not
 the most efficient approach.
 3) custom bubble series. Requires rolling up your sleves and getting
 into the series code, but most performant, and reusable.
  
 Ely.
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Sunday, April 01, 2007 3:35 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Labelling the bubbles of a bubble chart
 
 
 
 I want to put a data value alongside the bubbles on my bubble chart. 
 Anyone know how? Ideally I would have something that was a cross
 between a tooltip and the flyout labels on a pie chart.
 
 Any clues?





[flexcoders] implements, include, MX and AS...

2007-04-04 Thread simonjpalmer
I have an interface definition and an AS include file which contains a
concrete implementation which I include in various places around my
code.  For all my AS classes this is a very economical programming
model which I have used to great effect.

I just tried to use it for an MX control and I get a compilation
message saying that my MX component has no implementation in spite of
the fact that I am explicitly including it in the script portion of
the code.

Here is a snipped version of what I am doing...

package pmco.interfaces
{
...
public interface IActionsOwner
{
...
function addAction(a:Action):void;
...
}
}

I have an include file in which I have some impementations,
ConcreteActionOwner.as

...
public function addAction(a:Action):void
{
if (actions == null) actions = new ArrayCollection();
actions.addItem(a);
}
...

In regular AS classes I can do this...

public class X implements IActionsOwner
{
include ConcreteActionOwner.as
}

and the compiler is happy.  However when I do this...

mx:Canvas
xmlns:mx=http://www.adobe.com/2006/mxml; 
implements=pmco.interfaces.IActionOwner
mx:Script
![CDATA[
include ConcreteActionOwner.as
]]
/mx:Script

I get a compiler error that my class based on Canvas does not contain
an implementation of IActionOwner.

Anyone know whether I can do this and how?




[flexcoders] Re: implements, include, MX and AS...

2007-04-04 Thread simonjpalmer
Just tried that, doesn't appear to make any difference.

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

 Add import pmco.interfaces.IActionOwner in  your code block
 
  
 
  
 
 b..
 
  
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Wednesday, April 04, 2007 1:27 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] implements, include, MX and AS...
 
  
 
 I have an interface definition and an AS include file which contains a
 concrete implementation which I include in various places around my
 code. For all my AS classes this is a very economical programming
 model which I have used to great effect.
 
 I just tried to use it for an MX control and I get a compilation
 message saying that my MX component has no implementation in spite of
 the fact that I am explicitly including it in the script portion of
 the code.
 
 Here is a snipped version of what I am doing...
 
 package pmco.interfaces
 {
 ...
 public interface IActionsOwner
 {
 ...
 function addAction(a:Action):void;
 ...
 }
 }
 
 I have an include file in which I have some impementations,
 ConcreteActionOwner.as
 
 ...
 public function addAction(a:Action):void
 {
 if (actions == null) actions = new ArrayCollection();
 actions.addItem(a);
 }
 ...
 
 In regular AS classes I can do this...
 
 public class X implements IActionsOwner
 {
 include ConcreteActionOwner.as
 }
 
 and the compiler is happy. However when I do this...
 
 mx:Canvas
 xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  
 implements=pmco.interfaces.IActionOwner
 mx:Script
 ![CDATA[
 include ConcreteActionOwner.as
 ]]
 /mx:Script
 
 I get a compiler error that my class based on Canvas does not contain
 an implementation of IActionOwner.
 
 Anyone know whether I can do this and how?
 
  
 
 
 
 ***
 The information in this e-mail is confidential and intended solely
for the individual or entity to whom it is addressed.  If you have
received this e-mail in error please notify the sender by return
e-mail delete this e-mail and refrain from any disclosure or action
based on the information.
 ***





[flexcoders] Re: Save to database

2007-04-04 Thread simonjpalmer
If you are connecting to a db on the server then you have a couple of
obvious choices.  

1. You can use the built-in capabilities of flex data services which
will manage the modifications for you and only notify your server
components of changes.  
2. You can use an ORM like Hibernate to do the same thing between your
server code and the RDBMS.  
3. You can write all that code yourself.

You can in fact combine any or all of them too.  There are probably
other options too, but one of these ought to do you.

It is generally bad practice for you to be truncating your data before
writing.  Unless you are absolutely sure the data is that transient
you shouldn't do it.

I suggest you do a bit of reading about FDS in the Flex docs.  Also it
is probably worth picking up a book on Hibernate and giving it a
thorough read, especially regarding transactions and commit strategies.

SP.

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

 Hi,
 
 I don't know how I can save a lot of content that can be modified or
not. 
 
 First, when we load all the content from database for a timeline(main
 object) and transfert all these table to many Objects in flex.
 
 [Bindable]
 TimelineModelLocator
 dateType
 presentation
 from
 to
 divisions (arraycollection with object)
 autors (arraycollection with object)
 layerData (arraycollection with object)
 categoryData (arraycollection with object)
 entryData (arraycollection with object)
 ...
  
 The user can modify all content, remove items, add items. When the
 user click save all, what is the best to do?
 
 Remove all what was in the database and save the new content in all
 tables.
 
 Loop in all object and compare a checksum to know what have been
 modify/added/deleted...
 
 Other idea??





[flexcoders] Re: implements, include, MX and AS...

2007-04-04 Thread simonjpalmer
good spot Peter.  I inserted a class in my inheritance hierarchy which
does the interface specification and incorporates the concrete
implementations too through include.  This seems to work but it is
pretty inelegant.  Not that I'm complaining about that.

Thanks for the reply.


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

 Can you avoid using include and perhaps use MXML to extend a custom AS
 base class that implements your interface and still extends Canvas?
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Wednesday, April 04, 2007 4:23 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: implements, include, MX and AS...
 
 
 
 Just tried that, doesn't appear to make any difference.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Brian Holmes Brian.Holmes@
 wrote:
 
  Add import pmco.interfaces.IActionOwner in your code block
  
  
  
  
  
  b..
  
  
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of simonjpalmer
  Sent: Wednesday, April 04, 2007 1:27 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] implements, include, MX and AS...
  
  
  
  I have an interface definition and an AS include file which contains a
  concrete implementation which I include in various places around my
  code. For all my AS classes this is a very economical programming
  model which I have used to great effect.
  
  I just tried to use it for an MX control and I get a compilation
  message saying that my MX component has no implementation in spite of
  the fact that I am explicitly including it in the script portion of
  the code.
  
  Here is a snipped version of what I am doing...
  
  package pmco.interfaces
  {
  ...
  public interface IActionsOwner
  {
  ...
  function addAction(a:Action):void;
  ...
  }
  }
  
  I have an include file in which I have some impementations,
  ConcreteActionOwner.as
  
  ...
  public function addAction(a:Action):void
  {
  if (actions == null) actions = new ArrayCollection();
  actions.addItem(a);
  }
  ...
  
  In regular AS classes I can do this...
  
  public class X implements IActionsOwner
  {
  include ConcreteActionOwner.as
  }
  
  and the compiler is happy. However when I do this...
  
  mx:Canvas
  xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
  http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml   
  implements=pmco.interfaces.IActionOwner
  mx:Script
  ![CDATA[
  include ConcreteActionOwner.as
  ]]
  /mx:Script
  
  I get a compiler error that my class based on Canvas does not contain
  an implementation of IActionOwner.
  
  Anyone know whether I can do this and how?
  
  
  
  
  
  ***
  The information in this e-mail is confidential and intended solely
 for the individual or entity to whom it is addressed. If you have
 received this e-mail in error please notify the sender by return
 e-mail delete this e-mail and refrain from any disclosure or action
 based on the information.
  ***
 





[flexcoders] question about string equality

2007-04-02 Thread simonjpalmer
take a look at this code snippet...

01 // check one doesn't already exist with this name
02 bFound = false;
03 for (isc = 0; isc  ss.scenarios.length  !bFound; isc++)
04 {
05  sc = Scenario(ss.scenarios.getItemAt(isc));
06  if (sc.name.valueOf() == oc.category.valueOf()) bFound = true;
07 }
08 if (!bFound)
09 {
10  // Make a new scenario
11  sc = PlanPointFactory.makeScenario(uli, null, true, false);
12
13  // add it to the snapshot
14  ss.addScenario(sc);
15
16  // add it to the local array of categories
17  oc.objects.push(sc);
18 }

line 06 is the offending line.

if I have:

06  if (sc.name == oc.category) bFound = true;

the bFound flag never gets set true.  I have to have the valueOf()
function in order for the equality to fire correctly.

This is not what I expected.  I thought that regular equality would
have sufficed here since sc.name and oc.category are both Strings.

Why am I wrong and why do I need valueOf()?





[flexcoders] Re: Accessing the parent component properties

2007-04-01 Thread simonjpalmer
I favour events.  I have just spent the weekend switching from a
(solely) central controller model to an event driven model and here's
why.  

Every time anything happened through a user gesture which changed the
state of something in the controller, every binding got updated (as
you would expect).  As my application became more complex this became
an increasing overhead and I found myself more and more susceptible to
timing issues (especially with lazily loaded server side data).  

I may have been doing something wrong but I had a few seconds of
binding update on some changes to central pieces of data.  It was only
getting worse too.

In addition I had liberal sprinklings of casts of parentApplication or
some such back reference throughout my code to bindable variables in
the central controller.
 
It just felt wrong to be hooking up my nicely objectified components
to some artefact of the circumstance in which they are being used. 
This is exactly the opposite way that the Java world is going with the
likes of Spring and once you have reaped the benefits of that approach
it is very hard to go back.  

I suppose I have a philosophical objection to doing that so part of my
re-architecture was to remove a lot of these implementation
dependencies and a nice corollary (which I think justifies my weekend
working) is that I now have less code overall, some re-usable
libraries and a faster app.

I'm not saying that flex/AS in and of itself causes these problems but
it is easy to fall back on a central controller model and it is a bit
like having loads of global variables.  It gets you going in a hurry
but is not really sustainable.

That's my experience so far anyway.  

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

 Many folks prefer a model/view or model/view/controller architecture and
 use databinding to hook up to a central model or controller.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of stephen50232
 Sent: Saturday, March 31, 2007 5:08 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Accessing the parent component properties
 
 
 
 Hi,
 
 I have a system which I'm building using a series of components, all 
 called from within the Main.mxml file. What is the best method for 
 components to access the properties of the Main.mxml file. For example 
 if I change the state or amend the selected section of a viewstack?
 
 Is it best to use events?





[flexcoders] Labelling the bubbles of a bubble chart

2007-04-01 Thread simonjpalmer
I want to put a data value alongside the bubbles on my bubble chart. 
Anyone know how?  Ideally I would have something that was a cross
between a tooltip and the flyout labels on a pie chart.

Any clues?



[flexcoders] Re: Looking for a Wizard custom component

2007-03-31 Thread simonjpalmer
Not quite that sophisticated, but I have a framework which has a prev,
next, cancel and finish button and into which you can drop any
controls.  I'd happily share it with you and you can probably extend
it for your purposes.

Send me an email to simon.palmer @ gmail.com and I'll send you the code.

SP

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

 Has anyone created a custom component that is a wizard?  In other
 words, has anyone played around with making a Flex component that
 defines a wizard that, for example, supports conditional flow, has an
 index displayed in the left side of how many wizard steps there are,
 the right pane has the content, and the navigation buttons at the
bottom.
 
 I'm looking for something that looks like JIDESoft's Swing wizard
 component.
 
 Any advice/help is much appreciated!  I created a quick prototype that
 resembles the JIDESoft's wizard, but I am new to Flex and my prototype
 is not very good :^)
 
 thanx
 
 -Ted-





[flexcoders] Scaling font size with Window size

2007-03-29 Thread simonjpalmer
does anyone know how, or has anyone tried, to scale fonts with the
size of the browser window?  What I am looking for is a method to make
the fonts a constant proportion of the size of the window so that the
whole of my app appears to scale like an image when the window size
changes.

At the moment all my controls compress nicely and in a well-behaved
fashion and there is good control over that from within the properties
of controls, but the font sizes all stay the same and it looks a bit
silly (and causes unnecessary and useless scroll bars to start appearing)

I thought about binding the font size of controls to a function which
itself is bound to the window size, but I'm not exactly sure how I
should go about that, and I'm not completey sure it would survive a
resize.

Anyone have any clues?

SP



[flexcoders] Anyone have a good example of an RSS feed reader?

2007-03-29 Thread simonjpalmer
I have been scratching around and found the as3syndicationlib but I
have seen no decent examples of how to use it and have to confess to
being a bit lost.



[flexcoders] Re: Scaling font size with Window size

2007-03-29 Thread simonjpalmer
hmm, any idea what value it takes by default?

I don't quite see how this helps, but thanks for the tip, I'll go do
some digging.

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

 Checkout stage.scaleMode
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Thursday, March 29, 2007 6:06 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Scaling font size with Window size
 
 
 
 does anyone know how, or has anyone tried, to scale fonts with the
 size of the browser window? What I am looking for is a method to make
 the fonts a constant proportion of the size of the window so that the
 whole of my app appears to scale like an image when the window size
 changes.
 
 At the moment all my controls compress nicely and in a well-behaved
 fashion and there is good control over that from within the properties
 of controls, but the font sizes all stay the same and it looks a bit
 silly (and causes unnecessary and useless scroll bars to start
 appearing)
 
 I thought about binding the font size of controls to a function which
 itself is bound to the window size, but I'm not exactly sure how I
 should go about that, and I'm not completey sure it would survive a
 resize.
 
 Anyone have any clues?
 
 SP





[flexcoders] Re: Whatever happened to Peter Ent's scrolling text ticker?

2007-03-27 Thread simonjpalmer
any particular reason why?

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

 I recommend using a Timer rather than calling doLater().
  
 - Gordon
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Monday, March 26, 2007 12:39 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Whatever happened to Peter Ent's scrolling
 text ticker?
 
 
 
 Thanks! Simple when you see it, but I didn't know about the magic
 doLater() function... sometimes the simplest things are the best.
 
 As a matter of interest has anyone used this approach for handling
 lazy loading of data?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Steve Hagenlock shagenlo@ wrote:
 
  http://weblogs.macromedia.com/pent/archives/flex/ticker/tickerText.zip
 http://weblogs.macromedia.com/pent/archives/flex/ticker/tickerText.zip
 
  
  simonjpalmer wrote:
   Anyone know what became of it? The markme.com code link on his blog
   leads nowhere. Anyone have the code they could share with me?
  
   http://weblogs.macromedia.com/pent/archives/2004/12/ticker.cfm
 http://weblogs.macromedia.com/pent/archives/2004/12/ticker.cfm 
  
   Thanks
  
   Simon
  
  
   
  
 --
  
   No virus found in this incoming message.
   Checked by AVG Free Edition.
   Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date:
 3/23/2007 3:27 PM
  
 





[flexcoders] Re: Whatever happened to Peter Ent's scrolling text ticker?

2007-03-26 Thread simonjpalmer
Thanks!  Simple when you see it, but I didn't know about the magic
doLater() function...  sometimes the simplest things are the best.

As a matter of interest has anyone used this approach for handling
lazy loading of data?

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

 http://weblogs.macromedia.com/pent/archives/flex/ticker/tickerText.zip
 
 simonjpalmer wrote:
  Anyone know what became of it?  The markme.com code link on his blog
  leads nowhere.  Anyone have the code they could share with me?
 
  http://weblogs.macromedia.com/pent/archives/2004/12/ticker.cfm
 
  Thanks
 
  Simon
 
 

 

 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.446 / Virus Database: 268.18.17/731 - Release Date:
3/23/2007 3:27 PM
 





[flexcoders] Re: Two-Way Binding Solutions?

2007-03-26 Thread simonjpalmer
You are right, it is because your model.pendingContact and
model.newContact are object references and not object instances.  When
you do the assignment you are just pointing them to the same object in
memory - 2 references, 1 object.  In your second case you create a
second object, 2 objects, 2 references.  This is a familiar concept if
you have spent any time coding in Java.

I'm willing to bet you won't find a cloning technique that will really
suit your purposes (but then I enjoy a flutter).  From personal
experience I am yet to find a use for cloning that I have stuck with.
 I have used it in Java but every time I have thought it was a
solution it turned out not to be because of some logical constraint in
the data.   Most likely there will be some logic implicit in the
member variables or your object (such as id's etc) that it would not
be safe to simply clone.  If you have a complex object containing an
array what would you expect it to do?  I generally resort to
intelligent copying and a self-impose standard interface across my
code to copy (I used to use overloaded = operators and copy
constructurs in C++ but that's the very distant past).

For the case that you cite you must be binding the individual members
of your VO to form fields to display their values.  One approach is to
trap the enter key on those fields and apply the new values back to
the object.  That way you only need a single object and its state is
represented by the fields in your form...

mx:TextInput id=txt_Name text={myVOContact.name} enter=saveName()/
...
private function saveName():void{myVOContact.name=txt_Name.text;}
...

You might wind up with lots of little saveX() functions but that
wouldn't be the end of the world.  

Alternatively you could probably also bind the assignment directly...

mx:TextInput id=txt_Name text={myVOContact.name}
enter={myVOContact.name=txt_Name.text}/

Not every control support the enter event but there is normally some
analogue, such as a combo closing or a checkbox state changing or a
radio button being selected that will do just as well.

A third method involves putting a submit button on the page.  When
clicked, manually transfer the data from the form fields to your VO
and post back to the server.

Unless you are measuring the changes in your data I'm not seeing the
value of a second object instance (yippee, no clone).

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

 i think my problem boils down to one of object cloning.  Does anyone  
 have a good solution for deep cloning objects in AS3?  Seems like  
 this would be a pretty useful utility.
 
 - Kevin
 
 
 
 On Mar 26, 2007, at 1:50 PM, Kevin wrote:
 
  I have trying to figure out how best to accomplish the two-way data
  binding needed for form entry. Here is what I thought would work,
  but it doesn't seem to:
 
  ON MODEL:
  I created two variables that hold my VO.
 
  model.pendingContact
  model.newContact
 
  The user clicks a button to get ContactVO data from the server. In
  the command class I assign the result (which is a typed PHP
  ContactVO) to each variable:
 
  model.pendingContact = data.result;
  model.newContact = data.result;
 
  I then bind my form fields to model.pendingContact so that the
  existing values from the server show up in the TextInput fields.
 
  Lastly, I use the BindingUtil methods to bind the text property of
  the TextInput fields back to model.newContact so that I can record
  any changes and send them back to the server.
 
  When the user submits the form, model.pendingContact should hold
  the old values  model.newContact should have the new values.
  Correct??
 
  Am I overlooking something. The only way I can get this to work is
  if I don't assign model.newContact to the values from the server
  and instead create a new instance like this:
 
  model.pendingContact = data.result;
  model.newContact = new ContactVO;
 
  However, I can't do this because I need the newContact to start out
  with the old values from the server. Is there a duplicate or clone
  object method that I need to use so that both model variables can be
  assigned to the same object from the server??
 
  Thanks for the help.
 
  - Kevin
 
 





[flexcoders] Re: Component Required

2007-03-24 Thread simonjpalmer
Did you find one?  I'd be interested in one too...

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

 Hi All,
 
  
 
 I want some example for stock ticker or component for the same if
some one
 has already created that or 
 
  
 
 have some API through which I can implement stock ticker in flex.
 
  
 
 For refrence (yahoo stock ticker).
 
  
 
 Thanks
 
 Kumar





[flexcoders] Whatever happened to Peter Ent's scrolling text ticker?

2007-03-24 Thread simonjpalmer
Anyone know what became of it?  The markme.com code link on his blog
leads nowhere.  Anyone have the code they could share with me?

http://weblogs.macromedia.com/pent/archives/2004/12/ticker.cfm

Thanks

Simon



[flexcoders] Suspending data bindings during (lazy) server read

2007-03-14 Thread simonjpalmer
I am transfering the head of a hierarchy of objects to the client for
them to choose which one they want to see details for.  The list
returned in this initial fetch is bound to a datagrid control, and
some of the data items are displayed in the grid.  The rest of the
data is loaded lazily through a destination via the java assembler. 
Once a request for the rest of the object is received I do return
quite a lot of data and it can take up to 2 seconds for the response
to arrive back at the client.

One immediate question is how I show a progress bar or a wait cursor
while this operation is occurring.  In all honesty I would prefer it
was synchronous but I can't seem to force that to happen.

So, I have a partially loaded object and when the remainder of the
data does finally show up I recalculate some of the fields that I am
displaying in the orginal data grid because they may be stale.  What I
have found is that I get a stack overflow where the data binding
manager is busy watching changes to the members of the class that I am
busy re-calculating.  During recalculation I get an itemPending error
which causes my recalc function to be re-called which touches the
bound data items which causes the data binding manager to kick off
again.  And round and round we go until I either run out of stack
space or the server stuff returns just in time and my data show up.

I have tried to separate out the activities so there is no binding
during loading, but this is causing me some horrible usability issues
and seems to be a bad way of approaching the problem.  What's more the
asynchronous nature of the server interaction is such that I can't
tell when exactly I'm going to receive the data (I have to rely on
trapping itemPending errors) so I don;t really know when it is safe to
re-bind.

What I would like to be able to do is just suspend the data bindings
in the client code while the lazy loading is taking place, and then
re-bind when I know I have all the data.

Any hints or architectural suggestions would be greatly appreciated.

SP



[flexcoders] Re: FDS/Hibernate - LazyInitializationException when writing AMF output

2007-02-25 Thread simonjpalmer
Eric,

I am also very interested in getting on a beta program too.  I have
sent you an email with contact details for me.

Regards
Simon

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

 Hi PW,
 
  
 
 I'd suggest that we add you to the latest Data Services beta because
 either we have fixed this issue, or we will fix this issue in the next
 release.  Can you contact me off-list and I'll add you to the beat so
 you can test DS with the latest DS and hibernate assembler.
 
  
 
 Thanks
 
 
 Eric
 
  
 
 Flex PM
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of parkerwhirlow
 Sent: Friday, February 16, 2007 7:06 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: FDS/Hibernate - LazyInitializationException
 when writing AMF output
 
  
 
 This is happening from FDS... flex.data.assemblers.HibernateAssembler
 uses a function called fetchObjectProperties() that's supposed to load
 them all while the session is open right?
 
 I've seen in other posts that FDS eager fetches the properties in the
 Assembler, so that they are available during serialization... 
 
 am I missing something here?
 
 thanks,
 PW
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Dima Gutzeit dima@ wrote:
 
  Hi,
  
  You have to initialize the collections before AMF serializes them. The
 
  problem occurs since you closing Hibernate session without first 
  initializing the arrays, and since you are using lazy initialization
 the 
  problem arise.
  
  You have two options :
  
  1. Use lazy=false
  2. Better one, is calling
 /Hibernate.initialize(your_array_reference);/ 
  before you close the Hibernate session.
  
  Regards,
  Dima Gutzeit.
  
  parkerwhirlow wrote:
  
   Hi again =)
  
   I've just started getting this exception inconsistently... sometimes
   it happens 3 times in a row, other times I can go all afternoon
   without getting it. Once the exception occurs, it will occur every
   time the client loads until FDS is restarted.
  
   Note this occurs on multiple collections. I tried setting the
   offending collection to lazy=false (in Hibernate), and the
 exception
   occurred on a different collection. I can't set every one of my
   collections to lazy=false. Especially since at this point, they HAVE
   to be lazy for the updateItem via hierarchical values to almost
 work.
  
   I also noticed that the collection does not necessarily need to have
   any items in it. (And possibly is caused specifically by NOT having
   any items in it, I can't tell for sure). The collection referenced
 in
   the exception below has no values, and there's another collection in
   that same class with values that doesn't seem to cause the
 exception.
  
   See below the hibernate mapping, and exception output when this
   occurs. (Note there are no FDS managed associations for this
 collection)
  
   Thanks for any insight you have as to what is causing this.
  
   PW
   _
  
   joined-subclass name=Adult table=T_ADULT extends=Person
   key
   column name=ID length=22 /
   /key
   set name=children
   inverse=false
   cascade=all-delete-orphan 
   key
   column name=PARENTID length=22 not-null=false /
   /key
   one-to-many class=Person /
   /set
   ...
   /joined-subclass
  
   10:19:42,093 WARN ProxyWarnLog - Narrowing proxy to class
   config.test.Adult - this operation breaks ==
   10:19:44,687 ERROR LazyInitializationException - failed to lazily
   initialize a collection of role: config.test.Adult.children, no
   session or session was closed
   org.hibernate.LazyInitializationException: failed to lazily
 initialize
   a collection of role: config.test.Adult.children, no session or
   session was closed
   at
  
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializ
 ationException(AbstractPersistentCollection.java:358)
   at
  
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializ
 ationExceptionIfNotConnected(AbstractPersistentCollection.j
   ava:350)
   at
  
 org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractP
 ersistentCollection.java:97)
   at
   org.hibernate.collection.PersistentSet.size(PersistentSet.java:139)
   at java.util.ArrayList.init(ArrayList.java:133)
   at
   flex.messaging.io.ArrayCollection.init(ArrayCollection.java:44)
   at
  
 flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:40
 7)
   at
   flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
   at
  
 flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215
 )
   at
  
 flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
   at
  
 flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
   at
   flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
   at
  
 flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
   at
   

[flexcoders] Re: FDS/Hibernate Sample of updating hierarchical list of values

2007-02-24 Thread simonjpalmer
Jeff,

thanks very much for taking the time to reply, I appreciate it.  I
would be very happy to be engaged in the beta process.  Can you give
me some indication of what I might have to do in order to add my name
to the list of beta sites?  

Is it possible for you to give a rough date when we might expect the
beta to start (to which you will not be held)?  The reason I ask is
that I have a pressing and immediate need to have this addressed and
about to undertake an initiative to replace the Hibernate Assembler
(probably a Spring/Hibernate Java Assembler of some kind).  If the
beta is soon I may hold off and put attention elsewhere.  

Any insight you could give would be greatly appreciated.

Kind regards

Simon Palmer


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

 My apologies for the Hibernate problems y'all have been having.  We do
 have a bunch of users happily using this for relatively simple use cases
 but as your domain models grow in complexity, you may run into some
 problems.
 
  
 
 Here are the set of problems I currently know about.  
 
  
 
 1)   unique object exceptions during updateItem.  The one case
 where I know this will happen is if you have hibernate associations
 which do not have corresponding FDS associations (i.e. the hierarchical
 values).  This should be supported and it turns out that the fix for the
 problem is to use hibernate's merge method instead of trying to do the
 merge by hand as is done in 2.0.1's updateItem method.   The code in
 updateItem that is causing the bulk of this problem is the code which
 fetches the current server version to do conflict detection.  In doing
 that, it creates hibernate instances in the session which may conflict
 with instances that get sent in by the client.  Hibernate's merge
 method takes care of all of this for us.
 
 2)   Domain objects need id/equals test which is based on the id.
 Some of the code in the hibernate assembler is using the equals method
 when it should be comparing the id properties.  You can workaround this
 by having equals and hashCode methods which are based on the id.
 
 3)   Session closed errors trying to fetch associations when we
 are writing objects to the client.   I'm not sure why the current
 fetchObjectProperties method is not fetching these objects for some
 people's domain model but if anyone has a test case which can reproduce
 this I'm interested.   It should be walking down all public properties
 and fetching them - the same way that our serialization code is working
 but somehow I must be missing something in the traversal code.  
 
  
 
 There is a public beta coming out fairly soon which will have 1) and 2)
 fixed.   I haven't had a chance to backport these fixes to a version of
 the hibernate assembler which works in 2.0.1 but if there is enough
 demand (and I can find enough time!) I could probably do that.  Of
 course I'd rather get anyone running into trouble on the beta so we can
 make sure that version is solid.
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Friday, February 23, 2007 2:47 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: FDS/Hibernate Sample of updating hierarchical
 list of values
 
  
 
 PW, BTW pop over to the FDS forum at Adobe
 
 http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=60c
 atid=583
 http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=60;
 catid=583 
 
 take a look at the thread called 
 
 Parent Child Hierarchy with FDS and Hibernate
 
 SP
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , simonjpalmer simonjpalmer@
 wrote:
 
  PW and Jeff,
  
  PW, you and I seem to be in the same boat. I am trying to fight off
  the people who were flex skeptics to start with. Not being able to
  write data back makes the whole thing look pretty amateur and confirms
  people's belief that the technology isn't ready - which given this
  experience it clearly isn't. The baby is definitely at risk of being
  thrown out with the bath water. It stands in our company simply
  because I have the final call as Technical Director (CTO if you are in
  the US).
  
  I am a huge flex advocate and really doing my best to evangelise on
  the topic. What's more I think that the bridge to operational data is
  the most profound leap forward for flash, it takes it out of the world
  of gimicks and into the world of real business applications. 
  
  Jeff, you and your and team deserve huge credit for that vision and
  excellent execution.
  
  However, much as it pains me to say it, the bottom line is that the
  hibernate middle tier provided does not work, as PW and I (and a host
  of other people on various forums) have found. I know that I can
  re-write the whole thing myself and will probably have to, but when
  introducing new technologies it is unfortunately all about

[flexcoders] Re: enabling Hibernate logging through log4j with jrun/fds2

2007-02-23 Thread simonjpalmer
PW,

which sample did you use for your log4j.properties?

Thanks
Simon

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

 I have gotten hibernate logging to work by placing log4j.jar into the
 web-inf/lib directory, and placing a log4j.properties (you can use the
 sample) into the web-inf/classes directory. That was all I needed to do.
 
 good luck,
 PW
 
 --- In flexcoders@yahoogroups.com, thunderstumpgesatwork
 thunder.stumpges@ wrote:
 
  
  Does anyone know how to get hibernate logging when using FDS and the
  HibernateAssembler? From my reading on Hibernate: see
 

http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#configuration-logging
  , they use log4j, and talk about putting a log4j.properties file in
  the WEB-INF/classes directory, but I have tried this with no luck...
  
  Also, I'm not referring to Flex's Hibernate Assembler log set up by
  setting patternDataService.Hibernate/pattern in the
  services-config.xml log target... I'm talking about getting internal
  Hibernate log output.
  
  thanks,
  Thunder
 





[flexcoders] Re: parent-child hierarchy of data using Flex, FDS and Hibernate

2007-02-23 Thread simonjpalmer
PW,

I did the work to understand log4j and you're right, it is amazingly
powerful.  I added a new appender to my configuration in log4j.xml
because all the literature I found said that the .properties approach
was being deprecated.  However, this has not worked, so I'm going to
try your method from the other post.

This should work...

   !-- === --
   !-- Hibernate --
   !-- === --
   
   appender name=HIBERNATE
class=org.jboss.logging.appender.DailyRollingFileAppender
  errorHandler class=org.jboss.logging.util.OnlyOnceErrorHandler/
  param name=File value=${jboss.server.log.dir}/hibernate.log/
  param name=Append value=false/

  !-- Rollover at midnight each day --
  param name=DatePattern value='.'-MM-dd/

  !-- Rollover at the top of each hour
  param name=DatePattern value='.'-MM-dd-HH/
  --

  layout class=org.apache.log4j.PatternLayout
 !-- The default pattern: Date Priority [Category] Message\n --
 param name=ConversionPattern value=%d %-5p [%c] %m%n/

 !-- The full pattern: Date MS Priority [Category]
(Thread:NDC) Message\n
 param name=ConversionPattern value=%d %-5r %-5p [%c]
(%t:%x) %m%n/
  --
  /layout
   /appender
   
logger name=org.hibernate
level value=DEBUG /
/logger 

   category name=org.hibernate
 priority value=TRACE /
 appender-ref ref=HIBERNATE/
   /category
   category name=org.hibernate.SQL
 priority value=TRACE /
 appender-ref ref=HIBERNATE/
   /category
   category name=org.hibernate.type
 priority value=TRACE /
 appender-ref ref=HIBERNATE/
   /category



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

 
  All-in-all a very worthwhile exercise and my dev environment is now
  more under my control.
 
 Good to hear. was just replying to your previous post in this thread,
 and now I see you got it figured out. Excellent.
 
  
  I still can't figure out how to turn on debug logging in Hibernate,
 
 See this other post where I figured out how to turn on the Hibernate
 logging. If you don't know about log4j, I suggest doing a few searches
 on it, and reading up about the log4j.properties file. It's a very
 powerful tool, and Hibernate has a TON of good logging, but its easy
 to get lost in it all if you just turn everything on to debug...
 
 http://tech.groups.yahoo.com/group/flexcoders/message/59623
 
 Hibernate has a sample log4j.properties in the Hibernate/etc directory
 
 
 
  The exception is thrown way down in the bowels of the Hibernate
  session.save() method which is being called by
  HibernateAssembler.createItem.  From Jeff's last post he seemed to be
  suggesting that updateItem was in some way at fault.  I'm not quite
  seeing how that relates to my problem, although I am clearly no
expert.
  
 
 I'm not exactly sure how the problem would occur from createItem(),
 but take a look at my post here I mention what was causing it for me
 (was a lazy=false setting on the collection association of the object
 being updated)
 
 http://tech.groups.yahoo.com/group/flexcoders/message/63471
 
 The issue with the NOT NULL column was that once I had everything
 working the behavior it was doing was to null out all the FK values
 for the association, thereby dis-associating the children from the
 parent, then updating all the entries in the collection to point back
 to the parent. Once I made the association nullable, the update
 started working. (at least as far as FDS was concerned.
 
 
  
  Jeff, if you have a new version of the Assembler code and want a
  guinea-pig, send it my way.
  
 
 Likewise!
 
 cheers,
 PW





[flexcoders] Re: FDS/Hibernate Sample of updating hierarchical list of values

2007-02-23 Thread simonjpalmer
PW and Jeff,

PW, you and I seem to be in the same boat.  I am trying to fight off
the people who were flex skeptics to start with.  Not being able to
write data back makes the whole thing look pretty amateur and confirms
people's belief that the technology isn't ready - which given this
experience it clearly isn't.  The baby is definitely at risk of being
thrown out with the bath water.  It stands in our company simply
because I have the final call as Technical Director (CTO if you are in
the US).

I am a huge flex advocate and really doing my best to evangelise on
the topic.  What's more I think that the bridge to operational data is
the most profound leap forward for flash, it takes it out of the world
of gimicks and into the world of real business applications.  

Jeff, you and your and team deserve huge credit for that vision and
excellent execution.

However, much as it pains me to say it, the bottom line is that the
hibernate middle tier provided does not work, as PW and I (and a host
of other people on various forums) have found.  I know that I can
re-write the whole thing myself and will probably have to, but when
introducing new technologies it is unfortunately all about initial
perception.  

I have made a career of doing this sort of thing myself and I have
seen excellent projects fail to fly because of low initial quality,
even though we fixed them immediately, the damage was done because
people's impression was that they were flaky.  I'm sure you know it is
hard to get back from that first impression and the word of mouth that
springs from it.  Once it becomes entrenched that opinion becomes fact
and you are irrevocably lost.  If I were Adobe I would be a little
worried about the tone of the posts I am seeing about integration with
Hibernate.

The Hibernate Assembler is very important and I would really hate to
see that happen to it.  The corollary is very unfortunate.  That
little bit of technology transform the boardroom conversation about
FDS.  Suddenly the cost of the licensing of FDS becomes justifiable
against the dev cost savings because we can just plug into the ORM. 
Having made that justification myself it is very difficult for me now
to go back and say, by the way I also have to incur the dev costs. 
When asked why? I have to confess that the Adobe code doesn't work and
we don't know when we're getting a fix.  For the Flex/Flash skeptics
in the room that's a god send.

For me it is a complete nightmare.  It is hard for me to separate the
cost of FDS licenses (which is almost prohibitively large) against the
cost of dev.  I would urge Jeff and Co to get the Hibernate Assembler
code watertight and shipping asap.  If I can be of any assistance I
will gladly offer my services.

If either of you would like to contact me, post a reply and I will
happily give you my details.

Simon Palmer
Technical Director
The PMCo
62 St Peters Street
St Albans
HERTS  AL1 3HG
UK

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

 Thats very unfortunate. I'm getting farther and farther into hot water
 not being able to reliably update our data model using Flex.
 
 Last it was just wait for 2.0.1, there's a lot of Hibernate/FDS fixes
 in it and now we're waiting for another unknown amount of time for
 fixes we can only hope will help our situation.
 
 I'm apologize, I understand it's not your fault, and I really
 appreciate the insight you provide as to what can be causing our
 problems, I'm just getting up to my neck in unsolved problems.
 
 If you have any insight as to roughly when this next release could
 occur, can you tip me off?
 
 thanks,
 PW
 
 --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote:
 
  I have finished making the changes and the use of the merge call
seems
  to be a) much simpler and b) more robust than the way the current code
  works.   
  
   
  
  Unfortunately we've made enough changes to the code surrounding the
  HibernateAssembler so I can't just send you the updated file and
have it
  work in FDS2.  It will be in an upcoming public beta but I don't think
  we've announced the dates on that.  
  
   
  
  Jeff
  
   
  
  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of parkerwhirlow
  Sent: Thursday, February 15, 2007 3:29 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: FDS/Hibernate Sample of updating
hierarchical
  list of values
  
   
  
  Hey Jeff, just curious if you've got any updated HibernateAssembler
  code with some fixes? Any idea when this would be available?
  
  thanks,
  PW
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  , Jeff Vroom jvroom@ wrote:
  
   My apologies - this does look like a bug. I need to do more
testing on
   this case myself, but I think one of the big problems here is
that we
   are trying to do conflict detection on our own in the hibernate
   assembler's updateItem method. Unless you are using a 

[flexcoders] Re: FDS/Hibernate Sample of updating hierarchical list of values

2007-02-23 Thread simonjpalmer
PW, BTW pop over to the FDS forum at Adobe

http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=60catid=583

take a look at the thread called 

Parent Child Hierarchy with FDS and Hibernate

SP

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

 PW and Jeff,
 
 PW, you and I seem to be in the same boat.  I am trying to fight off
 the people who were flex skeptics to start with.  Not being able to
 write data back makes the whole thing look pretty amateur and confirms
 people's belief that the technology isn't ready - which given this
 experience it clearly isn't.  The baby is definitely at risk of being
 thrown out with the bath water.  It stands in our company simply
 because I have the final call as Technical Director (CTO if you are in
 the US).
 
 I am a huge flex advocate and really doing my best to evangelise on
 the topic.  What's more I think that the bridge to operational data is
 the most profound leap forward for flash, it takes it out of the world
 of gimicks and into the world of real business applications.  
 
 Jeff, you and your and team deserve huge credit for that vision and
 excellent execution.
 
 However, much as it pains me to say it, the bottom line is that the
 hibernate middle tier provided does not work, as PW and I (and a host
 of other people on various forums) have found.  I know that I can
 re-write the whole thing myself and will probably have to, but when
 introducing new technologies it is unfortunately all about initial
 perception.  
 
 I have made a career of doing this sort of thing myself and I have
 seen excellent projects fail to fly because of low initial quality,
 even though we fixed them immediately, the damage was done because
 people's impression was that they were flaky.  I'm sure you know it is
 hard to get back from that first impression and the word of mouth that
 springs from it.  Once it becomes entrenched that opinion becomes fact
 and you are irrevocably lost.  If I were Adobe I would be a little
 worried about the tone of the posts I am seeing about integration with
 Hibernate.
 
 The Hibernate Assembler is very important and I would really hate to
 see that happen to it.  The corollary is very unfortunate.  That
 little bit of technology transform the boardroom conversation about
 FDS.  Suddenly the cost of the licensing of FDS becomes justifiable
 against the dev cost savings because we can just plug into the ORM. 
 Having made that justification myself it is very difficult for me now
 to go back and say, by the way I also have to incur the dev costs. 
 When asked why? I have to confess that the Adobe code doesn't work and
 we don't know when we're getting a fix.  For the Flex/Flash skeptics
 in the room that's a god send.
 
 For me it is a complete nightmare.  It is hard for me to separate the
 cost of FDS licenses (which is almost prohibitively large) against the
 cost of dev.  I would urge Jeff and Co to get the Hibernate Assembler
 code watertight and shipping asap.  If I can be of any assistance I
 will gladly offer my services.
 
 If either of you would like to contact me, post a reply and I will
 happily give you my details.
 
 Simon Palmer
 Technical Director
 The PMCo
 62 St Peters Street
 St Albans
 HERTS  AL1 3HG
 UK
 
 --- In flexcoders@yahoogroups.com, parkerwhirlow parkerwhirlow@
 wrote:
 
  Thats very unfortunate. I'm getting farther and farther into hot water
  not being able to reliably update our data model using Flex.
  
  Last it was just wait for 2.0.1, there's a lot of Hibernate/FDS fixes
  in it and now we're waiting for another unknown amount of time for
  fixes we can only hope will help our situation.
  
  I'm apologize, I understand it's not your fault, and I really
  appreciate the insight you provide as to what can be causing our
  problems, I'm just getting up to my neck in unsolved problems.
  
  If you have any insight as to roughly when this next release could
  occur, can you tip me off?
  
  thanks,
  PW
  
  --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote:
  
   I have finished making the changes and the use of the merge call
 seems
   to be a) much simpler and b) more robust than the way the
current code
   works.   
   

   
   Unfortunately we've made enough changes to the code surrounding the
   HibernateAssembler so I can't just send you the updated file and
 have it
   work in FDS2.  It will be in an upcoming public beta but I don't
think
   we've announced the dates on that.  
   

   
   Jeff
   

   
   
   
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of parkerwhirlow
   Sent: Thursday, February 15, 2007 3:29 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: FDS/Hibernate Sample of updating
 hierarchical
   list of values
   

   
   Hey Jeff, just curious if you've got any updated HibernateAssembler
   code with some fixes? Any idea when this would

[flexcoders] Re: Just curious, A big development team or individual developers

2007-02-23 Thread simonjpalmer
huh, what an interesting question.

INDIVIDUAL

However, have budget for large team...

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

 I wonder how many people are working on TEAM to develop their flex
applications (and how 
 many are 1 or 2 men (whoops I mean PEOPLE) developers.  Please
discount the Graphic 
 artists, HTML coders. et. al.  If you have 3 or more people working
on the same flex 
 application, please answer as a TEAM.  2 or 1, INDIVIDUAL.
 
 Thanks
 Bruce





[flexcoders] Re: [FDS2+Spring/Hibernate] VOs reaching the backend with id=0 (unsaved-value

2007-02-23 Thread simonjpalmer
I think there are a lot of people trying it for obvious reasons. 
However all evidence would suggest it doesn't work.  I really hope
Adobe step up to this combination as it is extremely powerful.

I'd be interested to hear from anyone who has a genuine real-world
application running with a full CRUD cycle using FDS/Hibernate and
anything more than a trivial data model.

Maybe I'll start that thread...

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

 Well, it doesn't seem as though there's a great deal of actual use of 
 the FDMS/Hibernate option...
 
 I'm struggling with trying to learn it, but there seem to be some
bugs...
 
 Hey flexcoders, is it possible that no one has attempted to create new 
 entities using FDMS/Hibernate?
 
 Douglas
 
 
 
 
 Carlos Rovira wrote:
 
  Thanks Douglas,
 
  Thanks for the response.
 
  In that case, how people deal with the fact that hibernate expect IDs 
  with null value instead of 0?
  Or maybe I'm missing something?
 
 
 
 
  On 1/19/07, *Douglas McCarroll* 
  [EMAIL PROTECTED] 
  mailto:[EMAIL PROTECTED] wrote:
 
  Hi Carlos,
 
  I can't be of much help but I can tell you...
 
   Or maybe there's a way in FDS2 to configure default value to
null?
 
  ... that you can probably forget this option. FDS converts null
  values
  to zero when it converts AS objects to Java objects, and the only
  workaround is to have code on the java side that converts zeros
  back to
  nulls. There are discussions about why this is the case in the
  archive
  if you want to do some searching...
 
  Douglas
 
  -
 
  Douglas McCarroll
 
  CairngormDocs.org Webmaster
  http://www.CairngormDocs.org http://www.CairngormDocs.org
 
  Flex Developer
  http://www.brightworks.com http://www.brightworks.com
  617.459.3840
 
  -
 
 
 
  Carlos Rovira wrote:
  
   Hi,
  
   I'm switching from Toplink to Hibernate using JPA/EJB3 and
  Annotations.
   I'm facing a problem with this change due to the fact that
when I
  try
   to persist new entities Hibernate throws a
   PersistenceObjectException: Detached entity passed to persist.
   Hibernate expects new entities with ID = NULL and my new
entities
   reach the hibernate layer with ID = 0.
  
   If I were using hibernate xml config files (hbm.xml) I could use
   unsaved-value = 0 (for each entity), but I'm using
Annotations and
   there's no unsaved-value annotation to use.
  
   So, anyone reach this problem? How could I change the default
   configuration in Hibernate so new entities with ID = 0 will be
   considered as the default.
  
   Or maybe there's a way in FDS2 to configure default value to
null?
  
   Thanks for any light on this :)
  
   C.
  
  
  
  
   --
   ::| Carlos Rovira
   ::| http://www.carlosrovira.com http://www.carlosrovira.com 
  http://www.carlosrovira.com http://www.carlosrovira.com
   ::| http://www.madeinflex.com http://www.madeinflex.com 
  http://www.madeinflex.com http://www.madeinflex.com
  
  
 
 
 
 
  -- 
  ::| Carlos Rovira
  ::| http://www.carlosrovira.com http://www.carlosrovira.com
  ::| http://www.madeinflex.com http://www.madeinflex.com
 





[flexcoders] Re: FDS DataService.commit() doesn't trigger responder result()...?

2007-02-07 Thread simonjpalmer
Thanks Jeff, you're a star.  I'll have a go at this.  

For debugging I have been looking at the Eclipse wtp all-in-one
package which claims to be the dev environment for App Server code.  I
just downloaded it from Eclipse and was planning on rebuilding today.
 If I turn anything useful up I'll let you know.

IOU insert beverage of your choice here :-)

SP

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

 I personally attach to the server after it is started.  It is a pain to
 specify all of the jar files and keep that up to date in my case since
 the jars change a lot (though I have gotten that to work too...).  
 
  
 
 Unfortunately the exact way is dependent on the app server and I am
 still using jrun (yeah, been meaning to switch for a while!)
 
  
 
 For Jrun, I add this to the standard java command line args it uses:
 
  
 
   -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=2005
 
  
 
 Then my eclipse debug target is created from the Remote Java
 Application configuration.  I specify localhost and 2005 for server and
 port.
 
  
 
 Debug logging on the server is in WEB-INF/flex/services-config.xml.
 Search for level=, change that to Debug.  Make sure that Message.* and
 DataService.* are in the patterns.  I personally don't like the
 Endpoint.* unless I'm debugging serialization problems since it is
 pretty verbose and duplicates a lot of the Message.* stuff.
 
  
 
 On the client, you can use the mx:TraceTarget/ in your MXML.  It goes
 to flashlog.txt - same place as the trace statement output.
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of simonjpalmer
 Sent: Monday, February 05, 2007 4:53 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: FDS DataService.commit() doesn't trigger
 responder result()...?
 
  
 
 No answer unfortunately, but I do have two questions...
 
 1) how do you manage to debug your server side jave code? I am
 running under JBoss and using Eclipse as my IDE for both Java and
 FlexBuilder and I can't figure out how to set breakpoints in my Java
 code or attach a debugger to the server.
 
 2) how do you switch on the FDS logging?
 
 not the response you were hoping for I am sure, but you would be
 helping a fella out :-)
 
 SP
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , parkerwhirlow parkerwhirlow@
 wrote:
 
  Hi again,
  
  I've got a simple save case working as far as I can tell (from
  debugging the server java side, everything is OK after leaving the
  HibernateAssembler.java updateItem() method.
  
  But the result never gets back to the client... I have a responder
  registered to the call like so:
  
  call = service.commit();
  call.action = save;
  call.addResponder(responder);
  
  And my responder has both fault and result methods. I know the
  responder is registered because I was getting faults for a long time,
  and those were firing the fault handler. But now that I think I have
  the save going successfully, I'm not getting anything back.
  
  I've turned on FDS logging for messages, see the trace below. Seems
  like the ACK message is being sent... 
  
  Any ideas?
  
  thanks,
  PW
  
  
  02/05 11:01:36 user [Flex] 11:01:36.794 [DEBUG]
  [Message.Data.transacted] After invoke service: data-service
  reply: Flex Message (flex.messaging.messages.AcknowledgeMessage)
  clientId = null
  correlationId = null
  destination = null
  messageId = 7793A2C0-FA0D-5A78-3641-BB1BA4B4ADB5
  timestamp = 1170702096794
  timeToLive = 0
  body =
  [
  
  ]
  
  02/05 11:01:36 user [Flex] 11:01:36.794 [DEBUG] [Endpoint.RTMP]
  Serializing AMF/RTMP response
  Version: 3
  (Command method=_result (0) trxId=20)
  (Typed Object #0 'flex.messaging.messages.AcknowledgeMessage')
  destination = null
  headers = (Object #1)
  correlationId = 322C326C-9C96-8513-7EC3-934715E5D887
  messageId = 7793A2C0-FA0D-5A78-3641-BB1BA4B4ADB5
  timestamp = 1.170702096794E12
  clientId = 77909013-D108-A13B-EC7E-EDBFA5C3A894
  timeToLive = 0.0
  body = (Array #2)
 





[flexcoders] Building the FDS HibernateManager class in Eclipse

2007-02-07 Thread simonjpalmer
Hi,

I am trying to debug the FDS HibernateAssembler.  I have put the 
HibernateAssembler
HibernateManager
HibernateType
java files into my own package and adjusted dependencies accordingly.  

I am unable to build because of the following problem.  The
HibernateManager.getSession() method contains the following line of code:

if (!syncSession  DataServiceTransaction.getCurrentUserTransaction()
!= null)
syncSession = true;

I get the following two build errors:
1)
The project was not built since its build path is incomplete. Cannot
find the class file for javax.transaction.UserTransaction. Fix the
build path then try building this project
2)
The type javax.transaction.UserTransaction cannot be resolved. It is
indirectly referenced from required .class files

I can't find anything which seems to contain the UserTransaction code
or interface.  Anyone know what I need to do to my Eclipse project
dependencies to have this compile?

SP




[flexcoders] Re: FDS DataService.commit() doesn't trigger responder result()...?

2007-02-06 Thread simonjpalmer
No answer unfortunately, but I do have two questions...

1) how do you manage to debug your server side jave code?  I am
running under JBoss and using Eclipse as my IDE for both Java and
FlexBuilder and I can't figure out how to set breakpoints in my Java
code or attach a debugger to the server.

2) how do you switch on the FDS logging?

not the response you were hoping for I am sure, but you would be
helping a fella out :-)

SP

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

 Hi again,
 
 I've got a simple save case working as far as I can tell (from
 debugging the server java side, everything is OK after leaving the
 HibernateAssembler.java updateItem() method.
 
 But the result never gets back to the client... I have a responder
 registered to the call like so:
 
 call = service.commit();
 call.action = save;
 call.addResponder(responder);
 
 And my responder has both fault and result methods. I know the
 responder is registered because I was getting faults for a long time,
 and those were firing the fault handler. But now that I think I have
 the save going successfully, I'm not getting anything back.
 
 I've turned on FDS logging for messages, see the trace below. Seems
 like the ACK message is being sent... 
 
 Any ideas?
 
 thanks,
 PW
 
 
 02/05 11:01:36 user [Flex] 11:01:36.794 [DEBUG]
 [Message.Data.transacted] After invoke service: data-service
   reply: Flex Message (flex.messaging.messages.AcknowledgeMessage)
 clientId = null
 correlationId = null
 destination = null
 messageId = 7793A2C0-FA0D-5A78-3641-BB1BA4B4ADB5
 timestamp = 1170702096794
 timeToLive = 0
 body =
 [
 
 ]
 
 02/05 11:01:36 user [Flex] 11:01:36.794 [DEBUG] [Endpoint.RTMP]
 Serializing AMF/RTMP response
 Version: 3
   (Command method=_result (0) trxId=20)
 (Typed Object #0 'flex.messaging.messages.AcknowledgeMessage')
   destination = null
   headers = (Object #1)
   correlationId = 322C326C-9C96-8513-7EC3-934715E5D887
   messageId = 7793A2C0-FA0D-5A78-3641-BB1BA4B4ADB5
   timestamp = 1.170702096794E12
   clientId = 77909013-D108-A13B-EC7E-EDBFA5C3A894
   timeToLive = 0.0
   body = (Array #2)





[flexcoders] parent-child hierarchy of data using Flex, FDS and Hibernate

2007-01-29 Thread simonjpalmer
Hi,

I have a 4 level hierarchy of data in my application with a
bi-directional one-to-many relationship between each level as follows:

PlanPoint (parent)
-- UserScenario (child)
 Scenario (grandchild)
-- Competitor (great grandchild)

I have a hibernate back end running under JBoss and I am using FDS to
synchronise the changes from my Flex UI.  My DB will be Oracle, but
for the time being I am just testing with a HSQLDB for convenience.

I have managed to create a destination in FDS which will retrieve the
parent objects.  The hibernate mapping docs specify the further
retrieval of the graph of objects attached to them.  This all works
fine and performs reasonably well, although I have been unable to get
any meaningful lazy loading to work (a problem for another time).

My problem comes in that the user will interact deeply with the graph
of objects during the client session.  This includes adding, removing
and updating objects at all levels.

What I can't seem to get right is the interaction in the Flex layer
which copes with this level of interaction.

For instance if I want to add a new Competitor to a Scenario do I 
(i) create all new objects on the client and then synchronise the
server, or 
(ii) initiate creation of a new object on the server and then modify
it on the client?

I seem to have problems in both directions and the same isue for
delete and to a certain extent modify.

I only have a single FDS destination defined, so any alterations
appear to go through the PlanPoint Object at the root of the tree and
as a result much more data gets passed back and forth than I would like.  

I'm not sure if I am just a little simplistic in my design and need
more sophistication in my relationship between the client and server,
or whether I just need a bit more code in my client to manage the
object state.  

Any guidance would be greatly appreciated as I'm beginning to swim in
circles.  



[flexcoders] Documentation of FDS estination metadata tag

2007-01-29 Thread simonjpalmer
Does anyone have any reference material on the metadata tag in an
FDS destination?  It is alluded to in the User Guide with some
intriguing possibilities, but I can find no firm documentation or use
cases.

Any information gratefully received

Thanks



[flexcoders] Parent Child hierarchy of objects in FDS Hibernate

2007-01-24 Thread simonjpalmer
I have a hierarchy of objects 

parent
-- child
 grandchild
-- greatgrandchild

they are persisted in separate tables and mapped in hibernate as
bi-directional one-to-many relationships.

In flex I have a destination which retrieves the parent objects and
hibernate takes care of retrieving the graph of objects which form the
parent-child tree.

I have a set of manages AS objects in my flex project corresponding to
a simple set of pojos on the server side.  I have bound the AS objects
to datagrids in my flash application.

If I update a parent object the alterations make it cleanly through to
my DB (HSQLDB instance for testing).  If I alter anything on any of
the subordinate objects I get an identity error thrown by Hibernate
and the update fails.  

I am looking for examples of parent child relationships expressed in
the destination definitions for the HibernatAssembler in FDS.  Anyone
tried this?  

I can't find any fds/hibernate examples out there that aren't
completely trivial.


 



<    1   2   3