RE: [flexcoders] What's the official consensus of using CodeBehind??

2007-02-08 Thread Alex Uhlmann
I agree with Ralf's view and have recently blogged about it.
http://weblogs.macromedia.com/auhlmann/archives/2007/02/best_practice_c.
cfm
 
Best,
Alex
 

 

 

Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

Adobe Systems Europe Limited | Registered office: 151 St. Vincent
Street, Glasgow G2 5NJ | Company No. SC101089

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ralf Bokelberg
Sent: 08 February 2007 21:25
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] What's the official consensus of using
CodeBehind??



This is just my personal view though, i'm not aware of an official
version. 
Cheers,
Ralf. 


On 2/8/07, Ralf Bokelberg  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

What is your reasoning to use code behind? Why would you want to
double every class and add an additional inheritance layer just to
separate Mxml from ActionScript? Why would you want to declare every
component you are using twice, once in AS and the second time in Mxml?
Is it to separate presentation from functionality? Generally this is a
good idea, but i think it is important where to draw the line between
the two. When you think of traditional systems with a template engine as
the presentation layer, the templates also contain some code to build
the presentation, while the functionality is implemented by plain
classes. Now if we translate this thinking to Mxml and ActionScript, we
should leave all the code we need to build the presentation inside the
Mxml files and factor out the real functionality into classes. So i'd
say, there is no! thing wrong with ActionScript in Mxml files as long as
it is strictly presenation related. 

Cheers
Ralf. 




On 2/8/07, Mike Anderson  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

Hello All,

Could some of you more savvy coders, please take a
moment of your
valuable time and throw some words of wisdom out there
regarding
CodeBehind?

Since I love using Packages and Classes, it feels very
natural for me to
use this method.

BUT, based on where things are going with Flex, is this
considered to be
a good programming practice?

I would love to know sooner versus later, so that I
don't have to back
and redo a bunch of coding. I am a REAL stickler when it
comes to good
coding practices.

Thanks in advance for your time on this,

Mike







-- 
Ralf Bokelberg [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 
Flex  Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35 




-- 
Ralf Bokelberg [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 
Flex  Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35 

 


att77266.gif
Description: att77266.gif


RE: [flexcoders] Alex's Distortion effects

2007-02-07 Thread Alex Uhlmann
Hi there, 
 
SimpleFlip is just an MXML component, which contains the setup code for
the effects. There are various examples provided in the download like
that. Check out the Creating and Extending Flex 2 Components
documentation, chapter Creating MXML components for more information.
 
Best,
Alex
 

 

 

Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

Adobe Systems Europe Limited | Registered office: 151 St. Vincent
Street, Glasgow G2 5NJ | Company No. SC101089

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of danj520
Sent: 07 February 2007 00:45
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Alex's Distortion effects



http://weblogs.macromedia.com/auhlmann/archives/2006/11/download_distor.
cfm
http://weblogs.macromedia.com/auhlmann/archives/2006/11/download_distor
.cfm 

The example has the following code:

?xml version=1.0 encoding=utf-8?

mx:Application 
xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
xmlns:distortion=view.distortion.*

distortion:SimpleFlip /
/mx:Application

Do you run this or integrate into other code?

I love these distortion effects, but don't have a clue how to
implement them. Also get Design Mode: Error creating item SimpleFlip
even though paths to classes are correct. Can anyone help me? Thanks
again in advance.. 



 


adobe_logo.gif
Description: adobe_logo.gif


RE: [flexcoders] Binding a property to a function

2007-01-26 Thread Alex Uhlmann
Checkout 
mx:Binding and function bindings from Chapter 37 in Part 5 of Flex 2
Developer Guide about Bindings.
 
and Observe/ObserveValue
http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s.
cfm#more 
http://weblogs.macromedia.com/paulw/archives/2006/05/the_worlds_smal.cf
m 
 
Best,
Alex

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Lieven Cardoen
Sent: 26 January 2007 13:21
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Binding a property to a function



Is it possible to bind a property to a function... A bit like the
MVC-pattern...

When a property changes, a function should be triggered...

BindingUtils can't seem to do this.

Thx, Lieven Cardoen

Lieven Cardoen
Application developer

indiegroup
interactive digital experience
engelse wandeling 2 k18 
b8500 kortrijk 

 


att14d75.gif
Description: att14d75.gif


RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding

2007-01-20 Thread Alex Uhlmann
Closer to your mx:Binding tag is:
 
BindingUtils.bindProperty( userVO, Name, this, [ nameTextInput,
text ] );
 
but keep in mind that binding of mx.binding.utils using ChangeWatcher
and BindingUtils work differently from the mx.binding package (MXML
compiler binding). The latter supports much more use cases, i.e. binding
to expressions, XML, having functions and Array elements in property
chains, etc. BindingUtils i.e. only supports property chains. 
 
I'd question why you would want to replace all our MXML bindings when
it's working like a charm for you? ;) Aren't MXML bindings (curly
braces, function bindings, mx:Binding/Observe) easier to write and
maintain?
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: 20 January 2007 05:14
To: flexcoders@yahoogroups.com
Subject: [flexcoders] BindingUtils.bindProperty versus mx:Binding



Hello All,

I am not having much luck, using the bindProperty method of creating
bindings.

At the moment, I am using the mx:Binding method, and it's working like
a charm.

But, I am trying to get away from this, so I can put all my binding
logic into my ActionScript Code. I was under the impression, that
BindingUtils.bindProperty was the ActionScript direct replacement for
the mx:Binding tag.

A quick example of my usage:

BindingUtils.bindProperty( nameTextInput, text, userVO, Name );

Which replaces:

mx:Binding source=nameTextInput.text destination=userVO.Name/

I've tried executing the AS code, in the CreationComplete and the
Initialize Functions of my Control, without any success. I just don't
get any data binding taking place - unless, I am still executing this
code too early, and need to listen for another event. Still, I thought
CreationComplete or Initialize only fired off, when pretty much
everything on the Control was 100% instantiated.

Am I properly using the AS Bindings, or is there something else I am
missing?

Thanks in advance for your help,

Mike


 


att1c92c.gif
Description: att1c92c.gif


[flexcoders] Re: ObserveValue, and how to reference within AS3 Class File

2007-01-16 Thread Alex Uhlmann
Hi Mike,

Observe and ObserveValue have been designed to work with MXML binding
only. The curly braces in the source and handler properties are being
treated differently by the MXML compiler than just simple ActionScript
assingments as you do in your example. Therefore, the current
implementation relies on the MXML compiler and cannot be used in
ActionScript. 

However, I'd be intersted in why you want to use data binding in an
ActionScript environment (for your ActionScript model or utility
classes). In my experience, using a pure EventDispatcher is easier to
write and most importantly to read (especially for other developer,
potentially coming from other technologies). Just let your class
dispatch a custom event when something important happens. Or if you
cannot do that easily, listen to the propertyChange event of Bindable
properties.

Best,
Alex


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

 Hello All,
 
 I am trying to figure out how to use the ObserveValue Component, when I
 use it inside of a Class File.
 
 In all the examples I've seen, they all utilize the Class File as a MXML
 Component - and when I use it in this manner, it works just fine.
 
 BUT, I really need to use this inside my Class Files - and as far as I
 can tell, I should be able to import the Class File, and create a new
 variable - casting it as an ObserveValue() - but when I use it this way,
 nothing happens.
 
 Per the examples, here is the proper use of the file:
 
 ac:ObserveValue 
   id=valueObserver 
   source={ model.myVarToBeWatched } 
   handler=valueObserverHandler 
   value=true/
 
 Now, I'd like to use it using pure ActionScript - and here's what I got
 so far: (keep in mind, the AS Class File below, is extending the Control
 in which it belongs to - and rest assured, that I am placing all the
 appropriate code within all the proper Event Listeners, like
 onCreationComplete, etc.)  I am just keeping it simple, for this
 particular post.
 
 package
 {
   import com.adobe.ac.*;
   
   class myClass extends Panel
   {
   private var myObserve:ObserveValue = new ObserveValue();
   [Bindable]
   public var model:ApplicationModel =
 ApplicationModel.getInstance();
   
   public function myClass():void
   {
   initObservers();
   }
   
   private function initObservers():void
   {
   myObserve.source = model.myVarToBeWatched;
   myObserve.handler = valueObserverHandler;
   myObserve.value = true;
   }
   
   private function valueObserverHandler( event:Event
 ):void
   {
   trace( it worked );
   }
   }
 }
 
 In my real code, I wait for the Creation Complete Event, before I
 initialize all of my Event Listeners, etc.  So you can assume that my
 real code, is properly setup.
 
 My real question here is, when creating component written purely in AS3,
 can they be used either way - like as an inline Component in MXML, or if
 you choose, referenced within an AS3 Package?  I don't see why not,
 since MXML Controls are all just Class Files anyway...
 
 So I just wanted to know if somebody could shed some light on what I'm
 doing wrong, or if the ObserveValue Class just wasn't designed to be
 used in this manner.
 
 Thanks in advance for all your help,
 
 Mike





RE: [flexcoders] AC Observe Tag

2007-01-11 Thread Alex Uhlmann
Hi Bjorn,
 
are you using the extended version of Observe?
http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s.
cfm#more
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: 12 January 2007 05:09
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AC Observe Tag



More or less this post is a question. 

With regards to the use of Adobe Consulting's Observe utility i'm not
getting the expected result.

I've got some simple code where i wish to execute a function when a
value gets set via binding.
When i create my Observe instance the value has not yet been set.

The unexpected result is that,
1. The callbackHandler gets fired immediately after i set
observe.handler, even though the value i have set to observe.source is
== null
2. The callbackHandler is not getting called when the value does get
set.

Here's my code anyway.

private function init():void
{
var ac:Observe = new Observe();
ac.source = distribMap_model.templateSwfAsset;
ac.handler = playTemplatePreview;
}

private function playTemplatePreview(e:*):void
{
trace('playTemplatePreview');
}

private var model:AMModelLocator = AMModelLocator.getInstance();
[Bindable]
private var distribMap_model:DistribMappingModel =
model.tc_model.distribMap_model;

 


adobe_logo.gif
Description: adobe_logo.gif


RE: [flexcoders] event folder in cairngorm organization?

2007-01-05 Thread Alex Uhlmann
I wouldn't care too much about what you name the folder for events as
long as it's easy enough to be found by your team. Nevertheless,
regarding this topic I found it usefull to differentate Cairngorm events
(extend CairngormEvent) and view or application events (extend i.e.
EventDispatcher) Often I see view events as events sub folder(s) below
your view folder. If you use hierachies of folder or not really
depends on the complexity of your project.
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: 04 January 2007 21:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] event folder in cairngorm organization?



I noticed that in Alex Uhlmann's code for the sample stock market
dashboard he adds an 'event' directory to the standard cairngorm
directories.

http://www.alex-uhlmann.de/flash/adobe/blog/dashboard/iteration1/srcview
/index.html
http://www.alex-uhlmann.de/flash/adobe/blog/dashboard/iteration1/srcvie
w/index.html 

Other's simply put events in the control folder. I assume this is
purely coder preference on how to organize these directories, but I
figured I should ask if there is any reason to separate out events
from controls? Or should one make an event's folder a sub- directory
of 'control'. Does it really matter?

Sorry if this seems like a somewhat silly question!

thanks, Kevin



 


att7b49a.gif
Description: att7b49a.gif


RE: [flexcoders] Flex Builder 2.0.1 and problem with DistortionEffects library, here's a fix

2007-01-05 Thread Alex Uhlmann
Thanks Brian,

Due to the effects framework update in Flex 2.0.1 there are two versions
of the Distortion effects available now. You can download the Flex 2.0.1
compatible version here: 
http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects_Flex_2
_0_1.zip

 
Best,
Alex

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of klumikaze
Sent: 05 January 2007 14:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Builder 2.0.1 and problem with
DistortionEffects library, here's a fix



The new version of Flex Builder 2.0.1 seems to cause compatibility
issues with Alex 
Uhlmann's DistortionEffects library. 

For anybody having issues with this, I have found a solution. The
problem is on line 51 of 
Flip.as (com.adobe.ac.mxeffects.Flip).

It seems the TweenEffect class, which Flip extends, now uses
IEffectInstance instead of 
EffectInstance. If you change the following function to accept an
IEffectInstance and fix 
your import at the top of Flip.as, you should have a working version
again.

Change this:

override protected function initInstance( instance : EffectInstance ) :
void

To this:

override protected function initInstance( instance : IEffectInstance ) :
void

And this:

import mx.effects.EffectInstance

To this:

import mx.effects.IEffectInstance

Cheers!

Brian



 


att25821.gif
Description: att25821.gif


RE: [flexcoders] Using View States with Form Container

2006-12-29 Thread Alex Uhlmann
Maybe you're running into a bug here. Try adding the following handler
to the updateComplete event of your Form component.
 
   private function initializeForm( form : Form ) : void
   {
var target : Form = form;
if( target == null ) return;

for each( var child : UIComponent in target.getChildren() )
{
 if( child is FormItem )
 {
  child.invalidateSize();
 }
}
   }
 
 
Best,
Alex

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of brian_m_riley
Sent: 26 December 2006 21:57
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using View States with Form Container



I've created a base state with a Form (we'll call it myForm)
containing 3 FormItems each containing a TextInput; I've also created
2 additional view states:

State FooA just has a FormItem with a ComboBox and is based on above
base state, and is added as the last child of myForm.

State FooB has 2 FormItems, one with a ComboBox, and the other with
a TextInput and is also based on the above base state, and is also
added as the last children of myForm.

I change the state depending on the input in the 3rd TextInput in the
base state. The states change correctly, and I see the additional form
fields, but they do not vertically align with the rest of the fields
in the base form. The added fields are always shifted to the right.

Thoughts?
-riley



 


adobe_logo.gif
Description: adobe_logo.gif


RE: [flexcoders] Re: Cairngorm createPopUp in a command

2006-12-17 Thread Alex Uhlmann
I'd suggest to invoke the popup from a view. IMHO, creating a popup or Alert is 
something only views should be concerned about. Part 4 of my Cairngorm series 
talks about this: 
http://weblogs.macromedia.com/auhlmann/archives/2006/09/cairngorm_sampl_3.cfm#more
 
Basically, your command changes a state in the model and a view (MXML) listens 
to it with i.e. using an Observe tag. The view could then either call the popup 
API in a Script block or might use a helper class to do that as Dimitrios 
showed.
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael 
Ritchie
Sent: 14 December 2006 16:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm createPopUp in a command



That reminds me of Jesse Warden's Debugger window he uses in his
Cairngorm examples. I looked at this post just yesterday as we needed
to create a custom alert message window that is shown from the Command
onFault function. 

What I did was add a new ArrayCollection object to the Model called
errorAlert. Then in the Main.mxml file I created a ArrayCollection
collectionChange event listener that handles any change to the
errorAlert. In each command I add create an error object and add
that object to the errorAlert like model.errorAlert.addItem(myObj). 
This fires the collectionChange event and from Main.mxml I pop up my
custom alert component. 

There seems to be no real elegant way to throw custom message
components from the Command in Cairngorm, but I like your way
Demitrios, it might be cleaner than listening to changes to the
ArrayCollection object. I did think of one advantage of using my
method, you could create a queue of the alert messages and do clean up
with by firing the collectionChange event when you removeItemAt from
the ArrayCollection. This could produce and handle multiple alert
messages layered on top of each other. 

