Re: [flexcoders] useHandCursor doesn't work when using custom cursors

2009-01-07 Thread Aaron Miller
Ok, thanks for the info. I guess we'll have to do it the long way then.

Best Regards,
~Aaron

On Tue, Jan 6, 2009 at 12:57 PM, Manish Jethani manish.jeth...@gmail.comwrote:

   On Wed, Jan 7, 2009 at 1:47 AM, Aaron Miller
 amil...@openbaseinteractive.com amiller%40openbaseinteractive.com
 wrote:

  I am using custom cursors with CursorManager, but I would like the hand
  cursor to override the default (custom) for some controls similar to the
 way
  editable text overrides the default cursor with the text indicator.
 Normally
  I would just set buttonMode=true useHandCursor=true but it doesn't
 work
  with custom cursors. Is there a built in way to force this behavior, or
 will
  I have to build a mechanism into my on cursor system with
 rollOver/rollOut
  events on each of the controls I want a hand cursor on?

 There are 2 types of cursors in Flex: system cursors -- the arrow, the
 hand, the I-beam, etc. -- and custom cursors. Custom cursors are
 really graphics you display in place of the system cursor (which is
 hidden) at the current mouse position. There are a number of problems
 with this: you don't know when the system cursor has changed from an
 arrow to an I-beam, for instance, and it's often hard to keep up with
 the current mouse position, so sometimes the custom cursor might lag.
 I avoid using custom cursors in my applications for these reasons.

 All that said, I think if you want to show the hand cursor
 conditionally you'll have to do what you're thinking: switch cursors
 on roll over and roll out.

 Manish

  



[flexcoders] useHandCursor doesn't work when using custom cursors

2009-01-06 Thread Aaron Miller
Hello,

I am using custom cursors with CursorManager, but I would like the hand
cursor to override the default (custom) for some controls similar to the way
editable text overrides the default cursor with the text indicator. Normally
I would just set buttonMode=true useHandCursor=true but it doesn't work
with custom cursors. Is there a built in way to force this behavior, or will
I have to build a mechanism into my on cursor system with rollOver/rollOut
events on each of the controls I want a hand cursor on?


Thanks for any advice!
~Aaron


Re: [flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-02 Thread Aaron Miller
OK, great thanks! I guess I was making it more complicated then it needed to
be.
 Of course, looking at y values would certainly make more sense for
 vertical scrolling. :(

Heh, it's ok. I have to do it in both directions, so either one is relevant.


Thanks for the help!
~Aaron

On Sat, Nov 1, 2008 at 6:09 PM, Tim Hoff [EMAIL PROTECTED] wrote:


 Of course, looking at y values would certainly make more sense for
 vertical scrolling. :(


 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim
 Hoff [EMAIL PROTECTED] wrote:
 
 
  In thinking about this more, you're going to have to find the
  localToContent point x value for myCanvasChild; to see if it's in the
  viewable area of the canvas. If it is, then do something like the last
  post; replacing myCanvasChild.x with the derived x value.
 
  -TH
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim
 Hoff TimHoff@ wrote:
  
  
   Something along these lines:
  
   var hiddenArea:int = myCanvasChild.height - (myCanvas.height -
   myCanvasChild.x);
  
   if (hiddenArea  0) myCanvas.veticalScrollPosition += hiddenArea;
  
   -TH
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Aaron Miller amiller@ wrote:
   
A good suggestion, but I'm not sure if this will work for my
  purposes.
   I do
have a reference to the child object in question, but I first need
  to
determine if it even needs to be scrolled. All I need to do is
  scroll
   it
enough so the child object is in view. So for instance, if there
 is
   100px
hidden, I need to scroll down 100px. How would I find the amount I
   need to
scroll by to get a child object in view?
Thanks for the help!
~Aaron
   
On Fri, Oct 31, 2008 at 10:02 AM, Tim Hoff TimHoff@ wrote:
   
 Hi Aaron,

 If you kow the index of the canvas child that you want to scroll
  to,
 something like this will work:

 myCanvas.verticalScrollPosition =
   myCanvas.getChildAt(myChildIndex).y;

 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Aaron Miller amiller@
 wrote:
 
  Is it to early to bump? I'm sure this is a common procedure,
 I'm
   just
 kind
  of new to display level programming. How would one go about
   pragmatically
  scrolling a Canvas until one of it's children is in view? I
 know
   how to
 do
  the rest, I just don't know how to find when the child is in
  view.
 
  Thanks for your time!
  ~Aaron
 
  On Wed, Oct 29, 2008 at 7:14 PM, Aaron Miller 
  amiller@ wrote:
 
   Hello,
   I am trying to figure out which portion of a Canvas is in
 view
   (as in
 the
   scrolled to location), then figure out if one of it's
 children
   is in
 that
   area. In other words, I want to find out if a child object
 is
  in
   view,
 and
   if not, scroll the Canvas until it is. I was looking over
 the
   Canvas
 methods
   in the docs, but nothing jumps out at me. What's the
 standard
   practice
 for
   this?
  
  
   Thanks!
   ~Aaron
  
 



   
   
   
--
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
amiller@
http://www.openbaseinteractive.com
   
  
 

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-01 Thread Aaron Miller
A good suggestion, but I'm not sure if this will work for my purposes. I do
have a reference to the child object in question, but I first need to
determine if it even needs to be scrolled. All I need to do is scroll it
enough so the child object is in view. So for instance, if there is 100px
hidden, I need to scroll down 100px. How would I find the amount I need to
scroll by to get a child object in view?
Thanks for the help!
~Aaron

On Fri, Oct 31, 2008 at 10:02 AM, Tim Hoff [EMAIL PROTECTED] wrote:

   Hi Aaron,

 If you kow the index of the canvas child that you want to scroll to,
 something like this will work:

 myCanvas.verticalScrollPosition = myCanvas.getChildAt(myChildIndex).y;

 -TH

 --- In flexcoders@yahoogroups.com, Aaron Miller [EMAIL PROTECTED] wrote:
 
  Is it to early to bump? I'm sure this is a common procedure, I'm just
 kind
  of new to display level programming. How would one go about pragmatically
  scrolling a Canvas until one of it's children is in view? I know how to
 do
  the rest, I just don't know how to find when the child is in view.
 
  Thanks for your time!
  ~Aaron
 
  On Wed, Oct 29, 2008 at 7:14 PM, Aaron Miller 
  [EMAIL PROTECTED] wrote:
 
   Hello,
   I am trying to figure out which portion of a Canvas is in view (as in
 the
   scrolled to location), then figure out if one of it's children is in
 that
   area. In other words, I want to find out if a child object is in view,
 and
   if not, scroll the Canvas until it is. I was looking over the Canvas
 methods
   in the docs, but nothing jumps out at me. What's the standard practice
 for
   this?
  
  
   Thanks!
   ~Aaron
  
 

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-10-31 Thread Aaron Miller
Is it to early to bump? I'm sure this is a common procedure, I'm just kind
of new to display level programming. How would one go about pragmatically
scrolling a Canvas until one of it's children is in view? I know how to do
the rest, I just don't know how to find when the child is in view.

Thanks for your time!
~Aaron

On Wed, Oct 29, 2008 at 7:14 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Hello,
 I am trying to figure out which portion of a Canvas is in view (as in the
 scrolled to location), then figure out if one of it's children is in that
 area. In other words, I want to find out if a child object is in view, and
 if not, scroll the Canvas until it is. I was looking over the Canvas methods
 in the docs, but nothing jumps out at me. What's the standard practice for
 this?


 Thanks!
 ~Aaron



[flexcoders] code going into a black whole

2008-10-30 Thread Aaron Miller
Hello, I have some strange behavior I'm trying to figure out. It seems like
my code just stops working in mid-loop without giving any errors.

==
public function set pageModel( value:PageModel ): void {
trace('PageCanvas.pageModel = '+value);
if( _pageModel != value ) {
_pageModel = value;
 this.width = _pageModel.width;
this.height = _pageModel.height;
 this.removeAllChildren();
 for each( var elementModel:IPageElementModel in _pageModel.elements ) {
trace('This happens!');
var newElement:IElementControl =
_docManager.getNewElementInstance(elementModel);

trace('But this does not!');
 this.addChild( DisplayObject(newElement) );
}
 trace('End of the line.');
}
}
==

trace output:
==
PageCanvas.pageModel = [object PageModel]
This happens!
DocManager.getNewElementInstance
==

So it seams that everything stops after the call to getNewElementInstance.

Is it because I'm doing all this stuff in a setter? If this is the case,
what would be the appropriate way to recreate all the children when the
underlying data model changes?


Thanks for any input!
~Aaron


Re: [flexcoders] code going into a black whole

2008-10-30 Thread Aaron Miller
Nope, I'm running the debugger. Application continues just fine, there's
just a gap in the code that disappears for a bit.

On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith [EMAIL PROTECTED] wrote:

My guess is that getNewElementInstance() threw an error and you're not
 running in a debugger.



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Thursday, October 30, 2008 2:27 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] code going into a black whole



 Hello, I have some strange behavior I'm trying to figure out. It seems like
 my code just stops working in mid-loop without giving any errors.





 ==

 public function set pageModel( value:PageModel ): void {

 trace('PageCanvas.pageModel = '+value);

 if( _pageModel != value ) {

 _pageModel = value;



 this.width = _pageModel.width;

 this.height = _pageModel.height;



 this.removeAllChildren();



 for each( var elementModel:IPageElementModel in
 _pageModel.elements ) {

 trace('This happens!');

 var newElement:IElementControl =
 _docManager.getNewElementInstance(elementModel);



 trace('But this does not!');



 this.addChild(
 DisplayObject(newElement) );

 }



 trace('End of the line.');

 }



 }

 ==



 trace output:

 ==

 PageCanvas.pageModel = [object PageModel]

 This happens!

 DocManager.getNewElementInstance

 ==



 So it seams that everything stops after the call to getNewElementInstance.



 Is it because I'm doing all this stuff in a setter? If this is the case,
 what would be the appropriate way to recreate all the children when the
 underlying data model changes?





 Thanks for any input!

 ~Aaron

   



Re: [flexcoders] code going into a black whole

2008-10-30 Thread Aaron Miller
Yup, looks like the binding was swallowing up the error so there didn't
appear to be any problem. I ended up just scrapping all the code in the
setter and dispatched an event instead. When that code was executed in the
listener, I was getting a runtime error. All fixed now.
Thanks for the insight on binding. I will know to be more careful with my
setters now.

Best Regards,
~Aaron

On Thu, Oct 30, 2008 at 3:28 PM, Gordon Smith [EMAIL PROTECTED] wrote:

Try putting try/catch around the call.



 - Gordon



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, October 30, 2008 3:25 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] code going into a black whole



 If your method gets invoked by a binding, the binding code will swallow
 most errors so you never see them. It's rather annoying when you're losing
 an error, but without it binding would be pretty much useless. Some sort of
 BindingUtils.logThrownErrors = true feature would be nice :)

 -Josh

 On Fri, Oct 31, 2008 at 8:12 AM, Aaron Miller 
 [EMAIL PROTECTED] wrote:

 Nope, I'm running the debugger. Application continues just fine, there's
 just a gap in the code that disappears for a bit.



 On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith [EMAIL PROTECTED] wrote:

 My guess is that getNewElementInstance() threw an error and you're not
 running in a debugger.



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Thursday, October 30, 2008 2:27 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] code going into a black whole



 Hello, I have some strange behavior I'm trying to figure out. It seems like
 my code just stops working in mid-loop without giving any errors.





 ==

 public function set pageModel( value:PageModel ): void {

 trace('PageCanvas.pageModel = '+value);

 if( _pageModel != value ) {

 _pageModel = value;



 this.width = _pageModel.width;

 this.height = _pageModel.height;



 this.removeAllChildren();



 for each( var elementModel:IPageElementModel in
 _pageModel.elements ) {

 trace('This happens!');

 var newElement:IElementControl =
 _docManager.getNewElementInstance(elementModel);



 trace('But this does not!');



 this.addChild(
 DisplayObject(newElement) );

 }



 trace('End of the line.');

 }



 }

 ==



 trace output:

 ==

 PageCanvas.pageModel = [object PageModel]

 This happens!

 DocManager.getNewElementInstance

 ==



 So it seams that everything stops after the call to getNewElementInstance.



 Is it because I'm doing all this stuff in a setter? If this is the case,
 what would be the appropriate way to recreate all the children when the
 underlying data model changes?





 Thanks for any input!

 ~Aaron






 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/

   



[flexcoders] finding out if a child is in view with the current scroll location of a Canvas

2008-10-29 Thread Aaron Miller
Hello,
I am trying to figure out which portion of a Canvas is in view (as in the
scrolled to location), then figure out if one of it's children is in that
area. In other words, I want to find out if a child object is in view, and
if not, scroll the Canvas until it is. I was looking over the Canvas methods
in the docs, but nothing jumps out at me. What's the standard practice for
this?


Thanks!
~Aaron


[flexcoders] binding execution on Tree nodes

2008-10-27 Thread Aaron Miller
Hello,
I have a Tree component where the labelField is a bindable property of the
data model:

=
[Bindable(event='pageTitleChange')]
[Bindable(event='propertyChange')]
public function get pageTitle(): String {
return _pageTitle;
}

public function set pageTitle( data:String ): void {
_pageTitle = data;
dispatchEvent( new Event('pageTitleChange') );
}
=

When I update the property, the bindings do not execute until I do something
on the tree like add a new node or expand and item. I tried calling methods
like validateProperties() when I know it should update, but no luck. I also
tried executeBindings(), which did work, but I loose my node selection.

Do I need to bubble up binding events to the parent node for them to execute
immediately?


Thanks for any input!
~Aaron


Re: [flexcoders] Question about html embed (AC_FL_RunContent)

2008-10-26 Thread Aaron Miller
Didn't seem to work either. I guess for now I will just have to house all my
html files in the same directory.

On Wed, Oct 22, 2008 at 10:41 AM, Tracy Spratt [EMAIL PROTECTED]wrote:

Looking through the javascript that this function calls, it appears
 that it appends the 'swf extension itself.



 Try what you have, but omit the .swf



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Tuesday, October 21, 2008 8:13 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Question about html embed (AC_FL_RunContent)



 Ok, sorry this is a lame question, but I'm not an HTML guy and I'm pounding
 my head on the desk trying to figure this out. How do I point to the
 absolute path of the SWF in the Adobe style embed script? All of our pages
 need to embed the same swf located in the root directory. For organization,
 some of the html pages are in sub directories. Any pages in a sub directory
 do not load the SWF. I tried the following with no luck:



 AC_FL_RunContent(

 src, /WebNavMenu.swf,

 width, 100%,

 height, 100%,

 align, middle,

 id, WebNavMenu,

 quality, high,

 wmode, transparent,

 name, WebNavMenu,

 allowScriptAccess,sameDomain,

 type, application/x-shockwave-flash,

 pluginspage, 
 http://www.adobe.com/go/getflashplayer;

 );





 This seems like it should be a pretty common thing, but I'm all out of
 ideas. Any help please?





 Thanks for your time!

 ~Aaron



  



[flexcoders] Question about html embed (AC_FL_RunContent)

2008-10-21 Thread Aaron Miller
Ok, sorry this is a lame question, but I'm not an HTML guy and I'm pounding
my head on the desk trying to figure this out. How do I point to the
absolute path of the SWF in the Adobe style embed script? All of our pages
need to embed the same swf located in the root directory. For organization,
some of the html pages are in sub directories. Any pages in a sub directory
do not load the SWF. I tried the following with no luck:
AC_FL_RunContent(
src, /WebNavMenu.swf,
width, 100%,
height, 100%,
align, middle,
id, WebNavMenu,
quality, high,
wmode, transparent,
name, WebNavMenu,
allowScriptAccess,sameDomain,
type, application/x-shockwave-flash,
pluginspage, http://www.adobe.com/go/getflashplayer;
);


This seems like it should be a pretty common thing, but I'm all out of
ideas. Any help please?


Thanks for your time!
~Aaron


Re: [flexcoders] flex application is not loading under HTTPS

2008-10-02 Thread Aaron Miller
Do you have an SSL cert installed? I had problems with Internet Explorer
when there is no SSL cert installed on the server. Installing one fixed our
issues.

Best Regards,
~Aaron

On Thu, Oct 2, 2008 at 6:29 PM, venkateswarlu naidu 
[EMAIL PROTECTED] wrote:

   Hi All,

 Today we have deployed our flex application in weblogic (firewall and
 secure enabled). When i try accessing the site (ex: https://), flex
 application is not loading in INTERNET EXPLORER where as it is loading in
 firefox. The same application is working fine under HTTP where as it is NOT
 working under HTTPS.

 Please let me know the all possible reasons for this, i need to fix this
 issue asap.

 Any help is highly appreciated.

 Thanks in advance,
 Venkat.

 Connect with friends all over the world. Get Yahoo! India Messenger at
 http://in.messenger.yahoo.com/?wm=n/
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Learning Flex and AMFPHP

2008-09-25 Thread Aaron Miller
It is hard to find. Here is a snippet from my code. Hope it helps!
public function loadFavorites( resultHandler:Function,
errorHandler:Function, zone:String ): void {
trace('FavoritesProxy.loadFavorites');
var dataService:RemoteObject = new RemoteObject();
var channel:Channel = new AMFChannel( 'amfphp',
GlobalSettings.AMFPHP_GATEWAY );
var channelSet:ChannelSet = new ChannelSet();
 channelSet.addChannel(channel);
 dataService.channelSet = channelSet;
dataService.destination = amfphp;
dataService.source = FavoritesProxy;
dataService.loadFavorites.addEventListener( ResultEvent.RESULT,
resultHandler );
dataService.addEventListener(FaultEvent.FAULT, errorHandler);
dataService.loadFavorites( myUser.userID, myUser.userHash, zone );
}

This calls FavoritesProxy-loadFavorites in the amfphp services.

Best Regards,
~Aaron

On Wed, Sep 24, 2008 at 9:52 PM, timgerr [EMAIL PROTECTED] wrote:

   Hello all, hope you all are doing good. I have a question on how to
 build the Flex RemoteObject method in action script. I am having
 troubles doing this. Here is my RemoteObject:

 mx:RemoteObject id=myservice fault=faultHandler(event)
 showBusyCursor=true source=tutorials.HelloWorld destination=amfphp
 mx:method name=sayHello result=resultHandler(event) /
 /mx:RemoteObject

 Can someone take the above code and do it in acitonscript? It is not
 that I want someone to do my work, I am having a hard time finding
 data to do this. Most examples are in Flash and for some reason they
 do not work right in Flex.

 Thanks for all the help,
 timgerr

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: Binding programmatically

2008-09-24 Thread Aaron Miller
But then how would this execute the binding when the text is updated?
What I would do is use BindingUtils.bindProperty on each TextInput to set up
the bindings in Actionscript.


Best Regards,
~Aaron

On Wed, Sep 24, 2008 at 7:15 PM, Paul Andrews [EMAIL PROTECTED] wrote:


 Yes, write a function:

 function allNonBlank():Boolean {
 for (var i:uint=0; i this.numChildren; i++) {
 if (this.getChildAt(i).text != ) return false;
 }
 return true;
 }

 Then
 mx:Button enabled={allNonBlank()} label=submit /

 Haven't tested it - something like that.

 Paul

  raf

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] Creating a popup Menu input

