[flexcoders] Question on extending components for Mobile Apps

2012-01-10 Thread Mike Anderson
Hello All,

 

If I am to create custom components inside of Flash Builder for Mobile,
does it always have to begin by extending the View Class?  I'm not
talking about custom controls, but Views that would contain a ton of
custom controls (one being a Loader component).

 

Up until now (for non-mobile apps), I've always started by extending the
UIComponent Class since that is probably the most basic class to build
upon.

 

Thanks for any advice you can throw my way,

 

Mike

 



Re: [flexcoders] Re: opening another Window in Flex for commenting on data entered in TextArea compon

2011-11-08 Thread Mike J
Thanks for the suggestion. But, the TitleWindow is already full and does not 
have space for more textareas. What can I do in this situation?




From: valdhor valdhorli...@embarqmail.com
To: flexcoders@yahoogroups.com
Sent: Tuesday, November 8, 2011 9:25 AM
Subject: [flexcoders] Re: opening another Window in Flex for commenting on data 
entered in TextArea compon


  
The way I would do it is to include an extra text area underneath (Or beside) 
each of the current text areas for the reviewer to add comments. These text 
areas would only be visible if a reviewer logged in. Depending on some flags 
that are populated in the database, you could make one or the other 
editable/visible at a time (eg. If a reviewer has already added comments, make 
the comments text area visible but not editable)

--- In flexcoders@yahoogroups.com, mike_j95 mike_j95@... wrote:

 I have a TitleWindow which has some TextArea components where end users(using 
 the application) will enter data to answer some questions. A reviewer needs 
 to comment on the entered answers. The reviewer comments would be stored in a 
 MySQL database using ColdFusion as the middle tier. Later, the end users 
 would make changes to their answers based on reviewer comments.
 
 I was thinking of doing it as MS-Word does it for reviewing by having a 
 Add/View button next to each TextArea. On clicking the button, a window would 
 open where the reviewer could enter his comments for the TextArea. But, the 
 issue is when the new window is opened, the answer in TextArea component will 
 not be seen. In MS-Word, a reviewer can view/highlight the data that he wants 
 to comment on, then enter his comments on the comment box.
 
 1. How can I implement this so that reviewing answers/data is as 
 intuitive/easy as in a MS-Word document for the reviewer and end-users when 
 they need to make changes based on review comments?
 
 2. I am thinking of adding a Add/View comment button next to each TextArea. 
 On clicking it, I open a new window, create a panel with two textareas where 
 first textarea has user's original answer(which would be readonly for the 
 reviewer) copied from the parentWindow's TextArea, second textarea would have 
 reviewer comments(which would be readonly for end user of the application). 
 The reviewer would make comments in second textarea based on the answer(in 
 first textarea) and click a button to save his comments(which would be stored 
 in a MySQL database). The end user would click the Add/View comment button, 
 revise his answer(in first textarea) based on reviewer comments(inn second 
 textarea), click a button which would then update his original answer in the 
 parentWindow with the revised answer.
 
 3. If approach described in 2 is advisable, should I open a new Window using 
 PopupManager or is there some other option(like the one at Multiple Windows 
 in Adobe AIR) which might be more suited?
 
 I am using compiler Flex 4.5 with Flex 3 compatibility mode. I am a beginner 
 to intermediate in Flex
 
 Any suggestions would be appreciated.
 
 P.S. I am talking about the view end user receives when he uses MS-Word to 
 review a document(not how MS-Word implements it). If you have MS-Word 
 installed, you can open it, create a new document in it, type text in it, 
 highlight the text you want to comment about, then choose Review option from 
 the Menu, then select option New comment and you would see a box where you 
 can enter comments. I want to create something like that so a reviewer/end 
 user is more comfortable in using it.



 

[flexcoders] opening another Window in Flex for commenting on data entered in TextArea components

2011-11-07 Thread Mike J
I have a TitleWindow which has 
some TextArea components where end users(using the application) will 
enter data to answer some questions. A reviewer needs to comment on the 
entered answers. The reviewer comments would be stored in a MySQL 
database using ColdFusion as the middle tier. Later, the end users would make 
changes to their answers based on reviewer comments.
 
I was thinking of doing it as MS-Word does it for reviewing by having a 
Add/View button next to each TextArea. On clicking the button, a window 
would open where the reviewer could enter his comments for the TextArea. But, 
the issue is when the new window is opened, the answer in TextArea component 
will not be seen. In MS-Word, a reviewer can view/highlight 
the data that he wants to comment on, then enter his comments on the 
comment box.
 
1. How can I implement this so that reviewing answers/data is as 
intuitive/easy as in a MS-Word document for the reviewer and end-users 
when they need to make changes based on review comments?
 
2. I am thinking of adding a Add/View comment button next to each 
TextArea. On clicking it, I open a new window, create a panel with two 
textareas where first textarea has user's original answer(which would be 
readonly for the reviewer) copied from the parentWindow's TextArea, 
second textarea would have reviewer comments(which would be readonly for end 
user of the application). The reviewer would make comments in 
second textarea based on the answer(in first textarea) and click a 
button to save his comments(which would be stored in a MySQL database). 
The end user would click the Add/View comment button, revise his 
answer(in first textarea) based on reviewer comments(inn second 
textarea), click a button which would then update his original answer in the 
parentWindow with the revised answer.
 
3. If approach described in 2 is advisable, should I open a new Window 
using PopupManager or is there some other option(like the one at 
Multiple Windows in Adobe AIR) which might be more suited?
 
I am using compiler Flex 4.5 with Flex 3 compatibility mode. I am a beginner to 
intermediate in Flex

 
Any suggestions would be appreciated.

P.S. I am talking about the view end user receives when he uses MS-Word to 
review a document(not how MS-Word implements it). If you have MS-Word 
installed, you can open it, create a new document in it, type text in 
it,  highlight the text you want to comment about, then choose Review 
option from the Menu, then select option New comment and you would see a box 
where you can 
enter comments. I want to create something like that so a reviewer/end 
user is more comfortable in using it. 

[flexcoders] Re: Line Chart, I have a X value, how can I find the Y value?

2010-09-07 Thread Mike
I did something like this for EBay.  I defined a hierarchy of Equation classes, 
including linear, nth order polynomials, power law.  The base Equation class 
provided common functionality such as data initialization and solving for the 
unknown gien a variable.  Applications could then be written that called the 
library function in real time, so a mouse could be tracked while live X and Y 
intercepts were displayed, etc.  Sorry I can't offer the source code.  
Hopefully this gives you an idea of how you might proceed.

Mike



[flexcoders] Re: Using modules and remote objects

2010-09-07 Thread Mike
I recently did something like this for Cisco.  They needed a way for a 
sub-Application to invoke a method in another sub-Application, which might not 
be loaded.  The solution was to derive the sub-Applications from a common base 
class and use the main Application as a broker.  The broker listened to 
function invocation request events.  Results of the method calls were made 
available by a custom event that was dispatched by the called method upon 
completion.

Here is a clue to how to implement this type of mechanism: the SWFLoader that 
loads a sub-Application has a property called content, which is actually the 
sub-Application's FlexGlobals.topLevelApplication once the sub-Application 
loads.

Confused? I created a UML sequence diagram, a static object model diagram and a 
text narrative to document how the mechanism worked.  Anyone else attempting 
something similar is well advised to do the same.

Mike



[flexcoders] Re: flashBuilder.ini

2010-09-07 Thread Mike
I am using a 32 bit JDK because as you have guessed FB is not 64 bit capable at 
this time.

BTW, I have discovered that command line vmargs do not override settings 
specified in the ini file, contrary to the docs.  In other words, given the ini 
file I posted earlier, the following does not affect Xmx:

E:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.exe -vm E:\Program 
Files\Java\jdk1.6.0_20\bin -Xmx1500m

It would be more helpful to post complete and working ini files that provide 
800M of heap.  In theory there is no difference between theory and practice. 
In practice there is. -- Attributed to Jan L. A. van de Snepscheut, Yogi Berra 
and Albert Einstein.


  FlashBuilder.ini file is:
  
  -nl
  en_US
  -startup
  plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
  -vmargs
  -Xms800m
  -Xmx800m
  -XX:MaxPermSize=384m
  -XX:PermSize=128m
  -Djava.net.preferIPv4Stack=true
  

Mike



[flexcoders] Re: flashBuilder.ini

2010-09-05 Thread Mike Slinn
  The source code in my message did not look the same in the daily 
digest as it did online.  I will try posting once again; the biggest 
memory allocation that I can currently specify in FlashBuilder.ini file is:

-nl
en_US
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-vmargs
-Xms800m
-Xmx800m
-XX:MaxPermSize=384m
-XX:PermSize=128m
-Djava.net.preferIPv4Stack=true

Also, I have seen a report that running Eclipse from a JDK gives more 
memory control than from a JRE.  That did not make sense to me, but I 
tried it anyway, by changing the shortcut properties to:
E:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.exe -vm 
E:\Program Files\Java\jdk1.6.0_20\bin
vs.
E:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.exe -vm 
E:\Program Files\Java\jdk1.6.0_20\jre\bin

I did not find any difference.

Mike



[flexcoders] Re: flashBuilder.ini

2010-09-04 Thread Mike
I have the exact same hardware setup as you - 12 GB RAM on an i7 930 is
a wonderful thing!  Here are my settings:
-nlen_US-startupplugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090\
715.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win3\
2.x86_1.0.200.v20090519-vmargs-Xms800m-Xmx800m-XX:MaxPermSize=384m-XX:Pe\
rmSize=128m-Djava.net.preferIPv4Stack=true
I would like to increase Xmx to a larger value, but get an error when I
do so.  Can anyone paste a working FlashBuilder.ini file with a larger
value?
Mike


[flexcoders] Re: Translate application with the google translator

2010-08-19 Thread Mike
That is one of the code examples in this book:
http://www.slinnbooks.com/books/serverSide/

Mike


--- In flexcoders@yahoogroups.com, Hermes Alves hermes.al...@... wrote:

 Has anyone tried to make a multi-language application using the api of google 
 translator?
 It would be fantastic program once and have the system translated into all 
 languages supported by the API of google translator.
 http://googletranslateapi.riaforge.org/
 Hermes Alves





[flexcoders] Re: Web Services and ObjectProxy question for the Flex Gurus

2010-07-22 Thread Mike


Michael,

The Flex SDK can do what you want, but the default behavior is for it to unwrap 
collections and enclosing types which only contain one item.  This default was 
not a good idea, IMO.

Have you tried setting Operation.forcePartArrays true?
http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/Operation.html#forcePartArrays
You will need to obtain the mx.rpc.soap.Operation from the WebService first.

You can alter the default behavior by writing a custom deserializer (which is a 
non-trivial task, made more difficult by the ASDoc being turned off.)

For more information about Flex WebService, see my slide show and YouTube video 
at http://www.slideshare.net/mslinn/using-flex-with-enterprise-web-services

Mike


 I'm using Flex 4 and I set the returntype for the webservice to return an 
 array 
 of Cars - Cars[].  If the web service returns more than 1, it successfully 
 deserialized the data and returns an array of Car objects.  BUT, if only one 
 is 
 returned, it returns an ObjectProxy, obviously because it cannot convert it 
 to 
 an array. 



[flexcoders] Problem with data displayed in Drop Down, versus actual underlying data

2010-06-07 Thread Mike Anderson
Hello All,
 
I am banging my head on the wall with this issue -
 
I have 1 dropdown control's dataProvider, tied to the remoting results
of another dropdown's database query.
 
You can keep selecting a different value from the primary dropdown, and
the secondary dropdown updates the underlying dataset beautifully, BUT
if you click the secondary dropdown to display the actual values, it
still displays the list from the PREVIOUS database query.
 
The interesting thing is, if you click an actual value from the
dropdown, it selects the correct underlying value contained in the index
position, although the displayed value is wrong (the value from the
previous query).
 
I am using Cairngorm for my framework - and have the
model.returnedQuery tied to the secondary dropdown box - so whenever I
kick off a command, the values automatically update, since the
dataProvider is tied to the model.
 
Do any of you, have any ideas as to what's causing this?
 
Thanks in advance for all your help,
 
Mike
 
P.S.  I am using Flash Builder 4  compiling in Flex 3.5 (this problem
still existed when using Flex Builder too).
 