Michael Ritchie
Xdrive.com

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

 I have this pop up in a library btw. Use like so:
 
 somewhere in the app init:
 StatusWindow.init( rootView );
 
 in your execute() method:
 StatusWindow.show( Searching..., false );
 
 in your result() method:
 StatusWindow.hide();
 
 in your fault() method:
 StatusWindow.show( Error, true, details );
 
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On Behalf Of Dimitrios Gianninas
 Sent: Thursday, December 14, 2006 11:24 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: RE: [flexcoders] Re: Cairngorm createPopUp in a command
 
 
 
 Tim... what you need is attached :) Enjoy.
 
 I got a whole bunch of them :)
 
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On Behalf Of Daniel
 Sent: Thursday, December 14, 2006 11:08 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Cairngorm createPopUp in a command
 
 
 
 Great solutions, however... What if I use Cairngorm as a Library. This
 means that it's outside my Application project and it wouldn't be
 possible to instance in the Command a TitleWindow located in the
project.
 
 Any ideas?
 
 Thanks in advance!
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
mailto:flexcoders%40yahoogroups.com , Tim Hoff TimHoff@ wrote:
 
  Is it possible to create and remove a popup in a Cairngorm command? I 
  have a simple application that has two primary components; sidePanel 
  and mainPanel. Various child components are added to the primary 
  components, depending on the state of the application. What I want to 
  do is create a popup in the mainPanel when the user clicks a search 
  button in the sidePanel. The popup is a small component that shows a 
  progress bar with a searching label. In the searching command, 
  executed with a cairngormEvent when the sidePanel search button is 
  clicked, I want to create the popup. onResult, remove the popup and 
  change state to display a grid. onFault, remove the popup and display 
  an Alert. I'm having a problem referencing the mainPanel as the popup 
  parent and listening for an event to remove the popup. I've tried 
  several different approaches with no success. If anyone could get me 
  moving in the right direction, I would greatly appreciate

RE: [flexcoders] Question regarding Alex Uhlmann's DistortionEffects library

2006-12-17 Thread Alex Uhlmann
Hi Brian,
 
have you checked out the supplied SimpleFlipTransition.mxml? This
example shows usuage of States and Transitions with the distortion
effects. Generally, the idea is to first apply the effect and afterwards
the state change of the view (i.e. via currentState, ViewStack, manually
addChild/removeChild etc). Also of interest might be
SimpleManualFlip.mxml. The effects should work in every environment. If
you experience problems, let's fix them. Feel free to drop me an email
offlist (with a reproducable example). 
 
Best,
Alex

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Dunphy
Sent: 14 December 2006 20:07
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question regarding Alex Uhlmann's
DistortionEffects library



I've been looking in to Alex Uhlmann's DistortionEffects library
(
http://weblogs.macromedia.com/auhlmann/archives/2006/11/download_distor.
cfm
http://weblogs.macromedia.com/auhlmann/archives/2006/11/download_distor
.cfm )
and I'm trying to figure out how to implement these effects in to an
existing application.

Essentially, here's my problem:

We have an existing application with a dashboard. Within that
dashboard are Widgets. Widgets are an extension of DragPanel
(extension of TitleWindows) that are the children of a Canvas. I chose
to implement my own drag/drop functionality with TitleWindows so that
I could restrict dragging to the Canvas area.

Each Widget has a front (main UI) and a back (configuration).
Currently I am using states and simple transitions to go back and
forth between the two views of a Widget. My end goal is to use a Flip
effect (available in the DistortionEffect library) to flip the widgets
over to configure them, just like an OS X dashboard widget.

All of the examples on Alex's site seem to make use of two or more
Panels within a ViewStack to accomplish the flipping effect. Can
anybody think of a way to implement the desired effect without
completely changing my Widget architecture?

My next step might be to try to make a draggable ViewStack container
if I can't figure out another option.

Any ideas would be appreciated!

Thanks,

Brian Dunphy


 


adobe_logo.gif
Description: adobe_logo.gif


RE: [flexcoders] Business Objects and Value Objects/Cairngorm. Distinction?

2006-12-09 Thread Alex Uhlmann
What I refer to as a business object in this article, you could also
just call a model object. Because of the simplicity of the example it
might look like a VO at the beginning, but read further articles in the
series to get an idea where this potentially can go towards. It can be
much more than just a VO, which responsiblity is to transfer data accros
tiers. The Cairngormstore, the ShoppingCart would be another model
object. You can easily unit test these objects and I encourage everyone
to extract the right functionality from commands and views into objects
such as this when your application demands a better separation of
concerns.
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lostinrecursion
Sent: 09 December 2006 10:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Business Objects and Value Objects/Cairngorm.
Distinction?



Hi all,

I was reading a fantastic series by Alex Uhlmann on How Business
Logic can Manage Your Views
(
http://weblogs.macromedia.com/auhlmann/archives/2006/06/cairngorm_sampl.
cfm
http://weblogs.macromedia.com/auhlmann/archives/2006/06/cairngorm_sampl
.cfm )

I have one question for someone who may know. Could someone tell me
the difference between a Business Object (such as the one Alex uses to
encapsulate model properties) and a Value Object (which I am used to
constructing).

Is it fair to say a business object is just a faux collection of
various Value Object (and non VO) properties in one convenient location?

Likening it to the Cairngorm Store, would a ShoppingCart be a Business
Object (as it encapsulates properties and performs application logic)
while a ShoppingCartElement might be a Value Object?

Thanks.



 


adobe_logo.gif
Description: adobe_logo.gif


RE: [flexcoders] Re: Cairngorm's Anaemic Domain Model

2006-12-05 Thread Alex Uhlmann
Hi Lach,
 
there many ways to use Cairngorm. I agree with you completly, it's of
vital importance to refactor the right functionality from both, views
and commands into model objects that mean something to your use case.
Then, this functionality can also be easier unit tested. Just lets keep
in mind that there's also view functionality like effects code etc,
which wouldn't make too much sense in a model, instead they can often be
refactored into utility classes ( which you might want to call view
helpers ;) )
 
However how your model is going to look like depends on your specific
needs. Cairngorm doesn't tell you how to design your custom model or
your custom view. It's the infractucture around that. 
 
My blog entries around that, which Douglas pointed out, have the indent
to show one possible route to go towards this direction. Nevertheless,
it's difficult to show that in examples, since there's a tradeoff in
completeness and complexity vs. easy to understand examples and most
importantly...time.  ;)
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Lachlan Cotter
Sent: 05 December 2006 11:30
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model



My question isn't about the model locator. It's about logic, or lack
thereof encapsulated within the domain objects.


On 05/12/2006, at 9:59 PM, Tim Hoff wrote:


It doesn't matter if it's a collection of dumb value objects,
a 
component, a state variable, or just a common effect. If an
object 
is used more than a couple of times in the app, put it in the
ModelLocator.  Remember, everything is an object; instantiated
and 
destroyed like the rest of them (GC?:)).  The key is; does the
object 
need to be reusable?  If so, make it central.

-TH

p.s. right on Tom.


 


att8d3e9.gif
Description: att8d3e9.gif


RE: [flexcoders] Re: need strategy for filtering ArrayCollections in a Cairngorm app

2006-12-05 Thread Alex Uhlmann
Hi Rick,
 
I havn't read the complete thread below, but since you're saying you're
working in a Cairngorm app, to me this looks like functionality that
should live in either one or multiple model object(s), instead of the
view. The view could just bind to a property (some collection) of that
model and update it via encapuslated API requests aka commands. Would
that work for you?
 
Best,
Alex

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Schmitty
Sent: 05 December 2006 17:01
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: need strategy for filtering
ArrayCollections in a Cairngorm app



To dig up an old thread... How would you go about this if you had a
component that you wanted to reuse for different views of the data
that could be filtered additionally by that view?

I've run into a similar problem Tom had where the filterFunction is
passed along or overwritten. It seems my only choice (good or bad?)
is to have all possible filtering functions in the component and pass
the component some logic on which to use for its 'base' data in
addition to any user filter applied on the already filtered 'base'
data set

Perhaps I'm going about it the wrong way. I've modified Paul's example
below:

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
creationComplete=initialise() xmlns:local=*
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.ListCollectionView;
import flash.utils.Timer;

[Bindable]
public var master : ArrayCollection = new ArrayCollection();

[Bindable]
public var slave1 : ListCollectionView = new ListCollectionView(master);
[Bindable]
public var slave2 : ListCollectionView = new ListCollectionView(master);
[Bindable]
public var slave3 : ListCollectionView = new ListCollectionView(master);

public var value : int = 0;

public function initialise() : void
{
slave1.filterFunction = filterOdd;
slave1.refresh();
slave2.filterFunction = filterEven;
slave2.refresh();
slave3.filterFunction = filterDivBy10;
slave3.refresh();

var timer : Timer = new Timer( 10, 50);
timer.addEventListener( timer, addValue);
timer.start();
}

public function addValue( event : Event ) : void
{
master.addItem( ++value );
}

public function filterOdd( item : Object ) : Boolean
{
var value : int = int(item);
return value % 2 == 1
}

public function filterEven( item : Object ) : Boolean
{
var value : int = int(item);
return value % 2 == 0
}

public function filterDivBy10( item : Object ) : Boolean
{
var value : int = int(item);
return value % 10 == 0
}
]]
/mx:Script

mx:HBox width=100%
mx:VBox
mx:Label text=Master List/
mx:List editable=true dataProvider={ master } height=400/
/mx:VBox
local:slave slaveData={slave1} label=odd/
local:slave slaveData={slave2} label=even/
local:slave slaveData={slave3} label=divisible by 10/

/mx:HBox
/mx:Application

** slave.mxml **

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
xmlns:ac=com.adobe.ac.util.*
creationComplete=complete() initialize=init()
mx:Script
![CDATA[
import mx.collections.ListCollectionView;

[Bindable]
public var slaveData:ListCollectionView;

public function filterDivBy5(item:Object):Boolean {
var value : int = int(item);
if (filterOn.selected)
return value % 5 == 0 
else
return true;
}

private function init():void {
trace(init);
debug();
trace();
}

private function complete():void {
trace(complete); 
slaveData.filterFunction=filterDivBy5; 
debug();
trace();
}

private function filter():void {
trace(filter);
debug();
slaveData.refresh();
trace();
}


private function debug():void {
if (slaveData == null) {
trace(slaveData object is null);
return;
}

trace(length: +slaveData.length);
if (slaveData.filterFunction==null)
trace(filter function: null);
else if (slaveData.filterFunction==filterDivBy5)
trace(filter function: DivBy5);
else
trace(filter function: parent filter);
}

]]
/mx:Script
mx:Label id=slaveLabel text={this.label}/
mx:List dataProvider={slaveData} height=400 editable=true/
mx:CheckBox id=filterOn label=Filter by Div5 change=filter()/
mx:Button click=debug()/
/mx:VBox

On 6/10/06, Paul Williams [EMAIL PROTECTED] mailto:paulw%40adobe.com 
wrote:
 Hi Tom,

 A nice way to do this is to create a master that is an
ArrayCollection, and then for each of your filtered lists you use a
ListCollectionView. When you create your ListCollectionView you pass
your master list in as a constructor parameter (because ArrayCollection
implements Ilist). You can then add a filter function to each of your
filtered lists without affecting the master. Each ListCollectionView
will listen

[flexcoders] Distortion Effects

2006-11-03 Thread Alex Uhlmann





Here's something for 
ya:
http://weblogs.macromedia.com/auhlmann/archives/2006/11/download_distor.cfm

;)
Alex


  
  

  


  
  
Alex 
Uhlmann Consultant (Rich Internet Applications)Adobe 
ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, 
Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969m: +44 (0) 
7917 428 951[EMAIL PROTECTED]http://weblogs.macromedia.com/auhlmann

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



RE: [flexcoders] JUST SAY NO to creationPolicy=all !

2006-10-31 Thread Alex Uhlmann





Hi Benoit,

can you tell us more wherebindings didn't work for 
you?

Best,
Alex



  
  

  


  
  
Alex 
Uhlmann Consultant (Rich Internet Applications)Adobe 
ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, 
Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969m: +44 (0) 
7917 428 951[EMAIL PROTECTED]http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Benoit 
HediardSent: 31 October 2006 15:40To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] JUST SAY NO to 
creationPolicy="all" !


In most cases and in a "perfect" world, it can be avoided.But in some 
specific cases, it is very useful, especially to workaround somebinding 
bugs...In our app (a pretty complex one), we use as much as possible the 
CairngormModelLocator and bindings.But we have some views that could not 
be configured by bindings or atinitialization, so we are using cairngorm 
ViewHelpers to do that.In order to use viewHelpers, you have to be sure that 
the view has beeninstantiated.Deferred instantiation is not "always 
the way to go".So please, do not remove this option... ;)Benoit 
Hediard#affinitiz.com-Message d'origine-De : [EMAIL PROTECTED]ups.com 
[mailto:[EMAIL PROTECTED]ups.com] 
De lapart de Adam DorritieEnvoyé : mardi 31 octobre 2006 14:37À : [EMAIL PROTECTED]ups.comObjet 
: Re: [flexcoders] JUST SAY NO to creationPolicy="all" !On 
10/30/06, Gordon Smith [EMAIL PROTECTED]com wrote: 
rant I've never seen a case where it is necessary to push data 
into thecontrols before they exist. If you must put the data somewhere in 
themeantime, store it in data vars, which have none of the startup cost of 
avisual component, and then move it into the controls after they get 
created. /rantI guess I'm wondering why, if 
there is apparently no use case for this"feature" and deferrred 
instantiation is "the way to go," it is included inthe language at all. Is 
there never a case to use this option?--Flexcoders Mailing 
ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links
__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



RE: [flexcoders] cairngorm .99 to cairngorm 2

2006-10-14 Thread Alex Uhlmann
Just to add to Dimitios here, keep in mind that most of the migration
effort described in my blog entry at point 3 was only related to the
type of event dispatching we've used in previous Cairngorm beta versions
during the Flex 2 beta. They don't apply when you're migrating from Flex
1. In fact, as Dimitios says, your migration should be easier.

Alex

Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dimitrios Gianninas
Sent: 14 October 2006 14:09
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] cairngorm .99 to cairngorm 2

Hi,

Cairngorm 0.99 and 2.0 are very similar so I dont think there is
anything to watch out for in particuliar. 

Perhaps you might want to read an article by Alex just in case:
http://weblogs.macromedia.com/auhlmann/archives/2006/07/cairngorm_2_for.
cfm


Dimitrios Gianninas
Optimal Payments Inc.



-Original Message-
From: flexcoders@yahoogroups.com on behalf of fuad_kamal
Sent: Fri 10/13/2006 10:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] cairngorm .99 to cairngorm 2
 
I'm migrating a flex 1.5 ap to 2.0, for which the migration doc from
Adobe is extremely useful.  The app uses Cairngorm, I was wondering if
there are any known issues to look out for or a guide for moving from
Cairngorm 0.99 to the current version of Cairngorm.

thanks





--
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

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



RE: [flexcoders] Re: cairngorm: calling a function in a view

2006-09-29 Thread Alex Uhlmann





Hey Guys,

FYI, I've just blogged about this 
topic.
http://weblogs.macromedia.com/auhlmann/archives/2006/09/cairngorm_sampl_3.cfm
http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s.cfm

Best,
Alex



  
  

  


  
  
Alex 
Uhlmann Consultant (Rich Internet Applications)Adobe 
ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, 
Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969m: +44 (0) 
7917 428 951[EMAIL PROTECTED]http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Tim HoffSent: 
18 September 2006 16:35To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Re: cairngorm: 
calling a function in a view