2008-09-10 Thread Aaron Miller
Hello,
I want to have a quick little popup text input so I am using a Menu
component set to editable and using an item renderer. I've almost got it
working, except I get a null property error when hit enter (coming from
List.itemEditorItemEditBeginHandler).

Here is my menu creation code:

==
private function onBranchCategoryClick(): void {
var menuLoc:Point = new Point();
var menu:Menu;
 // Calculate position of Menu in Application's coordinates.
menuLoc.x = idBranchCategoryBtn.x + 10;
menuLoc.y = idBranchCategoryBtn.y + idBranchCategoryBtn.height + 20;
menuLoc = this.localToGlobal(menuLoc);

menu = Menu.createMenu(Application(Application.application), [''], false);
menu.width = 100;
menu.height = 25;
menu.editable = true;
menu.itemRenderer = new
ClassFactory(pkg.renderers.BranchCategoryMenuRenderer);
//menu.rendererIsEditor = true;
menu.addEventListener( itemClick, handleCategoryBranchSelected );
menu.show(menuLoc.x, menuLoc.y);
}
==

And the item renderer code:
==
?xml version=1.0 encoding=utf-8?
mx:TextInput xmlns:mx=http://www.adobe.com/2006/mxml; text={data}
implements=mx.controls.menuClasses.IMenuItemRenderer change=data =
this.text
mx:Script
![CDATA[
import mx.controls.Menu;

import pkg.models.products.ProductNode;


public function get menu():Menu {
return null;
}

public function set menu(data:Menu):void {
}

public function get measuredBranchIconWidth(): Number { return 0; }

public function get measuredIconWidth(): Number { return 0; }

public function get measuredTypeIconWidth(): Number { return 0; }
]]
/mx:Script

/mx:TextInput
==

In my itemClick handler, event.item contains the string that was entered and
the error occur right after the handler call.


Could anyone please tell me what I'm doing wrong?


Thanks!
~Aaron


Re: [flexcoders] Creating a popup Menu input

2008-09-10 Thread Aaron Miller
Good to know. I'll use PopUpButton instead.

Thanks Alex!
~Aaron

On Wed, Sep 10, 2008 at 4:14 PM, Alex Harui [EMAIL PROTECTED] wrote:

How about PopUpButton instead.  I don't really want to dig into
 editable Menus.  It wasn't intended behavior



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Wednesday, September 10, 2008 3:18 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Creating a popup Menu input



 Hello,



 I want to have a quick little popup text input so I am using a Menu
 component set to editable and using an item renderer. I've almost got it
 working, except I get a null property error when hit enter (coming from
 List.itemEditorItemEditBeginHandler).



 Here is my menu creation code:



 ==

 private function onBranchCategoryClick(): void {

 var menuLoc:Point = new Point();

 var menu:Menu;



 // Calculate position of Menu in Application's coordinates.

 menuLoc.x = idBranchCategoryBtn.x + 10;

 menuLoc.y = idBranchCategoryBtn.y + idBranchCategoryBtn.height
 + 20;

 menuLoc = this.localToGlobal(menuLoc);



 menu = Menu.createMenu(Application(Application.application),
 [''], false);

 menu.width = 100;

 menu.height = 25;

 menu.editable = true;

 menu.itemRenderer = new
 ClassFactory(pkg.renderers.BranchCategoryMenuRenderer);

 //menu.rendererIsEditor = true;

 menu.addEventListener( itemClick,
 handleCategoryBranchSelected );

 menu.show(menuLoc.x, menuLoc.y);

 }

 ==



 And the item renderer code:

 ==

 ?xml version=1.0 encoding=utf-8?

 mx:TextInput xmlns:mx=http://www.adobe.com/2006/mxml; text={data}

 implements=mx.controls.menuClasses.IMenuItemRenderer
 change=data = this.text

 mx:Script

 ![CDATA[

 import mx.controls.Menu;



 import pkg.models.products.ProductNode;





 public function get menu():Menu {

 return null;

 }



 public function set menu(data:Menu):void {



 }



 public function get measuredBranchIconWidth(): Number { return 0; }



 public function get measuredIconWidth(): Number { return 0; }



 public function get measuredTypeIconWidth(): Number { return 0; }

 ]]

 /mx:Script



 /mx:TextInput

 ==



 In my itemClick handler, event.item contains the string that
 was entered and the error occur right after the handler call.





 Could anyone please tell me what I'm doing wrong?





 Thanks!

 ~Aaron





   



Re: [flexcoders] Creating a popup Menu input

2008-09-10 Thread Aaron Miller
Hi Tracy,
That was my original idea, but I thought it would be a pain to add in all
the cancellation listeners. In a menu, it closes if the user clicks out,
hits escape, etc. If they hit enter it commits the data. I just didn't want
to recreate all that functionality if it's already been done before.

Thanks for the suggestion though!
~Aaron



On Wed, Sep 10, 2008 at 4:58 PM, Tracy Spratt [EMAIL PROTECTED] wrote:

Why not pop-up a TextInput?

 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Wednesday, September 10, 2008 7:30 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Creating a popup Menu input



 Good to know. I'll use PopUpButton instead.





 Thanks Alex!

 ~Aaron

 On Wed, Sep 10, 2008 at 4:14 PM, Alex Harui [EMAIL PROTECTED] wrote:

 How about PopUpButton instead.  I don't really want to dig into editable
 Menus.  It wasn't intended behavior



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Wednesday, September 10, 2008 3:18 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Creating a popup Menu input



 Hello,



 I want to have a quick little popup text input so I am using a Menu
 component set to editable and using an item renderer. I've almost got it
 working, except I get a null property error when hit enter (coming from
 List.itemEditorItemEditBeginHandler).



 Here is my menu creation code:



 ==

 private function onBranchCategoryClick(): void {

 var menuLoc:Point = new Point();

 var menu:Menu;



 // Calculate position of Menu in Application's coordinates.

 menuLoc.x = idBranchCategoryBtn.x + 10;

 menuLoc.y = idBranchCategoryBtn.y + idBranchCategoryBtn.height
 + 20;

 menuLoc = this.localToGlobal(menuLoc);



 menu = Menu.createMenu(Application(Application.application),
 [''], false);

 menu.width = 100;

 menu.height = 25;

 menu.editable = true;

 menu.itemRenderer = new
 ClassFactory(pkg.renderers.BranchCategoryMenuRenderer);

 //menu.rendererIsEditor = true;

 menu.addEventListener( itemClick,
 handleCategoryBranchSelected );

 menu.show(menuLoc.x, menuLoc.y);

 }

 ==



 And the item renderer code:

 ==

 ?xml version=1.0 encoding=utf-8?

 mx:TextInput xmlns:mx=http://www.adobe.com/2006/mxml; text={data}

 implements=mx.controls.menuClasses.IMenuItemRenderer
 change=data = this.text

 mx:Script

 ![CDATA[

 import mx.controls.Menu;



 import pkg.models.products.ProductNode;





 public function get menu():Menu {

 return null;

 }



 public function set menu(data:Menu):void {



 }



 public function get measuredBranchIconWidth(): Number { return 0; }



 public function get measuredIconWidth(): Number { return 0; }



 public function get measuredTypeIconWidth(): Number { return 0; }

 ]]

 /mx:Script



 /mx:TextInput

 ==



 In my itemClick handler, event.item contains the string that
 was entered and the error occur right after the handler call.





 Could anyone please tell me what I'm doing wrong?





 Thanks!

 ~Aaron





  



Re: [flexcoders] Re:Looking for a Flex forum.

2008-09-08 Thread Aaron Miller
Is SEO still an issue when writing a Flex application? I would argue that
it's not.
A) Google (Yahoo coming soon if not already) now indexes content within a
SWF. This includes dynamic content as well. Using dynamic deep linking and a
site map that points to different content in the SWF helps a great deal with
this.

B) If A isn't enough, you could always use mod_rewrite (or
similar technology) to take a link structure and pass parameters down into a
SWF to determine the view state and content. In addition, the server side
script could print an html version of the content in the background which
would allow search engines to index the content and give non-flash users
access to the information as well. The only down side to this approach is
you can not update the URL bar while the user browses through the
application since anchor links are not passed through to the server (to my
knowledge). This can be compensated for by displaying a link to this page
in the application.

Anyways, sorry I couldn't answer your original question better. But I think
the idea of a Flex based forum is definitely a realizable idea, and I didn't
want you to give up on it because of a few dissenters.


Best Regards,
~Aaron

On Mon, Sep 8, 2008 at 11:06 AM, Doug McCune [EMAIL PROTECTED] wrote:

   Tim,

 I haven't seen any forums written in Flex, and I'd argue (as I think many
 here would) that Flex is not a great technology for writing a forum
 application. There are some things that Flex does incredibly well, and some
 that it does not... and text-based content portals is one that Flex is not
 great for. For the same reasons I'd argue that Flex is not a good choice if
 you want to create a blogging platform. The SEO issues alone, not to mention
 the text rendering issues, would prevent me suggesting using Flex.

 Doug


 On Mon, Sep 8, 2008 at 10:52 AM, timgerr [EMAIL PROTECTED] wrote:

   I am sorry that I might not have stated my question better. I am
 looking for a forum that is coded in Flex. I have not seen any with
 Google searches and was wondering what (if any) people are using.

 I am sorry that my question might not have been formulated to your
 desire but that was a lousy answer. If you are unable to reply with
 any constructive responses, they why respond?

 Common, this form is for learning and asking questions. I was taught
 that there are not dumb questions, except for the ones that are never
 asked. I guess since you create Instructional Technology  Media
 software then all questions you answer in your software help people
 that don't ask questions

 I am sorry that you took your time to read my post, I am sorry that
 you responded.

 timgerr

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Merrill, Jason

 [EMAIL PROTECTED] wrote:
 
   I was wondering if there was a Flex forum that people have used?
 
 
 
  I'm speechless.
 
 
 
  Jason Merrill
  Bank of America
  Enterprise Technology  Global Risk LLD
  Instructional Technology  Media
 
  Join the Bank of America Flash Platform Developer Community
  blocked::
 http://sharepoint.bankofamerica.com/sites/tlc/flash/default.as
  px
 
  Are you a Bank of America associate interested in innovative learning
  ideas and technologies?
  Check out our internal Innovative Learning Blog
  blocked::
 http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.
  aspx  subscribe
  blocked::
 http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts
  /SubNew.aspx?List=\%7b41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\%7dSource=ht
 
 tp://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.
  aspx .
 


  



-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] SEO and Flash content

2008-09-08 Thread Aaron Miller
Don't return different content to Google or other spiders. Instead, always
print the SAME text content hidden behind the swf. Google will index this
content just fine and people without flash will also have access to the
content. I have confirmed with someone at Google that this is an acceptable
practice as long as there is no malicious intent. This is the method we've
been using in our projects and it works just great. Our company website
is completely Flex based and turns up on the first page if you search
information based strategy.  Just use your best judgment and don't do
anything shady. Use mod_rewrite to link to specific content in the swf which
should also print the SAME content in the background. Keep your content in
XML format for quick and easy updates to either display layer.

Best Regards,
~Aaron

On Mon, Sep 8, 2008 at 7:19 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   Google most definitely re-indexes from various different data-centres
 (read: class B addresses) and I'm sure also occasionally using random real
 user-agents, and will punish sites which consistently return A to
 googlebot and B to browsers. They'd be fools not to, and they hire a *lot*
 of very smart people.

 -Josh

 On Tue, Sep 9, 2008 at 11:39 AM, Alan [EMAIL PROTECTED] wrote:

  I had a meeting with ( forgot his name ) from Adobe and he gave me the
 scoop.
 You will not be able to determine ( legally ) if and when your .swf is
 being indexed.  You can't even get a report on how successful /
 unsuccessful the spider was in crawling your .swf

 There are no 'best practices' just don't try to 'cheat'. Apparently, Adobe
 and the other search providers have developed methods ( both separately and
 together )  to 'punish' those who spam their content.

 My opinion of the whole thing

 It's a Joke,  don't waste your time.  Remember that community effort to
 get ( i think it was  ) Flexalicious to pop up in google.  Well it failed
 nicely.


 Alan

 On Sep 8, 2008, at 8:54 PM, arieljake wrote:

 I was wondering what it takes for the server to realize that a request
 is coming from Google's indexing machines so that text can be output
 instead of a Flex app.

 Also, do we need to be careful doing this to not get in trouble with
 Google? Are their best practices to follow when we output the text?





 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 http://flex.joshmcdonald.info/

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] What is the best way to measure htmlText at run time?

2008-08-30 Thread Aaron Miller
Hello,

I have to create Text components at run time and assign some content to it's
htmlText. I'm trying to figure out the best way to measure the content's
height, but so far have not been very good at it. Ideally, I would like to
use the same method Flex uses when the Text component is explicitly set in
the MXML like so:

mx:Text width=100% htmlText={HTML_CONTENT} /


I've tried using the seemingly obvious measureHTMLText, but this doesn't
seem to work as I expected it to.

===
?xml version=1.0 encoding=utf-8?
mx:Box xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100%


mx:Script
![CDATA[
import mx.utils.ObjectUtil;

[Bindable]
private var _htmlContent:String;

public function get htmlContent(): String {
return _htmlContent;
}

public function set htmlContent( data:String ): void {
_htmlContent = data;
}

private function onUpdateComplete(): void {
trace('HTMLContentBox.onUpdateComplete: '+_htmlContent);

//mesure content height and update this.height accordingly
var tm:TextLineMetrics = idContentText.measureHTMLText(_htmlContent);
trace( ObjectUtil.toString(tm) );

this.height = tm.height + this.getStyle('paddingBottom') +
this.getStyle('paddingTop');
}

]]
/mx:Script

mx:Text id=idContentText width=100% height=100%
selectable=false htmlText={_htmlContent} styleName=mediumStandardLabel
 updateComplete=onUpdateComplete(); /
/mx:Box
===


So, this leaves me with a question. What is the official way to measure
htmlText at run time?


Thanks for any input!
~Aaron


Re: [flexcoders] Intriguing AMFPHP sample

2008-08-20 Thread Aaron Miller
ObjectUtil.toString(result) and see what it is. I'm curios to know too.

Best Regards,
~Aaron

On Wed, Aug 20, 2008 at 8:22 AM, Nik Derewianka [EMAIL PROTECTED] wrote:

   Hi,

 Was just looking through some blogs on AMFPHP and came across a php
 snippet that showed:

 function getSwf()
 {
 return new ByteArray(file_get_contents(my.swf));
 }

 But no sample of what to do on the Flex side to turn it back into
 something useable.

 How would you convert that ByteArray of the swf file back to a
 MovieClip/SWFLoader/something displayable ??

 Thanks,
 Nik
  



Re: [flexcoders] Flex/AIR IRC Channel?

2008-08-19 Thread Aaron Miller
What about #flexcoders on freenode?

On Tue, Aug 19, 2008 at 6:10 PM, Sherif Abdou [EMAIL PROTECTED] wrote:

There was this post by Mike a year ago and No idea what happend
 http://www.mikechambers.com/blog/2007/04/19/flex-apollo-irc-channel/

 If so, Do you guy's think it is a good idea to supplement FlexCoders or
 not.
  



Re: [flexcoders] Flex/AIR IRC Channel?

2008-08-19 Thread Aaron Miller
So make it alive. There doesn't need to be any official sanction to talk
about Flex in a public setting. If it catches on, it catches on. If not,
then it was a bad idea.

On Tue, Aug 19, 2008 at 6:53 PM, Sherif Abdou [EMAIL PROTECTED] wrote:

seems pretty dead only 2 users

 - Original Message -
 *From:* Aaron Miller [EMAIL PROTECTED]
 *To:* flexcoders@yahoogroups.com
 *Sent:* Tuesday, August 19, 2008 8:25 PM
 *Subject:* Re: [flexcoders] Flex/AIR IRC Channel?

  What about #flexcoders on freenode?

 On Tue, Aug 19, 2008 at 6:10 PM, Sherif Abdou [EMAIL PROTECTED]wrote:

   There was this post by Mike a year ago and No idea what happend
 http://www.mikechambers.com/blog/2007/04/19/flex-apollo-irc-channel/

 If so, Do you guy's think it is a good idea to supplement FlexCoders or
 not.


   



Re: [flexcoders] Flex 3D

2008-08-11 Thread Aaron Miller
Check out Papervision3D. It is the most developed 3D engine for Flash that I
know of.

Best Regards,
~Aaron

On Mon, Aug 11, 2008 at 12:49 PM, Carlos Obregón [EMAIL PROTECTED] wrote:

   I'm interesting in exploring Flex 3D from which I have seen demos.

 However I can't find concrete information on where to start!

 Is there official support for it or is there some kind of middleware?

 Thanks.

  



[flexcoders] adding to default ContextMenu in flex app

2008-08-06 Thread Aaron Miller
Hello,

I am trying to figure out how to add an item to the default context menu
when someone right clicks inside the stage. I know I have to add a
ContextMenuItem to the ContextMenu.customItems properties, but I'm not sure
how to reference the default menu. Listening for a MouseEvent.RIGHT_CLICK in
the application scope only seems to be available for AIR. How would I go
about adding an item to the default menu?


Thanks!
~Aaron


[flexcoders] Re: adding to default ContextMenu in flex app

2008-08-06 Thread Aaron Miller
Never mind, I figured it out. I am supposed to create a ContextMenu with the
options I want and assign it to the Application.contectMenu property.

Thanks anyways!
~Aaron

