RE: [flexcoders] modelChanged event

2005-07-13 Thread Kent Henneuse
I think it stems from the use of an array in databinding.  One way to
fix this is to reassign your dataprovider.  Also you could broadcast a
model change event upon completion of the changes.  This would hopefully
then trigger the sum to change.

I had a similar issue a while back and Tracy helped me out.
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg09669.html

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Johnny
Sent: Wednesday, July 13, 2005 5:45 PM
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

* 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] Components source code

2005-07-13 Thread Kent Henneuse








Try c:/Program
Files/Macromedia/Flex/resources/flexforflash/FlexforFlash.zip



    -Kent











From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Tiago Simões
Sent: Wednesday, July 13, 2005
6:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Components
source code





Hi list,

One of the great things about Flash MX Components was that I could inspect the
source code on 
C:\Documents and Settings\~user~\Local Settings\Application
Data\Macromedia\Flash MX 2004\en\Configuration\Classes\mx\*

This way that I could see better the internal implementation Macromedia mx
components and learn a lot of best practices and tricks.

I'm starting to evaluate Flex but I don't find the source classes of it's
components.

Where can I find the source for the Flex components, does anybody know?

Thanks
Tiago Simoes


Easily create automated tests for flex and flash with open source AutoTestFlash
http://tiago.webstartpoint.net/flash/






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











smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Debuging Java to AS Object conversion?

2005-07-11 Thread Kent Henneuse
Does anybody have any ways to debug the Java to AS object conversion that is
done with the RemoteObject call?  Or can you answer why the Net Connection
Debugger seems to only grab the initial connection?

I have been trying to use the NetConnectionDebugger but am having a problem
with.  The first connection I make to a remote object to do a login displays
fine in it but every other remote object attempt is never displayed.  Is
there something that I am missing in debugging someplace?  What should I be
looking for to correct the issue?

Thanks,

-Kent


A hypothetical paradox:
What would happen in a battle between an Enterprise security
team, who always get killed soon after appearing, and a squad of
Imperial Stormtroopers, who can't hit the broad side of a planet?
-- Tom Galloway


smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Confusion with mx:Repeater

2005-06-28 Thread Kent Henneuse
I get the basic concepts of Repeaters and have successfully gotten one to
show me one via a dataprovider.  I am now having a bit of trouble
understanding how to manipulate items in the Repeater.  I know that I have
to be careful with data in Arrays because they will not fire ChangeEvents
but that doesn't seem to be a problem so far.  

Below is a test screen that I wrote.  If I remove the last item first, and
then the remaining item it works.  If I remove the first item and then try
to remove the remaining item, the remaining item is not removed.  I am sure
this is probably a limited understanding of the calls and use of the
Repeater but the documentation seems a bit sketchy on them beyond just for
display.

Thanks,

-Kent

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;

  mx:Script
![CDATA[
var itemA = new Object(
  {itemId:'1', itemText:'Put something in the first box'});
var itemB = new Object(
  {itemId:'2', itemText:'Put something in the second box'});

var itemList = [itemA, itemB];

public function removeItem(itemId:Number):Void {
  for (var i = 0; i  itemList.length; i++) {
if (itemList[i].itemId == itemId) {
  itemList.removeItemAt(i);
  break;
}
  }
}
]]
  /mx:Script

  mx:Panel title=Items width=100%

mx:Repeater id=items dataProvider={itemList}
  mx:HBox
mx:TextInput width=90% text={items.currentItem.itemText}/
mx:Button label=Remove
  click=removeItem(event.target.getRepeaterItem(0).itemId)/
  /mx:HBox
  mx:HRule /
/mx:Repeater

  /mx:Panel
/mx:Application

I used to work in a fire hydrant factory. You couldn't park anywhere near
the place.

   - Steven Wright 



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] How do you set the amount of characters in a text area control

2005-06-24 Thread Kent Henneuse








The easiest way is to use the
StringValidator and set the maxLength property. Then in the function that use
with the user gesture call Validator.isStructureValid() This assumes
that you are using mx:Model for data binding. The nice thing is it
will do validation as the text area loses focus and it will be bound to whatever
user gesture you have incase the focus does not move from the text area.



 -Kent











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, June 24, 2005 8:26
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do you
set the amount of characters in a text area control





here is what I want to do, I want to have a text area that
someone can put no more than a certain number of characters in BUT they also
have to put a minimum number of characters in. Sort of like say more than a thousand
characters but no more than two thousand. Is there a way to do this? 

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










smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Cairngorm, ValueObjects, and inheritance

2005-06-23 Thread Kent Henneuse
I have a situation where I would like to eventually use either inheritance
or composition to put my objects together.  Properties of the ValueObject
are bound dynamically to the UI.

Scenario A:  
I could have ObjA_VO and ObjB_VO that extends ObjA_VO.  Works great on the
server side.  On the Flash side I get the following warning Changes for
dynamic property, YYY, with no declared [ChangeEvent] will not be detected.
I can add the ChangeEvent as described on pg 389 but I can't call
dispatchEvent() because ValueObjects do not extend UIObject.  Probably
shouldn't anyway.

Scenario B:
I could have ObjA_VO and ObjB_VO but have ObjB_VO own a reference to
ObjA_VO. (composition instead of inheritance).  I then have functions to
return the values.  I end up with the same warning message as in Scenario A
which is to be expected based on the explanation in the side bar at the
bottom of pg 388.

Now a way that does work but seems be a bit of a hack and breaks OOP is to
just have ObjA_VO and ObjB_VO.  No inheritance or composition.  This will
work for some objects I have but I already have a situation where this would
be a large amount of code copying. aka ClipBoard Inheritance. Yuck!

So how do I build a structure that can do this?  Can I get a handle to the
event dispatcher and fire the event so that data binding changes correctly?
Thoughts?

Seems like it would be a pretty common problem.  I am not even sure what
will happen with the Flex Gateway on the server side with inheritance or
object composition.

Thanks,

-Kent

I used to work in a fire hydrant factory. You couldn't park anywhere near
the place.

   - Steven Wright 



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Cairngorm, ValueObjects, and inheritance

2005-06-23 Thread Kent Henneuse
Very cool.  Ok mind stretch for an OO guy.  Mixins are interesting.  It will
take a bit to get used to it.  Thanks to Abdul for a good blog on the topic
and a pointer to the Flex 1.0 doc that has a discussion of mixins.  Please
bring it back in the doc if it is going to be used in the future.

Thanks,

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Chotin
Sent: Thursday, June 23, 2005 4:12 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm, ValueObjects, and inheritance

Scenario A sounds fine.  Here's a thread on making your faceless objects
event dispatchers:
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg06404.html

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Henneuse
Sent: Thursday, June 23, 2005 4:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm, ValueObjects, and inheritance

I have a situation where I would like to eventually use either
inheritance
or composition to put my objects together.  Properties of the
ValueObject
are bound dynamically to the UI.

Scenario A:  
I could have ObjA_VO and ObjB_VO that extends ObjA_VO.  Works great on
the
server side.  On the Flash side I get the following warning Changes for
dynamic property, YYY, with no declared [ChangeEvent] will not be
detected.
I can add the ChangeEvent as described on pg 389 but I can't call
dispatchEvent() because ValueObjects do not extend UIObject.  Probably
shouldn't anyway.

Scenario B:
I could have ObjA_VO and ObjB_VO but have ObjB_VO own a reference to
ObjA_VO. (composition instead of inheritance).  I then have functions to
return the values.  I end up with the same warning message as in
Scenario A
which is to be expected based on the explanation in the side bar at the
bottom of pg 388.

Now a way that does work but seems be a bit of a hack and breaks OOP is
to
just have ObjA_VO and ObjB_VO.  No inheritance or composition.  This
will
work for some objects I have but I already have a situation where this
would
be a large amount of code copying. aka ClipBoard Inheritance. Yuck!

So how do I build a structure that can do this?  Can I get a handle to
the
event dispatcher and fire the event so that data binding changes
correctly?
Thoughts?

Seems like it would be a pretty common problem.  I am not even sure what
will happen with the Flex Gateway on the server side with inheritance or
object composition.

Thanks,

-Kent

I used to work in a fire hydrant factory. You couldn't park anywhere
near
the place.

   - Steven Wright 



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



 






smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Cairngorm Store missing link?

2005-06-20 Thread Kent Henneuse
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
 


smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Cairngorm Store missing link?

2005-06-20 Thread Kent Henneuse
Ok.  Now I get it.  Thanks Steven, Allen, and Alex.  I was missing the
binding that Alex pointed out and was not entirely clear on the data binding
which is coming into focus.  (looking at individual entries in the book and
missed the chapter headings bashful grin).  So what ends up happening is
that we can avoid firing a change event and that overhead by putting the
shopping cart into an object.  As the object changes it causes the
dataProvider binding to be updated automagically.  Very slick.  I guess I
need to read chapters 15 - 18 closely and play with them.  Some of this
stuff is great on paper but doesn't sink in until you are actually trying to
do this sort of manipulation.  

   Thanks Again,