That would be fantastic Alex. Thank you for your thoughts concerning this 
topic. I look forward to reading your blog.-TH--- In [EMAIL PROTECTED]ups.com, 
"Alex Uhlmann" [EMAIL PROTECTED]. wrote: Hi 
there,  I'd suggest letting the Command retrieve a model object 
via ModelLocator. Then, some state property in the model changes which 
could trigger an event. Views could listen to either EventDispatcher 
events or via Bindings. Following the Binding approach, your view 
could bind to single properties, call methods on the view via 
function bindings or if you explicitly want to let the view react to 
a model's state change with calling a view method (i.e. invoking an 
effect or popup), which doesn't necessarily return a value to a MXML 
component, you can use mx:Binding or Paul's Observe tag.  http://weblogs.macromedia.com/paulw/ 
Tim, you're right. I'll hopefully get to post something about this 
later this week.  Best, Alex 
 Alex Uhlmann  Consultant (Rich Internet Applications) 
Adobe Consulting Westpoint, 4 Redheughs Rigg,  South Gyle, 
Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6969 m: +44 (0) 7917 
428 951 [EMAIL PROTECTED] http://weblogs.macromedia.com/auhlmann 
   
  From: [EMAIL PROTECTED]ups.com 
[mailto:[EMAIL PROTECTED]ups.com] 
On Behalf Of Tim Hoff Sent: 18 September 2006 04:29 To: 
[EMAIL PROTECTED]ups.com 
Subject: [flexcoders] Re: cairngorm: calling a function in a view 
   Yes, your login example illustrates a common way to 
drive the view  through the ModelLocator. However, I agree with you that 
it would  be cleaner to have a view method to do this sort of thing 
instead of  a huge model with lots of references. The only problem 
with  referencing a view function directly from a command, is that if 
you  remove the view or the function, the command breaks (violates 
 encapsulation). If you really wanted to do this from a command 
 though, you could traverse the display list ID's like so (not  
recommended):   
Application.application.viewMain.viewRef.resetForm(); 
 An alternative would be to dispatch a custom event, from the  
command, that would be listened for by the view. I've addressed  this 
issue here before. My personal opinion is that a responder  that goes 
from the command, through the FrontController, to the  view, would be 
very helpful for these types of functions. The  Cairngorm experts here 
haven't really provided much guidance, either  through samples or 
blog postings, in this area. Perhaps as more  people, like you, ask 
similar questions, more insight will be  provided. Until then, since we 
want to remain as true to the  Cairngorm architecture as possible, 
binding all state (local and  shared) to the ModelLocator seems to be 
the recommended solution.  Thanks for the post, 
-TH  --- In [EMAIL PROTECTED]ups.com 
mailto:flexcoders%40yahoogroups.com , "Diego Guebel" 
 dguebel.subscription@ wrote:   Hi 
Tim,  this might be a silly example:  I have a login 
form, when the command responds onFault I want to  able to   
reset the user and password textfields.  doing something 
like:  viewRef.resetForm();you 
might suggest to do something like this in the view:  
mx:TextInput id="username" text="{login.username}"/ 
 mx:TextInput id="password" 
text="{login.password}"/and something 
like this in the command:  public function onFault(event:* = 
null):void  {  model.login.username = ""; 
 model.login.password = "";  }I 
think this is the best practice, but I was just wondering as I'm  
moving   from Arp where you have a view reference in the command and 
is  really   common to do things like 
viewRef.method()  something I think it would be clearer to have 
a method to do this  sort of   thing instead of a huge 
model with lots of referencesDiego. 
 On Mon, 18 Sep 2006 10:17:41 +1200, Tim Hoff 
TimHoff@ wrote: Hi Diego,  
   In general a Command and a View shouldn't know about each 
other.   Usually, the state of a view is changed by binding 
to the   ModelLocator; which is updated by a Command. What does 
your view   function do? 
-TH --- 

RE: [flexcoders] Re: cairngorm: calling a function in a view

2006-09-29 Thread Alex Uhlmann





Hi Tim,

thanks for your feedback. The link on my blog should work 
now.

Best,
Alex


  
  

  


  
  
Alex 
Uhlmann Consultant (Rich Internet Applications)Adobe 
ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, 
Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969m: +44 (0) 
7917 428 951[EMAIL PROTECTED]http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Tim HoffSent: 
29 September 2006 21:47To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Re: cairngorm: 
calling a function in a view


Hi Alex,Thank you very much for addressing this topic in your blog. 
Using observe and ObserveValue seems much cleaner than 
viewLocator/viewHelper; more direct and less classes. Your examples 
illustrate a very useful technique for manipulating local view states 
through binding. I wasn't however, able to view the source for Iteration6. 
It shows a partial listing of the application mxml class, but no other 
classes and download options.Kudos,-TH--- In [EMAIL PROTECTED]ups.com, 
"Alex Uhlmann" [EMAIL PROTECTED]. wrote: Hey 
Guys,  FYI, I've just blogged about this topic. http://weblogs.macromedia.com/auhlmann/archives/2006/09/cairngorm_sampl_ 
3.cfm http://weblogs.macromedia.com/auhlmann/archives/2006/09/using_binding_s. 
cfm  Best, Alex  Alex Uhlmann  
Consultant (Rich Internet Applications) Adobe Consulting 
Westpoint, 4 Redheughs Rigg,  South Gyle, Edinburgh, EH12 9DQ, 
UK p: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] http://weblogs.macromedia.com/auhlmann 
   
  From: [EMAIL PROTECTED]ups.com 
[mailto:[EMAIL PROTECTED]ups.com] 
On Behalf Of Tim Hoff Sent: 18 September 2006 16:35 To: 
[EMAIL PROTECTED]ups.com 
Subject: [flexcoders] Re: cairngorm: calling a function in a view 
   That would be fantastic Alex. Thank you for your 
thoughts  concerning this topic. I look forward to reading your 
blog.  -TH  --- In [EMAIL PROTECTED]ups.com 
mailto:flexcoders%40yahoogroups.com , "Alex Uhlmann" 
auhlmann@  wrote:   Hi there, 
   I'd suggest letting the Command retrieve a model object 
via  ModelLocator. Then, some state property in the model changes 
which  could  trigger an event. Views could listen to 
either EventDispatcher  events or  via Bindings. Following 
the Binding approach, your view could bind  to  single 
properties, call methods on the view via function bindings  or 
if  you explicitly want to let the view react to a model's state 
 change with  calling a view method (i.e. invoking an effect 
or popup), which  doesn't  necessarily return a value to a 
MXML component, you can use  mx:Binding  or Paul's Observe 
tag.   http://weblogs.macromedia.com/paulw/ 
http://weblogs.macromedia.com/paulw/ 
  Tim, you're right. I'll hopefully get to post something about 
this  later  this week.
Best,  AlexAlex Uhlmann   
Consultant (Rich Internet Applications)  Adobe Consulting 
 Westpoint, 4 Redheughs Rigg,   South Gyle, Edinburgh, EH12 9DQ, 
UK  p: +44 (0) 131 338 6969  m: +44 (0) 7917 428 
951  auhlmann@  http://weblogs.macromedia.com/auhlmann 
http://weblogs.macromedia.com/auhlmann 

From: 
[EMAIL PROTECTED]ups.com 
mailto:flexcoders%40yahoogroups.com  [mailto:[EMAIL PROTECTED]ups.com 
mailto:flexcoders%40yahoogroups.com ] On  
Behalf Of Tim Hoff  Sent: 18 September 2006 04:29  To: 
[EMAIL PROTECTED]ups.com 
mailto:flexcoders%40yahoogroups.com   Subject: 
[flexcoders] Re: cairngorm: calling a function in a view   
 Yes, your login example illustrates a common 
way to drive the view   through the ModelLocator. However, I 
agree with you that it would   be cleaner to have a view method 
to do this sort of thing instead  of   a huge model with 
lots of references. The only problem with   referencing a view 
function directly from a command, is that if  you   remove 
the view or the function, the command breaks (violates   
encapsulation). If you really wanted to do this from a command  
 though, you could traverse the display list ID's like so (not   
recommended): 
Application.application.viewMain.viewRef.resetForm(); 
   An alternative would be to dispatch a custom event, from the 
  command, that would be listened for by the view. I've addressed 
  this issue here before. My personal opinion is that a responder 
  that goes from the command, through the FrontController, to the 
  view, would be very helpful for these types of functions. The 
  Cairngorm experts here haven't really provided much guidance, 
 either   through samples or blog postings, in this area. 
Perhaps as more   people, like you, ask similar questions, more 
insight will be   provided. Until then, since we want to remain as 
true to the   Cairngorm architecture as possible, binding all state 
(local and   shared) to the ModelLocator seems to be the r

RE: [flexcoders] Re: cairngorm: calling a function in a view

2006-09-18 Thread Alex Uhlmann





Hi there,

I'd suggest letting the Command retrieve a model object via 
ModelLocator. Then, some state property in the model changes which could trigger 
an event. Views could listen to either EventDispatcher events or via Bindings. 
Following the Binding approach, your view could bind to single properties, call 
methods on the view via function bindings or if you explicitly want to let the 
view react to a model's state change with calling a view method (i.e. invoking 
an effect or popup), which doesn't necessarily return a value to a MXML 
component, you can use mx:Binding or Paul's Observe tag. 
http://weblogs.macromedia.com/paulw/
Tim, 
you're right. I'll hopefully get to post something about this later this 
week.

Best,
Alex


  
  

  


  
  
Alex 
Uhlmann Consultant (Rich Internet Applications)Adobe 
ConsultingWestpoint, 4 Redheughs Rigg, South Gyle, 
Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969m: +44 (0) 
7917 428 951[EMAIL PROTECTED]http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Tim HoffSent: 
18 September 2006 04:29To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Re: cairngorm: 
calling a function in a view


Yes, your login example illustrates a common way to drive the view 
through the ModelLocator. However, I agree with you that it would be 
cleaner to have a view method to do this sort of thing instead of a huge 
model with lots of references. The only problem with referencing a view 
function directly from a command, is that if you remove the view or the 
function, the command breaks (violates encapsulation). If you really 
wanted to do this from a command though, you could traverse the display list 
ID's like so (not recommended): 
Application.application.viewMain.viewRef.resetForm();An 
alternative would be to dispatch a custom event, from the command, that 
would be listened for by the view. I've addressed this issue here before. My 
personal opinion is that a responder that goes from the command, through the 
FrontController, to the view, would be very helpful for these types of 
functions. The Cairngorm experts here haven't really provided much guidance, 
either through samples or blog postings, in this area. Perhaps as more 
people, like you, ask similar questions, more insight will be provided. 
Until then, since we want to remain as true to the Cairngorm architecture as 
possible, binding all state (local and shared) to the ModelLocator seems to 
be the recommended solution.Thanks for the post,-TH--- In [EMAIL PROTECTED]ups.com, 
"Diego Guebel" dguebel.subscripti[EMAIL PROTECTED] wrote: 
Hi Tim, this might be a silly example: I have a login form, when 
the command responds onFault I want to able to  reset the user and 
password textfields. doing something like: 
viewRef.resetForm();  you might suggest to do something 
like this in the view: mx:TextInput id="username" 
text="{login.username}"/ mx:TextInput id="password" 
text="{login.password}"/  and something like this 
in the command: public function onFault(event:* = 
null):void { model.login.username = ""; 
model.login.password = ""; }  I think this is the 
best practice, but I was just wondering as I'm moving  from Arp 
where you have a view reference in the command and is really  common 
to do things like viewRef.method() something I think it would be 
clearer to have a method to do this sort of  thing instead of a huge 
model with lots of references  Diego.  
 On Mon, 18 Sep 2006 10:17:41 +1200, Tim Hoff [EMAIL PROTECTED] 
wrote:   Hi Diego,   In general a 
Command and a View shouldn't know about each other.  Usually, the 
state of a view is changed by binding to the  ModelLocator; which is 
updated by a Command. What does your view  function do? 
  -TH   --- In [EMAIL PROTECTED]ups.com, 
"Diego Guebel"  dguebel.subscription@ wrote: 
  Hi there,  I wonder what would be the 
best way to call a function in a view  when I  get a 
result in a command.  what is the way to have a reference to the 
view in the command  since  
viewlocator/viewhelper is not more recommended?  Thanks, 
Diego. 
 --  
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


__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
 

RE: [flexcoders] Re: Caringorm - Visual Flowchart Poster!

2006-07-31 Thread Alex Uhlmann





Hey there,

first of all, I think it's great to see works like this 
done! Can I just suggesta littleimprovment, though. I only see the 
ModelLocatorholding Value Objects. In my experience this means the actual 
business logic (if there is any) would probably then either have to be in the 
views or in the commands. Hovewer, I oftensee business logic in model 
objects that can be accessed by ModelLocator. Model objects might contain Value 
Objects. Your Commands could only be reusable requests to APIs of model objects. 
I'd definitely suggest focsing moreon model objects, which can easily be 
unit tested etc. My latest blog entry has been about this topic: 

http://weblogs.macromedia.com/auhlmann/archives/2006/07/cairngorm_sampl_2.cfm

Now, back to vacation. ;)

Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Evan 
GiffordSent: 31 July 2006 18:39To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: Caringorm - 
Visual Flowchart Poster!




Hey 
Russell!

Im finishing up this 
diagram ([flexcoders] Caringorm - Visual Flowchart Poster!) .. and I sorted by 
subject so I missed your post, sorry!!

Anyway, you can see the 
flowchart here: http://www.undustrial.com/flexdocs/cairngorm.gif

At this stage, Id 
prefer if you submit color/shape/organization changes back to me so that we 
can have one working copy of this document and finalize it by Wednesday. 


Thanks!
Evan





From: 
[EMAIL PROTECTED]ups.com [mailto:flexcoders@yahoogroups.com] 
On Behalf Of 
lownlazy000Sent: 
Sunday, July 30, 2006 5:10 PMTo: 
[EMAIL PROTECTED]ups.comSubject: [flexcoders] Re: Caringorm - 
Visual Flowchart Poster!




If you 
would like to kick your visio chart over to me I would be happy to help. 
russellatcorbell.com.au Also, I'll happily pass along the Visio 
document to anyone who would like to help, either with colors, shapes or 
organization, please don't hesitate to ring 
in.

--No virus found in this incoming message.Checked by AVG 
Free Edition.Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 
7/28/2006
--No virus found in this outgoing message.Checked by AVG 
Free Edition.Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 
7/28/2006

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] Trying out Cairngorm Login Example

2006-07-18 Thread Alex Uhlmann





Hi Malik,

it seems that the model object 
com.adobe.cairngorm.samples.login.model.Login conflicts with another root MXML 
component, which is also called Login (Login.mxml). You can either use another 
name for the root MXML component as I did (i.e. CairngormLogin.mxml), or use 
absolute pathswhen 
usingcom.adobe.cairngorm.samples.login.model.Login in this 
project.

I can't reproduce your Design mode warning. Maybe this 
relates to the naming conflict?

Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of 
malik_robinsonSent: 18 July 2006 00:37To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Trying out Cairngorm 
Login Example



Hi,
I am trying to use the Cairngorm framework and following 
this tutorial, but I get1 error and 1 warningthat 
prevent things from working
http://weblogs.macromedia.com/auhlmann/ - Link to tutorial for those who may be looking. 

This is just a warning in Flexbuilder so it might 
not be a big deal: Design mode: Error 
creating item LoginPanel in parent ViewStack "appView". Please choose Design 
 Refresh to refresh design mode.Login.mxml
The "other error" that causes things to break 
is:'login': identifier and class may not 
have the same name.Loginline 47July 17, 2006. It 
points to this line of code:
view:LoginPanel id="login" login="{ model.login 
}"/ It seems to be some name clashing due to perhaps a class being 
named the same as the id attribute of the above. I am using this 
code right out of the box. 
Anyone have any suggestions or possibilities. I tried 
renaming the 'id' to something else, but it seems to require that Id as I got 
tons of other errors in other files that seem to be looking for a specific value 
of 'login' for the id attribute when I renmaed it.
Thanks,
Malik



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