On Wed, Aug 6, 2008 at 12:01 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Hello,

 I am trying to figure out how to add an item to the default context menu
 when someone right clicks inside the stage. I know I have to add a
 ContextMenuItem to the ContextMenu.customItems properties, but I'm not sure
 how to reference the default menu. Listening for a MouseEvent.RIGHT_CLICK in
 the application scope only seems to be available for AIR. How would I go
 about adding an item to the default menu?


 Thanks!
 ~Aaron



Re: [flexcoders] Question about AMFPHP

2008-08-04 Thread Aaron Miller
You only have to use one for all your services. I personally don't like
doing this though. I like running different apps in different subdomains for
security purposes. If the app is on a different domain then your services,
make sure to set up your crossdomain.xml to allow the host your services are
sitting on.


Best Regards,
~Aaron

On Mon, Aug 4, 2008 at 7:13 AM, Cadu de Castro Alves 
[EMAIL PROTECTED] wrote:

   Hi people!

 I'm a beginner with Flex. Do I have to use one amfphp folder for each of my
 applications or I can use only one?

 Thanks in advance!

 Cadu de Castro Alves
 http://www.cadudecastroalves.com
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] (OT) need a US state selector component

2008-07-18 Thread Aaron Miller
Anyone know of a good US state selector component where you can pick a state
from the map, or set a 'selected' state problematically? I found a few but
they were all geared to be embedded into an html page and written for Flash
7 or 8. I need a good one I can drop into my Flex project and talk back and
forth to it. If I was going to pay for something like this, I wanted to make
sure it's gravy first. Any suggestions?


Thanks!
~Aaron


Re: [flexcoders] Re: Google CodeJam

2008-07-17 Thread Aaron Miller
I am! Woot woot!

~Aaron

On Thu, Jul 17, 2008 at 11:18 AM, pbrendanc [EMAIL PROTECTED] wrote:

   Interested in more info on this - do you have a link?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 nathanpdaniel [EMAIL PROTECTED] wrote:
 
  Any other coders in Google CodeJam using Flex? :D I passed the
  qualifying round last night. I only ran one test (all I need to do to
  move on) - after which I realized we can run all 3 available. Ooops!
  But back to the question - anyone else out there participating in the
  event using Flex? :D
 

  



Re: [flexcoders] Re: Flex SEO

2008-07-11 Thread Aaron Miller
Does anyone know the technical limitations for this? Will it only extract
the hard coded text, or does it actually know what's going on in the
application? I did see the bulletin that Google now crawls flash content,
but didn't see many details. I'm just curious how this is going to impact
future Flex development. Google friendly design patterns? Any thoughts?

Thanks!
~Aaron

On Fri, Jul 11, 2008 at 9:15 AM, Amy [EMAIL PROTECTED] wrote:

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

 
  On Thursday 10 Jul 2008, litesh_b321 wrote:
   can get index of google for a web site which is developed in
   adobe flex?
 
  Yes.
 
   Is there any special technique to optimise the search engine for
 flex
   developed web site?
 
  No.
  The Google spider Just Works with your Flex application.

 Google is able to get to the content of a swf and spider it? Neat, but
 at the same time a little scary...

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] referencing style classes in css

2008-07-03 Thread Aaron Miller
Hello,

Sorry if this is kind of off topic but I had a question about using css
styles to skin my app. I have one application that is deployed on many
different sites, all of which have different skins loaded at run time. I
want to make it quick and easy to update the skins by setting basic options
and referencing them in the other styles. Is this possible to do? If so,
what would the correct syntax be?

As an example of what I mean:


.defaultLightColor {
  color: #005290;
}

.mediumLightFont {
fontFamily: MYFont;
fontWeight: normal;
fontSize: 14;
color: 'defaultLightColor.color';
}

.someDataGrid {
fontStyle: 'mediumLightFont';
}


I tried the above which obviously didn't work. Any suggestions?


Thanks!
~Aaron


[flexcoders] what is PropertyChangeEventt.PROPERTY_CHANGE used for?

2008-06-29 Thread Aaron Miller
Hello,

when I do this:

dispatchEvent( new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE)
);

My bindings do not execute.


When I do this:

dispatchEvent( new Event('propertyChange') );

They do (using default binding with no meta data specified).


What is what is the PropertyChangeEvent.PROPERTY_CHANGE event used for if
not for binding?


Thanks for any input!
~Aaron


Re: [flexcoders] what is PropertyChangeEventt.PROPERTY_CHANGE used for?

2008-06-29 Thread Aaron Miller
Ahh, so that's how it works. I didn't realize there was more to the
constructor then a normal event. That will teach me not to check the API
reference first.  ;-)

Thank you both for the info!

~Aaron

On Sun, Jun 29, 2008 at 7:02 PM, Daniel Gold [EMAIL PROTECTED] wrote:

   It is used as the default Binding event and you can create one using the
 static method createUpdateEvent on the PropertyChangeEvent class

 var changeEvent:PropertyChangeEvent =
 PropertyChangeEvent.createUpdateEvent(changedObject,changedProperty,oldVal,newVal);
 dispatchEvent(changeEvent);

 That should fire the binding for the property you've updated.


 http://livedocs.adobe.com/flex/3/langref/index.html?mx/events/PropertyChangeEvent.htmlmx/events/class-list.html


 On Sun, Jun 29, 2008 at 8:56 PM, Josh McDonald [EMAIL PROTECTED] wrote:

   Off the top of my head, when you instantiate a PropertyChangeEvent
 instead of an Event, the constructor is expecting more useful information
 about what field changed and when that information is missing / invalid the
 requisite bindings don't fire. But when the binding handlers get a generic
 event of name PropertyChangeEvent.PROPERTY_CHANGE, they just assume the
 entire object has been updated and update all bindings to that object.

 All just a guess tho ;-)

 -Josh


 On Mon, Jun 30, 2008 at 11:48 AM, Aaron Miller 
 [EMAIL PROTECTED] wrote:

  Hello,

 when I do this:

 dispatchEvent( new
 PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE) );

 My bindings do not execute.


 When I do this:

 dispatchEvent( new Event('propertyChange') );

 They do (using default binding with no meta data specified).


 What is what is the PropertyChangeEvent.PROPERTY_CHANGE event used for if
 not for binding?


 Thanks for any input!
 ~Aaron






 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]


  



[flexcoders] Restricting SWFLoader Content to its Dimensions

2008-05-23 Thread Aaron Miller
Hello,

I have a SWFLoader in my app that loads various SWF files created by
other developers. They are supposed to create them in the specified
dimensions, but I keep running into problems with them going outside
the bounds. Is there any way I can just clip the content in Flex to
ensure they don't interfere with any of the adjacent controls? I've
tried playing around with various properties in the SWFLoader class
but to no avail. Any advice will be greatly appreciated.


Thanks in advance!
~Aaron


Re: [flexcoders] Re: Securely Interfacing Between Flex and Databases

2008-05-20 Thread Aaron Miller
On Tue, May 20, 2008 at 4:54 PM, Aaron Miller
[EMAIL PROTECTED] wrote:
 Are you using any kind of token based authentication to serve the
 data? All the SSL in the world wouldn't stop someone from just sending
 POST or GET vars to your php scripts and getting the data back in nice
 pretty XML. Decompiling the SWF would make it real easy to figure out
 what vars to send where. If users do not have to login at all, then
 perhaps you could do something with PHP sessions to verify the source
 of the requests before serving any data.

 Regards,
 ~Aaron

 On Tue, May 20, 2008 at 4:25 PM, andrewwestberg
 [EMAIL PROTECTED] wrote:
 I think you're confusing simple secret key encryption (DES, AES,
 etc..) with public/private key encryption (RSA).

 In secret-key encryption if an attacker steals the data and guesses or
 brute forces the secret key, they can see the data.

 In public/private key encryption, a message you send to the server is
 encrypted by a public key and can ONLY be decrypted by a private key
 known only to the webserver (the certificate you bought from verisign,
 thawte, etc...) This is how when you sign onto paypal or some other
 site over https, you don't have to worry about your credit-card being
 stolen in transmission. Sitting in some DB at the company where
 employees can get at it, you should worry, but during transmission,
 it's unlikely to get cracked.

 -Andrew

 



 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: Setting Basic authentication header in URLRequest

2008-05-09 Thread Aaron Miller
Actually it didn't. We were running into problems getting it working, so we
just ended up using php to handle the authentication and proxy the data.
This is probably better security anyways since SWFs can be decompiled, but
maybe you can get it to work if you play around with it more.

Let me know how it turns out since I am curious to know how it works.

Best Regards,
~Aaron

On Fri, May 9, 2008 at 1:24 PM, rydellfinn [EMAIL PROTECTED] wrote:

   Aaron -

 Did this end up working for you? Using the same technique to add the
 authorization header, I have a meta-policy file, and I get an IO Error.

 Thanks!


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron
 Miller [EMAIL PROTECTED] wrote:
 
  Many thanks!
  ~Aaron
 
  On Sun, Apr 20, 2008 at 7:18 AM, ben.clinkinbeard 
  [EMAIL PROTECTED] wrote:
 
   Looks like you will need a meta-policy file:
  
  

 http://tech.groups.yahoo.com/group/flexcoders/messages/105793?threaded=1m=evar=1tidx=1
  
   HTH,
   Ben
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Aaron
   Miller amiller@ wrote:
   
I am trying to make a URLRequest that uses basic HTTP
   authentication. The
credentials are default and unknown to the user.
   
I first tried using what the documentation referred to as the
URLRequestDefaults class:
   
   
  
  
 http://livedocs.adobe.com/flex/3/html/help.html?content=url_requests_2.html
   
But this class doesn't seem to exist
   
So then I tried setting the header manually:
   
var request:URLRequest = new URLRequest(
   GlobalSettings.HARVEST_GATEWAY );
var authHeader:URLRequestHeader = new
 URLRequestHeader(Authorization,
Basic  + base64Encode(HARVEST_LOGIN + : + HARVEST_PASS));
request.requestHeaders.push(authHeader);
   
But then I get a runtime error:
   
ArgumentError: Error #2096: The HTTP request header Authorization
   cannot be
set via ActionScript.
   
   
So... how do I set the authorization headers for a URLRequest?
   
Thanks for any help!
~Aaron
   
  
  
  
 
 
 
  --
  Aaron Miller
  Chief Technology Officer
  Open Base Interactive, LLC.
  [EMAIL PROTECTED]
  http://www.openbaseinteractive.com
 

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: CartesianDataCanvas not drawing where expected

2008-05-05 Thread Aaron Miller
Thanks! I actually tried the LinearAxis to begin with, but gave up on it
after my first attempt since it didn't seem to work right. Since the
CategoryAxis worked right away, I didn't explore the issue any further.
After playing around with the LinearAxis some more, I got it working the way
it should. CartesianDataCanvas now plots like a charm.

Thanks again for the help!
~Aaron

On Sun, May 4, 2008 at 8:42 AM, syndicate_ai [EMAIL PROTECTED]
wrote:

   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron
 Miller [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I've been playing around with the Flex charting components, and I
 seem to be
  running into an issue when I try to plot (draw) a line on the graph.
 I am
  using the CartesianDataCanvas.moveTo and lineTo functions and it
 seems to
  work ok for the Y axis, but not the X.
 
  I posted an example with view-source enabled here:
  http://www.openbaseinteractive.com/testproject/UnitCostLab.html
 
  It should be plotting 3.5,6900 - 12,12000 but as you can see, it's not.
 
  Any ideas what I'm doing wrong? Am I maybe using the wrong kind of
  horizontalAxis?
 
 
  Thanks for any help!
  ~Aaron
 

 Try using a NumericAxis instead of CatagoryAxis, you generally use
 catagoryaxis if the data, is in chunks, like months of the year and such.

  



[flexcoders] CartesianDataCanvas not drawing where expected

2008-05-04 Thread Aaron Miller
Hello,

I've been playing around with the Flex charting components, and I seem to be
running into an issue when I try to plot (draw) a line on the graph. I am
using the CartesianDataCanvas.moveTo and lineTo functions and it seems to
work ok for the Y axis, but not the X.

I posted an example with view-source enabled here:
http://www.openbaseinteractive.com/testproject/UnitCostLab.html

It should be plotting 3.5,6900 - 12,12000 but as you can see, it's not.

Any ideas what I'm doing wrong? Am I maybe using the wrong kind of
horizontalAxis?


Thanks for any help!
~Aaron


Re: [flexcoders] Clicking a link in Text component

2008-04-28 Thread Aaron Miller
OK, thanks for the information. I'll guess I will just have to work around
it then.

Thanks again!,
~Aaron

On Mon, Apr 28, 2008 at 2:16 PM, Gordon Smith [EMAIL PROTECTED] wrote:

This is Player behavior with http:... URLs and I don't think it can
 be changed. But if you use an event:... URL, you can handle the event and
 use an API like flash.net.navigateToURL().



 Gordon Smith

 Adobe Flex SDK Team


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Saturday, April 26, 2008 1:27 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Clicking a link in Text component



 Hello,

 I don't know if this is something new or if I never noticed it before, but
 when I click on a link in my Text components, it appends my domain before
 the url.

 So if the link is http://www.site.com/somelink.html and my domain is
 http://domain.com/

 It tries to send the user to

 http://domain.com/http://www.site.com/somelink.htmlhttp://domain.com/http:/www.site.com/somelink.html

 How can I get it to just send them to the actual link?

 Thanks!
 ~Aaron
   




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Deep Linking Problems

2008-04-28 Thread Aaron Miller
I've had the same experience. My conclusion was that it is only useful for
limited functionality. I've been using it ok to update the fragment showing
the link pointing to the current state, and only restoring that state on
start up. I've found anything else to be unreliable.

Good luck!
~Aaron

On Mon, Apr 28, 2008 at 2:36 PM, Brad Keck [EMAIL PROTECTED] wrote:

   Hello,

 I am just having a slew of problems with Deep Linking in Flex 3.0.
 The documentation makes it seem so simple, but nothing seems to work
 as expected. I've experienced:

 -The example code from the documentation not working
 -Vastly different behavior between browsers
 -URLs failing to update with setFragment()
 -The back button not changing the URL after a setFragment()
 -The forward button not being enabled after a successful back button
 -A myriad of other inconsistencies

 So, basically, I'm just wondering if anybody else has had good
 success with deep linking. Is it simply a buggy feature of Flex at
 this point, or am I really an inept as I seem? :) Are there any
 particular gotchas about making this whole thing work that I may be
 missing? (I have read already that things tend to work better when
 actually deployed on a server, as opposed to run from the IDE. All
 of my problems are on a deployed app.)

 Thank you very much.

 -Brad

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] DataGrid Click Event

2008-04-27 Thread Aaron Miller
Maybe you are wanting to listen to the 'itemClick' event instead, which is
not dispatched when the header is clicked. If you want to track both types
of clicks, you can also listen for the 'headerRelease' event for the header
clicks.

Hope this helps,
~Aaron

On Sun, Apr 27, 2008 at 4:14 PM, Lisa Lee [EMAIL PROTECTED] wrote:

   I have assigned a function to the click event on my DataGrid. When
 the user clicks on the DataGrid, how can I tell whether they've clicked
 on the header (for instance, to sort the data) or on actual data in the
 grid itself?

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] Clicking a link in Text component

2008-04-26 Thread Aaron Miller
Hello,

I don't know if this is something new or if I never noticed it before, but
when I click on a link in my Text components, it appends my domain before
the url.

So if the link is http://www.site.com/somelink.html and my domain is
http://domain.com/

It tries to send the user to

http://domain.com/http://www.site.com/somelink.html

How can I get it to just send them to the actual link?

Thanks!
~Aaron


[flexcoders] ToggleButtonBar - bug or misuse?

2008-04-23 Thread Aaron Miller
Hello,

I have a toggle ToggleButtonBar that might end up having an empty
dataProvider (no buttons) during the course of the execution. This causes a
runtime error in the hiliteSelectedNavItem function when it tries to get the
button at index 0 when there isn't one. I was able to fix the problem by
patching the function as follows:

from:
...
if( index -1 ) {
...

to:

...
if (index  -1  index  numChildren)
...

My question is whether or not a bug, or just a misuse of the component. Is
the ToggleButtonBar designed to always have at least one button? If not,
should I file a bug report and a possible fix?

I'm pretty new to open source projects, so I'm not to sure what the process
is.

Thanks for any input!
~Aaron


Re: [flexcoders] Re: How to draw a cylinder

2008-04-21 Thread Aaron Miller
Much easier to use Papervision I think. As easy as using the Cylinder class.


# package  {
#
#   import PaperBase;
#   import org.papervision3d.objects.Cylinder;
#
#   public class CynlinderObject extends PaperBase {
#
# private var myCylinder:Cylinder = new Cylinder();
#
# public function CynlinderObject() {
#   init();
# }
#
# override protected function init3d():void {
#   myCylinder.scale = 5;
#   default_scene.addChild(myCylinder);
# }
#
#   }
#
# }

Best Regards,
~Aaron

On Mon, Apr 21, 2008 at 7:12 AM, valdhor [EMAIL PROTECTED] wrote:

   There is a tutorial at
 http://www.vecpix.com/tutorials/illustrator/il013.php on how to draw a
 cylinder. You will then need to use flex component kit to convert it
 into a flex component. At the very least, it is a start.

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

 
  Can any one tell me how to draw a pipe (cylinder). please give me a
 example.
 
  On Sat, Apr 19, 2008 at 11:24 AM, Aaron Miller 
  [EMAIL PROTECTED] wrote:
 
   You can try to do the math yourself, or use a 3d engine like
   Papervision.
  
   http://blog.papervision3d.org/
  
   Best Regards,
   ~Aaron
  
  
   On Fri, Apr 18, 2008 at 10:43 PM, Swamy Nathan [EMAIL PROTECTED]
   wrote:
  
Hi Folks,
   
i have one problem how can i draw the cylinder.
   
i have an idea about line and rectangle circle drawing. i want
 to draw
some thin long cylinder like pipe shaped.
   
can any one please reply.
   
--
Thanks  Regards
Swaminathan. M
   
  
  
  
   --
   Aaron Miller
   Chief Technology Officer
   Open Base Interactive, LLC.
   [EMAIL PROTECTED]
   http://www.openbaseinteractive.com
  
  
 
 
 
  --
  Thanks  Regards
  Swaminathan. M
 

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: How to draw a cylinder

2008-04-21 Thread Aaron Miller
The main Papervision site is here: http://blog.papervision3d.org/

There is also Papervision 2 that is still under development, but here is
some tutorials on that which include getting the latest source from SVN:
http://papervision2.com/tutorial-list/

Best Regards,
~Aaron

On Mon, Apr 21, 2008 at 9:52 AM, Gustavo Duenas 
[EMAIL PROTECTED] wrote:

   Where could I find that?

 Regards,


 gustavo
 On Apr 21, 2008, at 12:47 PM, Aaron Miller wrote:

 Much easier to use Papervision I think. As easy as using the Cylinder
 class.

 # package  {
 #
 #   import PaperBase;
 #   import org.papervision3d.objects.Cylinder;
 #
 #   public class CynlinderObject extends PaperBase {
 #
 # private var myCylinder:Cylinder = new Cylinder();
 #
 # public function CynlinderObject() {
 #   init();
 # }
 #
 # override protected function init3d():void {
 #   myCylinder.scale = 5;
 #   default_scene.addChild(myCylinder);
 # }
 #
 #   }
 #
 # }

 Best Regards,
 ~Aaron

 On Mon, Apr 21, 2008 at 7:12 AM, valdhor [EMAIL PROTECTED] wrote:

  There is a tutorial at
  http://www.vecpix.com/tutorials/illustrator/il013.php on how to draw a
  cylinder. You will then need to use flex component kit to convert it
  into a flex component. At the very least, it is a start.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Swamy
  Nathan [EMAIL PROTECTED]
  wrote:
 
  
   Can any one tell me how to draw a pipe (cylinder). please give me a
  example.
  
   On Sat, Apr 19, 2008 at 11:24 AM, Aaron Miller 
   [EMAIL PROTECTED] wrote:
  
You can try to do the math yourself, or use a 3d engine like
Papervision.
   
http://blog.papervision3d.org/
   
Best Regards,
~Aaron
   
   
On Fri, Apr 18, 2008 at 10:43 PM, Swamy Nathan [EMAIL PROTECTED]
wrote:
   
 Hi Folks,

 i have one problem how can i draw the cylinder.

 i have an idea about line and rectangle circle drawing. i want
  to draw
 some thin long cylinder like pipe shaped.

 can any one please reply.

 --
 Thanks  Regards
 Swaminathan. M

   
   
   
--
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com
   
   
  
  
  
   --
   Thanks  Regards
   Swaminathan. M
  
 
 


 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com


  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] Setting Basic authentication header in URLRequest