[flexcoders] Re: Yahoogroups really sucks - let's go somewhere else.

2010-04-28 Thread Mike
The only reason I remain on this group is because the Adobe forums do not 
provide a daily digest.  I do not want lots of individual emails, I would 
rather have the digest pushed to me, so I can read it if/when I am ready.  I 
may not be online when I read the digest, so email works best for me.

Mike



[flexcoders] Re: Efficient SOAP WebService invocation

2010-04-21 Thread Mike
Once created, the WebService and Operation objects can be used many times, 
including multiple concurrent invocations.

I am putting together a manuscript on enterprise-grade web services.  You can 
track progress at http://slinnbooks.com and/or follow me on twitter: mslinn.

Mike



[flexcoders] Re: Get name of function from within the function? Get arguments for any function?

2010-04-05 Thread Mike
The arguments top level class works well, except when used inside a method 
which takes a variable number of arguments (using the ... syntax.)  In that 
case, the SDK v3.2 compiler says '1120: Access of undefined property arguments.'

I wonder if this bug was fixed in a later SDK?  The project I am working on 
can't update the SDK for a while due to enterprise computing constraints.

Mike


--- In flexcoders@yahoogroups.com, Robert VanCuren Jr robert.vancuren...@... 
wrote:

 You can use the arguments class to get some of this info.
 
 http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html#propertySummary
 
 http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html#propertySummaryfor
 example
 
 arguments.callee returns a reference to the current function and
 arguments.length the number of args. You can access them like as an array
 arguments[0] ect.
 
 Hope that helps
 
 
 On Mon, Apr 5, 2010 at 11:10 AM, tntomek tnto...@... wrote:
 
 
 
  I'm trying to get 2 things:
  1) Name of current function
  2) Get list of arguments for some arbitrary function
 
  Is this possible?
 
  Here is an example:
 
  someMethod(jack, someCallback);
 
  -
 
  function someMethod(name:String, callback:Function)
  {
  // from here I'd like to do something like
  // this.getFunctionName()
 
  // and also get arguments for my callback function
  // so I can inspect them and do something about them
  // I'd like to see that someCallback has 2 parameters
  // called age and person and get their type
  }
 
  function someCallback(age:int, person:Person) {}
 
   
 





[flexcoders] Cursor disappears intermittently on Mac

2010-04-04 Thread Mike Chang
Hi,
I have a AIR deployed application, and I'm running into a problem on Mac OS
X.
When I try to drag the window around by the title bar, the mouse cursor
disappears intermittently.
On Windows it's fine...
Any idea?

Thanks,
Mike


[flexcoders] Re: Loading Flex sub-applications as sandboxed applications within the same domain

2010-04-03 Thread Mike
If Apache httpd is serving your Flex application, you can use mod_proxy to make 
a URL pattern appear to be served from another subdomain.

Mike


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 If the two domain names match, you cannot get a new SecurityDomain.  You will 
 need another way of addressing the same server.  If you know the IP address 
 you can use that.  Some folks have created DNS mappings to the same server.
 
 
 On 4/2/10 6:21 PM, Deuce f...@... wrote:
 
 
 
 
 
 
 Does anyone know how to load a sub-application as a sandboxed application 
 when on the same domain?
 
 i.e.:
 
 http://www.xyz.com/HostApplication.swf
 
 loads
 
 http://www.xyz.com/SubApplication.swf
 
 My simple configuration uses a SWFLoader class as such:
 
 mx:SWFLoader id=swfLoader
  trustContent=false
  loadForCompatibility=true/
 
 After running, the loaded sub-application attempts a remote object service 
 call and the UI displays an error:
 
 TypeError: Error #1034: Type Coercion failed: cannot convert obj...@24a83949 
 to mx.messaging.messages.ErrorMessage.
 
 This configuration works fine if the sub-application is loaded from a 
 different domain.  Is there a way to load sub-applications, that are able to 
 remote successfully, from the SAME domain?
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Handler functions convention

2010-04-03 Thread Mike Chang
Hi,
I noticed in many examples on the web handler functions mostly have a
parameter event, even though the event isn't used (such as even.target). I'm
wondering if there's a reason for this convention.
I have to pass a null in case it isn't triggered by the event, which seems
pretty cumbersome.

Mike


Re: [flexcoders] Handler functions convention

2010-04-03 Thread Mike Chang
Thanks Gabriel.
Mike

2010/4/3 gabriel montagné gabr...@rojored.com



 On 03/04/2010, Mike Chang mik...@gmail.com mikecc%40gmail.com wrote:

  I noticed in many examples on the web handler functions mostly have a
  parameter event, even though the event isn't used (such as even.target).
 I'm
  wondering if there's a reason for this convention.

 I'd say it's up to you, but if you subscribe to the event using
 ActionScript,
 not the mxml handler sugar, then you'll always get the event.


  I have to pass a null in case it isn't triggered by the event, which
 seems
  pretty cumbersome.

 Perhaps you could use defaults in the handler, something like

 login_clickHandler(event:MouseEvent = null)

 Gabriel

 --
 gabriel montagné láscaris comneno
 http://rojored.com
 +44 (0) 7500 709 209

  



[flexcoders] Embedding fonts with a font that doesn't have bold

2010-04-03 Thread Mike Chang
Hi,
I'm trying to embed a font into Flex, but the font doesn't have bold style,
so anywhere the application bolds the text it shows as Times New Roman.
Any workaround? I have another font-name I'd like to use for bold.

Thanks,
Mike


[flexcoders] Re: Embedding fonts with a font that doesn't have bold

2010-04-03 Thread Mike Chang
Also, if I had a choice, would it be faster embedding a font or using images
- say I only have a single 200x100 sized image using the font.

On Sat, Apr 3, 2010 at 11:51 AM, Mike Chang mik...@gmail.com wrote:

 Hi,
 I'm trying to embed a font into Flex, but the font doesn't have bold style,
 so anywhere the application bolds the text it shows as Times New Roman.
 Any workaround? I have another font-name I'd like to use for bold.

 Thanks,
 Mike



Re: [flexcoders] Embedding fonts with a font that doesn't have bold

2010-04-03 Thread Mike Chang
Oleg's right. Thanks all.

On Sat, Apr 3, 2010 at 2:06 PM, Oleg Sivokon olegsivo...@gmail.com wrote:



 Samuel,

 It was actually not me, who asked the question :)
 Besides, from what I understood from the question - the font doesn't have
 bold face, so, you cannot embed bold characters from that font, because they
 had never been designed by the font's author :)
 If this isn't the case, then probably my answer is worth nothing.

 Best.

 Oleg
  



[flexcoders] Dim application while busy cursor is on

2010-04-02 Thread Mike Chang
Hi,
I got a couple of questions
1. Is it possible to dim the background application (as in modal dialog)
when the busy cursor is set?
2. Instead of a busy cursor, I'd like to have a progress bar in the middle
of the screen. HOw is this accomplished?

Thanks,


[flexcoders] Re: Dim application while busy cursor is on

2010-04-02 Thread Mike Chang
Sorry one more question -
I noticed that when I setbusycursor in a AIR deployed app, the regular
cursor appears alongside the busy cursor. Is there a way to remove the
regular cursor?


On Fri, Apr 2, 2010 at 10:40 AM, Mike Chang mik...@gmail.com wrote:

 Hi,
 I got a couple of questions
 1. Is it possible to dim the background application (as in modal dialog)
 when the busy cursor is set?
 2. Instead of a busy cursor, I'd like to have a progress bar in the middle
 of the screen. HOw is this accomplished?

 Thanks,



Re: [flexcoders] Flex Builder won't use my changes

2010-03-21 Thread Mike Chabot
Disable your browser cache. I have to do this when developing.

-Mike Chabot

On Sat, Mar 20, 2010 at 7:49 PM, Rick Genter rick.gen...@gmail.com wrote:



 I've been building an app with Flex Builder 3. All of a sudden when I run
 my app using the debugger I no longer see my changes reflected. For example,
 I have a class where I deleted several trace() calls and added another
 trace() call, yet when I run the app I'm seeing the old trace() messages and
 not the new trace() message. Furthermore, when I put a breakpoint on the new
 trace() call, the debugger claims that there is no code at that breakpoint,
 indicating that the code has not been recompiled.

 I've tried cleaning the project, restarting Flex Builder and even deleting
 the project and re-importing it from CVS, but to no avail. Any suggestions?

 Relevant version information:

 Flex Builder 3, Version 3.0, Build 3.0.2.214193
 Mac OS X 10.6.2
 --
 Rick Genter
 rick.gen...@gmail.com rick.genter%40gmail.com

  



Re: [flexcoders] session variables

2010-03-13 Thread Mike Chabot
On the server you have code that tracks who is logged in. In Flex, when a
user logs in, you end the first session when a second active session is
started for that user. In Flex, ping the server every so often to check
whether or not you need to kick the Flex user off due to this policy
violation rule. Show a message like a second active logon has been
detected, so you have been logged out. This isn't a trivial feature to
implement. Maybe a first step would be to log more data so you know how
common the problem is. It might turn out to be a minor issue that isn't
worth dealing with, or an issue that can be handled differently, such as by
reminding suspected violators of the rules via an E-mail.

-Mike Chabot

On Sat, Mar 13, 2010 at 2:32 PM, iloveyouwisconsin 
iloveyouwiscon...@yahoo.com wrote:



 I have a flex app that users pay to subscribe to my content. Obviously, I
 don't want to let user A give his login credentials to user B but I have
 no control over that part (some people are just evil). So, how can I prevent
 two people from using the same username at the same time? I've read that
 flash cookies wouldn't work (as the user can view the contents of such
 cookie w/ a sol-editor...correct me if I'm wrong). Is there a better way?

  __._,_.__



[flexcoders] Default parameters in function

2010-03-10 Thread Mike Chang
Hi, I have a function

function myfunc (a:int, b:int, c:int = 0) {
}

I want to be able to call myfunc(a, b) and have c using a default
value 0, is this possible?
I tried it but it says function expects 3 arguments.

Mike


[flexcoders] String to object reference?

2010-03-09 Thread Mike Chang
Hi,
I was wondering if it's possible to change a string to an object name.
For example, I pass a string california, and there's an object named
california. I would like to reference the california object.

For example, this is my code right now:
case california:
up = california;
over = 
california_over;
break;

I would like to have
 up = californiaString  to object;
 over = californiaString + _over  to object.

Thanks,
Mike


Re: [flexcoders] String to object reference?

2010-03-09 Thread Mike Chang
Thanks!

On Tue, Mar 9, 2010 at 11:58 AM, Gordon Smith gosm...@adobe.com wrote:



  You can access the properties of any object by name, using square-bracket
 notation. For example, o.p can be written o[p]. In this case, the relevant
 object is 'this', so you want



 this[california]

 this[california + _over]



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Mike Chang
 *Sent:* Tuesday, March 09, 2010 11:13 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] String to object reference?





 Hi,
 I was wondering if it's possible to change a string to an object name.
 For example, I pass a string california, and there's an object named
 california. I would like to reference the california object.

 For example, this is my code right now:
 case california:
 up = california;
 over = california_over;
 break;

 I would like to have
 up = californiaString  to object;
 over = californiaString + _over  to object.

 Thanks,
 Mike

  



[flexcoders] Disabling focus on button when tab is pressed

2010-03-09 Thread Mike Chang
Hi,
I have some buttons in my UI, and I realize that when TAB is pressed,
it automatically sets the focus to one of the buttons.
I do not wish to have this behavior. Is there a way to disable it?
Thanks,
Mike


[flexcoders] Re: LCDS Configuration Settings - Best Practices?

2010-03-09 Thread Mike
This book has information that should be quite helpful:
http://www.slinnbooks.com/books/serverSide/

Mike



[flexcoders] Re: Partial LineSeries - is it possible?

2010-02-27 Thread Mike
I made a video showing an example of interactively hiding data points by 
filtering the chart's dataProvider.  There are a number of subtleties involved 
;)

http://www.youtube.com/watch?v=WV8-mE8BYOs

Mike



[flexcoders] Re: Strategies for switching between testing and deployment addresses

