[flexcoders] Re: multiple/seperate stages; mx:HTML and mx:SWFLoader

2009-04-21 Thread zyzzx00_99
Yeah -- sort of figured this one wouldn't get any traction.  Better question:

Is there a good community for AIR devs out there?




--- In flexcoders@yahoogroups.com, zyzzx00_99 jer...@... wrote:

 Random question:
 
 Does anyone know of a component (air or otherwise), aside from htmlLoader or 
 html (or anything that extends/uses flash.html stuff that uses webkit), that 
 would render a swf on a seperate Stage?
 
 The HTML component is almost perfect, but known bugs are the real 
 annoyance... using the html component failed our user testing -- I pretty 
 much need the domWindow object out of my way.
 
 I'm thinking of going down the road of creating a component that implements 
 ISWFLoader.  But after looking through the SWFLoader code, I can't help but 
 think that I'll be in the same place I am now... fighting with one stage and 
 needing to edit thousands of lines of our three library classes, checking in 
 hundreds of changes, some of which include a change to our security model 
 (which will piss off SOX auditors, and will in-turn piss off my boss).
 
 Thank you very much for your time.
 --j





[flexcoders] Re: Reoading a view from a viewstack

2009-04-20 Thread zyzzx00_99
geoff is dead on.  There are a probably 100 ways to do what you want done.  
states/transitions, event listeners, adding and removing the children via 
actionscript and leaving in your initApp().

But, yeah, the least amnt of code (depending on the framework you're using) 
would probably be adding this to your mxml:  show=initApp()





--- In flexcoders@yahoogroups.com, gedavies gedav...@... wrote:

 I have a series of tabs and I use the show event in the individual 
 components.  Then I keep a needsReloading boolean value that is based upon 
 event data from a controller.  If the tab is selected, the show event kicks 
 in and the data is reloaded based upon the needsReloading boolean.  
 
 Not sure if that is what you are looking for but I hope it helps.
 
 Geoff.
 
 --- In flexcoders@yahoogroups.com, Wally Kolcz wkolcz@ wrote:
 
  My application uses a ToggleButtonBar with a viewstack as it's 
  dataprovider. When the app is first loaded and each component is called in 
  the stack, it loads the component and runs it's initApp() on the 
  creationComplete. However when you go back it's already loaded and doesn't 
  run the initApp() and pull new external data. 
  
  Is there a way to automatically reload the component each time a generated 
  button is pushed in the ToggleButtonBar?
 





[flexcoders] multiple/seperate stages; mx:HTML and mx:SWFLoader

2009-04-20 Thread zyzzx00_99
Random question:

Does anyone know of a component (air or otherwise), aside from htmlLoader or 
html (or anything that extends/uses flash.html stuff that uses webkit), that 
would render a swf on a seperate Stage?

The HTML component is almost perfect, but known bugs are the real annoyance... 
using the html component failed our user testing -- I pretty much need the 
domWindow object out of my way.

I'm thinking of going down the road of creating a component that implements 
ISWFLoader.  But after looking through the SWFLoader code, I can't help but 
think that I'll be in the same place I am now... fighting with one stage and 
needing to edit thousands of lines of our three library classes, checking in 
hundreds of changes, some of which include a change to our security model 
(which will piss off SOX auditors, and will in-turn piss off my boss).

Thank you very much for your time.
--j



[flexcoders] Re: WindowShade container / Multi-Accordion

2009-04-20 Thread zyzzx00_99
If I wanted to try to solve this one in a hurry (and quickly is always best, 
right?), I'd write a class that extended container, or maybe even Canvas or 
VBox, depending on... and use WindowShade components as children.

Listen for the resize event in your children (which will be in your 
WindowShade components, non-bubbling, mx.events.ResizeEvent.RESIZE).

And do calculations on child heights and numChildrenExpanded, holding variables 
where needed.  I don't think I'd do anything with the override of 
updateDisplayList in this case... just an event listener that is constantly 
firing and calculating heights, evaluating who is opened, keeping track of who 
was opened and in what order, and only turning on my scroll bar policy when 
opened children == 1  the height of the children is greater than the 
multi-accordian height -- or something like that.

Hope that helps.
Best of luck,
Jeremy


--- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote:

 I may have asked this before, but it's come up again. I'm looking for an
 Accordion alternative that allows multiple tabs to be open at once, but
 never scrolls - rather it would close tabs as needed. I believe some of the
 Adobe Creative Suite applications have this behaviour for palettes.
 
 A VBox of WindowShades doesn't do the trick because the VBox grows in size.
 
 Any suggestions? Thanks.





[flexcoders] Re: Stack overflow

2009-04-20 Thread zyzzx00_99
Your method works fine for me.  The problem is most likely that you're passing 
in an XMLNode in to objectToXML and you're getting into a loop inside of 
encodeValue.  Debug and start hitting f5 and f6 down the chain of the framework 
if you really want to understand it.  Otherwise just say 
if(obj is XMLNode) 
   return obj;


--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 Look up XMLNode in the docs, you will understand why.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of markgoldin_2000
 Sent: Monday, April 20, 2009 5:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Stack overflow
 
  
 
 
 
 
 
 
 Well, this crashes too:
 public function objectToXML(obj:Object):XMLNode 
 {
 var qName:QName = new QName(root);
 var xmlDocument:XMLDocument = new XMLDocument();
 var simpleXMLEncoder:SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);
 var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName, xmlDocument);
 return xmlNode;
 }
 
 --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
 Tracy Spratt tracy@ wrote:
 
  You are mixing up the XML implementation versions.
  
  
  
  XMLDocument and simpleDecoder are legacy AS2 classes, included in AS3 only
  for backwards compatibility.
  
  
  
  You cannot use them with XML() which is an e4x implementation.
  
  
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
  _ 
  
  From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
 On
  Behalf Of markgoldin_2000
  Sent: Monday, April 20, 2009 4:21 PM
  To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  Subject: [flexcoders] Stack overflow
  
  
  
  
  
  
  
  
  I am getting the following:
  Error: Error #1023: Stack overflow occurred.
  at flash.xml::XMLNode()
  at flash.xml::XMLDocument/createElement()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
  at 