-Kent

-Original Message-
From: Alex Uhlmann [mailto:[EMAIL PROTECTED] On Behalf Of Alex
Uhlmann
Sent: Monday, June 20, 2005 9:16 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Cairngorm Store missing link?

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


smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Modifying Panel and Text Input

2005-06-17 Thread Kent Henneuse
I have a couple of cases where I would like to modify the default components
to display differently, beyond what I can do in the CSS.  I would like to
avoid building all new components but I will if I have to.

The first is that I would like to create TextInputs that are required but do
not show the star next to the field.  Think of a form where everything is
required.  Having the star next to each component is distracting rather then
valuable.  

The second case is that I would like to be able to put in an icon next to
the title on a panel.  I see that there is an icon property for container
but it has no effect on the panel.(maybe I just don't have it set up
correctly.)  Control over the placement of the icon in relation to the title
would be nice, but not critical.

So what does the group have to say?

Thanks,

-Kent 

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



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Modifying Panel and Text Input

2005-06-17 Thread Kent Henneuse
Ok.  Now I feel a bit sheepish.  It states in the Action Script Docs for
FormItem that 'required' property just shows or hides the asterix(star)
in the UI.  Nothing more.  I got myself totally confused by looking at
the Flex Store example that sneaks in their own validator,
RequiredFieldValidator.  I assumed that this was part of either the
StringValidator, if you applied it to a field, or it was tied into the
'required' field.

Could somebody at Macromedia please make a simple addition of a required
field to the StringValidator or just make it so that if you apply it to
a field it becomes a required field.  This would be similar to how the
EmailValidator behaves.  (you input a character, remove the character,
the move to another field, the email field will be marked as required.)

Thanks,

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kent Henneuse
Sent: Saturday, June 18, 2005 12:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Modifying Panel and Text Input

I have a couple of cases where I would like to modify the default
components
to display differently, beyond what I can do in the CSS.  I would like
to
avoid building all new components but I will if I have to.

The first is that I would like to create TextInputs that are required
but do
not show the star next to the field.  Think of a form where everything
is
required.  Having the star next to each component is distracting rather
then
valuable.  

The second case is that I would like to be able to put in an icon next
to
the title on a panel.  I see that there is an icon property for
container
but it has no effect on the panel.(maybe I just don't have it set up
correctly.)  Control over the placement of the icon in relation to the
title
would be nice, but not critical.

So what does the group have to say?

Thanks,

-Kent 

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



 
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] Panel Title Binding

2005-06-16 Thread Kent Henneuse
I think it is a loading issue.  I just created a public static var and 
hardcoded a string in my ModelLocator and it pulled that value.  You may have 
to set the title in the initialize function to make sure you get the right 
data.

You might also try to put title after you import your ModelLocator.  Like 
this:
mx:Panel
  mx:Script
import myflexhome.model.ModelLocator;
  /mx:Script
  mx:title{ModelLocator.title}/mx:title
/mx:Panel


I did find something that looks like a problem, the icon property of Container 
that Panel extends doesn't seem to have any effect on a Panel.  I would think 
it would put the icon next to the title.  Maybe there is another way to put an 
icon next to the title.

-Kent

-Original Message-

Is there a known issue with binding a panel title to a piece of data ?
 The screen does not redraw when the data changes.

Ex:
mx:Panel title={ModelLocator.getInstance().selectedYear}
width=100% height=100%
...
/mx:Panel

Rich




smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Flash + Cairngorm Example With Source Code

2005-06-16 Thread Kent Henneuse








Thanks Robin and Steven. That makes total
sense. I have been approaching my current implementation with a background in
Java and JSPs not in Cold Fusion or even thinking about it by doing what I
would call a poor mans version of web services (xml sans SOAP). I have been
lucky enough to be using the AMF gateway for this. In the end I am left with
the following network architecture:



Flex Side Network J2EE
Server

- -- || -
--- --



| Command | = | Delegate | =
|| = | Command | = | Business Delegate | = | EJBs |

- -- || -
--- --



By doing this I allow Struts to be a
Command on the server side and can keep my Business Delegate clean of any
HTTPRequest or AMF processing knowledge. I guess the only open question is
would you still pass different Command objects to the Delegate on the Flex side
and have more then one function in the delegate that does processing or would
you keep it as a one to one relationship between Commands and Delegates to
avoid accidental calls of the wrong onResult handler?