2010-02-23 Thread Mike
I cover this issue in detail in my book 
(http://slinnbooks.com/books/serverSide), with code examples and explanations.  
The book shows how to discover the originating domain and how to dynamically 
configure data services accordingly.

Mike


 I've been writing some small programs that use HTTPService calls to
 fetch data from a back-end. During testing, I'm using 127.0.0.1 or an
 IP address on my subnet. When I deploy, I update the IP address in
 service definitions to the right external address and build the app.
 Or at least I mean to. It's all too easy to accidentally change the
 addresses for internal testing and then forget to switch them back
 before building.
 
 Is there a best practice or simple strategy for putting the IP address
 somewhere outside of the source code that it can easily be edited
 without a rebuild?




[flexcoders] Re: Deep Object Copy?

2010-02-17 Thread Mike
You can see the source code for ObjectUtil.copy() here:
http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as

You can use this type of code to write unit tests that exercise ActionScript 
serialization and deserialization for your value objects, without needing to 
send data to a server.



[flexcoders] Re: Deep Object Copy?

2010-02-17 Thread Mike
I just noticed the ObjectUtil.clone() method, new for Flex SDK 4.

public static function clone(value:Object):Object
{
var result:Object = copy(value);
cloneInternal(result, value);
return result;
}

private static function cloneInternal(result:Object, value:Object):void
{
result.uid = value.uid;
var classInfo:Object = getClassInfo(value);
var v:Object;
for each (var p:* in classInfo.properties) 
{
v = value[p];
if (v  v.hasOwnProperty(uid)) 
cloneInternal(result[p], v);
}
}

UID is discussed here: 
http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_8.html

The clone() docs say clone() differs from copy() in that the uid property of 
each object instance is retained.  Is that not true for ObjectUtil.copy() 
anyway?



[flexcoders] Re: Deep Object Copy?

2010-02-17 Thread Mike
Alex,

Do you mean that the clone() method was provided by a party other than Adobe, 
and hasn't passed or won't pass a Q/A cycle?

Mike



[flexcoders] Re: Using PlotSeries icon in a seperate control

2010-02-16 Thread Mike
I never got a reply to this, so I though I would try again and see if anyone 
can help.

Mike


--- In flexcoders@yahoogroups.com, Mike msl...@... wrote:

 I need to create an instance of a PlotSeries icon.  It's easy enough to 
 discover the PlotSeries item renderer:
 
 var renderer:ClassFactory = plotSeries.getStyle(itemRenderer);
 
 However, if I have not figured out how to create an instance of the renderer 
 so I can add it to the display list.
 
 Here is a short test program, consisting of two files.  The first file is a 
 VBox whose icon property should be set to the item renderer instance.
 
 // TestBox.mxml
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 mx:Script
 ![CDATA[
 import mx.controls.*;
 import mx.charts.series.PlotSeries;
 
 public var plotSeries:PlotSeries;
 public var generator:Class;
 
 override protected function createChildren():void {
 super.createChildren();
 if (false) { // this works (icon is shown)
 icon = generator;
 } else { // does not work (no icon)
 var renderer:ClassFactory = 
 plotSeries.getStyle(itemRenderer);
 icon = renderer.generator;
 /* var x:* = renderer.newInstance();
 trace(x); */
 }
 }
 ]]
 /mx:Script
 /mx:VBox
 
 
 // index.mxml
 /* This is the application; it contains two embedded images that can be used 
 to set the TestBox's icon property.  That works.
 
 onPlotChartComplete() sets the icon. */
 ?xml version=1.0 encoding=utf-8?
 mx:Application 
 xmlns:local=*
 xmlns:mx=http://www.adobe.com/2006/mxml;
 
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 import mx.charts.series.PlotSeries;
 
 [Bindable]
 private var expensesAC:ArrayCollection = new ArrayCollection( [
 { Month: Jan, Profit: 2000, Expenses: 1500, Amount: 450 },
 { Month: Feb, Profit: 1000, Expenses: 200, Amount: 600 },
 { Month: Mar, Profit: 1500, Expenses: 500, Amount: 300 } 
 ]);
 
 [Embed(source=warning.png)]
 private static var WarningClass:Class;
 
 [Embed(source=error.png)]
 private static var ErrorClass:Class;
 
 
 private function onPlotChartComplete():void {
 var testBox1:TestBox = new TestBox();
 testBox1.plotSeries = plotSeries1;
 testBox1.generator = ErrorClass;
 testBox1.label = Error;
 tab.addChild(testBox1);
 
 var testBox2:TestBox = new TestBox();
 testBox2.plotSeries = plotSeries2;
 testBox2.generator = WarningClass;
 testBox2.label = Warning;
 tab.addChild(testBox2);
 }
 ]]
 /mx:Script
 
 mx:PlotChart
 creationComplete=onPlotChartComplete()
 dataProvider={expensesAC}
 height=50% 
 width=100%
 mx:series
 mx:PlotSeries
 id=plotSeries1
 xField=Expenses
 yField=Profit
 displayName=Plot 1 /
 mx:PlotSeries
 id=plotSeries2
 xField=Amount
 yField=Expenses
 displayName=Plot 2 /
 /mx:series
 /mx:PlotChart
 mx:TabNavigator height=50% id=tab width=100% /
 /mx:Application
 
 
 Suggestions?
 
 Mike





Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Mike
I have no control over the dataProvider at all.  Performance is not an issue, 
because the data extraction only happens once, and it can be time-sliced it so 
the webapp does not appear to freeze.  Passing through multiple event handlers, 
including EnterFrame would be perfectly acceptable.

 3) Depth: Since you have no control over the renderers, you don't have any 
 way of knowing whether they're composed of containers within containers, etc.
True.  The routine needs to deal with that.

 4) Layout: Presumably, you want to have the text appear in the same order it 
 appears in the columns, and then within the individual renderers.  There's no 
 guarantee that your iteration will go from top left to bottom right, so 
 you'll have to record where the text was found and then arrange it in some 
 way that tries to make sense (but may not, depending on what is going on in 
 the renderers).
Yes, doing this right will be a lot of work.

 5) Random surprises from the renderer developers.  If the renderer developer 
 makes a reference to its parent, owner, or something else like that and you 
 instantiate it in a way that doesn't involve a List of some sort, you may 
 wind up with Null Pointer Exceptions.  They may come up with other stuff that 
 won't come up in your testing with reasonable renderers that you wrote, but 
 it will be your fault when they do something stupid and YOUR logic errors out.
Yep, that is true.

 In short, you have to work together with your other team members one way or 
 another to make this work.  
There are no other team members.  This is a library routine.  I want this to be 
as general as possible, and am prepared to do what it takes to make it work 
properly.

 Why not just shortcut to the most performant method?
Performance is not important, general utility is important.  The library 
feature should just work, no excuses.



[SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Mike
Because this is an library for exporting to other formats I only need to 
instantiate one renderer at a time.  Memory requirements should therefore be 
modest.

I have implemented a mechanism to export the display lists of non-text item 
renderers.  The tricky part is learning how to instantiate any type of renderer 
on demand.  Hopefully constructive suggestions will be forthcoming soon.

Mike


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Except the memory implications of rendering every row must be considered.
 
 And I still haven't figured out what you'd do for renderers that don't 
 display any text.
 
 And I'm pretty sure I could write a renderer that you could never figure out 
 which children have text.
 
 But given all that, then start copying code from DataGridBase.as.  
 CreateColumnItemRenderer, setupItemRenderer and some calls to validateNow 
 should get the renderer in its final state, and code in FocusManager, 
 addFocusables walks children in the two known ways of figuring out your 
 children.  If you run into TextFields, pull their text or htmlText and if you 
 run into TextLines  Not sure what you'll do there.




[flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
I need extract the rendered text from all cells of a DataGrid, whether or not 
they are all displayed.  The following code dies because renderer is null:


public var dp:ArrayCollection = new ArrayCollection();

/** Obtain formatted text data from the DataGrid's dataProvider.  
* Other data generated by item renderers such as images are ignored. */
protected function extractData(originalComponent:*):void {
var dg:DataGrid = DataGrid(originalComponent);
for (var col:int=0; coldg.columnCount; col++) {
var rowArray:Array = [];
for (var row:int=0; rowdg.rowCount; row++) {
var index:int = dg.indicesToIndex(row, col);
var renderer:IListItemRenderer = dg.createItemRenderer(index);
var value:* = renderer.data;
rowArray.push(value);
}
dp.addItem(rowArray);
}
}

Most of my posts to this group go unanswered.  Hopefully this one won't suffer 
the same fate! :)

Mike




Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
I need to post the displayed data to a server, complete with formatting.  The 
dataProvider does not help much; I'd have to replicate the work that the 
datagrid does in determining the properties displayed by each column, and 
duplicate the job of the item renderers in order to extract the displayed 
property of each column.

I see that itemRenderers can be created ad hoc, so it must be possible to shove 
data into them and obtain the displayed values.

... it is nice to get a response, and so quickly too :)



[flexcoders] Re: Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
I meant formatting, as in currency, decimals, thousands separators, etc. but I 
don't need stylesheet info like font size or face.  Seems like your approach 
may be exactly what I need.

indexToItemRenderer() returned null, but maybe I invoked it improperly.

I suppose you mean Flex DataGrid Excel Export, $7.  If that product includes 
source code, then it would be a worthwhile source of inspiration.  Does the 
download include source?

Mike


--- In flexcoders@yahoogroups.com, Flex myflexdownlo...@... wrote:

 Sorry to hear your posts get unanswered. I can only suggest a 'try'...did you 
 try using the datagrid's indextoitemrenderer method instead of creating a new 
 item renderer...
 
 I have seen something similar in the DataGrid to Excel component on 
 Flexdownloads.com but there the exercise was limited to extracting data from 
 datagrid using the label function of the datagrid or if no label function 
 specified, just use the data displayed, without the formatting css.



Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike


--- In flexcoders@yahoogroups.com, turbo_vb timh...@... wrote:

 If you don't have too many items in the dataProvider, you could create a 
 second DataGrid, with the same DataProvider and itemRenderers, that does not 
 have a height set and is not visible.  The second DataGrid would render all 
 of the items in the dataProvider, because the height isn't set.  Then go 
 about inspecting the itemRenderers like you proposed earlier; to get the data 
 for your service call. Not the best solution, but this is an unusual use-case.
 
 -TH


Sounds like a workable suggestion, thanks.

Mike



Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
I must take the DataGrid as I find it.  If no labelFunction is defined, that 
approach won't work; also each item in the dataProvider might be manifested in 
0 or more columns.  This approach probably won't be general enough.

Thanks,

Mike


 You should be able to do this by running the labelFunction on all items in 
 the dataProvider.  You'll need to change the method signature to allow for a 
 null dataGridColumn, or pass in a dummy dataGridColumn.
 
 HTH;
 
 Amy





Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
Alex,

Your code is very interesting, and quite instructive.  Thank you.

You said that your code handles labelFunction and dataField; however the asdoc 
for the itemToLabel() method reads:

public function itemToLabel(data:Object):String

Returns the string the renderer would display for the given data object based 
on the labelField and labelFunction properties. If the method cannot convert 
the parameter to a string, it returns a single space.

... no mention of dataField.  Am I missing something?

The goal is to export the text from any datagrid's displayed cells into a 2D 
array that is sent to a server.  In the general case, one cannot assume 
anything about the dataProvider, or how the text in each DataGrid's cell is 
constructed.  There are no constraints on the types of renderers that need to 
be supported.  The export should handle any datagrid handed to it.  This means 
that if item renderers are used, they need to be instantiated and the text 
values for each cell read out... and the export routine has to figure out how 
to do this without any clues beyond what it can discover from the dataGrid.

Something to go 'hmm' about...

Mike


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 I'm still not sure what your goal is and what things are under your control.  
 I can have a renderer that displays content not found in the data provider, 
 or one that shows colors and no text.  A renderer can have multiple text 
 widgets inside it and be mixed with other controls.  Is there some constraint 
 on what kinds of renderers you want to grab text from?
 
 Usually, you own the renderers.  Are folks supplying renderers for you to use?




[flexcoders] Re: What's up Adobe?

2010-02-03 Thread Mike
It's too late, the damage is done, but I agree also FWIW.
An Adobe VP told me about Flex being the open source branding, and Flash 
being the commercial product branding.  There is no way that customers will 
figure that out.  They have enough trouble understanding that developers are 
left-brained and designers are right-brained.