[flexcoders] Re: Stack overflow

2009-04-20 Thread zyzzx00_99
I like how I responded two hours before Tracy and it just now appeared 
Whatever.   The other thing is that you could have a memory reference loop.  
How are you calling the function?


--- In flexcoders@yahoogroups.com, zyzzx00_99 jer...@... wrote:

 Your method works fine for me.  The problem is most likely that you're 
 passing in an XMLNode in to objectToXML and you're getting into a loop inside 
 of encodeValue.  Debug and start hitting f5 and f6 down the chain of the 
 framework if you really want to understand it.  Otherwise just say 
 if(obj is XMLNode) 
return obj;
 
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  Look up XMLNode in the docs, you will understand why.
  
   
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of markgoldin_2000
  Sent: Monday, April 20, 2009 5:50 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: Stack overflow
  
   
  
  
  
  
  
  
  Well, this crashes too:
  public function objectToXML(obj:Object):XMLNode 
  {
  var qName:QName = new QName(root);
  var xmlDocument:XMLDocument = new XMLDocument();
  var simpleXMLEncoder:SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);
  var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName, xmlDocument);
  return xmlNode;
  }
  
  --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
  Tracy Spratt tracy@ wrote:
  
   You are mixing up the XML implementation versions.
   
   
   
   XMLDocument and simpleDecoder are legacy AS2 classes, included in AS3 only
   for backwards compatibility.
   
   
   
   You cannot use them with XML() which is an e4x implementation.
   
   
   
   Tracy Spratt,
   
   Lariat Services, development services available
   
   _ 
   
   From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
  [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
  On
   Behalf Of markgoldin_2000
   Sent: Monday, April 20, 2009 4:21 PM
   To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
   Subject: [flexcoders] Stack overflow
   
   
   
   
   
   
   
   
   I am getting the following:
   Error: Error #1023: Stack overflow occurred.
   at flash.xml::XMLNode()
   at flash.xml::XMLDocument/createElement()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
   at mx.rpc.xml

[flexcoders] Re: external swf inside an AIR HTML component right click issues.

2009-01-28 Thread zyzzx00_99
I thought that I should make this more readable:

AIR App:
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute

mx:HTML height=100% width=100%
 location=internalHtml.html /

/mx:WindowedApplication


Flex App:
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical 
mx:TextInput /
mx:TextInput /
mx:TextInput /
mx:TextInput /
mx:TextInput /
mx:TextInput /
/mx:Application



index.template.html (you may have to hunt down the html template that
enables history management):

else if (hasRequestedVersion) {
//add this line to the AC_FL_RunContent function call:
wmode, transparent,

(clean and rebuild swf project if changes are made).




Right click on a textInput (from the AIR app) and focus will change to
the textInput directly above the one you clicked.





--- In flexcoders@yahoogroups.com, zyzzx00_99 jer...@... wrote:

 I have the strangest AIR issue that I've never seen.  Right clicking
 on a TextInput sets focus to the TextInput directly above the
 component.  (There are two 'stages' involved, and it is a javascript +
 HTML component issue).
 
 I'm using SDK 3.0.2.214193 (I'm sure there's an update, but all of our
 developers have to be on the same build version).
 
 To reproduce:
 1) Start a new AIR project.  Add one HTML component.  height=100%,
 width=100%, location will be set to the HTML file created below.
 
 2) Start a new Flex project.  layout=vertical (I know...).  Add
 about five or six TextInputs.
 
 3) (If you've built the flex project, you may have to clean it to make
 this change... throw a java alert() in there somewhere if you're not
 sure):   In the 'if(hasRequestedVersion)' javascript block of the
 index.template.html file, add 'wmode, transparent,' to the
 arguments of the AC_FL_RunContent function.  (This is a requirement
 for my html files).
 
 4) set the location of the HTML component to the html file of the Flex
 project in your bin-debug output location.
 
 Right click on the bottom TextInput.  I'm on a windows box and right
 clicking on a textInput setsFocus to the component directly above the
 one you've right clicked.
 
 To get rid of the problem, either comment out the history.js script in
 the, or remove the wmode=transparent jive.  (remember to clean the
 flex project if you make changes to index.template.html).
 
 
 I don't know enough Javascript to fight through the history.js file. 
 Creating a lightweight history.js (that only enables BrowserManager)
 might be a fix as I can't say we'll be worrying about the
 history/back/fwd/etc.
 
 Any ideas?