2008-04-20 Thread Aaron Miller
I am trying to make a URLRequest that uses basic HTTP authentication. The
credentials are default and unknown to the user.

I first tried using what the documentation referred to as the
URLRequestDefaults class:

http://livedocs.adobe.com/flex/3/html/help.html?content=url_requests_2.html

But this class doesn't seem to exist

So then I tried setting the header manually:

var request:URLRequest = new URLRequest( GlobalSettings.HARVEST_GATEWAY );
var authHeader:URLRequestHeader = new URLRequestHeader(Authorization,
Basic  + base64Encode(HARVEST_LOGIN + : + HARVEST_PASS));
request.requestHeaders.push(authHeader);

But then I get a runtime error:

ArgumentError: Error #2096: The HTTP request header Authorization cannot be
set via ActionScript.


So... how do I set the authorization headers for a URLRequest?

Thanks for any help!
~Aaron


Re: [flexcoders] Re: Setting Basic authentication header in URLRequest

2008-04-20 Thread Aaron Miller
Many thanks!
~Aaron

On Sun, Apr 20, 2008 at 7:18 AM, ben.clinkinbeard 
[EMAIL PROTECTED] wrote:

   Looks like you will need a meta-policy file:

 http://tech.groups.yahoo.com/group/flexcoders/messages/105793?threaded=1m=evar=1tidx=1

 HTH,
 Ben


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron
 Miller [EMAIL PROTECTED] wrote:
 
  I am trying to make a URLRequest that uses basic HTTP
 authentication. The
  credentials are default and unknown to the user.
 
  I first tried using what the documentation referred to as the
  URLRequestDefaults class:
 
 

 http://livedocs.adobe.com/flex/3/html/help.html?content=url_requests_2.html
 
  But this class doesn't seem to exist
 
  So then I tried setting the header manually:
 
  var request:URLRequest = new URLRequest(
 GlobalSettings.HARVEST_GATEWAY );
  var authHeader:URLRequestHeader = new URLRequestHeader(Authorization,
  Basic  + base64Encode(HARVEST_LOGIN + : + HARVEST_PASS));
  request.requestHeaders.push(authHeader);
 
  But then I get a runtime error:
 
  ArgumentError: Error #2096: The HTTP request header Authorization
 cannot be
  set via ActionScript.
 
 
  So... how do I set the authorization headers for a URLRequest?
 
  Thanks for any help!
  ~Aaron
 

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] How to draw a cylinder

2008-04-18 Thread Aaron Miller
You can try to do the math yourself, or use a 3d engine like Papervision.

http://blog.papervision3d.org/

Best Regards,
~Aaron

On Fri, Apr 18, 2008 at 10:43 PM, Swamy Nathan [EMAIL PROTECTED]
wrote:

   Hi Folks,

 i have  one problem how can i draw the cylinder.

 i have an idea about line and rectangle circle drawing. i want to draw
 some thin long cylinder like pipe shaped.

 can any one please reply.

 --
 Thanks  Regards
 Swaminathan. M
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] Re: selecting a secure channel with RemoteObject

2008-04-06 Thread Aaron Miller
So is this not possible then? Can any one recommend an alternative solution?
I could possibly create a standalone app that gets run in a pop up window,
but that would create some complications with communication back to the main
app. Any ideas?

Thanks!
~Aaron

On Mon, Mar 31, 2008 at 10:46 AM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Hello,

 My main SWF is run on an insecure channel, as well as the majority of the
 RemoteObject calls. However, I now have to send sensitive data to the server
 and would like to use a secure channel for those calls. I've tried a few
 different things and run myself into a dead end. Would any one mind looking
 at my setup and pointing me in the right direction? Thanks!

 Server Type: AMFPHP
 Service: TestService.sendCommand

 services-config.xml:
 
 ?xml version=1.0 encoding=UTF-8?
 services-config
 services
 service id=amfphp-flashremoting-service
 class=flex.messaging.services.RemotingService
 messageTypes=flex.messaging.messages.RemotingMessage
 destination id=amfphp
 channels
 channel ref=my-amfphp/
 channel ref=my-amfphp-secure/
 /channels
 properties
 source*/source
 /properties
 /destination
 /service
 /services
 channels
 channel-definition id=my-amfphp
 class=mx.messaging.channels.AMFChannel
 endpoint uri=http://domain.com/amfphp/gateway.php;
 class=flex.messaging.endpoints.AMFEndpoint/
 /channel-definition
 channel-definition id=my-amfphp-secure
 class=mx.messaging.channels.SecureAMFChannel
 endpoint uri=https://domain.com/amfphp/gateway.php;
 class=flex.messaging.endpoints.SecureAMFEndpoint/
 /channel-definition
 /channels
 /services-config
 

 I noticed in the documentation that you could specify the
 RemoteObject.channelSet property, so I tried making the call like this:

  var dataService:RemoteObject = new RemoteObject();
 dataService.destination = amfphp;
 dataService.source = TestService;
 dataService.channelSet = new ChannelSet( ['my-amfphp-secure'] ); //use
 secure channel
 dataService.sendCommand.addEventListener( ResultEvent.RESULT,
 resultHandler );
 dataService.addEventListener(FaultEvent.FAULT, errorHandler);
 dataService.sendCommand(postVars);

 I have no idea if I'm doing that right however. Also just a note, the
 service works fine over the insecure channel if I uncomment out the line
 setting channelSet.

 Any ideas?


 Thanks Again!
 ~Aaron




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Flex PHP

2008-04-02 Thread Aaron Miller
You can set

var postVars:URLVariables = new URLVariables();
postVars.someVars = 'foo';

URLRequest.method = 'POST':
URLRequest.data = postVars:

Then navigate to your request.

Best Regards,
~Aaron

On Wed, Apr 2, 2008 at 11:53 AM, David C. Moody [EMAIL PROTECTED]
wrote:

   Hi guys,

 Using Flex 3  AMFPHP to do my database operations.

 I have a report that you specify all the options in flex, and
 currently I'm just using a navigateToURL() function to open a web
 browser.

 I do not like this it is very unsecure as the variables are all
 passed in the URL string.

 How can I get around this? I've thought about creating an
 intermediate database that houses all the variables and then have a
 random number generated and only pass that random number so that the
 PHP script can then pull that record from the database and get the
 variables it needs.

 There's got to be an easier way to do this though? How can I make
 this where the user can't change the variables and run a different
 report. Is there a way to share variables between Flex  PHP without
 putting them in the URL? Cookies maybe?

 Thanks for any help!
 -David

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: Newbie, RemoteObject with ActionScript

2008-03-31 Thread Aaron Miller
I'm not an expert on RemoteObject myself, but I do notice your code looks a
bit different then mine (which works).

Here is an example of a function that uses remote object in my project:

# public function loadFavorites( resultHandler:Function,
errorHandler:Function ): void {
#   var dataService:RemoteObject = new RemoteObject();
#
#   dataService.destination = amfphp;
#   dataService.source = FavoritesProxy;
#   dataService.loadFavorites.addEventListener( ResultEvent.RESULT,
resultHandler );
#   dataService.addEventListener(FaultEvent.FAULT, errorHandler);
#   dataService.loadFavorites( myUser.userID, myUser.userHash );
# }

The service being FavoritesProxy.loadFavorites

The two differences I notice is on your result addEventListener, and lack of
a 'source' property.

Hope this helps,
~Aaron

On Mon, Mar 31, 2008 at 8:30 AM, valdhor [EMAIL PROTECTED] wrote:

   I am a relative newbie myself but don't you need a views.source =
 location of service on server?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 bennybobw [EMAIL PROTECTED] wrote:
 
  Hi All,
  I'm trying to get the following remoteObject working with
  Actionscript. When I use the mxml it works great. But when I compile
  with the actionscript, removing mxml I get an error Method does not
  exist. This doesn't make a lot of sense to me...
  I've also tried views.addEventListener(ResultEvent.RESULT,
 onViewsResult);
 
  Still, no dice. I'm struggling to understand how the two are different.
 
  Thanks for your help.
 
  -bennybobw
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute creationComplete=init()
  mx:Script
  ![CDATA[
  import mx.controls.*;
  import mx.rpc.events.*;
  import mx.utils.ArrayUtil;
  import mx.rpc.events.FaultEvent;
 
  import mx.rpc.events.InvokeEvent;
 
  import mx.rpc.events.ResultEvent;
  import mx.rpc.remoting.RemoteObject;
  import mx.rpc.remoting.Operation;
 
 
  [Bindable]
  public var nodes:Array;
 
  public var views:RemoteObject;
 
  public function init():void {
  views = new RemoteObject();
  views.destination = amfphp;
  views.addEventListener(ResultEvent.RESULT, onViewsResult);
  views.addEventListener(FaultEvent.FAULT, onFault);
  getNodes();
  }
 
  public function onFault(event:FaultEvent):void {
  Alert.show(event.fault.faultString, Error);
  }
 
  public function onViewsResult(event:ResultEvent):void
  {
  nodes = ArrayUtil.toArray(event.result);
  }
 
  public function getNodes():void {
  views.getView(test, ['nid','title','body','changed']);
  }
 
 
 
  ]]
  /mx:Script
 
  !--mx:RemoteObject showBusyCursor=true destination=amfphp
  source=views id=views
  mx:method name=getView result=onViewsResult(event)
  fault=onFault(event) /
  /mx:RemoteObject--
 
  mx:Panel width=500 height=500 layout=absolute title=Nodes
  horizontalCenter=0 verticalCenter=0
  mx:DataGrid x=10 y=10 width=460 id=nodes_select
  dataProvider={nodes} 
  mx:columns
  mx:DataGridColumn headerText=NID dataField=nid width=40/
  mx:DataGridColumn headerText=Title dataField=title/
  /mx:columns
  /mx:DataGrid
 
  mx:Label x=10 y=200 text=Title/
 
  mx:TextInput x=10 y=226 width=460 id=title
  text={nodes_select.selectedItem.title}/
 
  mx:Label x=10 y=256 text=Body/
 
  mx:TextArea x=10 y=282 width=460 height=75 id=body
  text={nodes_select.selectedItem.body}/
 
 
  /mx:Panel
  /mx:Application
 

  



Re: [flexcoders] Dynamic CSS and textfield layout problems

2008-03-31 Thread Aaron Miller
Maybe you can try calling one or all of these methods on your text field
after the style changes:

invalidateProperties();
invalidateSize();
invalidateDisplayList();

If I had to choose one, I think invalidateSize() should work on it's own.
This isn't my expert opinion, I just know I have to call these methods in my
custom item renderers after updating the data or text styles.

Hope this helps,
~Aaron

On Mon, Mar 31, 2008 at 7:48 AM, doug31415 [EMAIL PROTECTED] wrote:

   I am writing an application that uses CSS files compiled to SWFs. The
 different CSS files
 reference different embedded fonts, for example A.css uses Arial while
 B.css references
 Courier. In the main application, when I want to change styles, I call a
 method with this line:

 StyleManager.loadStyleDeclarations (newStyleURL, true, false,
 ApplicationDomain.currentDomain);

 However, the result is that the textFields get unusual formatting. For
 example, they forget
 to line-wrap. They do pick up the new embedded font and other styles.

 Can anyone suggest what might cause this and what to do about it?

  



[flexcoders] selecting a secure channel with RemoteObject

2008-03-31 Thread Aaron Miller
Hello,

My main SWF is run on an insecure channel, as well as the majority of the
RemoteObject calls. However, I now have to send sensitive data to the server
and would like to use a secure channel for those calls. I've tried a few
different things and run myself into a dead end. Would any one mind looking
at my setup and pointing me in the right direction? Thanks!

Server Type: AMFPHP
Service: TestService.sendCommand

services-config.xml:

?xml version=1.0 encoding=UTF-8?
services-config
services
service id=amfphp-flashremoting-service class=
flex.messaging.services.RemotingService messageTypes=
flex.messaging.messages.RemotingMessage
destination id=amfphp
channels
channel ref=my-amfphp/
channel ref=my-amfphp-secure/
/channels
properties
source*/source
/properties
/destination
/service
/services
channels
channel-definition id=my-amfphp class=
mx.messaging.channels.AMFChannel
endpoint uri=http://domain.com/amfphp/gateway.php; class=
flex.messaging.endpoints.AMFEndpoint/
/channel-definition
channel-definition id=my-amfphp-secure class=
mx.messaging.channels.SecureAMFChannel
endpoint uri=https://domain.com/amfphp/gateway.php; class=
flex.messaging.endpoints.SecureAMFEndpoint/
/channel-definition
/channels
/services-config


I noticed in the documentation that you could specify the
RemoteObject.channelSet property, so I tried making the call like this:

 var dataService:RemoteObject = new RemoteObject();
dataService.destination = amfphp;
dataService.source = TestService;
dataService.channelSet = new ChannelSet( ['my-amfphp-secure'] ); //use
secure channel
dataService.sendCommand.addEventListener( ResultEvent.RESULT, resultHandler
);
dataService.addEventListener(FaultEvent.FAULT, errorHandler);
dataService.sendCommand(postVars);

I have no idea if I'm doing that right however. Also just a note, the
service works fine over the insecure channel if I uncomment out the line
setting channelSet.

Any ideas?


Thanks Again!
~Aaron


Re: [flexcoders] I know that if you want to communicate with the main application from within the

2008-03-27 Thread Aaron Miller
That is not the correct use of an item editor. Instead, you should set the
DataGridColumn.editorDataField property and listen for the itemEditEnd
event. In your item renderer, you would then create a public getter method
by the same name as the editorDataField to retrieve
cbItemRenderer.getSelectedItem().label. I'm pretty sure you will also need a
getter method to set the correct selectedIndex of the ComboBox.

Here are some examples here:
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.html

Best Regards,
~Aaron

On Thu, Mar 27, 2008 at 10:38 AM, jeffreyr6915 [EMAIL PROTECTED] wrote:

   I know that if you want to communicate with the main application from
 within the itemRenderer component, you have to use outerDocument
 first...Example:

 mx: DataGridColumn dataField=field headerText=col1
 editorDataField=text editable=true

 mx: itemRenderer
 mx: Component
 mx:ComboBox dataProvider={outerDocument.myXml.info}
 change=myMethod(dg.instanceIndex) id=cbItemRenderer/
 /mx: Component
 /mx: itemRenderer

 /mx: DataGridColumn

 My question is:
 ---How do you communicate with an itemRenderer from within the main
 application? It seems like the main app does not have scope to the
 itemRenderer, because when I add an id attribute to the mx:ComboBox
 tag, I cannot refer to it...Example:

 cbItemRenderer.getSelectedItem().label)

 Thanks

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] understanding TitleWindow garbage collection

2008-03-27 Thread Aaron Miller
Hello,

I just started playing around with the Flex 3 profiler and I noticed that
every time I open a pop up window, the number of instances keep increasing.
I was aware that I had to remove any event listeners when closed, but is
there more to it then that? I am worried because I have quite a bit of
custom window components, most of which reference various singleton classes.
Are these references keeping the window from being garbage collected? If so,
would it be enough to destroy the references like this?

private var myAuthUser:AuthUser = AuthUser.getInstance();

on close:
myAuthUser = null;


Is there anything else I need to be careful of when using TitleWindows?


Thanks for any input!
~Aaron


[flexcoders] Re: understanding TitleWindow garbage collection

2008-03-27 Thread Aaron Miller
Ahh, never mind. all my pop up windows extend a custom TitleWindow class
which was defining an eventListener that was not getting cleaned up. All my
windows are garbage collecting now.

Sorry for the bother!
~Aaron

On Thu, Mar 27, 2008 at 3:05 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Hello,

 I just started playing around with the Flex 3 profiler and I noticed that
 every time I open a pop up window, the number of instances keep increasing.
 I was aware that I had to remove any event listeners when closed, but is
 there more to it then that? I am worried because I have quite a bit of
 custom window components, most of which reference various singleton classes.
 Are these references keeping the window from being garbage collected? If so,
 would it be enough to destroy the references like this?

 private var myAuthUser:AuthUser = AuthUser.getInstance();

 on close:
 myAuthUser = null;


 Is there anything else I need to be careful of when using TitleWindows?


 Thanks for any input!
 ~Aaron




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: AMFPHP MySQL Results Object

2008-03-25 Thread Aaron Miller
Hi Daniel,

* I noticed on the AMFPHP browser page it can actually create a table based
 on the recordset that is returned. e.g. the table automatically changes