One should not target a single brand at two classes of individuals who have 
different educations, different values, different world views, drive different 
cars and listen to different music.  If you believe you know of a top-notch 
designer who is also a top-notch developer, your standards are too low.  One 
cannot excel at both career paths - humans are too finite.

Mike
... who tries to excel as a developer and has great respect for excellent 
designers


   “Yes, I can see your point. I think the two of us are the only people who
 
  think that the Flex brand is weakened by the Flash moniker.”
 
  No, there are more of us... We just aren’t as vocal!




[flexcoders] Re: Flex and Java projects - deployment via FlexBuilder and Java Eclipse to Tomcat

2010-02-01 Thread Mike
See http://www.slinnbooks.com/books/serverSide

Mike



[flexcoders] Using PlotSeries icon in a seperate control

2010-01-18 Thread Mike
I need to create an instance of a PlotSeries icon.  It's easy enough to 
discover the PlotSeries item renderer:

var renderer:ClassFactory = plotSeries.getStyle(itemRenderer);

However, if I have not figured out how to create an instance of the renderer so 
I can add it to the display list.

Here is a short test program, consisting of two files.  The first file is a 
VBox whose icon property should be set to the item renderer instance.

// TestBox.mxml
?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script
![CDATA[
import mx.controls.*;
import mx.charts.series.PlotSeries;

public var plotSeries:PlotSeries;
public var generator:Class;

override protected function createChildren():void {
super.createChildren();
if (false) { // this works (icon is shown)
icon = generator;
} else { // does not work (no icon)
var renderer:ClassFactory = 
plotSeries.getStyle(itemRenderer);
icon = renderer.generator;
/* var x:* = renderer.newInstance();
trace(x); */
}
}
]]
/mx:Script
/mx:VBox


// index.mxml
/* This is the application; it contains two embedded images that can be used to 
set the TestBox's icon property.  That works.

onPlotChartComplete() sets the icon. */
?xml version=1.0 encoding=utf-8?
mx:Application 
xmlns:local=*
xmlns:mx=http://www.adobe.com/2006/mxml;

mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.charts.series.PlotSeries;

[Bindable]
private var expensesAC:ArrayCollection = new ArrayCollection( [
{ Month: Jan, Profit: 2000, Expenses: 1500, Amount: 450 },
{ Month: Feb, Profit: 1000, Expenses: 200, Amount: 600 },
{ Month: Mar, Profit: 1500, Expenses: 500, Amount: 300 } 
]);

[Embed(source=warning.png)]
private static var WarningClass:Class;

[Embed(source=error.png)]
private static var ErrorClass:Class;


private function onPlotChartComplete():void {
var testBox1:TestBox = new TestBox();
testBox1.plotSeries = plotSeries1;
testBox1.generator = ErrorClass;
testBox1.label = Error;
tab.addChild(testBox1);

var testBox2:TestBox = new TestBox();
testBox2.plotSeries = plotSeries2;
testBox2.generator = WarningClass;
testBox2.label = Warning;
tab.addChild(testBox2);
}
]]
/mx:Script

mx:PlotChart
creationComplete=onPlotChartComplete()
dataProvider={expensesAC}
height=50% 
width=100%
mx:series
mx:PlotSeries
id=plotSeries1
xField=Expenses
yField=Profit
displayName=Plot 1 /
mx:PlotSeries
id=plotSeries2
xField=Amount
yField=Expenses
displayName=Plot 2 /
/mx:series
/mx:PlotChart
mx:TabNavigator height=50% id=tab width=100% /
/mx:Application


Suggestions?

Mike




[flexcoders] asdoc Error: Property is write-only.

2010-01-14 Thread Mike
I'm having an issue with asdoc.  I've tried asdoc.exe from SDK 3.2, 3.3 and 
3.5; the same error always appears:

Error: Property is write-only.
 [exec] Math.pow(10, 2);
 [exec] ^

I've tried putting that statement in other files, and it does not generate an 
error.  If I put that statement anywhere in the class that it belongs to, the 
error appears.  Something about this class triggers the error message.  If it 
put the statement in a subclass of the problem class, no error results.

Suggestions?

Mike



[flexcoders] Re: asdoc Error: Property is write-only.

2010-01-14 Thread Mike
I also get the same error any time Math.ceil() or Math.floor() is used in 
another file.  Math.min() and Math.max() do not generate the error message.



[flexcoders] Re: Inserting Datagrid printscreen in PDF with AlivePDF

2009-12-09 Thread Mike
I gave up on AlivePDF.  All it can do is provide fuzzy screen grabs; the width 
and height of the displayed UIComponent determines the printed output, which 
sucks.  No pagination is possible.

The Flex PrintGrid is also inadequate for reporting needs.

Instead, I wrote a Java program that create PDFs from an application's data, 
using the iText library.  This is the same library that Cold Fusion uses for 
creating PDFs.  The Flex client sends the data that needs to be printed to a 
server using an HTTP POST, and my little Java program generates the PDF. The 
result is a crisp, paginated document.  The data is sent as XML; the only tags 
I currently support are image / and table /, and just enough attributes to 
satisfy this client's needs.

BTW, iText allows other PDFs and files to be merged, and the generated PDF 
could even contain a Flex app and data... but that is another story.

Sorry I can't provide the source at this time, because it was paid for by my 
client.  If they are willing to make the source available at another time, I'll 
publish it.

It only took about 10 hours to write a POC, not a big deal.  If another client 
wanted this, I could write a similar program easily enough.

Mike



Re: [flexcoders] Flash Player Security Bug

2009-11-13 Thread Mike McAulay
I have used binary sockets successfully in Flex and have created  
persistent connections through which multiple messages pass.  The work  
was done under NDA so I can't disclose any details but it certainly  
does work.


I suggest you strip your code down to the absolute bare minimum.  And  
if worse comes to worst there's always packet analysis.  I had to use  
tcpdump at one point to track down a stupid bug in my policy server.


The fact that you're receiving error 2048 is interesting.  Is your  
code possibly attempting to connect to a second remote host which is  
not configured to serve a socket policy file?


Mike


On Nov 13, 2009, at 12:37 AM, Simon wrote:

I am pretty sure I have found a bug in the Flash Player regarding  
socket security. According to the Adobe site I should be able to  
serve a socket master policy file on port 843 from my server.


http://www.adobe.com/devnet/flashplayer/articles/ 
fplayer9_security.html


Since that post things have got stricter, but that's fine because I  
am serving the right policy file content according to the new rules.


I creat a socket and send a message through it, which succeeds, and  
I get a response. The policyfiles.txt log file from the debug player  
shows that the policy file is received and accepted and that  
communication is allowed between my client and server.


Then 10 seconds later I get error 2048 and my socket is deactivated.

I have tried a variety of things, including explicitly allowing all  
domains by a call to Security.allowDomain() and  
Security.allowInsecureDomain().


Here is the policy file I serve on port 843...

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd 


cross-domain-policy
site-control permitted-cross-domain-policies=all/
allow-access-from domain=* to-ports=* secure=false/
/cross-domain-policy

No HTTP in here, so I am not providing a crossdomain.xml at the  
server root (I tried, it makes no difference).


My reluctant conclusion is that this must be a bug. Does anyone have  
experience using binary sockets in Flex? Has anyone successfully  
created a persistent binary socket and sent more than one message  
through it?








[flexcoders] Trapping Control-A in webapp

2009-11-05 Thread Mike
I want to pass Control-A to a Flex app running in a browser.  Seems the
browser grabs Control-A and does not pass it to the Flex app.  I tried
adding this to index.template.html:

script language=JavaScript type=text/javascript
!--

function disableCtrlModifer(evt) {
 var disabled = {a:0, c:0, x:0, v:0};
 var ctrlMod = (window.event)? window.event.ctrlKey : evt.ctrlKey;
 var key = (window.event)? window.event.keyCode : evt.which;
 key = String.fromCharCode(key).toLowerCase();
 return (ctrlMod  (key in disabled))? false : true;
}

// --
/script
/head

body scroll=no
onKeyPress=return disableCtrlModifer(event)
onKeyDown=return disableCtrlModifer(event)

... but no joy.  Suggestions?



[flexcoders] Re: FB3 Plug-In Migration

2009-09-30 Thread Mike
Check out http://www.insideria.com/2009/09/fixed-an-internal-build-error.html

Mike



[flexcoders] @font-face adjustments

2009-09-27 Thread Mike
I have an @font-face declaration in a CSS file:

@font-face {
src: local(Lucida Console);
fontFamily: plain;
advancedAntiAliasing: true; 
}

.plain {
fontFamily: plain;
}

This font makes text appear too high when used in a ComboBox, TextInput, etc.  
Perhaps adjusting the baseline or leading might fix that.  I've tried several 
ideas, nothing had any effect.  It would be best to modify the @font-face 
declaration or the .plain CSS type declaration.

Mike



[flexcoders] Swing Layout Manager Equivalent in Flex 3

2009-07-23 Thread Mike Oliver

I have built many GUIs with Swing and two of the Swing Layout Manager Options
I found most useful were Flow and Border.

I have a design goal where I am creating a component that has a Data Grid
under a set of control icons.  If the browser window shrinks to the point
the control icons can no longer be shown without scrolling I would like them
to flow down to the next row and the panel or canvas they are on be doubled
in height to accommodate the wrap around row of icons.

I tried FlowBox but that only works if i have it double high all the time
and that defeats the purpose.

I suppose I could run some code in the resize event handler and if the size
drops below the width of the icons, I could then double the hieght and if it
grows back to wide enough I could halve the hieght.  But I am lazy and was
hopping there was a Swing Layout Manager equivalent.


-- 
View this message in context: 
http://www.nabble.com/Swing-Layout-Manager-Equivalent-in-Flex-3-tp24634003p24634003.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Flex Library and and MXML component

2009-06-27 Thread Mike Oliver

I have an MXML Component Canvas that I want to put into a Flex Library SWC.

I created a Flex Library Project with /src and /bin 

I added the /images folder with the image in it that the Component Canvas
uses to /src.

I added the mxml source file for the Component to the /src

The /bin gets the MyLibProject.swc but the mxml component isn't inside.

I am sure I am missing a step but can't find what it is.

I want to use this swc in several projects as a component on other screens.

-- 
View this message in context: 
http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Flex Library and and MXML component

2009-06-27 Thread Mike Oliver

Right, I hadn't added the class that was the MXML Component, so that was it.

Ollie

Aaron Hardy wrote:
 
 Right-click project -- Properties -- Flex Library Build Path -- 
 Select All -- OK.  Make sure it rebuilds and you should be good to go.
 
 Aaron
 
 Mike Oliver wrote:



 I have an MXML Component Canvas that I want to put into a Flex Library 
 SWC.

 I created a Flex Library Project with /src and /bin

 I added the /images folder with the image in it that the Component Canvas
 uses to /src.

 I added the mxml source file for the Component to the /src

 The /bin gets the MyLibProject.swc but the mxml component isn't inside.

 I am sure I am missing a step but can't find what it is.

 I want to use this swc in several projects as a component on other 
 screens.

 -- 
 View this message in context: 
 http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
  
 http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24233741.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Flex-Library-and-and-MXML-component-tp24233741p24234546.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Datagrid Row height

2009-06-14 Thread Mike Chang
Hi,
One of my rows in a data grid contains items that are larger than the
default height of the cell (1 line). It's fine that it stretches, but is it
possible not to have all the rows increase by the same? All the rows are
bigger in height now.
Please help.

Mike


[flexcoders] Wrapping components

2009-06-07 Thread Mike Chang
Hi,
I have a newbie question on layout.I'm looking for a container component
that would wrap the components inside, keeping width the same and
expanding the height to fit, allowing all components inside to be visible
while keeping a maximum width.
I tried HBox and VBox but as you can imagine they either cut it out, or just
expand in the wrong way.
Please help.
Thanks,
Mike


Re: [flexcoders] Re: Application Idea

2009-05-14 Thread Mike Britton
Personally, and as a matter of pride, I would avoid reinventing the wheel.