RE: [flexcoders] Need Help with Animation Package

2006-06-05 Thread Alex Uhlmann






Hi Alejo,

There are quite a few changed to be done to run AP with 
AS3. I'm in the process of releasing an alpha version of AnimationPackage for 
ActionScript 3. If you're interested in testing (or anyone else), please drop me 
an email offlist. Also, please let me know for what use cases you would like to 
use an AS3 version of AP.

Because in caseyou're using the Flex framework, I'd 
recommendyou use the Flex Effects framework. The Flex Effects framework 
does a lot of things in concert with the Flex framework that AP isn't designed 
to do. That means, an AS3 version of AP will only be targeted for projects that 
doesn't use the Flex Effects framework.

Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Alejo 
VinjoySent: 04 June 2006 17:33To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Need Help with 
Animation Package
Hello , I was wondering if a could use Alex Uhlman´s Animation 
Package with Flex Biuld 2.0 Beta 3. It seems that´s been a few changes from 
ActionScript 2.0 to ActionScript 3.0 and I can´t make it work properly (It has a 
lot of problems with Void instead of void and there is no way I can make Flex 
Builder organize correcty the imports that a need in order to use the classes of 
the Animation Packeage.Does anybody know how to fix this, or does anybody 
had this problem?Thanks,
__Correo 
Yahoo!Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar 





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm

2006-06-01 Thread Alex Uhlmann



Hi Guys,


I'd probably suggest letting the view dispatch a Cairngorm event, having
that following Command change a state in your model and have that view
bind to that state change in the model. This view will trigger the
effect and at effectEnd you will trigger another Command. IMHO, the
Command should never invoke anything view related (like an effect) by
himself. 

Note that your view (MXML) can bind to the model using the mx:Binding
tag. BTW: check out Paul's little helper for that. ;)
http://weblogs.macromedia.com/paulw/archives/2006/05/the_worlds_smal.cfm
#more


Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jean-Luc ESSER
Sent: 01 June 2006 10:35
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Dispatching multiple events in order with
cairngorm

Thanx Tim i'm gonna look into this, but i'm worried about one issue :
In case of a command launching an effect in a component, when the effect
starts, it means the command has executed, thus invocating the next
command. 
What if i want to wait for effectEnd before invoking next command...

I'll keep you posted.

-JL, investigating.

- Original Message -
From: Tim Hoff [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, June 01, 2006 11:18 AM
Subject: [flexcoders] Re: Dispatching multiple events in order with
cairngorm


 Hi Jean-Luc,

 It looks like you might need to use the Cairngorm SequenceCommand 
 class. I haven't used this yet but if you look at the source for the 
 SequenceCommand class, it describes a possible solution for you. If 
 you use this and get it to work, please post your findings here.

 Good Luck,
 Tim


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

 Hi there !

 I have a search pane. I open it (sliding to the right).
 Now, i want to go somewhere else in the application.
 In order to do that, when clicking on let's say 'contact', i
 dispatch an event which is gonna show page contact.
 The thing is that when clicking 'contact', before executing the
 command which is gonna build contact page, i want to check if the 
 search pane is open, and if so, i want to dispatch event 
 closeSearchPane, wait until it is fully closed, and only then execute 
 my command showContactPage.
 I guess coding this logic in my command showContactPage won't
 scale as i may need this logic to work everywhere in the app, 
 whichever event i am gonna dispatch.
 How would you do it ? What am i missing here ?

 Best,
 Jean-Luc

 PS: Thanx Alex for previous answers regarding getters setters !
 Worked fine !








 --
 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







 




 Yahoo! Groups Sponsor ~--
Protect your PC from spy ware with award winning anti spy technology.
It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM
~- 

--
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



 








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] No FontManager provided after migrating to Beta 3

2006-06-01 Thread Alex Uhlmann



Yes, that's a bug in the default flex-config.xml. Change 

 managers
 manager-classmacromedia.fonts.JREFontManager/manager-class
 manager-classmacromedia.fonts.BatikFontManager/manager-class
 /managers

To

 managers
 manager-classmacromedia.fonts.JREFontManager/manager-class
 manager-classmacromedia.fonts.BatikManager/manager-class
 /managers


(without the Font)

In compilerfonts and it should work. 


Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bronzemug
Sent: 01 June 2006 20:08
To: flexcoders@yahoogroups.com
Subject: [flexcoders] No FontManager provided after migrating to Beta 3

I migrated my Beta2 code base which is using some embedded ttf fonts to
Beta3 and suddenly started getting 

exception during transcoding: No FontManager provided. Cannot build font.

I am using the standard flex-config.xml that comes with Beta3 distribution. 

Is there something I am missing?






 Yahoo! Groups Sponsor ~-- Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM
~- 

--
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



 









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Re: Dispatching multiple events in order with cairngorm

2006-06-01 Thread Alex Uhlmann



Hey Guys,


I've just written my first blog entry around this area. I plan to extend
around this in the coming days and weeks. There are comments enabled, so
feel free to let me know what you think.
http://weblogs.macromedia.com/auhlmann/archives/2006/06/cairngorm_sampl.
cfm


Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 
http://weblogs.macromedia.com/auhlmann


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Darren Houle
Sent: 01 June 2006 20:29
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Dispatching multiple events in order with
cairngorm

Tim,

That's the one part of Cairngorm (for me) that's the tricksiest... how
one might handle (as someone else recently put it) the sexy features of
Flex in Cg. Transitions, states, effects, animations that may need to
be syncronized with something else. Of course, you don't want to put
too much control in the Cg framework since that might restrict you in
some other way (I definitely agree that Cg needs to be lightweight as
Steven's articles point out.) The ChangeWatcher is, however, very cool
in that it allows you to watch not only one bound state value, but
chains of them... so if you needed to trigger an event only after, say,
four other events completed you could have those four events set flags
in the ModelLocator on effectEnd and have your ChangeWatcher bound to
all four flags, only calling it's handler after all four were completed.
I think that the ChangeWatcher is a great addition to B3, and actually
offers the same benefits, with more functionality, than Paul's helper
class. As far as Cg goes, maybe we just need a Cg example out there
that uses ChangeWatcher (or something like it) that shows a chain of
events triggering a final command... take some of the mystery out of it.

Darren



From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Dispatching multiple events in order with 
cairngorm
Date: Thu, 01 Jun 2006 16:42:55 -

I absolutely agree that a Command should never invoke anything view 
related, except for setting bound model values that update views 
automatically. For Jean-Luc's scenario, my thinking is that there may 
be several different views that require closure before the primary 
command is executed. To close any or all of the possible open views in

a clean and synchronous manner, I would think that you could combine 
the SequenceCommand (is it ChainCommand now?) with the ChangeWatcher 
utility or a simple eventListener. The executeNextCommand function 
would be invoked only after the SequenceCommand receives notification 
of the effectEnd event. The question is, should you use the 
ChangeWatcher to listen for a model variable change, that would have to

be updated by the view or a
helper? Or, would an explicit eventListener for the views'
effectEnd event be more suitable?

This is a gray area in Cairngorm for me. It seems that there may be 
times when a complete round-trip of event communication, starting and 
ending at a view, may come in handy and/or be necessary. Well, maybe 
not necessary but certainly more convenient. For me, this fits in the 
same category as deciding whether to perform a simple view action with 
a ViewHelper/ViewLocator or with yet another
Event/Control/Command/Model structure. I'm not sure if discussing
theoretical framework implementation is germane to this list, but I'd 
be interested to hear further thoughts (best practices) concerning this

topic. Thanks for your ideas Steven, Alex and Darren.

Tim Hoff


--- In flexcoders@yahoogroups.com, Jean-Luc ESSER [EMAIL PROTECTED] wrote:
 
  I do agree with you guys, that's the way to go !
  Thanx !
 
  BTW, loved Paul's little helper.
  This one is a sure hit !
 
  -JL
 
  - Original Message -
  From: Darren Houle [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Thursday, June 01, 2006 4:49 PM
  Subject: RE: [flexcoders] Re: Dispatching multiple events in order
with
  cairngorm
 
 
  I agree with Alex. Say you have a View with a button... you
mutate that
   button's click= event into a CairngormEvent. Your custom Cg
Event
   triggers a Cg Command, which sets state in the ModelLocator.
New to Beta
   3
   is a utility called ChangeWatcher that allows you to watch a
bindable
   value
   and define a handler to run when the value changes. In the
original View
   (or any other View) you could simply watch that state var and
have
   ChangeWatcher call yourMoveEffect.play(). You could mutate the
standard
   effectEnd= event into a new CairngormEvent that triggered the
Cg Command
   that needs to run at the end of the effect.
  
   Darren
  
  
  
  From: Alex Uhlmann [EMAIL PROTECTED]
  Reply-To: flexcoders@yahoogroups.com
  To: flexcoders

RE: [flexcoders] f2b3 events, cairngorm: Why do these custom events only work once?

2006-06-01 Thread Alex Uhlmann





Hi Tom,


Your event object would need to implement the clone method. 
In clone you would create a new instance of the event object. 


To your Cairngorm question: I'd suggest you dispatch a 
"view event" using standard Flex 2 event dispatching (no Cairngorm involved 
here) and in your view that decides to call the CairngormCommand you 
create the Cairngorm event and dispatch that. I know this seems a bit tedious at 
first, but in my experience it's beneficial to keep Cairngorm events only for 
Cairngorm and don't mix them up with other other views that dispatch events to 
other views. 


Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
http://weblogs.macromedia.com/auhlmann



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Tom BraySent: 
01 June 2006 21:58To: flexcoders@yahoogroups.comSubject: 
[flexcoders] f2b3 events, cairngorm: Why do these custom events only work 
once?
There's something I don't understand about the event lifecycle in 
flex. In my model, I setup a dataprovider for a popup menu like 
this:  public var 
onlineUsersOptionsMenu:ArrayCollection = new ArrayCollection([ 



{label:"Chat", event:new OpenIMWindowEvent() }, 


   {label:"View profile", 
event:new ViewProfileEvent() },   


  {label:"Add to contacts", event:new 
AddContactEvent()}   


]);The events you see above are Cairngorm events that bubble up and 
cause various commands to be executed. I'm designing it this way so that 
my view doesn't have to know anything about the menu items -- it just handles 
the MenuEvent.CHANGE by dispatching the menu item's event like 
this:private function handleMenuChange( e:MenuEvent 
):void{ dispatchEvent( e.item.event );}I 
figured I could get away with reusing a single instance of each of these events 
because they just cause a command to be executed. That's not the case -- 
it works the first time, but the second time throws the following error: 
TypeError: Error #1034: Type Coercion failed: cannot convert 
flash.events::[EMAIL PROTECTED] to org.nevis.cairngorm.control.CairngormEvent.at 
flash.events::EventDispatcher/dispatchEvent()What's happening 
here? What am I missing about the lifecycle of events? Should I use 
a factory that creates new events each time there's a menu selection? I was 
orginally thinking of using the Command pattern directly by specifying commands 
for each menu item (instead of events) so my view would do this instead: 
private function handleMenuChange( e:MenuEvent 
):void{ e.item.command.execute();}Do you think 
that's a better approach?Thanks,Tom





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Newbie : How do i listen to a value ? Cairngorm inside.

2006-05-24 Thread Alex Uhlmann





Jean-Luc,


Doesn't the Binding tag solve your problem? The mx:Binding 
tag that's available in MXML components can help you listening to a property 
change in your business logic. You can execute a method of the view in the 
setter function that the Binding tag specifies as 
destination.

http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/js/html/wwhelp.htm?href="">


Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc 
ESSERSent: 24 May 2006 13:58To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Re: Newbie : How 
do i listen to a value ? Cairngorm inside.

Thanx Tom but is "Dynamically repeating 
components"the answer to my issue?
I agree that in my exemple, and probably most of 
the times, it could do the work, but does that mean there is no way to trigger a 
function by listenning to a change of value in a data ?
Or am i still missing something ?

Best,
Jean-Luc.

- Original Message - 
From: "Tom Chiverton" [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, May 24, 2006 12:27 PM
Subject: Re: [flexcoders] Re: Newbie : How do i 
listen to a value ? Cairngorm inside.
 On Wednesday 24 May 2006 11:10, Jean-Luc ESSER wrote: 
But how do i trigger addLabel() each time data in modelLocator changes 
? That is how do i bind the data to the trigerring of a Function. 
This is what i'm missing, it is probably obvious, but i don't see it 
!  Ahh, OK :-) http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/html/wwhelp.htm?href=""> ?  --  Tom Chiverton 
   
This email is sent for and on behalf of Halliwells LLP.  
Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 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.  
We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards
 Yahoo! Groups Sponsor ~-- 
 Protect your PC from spy ware with award winning anti spy technology. 
It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM 
~- 
  -- 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  * To 
visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/  * To unsubscribe from this group, send an email 
to: [EMAIL PROTECTED]  * Your use of Yahoo! Groups is subject 
to: http://docs.yahoo.com/info/terms/





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Newbie : How do i listen to a value ? Cairngorm inside.

2006-05-24 Thread Alex Uhlmann





and here's the correct link:
http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1059.html#177314

Best,
Alex


  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: Alex Uhlmann Sent: 24 May 2006 
18:41To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Re: Newbie : How do i listen to a value ? Cairngorm 
inside.

Jean-Luc,


Doesn't the Binding tag solve your problem? The mx:Binding 
tag that's available in MXML components can help you listening to a property 
change in your business logic. You can execute a method of the view in the 
setter function that the Binding tag specifies as 
destination.

http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/js/html/wwhelp.htm?href="">


Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc 
ESSERSent: 24 May 2006 13:58To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Re: Newbie : How 
do i listen to a value ? Cairngorm inside.

Thanx Tom but is "Dynamically repeating 
components"the answer to my issue?
I agree that in my exemple, and probably most of 
the times, it could do the work, but does that mean there is no way to trigger a 
function by listenning to a change of value in a data ?
Or am i still missing something ?

Best,
Jean-Luc.

- Original Message - 
From: "Tom Chiverton" [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, May 24, 2006 12:27 PM
Subject: Re: [flexcoders] Re: Newbie : How do i 
listen to a value ? Cairngorm inside.
 On Wednesday 24 May 2006 11:10, Jean-Luc ESSER wrote: 
But how do i trigger addLabel() each time data in modelLocator changes 
? That is how do i bind the data to the trigerring of a Function. 
This is what i'm missing, it is probably obvious, but i don't see it 
!  Ahh, OK :-) http://livedocs.macromedia.com/labs/1/flex20beta3/wwhelp/wwhimpl/common/html/wwhelp.htm?href=""> ?  --  Tom Chiverton 
   
This email is sent for and on behalf of Halliwells LLP.  
Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 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.  
We are pleased to announce that Halliwells LLP has been voted AIM Lawyer of the 
Year at the 2005 Growth Company Awards
 Yahoo! Groups Sponsor ~-- 
 Protect your PC from spy ware with award winning anti spy technology. 
It's free. http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM 
~- 
  -- 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  * To 
visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/  * To unsubscribe from this group, send an email 
to: [EMAIL PROTECTED]  * Your use of Yahoo! Groups is subject 
to: http://docs.yahoo.com/info/terms/





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  
   

RE: [flexcoders] Re: Newbie : How do i listen to a value ? Cairngorm inside.

2006-05-23 Thread Alex Uhlmann



Hi Jean-Luc,

You can execute a method on the view by listening to changes in your business logic. Your view can listen via the mx:Binding tag or via a function binding.

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc ESSER
Sent: 23 May 2006 17:02
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Newbie : How do i listen to a value ? Cairngorm inside.

I'm not sure to understand this one !
Anyway Michael, aren't viewHelper and viewLocator not to be used anymore in
cg2 ?
I thought i heard Steven say that everything could now be done using bindings...
Guess that's another topic :)

-JL

- Original Message -
From: [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, May 23, 2006 5:45 PM
Subject: Re: [flexcoders] Re: Newbie : How do i listen to a value ? 
Cairngorm inside.


I'm not sure if this is relevant or not, but the following is response from
Alistair regarding a previous question I had about the use of viewHelpers

-

In your complex value object case, here's what we'd recommend now.

In your command, put the complex object in your model (ModelLocator),
eg.
ModelLocator.getInstance().complextData = theResultFromTheServer;
Now, in your view, you bind to that model item, but call a utility class
to massage the results into the format you want. eg,
mx:Label text={ MyUtilityClass.formatDataToSomethingSimpler(
ModelLocator.getInstance().complexData ) } /
Now, you could possibly call MyUtilityClass a view helper, in the broad
sense of the pattern, but extracting it this way lets you, for example,
unit tests it's functionality and keeps the Model and View separate.

--




 Jean-Luc ESSER To: 
flexcoders@yahoogroups.com
 [EMAIL PROTECTED] cc:
 Sent by: Subject: Re: [flexcoders] 
Re: Newbie : How do i listen to a value ? Cairngorm
 flexcoders@yahoogroups.com inside.
 05/23/2006 11:30 AM
 Please respond to
 flexcoders






That's exactly the question Tim, and it has been haunting me for quite a
while now :
1/ Ok, if the view function simply updates the view, fine, using bindings
should do it.
2/ But if it is more complex, i would agree on writing a new command. But
when dispatching an event from any component, it means that the destination

view (where command should execute) should be passed as a parameter. But
that won't scale, imagine you change the destination view name ?!?! So you
could bind the name of the view in the model locator so that if you change
it, you won't have to update each one of your dispatch events.
I don't know which way is the good way...

-JL

- Original Message -
From: Tim Hoff [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, May 23, 2006 4:45 PM
Subject: [flexcoders] Re: Newbie : How do i listen to a value ? Cairngorm
inside.


Jean-Luc,

You scenario questions make me wonder; when does a function in a
viewHelper or viewLocator (or MXML file) merit becoming a command?
In my opinion, I don't see any reason not to call one command from
another (dispatch or direct call). For instance getData calls
calculateTotals on result. Since commands are in the same
abstraction layer, this should be OK. However crossing layers by
calling a view function from a command should be avoided.

What does the view function actually do. If it updates the view,
then you can rework this to have your command update state variables
or VO's in the ModelLocator that are bound to the view. This will
automatically update the view. If the function does anything else,
perhaps the function should become a command. This was my thought
process when addressing similar issues. I would love to hear what
Steven and/or Ali have to say about this.

Regards,
Tim Hoff


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

 How do i listen to a value change in a var ?

 Let's say i have a component CompA.
 In this component is a function FunctionA which needs to be
triggered when an event is dispatched from a component CompB.
 Using Cairngorm, i dispatch an event from CompB, running a Command.
 For now, i trigger FunctionA from the Command (ie
Application.application.CompA.FunctionA(myObject) ).
 But that is not how Cairngorm is supposed to work, right ?
 The way i should do it, i guess, is by updating a var myVar to
myObject in my ModelLocator from my Command.
 Then, via bindings, in CompA, listen to myVar, and when changing
to myObject, trigger FunctionA.

 Am i right ?
 But how would i do this ?

 Help is welcome.

 -Jean-Luc









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt

RE: [flexcoders] Caringorm - FrontController / addCommand adjustment?

2006-05-18 Thread Alex Uhlmann



Hi,


Command is an interface not a class in Cairngorm ;). Are you just
suggesting a naming change using an I prefix? If so, having not an I
prefix can make your life a bit easier e.g. when you refactor the
interface to a base class at a later stage. You wouldn't have a
motivation to change all the code that's checking the type using the is
operator. But I think in the end this topic is down to personal
preference.


Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Iuliu Burtoiu
Sent: 18 May 2006 12:17
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Caringorm - FrontController / addCommand
adjustment?

In Cairngorm2b3 model, provided by Iteration:two, wouldn't be more
apropriate to have the addCommand
signiture of the FrontController class as follows?

public function addCommand( commandName : String, commandRef : ICommand
) : void

second parrameter is now of ICommand type, instead of the former Class
type.

IuliuB



__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 



--
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



 









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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Caurngorm 2 - where to deal with system events?

2006-04-23 Thread Alex Uhlmann



Hi Andi,

You can certainly call another Command in the onResult of your
LoginCommand. But since a Command class in not on the display list,
events wouldn't make it to Cairngorm's FrontController. You have to use
mx.core.Application.application.dispatchEvent. Darron Schall has a nice
explanation of it here:
http://www.darronschall.com/weblog/archives/000224.cfm

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andrea Varga
Sent: 23 April 2006 11:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Caurngorm 2 - where to deal with system events?

Hi All!

I have to mention that I'm new to Cairngorm and Flex.
What is best practice to deal with system events (or whatever the events
that are not dispatched by a user gesture are called)?
For example: after a successful user login I have to display a list of
products (list loded from the server).
So, I have a login form in a component: Login.mxml, where I have a
dispatch for the LoginEvent = the LoginCommand takes care of it... 
(goes to server etc.), the onResult method in the LoginCommand is
called. If the login was successful, I set the
ModelLocator.applicationState to the new state, the view is binded to
that, so now I have the correct view (with a datagrid for example), and
now I need the list of the products.
But for that, I need the list of the products = the
ProductListGetCommand must be executed which means, that somebody has to
dispatch an event for that, but there is no user gesture here.
Where should I place the code for dispathing the event?
Or, is my whole logic correct?

My only idea here is to place it in LoginCommand.onResult?

I have tried that:
var tmpEvent:ProductListGetEvent = new ProductListGetEvent();
dispatchEvent( tmpEvent ); I got the error: Call to a possibly undefined
method 'dispatchEvent'

That's why I think this might not be the right place.


I'm using Cairngorm 2.0 Flex 2.0 and AMFPHP , but I think this is not
reallt relevant here.

Thanks
Andi




--
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



 








--
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












RE: [flexcoders] Cairngorm Phone Selector in F2B2

2006-04-15 Thread Alex Uhlmann
Hi Rick

Do you think the error is happening on

   view:PhoneDetails id=phoneDetails
   phone={phoneList.selectedItem}
   width=100% /

?

Try uncommenting this to verify. How is phone typed in PhoneDetails? If
typed as PhoneVO, you'd need to cast selectedItem, which is typed as
Object to PhoneVO like:

   view:PhoneDetails id=phoneDetails
   phone={PhoneVO( phoneList.selectedItem )}
   width=100% /


Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Schmitty
Sent: 15 April 2006 00:52
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm Phone Selector in F2B2

Hello I'm trying to get the phone selector running on cairngorm 2 and am
having some problems

After chaning references to http://www.adobe.com/2006/mxml and changing
ApplicationView.mxml setPropety from mx:SetProperty property=enabled
value=false / to mx:SetProperty name=enabled
value=false /  I also changed PhoneVO.as to implement ValueObject

I now get:

Implicit coercion of a value with static type 'Object' to a possibly
unrelated type 'com.mycompany.phones.model:PhoneVO'


Here is the ApplicationView.mxml

?xml version=1.0 encoding=utf-8?
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns:view=com.mycompany.phones.view.*
currentState={model.applicationState}
height=400
layout=horizontal
title=Nokia Phone Selector
width=700

mx:Script
![CDATA[
import
com.mycompany.phones.model.ApplicationModel;
import com.mycompany.phones.model.PhoneVO;
import
com.mycompany.phones.controller.PhoneGetEvent;
import flash.events.Event;

public static var STATE_DEFAULT:String = ;
public static var STATE_LOADING:String =
loading;

[Bindable]
public var model:ApplicationModel =
ApplicationModel.getInstance();
]]
/mx:Script

mx:List id=phoneList
dataProvider={model.phones}
height=100%
labelField=name
width=150 /

view:PhoneDetails id=phoneDetails
phone={phoneList.selectedItem}
width=100% /

mx:states

mx:State name={STATE_LOADING}

mx:SetProperty name=enabled value=false /

/mx:State

/mx:states

/mx:Panel


And here is the PhoneVO:

package com.mycompany.phones.model {

import org.nevis.cairngorm.vo.ValueObject;

[Bindable]
[RemoteClass(alias=com.mycompany.phones.model.PhoneVO)]

public class PhoneVO implements ValueObject {

public var name:String;
public var description:String;
public var price:Number;
public var image:String;
public var series:String;
public var triband:Boolean;
public var camera:Boolean;
public var video:Boolean;
public var highlight1:String;
public var highlight2:String;

public function PhoneVO() {
name  = ;
description = ;
price = 0;
image = ;
series = ;
triband = false;
camera = false;
video = false;
highlight1 = ;
highlight2 = ;
}

}
}

And here is PhoneVO.cfc

cfcomponent

cfproperty name=name type=string default= cfproperty
name=description type=string default= cfproperty name=price
type=numeric default=0 cfproperty name=image type=string
default= cfproperty name=series type=string default=
cfproperty name=triband type=boolean default=false cfproperty
name=camera type=boolean default=false cfproperty name=video
type=boolean default=false cfproperty name=highlight1
type=string default= cfproperty name=highlight2 type=string
default=

cffunction name=init output=false
returntype=com.mycompany.phones.model.PhoneVO
cfscript
this.name = ;
this.description = ;
this.price = 0;
this.image = ;
this.series = ;
this.triband = false;
this.camera = false;
this.video = false

RE: [flexcoders] Cairngorm issue

2006-04-03 Thread Alex Uhlmann
Hi Larry,


You can read about the ModelLocator here:
http://www.macromedia.com/devnet/flex/articles/cairngorm_pt2_06.html

Part 3 talks about it as well. There are 6 parts in total, currently
available here:
http://www.macromedia.com/devnet/flex/


Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Larry Liang
Sent: 03 April 2006 07:24
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm issue

Hi,

I'm trying to use cairngorm 2.0 design pattern to build a ria. Can
someone explain a little bit about ModelLocator. It is a new component
introduced in Cairgnorm 2. I was just wondering what it does and how
should I use it.

Thanks,

Larry











--
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



 




--
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

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

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

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





RE: [flexcoders] [Flex 1.5] Tweening _xscale and _yscale

2006-04-03 Thread Alex Uhlmann
You could use Flex's mx.effects.Tween for this. But you might want to
simulate modification of registration points, since Flex components have
a registration point on 0,0 (top left). When you scale, only the right
and bottom sides will scale. In case you don't want that, check out
AnimationPackage http://www.alex-uhlmann.de/animationpackage/  Scale
(setRegistrationPoint) or/and Animator class. There is a SWC supplied.

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Claudia Barnal
Sent: 03 April 2006 18:34
To: flexcoders@yahoogroups.com
Subject: [flexcoders] [Flex 1.5] Tweening _xscale and _yscale

Could anyone shed some light on how to make a tween transition of
_xscale and _yscale of a component in Flex 1.5. I don't want to use the
Zoom class, as it doesn't really do what I want.

Thanks,
Claudia


--
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



 




--
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

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

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

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




RE: [flexcoders] Cairngorm 2 and mx:States

2006-04-02 Thread Alex Uhlmann
You can do this the same way as you would have done using a ViewStack
approach. As Scott said, you can store the state representations and a
workflow property in your model. The only differences are in your view.
Instead of binding a method to the ViewStack's selectedChild instance,
you could bind a method to the view's currentState property, which calls
a method that returns the state string instead of a Container or
UIComponent instace as done using a ViewStack. The state strings could
be defined in your view's mx:states objects as Scott said.

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sof4real03
Sent: 02 April 2006 02:42
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm 2 and mx:States

As I'm implementing the usage of the Cairngorm 2 microarchitecture on a
project, I came across a question regarding the new Flex 2 States
concept and how to best implement it with Cairngorm. My feeling is the
States should be defined in the ModelLocator. That would imply the Model
knowing more than it should about the views. I wonder if anyone has come
across this matter and would be able to provide any insight.

Thanks,
Sof





--
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



 




--
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

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

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

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




RE: [flexcoders] Flexbuilder 2.0 missing mx:link ?

2006-03-27 Thread Alex Uhlmann
Thanks Paolo, 


I'll make sure this gets to the right people.
BTW. you could report this bug here as well.
www.macromedia.com/support/email/wishform/


Best,
Alex
 
Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED]
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paolo Bernardini
Sent: 26 March 2006 16:35
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flexbuilder 2.0 missing mx:link ?


Hi Alex,
I can tell you that FlexBuilder is showing the code hint for the click
event, but it doesn't show selectedChild for the ViewStack.
Sorry to post it here but I didn't know where to report this bug.


 
2006/3/26, Alex Uhlmann [EMAIL PROTECTED]: 

Hi jim,

The name Link changed to LinkButton in beta 2, the tutorials
might not
reflect this change just yet. LinkButton should have a click
property. 
Let me know if it doesn't work. It might be just FlexBuilder not
showing
you the code hint.

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK

p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]


-Original Message-
From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
Behalf Of anonymoth
Sent: 26 March 2006 03:51
To: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Flexbuilder 2.0 missing mx:link ?

Hello..I'm completely new at the whole Flex game, so please be
gentle
:-)

I'm running through the 2.0 tutorial and it asks for a Link
component. 
Well there's only a LinkButton, and it doesn't have the 'click'
property. Am I missing something (or is Flexbuilder)?

I tried coding mx:Link but it went unrecognized.

thanks,
jim





--
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








--
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 



http://docs.yahoo.com/info/terms/ 








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




SPONSORED LINKS 
Web site design development
http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+
site+design+developmentw2=Computer+software+developmentw3=Software+des
ign+and+developmentw4=Macromedia+flexw5=Software+development+best+prac
ticec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software
development
http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=We
b+site+design+developmentw2=Computer+software+developmentw3=Software+d
esign+and+developmentw4=Macromedia+flexw5=Software+development+best+pr
acticec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw   Software design and
development
http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=
Web+site+design+developmentw2=Computer+software+developmentw3=Software
+design+and+developmentw4=Macromedia+flexw5=Software+development+best+
practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ 
Macromedia flex
http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+
developmentw2=Computer+software+developmentw3=Software+design+and+deve
lopmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=1
66.sig=OO6nPIrz7_EpZI36cYzBjw Software development best
practice
http://groups.yahoo.com/gads?t=msk=Software+development+best+practice;
w1=Web+site+design+developmentw2=Computer+software+developmentw3=Softw
are+design+and+developmentw4=Macromedia+flexw5=Software+development+be
st+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw  



YAHOO! GROUPS LINKS 


*Visit your group flexcoders
http://groups.yahoo.com/group/flexcoders  on the web.
  
*To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 
  
*Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service http://docs.yahoo.com/info/terms

RE: [flexcoders] Flex 1.5 to 2.0 migration problem

2006-03-26 Thread Alex Uhlmann
Hi,

Your top-level Application stored in Application.application is not
dynamic. You can't add or access custom objects in there. You could have
done this in Flex 1.5, though. Just change the location of your custom
modGen property to an instance property of a custom class in your
application. Using Cairngorm, you could use the ModelLocator for this.
Note, that you cannot bind to class properies, only to instance
properies. 

Best,
Alex


Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of oiland_barry
Sent: 26 March 2006 10:05
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 1.5 to 2.0 migration problem

I have performed a 1.5 to 2.0 migration and i have almost got things
working after alot of headaches (im really wondering if its worth my
while to migrate!).

I have got rid of all my errors, but when i run the application i get
the following error:

  ReferenceError: Error #1069: Property application not found on
  complantAdd and there is no default value
at _complantAddWatcherSetupUtil/setup()
at complantAdd/complantAdd::_complantAdd_bindingsSetup()
at complantAdd/initialize()

I have a main mxml application file in which i use an instance of a
local mxml component:
  local:complantAdd xmlns:local=* id=plantAdd /

In this component, i have a combobox which i bind the contents of a data
model to (the model 'modGen' is defined in the main mxml
application): 
  mx:ComboBox id=cmbGenus labelField=genericName 
   dataProvider={mx.core.Application.application.modGen}/


I guess the error is because of the binding above, but im totally lost
and it starting to make me think that i should just stick with Flex 1.5!
Maybe this is not enough information for someone to comment on, if more
is needed (like a code listing) then please let me know.

Please help anybody, quickly would be good... cos i cant spend much more
time on getting nothing done, im getting paid by the hour and not able
to produce anything!







--
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



 





--
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

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

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

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





RE: [flexcoders] [Flex 2 beta 2 - Cairngorm 2 - AMFPHP]

2006-03-26 Thread Alex Uhlmann





Hi William,

usually, you would define the AMFPHP interface in 
Services.mxml, retrieve it via ServiceLocator from your Delegate. But 
ServiceLocator can only return you either mx.rpc.AbstractService or 
mx.rpc.http.HTTPService (for Flex2 's out of the box RPC services). However you 
could create the AMFPHP specific details in your Delegate. But better would be 
to add a method to Cairngorm's ServiceLocator that either returns a generic 
object oran objectcompatible to AMFPHP (RemotingConnection or 
NetConnection).Let me know how you get on.

Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of William 
LambéSent: 25 March 2006 22:10To: 
flexcoders@yahoogroups.comSubject: [flexcoders] [Flex 2 beta 2 - 
Cairngorm 2 - AMFPHP]


Hello guys, 


Did someone try to use Cairngom 
(architectural framework for flex) with 
AMFPHP?

I ask because I don’t see clearly (in the sample 
Cairngorm Login) how to change LoginDelegate and Services.mxml to use it with 
AMFPHP… (for exemple where to introduce the RemotingConnection of Tweenpix 
(http://www.tweenpix.net/blog/index.php?2006/01/03/543-hello-world-en-amfphp-avec-flex20 
))

If you tried one time, coud you explain us 
please.

Thank you, 

William.






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Flexbuilder 2.0 missing mx:link ?

2006-03-26 Thread Alex Uhlmann
Hi jim,

The name Link changed to LinkButton in beta 2, the tutorials might not
reflect this change just yet. LinkButton should have a click property.
Let me know if it doesn't work. It might be just FlexBuilder not showing
you the code hint.

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of anonymoth
Sent: 26 March 2006 03:51
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flexbuilder 2.0 missing mx:link ?

Hello..I'm completely new at the whole Flex game, so please be gentle
:-)

I'm running through the 2.0 tutorial and it asks for a Link component.
Well there's only a LinkButton, and it doesn't have the 'click'
property. Am I missing something (or is Flexbuilder)? 

I tried coding mx:Link but it went unrecognized. 

thanks,
jim





--
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



 




--
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

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

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

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




RE: [flexcoders] Cairgnorm beta release?

2006-03-23 Thread Alex Uhlmann







Hi 
Oriol,

There is still a selectedChild property on ViewStack. The only thingyou need to do is type stronger. UIComponent is 
the base class of Container but Containter goes into 
aViewStack.Beta 2 is stricter 
here.

In addition to that, I 
wouldn't recommend yourworkaround using the Number inthe workflow statevariable. As soon asyou'll add another workflow type variable to 
ModelLocator,you would need new state variable values, which could not map 
to ViewStack::selectedIndex anymore.

Best,
Alex



  
  

  


  
  

Alex UhlmannConsultant (Rich Internet 
Applications)Adobe ConsultingWestpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UKp: 44 (0) 131 338 6969
m: 44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Oriol 
GualSent: 21 March 2006 20:16To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Cairgnorm beta 
release?
Just one more point, I've tried the Cairngorm login example, and 
after changing the namespaces to http://www.adobe.com/2006/mxml, I can 
compile but I get this error:Implicit coercion of a value with static 
type ' mx.core:UIComponent' to a possibly unrelated type 'mx.core:Container' in 
line 68, which is:mx:ViewStack id="appView" selectedChild="{ 
getView( model.workflowState ) }"If look at it, and viewstack has no 
selectedChild propertie, so if I change it to: selectedIndex="{ 
model.workflowState }" it works. My question is, how should it be if I want to 
return a view instead of an int?Thanks,Oriol.