[flexcoders] external swf inside an AIR HTML component right click issues.

2009-01-27 Thread zyzzx00_99
I have the strangest AIR issue that I've never seen.  Right clicking
on a TextInput sets focus to the TextInput directly above the
component.  (There are two 'stages' involved, and it is a javascript +
HTML component issue).

I'm using SDK 3.0.2.214193 (I'm sure there's an update, but all of our
developers have to be on the same build version).

To reproduce:
1) Start a new AIR project.  Add one HTML component.  height=100%,
width=100%, location will be set to the HTML file created below.

2) Start a new Flex project.  layout=vertical (I know...).  Add
about five or six TextInputs.

3) (If you've built the flex project, you may have to clean it to make
this change... throw a java alert() in there somewhere if you're not
sure):   In the 'if(hasRequestedVersion)' javascript block of the
index.template.html file, add 'wmode, transparent,' to the
arguments of the AC_FL_RunContent function.  (This is a requirement
for my html files).

4) set the location of the HTML component to the html file of the Flex
project in your bin-debug output location.

Right click on the bottom TextInput.  I'm on a windows box and right
clicking on a textInput setsFocus to the component directly above the
one you've right clicked.

To get rid of the problem, either comment out the history.js script in
the, or remove the wmode=transparent jive.  (remember to clean the
flex project if you make changes to index.template.html).


I don't know enough Javascript to fight through the history.js file. 
Creating a lightweight history.js (that only enables BrowserManager)
might be a fix as I can't say we'll be worrying about the
history/back/fwd/etc.

Any ideas?



[flexcoders] Re: NaN and Infinity showing in output - How to modify?