Mike Britton
--
http://www.mikebritton.com

 - Original Message -
 From: Baz
 To: flexcoders@yahoogroups.com
 Sent: Thursday, May 14, 2009 10:40 PM
 Subject: Re: [flexcoders] Re: Application Idea

 You want your app to be successful right? Well what's the most successful
 app on the web? Google. Why not emulate it... You can have the frontend done
 pretty quickly, so you're already 50% done. It's only a matter of getting
 the backend right.

 Good luck.



Re: [flexcoders] FlowBox Nesting

2009-05-13 Thread Mike Oliver

Thanks Doug,

So how much was that bet?

I replaced the FlobBox with FlowContainer and while yes the height did
calculate properly so you were correct therebut alas it doesn't solve
the problem.

The new code follows but I won't upload the resulting .swf BECAUSE IT HANGS
THE BROWSER, both IE and FireFox!  Both running the latest Flash player 9
and on FireFox it has the debugger version of the player and that didn't get
a chance to catch the error.

mx:VBox x=10 y=42 height=650 width=100%

ns1:FlowContainer width=100%  paddingBottom=10 
paddingLeft=10
paddingRight=10 paddingTop=10 left=10 borderStyle=solid
borderThickness=2 borderColor=#000509
mx:ComboBox/mx:ComboBox
mx:DateField/
mx:Button label=Save/
mx:Button label=Add/
mx:Button label=Cancel/
mx:HSlider/
/ns1:FlowContainer
mx:DataGrid height=500 width=100% left=0
mx:columns
mx:DataGridColumn headerText=Column 1 
dataField=col1/
mx:DataGridColumn headerText=Column 2 
dataField=col2/
mx:DataGridColumn headerText=Column 3 
dataField=col3/
/mx:columns
/mx:DataGrid
/mx:VBox



Doug McCune wrote:
 
 FlowBox has a pretty serious bug having to do with how it does its height
 calculation. This bug has been logged and has remained unresolved for far
 too long (I say this as the main flexlib maintainer, it's basically my
 laziness that has kept this from being fixed). That said, there's a second
 container in FlexLib that also accomplishes the same goal, it's called
 FlowContainer. It was origianlly written as part of the docking toolbar
 component. It more or less does the exact same thing, but doesn't have the
 problem with the height calculation.
 
 So I'd advise trying to use FlowContainer instead of FlowBox, I bet it
 will
 solve your problem.
 
 Doug
 
 On Tue, May 12, 2009 at 5:56 PM, Mike Oliver moli...@corenttech.com
 wrote:
 



 Yes its the flow box see attached.

 http://www.nabble.com/file/p23513630/ToolbarDemo.swf ToolbarDemo.swf

 It looks like the flow box calculates its height based on all components
 wrapping.

 Ollie


 Tracy Spratt-2 wrote:
 
  Is it the FlowBox that is causing the problem? What happens if you
  replace
  it with an HBox? Do you still get that space? Can you put a border or
  background on the FlowBox to see if it is causing the layout issue?
 
 
 
  Something is confusing the layout. The space between items in a VBox
  should
  be only the verticalGap.
 
 
 
  Tracy Spratt,
 
  Lariat Services, development services available
 
  _
 
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
 [mailto:
 flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On
  Behalf Of Mike Oliver
  Sent: Tuesday, May 12, 2009 8:13 PM
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: RE: [flexcoders] FlowBox Nesting
 
 
 
 
 
 
 
 
 
  I said that I tried a VBox and that did NOT give me what I want,
 
  Here is the mxml
 
  mx:VBox x=10 y=42 height=650 width=100%
 
  ns1:FlowBox width=100% paddingBottom=10 paddingLeft=10
  paddingRight=10 paddingTop=10 left=10
  mx:ComboBox/mx:ComboBox
  mx:DateField/
  mx:Button label=Save/
  mx:Button label=Add/
  mx:Button label=Cancel/
  mx:HSlider/
  /ns1:FlowBox
  mx:DataGrid height=100% width=100% left=0
  mx:columns
  mx:DataGridColumn headerText=Column 1 dataField=col1/
  mx:DataGridColumn headerText=Column 2 dataField=col2/
  mx:DataGridColumn headerText=Column 3 dataField=col3/
  /mx:columns
  /mx:DataGrid
  /mx:VBox
 
  and I attached the swf and here is a screen shot.
 
  http://www.nabble.
 http://www.nabble.com/file/p23513102/ToolbarDemo.swf
 
  com/file/p23513102/ToolbarDemo.swf ToolbarDemo.swf
 
  Now note that the space between the flowbox and the grid is what I want
 to
  eliminate.
 
  http://www.nabble.
  
 http://www.nabble.com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jp
  g com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jpg
 
  Tracy Spratt-2 wrote:
 
  Plain old VBox will do this for you. Set the lower grid height to 100%
  and
  it should resize dynamically to fit (If the VBox has a fixed height)
 If
  the
  VBox height is not set then its container will show scrollbars
 
 
 
  Tracy Spratt,
 
  Lariat Services, development services available
 
  _
 
  From: flexcod...@yahoogro
 mailto:flexcoders%40yahoogroups.comflexcoders%2540yahoogroups.com
 ups.com
  [mailto:flexcod...@yahoogro
 mailto:flexcoders%40yahoogroups.comflexcoders%2540yahoogroups.com
 ups.com]
  On
  Behalf Of Mike Oliver
  Sent: Tuesday, May 12, 2009 12:55 PM
  To: flexcod...@yahoogro
 mailto:flexcoders%40yahoogroups.comflexcoders%2540yahoogroups.com
 ups.com

  Subject: [flexcoders

[flexcoders] FlowBox Nesting

2009-05-12 Thread Mike Oliver

I am trying to create a screen with a grid and a toolbar on top of it.

The problem is that the toolbar can have more user selectable controls in it
than will fit on small screens.

So I wanted to use the FlowBox and that works great but only if I allow for
the space between the Flowbox and the grid control under it.

I wanted the grid control to float under the toolbar and if the toolbar /
flowbox gets reduced in width to wrap a control down into a second row the
grid would slide down to accommodate.

So I thought a flowbox with a flowbox and the grid control in it but the
nested flowbox and grid won't fill the parent flow box with width=100% 

I have tried TileList and VBox and have yet to find the combination that
will allow the grid to float under the FlowBox.
-- 
View this message in context: 
http://www.nabble.com/FlowBox-Nesting-tp23506408p23506408.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] FlowBox Nesting

2009-05-12 Thread Mike Oliver

I said that I tried a VBox and that did NOT give me what I want, 

Here is the mxml 

mx:VBox x=10 y=42 height=650 width=100%

ns1:FlowBox width=100%  paddingBottom=10 paddingLeft=10
paddingRight=10 paddingTop=10 left=10
mx:ComboBox/mx:ComboBox
mx:DateField/
mx:Button label=Save/
mx:Button label=Add/
mx:Button label=Cancel/
mx:HSlider/
/ns1:FlowBox
mx:DataGrid height=100% width=100% left=0
mx:columns
mx:DataGridColumn headerText=Column 1 
dataField=col1/
mx:DataGridColumn headerText=Column 2 
dataField=col2/
mx:DataGridColumn headerText=Column 3 
dataField=col3/
/mx:columns
/mx:DataGrid
/mx:VBox

and I attached the swf and here is a screen shot.

http://www.nabble.com/file/p23513102/ToolbarDemo.swf ToolbarDemo.swf 

Now note that the space between the flowbox and the grid is what I want to
eliminate.

http://www.nabble.com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jpg 



Tracy Spratt-2 wrote:
 
 Plain old VBox will do this for you.  Set the lower grid height to 100%
 and
 it should resize dynamically to fit (If the VBox has a fixed height)  If
 the
 VBox height is not set then its container will show scrollbars
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mike Oliver
 Sent: Tuesday, May 12, 2009 12:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] FlowBox Nesting
 
  
 
 
 
 
 
 
 
 I am trying to create a screen with a grid and a toolbar on top of it.
 
 The problem is that the toolbar can have more user selectable controls in
 it
 than will fit on small screens.
 
 So I wanted to use the FlowBox and that works great but only if I allow
 for
 the space between the Flowbox and the grid control under it.
 
 I wanted the grid control to float under the toolbar and if the toolbar /
 flowbox gets reduced in width to wrap a control down into a second row the
 grid would slide down to accommodate.
 
 So I thought a flowbox with a flowbox and the grid control in it but the
 nested flowbox and grid won't fill the parent flow box with width=100% 
 
 I have tried TileList and VBox and have yet to find the combination that
 will allow the grid to float under the FlowBox.
 -- 
 View this message in context: http://www.nabble.
 http://www.nabble.com/FlowBox-Nesting-tp23506408p23506408.html
 com/FlowBox-Nesting-tp23506408p23506408.html
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/FlowBox-Nesting-tp23506408p23513102.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] FlowBox Nesting

2009-05-12 Thread Mike Oliver

Yes its the flow box see attached.

http://www.nabble.com/file/p23513630/ToolbarDemo.swf ToolbarDemo.swf 

It looks like the flow box calculates its height based on all components
wrapping.

Ollie


Tracy Spratt-2 wrote:
 
 Is it the FlowBox that is causing the problem?  What happens if you
 replace
 it with an HBox?  Do you still get that space?  Can you put a border or
 background on the FlowBox to see if it is causing the layout issue?
 
  
 
 Something is confusing the layout.  The space between items in a VBox
 should
 be only the verticalGap.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mike Oliver
 Sent: Tuesday, May 12, 2009 8:13 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] FlowBox Nesting
 
  
 
 
 
 
 
 
 
 I said that I tried a VBox and that did NOT give me what I want, 
 
 Here is the mxml 
 
 mx:VBox x=10 y=42 height=650 width=100%
 
 ns1:FlowBox width=100% paddingBottom=10 paddingLeft=10
 paddingRight=10 paddingTop=10 left=10
 mx:ComboBox/mx:ComboBox
 mx:DateField/
 mx:Button label=Save/
 mx:Button label=Add/
 mx:Button label=Cancel/
 mx:HSlider/
 /ns1:FlowBox
 mx:DataGrid height=100% width=100% left=0
 mx:columns
 mx:DataGridColumn headerText=Column 1 dataField=col1/
 mx:DataGridColumn headerText=Column 2 dataField=col2/
 mx:DataGridColumn headerText=Column 3 dataField=col3/
 /mx:columns
 /mx:DataGrid
 /mx:VBox
 
 and I attached the swf and here is a screen shot.
 
 http://www.nabble. http://www.nabble.com/file/p23513102/ToolbarDemo.swf
 com/file/p23513102/ToolbarDemo.swf ToolbarDemo.swf 
 
 Now note that the space between the flowbox and the grid is what I want to
 eliminate.
 
 http://www.nabble.
 http://www.nabble.com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jp
 g com/file/p23513102/ScreenHunter_28%2BMay.%2B12%2B17.09.jpg 
 
 Tracy Spratt-2 wrote:
 
 Plain old VBox will do this for you. Set the lower grid height to 100%
 and
 it should resize dynamically to fit (If the VBox has a fixed height) If
 the
 VBox height is not set then its container will show scrollbars
 
 
 
 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 Mike Oliver
 Sent: Tuesday, May 12, 2009 12:55 PM
 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 Subject: [flexcoders] FlowBox Nesting
 
 
 
 
 
 
 
 
 
 I am trying to create a screen with a grid and a toolbar on top of it.
 
 The problem is that the toolbar can have more user selectable controls in
 it
 than will fit on small screens.
 
 So I wanted to use the FlowBox and that works great but only if I allow
 for
 the space between the Flowbox and the grid control under it.
 
 I wanted the grid control to float under the toolbar and if the toolbar /
 flowbox gets reduced in width to wrap a control down into a second row
 the
 grid would slide down to accommodate.
 
 So I thought a flowbox with a flowbox and the grid control in it but the
 nested flowbox and grid won't fill the parent flow box with width=100% 
 
 I have tried TileList and VBox and have yet to find the combination that
 will allow the grid to float under the FlowBox.
 -- 
 View this message in context: http://www.nabble.
 http://www.nabble.
 http://www.nabble.com/FlowBox-Nesting-tp23506408p23506408.html
 com/FlowBox-Nesting-tp23506408p23506408.html
 com/FlowBox-Nesting-tp23506408p23506408.html
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 
 
 
 
 -- 
 View this message in context: http://www.nabble.
 http://www.nabble.com/FlowBox-Nesting-tp23506408p23513102.html
 com/FlowBox-Nesting-tp23506408p23513102.html
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/FlowBox-Nesting-tp23506408p23513630.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] session pooling with Flex/SQLServer w/o ColdFusion?

