[flexcoders] Re: FDS mashup. Talking to multiple FDS servers in a single Flex application

2007-08-24 Thread simonjpalmer
Excellent!  

I think I would still need some serve side configuration because it
would probably be a mistake to hard code server URLs in the client
code, but that is a relatively simple task.

I am toying with sending the services-config.xml file to the client
and parsing it there.  Otherwise I am going to have to invent a
notation for defining the services.

Have you done anything along these lines?

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

 We do this successfully in our applications.
 
 We have a 'shell' Flex app which loads multiple Modules -- each of
 these modules will talk to a different server-side application. Its
 not without its subleties but as Pete says creating/setting the
 channelSet manually is key to ensure consistent behaviour.
 
 Cheers,
 Neale.
 
 --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
 
  Create multiple mx:RemoteObject instances and just programmatically
  set a ChannelSet on each one.
  
  
  mx:RemoteObject id=remoteObject1 destination=destination1 /
  
  ...
  
  mx:Script
  
  import mx.messaging.ChannelSet;
  import mx.messaging.Channel;
  import mx.messaging.channels.AMFChannel;
  import mx.messaging.channels.SecureAMFChannel;
  
  ...
  
  private function init():void
  {
  var channelSet1:ChannelSet = new ChannelSet();
  var channel1:Channel = new AMFChannel(null,
  http://server1/context/messagebroker/amf;);
  channelSet1.addChannel(channel1);
  remoteObject1.channelSet = channelSet1;
  
  }
  
  ...
  
  
  Assuming that you're only using RPC services like RemoteObject,
then you
  don't need to compile against a services-config.xml file and can just
  programmatically create your channels yourself.
  
  This approach comes in handy for lots of scenarios - poor man's load
  balancing by randomly assigning a server on SWF initialization, etc.
  etc.
  
  Pete
   
  
  -Original Message-
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of simonjpalmer
  Sent: Thursday, August 23, 2007 8:59 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] FDS mashup. Talking to multiple FDS servers in a
  single Flex application
  
  I want to use FDS/AMF to transfer data to and from my client, but
  talking to several different servers.  I have one server for routine
  persistence and data retrieval, a pojo server, but I have a second one
  for generation of formatted output, a doc server.  
  
  I want to report from the client state of the data, not the server
  state, and I want to distribute my procesing so that I can scale
up the
  architecture - doc generation can be expensive.
  
  What I would like to be able to do is use the same data transport
(i.e.
  AMF and my object model) for both the pojo server and the doc server.
  They come together in the single Flex app.
  
  Does anyone know if Flex supports this and if so how?  I seem only
to be
  able to configure an app for a single destination.
  
  OK, perhaps mashup is a bit of a stretch, but it is the same
principle.
  I am pretty sure I could do this if I used http, but I don't want
to use
  http, I am very happy with amf.
  
  Thanks
  Simon
  
  
  
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 





Re: [flexcoders] flex uploading to amazon s3

2007-08-24 Thread grimmwerks

Thanks


On Aug 24, 2007, at 6:58 PM, Peter Connolly wrote:


Should have included a link: http://tinyurl.com/2lsry7




[flexcoders] first remoteObject - basic CRUD and nothing fancy

2007-08-24 Thread shawn.gibson
I get the database part, I get HTTPServices (enough to botch my way
through it thanks to Tracy), but for a blog I'm trying to build (a
very simple blog!) I don't think HTTPService is the answer. I think I
need to use CF Remoting.