BTW Once I finally got a grasp on the
basics of Cairngorm and Flex my development has been able to movie very fast.
Now to figure out all the nuances in Flex containers to add the polish.



 -Kent







From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Robin Hilliard
Sent: Thursday, June 16, 2005 4:25
AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flash +
Cairngorm Example With Source Code











So for Kent, the
above is one instance of the separation of the Command/Delegate being useful by
hiding a server specific issue (ColdFusion's loose typing) in the
Delegate. Another similar example is a Flex application we're working on
that communicates in xml request/response strings with the server. All
the creation of the xml request string and the parsing of the response are
handled in the delegates - if we swap to a non-xml format later then the
Commands will be none the wiser, they work exclusively with VOs.











Finally, in the same application we have a few commands that trigger
off a string of four or more server calls via delegates in a row, so the
mapping of commands to delegates is 1:many (I've written a little state-machine
logic in my commands onResult using (gasp) a case statement - unfortunately I
haven't seen Steven's solution for this in 0.99 at this point, will have a look
soon but it may take a bit to tear me from my state machines, which work rather
nicely). 










smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Re: Assigning a AS variable to the return value of a web service

2005-06-16 Thread Kent Henneuse

By the look of it you are trying to use DataAvailable and it is not valid.
You might want to try this:

  ![CDATA[
  var JobRunning:Object = gvsJob.ReportJob.result; 
 ]]

This appears to be the way the example in the Flex Samples Explorer-Dynamic
Data Services does it.   wsId.operation.result

You may have to dig through the result for what you want but that is
probably not hard.

-Kent

-Original Message-
 mx:WebService wsdl=http://blahblah/_cfc/gvs_reports.cfc?wsdl; 
 id=gvsJob
 mx:operation name=ReportJob / 
 /mx:WebService
 
 
 mx:Script
   ![CDATA[
 var JobRunning:Object = ReportJob.DataAvailable.result; 
   ]]
 
 //Checks to see if database Jobs are running, if they are 
 not it will 
 //say available = yes, if they are it will say available = 
 no
 if (JobRunning == No) 
 {
 someactions 
   }
 /mx:Script



smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Cairngorm, why use delegates?

2005-06-15 Thread Kent Henneuse
Now that I have a pretty good understanding of Cairngorm and its structure I 
want to put out a question about why to build commands and delegates in the 
way presented in the store example.

The Command/Responder object always talks to a single delegate object.  This 
delegate object uses the Services.mxml file to determine where to go on the 
server side.  Because of the structure of the delegate you have to be very 
careful if you want to pass it different command objects to be responders so 
that you don't have inappropriate behavior in the UI.  You could always do a 
one to one relationship between commands and delegates but you end up with an 
explosion of different objects.

Why not simply bind in what the delegate is currently doing into the command 
object and have a duplicate command POJO on the server?  This way you could 
have special handling for Flex calls on the server that pull items from the 
HTTPSession, if needed, and then call a delegate that has multiple methods on 
it.  This way you isolate the Flex pieces from your delegates and can always 
put another framework like Struts on top of your delegates to provide another 
user interface.  Struts Actions are effectively the Command pattern with a 
different name.

Maybe it is a future expansion point that I am not thinking about.

Thanks,

-Kent

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




smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] RadioButton in a DataGrid

2005-06-13 Thread Kent Henneuse
Flexcoders,
   I am trying to put a single radio button on each row of a datagrid so
that I can use it as a selection for the next piece of a workflow.  So far I
have it displaying correctly by using a cellRenderer that is below.  The
problem is that I can select more then one of the radio buttons at a time so
they are not mutually exclusive.  Has anybody done this sort of thing
before?  Is there a better way to do this or am I just missing some piece of
magic to make it work?

I did also try to put a RadioButtonGroup on the DataGrid but it seems to get
ignored in the cellRenderer.  My guess is that there is a namespacing issue.

Thanks,

-Kent


?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.macromedia.com/2003/mxml;
  mx:Script
var labelData:String;

function setValue(str:String, item:Object) {
  if (item == undefined)
  {
 return;
  }
  labelData = String(item.Employee);
   }
  /mx:Script

  mx:RadioButton id=Flex groupName=itemPicker label={labelData}/
/mx:HBox



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Re: RadioButton in a DataGrid