2009-05-09 Thread Mike Chabot
If that tool is single threaded then don't use it since that would be
a significant downside. Instead, use a programming language like PHP,
Java, .NET, or ColdFusion.

-Mike Chabot

On Sat, May 9, 2009 at 4:28 AM, Mic chigwel...@yahoo.com wrote:


 All of our business logic is within stored procedures so we do not need
 ColdFusion logic. We bought one of the Flex webservices (FlexSQL) to get
 started, but this is single-threaded. Is it possible to create a pool of
 webservices? Not sure how how one would bundle them as they would have no
 knowledge of each other. Any ideas greatly appreciated.

 Mic.


[flexcoders] fyi : FlashCamp San Francisco : Flex 4, Flash Catalyst, Flex Builder

2009-05-05 Thread Mike Chambers
Just a quick heads up...

We just announced that we will be holding a free FlashCamp at the  
Adobe San Francisco office on Friday, May 29th. The camp will focus on  
the next generation of Flex, including Flex 4, Flex Builder and Flash  
Catalyst.

You can find more information here:

http://www.mikechambers.com/blog/2009/05/05/flashcamp-san-francisco-may-29th-flex-4-flash-catalyst-flex-builder-4/

and register here:

http://flashcampsf.eventbrite.com/

Feel free to ping me directly if you have any questions...

mike chambers

m...@adobe.com




[flexcoders] Tradeoffs

2009-04-18 Thread Mike Oliver

What are the tradeoffs between creating a flex project with the J2EE type vs
None type?

The J2EE type is about 10% larger from what I can tell, but the None type
seems to work just fine in the browser.

If we start with None type, and then add ActionScript calls to the Remote
interface it seems to work just fine, but I wonder about performance.
-- 
View this message in context: 
http://www.nabble.com/Tradeoffs-tp23114437p23114437.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Question about accessing Flex from Java

2009-04-06 Thread Mike Foley
Hi,

I have a question about accessing Flex from Java.

Some context:  I am writing automated JUnit integration tests that will call 
the remote objects in the Flex application that is under test.  We also have 
Junit unit tests  and will have automated Flex GUI tests ... but this 
question is specifically about the integration tests that I want to write in 
Java with JUnit to call the remote objects.

I have a simple integration test that accesses the application:

 AMFConnection myamfConnection = new AMFConnection();


And I *think* it will be easy enough to call the remote objects.  But first, I 
need to login or authenticate ...and I am puzzled.  

The Flex application under test uses ChannelSets ... and this is specifically 
where I am puzzled.  I am having trouble figuring out how to login, 
authenticate, or otherwise create the ChannelSet   from a Java client.   

So this is my question  how to access and authenicate with a Flex 
application from a Java client?

Any advice or code snippets is much appreciated.

Thanks!

Michael Foley   



[flexcoders] Loading properties files at runtime

2009-02-12 Thread Mike Chang
Hi,
Is it possible to localize Flex application in a way that properties file
can be loaded at runtime? I know they can be made into resource modules, but
I want to avoid compiling those too.

Thanks,
Mike


Re: [flexcoders] DataGrid mouseover

2009-02-06 Thread Mike Chang
Thanks. I don't understand why it would be disabled because of itemrenderer
though.
My item renderer looks like -

mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
verticalAlign=middle
height=33

mx:Script
![CDATA[

override public function set data(val:Object):void {
myLabel.text = val.Location;
}
]]
/mx:Script

mx:Label id=myLabel

/mx:Label
/mx:VBox

On Tue, Feb 3, 2009 at 7:24 AM, Alex Harui aha...@adobe.com wrote:

Debug into mouseEventToItemRenderer and see why it doesn't return the
 correct renderer



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Mike Chang
 *Sent:* Monday, February 02, 2009 12:47 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] DataGrid mouseover



 I have a data grid, and one of the columns I used ItemRenderer to have a
 vbox and an image inside as a button.
 Everything looks good except the entire column where that ItemRenderer is
 used does not invoke the same mouseover events as the other columns. The
 mouseover event I was looking for is highlighting the row on mouseover and
 selection (with a darker hue).
 How do I get the column to do mouseover again for the whole row?

 Thanks in advance.

   



RE: [flexcoders] Server Side Cache and AMF

2009-02-04 Thread Mike Oliver

Excellent, thanks.

Ollie

Seth Hodgson wrote:
 
 Flash Player and AIR send AMF requests in the body of HTTP POST requests.
 The POST method (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html -
 section 9.5) is technically not cacheable by HTTP components (proxies,
 browsers, etc.) unless the AMF endpoint explicitly enables this by setting
 necessary HTTP response headers to allow caching. I think in general, AMF
 endpoints do the opposite and set response headers to explicitly disallow
 caching to deal with old buggy proxies that cache things they shouldn't.
 
 Because your Flex app is running in a stateful client, the need for
 caching along the network path is reduced. Your app can hang onto data
 from the server as long as you think is prudent, and it can fetch more or
 refresh existing data as needed. Traditional web apps on the other hand
 often end up triggering many duplicate requests as the user navigates
 forward and back through pages, so caching along the network path is
 essential to protect your servers from inadvertent DoS attacks :)
 
 Best,
 Seth
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mike Oliver
 Sent: Sunday, January 11, 2009 4:26 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Server Side Cache and AMF
 
 
 What are the pros and cons to using a serverside cache or proxy cache with
 Flex and AMF?
 
 I can see a cache on a web service that is primarily a lookup service, but
 don't see much if any benefit to a cache related to transactions, and for
 lookup, except for really large data sets I think a client side
 actionscript
 object will be every bit as effective, and for really large data sets you
 don't want to fetch more than you need anyway so a cache won't do much
 there
 either.
 
 I think server side cache is best for pages of information like HTML
 pages,
 XML documents, JSP pages where the content is keyed in the cache by the
 URL
 for the GET, and anything else is a waste of effort or worse due to stale
 data in the cache.
 
 But what do I know? If I knew everything I wouldn't ask. 
 
 

-- 
View this message in context: 
http://www.nabble.com/Server-Side-Cache-and-AMF-tp21406354p21844883.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] DataGrid mouseover

2009-02-02 Thread Mike Chang
I have a data grid, and one of the columns I used ItemRenderer to have a
vbox and an image inside as a button.
Everything looks good except the entire column where that ItemRenderer is
used does not invoke the same mouseover events as the other columns. The
mouseover event I was looking for is highlighting the row on mouseover and
selection (with a darker hue).
How do I get the column to do mouseover again for the whole row?

Thanks in advance.


[flexcoders] Re: Best way to toggle elements in ArrayCollections

2009-01-27 Thread Mike

Jason,

I'm doing something similar with checkboxes and the DataGrid.
Are you able to turn the visibility of your component on/off ?

Rather than modify the dataset,  you may be able to use a checkbox event
to trigger the visibility change of your display component.

~Mike


--- In flexcoders@yahoogroups.com, Merrill, Jason jason.merr...@...
wrote:

 So in my Flex 3 project I have an ArrayCollection, like this:

 [Bindable]
 private var myDataProvider:ArrayCollection = new ArrayCollection(
  [
   {country:Apple, quantity:5},
   {country:Pear, quantity:3},
   {country:Banana, quantity:7},
  ]);

 This is the dataprovider for another visual component (this is not the
 actual data, I've simplified it for the sake of clarity in asking this
 question).  I have some checkboxes that I want to use to toggle
elements
 in and out of the arrayCollection, thus changing what's shown in the
 visual component which is bound by databinding.  I thought about just
 having a visual property in the dataprovider, but then found out I
 cannot access display list items in this third party chart component I
 am using, so the only way to change what is shown in the chart
component
 is to change what's contained in the array collection.

 My question is, while I can think of ways to do this (adding and
 removing elements in the ArrayCollection), but they all involve some
 pretty ugly Actionscript.   Is there a good way to handle this, but
keep
 my data intact?  How would you use checkboxes to toggle data in and
out
 of the ArrayCollection elegantly?

 Thanks,

 Jason Merrill
 Bank of America   Picture (Device Independent Bitmap)
 Instructional Technology  Media   *   GCIB  Staff Support LLD

 Interested in Flash Platform technologies?  Join the Bank of America
 Flash Platform Developer Community

blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.as
 px
 Interested in innovative ideas in Learning?  Check out the 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 .





[flexcoders] Flash Detection

2009-01-21 Thread Mike Chang
Hi,

I have a program which has a normal desktop setup (installshield). After
install and on launch it launches an IE window and inside it's Flex.
Now I want to require minimum version of 10, but it's breaking my program
using javascript detection as in
http://www.adobe.com/products/flashplayer/download/detection_kit/.

My question is, is it possible to detect version of Flash not through the
browser? I want to be able to read some registry.
Otherwise, can I bypass the automatic detection and upgrade mechanism by any
chance? I'm having major problem with the way Adobe is doing it, which is
upgrading, closing the window, and relaunching the same page.
Can I detect that it's less than 10, than just give user a link (redirect to
some other page), without going through how Adobe upgrades inside the
browser?

Thanks,

Mike


[flexcoders] DateField JDBC

2009-01-21 Thread Mike Oliver

It seems odd or even cumbersome to tie the DateField control through to a
Date column in a JDBC database using the text property of the DateField. 
The format out of the DateField doesn't match the format for a JDBC date so
you must reformat the 01/21/2009 to 2009-01-21.  That's not so tough,
but it seems odd that there isn't a method to get the right format string
out of the control.  The selectedDate is ok, but if you are using a REST
interface, then you need to convert that to a string...shouldn't controls be
created to serve the most common implementations and isn't backing a form
with JDBC one of if not the most common implementation?
-- 
View this message in context: 
http://www.nabble.com/DateField-JDBC-tp21593640p21593640.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] String encoding comparison

2009-01-15 Thread Mike Chang
I need to do this comparison:
if (string a == string b)

a is hi
and b is also hi, but extracted from an XML file that has characters in
other encoding (shift-JIS, japanese to be exact).
this statement comes back false in Flex, which is not what I want.
the statement comes back true if the XML file has complete ascii in it.

so I'm guessing the byte representation of hi is different because the XML
parsing engine sees there are some other characters in shift JIS and assumes
hi is in that encoding as well.

how do I convert it back so I can compare to the actual string hi.


thanks


[flexcoders] Server Side Cache and AMF

2009-01-11 Thread Mike Oliver

What are the pros and cons to using a serverside cache or proxy cache with
Flex and AMF?

I can see a cache on a web service that is primarily a lookup service, but
don't see much if any benefit to a cache related to transactions, and for
lookup, except for really large data sets I think a client side actionscript
object will be every bit as effective, and for really large data sets you
don't want to fetch more than you need anyway so a cache won't do much there
either.

I think server side cache is best for pages of information like HTML pages,
XML documents, JSP pages where the content is keyed in the cache by the URL
for the GET, and anything else is a waste of effort or worse due to stale
data in the cache.

But what do I know?  If I knew everything I wouldn't ask.
-- 
View this message in context: 
http://www.nabble.com/Server-Side-Cache-and-AMF-tp21406354p21406354.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] itemRenderer ComboBox

2009-01-03 Thread Mike Oliver

Yes that's what it takes, thanks!  

I used an itemRenderer to set the display to the label from the lookup
source for the data that was stored.  


Manish Jethani wrote:
 
 Here's what I suggest:
 
   /* in your item editor */
   public function get myCustomProperty():Object
   {
 var item:Object = selectedItem;
 if (item == null)
   return null;
 
 return item.data;
   }
 
   DataGridColumn editorDataField=myCustomProperty ... /
 
 Manish
 
 -- 
 http://manishjethani.com
 
 

-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21266561.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] Where did my CurrentTarget go?

2009-01-03 Thread Mike Oliver


e.currentTarget.itemEditorInstance shows in the debugger variables one time,
and not the next on the same event handler.

It shows NOW but wend on a holiday vacation.  I don't THINK it was the
eggnog.

Ollie