--
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Flex2 beta -- localToGlobal(), globalToLocal() bug

2006-03-09 Thread Alex Uhlmann
Yes, there is:
http://livedocs.macromedia.com/labs/1/flex/langref/migration.html

Migrating Applications to Flex 2:
http://labs.macromedia.com/wiki/index.php/Flex:Release_Notes#Beta_1_docu
mentation

Best,
Alex

Alex Uhlmann
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sufibaba
Sent: 08 March 2006 17:33
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex2 beta -- localToGlobal(), globalToLocal()
bug

Hi Alex,

I wasn't aware of the change.  BTW, is there a published list of changes
of this sort that you know of.

Cheers,

Tim


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

 How are you using it? Make sure you are using the return value. 
 
 i.e.
 
 target.localToGlobal(p);
 trace(p.x);
 
 would previously have changed p. Now you have to do:
 
 P = target.localToGlobal(p);
 trace(p.x);
 
 Alex
 
 Alex Uhlmann
 Consultant (Rich Internet Applications) Adobe Consulting Westpoint, 4 
 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
 p: +44 (0) 131 338 6969
 m: +44 (0) 7917 428 951
 [EMAIL PROTECTED] 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 On Behalf Of sufibaba
 Sent: 07 March 2006 19:35
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex2 beta -- localToGlobal(), globalToLocal() 
 bug
 
 Hi Flexors,
 
 I am using these two functions and they don't seem to working.
 
 Has anyone looked into this.  Is this a bug and if it is, is there a 
 work around.
 
 Cheers,
 
 Tim
 
 
 
 
 
 --
 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