2005-06-13 Thread Kent Henneuse
Awesome Alex That was the trick.  Just a scoping problem but by tricking
with the init I got the right behavior.

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of alex_harui
Sent: Monday, June 13, 2005 10:02 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: RadioButton in a DataGrid

It is more of a document-scope issue.  Each MXML file is its own 
document and radio button groups are per-document so each row is a 
document with one radio button in the group.

You might have better luck using an ASComponent subclass of 
RadioButton as the cellRenderer.  Create a .as file that looks sort 
of like:

class RadioButtonCellRenderer extends RadioButton
{
  function setValue()
  {
  }

  function init()
  {
groupName = DGRadioGroup
  }
}
--- In flexcoders@yahoogroups.com, Kent Henneuse [EMAIL PROTECTED] 
wrote:
 Nope.  Bummer.  I was hoping.  I can still select multiple radio 
buttons
 even with the flag set to false.  What I want is very similar to the
 checkbox cell renderer that comes with the Flex Samples Explorer 
but think
 of it as only one user can be active at a time.  Hence the use of a 
radio
 button.
 
  
 
 I have thought of writing a bunch of ActionScript to make sure that 
only one
 radio button is selected and unselect the others but this seems 
like a hack
 for something that is probably common.
 
  
 
 Thanks,
 
  
 
 -Kent
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of dave buhler
 Sent: Monday, June 13, 2005 8:01 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] RadioButton in a DataGrid
 
  
 
 Try setting multipleSelection to false.
 
 mx:DataGrid 
 multipleSelection=false
 
 /mx:DataGrid
 
 On 6/13/05, Kent Henneuse [EMAIL PROTECTED] wrote:
 
 Flexcoders,
I am trying to put a single radio button on each row of a 
datagrid so
 that I can use it as a selection for the next piece of a workflow.  
So far I
 have it displaying correctly by using a cellRenderer that is 
below.  The 
 problem is that I can select more then one of the radio buttons at 
a time so
 they are not mutually exclusive.  Has anybody done this sort of 
thing
 before?  Is there a better way to do this or am I just missing some 
piece of
 
 magic to make it work?
 
 I did also try to put a RadioButtonGroup on the DataGrid but it 
seems to get
 ignored in the cellRenderer.  My guess is that there is a 
namespacing issue.
 
 Thanks,
 
 -Kent
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:HBox xmlns:mx=http://www.macromedia.com/2003/mxml; 
   mx:Script
 var labelData:String;
 
 function setValue(str:String, item:Object) {
   if (item == undefined)
   {
  return;
   }
   labelData = String(item.Employee );
}
   /mx:Script
 
   mx:RadioButton id=Flex groupName=itemPicker 
label={labelData}/
 /mx:HBox
 
 
 
 
 
 
 
 
   _  
 
 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]
 mailto:[EMAIL PROTECTED] 
   
 * Your use of Yahoo! Groups is subject to the Yahoo!
 http://docs.yahoo.com/info/terms/  Terms of Service.





 
Yahoo! Groups Links



 





smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Servlet Filters and AMF

2005-06-09 Thread Kent Henneuse
In a Struts/JSP application you can put severlet filters in as a way to
cross cut your system and provide validation of login/session on a user.  If
it fails, you redirect the user to a login page.

Can I still utilize a servlet filter to check the login before my business
delegates get executed by AMF?  If so what will be sent back to the Flex
Client that I can grab so that the user will get redirected to a login (and
eventually resend their data if valid)?

Maybe there is an easier way to handle a session based login scenario that I
am not thinking of.  I hate to through an exception and have a fault handler
in every one of my commands on the Flex side (or a base command).

Thanks,