There are examples all over the place, some very simple (read a query
into a DG), some very complex (I'm trying to unravel mytodolist), but
nothing I'm finding really does just a basic CRUD. They all include
the things you'd hope to see, i.e., validation, checking IDs,
performing various methods, etc. and it's convoluting the learning
process for me.

For example, enter data into say 3 textfields (let's say ID, title,
content fields in SQL/Access), commit these textfields via 3 buttons
(functions as the create of the CRUD), and read that back into a
DataGrid, for which:

columns 1-3 allow you to click on the field in a particular row and
change the field (rename a title for example right in the datagrid),
i.e., functions as the read/update of the CRUD.  Hitting enter commits
the change to the db.

column 4: a button in an itemrenderer coded to delete the entry
altogether - functions as the delete of the CRUD.

Useless in the real world, but it will help me to understand Remoting
with Flex/CF.

Would someone be willing to help guide me through that? I just want to
see the very core stuff so I can at least get to the point where I can
begin actually using RemoteObject/CF/Flex integration, and obviously
I'll have to build on the complexity from there.

The first steps are always the hardest...and I practically had an
aneurysm trying to get HTTPServices working...

p.s. I'm about to move my Flex to my new development box, after using
my crapper for the last few months - will I have licencing issues?
It's only going to be on the new development box. The crapper won't
have Flex anymore...I only have the single license CD.

Shawn



[flexcoders] Re: first remoteObject - basic CRUD and nothing fancy

2007-08-24 Thread shawn.gibson
By 'textfields' I mean TextArea of course...sorry about that.

Shawn



Re: [flexcoders] flex uploading to amazon s3

2007-08-24 Thread grimmwerks


Argh. Does that mean only Apollo would be able to upload to s3?


On Aug 24, 2007, at 6:58 PM, Peter Connolly wrote:


Should have included a link: http://tinyurl.com/2lsry7

Sorry,
pc

On 8/24/07, Peter Connolly [EMAIL PROTECTED]  wrote:
Take a look at the Salsa application.


On 8/24/07, grimmwerks [EMAIL PROTECTED] wrote:
Has anyone attempted this before?








[flexcoders] ARGH rubyamf in debug vs non-debug

2007-08-24 Thread grimmwerks
For some reason any remote objects that I call get a 'send failed'  
when I'm in regular (non-debug) mode; but when I'm in debug mode,  
they're returning perfectly.

What is the difference in the compilation? What's NOT getting  
compiled in the non-debug mode?

This is driving me crazy.


RE: [flexcoders] Re: Loading external assets at runtime for component skinning

2007-08-24 Thread Alex Harui
I don't have any example handy.  Someone else might, but I wouldn't be
suprised if nobody does because the application startup performance
impact of using externall images as skins is significant.
 
I encourage you to pursue runtime CSS embedded assets.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of walsaadie
Sent: Friday, August 24, 2007 2:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Loading external assets at runtime for
component skinning



Thanks for your reply. any chance of an example on how to use the 
image subclass as a skin. i can't find it documented anywhere.

Thanks 

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

 Skins are embedded assets. You can choose them dynamically by 
selecting
 different CSS-based SWFs, but due to the sheer overhead of external
 loading, we don't put in code that by default.
 
 You can create a custom class that subclasses mx:Image and use that 
as a
 skin.
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of walsaadie
 Sent: Friday, August 24, 2007 10:01 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Loading external assets at runtime for 
component
 skinning
 
 
 
 Not sure if this can be done without overriding the framework. I'm 
 experimenting with deferent ways to skin components. My question, 
is it 
 possible to somehow pass a url to an external graphic to be loaded 
and 
 used as a skin for a component? For example take the button 
component. 
 If i pass a url through xml or some other method, would it be 
possible 
 to load the graphic at runtime to be used as a skin?.
 
 I've explored various methods using css sheets and binding images 
 programmatically. 
 Using the style manager to load and unload various style classes to 
 achieve the objective
 But all require the graphic to be embedded before the swf is 
compiled. 
 I'm not sure if I'm missing something. Like creating a stylesheet 
at 
 runtime and loading the graphics from that point. I currently hit a 
 brick wall. I'd appreciate it if you folks can point me to the 
right 
 direction.




 


Re: [flexcoders] Flex + SOAP + AXIS support?

2007-08-24 Thread Peter Connolly
The Flex Developer's Guide (p. 1401) states that WSDL 1.1 is supported and,
by implication, SOAP 1.1 support is a requirement of WSDL
1.1http://www.w3.org/TR/wsdl
.


On 8/24/07, bobsandywalls [EMAIL PROTECTED] wrote:

   I know that Flex supports SOAP, however what version of SOAP does it
 support and by proxy what version of AXIS is capable of providing?

 I looked online for such a requirements list, but could not find it.
 Thanks for the assistance

  



RE: [flexcoders] Re: Overriding getters/setters getting compile error

2007-08-24 Thread Gordon Smith
 I'm still getting my head around the whole
 'public get/set variableName():blah' construct
 
It's the reason that Flash and Flex APIs can be property-centric instead
of method-centric. You can make lots of things happen simply by
assigning new values to properties, because the setter method can have
all kinds of interesting side effects. In Flex, the typical thing that
happens is that the setter of a property (at least on visual components)
calls various invalidation methods which cause the component to undergo
relayout via the LayoutManager. Setters also generally dispatch various
(undocumented) event to cause binding expressions to re-evaluate.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Connolly
Sent: Friday, August 24, 2007 3:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Overriding getters/setters getting compile
error



That makes sense.  I'm still getting my head around the whole 'public
get/set variableName():blah' construct, which doesn't exist in
Java-land.

pc


On 8/24/07, Doug Lowder  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

Please pardon my jumping in here, but I think it may just be
more a 
case of duplicate names than scoping issues. The compiler
identifies 
a getter function by its name, and the same with a variable. If
you 
have both a getter and a variable named widget, how would the 
compiler be able to tell them apart and know when you wanted
just the 
variable as opposed to executing the getter function? Prefixing 
the _ to the variable name is typical convention for mking the

variable and getter/setter distinguishable from each other 
(e.g., _widget is the variable, widget is the
getter/setter).

Doug

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

 Thanks Tony, although I must admit that I don't understand why
this 
now
 works. Why can't the variable and the getter/setter methods be
in 
the same
 scope? I don't remember reading anything about that kind of 
restriction...
 
 


 On 8/23/07, Tony Alves [EMAIL PROTECTED] wrote:
 
  Your private variable and getter/setter are in the same
scope.
  try:
  private var _widget:String;
  override public function get widget():String {
  return _widget;
  }
  override public function set widget(value:String):void {
  _widget = value;
  }
  Peter Connolly wrote:
  
   I get the following compiler errors:
  
   1021: Duplicate function definition Base.as 
http://Base.as http://Base.as 
   line 11
   1021: Duplicate function definition Base.as 
http://Base.as http://Base.as 
   line 14
   1023: Incompatible override Base.as  http://Base.as
http://Base.as 
   line 11
   1023: Incompatible override Base.as  http://Base.as
http://Base.as 
   line 14
  
   If my parent class is:
  
   package
   {
   public class Base
   {
   private var widget:String;
  
   public function Base(value:String = base-level widget) {
   trace('Base.as http://Base.as http://Base.as ' -
value of widget is:  
   + this.widget);
   }
  
   public function get widget():String {
   return this.widget;
   }
   public function set widget(value:String):void {
   this.widget = value;
   }
   }
   }
  
   and the class with overriden getters/setters is:
  
   package
   {
   public class OverridenClass extends Base
   {
   public function OverridenClass(value:String = overriden
   widget value) {
   super(value);
   trace(value of widget is:  + widget);
   }
  
   override public function get widget():String {
   return widget;
   }
   override public function set widget(value:String):void {
   this.widget = value;
   }
  
   }
   }
  
   The lines that are highlighted are the ones marked as
errors by 
the
   compiler under Hotfix3, Flex 2.0.1.
  
   I thought I was following the examples shown on p. 
135 Overriding
   getters and setters in the Programming ActionScript 3.0
manual.
  
   Can anyone point out to me why this is not working?
  
   __._,_
  
  
 









 


RE: [flexcoders] Getter and Setter Ramifications...

2007-08-24 Thread Gordon Smith
 I'm wondering what the caveats are of using getters this way.
 
My only caveat would be that we consider it best practice for getters to
be lightweight. If you do a lot of computation in a getter, other people
using your getter may not realize that it is slow, and they might call
it too frequently, say in a loop. People's expectation is that
properties are fast while methods are slower. So if we have a
heavyweight method that computes something at returns it, we make it a
method instead.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bithroop
Sent: Friday, August 24, 2007 3:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Getter and Setter Ramifications...



I have been using getters and setters in places where I don't
necessarily have a private member variable that I'm affecting, but
instead am doing one of the following:

- using a getter to run a function that collects implicit data. Like
for instance, I might step through a list and return all members that
have a field set to TRUE. So instead of keeping a private var of this,
I just return the result.

- using a getter to do the same but just so I can see what the
contents are in the debugger.

I'm wondering what the caveats are of using getters this way. Anyone?



 


[flexcoders] Problem detecting data change in a List

2007-08-24 Thread williamkusumo
Hi!

I have a List bound to an ArrayCollection. And this List is draggable,
so you can re-arrange the items. You can also remove or add stuff to it.

I would like to do something when the List is modified, but
'dataChange' doesn't seem to work. Anyone has any idea? 'change' is
not what I want since it only detects changes to
selectedItem/selectedIndex.

I've thought about putting an event listener on the ArrayCollection
itself, but the problem is the ArrayCollection can be null under some
circumstances.

Any help appreciated!



RE: [flexcoders] Problem detecting data change in a List

2007-08-24 Thread Gordon Smith
I think you want to listen to collectionChange on the ArrayColleciton
itself, and arrange for it to be empty instead of null.
 
But if you really must know when the dataProvider property becomes null,
I think you'll need to subclass List and override the dataProvider
setter.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of williamkusumo
Sent: Friday, August 24, 2007 9:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem detecting data change in a List



Hi!

I have a List bound to an ArrayCollection. And this List is draggable,
so you can re-arrange the items. You can also remove or add stuff to it.

I would like to do something when the List is modified, but
'dataChange' doesn't seem to work. Anyone has any idea? 'change' is
not what I want since it only detects changes to
selectedItem/selectedIndex.

I've thought about putting an event listener on the ArrayCollection
itself, but the problem is the ArrayCollection can be null under some
circumstances.

Any help appreciated!