--
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



 




--
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

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

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

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





RE: [flexcoders] sortCompareFunction

2006-02-15 Thread Alex Uhlmann
Hi Deepak,

http://weblogs.macromedia.com/mesh/archives/2005/04/sorting_date_fi.cfm
http://weblogs.macromedia.com/pent/archives/2004/12/sorting_by_date.cfm

Best,
Alex


Alex Uhlmann
Technical Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of deepu_verma
Sent: 15 February 2006 12:44
To: flexcoders@yahoogroups.com
Subject: [flexcoders] sortCompareFunction

How does sortcompare function workd for a data grid.
I want to sort a date column for a datagrid in Flex 1.5

Thanks,
Deepak





--
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



 





--
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

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

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

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




RE: [flexcoders] Datagrid text colors (v1.5)

2006-02-15 Thread Alex Uhlmann
 
Hi Tom,

You could create a cellRenderer of a DataGridColumn, place i.e. a Label
component in there and set it's style i.e. via:
yourLabelID.setStyle(color, 0xff);

Best,
Alex

Alex Uhlmann
Technical Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Fitzpatrick
Sent: 15 February 2006 12:01
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid text colors (v1.5)

In a datagrid, I want to display the text in a cell using two different
colors - in the style of syntax formatting.

Is there any way to do this in version 1.5 (or 2)?

- Tom






--
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



 




--
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

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

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

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




RE: [flexcoders] restrict text size in datagrid cell??

2006-02-15 Thread Alex Uhlmann
Title: restrict text size in datagrid cell??





http://www.richinternet.de/blog/index.cfm?mode=search

Best,
Alex



  
  

  


  
  

Alex UhlmannTechnical Consultant (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Parekh, Shweta - BLS 
CTRSent: 15 February 2006 16:33To: 
flexcoders@yahoogroups.comSubject: [flexcoders] restrict text size in 
datagrid cell??

Hi, 
How can I specify the maxChars on cells 
in a datagrid if I want to restrict the size of text entered in a cell to a 
certain limit. For text input etc. Flex has maxChars which takes care of it. How 
do I do it in a datagrid?
Thanks, Shweta 





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] restrict text size in datagrid cell??

2006-02-15 Thread Alex Uhlmann
Title: restrict text size in datagrid cell??





Duh, that's what I meant. Thanks Dirk. ( 
;

Best,
Alex



  
  

  


  
  

Alex UhlmannTechnical Consultant (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dirk 
EismannSent: 15 February 2006 16:48To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] restrict text 
size in datagrid cell??

Try this one instead :)

http://www.richinternet.de/blog/index.cfm?entry=1A9BC4E5-E330-9F94-F90F54F91CB45C16

Dirk.

  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Alex 
  UhlmannSent: Wednesday, February 15, 2006 5:46 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] restrict text 
  size in datagrid cell??
  
  http://www.richinternet.de/blog/index.cfm?mode=search
  
  Best,
  Alex
  
  
  


  

  
  


  
  Alex UhlmannTechnical Consultant (Rich 
  Internet Applications)Adobe ConsultingWestpoint, 4 
  Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 
  131 338 6969
  m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  
  
  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Parekh, Shweta - BLS 
  CTRSent: 15 February 2006 16:33To: 
  flexcoders@yahoogroups.comSubject: [flexcoders] restrict text size 
  in datagrid cell??
  
  Hi, 
  How can I specify the maxChars on 
  cells in a datagrid if I want to restrict the size of text entered in a cell 
  to a certain limit. For text input etc. Flex has maxChars which takes care of 
  it. How do I do it in a datagrid?
  Thanks, Shweta 





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Dispatching events from cairngorm viewhelper

2006-02-14 Thread Alex Uhlmann
Hi Alberto,

When dispatching events you have to be sure that the object you call 
dispatchEvent from is a display object (all display objects extend 
flash.events.EventDispatcher) and is on the display list. i.e. as Dirk 
mentioned you can call the dispatchEvent method in your MXML file because it is 
on the display list and extends EventDispatcher. If you want to trigger a 
Cairngorm Command with your call you could access the most parent display 
object your application in mx.core.Application.application. So, 
Application.application.dispatchEvent(event);. From your View Helper, I would 
just access the view of your MXML file to dispatch an event. Flex then uses 
event bubbling and triggers the registered Command.

Best,
Alex

Alex Uhlmann
Technical Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alberto 
Albericio Salvador
Sent: 14 February 2006 13:16
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Dispatching events from cairngorm viewhelper

Joao,

Im using cairngorm 2a2 and my event extends CairngormEvent but the problem is 
not with the event but with dispatchEvent method:

Im meaning, in this function, LocalidadesEvent extends CairngormEvent

public function getPoblaciones(cp:String):void {
var event : LocalidadesEvent = new LocalidadesEvent(cp);
dispatchEvent(event);
}

But I get the error:

Call to a possibly undefined method 'dispatchEvent'

Im using the same code in the main view and in the helper and it should work, 
but it doesnt.

Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática



João Fernandes escribió:
 OK if you are using cairngorm 2alpha2 you should be able to use it 
 like this

 In your viewhelper you should import the new cairngormEvent import 
 org.nevis.cairngorm.control.CairngormEvent
 And your event should extend cairngormEvent

 It should work,

 João Fernandes
 Sistemas de Informação

 Programador Informático
 Cofina media

 Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL Tel (+351) 
 213 185 200 . Fax (+351) 213 540 370 [EMAIL PROTECTED]


 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 On Behalf Of Alberto Albericio Salvador
 Sent: terça-feira, 14 de Fevereiro de 2006 12:46
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Dispatching events from cairngorm viewhelper

 Hi Joao,

 Im working with Flex2b1 and I dont import anything, neither in the 
 main view nor in my custom viewhelper.

 Anyway, importing that continues throwing the error:

 Call to a possibly undefined method 'dispatchEvent'

 Alberto Albericio Salvador
 Aura S.A. Seguros
 Departamento Informática



 João Fernandes escribió:
   
 Alberto,

 Did you import mx.events.EventDispatcher?

 João Fernandes
 Sistemas de Informação
 Programador Informático
 Cofina media

 Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL Tel (+351) 
 213 185 200 . Fax (+351) 213 540 370 [EMAIL PROTECTED]

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 On Behalf Of Alberto Albericio Salvador
 Sent: terça-feira, 14 de Fevereiro de 2006 12:19
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Dispatching events from cairngorm viewhelper

 Hi all,

 When trying to dispatch an event from a custom class that extends 
 cairngorm ViewHelper, I get this error:

   Call to a possibly undefined method 'dispatchEvent'

 Firing the event from a function of the main view, same code, it works fine.

 My function is something like, same in the view and in my custom viewhelper.

 public function getPoblaciones(cp:String):void {
 var event : LocalidadesEvent = new LocalidadesEvent(cp);
 dispatchEvent(event); }

 Has anybody run into this issue?

   
 


 --
 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



  





 --
 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



  



   


--
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



 





--
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

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

* To unsubscribe from this group, send an email

RE: [flexcoders] Cairngorm2 and views

2006-02-08 Thread Alex Uhlmann





Hi Dominick,

you are right, we could have used view states. But we 
decided to use a ViewStack because our intend was that the login component 
switches to a very different "application" component after logging in. Basically 
when usingview statesin hereyou wouldhave to remove and 
then add completly different components.For us this was the exact 
definition of a ViewStack. I would think of using states in view components that 
change it's state based on a base state.

However, this is how it would look like using states. The 
conceptof changing a state in your model, and other views bind to that 
state property stays the same.

mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"xmlns:business="org.nevis.cairngorm.samples.login.business.*" 
xmlns:control="org.nevis.cairngorm.samples.login.control.*" 
xmlns:view="org.nevis.cairngorm.samples.login.view.*"pageTitle="Cairngorm 
Login Sample Application"marginTop="5" marginBottom="5" 
marginLeft="5" marginRight="5" 
horizontalAlign="center"currentState="{ getState( 
model.workflowState ) }" 
mx:statesmx:State 
name="loggedIn"mx:AddChild 
position="lastChild"mx:Label text="{'Logged 
in ' + model.loginDate}" 
id="label1"//mx:AddChildmx:AddChild 
position="lastChild"mx:Button 
label="Back"mx:clickmodel.workflowState 
= 
ModelLocator.VIEWING_LOGIN_SCREEN;/mx:click/mx:Button/mx:AddChildmx:RemoveChild 
child="{login}"//mx:State/mx:statesmx:Script![CDATA[import 
mx.core.UIComponent;import 
org.nevis.cairngorm.samples.login.model.ModelLocator;//-

public function getState( newState : Number ) : 
String{if( newState == 
ModelLocator.VIEWING_LOGGED_IN_SCREEN 
){return 
"loggedIn";}else{return 
"";}}

[Bindable]public var model : 
ModelLocator = 
ModelLocator.getInstance();]]/mx:Script

!-- 
== 
--!-- the ServiceLocator where we specify the remote 
services --business:Services id="loginServices" 
/!-- the FrontController, containing Commands 
specific to this appliation --control:DemoControl 
id="controller" /!-- 
== 
--

 view:Login 
id="login" /

/mx:Application

Best,
Alex




  
  

  


  
  