-Kent

Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away.
- Antoine de Saint Exupery
 



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Re: Question for the RIA Book Guys (or anyone with a Java back end for that matt

2005-06-09 Thread Kent Henneuse
The only thing I can think of off hand is that you for got to put a fault=
in your mx:RemoteObject  or you might have put it in as onFault

I put this in my onFault so that I can at least see what the error is on the
client side while debugging:

   public function onFault( event : Object ) : Void
   {
  mx.controls.Alert.show(event.fault.faultstring, 'Error');
   }

I also took a quick look at the book and I see that on Pages 463 and 464
they are missing the fault piece.  Depending on how you are coding it would
look like this:
   fault=event.call.faultHandler( event )
or this
   fault=event.call.faultHandler( event.result )


-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Libby
Sent: Thursday, June 09, 2005 1:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Question for the RIA Book Guys (or anyone with a
Java back end for that matt

I am very sorry, I got your name wrong. It is not Stephen,
but Steven! I hate it when people misspell my name : (

--- In flexcoders@yahoogroups.com, Libby [EMAIL PROTECTED] wrote:
 Hi, Stephen, et al
 
 I have implemented your business delegate scenario as outlined in the
 book in chapter 20. It works very well, except for when java throws an
 exception, the onFault never catches it. In network Monitor, I can see
 that an onStatus, probably System.onStatus, is invoked. I coded my
 delegate classe exactly as you have on page 479, and the onResult
 works fine. Can you give me any pointers to make the onFault catch
 the exception so I can handle it?
 
 Thanks,
 Libby





 
Yahoo! Groups Links



 





smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Re: Application flow best practices?

2005-06-08 Thread Kent Henneuse
Thanks Andrew and r0main.  That was a perfect description of what I needed.
Now to do a bit of thinking in the flow aspect to get a feel for that
method.  Andrew, you described the exact problem I am trying to solve.  I
have a view stack for the Login versus main application, and then was
thinking of doing a view stack for each of the screens within the flow.  I
still have not been able to determine how I might be able to use the
TitleWindow correctly in my own application.

Thanks for the description of the view data member in Cairngorm .99  This
should probably be added to the AS Docs on ViewHelper so that people know
what it references in their sub classes as they go through the store or
login example.  Maybe that description is coming with the eagerly awaited
PDF on the framework and store.(Happy to help edit and comment on that doc
if somebody form iterationtwo wants to send it my way)

Regars,

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of r0main
Sent: Tuesday, June 07, 2005 9:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Application flow best practices?

I do agree with Andrew on the view helpers states in a ModelLocator
and using bindings.
Just remember you can have many ModelLocators in an application, so
one may be dedicated at holding application-states, and another one
may be the classic one, which holds your data.

Cheers, r0main



--- In flexcoders@yahoogroups.com, Andrew Spaulding [EMAIL PROTECTED] wrote:
 Hi Kent,
 
 If you are using Cairngorm 0.99 there is no need to set the view like
 this:
 
 view:IndexViewHelper name=indexView view={this} /
 
 The above syntax is no longer necessary, and has been replaced by a
 much simpler use of the id attribute, making it simpler to call a
 function on the viewHelper within that view.
 
 view:IndexViewHelper id=indexView /
 
 Regarding the view data member, it is a part of the ViewHelper which
 extends MXMLObject. It has an initialized method which is called by
 the Flex component framework after a component has been initialized.
 This method takes 2 parameters, first being the parent document (the
 view object) and the second is the id of the view helper. In here the
 view attribute is set.
 
 To provide an idea of how I manage multiple screen views is that I
 have multiple workFlowState attributes in the ModelLocator, which my
 view stacks are bound to. For instance I have an
 applicationWorkflowState which switches views between the login screen
 and the main application (being another view stack). And then for each
 sub application (or section) I maintain a separate workflow state.
 
 Hope this makes sense. But I'd be interested to hear how others
 approach this issue.
 
 Best,
 
 Andrew Spaulding
 www.flexdaddy.com
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, Seth Voltz [EMAIL PROTECTED] wrote:
  Kent,
  
  The view member variable is passed in from the calling MXML file
as a
  parameter of the tag. In the case of IndexViewHelper you might call
 it as
  
  as:IndexViewHelper name=indexView view={ this } /
  
  assuming your name space for that tag is 'as'.
  
  
  Seth /
  
  
  Kent Henneuse wrote:
  
  I am using Flex for new development and starting to get a grasp on
 Cairngorm
  as well.  I am now trying to get a workflow between static screens
 laid out
  so that I can slowly wire up the server-side calls.
  
  What I would like to find out is what is the best way to set up the
 flow?
  Currently I have a View Stack that has each of the main screens. 
 This seems
  ok if I don't have a lot of screens but I can see that if I have
 more then
  say ten items in the View Stack it will rapidly become hard to
 manage.  I
  was thinking of having layers of View Stacks (View Stack inside of
 another
  View Stack) but haven't figured out how to do this in Cairngorm
 yet.  I am
  hoping to avoid having a class that manages the screens shown as if
 it were
  
  What are the approaches that others have used to solve this sort of
 flow
  problem?  Maybe it is simply just needing a better description of
 how the
  flow of the components are done in Cairngorm for the switching of
 the views.
  
  BTW where does the data member 'view' come from in
 IndexViewHelper.as and
  some of the other View Helper as I don't see it being a member of the
  ViewHelper base class?
  
 Thanks,
  
 -Kent
  
  Perfection is achieved, not when there is nothing more to add, but
 when
  there is nothing left to take away.
  - Antoine de Saint Exupery
   
  

  




 
Yahoo! Groups Links



 






smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Application flow best practices?

2005-06-07 Thread Kent Henneuse
I am using Flex for new development and starting to get a grasp on Cairngorm
as well.  I am now trying to get a workflow between static screens laid out
so that I can slowly wire up the server-side calls.

What I would like to find out is what is the best way to set up the flow?
Currently I have a View Stack that has each of the main screens.  This seems
ok if I don't have a lot of screens but I can see that if I have more then
say ten items in the View Stack it will rapidly become hard to manage.  I
was thinking of having layers of View Stacks (View Stack inside of another
View Stack) but haven't figured out how to do this in Cairngorm yet.  I am
hoping to avoid having a class that manages the screens shown as if it were

What are the approaches that others have used to solve this sort of flow
problem?  Maybe it is simply just needing a better description of how the
flow of the components are done in Cairngorm for the switching of the views.

BTW where does the data member 'view' come from in IndexViewHelper.as and
some of the other View Helper as I don't see it being a member of the
ViewHelper base class?

Thanks,

-Kent

Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away.
- Antoine de Saint Exupery
 



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Flex on the Web

2005-05-19 Thread Kent Henneuse
There is also OFoto which shows a more public consumer app.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, May 19, 2005 7:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex on the Web

Dow Jones is using embedded Flex in public facing contexts, and more to
come.

http://www.djindexes.com/mdsidx/portfolio/index.cfm?event=showPortfolioG
lobalRelativeRisk

Jeff Battershall
Application Architect
Dow Jones Indexes
[EMAIL PROTECTED]
(609) 520-5637 (p)
(484) 477-9900 (c)

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of David Mendels
Sent: Thursday, May 19, 2005 10:23 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex on the Web


Hi,

A) Many Flex apps are behind the Firewall
B) Many Flex apps are not yet public (the product has only been on the
market for a year, and it takes a while to build great things)
C) Some examples: Go to http://www.sherwin.com/do_it_yourself/ and click
on Color Visualizer.  Go to Intelligent Finance (www.if.com) and click
on Offset Mortgage calculator. Go to 5 by 5 software and check out
Bridgeworx
(http://bwdesigner.5by5software.com/BRIDGEWERX/BRIDGEWERX.mxml)

-David



 -Original Message-
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of Michel Jansen
 Sent: Thursday, May 19, 2005 7:16 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Flex on the Web
 
 Allen Manning wrote:
 
  Hello Michel,
   
  The examples on the Macromedia Flex Development centre is a start:
   
  http://www.macromedia.com/devnet/flex/example_apps.html
 
 Thanx. But i am looking for the spectaculars! I thought that
 Flex enabled the next generation WebApplications but what i 
 have seen up until now isn't that innovating ;-(( Or do 
 the creatives still have to find this technology.. Or is the 
 price too high??
 
 Michel
 
   
  HTH,
  Allen
 
   
  *Allen Manning*, Technical Director
  Prismix Ltd *t:* +44 (0)870 749 1100 *f:* +44 (0)870 749 1200 *w:*
  www.prismix.com http://www.prismix.com
 
   
   
   
   
   
 
  
 --
  --
  *From:* flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED]
  *On Behalf Of *Michel Jansen
  *Sent:* 19 May 2005 12:07
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Flex on the Web
 
  LS,
 
  I am looking for Flex application on the Web. Can anynone
 send me some
  URL's where i can find them? It looks like most of the RIA's in
  production on the Web are build with Flash, BackBase and/or Laszlo.
 
  Please enlighten me...
 
  Michel
 
  
 --
  --
  *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]

  mailto:[EMAIL PROTECTED]
 
  * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service http://docs.yahoo.com/info/terms/.
 
 
 
 
 
  
 Yahoo! Groups Links
 
 
 
  
 
 
 


 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 





smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Panel hearder-colors restriction or bug

2005-05-19 Thread Kent Henneuse
Thanks Manish.  I can safely say that there are two bugs.  One in the
StyleExplorer, which makes some sense, and one in FlexBuilder itself.  When
you view the design in FlexBuilder you get a funky look for the same
gradient.  It drove me nuts.

-Kent

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manish Jethani
Sent: Thursday, May 19, 2005 12:15 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Panel hearder-colors restriction or bug

On 5/18/05, Kent Henneuse [EMAIL PROTECTED] wrote:

 If I specify a single color for the header I get that color no matter the
 value.  If I specify a second color, for the gradient I assume, I get
black.
 See example code below.

The code example you posted works fine for me if I run it directly.

There might be a bug in the Style Explorer.  It may be trying to parse
the comma-separated values as a Number instead of an Array.


 
Yahoo! Groups Links



 





smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Panel hearder-colors restriction or bug

2005-05-18 Thread Kent Henneuse
I started playing with the Style Explorer (very cool!!!) and was trying to 
mess with the head-colors and making a nice gradient.  I tried some hex colors 
and it came out wrong.  So I made a quick example in FlexBuilder only to find 
that Flex/Flash is not behaving how I would expect it.

If I specify a single color for the header I get that color no matter the 
value.  If I specify a second color, for the gradient I assume, I get black.
See example code below.