Tracy Spratt wrote:
 
 How do you know it is gone, and what do you mean by gone?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Mike Oliver
 Sent: Thursday, January 01, 2009 8:19 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Where did my CurrentTarget go?
 
  
 
 
 I have a ComboBox as a ItemEditor and a listener
 
 dataGrid.addEventListener(DataGridEvent.ITEM_EDIT_END, editCellEnd);
 
 I was using 
 
 e.currentTarget.itemEditorInstance.selectedItem.value
 
 to get at a value in the selectedItem
 
 now I am still getting that event, but no currentTarget element?
 
 what would cause it to go away?
 
 -- 
 View this message in context:
 http://www.nabble.com/Where-did-my-CurrentTarget-go--tp21246831p21246831
 .html
 http://www.nabble.com/Where-did-my-CurrentTarget-go--tp21246831p2124683
 1.html 
 Sent from the FlexCoders mailing list archive at Nabble.com.
 
  
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Where-did-my-CurrentTarget-go--tp21246831p21266783.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] itemRenderer ComboBox

2009-01-02 Thread Mike Oliver

Ok, so the itemEditor = ComboBox with the above Override and here it is as it
stands and works (up to a point).

mx:DataGridColumn headerText=Reason Stopped
dataField=reason_med_stopped_oidCol
editorDataField=selectedItem
mx:itemEditor
mx:Component
mx:ComboBox editable=true labelField=label 
mx:ArrayCollection
 mx:Object label=Patient Died 
data=130/
 mx:Object label=Maximum dosage 
data=131/
 mx:Object label=Consulting Decision 
data=132/
  /mx:ArrayCollection
mx:Script
![CDATA[
import 
mx.collections.IViewCursor;

override public function set 
data(value:Object):void
   {
  super.data = value;

  var 
listCursor:IViewCursor = collection.createCursor();
  do
  {
 if 
(data.reason_med_stopped_oidCol ==
listCursor.current.data)
 {
 selectedItem = 
listCursor.current;
 break;
}
  }
  while 
(listCursor.moveNext());
}
]]
/mx:Script
/mx:ComboBox

/mx:Component
/mx:itemEditor
/mx:DataGridColumn

Now this works perfectly now when I click in the Cell the ComboBox opens
with the selectedItem and when I select an option and exit the Cell the
DataGridEvent.ITEM_EDIT_END fires and I extract the data value to insert
into the parameters with

parameters[dsFieldName.substr(0,dsFieldName.length-3)] =
e.currentTarget.itemEditorInstance.selectedItem.data;

and that saves to the database, all great...however, the 

editorDataField=selectedItem puts [object Object] into the Grid instead
of the data element.  

I tried editorDataField=selectedItem.data but that fails.  I tried value
and text but it saves the Label.

So what do I put in the editorDataField to save the 'data' to the Grid
instead of the object string or the label?


-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21255448.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] itemRenderer ComboBox

2009-01-02 Thread Mike Oliver

Perhaps its because it is an itemEditor, but just tried it and value in the
editorDataField saves the label string to the Grid, not the 'data' element.

Ollie


Manish Jethani wrote:
 
 On Sat, Jan 3, 2009 at 12:16 AM, Mike Oliver moli...@corenttech.com
 wrote:
 
 [snip]
 and that saves to the database, all great...however, the

 editorDataField=selectedItem puts [object Object] into the Grid
 instead
 of the data element.

 I tried editorDataField=selectedItem.data but that fails.  I tried
 value
 and text but it saves the Label.

 So what do I put in the editorDataField to save the 'data' to the Grid
 instead of the object string or the label?
 
 Strange. Setting editorDataField to 'value' should work if you have a
 field called 'data' in the selected item and that's the value you're
 looking for.
 
 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   xmlns=* 
 
   mx:TextInput text={cb.value} /
 
   mx:ComboBox labelField=l id=cb
 mx:dataProvider
   mx:Object l=foo data=1 /
   mx:Object l=bar data=2 /
 /mx:dataProvider
   /mx:ComboBox
 
 /mx:Application
 
 Manish
 
 -- 
 http://manishjethani.com
 
 

-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21256481.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] itemRenderer ComboBox

2009-01-01 Thread Mike Oliver

I want to use a ComboBox as an itemRenderer and itemEditor.

here is the 

mx:DataGridColumn headerText=Route dataField=med_route_oidCol
editable=true editorDataField=text rendererIsEditor=true
mx:itemRenderer
mx:Component
mx:ComboBox editable=true labelField=label 
mx:ArrayCollection
 mx:Object label=IV text=101/
 mx:Object label=DRIP text=102/
 mx:Object label=BOLUS text=103/
  /mx:ArrayCollection
/mx:ComboBox
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn

I am using the dataGrid.addEventListener(DataGridEvent.ITEM_EDIT_END,
editCellEnd);

to extract the text value on the selectedItem to store in the db with 

e.currentTarget.itemEditorInstance.selectedItem.text

But on display the value saved to the db is one of the text values above,
but the itemRenderer combobox doesn't display the associated label.

What am I missing?




-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21243094.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] itemRenderer ComboBox

2009-01-01 Thread Mike Oliver

it looks to me like it is better to use a label function to render the
display value and leave the combo box for itemEditor.

That still leaves the question on how the ComboBox will display the Option
Label when in edit mode.


-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21245495.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] itemRenderer ComboBox

2009-01-01 Thread Mike Oliver

Thanks, so this script would go within the 

mx:ComboBox...

/mx:ComboBox

Right?


Manish Jethani wrote:
 
 On Fri, Jan 2, 2009 at 3:59 AM, Mike Oliver moli...@corenttech.com
 wrote:
 
 it looks to me like it is better to use a label function to render the
 display value and leave the combo box for itemEditor.

 That still leaves the question on how the ComboBox will display the
 Option
 Label when in edit mode.
 
 The ComboBox won't select the item based on the value of the 'text'
 property, so you'll have to do the selection for it, by overriding the
 data setter.
 
   override public function set data(value:Object):void
 {
   super.data = value;
 
   var listCursor:IViewCursor = collection.createCursor();
   do
   {
 if (data.med_route_oidCol == listCursor.current.text)
 {
   selectedItem = listCursor.current;
   break;
 }
   }
   while (listCursor.moveNext());
   }
 
 Manish
 
 

-- 
View this message in context: 
http://www.nabble.com/itemRenderer-ComboBox-tp21243094p21246607.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Where did my CurrentTarget go?

2009-01-01 Thread Mike Oliver

I have a ComboBox as a ItemEditor and a listener

 dataGrid.addEventListener(DataGridEvent.ITEM_EDIT_END, editCellEnd);

I was using 

e.currentTarget.itemEditorInstance.selectedItem.value

to get at a value in the selectedItem

now I am still getting that event, but no currentTarget element?

what would cause it to go away?

-- 
View this message in context: 
http://www.nabble.com/Where-did-my-CurrentTarget-go--tp21246831p21246831.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: mxmlc | Java heap space + maven

2008-12-30 Thread Mike
In case anyone has this issue using Maven,  try setting environment 
variable MAVEN_OPTS=-Xmx512 

--- In flexcoders@yahoogroups.com, ivo cervantes_v...@... wrote:

 Hi,
 
 This has come up before. You need to increase the memory available 
to Java and Ant. Search the archives for ANT_OPTS
 
 - Ivo
 
 
 
 
 
 From: ilikeflex ilikef...@...
 To: flexcoders@yahoogroups.com
 Sent: Monday, December 29, 2008 1:26:26 PM
 Subject: [flexcoders] mxmlc  | Java heap space
 
 
 Hi
 I am compiling the module and i get the error below
 Error: Java heap space
 java.lang.OutOfMemo ryError: Java heap space
 Any pointer?
 targetname=compileNavigation mxmlcfile=${navigation. src}
\NavigationM odule.mxml failonerror=true output=${navigation. 
output} fork=true 
 compiler.include- librariesdir=${navigation. lib} append=true 
 includename=VisualGraph. swc/
 /compiler.include- libraries
 compiler.include- librariesdir=${sowLibrary. lib} append=true
 includename=ria_msflexlib_ flex3.swc/
 includename=Cairngorm.swc/
 /compiler.include- libraries
 compiler.include- librariesdir=${sowLibrary. bin} append=true
 includename=sowLibrary.swc/
 /compiler.include- libraries
 /mxmlc
 /target
  
 Thanks
 ilikeflex





Re: [flexcoders] MySql timestamp column type and Flex DateField

2008-12-29 Thread Mike Oliver

I had to format the string from ActionScript to pass to the Value Object as
follows.

var eDate:Date = Event_DateCol.selectedDate;
var event_Date:String = String(eDate.getFullYear()) + - + 
 String(eDate.getMonth()+1) + - +   
 String(eDate.getDate()) +  00:00:00.0;
 var parameters:* = 
{
method: Insert, Event_Date: event_Date,...,   
};

then in the VO

public void setEvent_Date(String Event_Date)
{
if ((Event_Date != null)  (Event_Date.length()  0))
{
this.Event_Date = Timestamp.valueOf(Event_Date);
}
}

I hope this helps someone else.



Mike Oliver wrote:
 
 How do I tie a DateField control to a Value Object with a Timestamp column
 in the database.
 
 

-- 
View this message in context: 
http://www.nabble.com/MySql-timestamp-column-type-and-Flex-DateField-tp21196170p21209213.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] MySql timestamp column type and Flex DateField

2008-12-28 Thread Mike Oliver

How do I tie a DateField control to a Value Object with a Timestamp column in
the database.

I am getting 


java.lang.IllegalArgumentException: Timestamp format must be -mm-dd
hh:mm:ss.f
at java.sql.Timestamp.valueOf(Unknown Source)
at com.corent.odicx.goms.dao.OrdersVO.setEvent_Date(OrdersVO.java:93)

the DateField format string only modifies the display.

the selectedDate output doesn't seem to have any methods that take a format
string to format for Timestamp.

I suppose I could just pull the year month and day out of the selected date
and format my own string but that seems like a waste and I am basically
lazy.

anybody have  a cool way to handle this?

Ollie
-- 
View this message in context: 
http://www.nabble.com/MySql-timestamp-column-type-and-Flex-DateField-tp21196170p21196170.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] PFolder vs. Folder

2008-12-17 Thread Mike Oliver

I cannot find documentation on the List Controls member elements folder and
pfolder.  I see them everywhere in the examples but noplace can I find the
explanation of the difference, where would I use folder vs. pfolder and why?
-- 
View this message in context: 
http://www.nabble.com/PFolder-vs.-Folder-tp21058508p21058508.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] FlexBuilder on 64bit machine any good?

2008-12-15 Thread Mike Anderson
I've had pretty good luck with it so far -

I have it running on 3 different laptops and 1 desktop PC - ALL are
64-bit Operating Systems.  I should say that 2 machines are running
Vista x64 and 2 are running XP x64 Edition.

One weird part when running on Vista (if you are using ColdFusion) is
configuring IIS - it's fairly involved and can be frustrating.  Lots of
articles on the net though regarding how to set it up.  One cool thing
too, is Adobe has a 64-bit version of ColdFusion - so it takes advantage
of all the RAM.  My laptops are all limited to 4 gigs of RAM, but my
desktop has 8 gigs.  I am still using my previous FlexBuilder.ini file,
which of course specifies all the RAM preferences.

As far as I know (at least in my case) FlexBuilder and/or Eclipse is
still only 32-bit, so they are still bound to the 32-bit limitations.

Overall - I had good luck with it.

Mike

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ralf Bokelberg
Sent: Monday, December 15, 2008 2:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FlexBuilder on 64bit machine any good?

Hi guys

I'm in the process of choosing a new machine to be placed under my
christmas tree :). I wonder, if anybody has some experiences with 64 bit
machines and FlexBuilder? Does it run at all? What is the performance
like? Does it make use of lots of RAM?

Cheers
Ralf.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
1e62079f6847
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links





Re: [flexcoders] Command Proxy

2008-12-15 Thread Mike Chambers
You can still use a command proxy architecture with Adobe AIR 1.5 in  
the same way you could use it with previous versions of Adobe AIR.