based
 on my sql result and it doesn't seem like there's any specific binding to
 columns. I'm curious as to how they did that.

*You will notice that if you change the settings from AMF3 to AMF0, it will
no longer work. You must use AMF3 to get results back as an ArrayCollection.
You can see how he creates the DataGrid by looking at the servicebrowser
source here:

http://www.5etdemi.com/uploads/servicebrowser.zip

Regards,
~Aaron


On Mon, Mar 24, 2008 at 11:54 PM, Daniel Tse [EMAIL PROTECTED] wrote:

   Thanks Aaron,

 I'll see what I can look up on the RemoteObject as well.

 CaffeineWabbit,

 Thanks for the pointers. I saw that Mike Potter's AMFPHP example also
 created a php array instead of using the mysql results object but... I
 noticed on the AMFPHP browser page it can actually create a table based on
 the recordset that is returned. e.g. the table automatically changes based
 on my sql result and it doesn't seem like there's any specific binding to
 columns. I'm curious as to how they did that.

 In short, I'd like to find a convenient way for the client to parse the
 results of a remote sql query.

 Thanks all!
 -Daniel

 On Mon, Mar 24, 2008 at 5:53 PM, Aaron Miller 
 [EMAIL PROTECTED] wrote:

Just as a follow up. I verified that using RemoteObject does in fact
  return an ArrayCollection as the result, while NetConnection does not
  (returns an outdated ResultSet object). Hopefully someone at Adobe could
  explain the difference in remoting procedure between the two methods.
 
  Regards,
  ~Aaron
 
 
 
  On Mon, Mar 24, 2008 at 5:23 PM, Aaron Miller 
  [EMAIL PROTECTED] wrote:
 
   Hello again. I did some more reading on this and I think the problem
   is with using NetConnection instead of RemoteObject. Apperently, using
   NetConnection does not always send the right headers to tell AMFPHP to use
   AMF3 encoding, thus it tries to return a ResultSet instead of an
   ArrayCollection. You can tell you got a ResultSet if the return object 
   has a
   serverInfo property. From what I've read, using RemoteObject is a surefire
   way to get the right headers (AMF3) and will guarantee an ArrayCollection 
   is
   returned. However, having been accustomed to NetConnection myself, and I 
   am
   trying to figure out a way to do this without RemoteObject. Setting
   NetConnection.objectEncoding to ObjectEncoding.AMF3 did not help for
   some reason. Maybe someone else can chime in on this.
  
   In  the mean time, here is a good tutorial on RemoteObject with
   AMFPHP:
  
   http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php
  
   Best Regards,
   ~Aaron
  
  
   On Mon, Mar 24, 2008 at 3:57 PM, caffeinewabbit 
   [EMAIL PROTECTED] wrote:
  
  Hi Daniel,
   
In the PHP code you provided, you can't pass back the raw $results
variable because its not a normal PHP variable - its a resource,
which
holds external data and can only be used by special PHP functions
(in
this case, the mysql library.)
   
To pass back the results from your query, you'll first need to
extract
the data into a format that can be passed by AMFPHP. Something
similar
to the following:
   
?php
   
   
class SimplePerson
{
function getPeople()
{
$mysql = mysql_connect(localhost, root, root);
   
mysql_select_db( people-test );
   
$sSQL = SELECT * FROM `tblPeople`;
   
$results = mysql_query($sSQL);
   
$queryResults = array();
   
while($queryOb = mysql_fetch_assoc($results))
$queryResults[] = $queryOb;
   
return $queryResults;
}
}
   
?
   
That'll show up in Flex as an array containing generic objects that
contain your query results.
   
For more info on resources, this link should help:
http://www.php.net/manual/en/language.types.resource.php
   
Hope this helps!
   
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Daniel Tse [EMAIL PROTECTED] wrote:

 Hi All,

 I have setup AMFPHP and it returns back the recordset object from
a
MySQL
 query. I was wondering how I access that array/recordset from the
flex side.

 e.g. I have the following:

 ?php
 //In the services directory of AMFPHP
 class SimplePerson {
 function getPeople() {
 $mysql = mysql_connect(localhost, root, root);

 mysql_select_db( people-test );

 $sSQL = SELECT * FROM `tblPeople`;

 $results = mysql_query($sSQL);

 return $results;
 }
 }

 ?

 In Flex..
 public function getPeople():void {
 myService.connect(REMOTESERVERURL);

 var responder:Responder = new
Responder(getPeople_Result,
 onFault);
 myService.call(SimplePerson.getPeople, responder);

 }

 public

Re: [flexcoders] AMFPHP with NetConnection or RemoteObject ?

2008-03-25 Thread Aaron Miller
The page on the AMFPHP 1.9 beta release recommends using RemoteObject. When
using NetConnection, for some reason AMFPHP uses AMF0 instead of AMF3.
Someone else on this list ran into a problem with this when returning a
record set from their service. AS3 no longer supports the RecordSet class,
but if you used RemoteObject instead it would send it back as an
ArrayCollection over AMF3.

I've been tinkering around with NetConnection seeing if I can get a work
around for this, but have been unsuccessful so far.

Hope this helps,

~Aaron

On Tue, Mar 25, 2008 at 3:17 PM, Mario Falomir [EMAIL PROTECTED] wrote:

   Hi, which approach it is better for AMFPHP Flash Remoting, to use
 flash.net.NetConnection or the Flex Framework RemoteObject component? Are
 there any advantages/disadvatages from one over the other?

 Regards,
 Mario
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] AMFPHP MySQL Results Object

2008-03-24 Thread Aaron Miller
I always set the return result as Object in my handler then type it as the
specific class later in the function. I'm not sure if I do this out of habit
or necessity.

# private function handleResult( result:Object ): void {
#   var collection:ArrayCollection = result as ArrayCollection;
# }

Also notice that I used ArrayCollection. If I remember correctly, record
sets get returned as an ArrayCollection. If I am mistaken, try the above
with a standard Array.

Hope this helps,
~Aaron

On Mon, Mar 24, 2008 at 3:07 PM, Daniel Tse [EMAIL PROTECTED] wrote:

   Hi All,

 I have setup AMFPHP and it returns back the recordset object from a MySQL
 query. I was wondering how I access that array/recordset from the flex side.

 e.g. I have the following:

 ?php
 //In the services directory of AMFPHP
 class SimplePerson {
 function getPeople() {
$mysql = mysql_connect(localhost, root, root);

  mysql_select_db( people-test );

  $sSQL = SELECT * FROM `tblPeople`;

  $results =  mysql_query($sSQL);

 return $results;
 }
 }

 ?

 In Flex..
public function getPeople():void {
 myService.connect(REMOTESERVERURL);

 var responder:Responder = new Responder(getPeople_Result,
 onFault);
 myService.call(SimplePerson.getPeople, responder);

 }

 public function
 getPeople_Result(aoResults:WHAT_SHOULD_GO_HERE):void
 {
 //test;
 //I'd like to access the result set e.g. iterate through
 the rows looking at certain columns
 }

 Array doesn't seem to work (the fact that it's a 1-dimensional array
 doesn't help)
 XMLList the object doesn't seem to map like that either

 Am I missing some kind of object?

 Thanks,
 -Daniel
 --
 -
 e: [EMAIL PROTECTED]
 w: http://DanielTse.com/
 -
  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: AMFPHP MySQL Results Object

2008-03-24 Thread Aaron Miller
Just as a follow up. I verified that using RemoteObject does in fact return
an ArrayCollection as the result, while NetConnection does not (returns an
outdated ResultSet object). Hopefully someone at Adobe could explain the
difference in remoting procedure between the two methods.

Regards,
~Aaron


On Mon, Mar 24, 2008 at 5:23 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Hello again. I did some more reading on this and I think the problem is
 with using NetConnection instead of RemoteObject. Apperently, using
 NetConnection does not always send the right headers to tell AMFPHP to use
 AMF3 encoding, thus it tries to return a ResultSet instead of an
 ArrayCollection. You can tell you got a ResultSet if the return object has a
 serverInfo property. From what I've read, using RemoteObject is a surefire
 way to get the right headers (AMF3) and will guarantee an ArrayCollection is
 returned. However, having been accustomed to NetConnection myself, and I am
 trying to figure out a way to do this without RemoteObject. Setting
 NetConnection.objectEncoding to ObjectEncoding.AMF3 did not help for some
 reason. Maybe someone else can chime in on this.

 In  the mean time, here is a good tutorial on RemoteObject with AMFPHP:

 http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php

 Best Regards,
 ~Aaron


 On Mon, Mar 24, 2008 at 3:57 PM, caffeinewabbit 
 [EMAIL PROTECTED] wrote:

Hi Daniel,
 
  In the PHP code you provided, you can't pass back the raw $results
  variable because its not a normal PHP variable - its a resource, which
  holds external data and can only be used by special PHP functions (in
  this case, the mysql library.)
 
  To pass back the results from your query, you'll first need to extract
  the data into a format that can be passed by AMFPHP. Something similar
  to the following:
 
  ?php
 
 
  class SimplePerson
  {
  function getPeople()
  {
  $mysql = mysql_connect(localhost, root, root);
 
  mysql_select_db( people-test );
 
  $sSQL = SELECT * FROM `tblPeople`;
 
  $results = mysql_query($sSQL);
 
  $queryResults = array();
 
  while($queryOb = mysql_fetch_assoc($results))
  $queryResults[] = $queryOb;
 
  return $queryResults;
  }
  }
 
  ?
 
  That'll show up in Flex as an array containing generic objects that
  contain your query results.
 
  For more info on resources, this link should help:
  http://www.php.net/manual/en/language.types.resource.php
 
  Hope this helps!
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Daniel Tse [EMAIL PROTECTED] wrote:
  
   Hi All,
  
   I have setup AMFPHP and it returns back the recordset object from a
  MySQL
   query. I was wondering how I access that array/recordset from the
  flex side.
  
   e.g. I have the following:
  
   ?php
   //In the services directory of AMFPHP
   class SimplePerson {
   function getPeople() {
   $mysql = mysql_connect(localhost, root, root);
  
   mysql_select_db( people-test );
  
   $sSQL = SELECT * FROM `tblPeople`;
  
   $results = mysql_query($sSQL);
  
   return $results;
   }
   }
  
   ?
  
   In Flex..
   public function getPeople():void {
   myService.connect(REMOTESERVERURL);
  
   var responder:Responder = new
  Responder(getPeople_Result,
   onFault);
   myService.call(SimplePerson.getPeople, responder);
  
   }
  
   public function
   getPeople_Result(aoResults:WHAT_SHOULD_GO_HERE):void
   {
   //test;
   //I'd like to access the result set e.g. iterate
  through the
   rows looking at certain columns
   }
  
   Array doesn't seem to work (the fact that it's a 1-dimensional array
   doesn't help)
   XMLList the object doesn't seem to map like that either
  
   Am I missing some kind of object?
  
   Thanks,
   -Daniel
   --
   -
   e: [EMAIL PROTECTED]
   w: http://DanielTse.com/
   -
  
 
   
 



 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Re: AMFPHP MySQL Results Object

2008-03-24 Thread Aaron Miller
Hello again. I did some more reading on this and I think the problem is with
using NetConnection instead of RemoteObject. Apperently, using NetConnection
does not always send the right headers to tell AMFPHP to use AMF3 encoding,
thus it tries to return a ResultSet instead of an ArrayCollection. You can
tell you got a ResultSet if the return object has a serverInfo property.
From what I've read, using RemoteObject is a surefire way to get the right
headers (AMF3) and will guarantee an ArrayCollection is returned. However,
having been accustomed to NetConnection myself, and I am trying to figure
out a way to do this without RemoteObject. Setting
NetConnection.objectEncoding to ObjectEncoding.AMF3 did not help for some
reason. Maybe someone else can chime in on this.

In  the mean time, here is a good tutorial on RemoteObject with AMFPHP:

http://www.sephiroth.it/tutorials/flashPHP/flex_remoteobject/index.php

Best Regards,
~Aaron

On Mon, Mar 24, 2008 at 3:57 PM, caffeinewabbit 
[EMAIL PROTECTED] wrote:

   Hi Daniel,

 In the PHP code you provided, you can't pass back the raw $results
 variable because its not a normal PHP variable - its a resource, which
 holds external data and can only be used by special PHP functions (in
 this case, the mysql library.)

 To pass back the results from your query, you'll first need to extract
 the data into a format that can be passed by AMFPHP. Something similar
 to the following:

 ?php


 class SimplePerson
 {
 function getPeople()
 {
 $mysql = mysql_connect(localhost, root, root);

 mysql_select_db( people-test );

 $sSQL = SELECT * FROM `tblPeople`;

 $results = mysql_query($sSQL);

 $queryResults = array();

 while($queryOb = mysql_fetch_assoc($results))
 $queryResults[] = $queryOb;

 return $queryResults;
 }
 }

 ?

 That'll show up in Flex as an array containing generic objects that
 contain your query results.

 For more info on resources, this link should help:
 http://www.php.net/manual/en/language.types.resource.php

 Hope this helps!


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
 Tse [EMAIL PROTECTED] wrote:
 
  Hi All,
 
  I have setup AMFPHP and it returns back the recordset object from a
 MySQL
  query. I was wondering how I access that array/recordset from the
 flex side.
 
  e.g. I have the following:
 
  ?php
  //In the services directory of AMFPHP
  class SimplePerson {
  function getPeople() {
  $mysql = mysql_connect(localhost, root, root);
 
  mysql_select_db( people-test );
 
  $sSQL = SELECT * FROM `tblPeople`;
 
  $results = mysql_query($sSQL);
 
  return $results;
  }
  }
 
  ?
 
  In Flex..
  public function getPeople():void {
  myService.connect(REMOTESERVERURL);
 
  var responder:Responder = new
 Responder(getPeople_Result,
  onFault);
  myService.call(SimplePerson.getPeople, responder);
 
  }
 
  public function
  getPeople_Result(aoResults:WHAT_SHOULD_GO_HERE):void
  {
  //test;
  //I'd like to access the result set e.g. iterate
 through the
  rows looking at certain columns
  }
 
  Array doesn't seem to work (the fact that it's a 1-dimensional array
  doesn't help)
  XMLList the object doesn't seem to map like that either
 
  Am I missing some kind of object?
 
  Thanks,
  -Daniel
  --
  -
  e: [EMAIL PROTECTED]
  w: http://DanielTse.com/
  -
 

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] What's this Called?

2008-03-24 Thread Aaron Miller
 Kevin, why do you allege bad practice?  What are you referring to for
that matter?

I 2nd bad practice. It's unreadable and less efficient. I would hate to read
code where ids were named myComponent1, myComponent2, etc... It would be so
much better to just reference readable names in an indexed Array.

# var myComponents:Array = [ idFirstName, idLastName, idEmail ];
#
# for (var i=0; imyComponents.length-1; i++){
# var example:Object = this.myComponents[i];
# //do some more stuff
# }

Although, I can't think of any reason why you would want to loop through
components like that in the first place. Maybe .NET has different practices
though.

Regards,
~Aaron






On Mon, Mar 24, 2008 at 7:38 PM, Tracy Spratt [EMAIL PROTECTED] wrote:

I have seen and used the term bracket notation.  Don't know how
 common it is.



 Kevin, why do you allege bad practice?  What are you referring to for
 that matter?



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Kevin Aebig
 *Sent:* Monday, March 24, 2008 9:47 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* RE: [flexcoders] What's this Called?



 That's called bad practice. The lookup method you're referring to is
 called an associative array or dictionary.



 !k


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Nate Pearson
 *Sent:* Monday, March 24, 2008 6:18 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] What's this Called?



 When I do this[idOfsomethingImLookingfor]

 I usually do this if I have to loop something.

 So:

 for (i=0; i10; i++){
 var example:Object = this[myComponent + i]
 //do some more stuff
 }

 I'm trying to do the same thing in .NET. I don't know what it's
 called though so I'm having a hard time googling it.

 Thanks,

 Nate

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Design pattern for conditional Interfaces ?

2008-03-23 Thread Aaron Miller
Polymorphisms is a run time technique. There is no way to determine a
dynamic class instance's interface at runtime. I would use a switch
statement in your AnalyzerBundle class to determine which interface an
analyzer implements and process accordingly, throwing an error on default if
necessary (realistically, you shouldn't have an unexpected interface). To
add new analyzer/interfaces, you would just have to add an item to the
switch statement and an appropriate method or class to handle it. Warning:
make sure to check extended interfaces in bottom up order.

I'm not sure if this is a generally excepted design pattern, but it's what
I would do in this case.

Hope this helps,

~Aaron

On Sat, Mar 22, 2008 at 1:55 PM, Jeroen Beckers [EMAIL PROTECTED]
wrote:

   Hi list!

 Situation: I have a class that analyzes stuff. There are different
 analyzing classes, suck as HeightAnalyzer, WeightAnalyzer,
 LevelAnalyzer, etc. You can add an analyzer to the class by using '
 myClass.addAnalyzer(newAnalyzer:IAnalyzer)'. As you can see, there is an
 IAnalyzer interface which all Analyzer's implement. Every time you add an
 analyzer, it is added to the list using the Decorator pattern. (Every
 analyzer must analyze a list and pass it to the next analyzing test)

 Now, the analyzer's analyze certain items. Every analyzer requires a
 different set of methodes. The HeightAnalyzer requires a getHeight(), the
 LevelAnaylzer requires a getLevel(), etc. I want to have a different
 interface for each analyzer, so that I can easily add analyzers
 (+interfaces).

 If I want to analyze a list of items, those items must implement the
 correct interface, according to which analyzers you have added to the class.
 Fe:

 var myClass:AnalyzerBundle = new AnalyzerBundle();
 myClass.addAnalyzer(new HeightAnalyzer());
 myClass.addAnalyzer(new LevelAnalyzer());
 myClass.analyze(new Array(item1, item2, item3));

 What I am looking for now, is a way to make sure that item1, item2 and
 item3 all implement the IHeightItem and ILevelItem interfaces.

 I've found a couple of ways to do this, but none of them seemed really
 good to me. One of them was to have every Analyzer keep track of the
 interface associated with it, and check if they implement the correct
 interface, once the analyzer is called. But this would give ugly runtime
 errors...
 I'm pretty sure that it can't be done at compile time, but if anyone
 happens to know some way (hack), or a better way for the runtime errors,
 please tell me :-). All ideas are welcome

 Ps: I've just made up all these names, my question is about the technique
 to be used, not about the project :)

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Design pattern for conditional Interfaces ?

2008-03-23 Thread Aaron Miller
Hi Again, I'm not sure if this needs to be stated or not. But your switch
statement would look something like this.