I know that I am not using colors from the color picker in the Style Explorer 
so I am guessing there is some restriction on the colors I can choose.  Can 
somebody confirm or deny this?  If there are restrictions what are they?

Thanks,

-Kent



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
  mx:Panel title=This is a test Panel
mx:LabelPlace holder label/mx:Label
  /mx:Panel

  mx:Style
  Panel {
header-colors: #B5E3E2, #DCF5F4;
  }
  /mx:Style
/mx:Application




The significant problems we face cannot be solved at the same level of 
thinking we were at when we created them. -Albert Einstein



smime.p7s
Description: S/MIME cryptographic signature


RE: [flexcoders] Remoting Examples for Flex?

2005-05-18 Thread Kent Henneuse








Checkout the FlexExplorer samples. http://localhost:8700/samples/explorer/explorer.mxml
with the integrated JRun server. If you look under Dynamic Data Services you
will see how to do RemoteObject and Web Services. You will probably want to
look at the Java files on the server side also. C:\Program
Files\Macromedia\Flex\jrun4\servers\default\samples\WEB-INF\classes\samples\explorer



From there then next best place to go is
the Cairngorm examples. They are more involved but show best-practices for
coding the remote calls.



 -Kent











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Wednesday, May 18, 2005
11:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Remoting
Examples for Flex?





Hello All,



I just joined this list recently -as
I came over from the FlashCoders list. I am sure most of you on this
list, are also from FlashCoders, since Flex isso closely related to
Flash.



I've been searching the Docs best I can -
and I haven't found any examples or instructions on how to perform Remoting
Calls from inside of Flex. I've found the RemoteObject
mentioned - but am not entirely sure how touse this. I have this
down to a science in MX2004 using all the Remoting AS files, etc. but I've done
very little with Remoting using Components. I am a coding guy - so this
is all a little awkward, going back into a Drag and Drop
environment - and setting all my parameters using a Property Inspectors, etc.



Well, if any of you could point me in the
right direction, I'd greatly appreciate it. Also, are there any PDF
versions of the Flex 1.5 help system available yet - just like they did for
Flash MX?



Thanks for your help,



Mike











smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Session Access in Delegates

2005-05-10 Thread Kent Henneuse
I have been digging around in the remoting example code to try to figure out
ways to handle the system I am working with that stuff certain attributes
into the session upon login rather then retrieving each time.  The first
question I have is Where can I find the JavaDocs for flashgateway and calls
like flashgateway.Gateway.getHttpRequest()?

Second I am looking at the example login that comes with Cairngorm and
wondering what the scope of the CustomerDelegate object is.  I would think
that the object should have nothing but static calls but It acts as an
instantiated object.

Maybe it is just a mater of reading up on Flash Remoting.  If so just point
me in the right direction.


TIA,


-Kent


smime.p7s
Description: S/MIME cryptographic signature


[flexcoders] Internationalization?

2005-05-09 Thread Kent Henneuse
I did some digging through prior posts to see if there were some comments on
internationalization best practices but haven't found much.  Alistair and
Steven make a passing reference to XLIFF on page 651 of there 655 page book,
but that leaves me with more questions.

How are others currently solving the problem of internationalizing their
Flex applications?  Has there been any commentary from MM on when they will
roll this into Flex?  I would also assume that using MM's standard alert
dialog with mx.controls.Alert.OK is not possible.

TIA,

-Kent


smime.p7s
Description: S/MIME cryptographic signature