It is just a proof of concept, so I havent really done any additional  
work on it (besisde, c# / .net development is not much fun on Mac).

You can grab the source from here:

http://code.google.com/p/commandproxy/

and find more info here:

http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integration-proof-of-concept/

Does that answer your question?

mike chambers

m...@adobe.com

On Dec 15, 2008, at 7:38 AM, flexaustin wrote:

 I asked this in an earlier post, but hoping Alex can ask Mike Chambers
 about the status of the Apollo + Command Proxy project he started.
 Does anyone know if Command Proxy access is available in Adobe AIR?

 When Mike created his project he said that he had hopes for command
 proxy access, when AIR 1.5 came out. Do we have this access yet?




[flexcoders] help me settle an argument

2008-12-08 Thread Mike Oliver

I have a colleague that is of the opinion that SQL statements in Java Code
such as DAO classes is bad practice, that the SQL statements and parameter
tokens be externalized into Contants or property files.  I maintain that is
not only not necessary in general but given our loosely coupled service
oriented architecture the classes are largely not in any sort of complex
dependency so modifying code doesn't have the ripples of monolithic desktop
or client server applications.

So while it is true you can change the SQL statement if needed without
changing the code and even change syntax if you need to change databases,
how often does that happen anyway?  And how often do you change the SQL
without having to change the classes?

I look at DAO classes from Adobe Labs and Sun Microsystems and see SQL
statements in the code so I figure if it is good enough for them it is good
enough for us.

What say you all?
-- 
View this message in context: 
http://www.nabble.com/help-me-settle-an-argument-tp20876256p20876256.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Modules and Sessions

2008-12-01 Thread Mike Oliver

We are planning on the following organization for an Application.

Base Application this will contain a scalable application with a canvas and
an Toolbar across the top.

The Application will be secured by user login in a popup form window.

The tool bar buttons will load modules in the canvas from separate Module
WebApps for ease of Maintenance and flexibility.

Before we get too far I wanted to ask this group if there are any gotchas
in our plan?  

Specifically, are we correct that the user session is based on that base
application and any modules that load will consistently use the user session
in the base application?

Are there any coding practices we need for the AMF in this model?

We assume the modules and the actionscript for those modules carry the user
session the same as if the module was loaded from the same root path as the
Base Application, right?

Just being cautious.

Ollie
-- 
View this message in context: 
http://www.nabble.com/Modules-and-Sessions-tp20774760p20774760.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Flex 3 - Export to Microsoft Excel?

2008-12-01 Thread Mike Chabot
If you send the data to the server, create the Excel file there, then
send the result back to Flex, you will have the full power of the
numerous server-side Excel file creation methods at your disposal. If
you want the chart in Excel to look the same as it looks in Flex then
you might have to convert it to a bitmap first. Either that or
recreate the chart on the server. If all you need is a simple
copy/paste solution, then the method Paul mentioned would be easier to
implement.

-Mike Chabot

On Mon, Dec 1, 2008 at 1:13 PM, sailorsea21 [EMAIL PROTECTED] wrote:
 Hi everyone, is it possible to export to Excel?

 If I have a chart or a datagrid, is it possible to export it to
 Microsoft Excel?

 Thanks.

 -David.

 


[flexcoders] Help! - Creating MS Access data source using ColdFusion 8 (64-Bit) w/Win2k3 (64-Bit)

2008-11-28 Thread Mike Anderson
Greetings All -

I am currently moving my Flex Application (which uses ColdFusion as the
backend) to my customer's production server - and I am coming to grips
with a frightening discovery: Microsoft has decided to drop JET support,
for servers running in 64-Bit mode.

For some reason, this also translates to ADOBE not providing a native
Access ODBC Driver in ColdFusion 8 (64-Bit Edition).

I understand that there comes a time in the software business, where we
must abandon older technologies in favor of new.  However, there is
usually some advanced notice given, in addition to backwards
compatibility options for people that simply can't conform to the new
ways.

As a company, WE have upgraded all of OUR servers  software, to the
latest technologies.  But that doesn't change the fact that we have
CUSTOMERS that provide data to us, using virtually the only portable
Database format available (an Access .MDB file).

I know this is the FlexCoders list and this is largely a ColdFusion
question, but I can only assume that a large number of you have been
faced with this problem  it makes sense to ask for help here.

With that said, has anybody come across any solutions, that would allow
for creating an Access data source using ColdFusion 8 running on Windows
2003 Server (in a 64-Bit environment across the board)?

If a solution isn't found on this, heads will fly around here - as huge
investments have been made in order to launch this Flex Application.

Thank you in advance for any information that could help shed some light
on this problem.

Mike


Re: [flexcoders] ArrayCollection

2008-11-14 Thread Mike Duncan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tracy Spratt wrote:
 
 
 The issue is that there is only one “lastResult” for the entire framework.
 
  
 
 “There is only one result” No, this is not correct. Because they are
 asynchronous, there can be multiple pending RPC data calls.  There is no
 assurance that the first RPC call is the first returned.

I guess I just have not developed large enough applications to see what
you are stating here. I normally create a HTTPService object then call
1-2 asynchronous calls depending on user interaction with the app.

 
  
 
 Between the time the result returns, lastResult is set, the result event
 is dispatched, calling your handler, and your handler gets to the line
 that uses lastResult, it is very possible that another result has
 returned, overwriting the value in lastResult.  Typically it is actually
 set to null by the framework, rather than sneaking in some other data,
 but that is just as dangerous.  This was a real issue in a thread six or
 eight months ago.

This all really depends on how you develop the application. I am not
saying you are wrong or stating something incorrectly, just that this
example is not relevant to most people creating small/medium apps. Most
people are doing good to even have a single HTTPService object within
their code.

 
  
 
 If you only call a single RPC at a time, there will be no problem, but
 complex apps often have many outstanding calls an a given moment.

Ah, I see. I appreciate the insight.

 
  
 
 Why take any risk?  Is there some reason you **like** lastResult over
 using the event.result object? 

I am not taking a side on anything really. I am just stating that in my
little experience, as well as documentation and other resources read,
that the lastResult-method is used by the vast majority. I personally
appreciate you explaining the lastResult vs. event.result methods.

 
  
 
 Tracy

Thanks Tracy.


Mike Duncan
ISSO, Application Security Specialist
Government Contractor with STG, Inc.
NOAA :: National Climatic Data Center
151 Patton Ave.
Asheville, NC 28801-5001
[EMAIL PROTECTED]
828.271.4289
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJHYjRnvIkv6fg9hYRAp70AJ9OmP12rFwDLt3kpaqnqQy5HUal4QCgh5M+
CQ/SARSS/VwHgD/bnClVvAQ=
=fwzL
-END PGP SIGNATURE-


Re: [flexcoders] ArrayCollection

2008-11-13 Thread Mike Duncan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


This is how I got around this...

- -
import mx.uils.ObjectProxy;
import mx.collections.ArrayCollection;

[Bindable] private scans:ArrayCollection;

private function handleGetScansResults(event:ResultEvent):void  {
  //Note: getScan is a HTTPService object.
  if(getScan.lastResult.vector.scan is ObjectProxy)  {
scans = new ArrayCollection([getScan.lastResult.vector.scan]);
  }else{
scans = getScan.lastResult.vector.scan as ArrayCollection;
  }
}
- -
(sorry for any word wrapping)

Dunno if someone else already suggested this, but I hope this helps.

Mike Duncan
ISSO, Application Security Specialist
Government Contractor with STG, Inc.
NOAA :: National Climatic Data Center
151 Patton Ave.
Asheville, NC 28801-5001
[EMAIL PROTECTED]
828.271.4289


jch92592 wrote:
 
 
 All,
 
 I am using an ArrayCollection that I populate with the results from a
 ColdFusion RPC.
 
 All works well when there is more than 1 record. When only 1 record is
 returned, the data is not assigned to the ArrayCollection.
 
 Any suggestions?
 
 Thank you,
 jh
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJHIiSnvIkv6fg9hYRAlGzAKCIblu06TZ3RwHX0CJg8QqRZrRIXACffhUh
DnnU2NWQAOl6jhcSwp03gMk=
=G5aj
-END PGP SIGNATURE-


Re: [flexcoders] ArrayCollection

2008-11-13 Thread Mike Duncan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


I am not quite sure by what you mean ...are not garrunteed that it will
have the value in the result you expect. There is only one result. And,
by dangerous, are you talking about a memory leak or something?

If there is a case when I get no results, then I can understand this
logic, but in my case, there is always at least one result. A single
child within the root element of the returned XML that is.

I appreciate the heads up though.

Mike Duncan
ISSO, Application Security Specialist
Government Contractor with STG, Inc.
NOAA :: National Climatic Data Center
151 Patton Ave.
Asheville, NC 28801-5001
[EMAIL PROTECTED]
828.271.4289


Tracy Spratt wrote:
 
 
 Mike,
 
 It is dangerous to use lastResult in this manner:
 
 scans = new ArrayCollection([getScan.lastResult.vector.scan]);
 
 You are not garrunteed that it will have the value in the result you expect.
 
 In most cases it will work ok but the correct way is:
 
 scans = new ArrayCollection([event.result.vector.scan]);
 
  
 
 lastResult is intended only for use in binding expressions.
 
  
 
 Tracy
 
  
 
 
 
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 *On Behalf Of *Mike Duncan
 *Sent:* Thursday, November 13, 2008 3:06 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] ArrayCollection
 
  
 
 This is how I got around this...
 
 -
 import mx.uils.ObjectProxy;
 import mx.collections.ArrayCollection;
 
 [Bindable] private scans:ArrayCollection;
 
 private function handleGetScansResults(event:ResultEvent):void {
 //Note: getScan is a HTTPService object.
 if(getScan.lastResult.vector.scan is ObjectProxy) {
 scans = new ArrayCollection([getScan.lastResult.vector.scan]);
 }else{
 scans = getScan.lastResult.vector.scan as ArrayCollection;
 }
 }
 -
 (sorry for any word wrapping)
 
 Dunno if someone else already suggested this, but I hope this helps.
 
 Mike Duncan
 ISSO, Application Security Specialist
 Government Contractor with STG, Inc.
 NOAA :: National Climatic Data Center
 151 Patton Ave.
 Asheville, NC 28801-5001
 [EMAIL PROTECTED] mailto:mike.duncan%40noaa.gov
 828.271.4289
 
 jch92592 wrote:
 
 
 All,
 
 I am using an ArrayCollection that I populate with the results from a
 ColdFusion RPC.
 
 All works well when there is more than 1 record. When only 1 record is
 returned, the data is not assigned to the ArrayCollection.
 
 Any suggestions?
 
 Thank you,
 jh
 
 


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFJHJsonvIkv6fg9hYRAi3+AJd4NApCYammCT/86WCi5lPQvChcAJ47p7Zr
YEc4klxZno0I7Je3Se73gw==
=MSe4
-END PGP SIGNATURE-


Re: [flexcoders] Flex3/AIR book recommendation?

2008-11-11 Thread Mike Chabot
Henry,
Training From the Source is a good first Flex book for most people.

-Mike Chabot

On Mon, Nov 10, 2008 at 8:00 PM, henryhokinhang [EMAIL PROTECTED] wrote:
 Flex3/AIR book recommendation? I searched on amazon but I don't know
 which one's good.


RE: [flexcoders] Binding problems after update to 3.1

2008-11-11 Thread Mike Pearce
It turns out many of my projects won't function under 3.1.

 

Is there some documentation as to whatever the fundamental changes were in
this update that are breaking my apps so as to avoid it in future?

 

Thanks,

Mike

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Pearce
Sent: Tuesday, November 11, 2008 3:43 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Binding problems after update to 3.0.1

 

After setting up FB to use the 3.0 SDK everything is fine again.

Would be interested to hear if anyone else has experienced this issue with
the 3.1 SDK.

Cheers,
Mike

-Original Message-
From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ]
On
Behalf Of Mike Pearce
Sent: Tuesday, November 11, 2008 2:52 PM
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Binding problems after update to 3.0.1

Hi all,

Anyone else run into issues after installing the 3.0.1 update?

Some simple bindings are no longer working in one of my projects.

If I compile on another machine that has not been updated, the project
works fine.

Anyone got any info on this? Or know how to uninstall the update?

Please don't tell me I have to completely uninstall flex and reinstall
it. Not happy.

Many thanks,

Mike

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.175 / Virus Database: 270.9.0/1779 - Release Date: 11/10/2008
7:53 AM

 

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.0/1779 - Release Date: 11/10/2008
7:53 AM



  1   2   3   4   5   6   7   8   >