# switch( true ) {
#   case item is IHeightItem:
# //do stuff
#   break;
#   case item is ILevelItem:
# //do stuff
#   break;
#   default:
# //do stuff
# }

I was going to mention this but forgot to add it before I hit send.

Best Regards,
~Aaron

On Sat, Mar 22, 2008 at 11:43 PM, Aaron Miller 
[EMAIL PROTECTED] wrote:

 Polymorphisms is a run time technique. There is no way to determine a
 dynamic class instance's interface at runtime. I would use a switch
 statement in your AnalyzerBundle class to determine which interface an
 analyzer implements and process accordingly, throwing an error on default if
 necessary (realistically, you shouldn't have an unexpected interface). To
 add new analyzer/interfaces, you would just have to add an item to the
 switch statement and an appropriate method or class to handle it. Warning:
 make sure to check extended interfaces in bottom up order.

 I'm not sure if this is a generally excepted design pattern, but it's
 what I would do in this case.

 Hope this helps,

 ~Aaron


 On Sat, Mar 22, 2008 at 1:55 PM, Jeroen Beckers [EMAIL PROTECTED]
 wrote:

Hi list!
 
  Situation: I have a class that analyzes stuff. There are different
  analyzing classes, suck as HeightAnalyzer, WeightAnalyzer,
  LevelAnalyzer, etc. You can add an analyzer to the class by using '
  myClass.addAnalyzer(newAnalyzer:IAnalyzer)'. As you can see, there is an
  IAnalyzer interface which all Analyzer's implement. Every time you add an
  analyzer, it is added to the list using the Decorator pattern. (Every
  analyzer must analyze a list and pass it to the next analyzing test)
 
  Now, the analyzer's analyze certain items. Every analyzer requires a
  different set of methodes. The HeightAnalyzer requires a getHeight(), the
  LevelAnaylzer requires a getLevel(), etc. I want to have a different
  interface for each analyzer, so that I can easily add analyzers
  (+interfaces).
 
  If I want to analyze a list of items, those items must implement the
  correct interface, according to which analyzers you have added to the class.
  Fe:
 
  var myClass:AnalyzerBundle = new AnalyzerBundle();
  myClass.addAnalyzer(new HeightAnalyzer());
  myClass.addAnalyzer(new LevelAnalyzer());
  myClass.analyze(new Array(item1, item2, item3));
 
  What I am looking for now, is a way to make sure that item1, item2 and
  item3 all implement the IHeightItem and ILevelItem interfaces.
 
  I've found a couple of ways to do this, but none of them seemed really
  good to me. One of them was to have every Analyzer keep track of the
  interface associated with it, and check if they implement the correct
  interface, once the analyzer is called. But this would give ugly runtime
  errors...
  I'm pretty sure that it can't be done at compile time, but if anyone
  happens to know some way (hack), or a better way for the runtime errors,
  please tell me :-). All ideas are welcome
 
  Ps: I've just made up all these names, my question is about the
  technique to be used, not about the project :)
 
   
 



 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


[flexcoders] header-separator-skin in FB3 DataGrid

2008-03-13 Thread Aaron Miller
Hello again,

I think I have most of my Flex 3 migration issues worked out, except one
little skinning issue I'm not to sure about. I noticed that the
header-separator-skin in Flex 3 overhangs the bottom of the DataGrid header.

Example
-
Flex 2: http://www.allchicorentals.com/
Flex 3: http://acr.openbaseinteractive.com/

I have included the custom DataGrid class as an attachment (note: the only
update from Flex 2 version was in drawRowBackgrounds to start row count at 0
instead of 1, all else is the same).

I tried playing around with different style properties to see if I could
find something to help, but no luck. Any ideas?