2008-07-31 Thread zyzzx00_99
to possibly help in the vague understanding, the ()?: stuff is an
inline if statement.  (mynum  maxval) ?  is like saying If mynum is
greater than maxval.  : is the else.

re your errors: from eyeballing everything, numberformatter.format
returns a string (control click into .format in flexbuilder to see
the framework code).  I could be making this up, but NaN might be a
class too, so it is probably the cause of your coercion error.  I
would break out everything into a function that returns a string (for
the text property of your label), so the last part would be return
PrepForDisplay.format(mynum).toString() (or as String).

Good Luck
Jeremy



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

 Hi Sid, thanks for the reply. I tried your first solution since I
did not
 create a custom function and it returns;
 
 1067: Implicit coercion of value of type Number to an unrelated type
Class
 
 I have a vague understanding of what is occurring here. Any way
around it?
 How difficult would it be to modify or create a custom function?
 
 What I have now is simply:
 
 mx:NumberFormatter id=PrepForDisplayprecision=2
 rounding=updecimalSeparatorTo=.   
thousandsSeparatorTo=,
 useThousandsSeparator=trueuseNegativeSign=true/
 
 -- 
 Blair Cox
 
 http://www.luminultra.com
  
 
 From: Sid Maskit [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com
 Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
 modify?
 
  
  
 
 If the format function is a custom function you have written, you
could just
 have it check whether you like the result it is about to return, and
if not,
 return something else. If that is not the case, I believe that you
should be
 able to put tests into your binding statement. 
 
 You could test for NaN with something like this:
 
 mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format(
myNumber)
 }/
 
 I'm not sure about infinity, but I assume that you can test for this by
 looking for the greatest possible value of the number. Assuming that you
 have set up the variable maxValue to contain that value, you should
be able
 to do something like this:
 
 mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
 myNumber) }/
 
 If you put the two together, it would look something like this:
 
 mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
 PrepForDispl ay.format( myNumber) }/
 
  
 Sid Maskit
 Partner 
 CraftySpace
 Better Websites for a Better World
 http://www.CraftySpace.com
 blog: http://smaskit.blogspot.com/





[flexcoders] Re: Load Complete on tilelist

2008-07-31 Thread zyzzx00_99
Really?  Why can't you just use the result event and set
result=functionName on HTTPService?


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

 You'l lhave to write that method yourself.  Listen for complete events
 from the image controls
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of David Gironella
 Sent: Thursday, July 31, 2008 5:36 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Load Complete on tilelist
 
  
 
 I have a tilelist with a dataprovider from an httpservice. I each item
 render I load an image.
 
  
 
 Exists some method to know when all images are complete loaded? I can
 use some events on tilelist to know this.
 
  
 
 Thanks.
 
  
 
 Giro.





[flexcoders] Re: Overriding function not marked for override?