Alex UhlmannTechnical Consultant (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dominick 
AccattatoSent: 08 February 2006 14:08To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Cairngorm2 and 
views

Steven and crew:

Thanks for getting us an alpha build to work with. Flex 2 is my first 
opportunity to really start working with the flex framework. As a side 
note, I had worked with aspatterns for a number of projects so I'm familiar with 
the micro-architecture. My question is simple. The login example 
uses viewstacks to change views. This works fine. However, to take 
advantage of view states and transistions, shouldn't we just change states now 
instead of using viewstacks? Thanks very much for all the hard work. 
I look forward to the answer. 

Dominick Accattato, CTO
www.newviewnetworks.com






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Cairngorm 2 event question.

2006-02-07 Thread Alex Uhlmann
Hi Tim,


It depends what the relationship of your two MXML files are to your
application. In general, when building reusable view and business
components, I would not suggest using Cairngorm in them. Think about
Cairngorm as the glue of your application components. It does not
relieve you on building such components and should not interfere with
them.

-If your two MXML files belong to one reusable view component, I'd
suggest using Flex's EventDispatcher (no CairngormEvent and no Cairngorm
knowledge at all). 

-If your two MXML components are actually changing a state of your
application, I would usually suggest to first dispatch a view related
event (using Flex's EventDispatcher and no Cairngorm) to the outer,
application domain specific view component, fit it into an application
related CairngormEvent (using Flex's EventDispatcher with a
CairngormEvent event object) that dispatches to a Cairngorm Command. The
Command represents a reusable request to your client and/or serverside
business logic. In here, you can manipulate your business logic that can
be found on ModelLocator. The application domain specific view
components bind to that state via ModelLocator. Other smaller view
components inside them bind to the outer view component's properties. 


Hope that helps,
Alex

Alex Uhlmann
Technical Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951 
[EMAIL PROTECTED] 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sufibaba
Sent: 07 February 2006 22:21
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm 2 event question.

Hi all,

Situation:

  form1.mxml ( contains a combobox)
  form2.mxml ( contains a listbox)

When the form1 combobox is selected, form2 listbox should change based
on form1 combobox selection.

With the new Cairngorm2, what would be a best practice approach to
handle the above situation.  

Cheers,

Tim






--
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



 




--
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

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

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

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





RE: [flexcoders] Re: Help installing Cairngorm 0.99

2006-02-06 Thread Alex Uhlmann





Hi Claudia,
No offense here, but maybe it's best if you start looking at 
Flex itself first before diving into an architectual framework, such as 
Cairngorm. Get some Flex examples running, that connect to the 
serverside.When you've build some applications, you can also much more 
easily understand why we use those pattterns because you might imagine the 
problems that can come up.
With problems such as user_classes you can find those in the 
Flex documentations, such as livedocs.macromedia.com. The user_classes folder is 
often used for Flex components packaged as SWC files, such as cairngorm.swc. 
Just drop this file into user_classes, and you have the framework code in your 
project availaible. 
Anyway, I'll check the docs for things we can make 
better.
Best,Alex



  
  

  


  
  

Alex UhlmannTechnical Consultant (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  
-Original 
Message-From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
On Behalf Of Claudia BarnalSent: 06 February 2006 03:25To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Re: Help installing 
Cairngorm 0.99Hi Andrew,Thanks for the reply.Basically, 
I couldn't understand much of anything I read (imagine Charlie Brown listening 
to his teacher).I am not a person who has dealt with any servers (JRun, 
Flex, etc.) for which I believe that the explanation is far to simple, expecting 
that the user knows what is being said.I would love an explanation where 
you tell the user what to do with each specific file (included in the zip) with 
some more detail.1. Grab x and put it in y.2. Replace i with 
j.3. Don't do anything with k, as it is only for documentaion.n. 
...DoneFor example, I am not sure if I should copy over the 
"cairngorm.swc"or the "org.nevis.cairngorm.*" package to the "user_classes" 
folder in Flex.I am by no means saying that the description doesn't 
cover every necessary step, but it is very hard to follow if you really don't 
have a clue of what is being said, and all you want to do is start using 
Cairngorm to develop your Flex apps.Thanks again for the 
reply,ClaudiaOn 2/5/06, Andrew Spaulding 
[EMAIL PROTECTED] wrote: Hi Claudia, The 
installation instructions were quite specific. Can you please provide 
some further information as to what exactly isn't working? This will 
help me (us) better provide a solution to your problem. 
Thanks, Andrew Spaulding Adobe 
Systems --- In flexcoders@yahoogroups.com, Claudia 
Barnal [EMAIL PROTECTED] wrote:   Hi, 
  Would it be possible if you guys could give me a hand 
installing  Cairngorm (I'm using Flex 1.5).  
 I tried following the the installation guide  
(InstallationGuide.pdf), but all I achieved was to get even more  
lost, as it doesn't really give you any simple and descriptive 
instructions.   I have installed Flex with the 
integrated JRun Server and everything  is in the default 
installation folder.   Thanks a lot for any 
guidance.   Claudia--Flexcoders Mailing 
ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links* To visit your group on the web, go 
to: http://groups.yahoo.com/group/flexcoders/* 
To unsubscribe from this group, send an email to: 
[EMAIL PROTECTED]* Your use of Yahoo! 
Groups is subject to: http://docs.yahoo.com/info/terms/





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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Closable Panel? (flex2)

2006-02-03 Thread Alex Uhlmann





You could use a Canvas tag to lay all kinds of things 
on top of a Panel. ie.

mx:Canvas

 mx:Panel 
/
 

 
/mx:Panel

 yourComps:CustomPanelHeader 

 x="10" 
y="10" /

/mx:Canvas

Best,
Alex



  
  

  


  
  

Alex UhlmannTechnical Consultant (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of gunnar a 
reinsethSent: 03 February 2006 12:30To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Closable Panel? 
(flex2)
I know that mx.controls.Panel contains a 'closeButton' which is 
utilised in the subclass TitleWindow. I really would like to have this close 
button on panels as well, so i guess i have to subclass Panel to achieve this. 
However, I have no clue of how to make this button visible and position it in 
the title area. Could anybody please help with this? --gunnar





--
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] effects and rotation

2006-02-02 Thread Alex Uhlmann





Am I assuming correctly that you want to rotate two things here 
in parallel? One thing is the complete label ("DONT WANT") and the other thing 
is each letter (e.g. "D", "O"...)?If so, yes that is possible, you just 
have to create a fair bit manually since the Label component does not allow you 
you to animate each character by itself. You have to create a new component (I'd 
suggest a MovieClip or UIComponent that contains a text field) for each 
character, place all those character components inside another component and 
then animate each character component and your new customized Label component 
than contains all character components in parallel. You might want to checkout 
AnimationPackage for animating multiple targets the same way, since it creates 
some optimisations for this. www.alex-uhlmann.de/flash/animationpackage 
Rotation.Best,Alex




  
  

  


  
  

Alex UhlmannTechnical Consultant (Rich 
Internet Applications)Adobe ConsultingWestpoint, 4 Redheughs 
Rigg, South Gyle, Edinburgh, EH12 9DQ, UKp: +44 (0) 131 338 
6969
m: +44 (0)7917 428 951[EMAIL PROTECTED] 
  
-Original Message-From: 
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
On Behalf Of sdhfhdgsSent: 02 February 2006 13:40To: 
flexcoders@yahoogroups.comSubject: [flexcoders] effects and 
rotationis it possible to rotate a label, say 90 degrees using a effect 
or some other means in flex. if so, how?I dont just want the text to go down 
like thisDONTWANTI want the text 
to be rotated as well.thanks--Flexcoders 
Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links* To visit your group on the web, go 
to: http://groups.yahoo.com/group/flexcoders/* 
To unsubscribe from this group, send an email to: 
[EMAIL PROTECTED]* Your use of Yahoo! 
Groups is subject to: http://docs.yahoo.com/info/terms/





--
Flexcoders 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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Tween classes

2005-09-28 Thread Alex Uhlmann
and by the way in the newest 1.07 beta release, there's a SWC component
you can just drop into user_classes.

Best,
Alex

-- 
Alex Uhlmann 
Software Consultant 
iteration::two 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Philippe Maegerman
Sent: 27 September 2005 08:34
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Tween classes


It's not included in Flex
http://www.alex-uhlmann.de/flash/animationpackage/

Philippe Maegerman



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Marcin Glowacki
Sent: lundi 26 septembre 2005 19:30
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tween classes


Where is that package and class?
I was looking in Flex docs and i could not find
Thanks

--- In flexcoders@yahoogroups.com, Philippe Maegerman [EMAIL PROTECTED]
wrote:
 Sorry, I was looking at the wrong class, I found the onUpdate event
 ;
 AnimationPackage rocks !!
  
 Philippe Maegerman
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Philippe Maegerman
 Sent: lundi 26 septembre 2005 11:57
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Tween classes
 
 
 
 Thank you Alex, I was looking first for a standard (built-in) way.
 I looked into the Animation Class, I can see onStart and onEnd events
 but I don't see something similar to onTweenUpdate. 
 
 Philippe Maegerman
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Alex Uhlmann
 Sent: lundi 26 septembre 2005 11:51
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Tween classes
 
 Hey Philippe,
 
 if that's not sufficient for what you want to achieve, maybe the
 Animator class in AnimationPackage works for you? It uses
 mx.effects.Tween by default.
 
 Best,
 Alex
 
 --
 Alex Uhlmann
 Software Consultant
 iteration::two
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 Behalf Of Philippe Maegerman
 Sent: 26 September 2005 09:59
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Tween classes
 
 
 Ok I found by digging the FlexForFlash package.
 Flex doesn't seem to include the mx.transitions.Tween class but
 mx.effects.Tween.
 This class is more basic but allows to input several values in the
same
 Tween ;))
 
 It still would have been nice to have the basic Tween class + easing
 equations
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 creationComplete=doTween() mx:Script ![CDATA[ import
mx.effects.*
 function doTween(){  var a = {};  var anim = new Tween(a, [0,50],
 [100,100], 1000);  a.onTweenUpdate = function(vals:Array):Void{
  mx.controls.Alert.show(vals[0].toString() + '/' +
 vals[1].toString());  };  a.onTweenEnd = function(endPos:Number):Void{
  mx.controls.Alert.show(End animation:  + endPos);  }; } ]]
 /mx:Script /mx:Application
 
 
 
 Philippe Maegerman
 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Philippe Maegerman
 Sent: vendredi 23 septembre 2005 16:05
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Tween classes
 
 
 No idea why Tween classes are not working?
 
 Philippe Maegerman
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Philippe Maegerman
 Sent: mercredi 21 septembre 2005 14:26
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Tween classes
 
 
 Sorry for the delay, I have tried your suggestions and other things
but
 can't make it happen.
 It seems ok to import the transitions package, no error pops up, I
can't
 declare var new my_tween = new Tween() but it allows me to do var
 my_tween = new mx.transitions.Tween() which seems quite strange to me,
 because I import mx.transitions.* As it fails silently I have no clue
on
 what's going on here :(
 
 Here's my code with trace actions:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
 creationComplete=myTween() mx:Script ![CDATA[
 
 import mx.transitions.*;
 var dummy:Object = {val:''};
 function myTween(){
 //mx.core.Application.alert('starting');
 dummy = {val:''};
 var my_tween = new mx.transitions.Tween(dummy, 'val', null, 0, 100,
10,
 true);  my_tween.onMotionChanged = function(obj){
   mx.core.Application.alert('onMotionChanged');
 }
 my_tween.onMotionFinished = function() {
   mx.core.Application.alert('onMotionFinished');
 };
 }
 ]]
 /mx:Script
 /mx:Application
 
 Philippe Maegerman
 PS: I have tested this in flashMX2004 (except for the trace
statements)
 and it works perfectly well
 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Matt Chotin
 Sent: dimanche 11 septembre 2005 6:13
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Tween classes
 
 
 Try not using _level0, go through Application.application.  And see if
 you should be using Delegates too J
 
 Matt

RE: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alex Uhlmann
Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we have 
developed, we call these Listeners. 

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server (via 
FlashComm) or generated on the client. Everything else about your Cairngorm 
architecture remains the same - using the ModelLocator for instance, to have 
your commands updating the model, and binding the view to the state of your 
model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes such 
as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders@yahoogroups.com, Alberto Albericio Salvador
[EMAIL PROTECTED] wrote:
 Hi all,
 
 The Cairngorm samples are a great resource for understanding how to
best 
 arquitect an specific kind of applications; in this case, applications 
 that talk syncly with some servers that expose some services.
 
 Imagine now that Im building an application which implements,
somewhere, 
 some kind of asynchronous services: a flash comm server chat , for 
 example. This service must be running, in the background, even if im 
 visually working in another part of the application, entering some data 
 for new providers or whatever. So the question is, where is the best 
 place to initialise these services? Or how can I place/work with these 
 services within this arquitecture?
 
 My choice would probably be to initialise evrything inside a 
 initialise() function in the model locator and then use some public 
 var there to control msgs and status of this service and then bind
the 
 chat components to these vars.
 
 I hope someone can help chosing the best option.
 
 Thanks all in advance.
 
 -- 
 Alberto Albericio Salvador
 Aura S.A. Seguros
 Departamento Informática





--
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 

 Visit your group flexcoders on the web.
  
 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

--
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

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

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

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




RE: [flexcoders] Re: Cairngorm question

2005-08-30 Thread Alex Uhlmann
Alberto,

your responder is probably of type Responder and Responder is the interface 
that only contains onResult and onFault. See Cairngorm docs. I suggest you 
implement the communication from your listener to the command via 
EventBroadcaster.

Best,
Alex

-- 
Alex Uhlmann 
Software Engineer 
iteration::two
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
Albericio Salvador
Sent: 30 August 2005 18:32
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm question


Hi again,

Im trying to create a business delegate class for handling a connection 
to, for example, an xml socket.

When trying to delegate onXML to the responder it keeps on saying there 
is not such property on the responder, but of course there is. If I 
define the function inside de business delegate class, it works 
(changing responder.myOnXML for myOnXML, of course)

I have something like this on my command class:

class org.nevis.cairngorm.prexon.commands.SubscribeCommand implements 
Command, Responder {
   public function execute( event:Event ) : Void {
var delegate: SubscriberDelegate = new SubscriberDelegate( this );
delegate.subscribe( );
}

public function myOnXML( event : Object ): Void {
mx.core.Application.alert(RESPONDER OK);
}
..
}

And the business delegate has:

this.responder = responder; (the parameter for the class)
myListener.onXML = Delegate.create( responder, responder.myOnXML );
...

What Im I doing wrong? Is it okay setting a responder here? Cause I have 
to define a result and fault handler im never using for this kind of 
services...


Alberto Albericio Salvador escribió:

No problem Alex, I was looking for the easy way. I will make a look at 
those papers.

Thanks anyway

Alex Uhlmann escribió:

  

Alberto,

the Flash Player's SharedObject class listens to server pushes. There's much 
information on remote SharedObjects in Macromedia documentations such as the 
FlashComm Live docs. Sorry, I don't have a generic example right now that 
doesn't belong to a client.

hope it helps,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Alberto 
Albericio Salvador
Sent: 30 August 2005 14:25
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm question


Hi Alex,

I like the idea of Listeners and they way you point to manage server
pushes injecting events and data to the Cairngorm architecture. Mainly
because server pushes are treat just like if they were data from a
user-gesture.

If possible, send me a sample code for one of these Listeners, just a
short one so I can see how to initialise the subscription and how
handlers for server pushes are defined. I can imagine it's somehow
similar to a business delegate class calling a remoteobject but I dont
see how to leave these services in the background listening and
waiting for server pushes.