Thanks!
~Aaron
package pkg.controls
{

import flash.display.DisplayObject;
import flash.display.GradientType;
import flash.display.Graphics;
import flash.display.SpreadMethod;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.display.Shape;
import flash.geom.*;
   
import mx.controls.DataGrid;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.controls.listClasses.IListItemRenderer;
import mx.core.EdgeMetrics;
import mx.core.mx_internal;
import mx.core.FlexSprite;
import mx.core.FlexShape;
import mx.core.UIComponent;
import flash.display.BitmapData;
import mx.core.BitmapAsset;
import mx.controls.Image;
import mx.styles.StyleManager;

use namespace mx_internal;


public class DrawListingsGrid extends DataGrid
{
[Embed(source=../../assets/blueskin/datagrid_bluerow_bg.jpg)]
[Bindable]
public var rowbgCls:Class;

[Embed(source=../../assets/blueskin/gradient_datagrid_bg.jpg)]
//[Embed(source=../../assets/blueskin/login_box.jpg)]
[Bindable]
public var imgCls:Class;

private var displayWidth:Number;

override protected function 
drawHeaderBackground(headerBG:UIComponent):void
{
var g:Graphics = headerBG.graphics;
var imgObj:BitmapAsset = new imgCls() as BitmapAsset;
g.clear();

var bm:EdgeMetrics = borderMetrics;
var adjustedWidth:Number = unscaledWidth - (bm.left + 
bm.right);
// Need to extend mask too.
maskShape.width = adjustedWidth;

var hh:Number = rowInfo.length ? rowInfo[0].height : 
headerHeight;

// draw diagonal line fill
   // g.lineStyle(1, 0x55, 0.25);
var vdistance:int;
var vstart:int;
var vstartOffset:int;
var vdistanceOffset:int;
/*
for(var i:int = -hh; i  adjustedWidth; i += 5)
{
vstart = Math.max(-i, 0);
vdistance = Math.min(hh, adjustedWidth - i);
vstartOffset = vstart + (3 * Math.random());  
g.moveTo(i + vstartOffset, vstartOffset);
g.lineTo(i + vdistance, vdistance + 2 - (4 * 
Math.random()));
}*/

g.lineStyle(0, 0x00, 0);
g.beginBitmapFill(imgObj.bitmapData);
g.moveTo(0, 0);
g.lineTo(adjustedWidth, 0);
g.lineTo(adjustedWidth, hh);
   // g.lineStyle(0, getStyle(borderColor), 100);
g.lineTo(0, hh);
g.lineStyle(0, 0x00, 0);
g.endFill();
}

override protected function drawRowBackgrounds():void
{
if (displayWidth != unscaledWidth - viewMetrics.right - 
viewMetrics.left)
{
displayWidth = unscaledWidth - 
viewMetrics.right - viewMetrics.left;
}
var rowBGs:Sprite = 
Sprite(listContent.getChildByName(rowBGs));
if (!rowBGs)
{
rowBGs = new FlexSprite();
rowBGs.mouseEnabled = false;
rowBGs.name = rowBGs;
listContent.addChildAt(rowBGs, 0);
}

var colors:Array;

colors = getStyle(alternatingItemColors);

if (!colors || colors.length == 0)
return;

var curRow:int = 0;

var i:int = 0;
var actualRow:int = verticalScrollPosition;
var n:int = listItems.length;

while (curRow  n)
{
drawRowBackground(rowBGs, i++, rowInfo[curRow].y, 
rowInfo[curRow].height, 

[flexcoders] manually placing SortArrow in FB3 DataGrid

2008-03-12 Thread Aaron Miller
Hello,

I am trying to make the migration to FB3 and I am running into an issue with
my DataGrid code. The records I want to display in the grid are broken up
into pages. So when I sort a column, I need to sort over all the pages and
not just the records shown in the grid. Currently (FB2) I am extending the
DataGrid and overriding the drawSortArrow function so that I can manually
place a sort arrow where needed. This way I can sort the entire record set
across multiple pages, and indicate that a sort is in place. This method
does not work in FB3 unfortunately. Could any one direct me in the right
direction? Is there a cleaner way to accomplish the same goal?

Thanks in advance!
~Aaron


Re: [flexcoders] Re: New files in project not compiled?

2008-02-26 Thread Aaron Miller
What happens when you try to use the class with the syntax error. Just
curious.

Regards,
~Aaron


On 2/26/08, Barnaby Jones [EMAIL PROTECTED] wrote:

   I have cleaned the project( many times actually ). I also checked the
 package names and they are correct. I even deleted the package and
 ctrl+spaced to let FB generate the package declaration. Still no luck :(

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Merrill, Jason
 [EMAIL PROTECTED] wrote:
 
  Have you also tried cleaning the project?
 
 
  Jason Merrill
  Bank of America
  GTO LLD Solutions Design  Development
  eTools  Multimedia
 
  Bank of America Flash Platform Developer Community
 
 
  Are you a Bank of America associate interested in innovative learning
  ideas and technologies?
  Check out our internal GTO Innovative Learning Blog
  http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx
  and  subscribe
  http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.a
  spx?List=%7B41BD3FC9%2DBB07%2D4763%2DB3AB%2DA6C7C99C5B8D%7DSource=http%
  3A%2F%2Fsharepoint%2Ebankofamerica%2Ecom%2Fsites%2Fddc%2Frd%2Fblog%2FLis
  ts%2FPosts%2FArchive%2Easpx .
 
 
 
 
 
 
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
 Behalf Of Barnaby Jones
  Sent: Tuesday, February 26, 2008 3:35 PM
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: [flexcoders] New files in project not compiled?
 
 
 
  My flex project (using flex builder 3) has somehow gotten into a
  state
  where any new AS class I add to the project is not even
  attempted to
  be compiled. I throw tons of syntax errors into it, and the
  project
  builds just fine. If I put an error in an already existing file,
  the
  build fails and reports the error on the existing file. I have
  tried
  deleting and rebuilding the project. I have also tried upgrading
  to
  the release version of FB3 (was using beta). Hope someone can
  help.
 
  Thanks
  Todd
 

 




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] as3 global variables - no more

2008-02-22 Thread Aaron Miller
One way is to use singleton classes.


# package pkg {
#
# public class SingletonClass  {
#
#  public var someVar:String = 'Hello World';
#
#   //singleton instance makes sure there is only one instance of the class
#   static private var myInstance:SingletonClass;
#
#   public function SingletonClass( singletonEnforcer:SingletonEnforcer ){}
#
#   //returns an instance to the node and enforces singleton class
#   public static function getInstance( ): SingletonClass  {
#
# if( SingletonClass .myInstance == null )
#   SingletonClass.myInstance = new SingletonClass( new
SingletonEnforcer() );
#
# return SingletonClass.myInstance;
#   }
#
# }
# }
#
#
# //publicly inacsessable dummy class used to enforce signleton
# class SingletonEnforcer { }

Your class instance could then be accessed anywhere in the application with:

# import pkg.SingletonClass;
#
# trace( SingletonClass.getInstance().someVar );

Regards,
~Aaron

On 2/22/08, dsds99 [EMAIL PROTECTED] wrote:






 Yes, using global variables was easy solution to referencing
 movieclips from anywhere.

 I'm trying to link up my play button to play the selected track in a
 listbox. The two components are in separate classes.

 one solution is that in my main class I pass a reference of the
 listbox to my playbutton.

 Are there alternative solutions to this...Better OOP practice.

 



-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


[flexcoders] Unexpected compiler behavior FB2

2008-02-16 Thread Aaron Miller
Hello,

Sorry for the poor topic title but I'm not sure how else to describe
it. I have been trying to debug an issue I'm having and I narrowed it
down to the following statement:

note: memento is an Object

# if( memento.closeToCSU ) {
#trace('memento.closeToCSU = '+ObjectUtil.toString(memento.closeToCSU));
#trace('memento.photoLinks = '+ObjectUtil.toString(memento.photoLinks));
#memento.amenities.closeToCSUCampus = true;
#trace('memento.photoLinks = '+ObjectUtil.toString(memento.photoLinks));
# }

This yeilds an unexpected (for me at least) output of:

# memento.closeToCSU = true
# memento.photoLinks = (Array)#0
# memento.photoLinks = (Array)#0
#   [closeToCSUCampus] true

For some reason if memento.photoLinks is empty, and if I set
memento.amenities.closeToCSUCampus, then memento.photoLinks gets
assigned invalid data.

Why is that? Is there something about nested object
properties/references I don't understand, or is Flex Builder 2 doing
something it shouldn't? If the later, what do you recommend I do?

Thanks in advance for any help!
~Aaron


[flexcoders] Multiple NetConnections sometimes fail to load in Firefox

2008-02-07 Thread Aaron Miller
Hello,

I ran into an issue with my Flex 2 app running in FireFox. I am using
NetConnection to remote data from AMFPHP 1.9 and when the application starts
it will start loading a few different pieces simultaneously. I have notice
that with FireFox it will only load all the data 2/10 times, while in IE all
operations finish 10/10 times. Is this because of the multiprocessing in IE?
Is there an easy fix for this, or will I have to make some kind of remote
queuing system? Off the top of my head, it seems like it would be a pain.

Thanks in advance for any advice!

~Aaron


Re: [flexcoders] Re: Copy an Array collection in AS

2008-01-14 Thread Aaron Miller
That method you linked to in your blog seems a little bulky.

Duplicated here:

# private function copyArrayCollection(src1:ArrayCollection,
# src2:ArrayCollection):ArrayCollection{
# var dest:ArrayCollection = new ArrayCollection();
# if(src1 != null  src1.length  0){
# for(var i:int = 0; isrc1.length; i++){
# src2.addItem(src1.getItemAt(i));
# }
# }
# dest = src2;
# return dest;
# }

 Wouldn't this do the same thing without reimplementing the function?

# var ac1:ArrayCollection = new ArrayCollection( [1, 2, 3, 4] );
# var ac2:ArrayCollection = new ArrayCollection( ac1.source.concat() );



On 1/14/08, ezderman [EMAIL PROTECTED] wrote:


 http://flexed.wordpress.com/2006/12/21/copy-2-arraycollections/

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 jovialrandor [EMAIL PROTECTED]
 wrote:
 
  I want to copy a certain property (companyInfo2.RELATED_ASSET_ID)
 of
  one arraycollection to another arraycollection (asset_id).
 
  how do I go about that?
 
  here is what I have:
 
  [Bindable]
  private var companyInfo:ArrayCollection;
 
  [Bindable]
  private var companyInfo2:ArrayCollection;
 
 
  private function sanDataHandler2(event:ResultEvent):void
  {
  companyInfo2 =
  sanData2.lastResult.ASSETS.ASSET.RELATIONSHIPS.RELATIONSHIP;
 
  plname = sanData2.lastResult.ASSETS.ASSET.DESC;
 
  for (var y:int=0; ycompanyInfo2.length; y++){
  companyInfo2[y].RELATED_ASSET_ID == asset_id[y];
  y++;
  }
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Flex 2 and Vista

2008-01-14 Thread Aaron Miller
Runs fine for me. Try reinstalling.

Regards,
...aaron

On 1/14/08, Kerry Thompson [EMAIL PROTECTED] wrote:

   I may have just run into a big problem. I was running Flex 2 on my XP
 machine, but I got a new machine with Vista (home premium). Now my Flex
 install won't run (I downloaded the Flex 2 SDK trial).

 Is Flex 2 not compatible with Vista? If not, I assume the Flex 3 beta is.

 Cordially,

 Kerry Thompson

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Adding numeric stepper values

2008-01-09 Thread Aaron Miller
Just use binding.

# private function stepperSumFun( val1:int, val2:int, etc.. ): String {
# return (val1+val2+etc..);
# }

# mx:Label text={stepperSumFun(pt01.value, pt02.value, etc..)} /

You could also do it without the function.

Regards,
...aaron

On 1/9/08, JRBower [EMAIL PROTECTED] wrote:


 I have 5 numeric steppers that I'd like to add their values together and
 display the total in a label.

 for example:

 pt01 + pt02 + pt03 + pt04 + pt05 = pt06 (label)

 I'm not sure how to create the function.

 Thanks for your help,

 James

 --
 View this message in context:
 http://www.nabble.com/Adding-numeric-stepper-values-tp14727317p14727317.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Flex Calendar

2008-01-09 Thread Aaron Miller
Have you messed around with the official framework at all? I played with it
while it awhile back in it's early stages of development. Maybe you can get
some use out of it.

http://labs.adobe.com/wiki/index.php/Flex_Scheduling_Framework

Best Regards,
...aaron

On 1/8/08, vivek [EMAIL PROTECTED] wrote:

   Hey Guys,

 Thanks for looking into my message. I need some urgent help regarding
 creating a calendar in flex. I want to create a calendar as shown in the
 image in this link:
 http://www.nabble.com/Customizing-DateChooser-in-Flex-to13983948.html . I
 have treid almost everything on the datechooser component to get the desired
 functionality but i have given it up.  I cant find a solution. Pls
 help..:(

 Thanks
 Vivek
  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Adding numeric stepper values

2008-01-09 Thread Aaron Miller
Sorry, I typed it kind of quickly:

# private function stepperSumFun( val1:int, val2:int, val3:int, val4:int,
val5:int):String {
#return (val1+val2+val3+val4+val5).toString();
# }

Also, you need to pass Numbers not ints if the steppers will have decimals.

Best Regards,
...aaron

On 1/9/08, JRBower [EMAIL PROTECTED] wrote:


 I'm getting an error: 1067: Implicit coercion of a type Number to an
 unrelated type String.

 And if I change String to Number I get this warning and still no total:
 Data
 binding will not be able to detect assignments to value.

 private function stepperSumFun( val1:int, val2:int, val3:int, val4:int,
 val5:int):String
 {
 return (val1+val2+val3+val4+val5);
 }

 mx:Label text=Point Total {stepperSumFun( pt01.value, pt02.value,
 pt03.value, pt04.value, pt05.value)}/

 Maybe I'm overlooking something?

 Thanks,

 James

 Aaron Miller-4 wrote:
 
  Just use binding.
 
  # private function stepperSumFun( val1:int, val2:int, etc.. ): String {
  # return (val1+val2+etc..);
  # }
 
  # mx:Label text={stepperSumFun(pt01.value, pt02.value, etc..)} /
 
  You could also do it without the function.
 
  Regards,
  ...aaron
 
  On 1/9/08, JRBower [EMAIL PROTECTED] jbower%40solazure.com wrote:
 
 
  I have 5 numeric steppers that I'd like to add their values together
 and
  display the total in a label.
 
  for example:
 
  pt01 + pt02 + pt03 + pt04 + pt05 = pt06 (label)
 
  I'm not sure how to create the function.
 
  Thanks for your help,
 
  James
 
  --
  View this message in context:
 
 http://www.nabble.com/Adding-numeric-stepper-values-tp14727317p14727317.html
  Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 
 
 
 
  --
  Aaron Miller
  Chief Technology Officer
  Splash Labs, LLC.
  [EMAIL PROTECTED] amiller%40splashlabs.com | 360-255-1145
  http://www.splashlabs.com
 
 

 --
 View this message in context:
 http://www.nabble.com/Adding-numeric-stepper-values-tp14727317p14728172.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Cell Merge

2008-01-06 Thread Aaron Miller
Maybe an item renderer with style settings bound to it's data value? Not
sure why and when you need to merge, but it seems like there would be lots
of different ways you could do this.

Regards,
...aaron

On 1/6/08, yourName [EMAIL PROTECTED] wrote:

Can Any One tell me how to merge cells or chagning background color for
 individual cell
 for flex datagrid

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Yahoo Maps Viewstack Sandbox Issues

2008-01-04 Thread Aaron Miller
I had to create a MapLoader component that has the yahoo map service in
it, then created an actionscript var of that type. When the viewstack
changes for the first time, I instantiated it and added it as a child to the
viewstack container.

# if( idViewTab.selectedIndex == 1  myMapLoader == null ) {
# myMapLoader = new MapLoader();
# myMapLoader.percentWidth = 100;
# myMapLoader.percentHeight = 100;
#
# idMapView.addChild(myMapLoader);
# }

I'm not sure if your situation is different then mine, but this is what I
had to do for it to work.

Hope this helps,

...aaron

On 1/4/08, Chip Moeser [EMAIL PROTECTED] wrote:

   Hello All,
 Anyone ever come up with a solution to the problem that a sandbox
 error comes up when using Yahoo Maps AS3 in a viewstack with
 transitions? Found lots of unsolved threads:(
 Best,
 -Chip

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


Re: [flexcoders] Re: interface inheretence

2008-01-02 Thread Aaron Miller
Hi Simon,

I definitely understand your position. In fact this was how the code used to
work. The problem we were running into is that there are a lot of different
child users types which frequently change during the execution of the
program. What's worse is more child user types keep getting added and much
of the program execution throughout the application depends on which type of
user is currently in use. We were finding that making frequent updates to
this system was becoming quite a chore, and usually introduced new bugs.

I've actually finished the conversion to the more polymorphic system, and it
seems to be working quite well. I've even found that I could utilize binding
by creating a morphUserType function that dispatches a propertyChange
event. This would allow me to do something like:

# selectedIndex={(myAuthUser.userModel is IChildUserModel )? 1 : 0}

However, this does introduce another question. Is there a good way in AS3 to
determine the exact implementation of a class? Right now, I can only check
to see if it's not an IChildUserModel which means it must then be an
IUserModel. What if down the road a third type was added? I was thinking I
might be able to do something like a switch statement without breaks to see
how far down the line it goes, but this would bring me back to the updating
problem where switch statements would have to be updated throughout the
application.

This is really just a question for my own curiosity, so anyones  thoughts on
the matter will be greatly appreciated.

Thanks again!
...aaron

On 1/1/08, simonjpalmer [EMAIL PROTECTED] wrote:

   Just a thought, do you really need all these subclasses? With a bit
 of creativity, and a little less purity, could you just roll them all
 into a single class with some different properties and then
 externalise an interface from it?

 I don't know what your application is, and apologies if I am making a
 silly suggestion, but I do know that it is easy to get carried away
 with the OO paradigm and sometimes it's better to forego some
 architectural purity in the name of simplicity and understandability
 (is that a word?).

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron
 Miller [EMAIL PROTECTED] wrote:
 
  Thanks for the good information! I'll go ahead and give it a shot
 and add in
  your suggestions as well.
 
  When I said it becomes an IChildUserModel class, this was probably
 not the
  technical OOP term. What it does is get reinstantiated as a new
 class and
  uses the memento pattern to restore it's state. The end result is an
  IChildUserModel class which starts with the same state as the previous
  IUserModel class, with a few extra properties and methods tacked on.
 Do you
  think this is an ok approach? I don't have any formal education with
 this,
  so I'm just kind of winging it.
 
  Thanks for the help!
  ...aaron
 
  On 1/1/08, simonjpalmer [EMAIL PROTECTED] wrote:
  
   If you are strict about only referring to methods/properties through
   IUserModel and IChildUserModel and not the concrete classes then I
   don't see that you have any problems with your implementation and
   there's nothing inherently unsafe about it.
  
   You should probably check the type at runtime e.g...
   if (user is ChildUserModel1)
   if (user is IChildUserModel1)
  
   Everything in your class hierarchy is IUserModel. That doesn't make
   it redundant it means that you never have to refer to a concrete
   class, which is generally a good practice.
  
   However you do say that something starts off as a UserModel and
   becomes a ChildUserModel. I'm not sure how you can make that happen
   because an object gets strongly typed on creation using the new
   operator, so you can't switch from a class to a sub-class - but maybe
   I have just misunderstood what you meant.
  
   btw, I think that ChildUserModel1 implicitly implements IUserModel
   through extending UserModel, so you get that through inheritance which
   means your class declarations can be cleaned up a little. If you want
   to overrride the UserModel implementations of the IUserModel methods
   in your subclass you'll have to use the override keyword.
  
   hth
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com,

 Aaron
   Miller amiller@ wrote:
   
Hello,
   
I just wanted to make sure my logic was correct so I don't waste a
   bunch of
time typing up all this code to find out it doesn't work.
   
With the given class structure:
   
# UserModel implements IUserModel
# ChildUserModel1 extends UserModel implements IUserModel,
   IChildUserModel
# ChildUserModel2 extends UserModel implements IUserModel,
   IChildUserModel
# ChildUserModel3 extends UserModel implements IUserModel,
   IChildUserModel
etc.
   
If I have a class instance where the exact implementation could be
   any of
the above classes, and is determined at run time, would it be
   safe

Re: [flexcoders] Re: interface inheretence

2008-01-01 Thread Aaron Miller
Thanks for the good information! I'll go ahead and give it a shot and add in
your suggestions as well.

When I said it becomes an IChildUserModel class, this was probably not the
technical OOP term. What it does is get reinstantiated as a new class and
uses the memento pattern to restore it's state. The end result is an
IChildUserModel class which starts with the same state as the previous
IUserModel class, with a few extra properties and methods tacked on. Do you
think this is an ok approach? I don't have any formal education with this,
so I'm just kind of winging it.

Thanks for the help!
...aaron

On 1/1/08, simonjpalmer [EMAIL PROTECTED] wrote:

   If you are strict about only referring to methods/properties through
 IUserModel and IChildUserModel and not the concrete classes then I
 don't see that you have any problems with your implementation and
 there's nothing inherently unsafe about it.

 You should probably check the type at runtime e.g...
 if (user is ChildUserModel1)
 if (user is IChildUserModel1)

 Everything in your class hierarchy is IUserModel. That doesn't make
 it redundant it means that you never have to refer to a concrete
 class, which is generally a good practice.

 However you do say that something starts off as a UserModel and
 becomes a ChildUserModel. I'm not sure how you can make that happen
 because an object gets strongly typed on creation using the new
 operator, so you can't switch from a class to a sub-class - but maybe
 I have just misunderstood what you meant.

 btw, I think that ChildUserModel1 implicitly implements IUserModel
 through extending UserModel, so you get that through inheritance which
 means your class declarations can be cleaned up a little. If you want
 to overrride the UserModel implementations of the IUserModel methods
 in your subclass you'll have to use the override keyword.

 hth


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron
 Miller [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I just wanted to make sure my logic was correct so I don't waste a
 bunch of
  time typing up all this code to find out it doesn't work.
 
  With the given class structure:
 
  # UserModel implements IUserModel
  # ChildUserModel1 extends UserModel implements IUserModel,
 IChildUserModel
  # ChildUserModel2 extends UserModel implements IUserModel,
 IChildUserModel
  # ChildUserModel3 extends UserModel implements IUserModel,
 IChildUserModel
  etc.
 
  If I have a class instance where the exact implementation could be
 any of
  the above classes, and is determined at run time, would it be
 safe/correct
  to define a variable of type IUserModel and then strong type it as
 either
  IUserModel or IChildUserModel depending on its expected implementation?
 
  For instance:
 
  # var user:IUserModel;
  # user = new UserModel();
  # trace( IUserModel(user).someUserProperty );
  # user = new ChildUserModel2();
  # trace( IChildUserModel(user).someChildUserProperty );
 
  (assuming the properties are defined in the interface of course)
 
  Is there a safer/more correct way to accomplish this given that the
 property
  always starts off as a UserModel and may or may not become any one
 of the
  ChildUserModel classes who share a common interface?
 
  note: Any of this can be changed, I just need to be able to have a class
  that acts as an IChildUserModel when it is one, or as a UserModel
 when it's
  not. There is only one kind of UserModel, so I'm not sure if the
 IUserModel
  interface is even necessary. I just wasn't sure how to define the
 variable
  so it could be either one.
 
  Any input or advice will be greatly appreciated.
 
 
 
  Thanks for your time!
  ...aaron
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  360-255-1145
http://www.splashlabs.com


[flexcoders] interface inheretence

2007-12-31 Thread Aaron Miller
Hello,

I just wanted to make sure my logic was correct so I don't waste a bunch of
time typing up all this code to find out it doesn't work.

With the given class structure:

# UserModel implements IUserModel
# ChildUserModel1 extends UserModel implements IUserModel, IChildUserModel
# ChildUserModel2 extends UserModel implements IUserModel, IChildUserModel
# ChildUserModel3 extends UserModel implements IUserModel, IChildUserModel
etc.

If I have a class instance where the exact implementation could be any of
the above classes, and is determined at run time, would it be safe/correct
to define a variable of type IUserModel and then strong type it as either
IUserModel or IChildUserModel depending on its expected implementation?

For instance:

# var user:IUserModel;
# user = new UserModel();
# trace( IUserModel(user).someUserProperty );
# user = new ChildUserModel2();
# trace( IChildUserModel(user).someChildUserProperty );

(assuming the properties are defined in the interface of course)

Is there a safer/more correct way to accomplish this given that the property
always starts off as a UserModel and may or may not become any one of the
ChildUserModel classes who share a common interface?

note: Any of this can be changed, I just need to be able to have a class
that acts as an IChildUserModel when it is one, or as a UserModel when it's
not. There is only one kind of UserModel, so I'm not sure if the IUserModel
interface is even necessary. I just wasn't sure how to define the variable
so it could be either one.

Any input or advice will be greatly appreciated.



Thanks for your time!
...aaron


Re: [flexcoders] Re: Reflection -- Accessing private fields

2007-11-27 Thread Aaron Miller
Well no, I don't think you can. But why would you need to? Classes (for the
most part) are meant to be static. What is the end all result you're trying
to achieve? Will the interface be dynamic as well? Perhaps you could achieve
the same goal with dynamic objects and the memento pattern. This is
generally the preferred method if you are just trying to save state.

Regards,
...aaron

On 11/26/07, marty.pitt [EMAIL PROTECTED] wrote:

   I like where that's headedbut can you specify generate a class at
 runtime, and specify it's superclass?

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Aaron
 Miller [EMAIL PROTECTED] wrote:
 
  What about making the properties protected and extending the class
 down into
  a reflector class which is used to spy on it's parents? To get a
 true copy
  of the original, couldn't you also access the protected properties
 though an
  instance of the parent class? I know you can access the private
 properties
  in an instance of the same class, so wouldn't this also be true for the
  protected properties of a parent? Just an idea, haven't really tried
 this
  myself.
 
  Regards,
  ...aaron
 
  On 11/26/07, Mike Morearty [EMAIL PROTECTED] wrote:
  
   Gordon's right -- the debugger's techniques can't be used outside of
   the debugger. Its techniques are completely inaccessible from
   ActionScript.
  
   - Mike Morearty, Adobe Flex Builder team
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com,
 Gordon
   Smith gosmith@ wrote:
   
cc'ing Mike to get the lowdown on this. But I'm pretty sure that
whatever the debugger is doing can't be done from ActionScript.
   
- Gordon
   

   
From: flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com
 [mailto:
   flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com] On
Behalf Of marty.pitt
Sent: Wednesday, November 21, 2007 1:14 PM
To: flexcoders@yahoogroups.com 
flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com
Subject: [flexcoders] Re: Reflection -- Accessing private fields
   
   
   
Spoil sports. :)
   
How does the debugger expose the properties and their values?
 Nothing
I can leverage there?
   
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.commailto:
   flexcoders%40yahoogroups.com
, Gordon Smith gosmith@ wrote:

 I don't believe you can get reflection info about protected or
internal
 APIs either.

 Gordon Smith
 Adobe Flex SDK Team

 

 From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.commailto:
   flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.commailto:
   flexcoders%40yahoogroups.com
] On
 Behalf Of Alex Harui
 Sent: Wednesday, November 21, 2007 11:39 AM
 To: flexcoders@yahoogroups.com 
 flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com
 mailto:
   flexcoders%40yahoogroups.com
 Subject: RE: [flexcoders] Reflection -- Accessing private fields



 Private is private.

 

 From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.commailto:
   flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.commailto:
   flexcoders%40yahoogroups.com
] On
 Behalf Of marty.pitt
 Sent: Tuesday, November 20, 2007 9:25 PM
 To: flexcoders@yahoogroups.com 
 flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com
 mailto:
   flexcoders%40yahoogroups.com
 Subject: [flexcoders] Reflection -- Accessing private fields

 Hello all.

 Is there any way to get the names of private / protected /
 internal
 variables within a class at runtime? (ie., actual reflection!)

 It seems it's not possible using getClassInfo().

 What about some sort of custom serialization? (Remembering
 that the
 names of the variables is not known).

 Any thoughts?

 Cheers

 Marty

   
  
  
  
 
 
 
  --
  Aaron Miller
  Chief Technology Officer
  Splash Labs, LLC.
  [EMAIL PROTECTED] | 206-328-5485
  http://www.splashlabs.com
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: Flex Remoting Options - Any Opinions?

2007-11-27 Thread Aaron Miller
I have a question related to this topic as well. What has peoples experience
been with open source solutions like AMFPHP for remoting, or Python for
persistent socket connections? These have always been my methods of choice,
and have done me no harm as of yet, but I am working on a project that will
have to sustain a failry large load. Should I look into a proprietary
solution, or just beef up the servers? Will either of those even been
necessary?

Thanks!
...aaron

On 11/27/07, Tom Chiverton [EMAIL PROTECTED] wrote:

 On Monday 26 Nov 2007, Douglas McCarroll wrote:
  This is obviously an important question. Going beyond one CPU takes us
  from free to lots of money. What will free handle? I've been

 My guess is that it works out cheaper to buy a faster single CPU than to
 upgrade the LCDS license.

 --
 Tom Chiverton
 Helping to administratively industrialize prospective networks
 on: http://thefalken.livejournal.com

 

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

 Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office address
 is at St James's Court Brown Street Manchester M2 2JF.  A list of members is
 available for inspection at the registered office.  Any reference to a
 partner in relation to Halliwells LLP means a member of Halliwells
 LLP.  Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

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

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


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






-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Newbie compile issue rattling my brain

2007-11-27 Thread Aaron Miller
I think you need define your list in an mx:Array (inside the source block)
since this is the type of the ArrayCollection.source property. I could be
wrong though, I usually don't define data in MXML.

Regards,
...aaron

On 11/27/07, mcaplan_labnet [EMAIL PROTECTED] wrote:

   Hi there,

 I'm learning the ropes of Flex. I have a pretty much textbook example
 of how to set up a datagrid that is resulting in compile time syntax
 errors. I can't for the life of me see the error.

 Any ideas?

 Thanks!

 mike

 Severity and Description Path Resource Location Creation Time Id
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 851
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 854
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 857
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 860
 1084: Syntax error: expecting colon before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 863
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214531 850
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 853
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 856
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 859
 1084: Syntax error: expecting identifier before case.
 labnet/src/modules cases_list.mxml line 7 1196183214547 862
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 852
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 855
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 858
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 861
 1084: Syntax error: expecting identifier before rightbrace.
 labnet/src/modules cases_list.mxml line 7 1196183214547 864

 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 width=100% height=100%
 mx:TitleWindow width=100% height=100% layout=absolute
 title=Cases
 mx:DataGrid left=10 top=10 right=10 bottom=10
 mx:dataProvider
 mx:ArrayCollection
 mx:source
 mx:Object case=1002 patient=Chris Pordan
 arrival=2007/12/02 delivery=2007/12/16 /
 mx:Object case=1003 patient=Dave Shompson
 arrival=2007/12/03 delivery=2007/12/17 /
 mx:Object case=1004 patient=Pat
 Boodfellow arrival=2007/12/04 delivery=2007/12/18 /
 mx:Object case=1005 patient=Mike Meath
 arrival=2007/12/05 delivery=2007/12/19 /
 mx:Object case=1006 patient=Sandy
 Macdaddy arrival=2007/12/05 delivery=2007/12/20 /
 /mx:source
 /mx:ArrayCollection
 /mx:dataProvider
 mx:columns
 mx:DataGridColumn headerText=Case dataField=case/
 mx:DataGridColumn headerText=Patient
 dataField=patient/
 mx:DataGridColumn headerText=Arrival
 dataField=arrival/
 mx:DataGridColumn headerText=Delivery
 dataField=delivery /
 /mx:columns
 /mx:DataGrid
 /mx:TitleWindow
 /mx:Module

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: Reflection -- Accessing private fields

2007-11-26 Thread Aaron Miller
What about making the properties protected and extending the class down into
a reflector class which is used to spy on it's parents? To get a true copy
of the original, couldn't you also access the protected properties though an
instance of the parent class? I know you can access the private properties
in an instance of the same class, so wouldn't this also be true for the
protected properties of a parent? Just an idea, haven't really tried this
myself.

Regards,
...aaron

On 11/26/07, Mike Morearty [EMAIL PROTECTED] wrote:

   Gordon's right -- the debugger's techniques can't be used outside of
 the debugger. Its techniques are completely inaccessible from
 ActionScript.

 - Mike Morearty, Adobe Flex Builder team

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon
 Smith [EMAIL PROTECTED] wrote:
 
  cc'ing Mike to get the lowdown on this. But I'm pretty sure that
  whatever the debugger is doing can't be done from ActionScript.
 
  - Gordon
 
  
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
  Behalf Of marty.pitt
  Sent: Wednesday, November 21, 2007 1:14 PM
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: [flexcoders] Re: Reflection -- Accessing private fields
 
 
 
  Spoil sports. :)
 
  How does the debugger expose the properties and their values? Nothing
  I can leverage there?
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com
  , Gordon Smith gosmith@ wrote:
  
   I don't believe you can get reflection info about protected or
  internal
   APIs either.
  
   Gordon Smith
   Adobe Flex SDK Team
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com
  ] On
   Behalf Of Alex Harui
   Sent: Wednesday, November 21, 2007 11:39 AM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:
 flexcoders%40yahoogroups.com
   Subject: RE: [flexcoders] Reflection -- Accessing private fields
  
  
  
   Private is private.
  
   
  
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto:
 flexcoders%40yahoogroups.com
  ] On
   Behalf Of marty.pitt
   Sent: Tuesday, November 20, 2007 9:25 PM
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:
 flexcoders%40yahoogroups.com
   Subject: [flexcoders] Reflection -- Accessing private fields
  
   Hello all.
  
   Is there any way to get the names of private / protected / internal
   variables within a class at runtime? (ie., actual reflection!)
  
   It seems it's not possible using getClassInfo().
  
   What about some sort of custom serialization? (Remembering that the
   names of the variables is not known).
  
   Any thoughts?
  
   Cheers
  
   Marty
  
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: DataGrid itemEditEnd event fails with non-text itemEditors

2007-11-23 Thread Aaron Miller
The DataGridCoumn.editorDataField defaults to 'text' when not set. If you
are using a component that does not use the text property, you will need to
explicitly set it. In the case of a NumericStepper, you would set it to
'value'.

Best Regards,
...aaron

On 11/23/07, luciddream54321 [EMAIL PROTECTED] wrote:

   I should also mention the SDK I'm using is Flex 3 M3 (Beta 2)


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 luciddream54321 [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I have an editable DataGrid and have specified a function to handle
  the itemEditEnd event. One of the columns is using a NumericStepper
  as an itemEditor. When I edit that column I get a run-time error when
  the itemEditEnd event fires because it appears Flex is trying to
  access the column's text property which doesn't exist with a
  NumericStepper.
 
  This problem isn't limited to NumericStepper but also
  occurs when I use a DateField and surely other itemEditors as well.
  What do I need to do to prevent this from happening?
 
  This is the error I get when I click out of the column after editing it:
 
  ReferenceError: Error #1069: Property text not found on
  mx.controls.NumericStepper and there is no default value.
 
  Here is an example application to illustrate the problem:
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute
  mx:Script
  ![CDATA[
  import mx.collections.ArrayCollection;
 
  [Bindable]
  public var numbers:ArrayCollection = new
  ArrayCollection([{number:1}, {number:2}]);
 
  public function onItemEditEnd(event:Event):void
  {
  // Flex will crash before it gets here
  }
  ]]
  /mx:Script
 
  mx:DataGrid dataProvider={numbers}
  itemEditEnd=onItemEditEnd(event) editable=true
  mx:columns
  mx:DataGridColumn dataField=number
  itemEditor=mx.controls.NumericStepper /
  /mx:columns
  /mx:DataGrid
  /mx:Application
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Why is my Rich Text Editor limits me to font size of 172 ?

2007-11-23 Thread Aaron Miller
Hi Sean,

I've had to extend/rewrite the default rich text editor for various reasons.
Just create a custom component that extends the default, or just copy and
paste the code directly from the source. You would then just need to modify
to taste. In your case, add more options to the drop down combo.

Best Regards,
...aaron

On 11/23/07, helihobby [EMAIL PROTECTED] wrote:

   Hello all,

 I am using different fonts and in all of them the Rich Editor drop down
 memu limits me to 72 in size. I can manually enter 172 but the
 component will not let me resize anything larger than that ...

 Any idea how to fix this ...

 Regards,

 Sean.

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: depth problems, some help needed please

2007-11-19 Thread Aaron Miller
Sorry, just a clarification.

I forgot that 'parent' is an actual public property. I just meant the parent
of 'topControl', which would most likely be 'this' when called inside the
updateDisplayList function (unless of course it's inside a nested
component).

Best Regards,
...aaron

On 11/18/07, Aaron Miller [EMAIL PROTECTED] wrote:

 Whenever I want something to always be on top (or any specific position)
 that may not always be, I override the updateDisplayList function to add a
 check for:

 if( parent.getChildInex( topControl )  parent.numChildren - 1 ) {
 parent.setChildIndex( topControl, parent.numChildren-1 )
 }


 This will always keep it on top whenever the display list is updated (such
 as on resize). You can call the invalidateDisplayList() function to force
 this check if you need to.

 Best Regards,
 ...aaron

 On 11/18/07, Mark [EMAIL PROTECTED] wrote:
 
Thanks...
  I tried that and it worked but it also swapped position as well. Now it
  didn't swap position
  until you resize the window, but it did it. So it went from Label,
  Flash, Label to Label,
  Label, Flash. Any thoughts as to why that would happen?
 
  Thanks
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim
  Hoff [EMAIL PROTECTED] wrote:
  
  
   Hi Mark,
  
   To change the depth, you can use the swapChildren() method:
  
   public function swapChildren(child1:DisplayObject
   http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl\
 
  http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl
  ash/display/DisplayObject.html , child2:DisplayObject
   http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl\
 
  http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl
  ash/display/DisplayObject.html ):void
   http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/sp\
 
  http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/sp
  ecialTypes.html#void
  
   -TH
   __
  
   Tim Hoff
   Cynergy Systems | Technical Lead
   3603 5th Ave. Suite A, San Diego, CA 92103
   http://www.cynergysystems.com  http://www.cynergysystems.com
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  Mark pusateri02@ wrote:
   
I have a Flash CS3 component that pops up a small text box on roll-
overs. Those Flash text pop-ups come up behind Flex Labels. Is there
a way to control the depth of each component? The layout of these
components are:
   
HBox
Label Left -- Flash Comp. -- Label Right
   
Any ideas? Can I control this in Flash or Flex?
   
Thanks,
Mark
   
  
 
   
 



 --
 Aaron Miller
 Chief Technology Officer
 Splash Labs, LLC.
 [EMAIL PROTECTED]  |  206-328-5485
 http://www.splashlabs.com




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: depth problems, some help needed please

2007-11-19 Thread Aaron Miller
Whenever I want something to always be on top (or any specific position)
that may not always be, I override the updateDisplayList function to add a
check for:

if( parent.getChildInex( topControl )  parent.numChildren - 1 ) {
parent.setChildIndex( topControl, parent.numChildren-1 )
}


This will always keep it on top whenever the display list is updated (such
as on resize). You can call the invalidateDisplayList() function to force
this check if you need to.

Best Regards,
...aaron

On 11/18/07, Mark [EMAIL PROTECTED] wrote:

   Thanks...
 I tried that and it worked but it also swapped position as well. Now it
 didn't swap position
 until you resize the window, but it did it. So it went from Label, Flash,
 Label to Label,
 Label, Flash. Any thoughts as to why that would happen?

 Thanks

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim
 Hoff [EMAIL PROTECTED] wrote:
 
 
  Hi Mark,
 
  To change the depth, you can use the swapChildren() method:
 
  public function swapChildren(child1:DisplayObject
  
 http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl\
  http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl
 ash/display/DisplayObject.html , child2:DisplayObject
  
 http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl\
  http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/fl
 ash/display/DisplayObject.html ):void
  
 http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/sp\
  http://127.0.0.1:60064/help/topic/com.adobe.flexbuilder.help/langref/sp
 ecialTypes.html#void
 
  -TH
  __
 
  Tim Hoff
  Cynergy Systems | Technical Lead
  3603 5th Ave. Suite A, San Diego, CA 92103
  http://www.cynergysystems.com http://www.cynergysystems.com
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Mark
 pusateri02@ wrote:
  
   I have a Flash CS3 component that pops up a small text box on roll-
   overs. Those Flash text pop-ups come up behind Flex Labels. Is there
   a way to control the depth of each component? The layout of these
   components are:
  
   HBox
   Label Left -- Flash Comp. -- Label Right
  
   Any ideas? Can I control this in Flash or Flex?
  
   Thanks,
   Mark
  
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Subclassing TileList breaks my code!?

2007-11-19 Thread Aaron Miller
Change it to treeline:itemRenderer.

Best Regards,
...aaron

On 11/17/07, quiet.mountain [EMAIL PROTECTED] wrote:

   Hi all,

 This TileList was working fine:

 mx:TileList id=allYarnsTL
 dataProvider={allYarnsAC}
 mx:itemRenderer
 mx:Component
 mx:Canvas
 mx:Image id=yarnImage
 source={data.image}/
 /mx:Canvas
 /mx:Component
 /mx:itemRenderer
 /mx:TileList

 I then needed to override some TileList behaviours. So I started to
 subclass TileList...

 package com.treelinerugs
 {
 import mx.controls.TileList;

 public class TestTileList extends TileList
 {
 public function TestTileList()
 {
 super();
 }

 }
 }

 and then created an instance as before...

 treeline:TestTileList id=allYarnsTL
 dataProvider={allYarnsAC}
 mx:itemRenderer
 mx:Component
 mx:Canvas
 mx:Image id=yarnImage
 source={data.image}/
 /mx:Canvas
 /mx:Component
 /mx:itemRenderer
 /treeline:TestTileList

 But now I get a compile-time error Could not resolve
 mx:itemRenderer to a component implementation.

 I can fix this by creating a separate component and creating the
 instance like this instead:

 treeline:TestTileList id=allYarnsTL
 dataProvider={allYarnsAC}
 itemRenderer=com.treelinerugs.TLItemRenderer

 Why can't I define the itemRenderer in-line if I subclass TileList?

 Thanks, Rich

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] className question

2007-11-19 Thread Aaron Miller
The className property is used to reference a chunk of code (like the name
of your mxml file would do). You would have to follow all the same namespace
rules as you would if you were to create an Actionscript or mxml
class/component. Unless you have multiple data fields in your item editor
which need to be referenced by typing it to a specific class, it would
probably be better to use the DataGrid.itemEditorDataField property instead.

Best Regards,
...aaron

On 11/18/07, candysmate [EMAIL PROTECTED] wrote:

   I have an itemRenderer declared as:

 mx:itemRenderer
 mx:Component className =rendererStyle
 mx:Text
 /mx:Text
 /mx:Component
 /mx:itemRenderer

 If I use this again elsewhere I get an error 'class name specified
 more then once in document'.

 But I thought the whole idea behind class names was to be able to
 'group' components for styling etc ...?

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] How can I make the preloader wait until my runtime styles have been applied?