2008-07-31 Thread zyzzx00_99
If you need to override functions in framework components that are
private (or what have you), why not just copy all of the code from
that component and make your own?  Sure, future functionality might be
in-the-air, but for Flex3 stuff certain off-limits stuff is sometimes
needed.



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

 Yes Josh it is protected read-only  why would the flex developers
 intentionally cripple the functionality like this? Rhetorical question
 I guess :-(
 
 --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote:
 
  If it's a protected read-only, you won't be able to expose it without
  monkey-patching the original file, as _renderData is almost
 certainly going
  to be private, so you can never set it.
  
  -Josh
  
  On Fri, Aug 1, 2008 at 8:37 AM, Amy amyblankenship@ wrote:
  
   --- In flexcoders@yahoogroups.com, chigwell23 chigwell23@
   wrote:
   
Again thanks for all the help so far ... turns out that
   
LineSeries.RenderData is a protected property
   
renderDataproperty
renderData:Object  [read-only]
   
Stores the information necessary to render this series.
   
Implementation
protected function get renderData():Object
   
... so I presume I have to subclass LineSeries to make it publicly
available which gives errors on both attempts:
   
package
{
  import mx.charts.series.LineSeries;
   
  public class myLineSeries extends LineSeries
  {
   
  // overriding a function not marked for override
  // incompatible override
  public function get renderData():Object{
  return super.renderData;
  }
   
  // incompatible override
  override public function get renderData():Object {
   return
super.renderData; }
   
   
  }
}
  
   try
  
   override protected function get...
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups
   Links
  
  
  
  
  
  
  -- 
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
  
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: josh@
 





[flexcoders] Re: Free Flex Gauge Component

2008-07-29 Thread zyzzx00_99
looks a lot like your Degrafa gauge.  We use it at Woodword Governor's
internal toolset:
http://www.brightpointinc.com/FlexDemos/degrafagauge/degrafagaugesample.html




[flexcoders] Re: numericStepper as an itemRenderer

2008-07-24 Thread zyzzx00_99
oops.  I left our international language class in there.  Take out the
ULang jive inside of the headerText.

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

 Hey all.  I have a numeric stepper and would like to set the max value
 from another data.field.  Certainly there are dozens of code-around
 fixes for problems like these, but it seems like this should work:
 (I'm copying and pasting code form a project I'm working on and with
 the init function I'm replicating data in the fashion that it comes
 back from a different team of developers)
 
 [Bindable]
 public var arrayCol : ArrayCollection = new ArrayCollection();
 
 private function initHandler():void
 {
   var i : int;
   var objArray : Array = new Array();
   
   for(i=0; i  10  ; i++ )
   {
 objArray.push( {QTY_TO_ISSUE:0,
 QTY_ON_HAND:Math.round(Math.random()*50) } );
   }
   
   this.arrayCol = new ArrayCollection(objArray);
 }
 
 ]]
 /mx:Script
 
 
 mx:DataGrid id=test dataProvider={arrayCol} height=50%
 mx:columns
 mx:DataGridColumn dataField=QTY_ON_HAND
 headerText={ULang.Current.getString('On Hand')} /
 mx:DataGridColumn dataField=QTY_TO_ISSUE headerText=To Issue 
   sortable=false editable=true editorDataField=value
 rendererIsEditor=true 
   mx:itemRenderer
   mx:Component
   mx:NumericStepper maximum={ getMaxValue(data) } minimum=0
   mx:Script
   ![CDATA[
   
   private function getMaxValue(obj:Object=null):Number
   {
   if(data)
   return data['QTY_ON_HAND'];
   
   return 0;
   }
   
   ]]
   /mx:Script
   /mx:NumericStepper
   /mx:Component
   /mx:itemRenderer
 /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid
 
 
 it looks like 'data' isn't defined, or some such thing, but an inline
 if statement to check if data exists doesn't seem to help.  Any ideas?





[flexcoders] numericStepper as an itemRenderer

2008-07-24 Thread zyzzx00_99
Hey all.  I have a numeric stepper and would like to set the max value
from another data.field.  Certainly there are dozens of code-around
fixes for problems like these, but it seems like this should work:
(I'm copying and pasting code form a project I'm working on and with
the init function I'm replicating data in the fashion that it comes
back from a different team of developers)

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

private function initHandler():void
{
var i : int;
var objArray : Array = new Array();

for(i=0; i  10  ; i++ )
{
  objArray.push( {QTY_TO_ISSUE:0,
QTY_ON_HAND:Math.round(Math.random()*50) } );
}

this.arrayCol = new ArrayCollection(objArray);
}

]]
/mx:Script


mx:DataGrid id=test dataProvider={arrayCol} height=50%
mx:columns
mx:DataGridColumn dataField=QTY_ON_HAND
headerText={ULang.Current.getString('On Hand')} /
mx:DataGridColumn dataField=QTY_TO_ISSUE headerText=To Issue 
sortable=false editable=true editorDataField=value
rendererIsEditor=true 
mx:itemRenderer
mx:Component
mx:NumericStepper maximum={ getMaxValue(data) } minimum=0
mx:Script
![CDATA[

private function getMaxValue(obj:Object=null):Number
{
if(data)
return data['QTY_ON_HAND'];

return 0;
}

]]
/mx:Script
/mx:NumericStepper
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid


it looks like 'data' isn't defined, or some such thing, but an inline
if statement to check if data exists doesn't seem to help.  Any ideas?