Thanks for your help Alex.


Alex Uhlmann escribió:

 



Hi Alberto,


in addition to what Dan said, you could create an object similar to Business 
Delegates used for request/response remote calls - in applications that we 
have developed, we call these Listeners.

These listeners provide control and protection for your server push remote 
services. In here, you could implement functionality as recovery plans, 
disconnecting etc. In these listeners, we would typically subscribe to 
server-side shared objects. When we receive notification of changes to the 
shared object, we then convert untyped FlashComm data into VOs, before using 
the EventBroadcaster in our listener to broadcast events plus data. So the 
listener is really just another way of injecting an event into the Cairngorm 
architecture, other than a user-gesture.

In this way, the commands are unaware as to whether the events that called 
them, and the data accompanying these events, was pushed from the server 
(via FlashComm) or generated on the client. Everything else about your 
Cairngorm architecture remains the same - using the ModelLocator for 
instance, to have your commands updating the model, and binding the view to 
the state of your model.

Depending on the complexity of your application, we might suggest further 
refactorings, i.e. outsourcing functionality of listeners to other classes 
such as recovery plans.


Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Daniel 
Harfleet
Sent: 30 August 2005 10:10
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm question


Alberto,

this seems a fair approach to me, you may also want to include some
logic to disconnect from the flash comm server when you know you are
not interested in receiving updates and maybe even a 'recovery plan'
for the service should the connection to the FCS be broken.

rgds

dan

--- In flexcoders

RE: [flexcoders] modelChanged event

2005-07-14 Thread Alex Uhlmann
Timing is probably your problem. But anyway there's another solution to 
accomblish your task you might want to consider. If products is your 
dataProvider Array then you can bind to it via

mx:Binding
source=products destination=this.productsChanged /

and handle it via getter / setter properties

public function get productsChanged() : Array
{
 return _productsChanged;
}

public function set productsChanged( newProductsChanged : Array)
{
  update( newProductChanged  );
  _productsChanged = newProductsChanged;
}

private var _productsChanged : Array;  

in update you can access the updated dataProvider, delegating to other tasks 
such as calculating a sum. The textfields could then i.e. bind to simple 
properties of your model.

Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Johnny
Sent: 14 July 2005 01:45
To: flexcoders@yahoogroups.com
Subject: [flexcoders] modelChanged event


Hi,

I have a DataGrid control and use addItem and removeItemAt method to
add and remove items.  This works properly.  At the same time, I need
to dynamically calculate the sum for certain field in the DataGrid and
bind the result to a text field.

I add a listener for modelChanged event of dataProvider and add a sum
function there.  But the sum function never gets triggered at all even
after an item is added, deleted or all items are removed.

The array that binds to the dataProvider will create after a remote
service call.  The listener is created at the initialize function of
the appliation.  Could this be a problem?

Thanks,
J




--
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





--
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

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

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

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




RE: [flexcoders] Cairngorm Store missing link?

2005-06-20 Thread Alex Uhlmann
Hi Kent,

we decided to make 5 components of Cairngormstore more modular and
abstracted the ModelLocator. The ShoppingCart.mxml component was one of
those components. If you look into Main.mxml you'll see the
inisialisation of ShoppingCart.mxml

cart:ShoppingCart id=shoppingCartComp width=100% height=100%
shoppingCart={ModelLocator.shoppingCart}
selectedItem={ModelLocator.selectedItem}
select=ModelLocator.selectedItem = event.target.selectedItem
currencyFormatter={ModelLocator.currencyFormatter} /

ShoppingCart.mxml accepts a shoppingCart instance of type
org.nevis.cairngorm.samples.store.business.ShoppingCart. In our case
this comes from ModelLocator. The dataProvider property of the DataGrid
in ShoppingCart.mxml is bound to the elements property of
org.nevis.cairngorm.samples.store.business.ShoppingCart. This
ShoppingCart class is also in the as2docs. Basically, the elements
property is a collection of ShoppingCartElement objects that represent
one element. The ShoppingCart class itself represents all elements and
some additional connected information concerning all elements like the
totalProductPrice or shippingCost.

hope that helps,
Alex   

--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Kent Henneuse
Sent: 20 June 2005 16:35
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm Store missing link?


Ok it is a missing link in my brain and not a link that is missing.

I am confused how the dataProvider on line 58 of ShoppingCart.mxml gets
linked to the one in the ModelLocator?  It appears as if everything is
done
by manipulating the ShoppingCart object that is in the ModelLocator and
some
how it is getting changed in the View.

I ask because I currently have an Array of objects that represent lines
in a
DataGrid.  When I add an element to that array I am not seeing it in the
datagrid.  I figure that it has something to do with the redrawing of
the
component.  I looked at the Cairngorm Store as an example because it is
very
similar to what I am trying.

  Anxiously awaiting the next Blog installments on the Cairngorm store,

-Kent

Black holes are where God divided by zero.
- Steven Wright


 
Yahoo! Groups Links

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

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

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

RE: [flexcoders] Cairngorm store products

2005-05-25 Thread Alex Uhlmann
Hi Tom,

if you used the default settings of store.cfg, make sure you have a db
directory in the parent of your WEBAPP_DIR. On Tomcat that's
TOMCAT_HOME/webapps. In db you have to place your catalog.proteries
and catalog.script files. See install docs for more.

Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Tom Fitzpatrick
Sent: 25 May 2005 16:31
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm store products


At 11:17 AM 5/25/2005, you wrote:
There are a number of things to check ... first of all, have you placed
the named service in flex-config.xml (have you used our
flex-config.xml) ?

Yes, I used your flex-config.xml file.

Is there more detailed error message in your appserver log file ?

The only cairngorm store related message in the log just references the
Flex build.

- Tom








Yahoo! Groups Links





 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Cairngorm store products

2005-05-25 Thread Alex Uhlmann
Actually the db directory by default is in TOMCAT_HOME not
TOMCAT_HOME/webapps. (you can change this via store.cfg.

In case you did that: We're using HSQLDB in in-process mode, so it
initialises when you start your app server. Have you restarted Tomcat?
When you restart Tomcat, HSQLDB should by default create catalog.lck and
catalog.log files in the db directory.

Does your catalog.script file actually create a user CAIRNGORMSTORE.
Is the content matching the content of the supplied catalog.script?

Best,
Alex


--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Tom Fitzpatrick
Sent: 25 May 2005 18:02
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm store products


Hi Alex -

Thanks to you and Steven for staying with me on this.

I did set it up that way, and it's still not working. My directory
structure is:

jakarta-tomcat-5.0.25  webapps  db
jakarta-tomcat-5.0.25  webapps  cairngormstore

Inside the db directory are catalog.properties, catalog.script, and
mysql_store.sql

I did find this error message from Tomcat:

java.sql.SQLException: User not found: CAIRNGORMSTORE

Does that help?

- Tom



At 12:25 PM 5/25/2005, you wrote:

if you used the default settings of store.cfg, make sure you have a
db
directory in the parent of your WEBAPP_DIR. On Tomcat that's
TOMCAT_HOME/webapps. In db you have to place your catalog.proteries
and catalog.script files. See install docs for more.







Yahoo! Groups Links





 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Re: Cairngorm 0.99

2005-05-19 Thread Alex Uhlmann
Hi Dave,


have you made sure your config.xml contains

namespace uri=http://www.iterationtwo.com/cairngorm;
manifest/WEB-INF/flex/cairngorm-manifest.xml/manifest
/namespace 

,you have a cairngorm-manifest.xml file and most importantly, you've restarted 
your server?


Best,
Alex

-- 
Alex Uhlmann 
Software Engineer 
iteration::two



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of dave buhler
Sent: 19 May 2005 09:14
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Cairngorm 0.99


I have the same issue with the Login example:


Error /org/nevis/cairngorm/samples/login/business/Services.mxml:22 
Namespace http://www.iterationtwo.com/cairngorm has not been associated with 
component manifest.






On 5/19/05, Hans Omli [EMAIL PROTECTED] wrote:
I'm having a similar issue.  After changing db_path in
/WEB-INF/classes/store.cfg to an absolute path, I get:

Error: Unresolved compilation problems:
The import org.apache.commons cannot be resolved
The import org.apache.commons cannot be resolved
log cannot be resolved
log cannot be resolved
log cannot be resolved
log cannot be resolved
log cannot be resolved 
log cannot be resolved
Log cannot be resolved to a type
LogFactory cannot be resolved

Could be an issue with the way I have the Tomcat project configured in
Eclipse.  Will dig deeper into this in the morning. 



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steven Webster 
Sent: Wednesday, May 18, 2005 7:10 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Cairngorm 0.99

Hi there,

Can you zip up your webapp directory (removing flex.war/etc) on JRun and
email it privately to me offlist, and we'll take a look.

On the login sample, you should have seen a result or a fault come back over
the wire ... what was the case ?

Have you tried starting/stopping the appserver ? 

I'm sure it's something simple.

Best,

Steven

 -Original Message-
 From: flexcoders@yahoogroups.com
 [mailto: [EMAIL PROTECTED] On Behalf Of violabg2002
 Sent: 18 May 2005 15:04
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Cairngorm 0.99 

 Hi Steven

 changed the store.cfg paht to
 db_path=c:\\cairngormstore\\db\\  but same problem.

 I have

 h commons-lang-1.0.1.jar
 h commons-logging-1.0.4.jar 
 h hsqldb.jar
 h log4j-1.2.8.jar

 in the Flex\jrun4\servers\default\cairngormstore\WEB-INF\lib
 directory.




Yahoo! Groups Links











Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
  
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Alex Uhlmann: Rotation class help

2005-05-06 Thread Alex Uhlmann


Hi Duccio,

As you said, your component is centered around 0,0. For your effect to work 
properly, you need to simulate the registration point with modifying the x and 
y postions of the component. The current version of AP 1.05 doesn't support a 
setRegistrationPoint method of Rotation. But the Scale class provides one. You 
could listen to the onUpdate event of Rotation and modify the x and y positions 
in your onUpdate listener. Look into the source code of Scale for more 
information about how to simulate a registration point. BTW: The registration 
point implementation in Scale was a contribution from Ben Jackson and here are 
other contributions from Robert Penner and Darron Schall:
http://www.iterationtwo.com/cgi-bin/mt-comments.cgi?entry_id=73

This is the kind of functionality the upcomming Flex Effects Framework ( 
announced here http://www.richinternetapps.com/archives/000108.html ) will 
provide for you.

Best,
Alex
--
Alex Uhlmann
Software Engineer
iteration::two


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Duccio
Sent: 05 May 2005 19:57
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Alex Uhlmann: Rotation class help


Hi,
i'm currently using animationpackage. I have one little problem with the 
Rotation class, i'm using it to rotate an image but it rotates on its 0,0 axis 
(upper left corner) and not on its centre as i expected. I looked the 
documentation but didn't find anything regarding changing the centre of 
rotation. I 'd like also to thank you again for your great work!!! Below 
there's the interested code ...
Best Regards
Duccio Del Ministro
  public function myMouseDownHandler(event) : Void
 {
  trace(mouseDown + _indice.valueOf());

  if (!_selected) { 
   _alpha=100;
   width+=1;

   setStyle(shadowDistance,0);
   setStyle(dropShadow,false); 
   setStyle(borderSides,left top right bottom);  
   new Rotation(this).run(360,2000,Quad.easeIn,onCallback);
  } else {
   _alpha=80;
   width-=1;
  
   setStyle(borderSides,);  
   setStyle(shadowDistance,4);
   setStyle(dropShadow,true); 
   my_border.clear();
  
  }
_selected=!_selected;

 }   



Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Cool Transition Effects

2005-05-05 Thread Alex Uhlmann
Hi Andy,

while I think we still have to wait a bit when we can achieve runtime 
transition effects like this
http://www.mailorderchickens.org/  ( ;

...we do have some options at the moment.

We just posted about this topic:
http://www.richinternetapps.com/archives/000108.html

Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Andy Goodfellow
Sent: 03 May 2005 14:32
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cool Transition Effects


All,

This is purely gee-whiz, but has anyone achieved a 3D transition
effect with Flex? I have created the sliding page-to-page effect using
the compositing stuff (parallel and sequential) however it would be
really neat to flip a panel (using viewstacks) and have added
functionality on the back. It seems we would need a custom skew effect
or something. Any thoughts?

-Andy



Yahoo! Groups Links








--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.1 - Release Date: 01/04/2005 


 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] XPath support in Flex?

2005-04-28 Thread Alex Uhlmann
No build in support but have you tried this library?
http://www.xfactorstudio.com/Actionscript/AS2/XPath/

Best,
Alex

-- 
Alex Uhlmann 
Software Engineer 
iteration::two 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Kristopher Schultz
Sent: 28 April 2005 17:05
To: flexcoders@yahoogroups.com
Subject: [flexcoders] XPath support in Flex?


Does Flex have any built-in support for XPath? I know Flash supports
XPath expressions to a certain extent, but it isn't well documented
(It's buried in the Using Flash documentation). Is there support in
Flex?

Kris

-- 

Kristopher Schultz
Developer

Resource Interactive
p: 614.410.2123
www.resource.com




Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
  
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


 
Yahoo! Groups Links

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

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

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

RE: [flexcoders] EventDispatcher Question.

2005-04-26 Thread Alex Uhlmann

Just curious as to whether or not others have built/extended the
EventDispatcher solution and what they found worked?.

you, could use GDispatcher that offers this functionality. 
http://www.gskinner.com/blog/archives/2003/09/code_gdispatche.html

The version shipped with AnimationPackage works with Flex. Note, GDispatcher 
API is not compatible to the W3C standard as mx.events.EventDispatcher is.

Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] AnimationPackage

2005-04-22 Thread Alex Uhlmann

Yes. Currently, it's indended to use AnimationPackage only in ActionScript 2.0 
classes or the MXML Script tag. Here's a quick example for a Script tag.

mx:Script
![CDATA[  
   
import de.alex_uhlmann.animationpackage.*;
import de.alex_uhlmann.animationpackage.animation.*;
import de.alex_uhlmann.animationpackage.drawing.*;
import de.alex_uhlmann.animationpackage.utility.*;
import com.robertpenner.easing.*;  
   
function runAnimation() {
APCore.initialize();   
   
var myStar:Star = new Star(275,200,100,25,6);
myStar.lineStyle(2,0xff,100);
myStar.fillStyle(0xff,100);
myStar.draw(); 
   
var mc:MovieClip = myStar.movieclip;
   
var myMoveOnQuadCurve:MoveOnQuadCurve = new 
MoveOnQuadCurve(mc,100,100,300,300,500,100);
var myScale:Scale = new Scale(mc,25,25);
var myRotation:Rotation = new Rotation(mc,360);
var myColorTransform:ColorTransform = new 
ColorTransform(mc,0xff,50);
   
var myAnimation:Animation = new Animation();
myAnimation.addChild(myMoveOnQuadCurve);
myAnimation.addChild(myColorTransform);
myAnimation.addChild(myScale,0,1000);
myAnimation.addChild(myRotation,1000,1500);

myAnimation.animationStyle(2000,Circ.easeInOut,onCallback);
myAnimation.animate(0,100);
}  
]]
/mx:Script

i.e. a creationComplete event handler could call the method runAnimation. 
Basically all the supplied examples of the HTML documentation stay the same.

Best,
Alex


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Duccio
Sent: 22 April 2005 18:36
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AnimationPackage


Has anyone tested 
AnimationPackage(http://www.alex-uhlmann.de/flash/animationpackage/index.htm) 
or similar in Flex? Any example?
Best regards
Duccio Del Ministro





Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


 
Yahoo! Groups Links

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

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

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