2007-11-19 Thread Aaron Miller
From the Adobe livedocs

The Preloader class is used by the SystemManager to monitor the download
and initialization status of a Flex application. It is also responsible for
downloading the runtime shared libraries (RSLs). 

By design, the preloader is supposed to run prior to loading any shared
libraries. You might want to try pulling out the styles you need for the
preloader and apply them at compile time. If you prefer to load them at
runtime, you can use the StyleManager.loadStyleDeclarations function in your
preloader and wait to start it until the StyleManager finishes loading
(function returns an IEventDispatcher where you can listen for
StyleEvent.COMPLETE). Although, I'm not sure how well the later will work
before the application finishes initializing.

Best Regards,
...aaron


On 11/16/07, chatopica [EMAIL PROTECTED] wrote:

   I have an application that depends on runtimes styles, but there's a
 second before the styles
 are loaded and applied that the application is displayed with the default
 styles. How can I
 prevent that from happening?

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: AMFPHP 1.9 security problem

2007-11-19 Thread Aaron Miller
You can create the login/logout methods in a parent class and have all your
child classes extend it. However, what I did was create one Auth class which
gets called for login/logout requests and returns an authentication token to
the client. This can be as simple as a session ID, or be a more complex
object with a user id, user hash (generated at login), available
classes/methods, etc. The idea is to pass this authentication token as a
parameter to each request, and validate it before serving any data.

Perhaps there is an easier way to do what you want, but this has worked for
me pretty well.

Best Regards,
...aaron

On 11/18/07, danielvlopes [EMAIL PROTECTED] wrote:

   Now i understando how use beforefilter, but my question is:

 I had a little big app in flex using amfphp, i had 11 classes inside
 services folder, but the problem is if any user create a flex app and
 point the path to my gateway (using absolute path) they can access all
 my methods.

 I need create login, logout methods in all my classes? Exist some way
 to create those authencation methods in one place and use this for all
 amfphp requests?

 Thanks for attention and thanks for the link.

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 danielvlopes [EMAIL PROTECTED]
 wrote:
 
  Thanks Muzak, i will try use this code with session in php. ;-)
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Muzak p.ginneberge@ wrote:
  
   See if this helps:
  
 

 http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=3201
  
   regards,
   Muzak
  
   - Original Message -
   From: danielvlopes danielvlopes@
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Sent: Friday, November 16, 2007 5:21 AM
   Subject: [flexcoders] Re: AMFPHP 1.9 security problem
  
  
   I found this topic in sephirot forum,
   http://www.sephiroth.it/phpBB/showthread.php?t=7966, they said use
   authenticate class in beforefilter amfphp function, i try look on this
   class in my amfphp folder but i don't understand how use... everything
   i found about authenticate in amfphp is for amfphp 1.2 and i using
   1.9beta 2 .
  
   Anyone can help?
  
 

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Resizing and default size of custom components....

2007-11-19 Thread Aaron Miller
Does it not work to make the itemRenderer width/height 100%? This is will
make each item take up all it's available space equally divided between each
item. If you do not want the items equally divided, you can set them to
different percentages, or override the updateDisplayList function within the
itemRenderer and calculate it's size based on the size of the parent. Hope
this helps.

Best Regards,
...aaron

On 11/17/07, DreamCode [EMAIL PROTECTED] wrote:

   Hi all!

 I have a weird problem about sizing of tilelists/items and before I pull
 out the last remaining straws on my head I decided to see if any experts had
 knowledge to share.

 I have number of TileLists on screen, the actual number of lists and their
 size is something the user can customize, but typically it will be 1-4 lists
 sized as % on both width/height.

 In the tilelist I want to show data with a specific item renderer
 but which item renderer is also something that the user can customize.

 So typically I will have a TileList of unknown size in pixels. Lets say
 that I want to show a list with 3 rows vertically and the amount of columns
 is based on the amount of items in the data provider.

 Is it possible to have the item renderer resize to the available
 size.ie. around 1/3 of the tilelist height if we take gaps into
 consideration.

 Below is what i'm trying to do:

 *var* paneTemp:TileList = *new* TileList();
 paneTemp.styleName = *basePane*;
 *var* paneStyle:CSSStyleDeclaration = * new* CSSStyleDeclaration;
 paneStyle = xmlToStyleDeclaration(XMLList(panesXML.constraints),paneTemp);
 // This is where I find the properties for size/position
 paneTemp.styleDeclaration = paneStyle;

 *var* item1:ContentItem = *new* ContentItem();
 item1.contentImage = *img/folder1.jpg*;
 item1.contentTitle = *Item 1*;
 contentList0.addItem(item1);

 *var* item2:ContentItem = *new* ContentItem();
 item2.contentImage = * img/folder2.jpg*;
 item2.contentTitle = *Item 2*;
 contentList0.addItem(item2);

 paneTemp.itemRenderer=*new* ClassFactory(ContentRenderer1);
 paneTemp.dataProvider = contentList0;
 paneContainer.addChild(paneTemp);

 The item renderer only have a max width/height defined and then I override
 the measure function to have the default size set to something different
 than whatever component the item renderer is based on. So in the example
 above the measure function of the item renderer set default size to 195w x
 225h and that size is also the maxW/H for the item renderer.

 I would like it so that they have the default size if there's room,
 otherwise scale down to whatever size can fit in the list. I do not want the
 items to get bigger than the default/max size.

 The above example shows the items at the correct size if rowCount is not
 set for the TileList, but the TileList itself is larger than the size it was
 originally set to. If the TileList is empty the size is correct.

 The problem is best illustrated visually, so I have made an image of 3
 scenarios. The image can be found at http://www.bimlab.net/allan/scaling.jpg


 Thanks in advance!

 Allan

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Block entire application while in transaction

2007-11-19 Thread Aaron Miller
You could create a status window component that extends TitleWindow. Pop
it up and give it a status message when it starts the upload, then remove it
when finished. You could even request a user response on error. Search the
docs for 'TitleWindow' for more info.

There are other ways to do this, but I found this to be the most user
firendly for my own use.

Best Regards,
...aaron

On 11/18/07, danielvlopes [EMAIL PROTECTED] wrote:

   Hello, i had application with stacks, buttons, inputs and etc... when
 user click in insert button it start upload and database insert, but
 while those operations happening user can click in other parts of
 application, exist some way to set enabled to false for entire
 application while transactions ocour?

 Thanks.

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Re: Programmatic control over a (H|V)Box gap width?

2007-11-19 Thread Aaron Miller
It's actually a style, not a property. In AS, you have to use the setStyle
method to assign values to it.

Best Regards,
...aaron

On 11/18/07, Josh McDonald [EMAIL PROTECTED] wrote:

   They don't seem to exist, that's the problem. They're in the MXML
 markup, but not in the classes.

 -Josh

 On Nov 15, 2007 2:42 PM, srikanth_reddy_007 [EMAIL 
 PROTECTED]srikanthlives%40yahoo.co.in
 wrote:
 
 
 
 
 
 
  use horizontalGap and verticalGap properties of the component.
 
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
  
   Is it possible? I can't find any mention of it in the API
 documentation.
  
   Cheers,
   -Josh
  
   --
   This is crazy! Why are we talking about going to bed with Wilma
   Flintstone... She'll never leave Fred and we know it. 
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: [EMAIL PROTECTED]
  
 
 

 --
 This is crazy! Why are we talking about going to bed with Wilma
 Flintstone... She'll never leave Fred and we know it. 

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED] josh%40gfunk007.com
  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com


Re: [flexcoders] Traverse a Model

2007-11-19 Thread Aaron Miller
you can use a for in loop

for (var p:String in obj) {
trace( p+' = '+obj[p] );
}

or if your just using this for debugging, I like to use

import mx.utils.ObjectUtil;

trace( ObjectUtil.toString(obj) );

Best Regards,
...aaron


On 11/18/07, Ben Marchbanks [EMAIL PROTECTED] wrote:

   I have a model which I would like to walk to get key/values to update
 the server with any changes.

 The following works fine to get each value,but is there a simple way
 to get the key as well ?

 for each(var item in myModel){
 trace(item)
 }

  




-- 
Aaron Miller
Chief Technology Officer
Splash Labs, LLC.
[EMAIL PROTECTED]  |  206-328-5485
http://www.splashlabs.com