[flexcoders] Controlling access to a Flex program...

2012-09-09 Thread Laurence
I have a Flex program that I only want users to be able to access if they're 
already inside a different Flex program I wrote, or inside a web-page on my 
server.

Is there a way, within that Flex program to which I want to restrict access, to 
tell the URL or server *from* which it was called?

In other words, If someone types 
http://www.mydomain.com/MyRestrictedFlexProgram.html directly into their 
browser, I want the program to tell the user they don't have access -- BUT if a 
different Flex program (or a web-page) on my server calls that URL, I want my 
restricted-access Flex program to go ahead and run normally...

Thanks for any help you can give me.
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Flex 4.6 Image Panning and Zooming

2012-07-02 Thread Laurence
I'm working with Flex 4.6, and I'm trying to allow a user to pan and zoom an 
image that's larger than the display-window...

I've found a couple of Pan|Zoom utilities (Adobe FIG Pan|Zoom and OpenZoom), 
but they're both written for versions of Flex that long pre-date Flex 4.6...

Anyone know where I can find information on how to do this in Flex 4.6?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA





[flexcoders] Libspark QRCodeReader library, mobile devices, Flex 4.6...

2012-06-06 Thread Laurence
Has anyone ever gotten the LibSpark QRCodeReader library to work with Flex 4.6 
on a mobile device?

The LibSpark library I'm talking about can be found here:
www.libspark.org/wiki/QRCodeReader/en

I'm trying to get this thing to work in Flex 4.6 as part of a mobile project, 
and when I run it on the desktop emulator, it seems to work fine...  But when I 
run it on the device itself, I get the following error on line 63 of the file 
AdaptiveThresholdFilter.as

Error #1010: A term is undefined and has no properties.

Now, I'm pretty certain this is being caused by the fact that said term should 
be imported from a file called adaptiveThreshold.pbj that is part of an Embed 
statement located earlier in the AdaptiveThresholdFilter.as file.  For whatever 
reason, said file is not being included in the package when I export the app to 
the device, and thus can't be found when I run the program on the device, and 
the app fails...

The Embed statement on line 40 looks like this:
[Embed(source=adaptiveThreshold.pbj, mimeType=application/octet-stream)]

So -- what I need is one of three things:
1) tell me how to force Flash Builder 4.6 to include that file in the packaging 
of the whole mobile app, or
2) tell me how to force Flash Builder 4.6 to actually embed the file within the 
program itself.  Is there something wrong about the above Embed statement that 
would be causing the app to look for the file during run-time? or
3) tell me I'm completely wrong in what I've assumed about this .pbj file 
embed-statement, and you've gotten this LibSpark QRCodeReader stuff to work on 
a mobile device, and you have source-code that I can look at.

Thanks for any help y'all can give,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Calculating width of a child BEFORE it's added...

2010-08-31 Thread Laurence
I wasn't clear before -- I don't know the width of the VBox beforehand.  I was 
trying to figure out the minimum width I could make the VBox before I actually 
make it.

But the measureText() method worked perfectly for me, thanks.

L.


--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
dorkiedorkfromdorkt...@... wrote:

 Example code,
 mx:VBox width=100%
 mx:Text width=100% /
 /mx:VBox
 
 If you need to truncateToFit the text you can use the truncateToFit
 property, more info...
 http://blog.flexexamples.com/2008/01/26/truncating-text-in-the-flex-label-control-using-the-truncatetofit-property/
 
 On Mon, Aug 30, 2010 at 12:06 AM, Alex Harui aha...@... wrote:
 
 
 
  For mx:Label, you can try using measureText() on the parent unless the
  label will have different styles that will affect measurement.  Then you'll
  have to add it and call validateNow() and call getExplicitOrMeasuredWidth().
 
  But why not use mx:Text?  Why do you have to get the width exactly?  If you
  stretch an mx:Text to the width of the Vbox it sounds like it would suit
  your needs.
 
 
 
  On 8/29/10 2:06 PM, Laurence lmacne...@... wrote:
 
 
 
 
 
 
  Using ActionScript, I want to add a Label to a VBox.  I know what text I
  want to put into the label (said text is read from an XML file), but of
  course, the program cannot know what the width of the label should be until
  after the text is read from that XML file.  I want the label to be as wide
  as it needs to be, but not wider than the vBox I'm adding it to -- if that
  label will need to be wider than the given amount to display all the text,
  then I want to add a TextArea (with word-wrap turned on) so I can display
  all the text in that given width.
 
  My question is, how do I calculate the width of a label I'll need, when
  given a string of text?  I do know the font-family and font-size the label
  will have.  Is there an easy way to go from a string of text to the width
  that a label will need to be to display that text?
 
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 
 
 
 
 
 
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui
 
   
 





[flexcoders] AIR and Printing...

2010-08-31 Thread Laurence
I could really use some major advice here.  We're so close to the finishing 
point on this project, and we're being held back by stupid printing problems...

We have to be able to print with no pop-up dialog boxes, and the choice of 
which printer to send the job to will be affected by the data (i.e. a client 
with reg-code X gets printed on printer-1 and a client with reg-code Y gets 
printed on printer-2.)

We have to automate this, because the temp-workers we hire can't be counted on 
to remember how do it correctly.

So...  Any ideas on how I can deal with this?  Should I dump Flash Player and 
switch to AIR?  Would that give me better control over the printing?  Can AIR 
actually do all that I'm asking for here?  What will switching to AIR mean for 
accessing our data from our ColdFusion/SQL server through https:, if anything?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA





[flexcoders] Re: AIR and Printing...

2010-08-31 Thread Laurence
The installation/authorization stuff I can deal with...  Not being able to 
control my print jobs properly, I can't deal with.

I can find surprisingly little information about printing in AIR -- it's almost 
like printing was an afterthought for Flex and AIR.

Exactly how much more control over printing does AIR give me?  Can it print 
everything without pop-ups?  Can it control which printer the app sends the 
print-job to -- again, without pop-ups?  Those are the two main things I need.

Thanks,
L.


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

 AIR does give more control over printing.   AIR requires installation, a 
 web-hosted app does not.  I don't know the security rules that well, but it 
 isn't clear how you prevent someone from installing the app and accessing 
 your server unless you require authentication first.
 
 
 On 8/31/10 1:10 PM, Laurence lmacne...@... wrote:
 
 
 
 
 
 
 I could really use some major advice here.  We're so close to the finishing 
 point on this project, and we're being held back by stupid printing 
 problems...
 
 We have to be able to print with no pop-up dialog boxes, and the choice of 
 which printer to send the job to will be affected by the data (i.e. a client 
 with reg-code X gets printed on printer-1 and a client with reg-code Y gets 
 printed on printer-2.)
 
 We have to automate this, because the temp-workers we hire can't be counted 
 on to remember how do it correctly.
 
 So...  Any ideas on how I can deal with this?  Should I dump Flash Player and 
 switch to AIR?  Would that give me better control over the printing?  Can AIR 
 actually do all that I'm asking for here?  What will switching to AIR mean 
 for accessing our data from our ColdFusion/SQL server through https:, if 
 anything?
 
 Thanks,
 Laurence MacNeill
 Mableton, Georgia, USA
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Re: AIR and Printing...

2010-08-31 Thread Laurence
It does seem, from reading that document, that you can choose the printer to 
send the print-job to, and set the parameters for that printer, and skip all 
the dialog boxes...  I'll have to play with that...  Thanks!

My next question, then, is accessing remote data -- my Flex app using the Flash 
Player has no problem calling a remote ColdFusion function to grab data from 
the SQL server, and send data back there...  How much does that change in AIR?  
Or is it pretty much the same thing?

L.

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

 I use this version of the doc: 
 http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/flash/printing/PrintJob.html
 
 There are lots of new printing features in AIR2.0 which may be why there 
 isn't a lot of searchable info.  The link I supplied implies that in AIR 2.0, 
 you set the PrintJob.printer property to a printer and call PrintJob.start2() 
 to skip the dialogs.  Not sure how it will work on all platforms so give it a 
 try.
 
 Plan B, I think, is to generate a bitmap of the page and upload it to a 
 server than can access the printer.  Can work for shared printers but not 
 local ones.
 
 
 On 8/31/10 3:05 PM, Laurence lmacne...@... wrote:
 
 
 
 
 
 
 The installation/authorization stuff I can deal with...  Not being able to 
 control my print jobs properly, I can't deal with.
 
 I can find surprisingly little information about printing in AIR -- it's 
 almost like printing was an afterthought for Flex and AIR.
 
 Exactly how much more control over printing does AIR give me?  Can it print 
 everything without pop-ups?  Can it control which printer the app sends the 
 print-job to -- again, without pop-ups?  Those are the two main things I need.
 
 Thanks,
 L.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
 Alex Harui aharui@ wrote:
 
  AIR does give more control over printing.   AIR requires installation, a 
  web-hosted app does not.  I don't know the security rules that well, but it 
  isn't clear how you prevent someone from installing the app and accessing 
  your server unless you require authentication first.
 
 
  On 8/31/10 1:10 PM, Laurence LMacNeill@ wrote:
 
 
 
 
 
 
  I could really use some major advice here.  We're so close to the finishing 
  point on this project, and we're being held back by stupid printing 
  problems...
 
  We have to be able to print with no pop-up dialog boxes, and the choice of 
  which printer to send the job to will be affected by the data (i.e. a 
  client with reg-code X gets printed on printer-1 and a client with reg-code 
  Y gets printed on printer-2.)
 
  We have to automate this, because the temp-workers we hire can't be counted 
  on to remember how do it correctly.
 
  So...  Any ideas on how I can deal with this?  Should I dump Flash Player 
  and switch to AIR?  Would that give me better control over the printing?  
  Can AIR actually do all that I'm asking for here?  What will switching to 
  AIR mean for accessing our data from our ColdFusion/SQL server through 
  https:, if anything?
 
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 
 
 
 
 
 
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui
 
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Calculating width of a child BEFORE it's added...

2010-08-29 Thread Laurence
Using ActionScript, I want to add a Label to a VBox.  I know what text I want 
to put into the label (said text is read from an XML file), but of course, the 
program cannot know what the width of the label should be until after the text 
is read from that XML file.  I want the label to be as wide as it needs to be, 
but not wider than the vBox I'm adding it to -- if that label will need to be 
wider than the given amount to display all the text, then I want to add a 
TextArea (with word-wrap turned on) so I can display all the text in that given 
width.

My question is, how do I calculate the width of a label I'll need, when given a 
string of text?  I do know the font-family and font-size the label will have.  
Is there an easy way to go from a string of text to the width that a label will 
need to be to display that text?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: HTTPService not updating...

2010-08-19 Thread Laurence
Yep, I guess it was getting cached...  I added the timestamp stuff that was in 
both of the responses here, and that took care of it -- fresh data every time.

Thanks!
L.


--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
dorkiedorkfromdorkt...@... wrote:

 it's prob accessing it from the cache.
 
 instead of this,
 url=reports/xml/{_reportInfo.fileName}.xml
 
 use this:
 url=reports/xml/{_reportInfo.fileName}.xml?time={getTimer()}
 
 that snippet might not be bindable so add the time in code whenever you
 access that file
 
 On Tue, Aug 17, 2010 at 6:17 PM, Laurence lmacne...@... wrote:
 
 
 
  Ok. I have the following HTTP Service declared:
  mx:HTTPService id=reportDataRPC
  url=reports/xml/{_reportInfo.fileName}.xml
  result=rdHandler(event);
  fault=rpcFaultHandler(event);/
 
  In the init() function (which is called when the 'show' event happens,
  because the page it's on happens to be part of a ViewStack) I have the
  following line:
  reportDataRPC.send();
 
  This loads the data from the .xml file and in the rdHandler function lets
  me put that data into my various ArrayCollections and whatnot... That's
  working fine... At least, the FIRST time...
 
  Every subsequent time, the result-set is exactly the same as the first time
  -- even if the .xml file it's reading has changed in the interim.
 
  If I completely shut-down the program and re-load it, then I finally get
  the new .xml file in there.
 
  So, how do I get it to give me a complete refresh of the data? I've tried
  calling 'reportDataRPC.clearResult()' and 'reportDataRPC.disconnect()' after
  storing the data in my ArrayCollections, but that didn't seem to do anything
  at all...
 
  I'm at a complete loss -- it's totally unacceptable to not be able to get
  the new data when the underlying .xml file changes. Can someone point me in
  the right direction?
 
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 
   
 





[flexcoders] HTTPService not updating...

2010-08-17 Thread Laurence
Ok.  I have the following HTTP Service declared:
mx:HTTPService id=reportDataRPC
url=reports/xml/{_reportInfo.fileName}.xml
result=rdHandler(event);
fault=rpcFaultHandler(event);/

In the init() function (which is called when the 'show' event happens, because 
the page it's on happens to be part of a ViewStack) I have the following line:
reportDataRPC.send();

This loads the data from the .xml file and in the rdHandler function lets me 
put that data into my various ArrayCollections and whatnot...  That's working 
fine...  At least, the FIRST time...

Every subsequent time, the result-set is exactly the same as the first time -- 
even if the .xml file it's reading has changed in the interim.

If I completely shut-down the program and re-load it, then I finally get the 
new .xml file in there.

So, how do I get it to give me a complete refresh of the data?  I've tried 
calling 'reportDataRPC.clearResult()' and 'reportDataRPC.disconnect()' after 
storing the data in my ArrayCollections, but that didn't seem to do anything at 
all...

I'm at a complete loss -- it's totally unacceptable to not be able to get the 
new data when the underlying .xml file changes.  Can someone point me in the 
right direction?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Printing without the pop-up window...

2010-05-02 Thread Laurence
Is there a way to get a Flex program to send a print-job to the default printer 
without it popping up that window where you select the printer and click the 
print button?  I'd really like to be able to do that.

Is that even a function of Flash-player?  Or is that built-in to the browser?  
Would there maybe be a java-script I could use to disable that pop-up in the 
browser?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Thoughts on Flash by Steve Jobs

2010-05-02 Thread Laurence


--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, mitek17 mitek17@ wrote:
 
  
  
  --- In flexcoders@yahoogroups.com, Seth Caldwell wiz@ wrote:
  
   Steve is employing several tactics used by politicians. The iphone is not
   open. 
  
  iPhone is a device, not a technology. Technology should be open, device  
  software could be proprietary. Steve stresses it particularly, please read 
  Job's message more throroughly. 
  
  
  I hope that the pressure from Jobs will finally make Adobe get cracking.
 
 Get cracking at what?  Steve Jobs is on record as saying that no matter what 
 Adobe does with the player, the iPhone and iTampon won't support it.
 
 -Amy

Frankly, I figured all this flap over Flash was because they wanted to try to 
force Adobe to make Flash-player open-source...  And now you're saying that 
even if Adobe does that, they still won't allow Flash on their devices?  That's 
stupid and stubborn of Jobs...

And besides, if I own a device (I don't own any Apple devices, but if I did) I 
should be allowed to run whatever software I want to on it.  It's MY device, 
not his.  I own it, not him -- if he wants to give me one, and pay the monthly 
service for it, then he can tell me what I can run on it.  Only then.  
Basically what Jobs is doing is screwing himself out of any potential business 
that I would ever give him.  (For the project I'm working on now, we had plans 
to purchase about 50 iPads to use on-site.  That's not gonna happen now...  
Glad doin' business with you, Steve -- we'll be buying Google or Dell tablets 
when they are available.)

And it also pisses me off that everyone talks about video on Flash, as if 
that's the only thing it does.  Jobs is singlehandedly ruining OUR jobs as Flex 
developers.  That's really what it boils down to -- he's trying to put us out 
of business.  We already can't write apps for Apple's portable devices -- and 
when he cuts off Flash support in OSX, there goes every Mac in the world.  
Thanks for ruining my job, Steve.  Bastard.

Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Thoughts on Flash by Steve Jobs

2010-05-02 Thread Laurence


--- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote:

 Jeez...it's *three* devices, and you *do* have a choice...

It's gonna be a hell of a lot more than just 3 portable devices, when Jobs 
removes Flash from OSX.  That's every Mac in the world.  There are a LOT of 
Macs out there...

The whole reason I chose to learn Flex is that it (at the time) ran on every 
available platform.  It was THE cross-platform language to learn.

 
 You're annoyed because you're being shut out of a market you want to be in, 
 but your arguments as to why you should be allowed into that market are 
 specious. 

My arguments are not specious -- I *was* a part of that market at one time.  
I'm being shut out of a market through NO FAULT OF MY OWN.  Every Apple product 
in the world will soon have zero support for Flash -- that's NOT what I signed 
up for when I learned Flex.  The MAIN REASON I learned Flex was for its 
cross-platform capabilites.  I never had to worry about what system my programs 
were running on.  Now Apple is gone from that equation -- ergo 25% of my 
customers just disappeared, unless I can get them all to buy PCs.  Thanks, 
Steve!

 
 If you buy an iPod/Pad/Phone, you buy it as is, knowing what it can and can't 
 do. It can't do Flash. If you don't like that, don't buy the device, it's 
 really very simple. If you want to hack it to make it capable of running 
 Flash, then sure, go ahead, no-one is going to sue you. You might not be able 
 to claim on your warranty or update the OS once you do that but, yes, it's 
 your choice if you want to go that way. Most people don't because most people 
 can actually live without Flash, believe it or not.

I agree with you here -- knowing in advance that it doesn't run Flash is a good 
thing, and people can then make a choice accordingly.  It just really angers me 
if I were to own a device and some entity somewhere tells me I cannot run my 
own software on it.  I would be ranting against MS or Linux just as angrily, if 
they were to suddenly come out and say I couldn't run a particular piece of 
software just because they don't like it anymore.  (And, yes I read that 
article where MS says that HTML5 is the 'future of the internet.'  They said 
nothing about removing Flash support from Microsoft Windows in that article.  
Steve Jobs IS going to remove Flash from all Apple products everywhere -- 
THAT'S my problem with this!)


 
 If you want to develop for the iP*, then learn objective C or use 
 HTML5/Javascript. If you don't then don't. Again, it's a simple choice you 
 can make.

It's NOT a simple choice -- learning a whole other programming language is not 
a simple task.  Before old Steve-o came out against Flash, I could write one 
program that would work on Windows, Linux, and Mac.  Now Mac is gone from that 
equation -- thanks to some facist prick who thinks he knows everything that 
everyone else should do.

 
 Technologies change, sometimes their fortunes rise and sometimes they fall. 
 Flash has been the undisputed winner in the RIA wars up till now. Jobs is 
 betting the future of the iP* platform on HTML5. Maybe he's wrong about it, 
 but maybe he isn't. Time will tell.

Yes, technologies do change -- but it should be the free market that determines 
which technologies survive and which don't, not some ivory-tower egghead who 
determines by fiat what's best for everyone.  THAT'S why I called Steve Jobs a 
bastard.  Perhaps I should've said elitist bastard to make it clearer.

I truly DESPISE it when ONE person has the power to mess up things in my life.  
If everyone decided ON THEIR OWN to stop using Adobe Flash, that would be a 
completely different story -- the majority would have spoken, and I could more 
easily accept the outcome.  But Jobs is simply deciding that he knows best, and 
we're going to all follow him because he's so damn smart.  THAT is not the free 
market!




[flexcoders] Scrollbars, mx:DataGrid, and non-Halo themes...

2010-05-02 Thread Laurence
If I have a non-Halo theme (for example, Cobalt) in my Flex 4 app, there are no 
longer any scroll-bars on my Data Grid.  How do I re-enable the vertical scroll 
bar, in particular?

Thanks,
Laurence MacNeill
Mableton, Georiga, USA




[flexcoders] Re: Scrollbars, mx:DataGrid, and non-Halo themes...

2010-05-02 Thread Laurence


--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 If I have a non-Halo theme (for example, Cobalt) in my Flex 4 app, there are 
 no longer any scroll-bars on my Data Grid.  How do I re-enable the vertical 
 scroll bar, in particular?
 
 Thanks,
 Laurence MacNeill
 Mableton, Georiga, USA


Figured this one out myself...  Turns out it had nothing to do with the theme, 
and everything to do with the fact that my data-grid was too wide to see the 
scroll bar.  As long as the Datagrid's verticalScrollPolicy is set to on or 
auto the vertical sroll bar will appear, it would seem...  

I just thought with all the scrolling changes that came about in Flex 4, maybe 
something got messed up.  But it was just me.  :-)

L.




[flexcoders] Is it a ValueObject, or is it a String.

2010-03-27 Thread Laurence
I have a function (not written by me) that's returning either a String or a 
ValueObject, depending on whether or not it finds a match in an ArrayCollection 
of ValueObjects.  If it finds a match, it returns the ValueObject that matches 
the search string.  If it doesn't find a match, it returns the search-string 
itself.

So, here's my question -- how do I know if what's being returned is a String or 
a ValueObject?

I need something like the following:
   if returnedItem isString {
  //do stuff needed for when match isn't found
   } else {
  //do stuff needed for when match is found
   }

But I can't figure out how to word that 'if' statement -- how do you ask it if 
it is a String or a ValueObject, without knowing in advance what it's going to 
be?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Is it a ValueObject, or is it a String.

2010-03-27 Thread Laurence
I could've sworn I tried that, and it didn't work...

I did find something that worked, even though it's a bit of a hack...

if (String(returnedItem) == [object Object]) {
   //I know it's a VO and not a String
}

So that works...  I'll give your suggestion a try and see if that works -- 
although I think I tried it already.

Thanks for the suggestion,
L.


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

 Use the is operatornbsp;
 
 If (returnedItem is String)
 
 
 
 
 -- Sent from my Palm Pre
 On Mar 27, 2010 4:23 PM, Laurence lmacne...@... wrote: 
 
 
 nbsp;
 
 
 
   
 
 
 
   
   
   
 I have a function (not written by me) that's returning either a String or a 
 ValueObject, depending on whether or not it finds a match in an 
 ArrayCollection of ValueObjects.  If it finds a match, it returns the 
 ValueObject that matches the search string.  If it doesn't find a match, it 
 returns the search-string itself.
 
 
 
 So, here's my question -- how do I know if what's being returned is a String 
 or a ValueObject?
 
 
 
 I need something like the following:
 
if returnedItem isString {
 
   //do stuff needed for when match isn't found
 
} else {
 
   //do stuff needed for when match is found
 
}
 
 
 
 But I can't figure out how to word that 'if' statement -- how do you ask it 
 if it is a String or a ValueObject, without knowing in advance what it's 
 going to be?
 
 
 
 Thanks,
 
 Laurence MacNeill
 
 Mableton, Georgia, USA





[flexcoders] FocusOut event fires over and over...

2010-03-24 Thread Laurence
I want a pop-up window to appear when someone tabs out of a particular 
TextInput in my app.  So I simply set its FocusOut event equal to the function 
that makes the pop-up window appear...  Sounds simple enough, right?

But the FocusOut event keeps occurring over and over...  I type something into 
the TextInput then hit Tab.  The pop-up window pops up the way it's supposed 
to.  I select something in the pop-up window (or close it without selecting 
anything) and it pops right back up.  It's like my TextInput is re-gaining 
focus and then losing it again (which makes the window pop-up, again, forcing 
me to select something or close the window, which makes it happen again, etc., 
etc)

So how do I prevent this from happening?  Why is FocusOut occurring over and 
over and over like that?  I've tried, in my FocusOut handler, setting the focus 
onto another TextInput before calling the pop-up window, but that does no good 
-- same exact results.

This is incredibly frustrating!  Anyone have any ideas?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA





[flexcoders] Re: From your own experience how long does it take to learn AS3?

2010-03-24 Thread Laurence
It's also important to get your information from more than one source.  I used 
three different books, Lynda.com, and Adobe's Flex-in-a-week online videos 
(plus this forum, and dozens of Flex Blogs that I've found through Google 
searches).  Each one of them has their strengths and weaknesses -- the way that 
one of them explains a particular concept might just click better with your 
mind than another way.  So definitely don't limit yourself to only one source 
of training.

Indeed, like another poster has said, four weeks is nowhere near enough time to 
master this.  I've been doing Flex programming for over 18 months now, and I 
still have to refer to the documentation constantly (there's just SO much 
syntax, I don't think I'll ever have it all memorized completely).  Plus, I'm 
still learning new stuff every single day!  Even after 18 months!  This forum 
has been INVALUABLE to me in that regard.

And I have had many years of programming experience -- at one time or another 
I've written small- to medium-sized projects in maybe a half-dozen different 
languages, going all the way back to the 1980s.  With no programming experience 
at all, you should allow yourself even more time than average to learn this 
stuff.  You'll need to have lots of patience with yourself -- Rome wasn't built 
in a day, you know.

So definitely continue your lessons on Lynda.com.  Maybe buy a couple of books 
on the subject too, and definitely check out the Adobe Flex-in-a-Week free 
online video courses at Adobe.com.  (Of course, don't go through all that 
training material at the same time -- pick one and complete it before you start 
another.)  And, definitely keep this forum bookmarked on your computer -- it's 
a fantastic place to ask questions when you just can't figure it out on your 
own.  (Personally, I've found that going through the process of explaining my 
problem to others has often resulted in my finding the solution on my own -- it 
forces you to see your problem through the eyes of a potential responder, which 
can often lead to a eureka! moment while you're writing out your question.)

Best of luck to you!  A year from now, you'll look back on this and say to 
yourself Wow!  I've really learned a LOT that I didn't know back then.  It's 
a great feeling.

Laurence MacNeill
Mableton, Georgia, USA

--- In flexcoders@yahoogroups.com, ellistein52 ellistei...@... wrote:

 I have no background in programming , I am close to 54.I am following some 
 AS3 Lynda.com Essential Training. I seem to understand the material but when 
 I try to make a simple program on my own I am lost , I have to refer back to 
 the lesson to be able to write a simple line of code on my own.Also I started 
 learning the material 4 weeks ago so maybe it is too early for me to write my 
 own code? I would appreciate your comments regarding this issue.





[flexcoders] Re: FocusOut event fires over and over...

2010-03-24 Thread Laurence
That doesn't seem to work either.  Focus keeps returning to the original 
TextInput for some reason...  I've even tried manually setting the focus to the 
next TextInput immediately after removing the FocusOut event listener on the 
first TextInput, before calling the pop-up window -- still doesn't work right; 
focus keeps going back to the first TextInput when the pop-up window closes.

Now, if I click somewhere else on the screen -- in other words, I don't click 
or tab into the next TextInput -- the window pops up just the one time...  I do 
not have any FocusIn or FocusOut parameters set in that second TextInput, so I 
don't know why clicking or tabbing into that second TextInput would cause the 
problem...

Anything else I should try?  This is just ridiculous -- it *should* work, but 
for some reason focus keeps getting sent back to the first TextInput.

I'm running Flex Builder 3.5a, and Flash Player 10,0,42,34.

Thanks,
L


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Add the focusOut event listener when you get a focusIn on the text input. 
 Then, when your focusOut event fires and you open the pop-up window, remove 
 the focusOut event listener from the text input.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  I want a pop-up window to appear when someone tabs out of a particular 
  TextInput in my app.  So I simply set its FocusOut event equal to the 
  function that makes the pop-up window appear...  Sounds simple enough, 
  right?
  
  But the FocusOut event keeps occurring over and over...  I type something 
  into the TextInput then hit Tab.  The pop-up window pops up the way it's 
  supposed to.  I select something in the pop-up window (or close it without 
  selecting anything) and it pops right back up.  It's like my TextInput is 
  re-gaining focus and then losing it again (which makes the window pop-up, 
  again, forcing me to select something or close the window, which makes it 
  happen again, etc., etc)
  
  So how do I prevent this from happening?  Why is FocusOut occurring over 
  and over and over like that?  I've tried, in my FocusOut handler, setting 
  the focus onto another TextInput before calling the pop-up window, but that 
  does no good -- same exact results.
  
  This is incredibly frustrating!  Anyone have any ideas?
  
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 





[flexcoders] Re: What book in Flex would you guys recommend for a newbie ?

2010-03-19 Thread Laurence
I learned a lot from Adobe Flex 3: Training From The Source.  It takes you 
through an entire project, from start to finish.  They also have their own 
web-page and a discussion group as well.  Very, very helpful.

The book:
http://www.amazon.com/Adobe-Flex-3-Training-Source/dp/0321529189/ref=sr_1_1?ie=UTF8s=booksqid=1269025874sr=8-1

The web-site and discussion group:
http://www.flexgrocer.com/flex3.htm


Another good book is Flex 3 Cookbook.  It lists specific examples to solve 
specific questions you might have while working on a project.  It's not the 
book you want to start with, but it's a great reference to have when you've 
actually started working on your own projects.
http://www.amazon.com/Flex-Cookbook-Code-Recipes-Developers-Developer/dp/0596529856/ref=sr_1_1?ie=UTF8s=booksqid=1269026139sr=1-1

Best of luck to you.
Laurence MacNeill
Mableton, Georgia, USA


--- In flexcoders@yahoogroups.com, Steve Mathews happy...@... wrote:

 The community is great at helping people who have specific questions. A
 newbie is on their own until they at least learn the basics and can ask
 meaningful questions. For example, if you haven't figured out the difference
 between MXML and AS3, then you need to do some self study before asking
 questions.
 
 As to the question of which books, I would say you would learn a lot from
 just about any of them. It kind of depends one what your goal is. If you
 want to learn to use the Flex framework then maybe http://flexinaction.com/.
 If you are still trying to learn AS3 then Essential ActionScript 3.0 is a
 great start.
 
 Steve
 
 On Thu, Mar 18, 2010 at 10:30 AM, fred44455 fred44...@... wrote:
 
  I already asked questions on this forum but I rarely get feed backs.
  I was told that the Adobe community was a fantastic one but I guess it is
  very much like linux if you are a newbie you are on your own. Anyway I would
  appreciate a recommendation on a good book to learn Flex. Also I was told to
  learn AS3. What Actionscript are you guys referring to?
  The AS3 for Flex seems to be totally different with mx classes than the
  AS3 for Flash. So I would appreciate that you guys let me know which one I
  need to learn. Thanks.
 
 
 
  
 
  --
  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
 
 
 
 





[flexcoders] Re: Automatically update ValueObjects...

2010-03-15 Thread Laurence
Tracy:  It does appear that using a relative path will not work...  At least 
not in the .CFC files...  (It does appear to work if I specify the 
relative-path in the Flex .AS component, and the full-path in the .CFC files, 
however...)  So apparently CF is looking for the path relative to the web-root, 
not to the .SWF's path...  If anyone knows how to change this behavior, I'd be 
very happy to hear it.

Valdhor: I need a separate working folder so that when I'm making changes, 
people can still use the app (in the live folder) for testing purposes 
without receiving silly errors that will pop up from time-to-time because I'm 
in the middle of editing something...  It's caused confusion before, and I'm 
simply trying to make it so the testers see as few errors as possible...  Of 
course, we have a completely separate server for our actual web-site, so it 
doesn't affect end-users...  But on the test-server, this issue has cropped up 
more than once, so I keep a separate working-folder and live-folder on the 
development server.

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 What I generally do is not use a Working Folder on the server. I use the 
 Live folder for everything.
 
 Is there any specific reason you need a Working Folder? If this is new 
 code, don't you need new ValueObjects? If this is existing code and you need 
 to add new properties to a ValueObject, (I don't know if ColdFusion does, but 
 PHP does) you can subclass the existing ValueObject and add properties to the 
 new class. Either way, there is a new ValueObject class that will not affect 
 existing code.
 
 
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  I have not used Remote object enough to be an authority on your specific
  issue, but that looks like a package path and typically package paths are
  relative, starting at the project root, (in my setups, this is src) , so
  the deployment location is never an issue.  Are yo sure you need to specify
  MyworkingFolder?
  
   
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of Ivan Wang
  Sent: Saturday, March 13, 2010 7:46 PM
  To: flexcoders@yahoogroups.com
  Subject: Re: [flexcoders] Automatically update ValueObjects...
  
   
  

  
  But In what case do you have to change a package name? If you really did,
  the Flex Builder has some refactor feature, but not too much. You can try
  it, I'm not sure.
  
   
  
   
  
  - Original Message - 
  
  From: Laurence mailto:LMacNeill@  
  
  To: flexcod...@yahoogro mailto:flexcoders@yahoogroups.com ups.com 
  
  Sent: Saturday, March 13, 2010 6:46 AM
  
  Subject: [flexcoders] Automatically update ValueObjects...
  
   
  

  
  I have several ValueObjects in my app... When I work with them in my test
  website, everything's fine. But when I want to export a release build, the
  ValueObjects no longer work because the folder-name is different...
  
  All my VO's have the following type of declaration at the top:
  [RemoteClass(alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO)]
  
  And on the ColdFusion9 side it's:
  cfcomponent output=false alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO
  
  Thus, when I export the release-build from MyWorkingFolder to MyLiveFolder
  (for example) all of the VOs stop working -- they're still looking for
  MyWorkingFolder.
  
  How do I get FlexBuilder to change the names inside the VOs automatically to
  match the release-build destination? So far, I've been doing it manually,
  but what a pain that is -- my patience is wearing thin, having to manually
  update a bunch of damn VOs, then change them back, every time I want to
  export a release build... There has to be a better way that I'm just not
  aware of...
  
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 





[flexcoders] Re: ViewStack and CreationComplete...

2010-03-12 Thread Laurence
I replaced creationComplete=init(); with show=init();, but it never seems 
to get called now...  So I guess either the show event isn't getting thrown, or 
I'm not using it properly...

Any suggestions?

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 As I understand it, yes.
 
 CreationComplete will only fire once (When the component is first created). 
 From then on you will need to monitor the show event if you need to make 
 changes based on when the component is displayed.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  I have not.  show happens every time the child of the ViewStack shown, I 
  assume?  And no other times?  Sounds like that might work.
  
  The first time you switch to that view, the CreationComplete event happens, 
  of course.  Does the Show event occur after CreationComplete is done, or 
  before?  I assume after, but I don't want to guess incorrectly.
  
  Thanks,
  L.
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   Have you tried the show event?
   
   --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
   
I've been using a ViewStack to switch between views in my app...  The 
first time you jump to a particular view, that view runs throws its 
CreationComplete event, whereupon I have it running an init() function.

The subsequent times you jump to that view, there is no 
CreationComplete event, obviously...

So what I need is an event that happens every time you jump to that 
view in the ViewStack...  So I can intialize the view properly on the 
2nd, 3rd, 4th, etc, time you jump to that view...

Any ideas?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA
   
  
 





[flexcoders] Labels and BackgroundColor...

2010-03-12 Thread Laurence
I have a Canvas with a background image.  On that canvas are labels.  If the 
background image is dark, you cannot see the text in the labels...  I'd like to 
set the backgroundColor on the labels so that it's always black text on a white 
background, with none of the underlying backgroundImage showing through.

But the Label control doesn't have a backgroundColor property...  Nor does a 
Text control...  So how do I do what I'm trying to do here?  One would think it 
would be fairly simple, but I've been trying for a couple of hours now to get 
this working, and it just won't...

L.




[flexcoders] Automatically update ValueObjects...

2010-03-12 Thread Laurence
I have several ValueObjects in my app...  When I work with them in my test 
website, everything's fine.  But when I want to export a release build, the 
ValueObjects no longer work because the folder-name is different...

All my VO's have the following type of declaration at the top:
[RemoteClass(alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO)]

And on the ColdFusion9 side it's:
cfcomponent output=false alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO

Thus, when I export the release-build from MyWorkingFolder to MyLiveFolder (for 
example) all of the VOs stop working -- they're still looking for 
MyWorkingFolder.

How do I get FlexBuilder to change the names inside the VOs automatically to 
match the release-build destination?  So far, I've been doing it manually, but 
what a pain that is -- my patience is wearing thin, having to manually update a 
bunch of damn VOs, then change them back, every time I want to export a release 
build...  There has to be a better way that I'm just not aware of...

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] HTTPService not returning ArrayCollection...

2010-03-10 Thread Laurence
I'm trying to read data from an XML file, and put that data into an 
ArrayCollection.

This works great when I have more than one object in the XML file.  But when 
there's only one object in there, my HTTPService RPC returns it as an Object 
instead of an ArrayCollection of Objects.

So when I assign the event.result to my ArrayCollection I get a Cannot Convert 
to ArrayCollection error message...

Let me give an example:

MyXMLFile.xml:
people
   person
  firstNameJoe/firstName
  lastNameSmith/lastName
   /person
/people

If I have more than one person/person pair in my XML file, then they get 
returned as an ArrayCollection in event.result.people.person.  But with only 
one person/person pair in my XML file, event.result.people.person is an 
ObjectProxy -- which can't be converted to an ArrayCollection, apparently.

If event.result.people had a length property, I could just loop over it for 
{length} number of times and addItem() each person to my ArrayCollection -- 
but I see no length property on the event.result...  So how do I get this to 
work?  I won't know in advance how many person/person pairs are in the XML 
file, so I can't make any assumptions about the length...  Could be 1, could be 
100...

Is there a way to programmatically tell whether or not 
event.result.people.person is an ArrayCollection or an ObjectProxy?  If I could 
tell what it was, then I could use that information to let the program decide 
how to deal with it...

Thanks for any suggestions...
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] ViewStack and CreationComplete...

2010-03-10 Thread Laurence
I've been using a ViewStack to switch between views in my app...  The first 
time you jump to a particular view, that view runs throws its CreationComplete 
event, whereupon I have it running an init() function.

The subsequent times you jump to that view, there is no CreationComplete event, 
obviously...

So what I need is an event that happens every time you jump to that view in the 
ViewStack...  So I can intialize the view properly on the 2nd, 3rd, 4th, etc, 
time you jump to that view...

Any ideas?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: ViewStack and CreationComplete...

2010-03-10 Thread Laurence
I have not.  show happens every time the child of the ViewStack shown, I 
assume?  And no other times?  Sounds like that might work.

The first time you switch to that view, the CreationComplete event happens, of 
course.  Does the Show event occur after CreationComplete is done, or before?  
I assume after, but I don't want to guess incorrectly.

Thanks,
L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Have you tried the show event?
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  I've been using a ViewStack to switch between views in my app...  The first 
  time you jump to a particular view, that view runs throws its 
  CreationComplete event, whereupon I have it running an init() function.
  
  The subsequent times you jump to that view, there is no CreationComplete 
  event, obviously...
  
  So what I need is an event that happens every time you jump to that view in 
  the ViewStack...  So I can intialize the view properly on the 2nd, 3rd, 
  4th, etc, time you jump to that view...
  
  Any ideas?
  
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 





[flexcoders] Re: HTTPService not returning ArrayCollection...

2010-03-10 Thread Laurence
I discovered that (event.result.people.person.source != null) when the result 
is an ArrayCollection.  So I used that in an if statement so I could choose 
simply to set my variable equal to the result, or if I had to 
variable.addItem() the result.

Your way is much neater.  I'll give that a try, thanks.

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I use new ArrayCollection(ArrayUtil.toArray(event.result)). It works for 1 
 or more items in the result.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  I'm trying to read data from an XML file, and put that data into an 
  ArrayCollection.
  
  This works great when I have more than one object in the XML file.  But 
  when there's only one object in there, my HTTPService RPC returns it as 
  an Object instead of an ArrayCollection of Objects.
  
  So when I assign the event.result to my ArrayCollection I get a Cannot 
  Convert to ArrayCollection error message...
  
  Let me give an example:
  
  MyXMLFile.xml:
  people
 person
firstNameJoe/firstName
lastNameSmith/lastName
 /person
  /people
  
  If I have more than one person/person pair in my XML file, then they 
  get returned as an ArrayCollection in event.result.people.person.  But with 
  only one person/person pair in my XML file, event.result.people.person 
  is an ObjectProxy -- which can't be converted to an ArrayCollection, 
  apparently.
  
  If event.result.people had a length property, I could just loop over it for 
  {length} number of times and addItem() each person to my ArrayCollection 
  -- but I see no length property on the event.result...  So how do I get 
  this to work?  I won't know in advance how many person/person pairs are 
  in the XML file, so I can't make any assumptions about the length...  Could 
  be 1, could be 100...
  
  Is there a way to programmatically tell whether or not 
  event.result.people.person is an ArrayCollection or an ObjectProxy?  If I 
  could tell what it was, then I could use that information to let the 
  program decide how to deal with it...
  
  Thanks for any suggestions...
  Laurence MacNeill
  Mableton, Georgia, USA
 





Re: [flexcoders] Dynamically create a Value Object...

2010-03-03 Thread Laurence MacNeill
At 11:24 PM 3/2/2010, you wrote:


First, let me say that I have been roundly criticized for taking the 
approach of NOT using VOs.

Second, I use .NET  FluorineFX.

Yes, well, unfortunately it's way too late in this project to change 
our back-end.  It's gonna be CF9...  Period...  My bosses would 
*kill* me if I went to them now and said Hey, you know all that 
money we spent on CF?  Well, it was a complete waste.  Yeah -- that 
won't go over well...  Besides, they're already using CF on their 
production servers, and they're quite familiar with it.  It's not 
going to change...  .NET and Flourine are out...  Sorry...

So there has to be a way to do this with CF9.  I just haven't found 
it yet...  I'm still hoping to get a response here with regards to that...


If one were clever, using the approach above, one could create a 
Flex app that requests a table structure from the DB, and builds a 
data entry screen on the fly. You may want a schema table that 
contains data validation type info that would be read in conjunction 
with the table structure to allow edits to be performed by flex.

I have no clue how to do that...  I don't know what a schema table 
is...  I have heard of the term schema, but that's pretty much as 
far as my knowledge goes...  How do you create a schema table?  And 
how can I get CF9 to deal with it?

I do like the idea of building the data-entry screen on-the-fly, 
though -- that's probably what we're going to have to do...  I've 
actually already done that with one part of the program that deals 
with a variable number of fields that are all the same general 
type...  I guess I'll just have to migrate that to the rest of the 
program, to deal with these dynamic VOs.  (That is, if someone will 
ever tell me exactly how to create one...)


By the way, my main reason for resisting the VO structure, is I 
thought that keeping multiple copies of the VO in sync would be a 
PITA. Anytime you modified a table you need to modify at least two 
VOs, and potentially recompile middle tier and presentation layer programs.

Well, that does seem to be exactly the problem I'm running into 
here...  And I've still not heard anything from anyone about creating 
dynamic VOs.  I've read a couple of things about creating bindable 
dynamic objects, but I just can't figure out how to change that 
into a VO that gets passed back and forth between Flex and CF9.  If I 
could figure that part out, then this might work...  So, does anyone 
know how to create such an animal?

Alternatively, there was a suggestion earlier that I use an 
associative array within my VO to grab the changed fields.  I said 
that I'd never been able to get CF to return such an array, but I got 
no response on that...  Can anyone tell me how to get CF9 to return 
an associative array within a VO?  In case there's just no other way 
to do it...

This MUST be a common problem here...  Databases DO change all the 
time.  You can't tell me that Adobe hasn't created a secure way to 
deal with this...  Someone out there must know how to do what I'm 
trying to do here...  At this point, I'm willing to pay for the 
answer.  I've got to figure this out. And soon!

Thanks,
L.



Re: [flexcoders] Dynamically create a Value Object...

2010-03-03 Thread Laurence MacNeill
This blog-post describes pretty much what I want to do:
http://justinjmoses.wordpress.com/2008/10/10/flex-dynamic-bindable-value-objects/

Dynamic, bindable value objects.  Perfect!

Except he's implementing it with LINQ and .NET 3.5   Anyone know how 
to do this with CF9?  (I've already asked the blog-poster -- he knows 
very little about CF and can't help me...)  This might solve my 
problem, if someone can tell me how to implement his scenario with CF9...

Thanks,
L.



[flexcoders] Dynamically create a Value Object...

2010-03-02 Thread Laurence
The program that I'm working on is for a company that does registrations for 
conventions and trade-shows.  Different clients want different information 
stored for each show.  Most of the information is the same from show-to-show, 
but every show has certain customizations that need to be done.

The way they're doing it now is by going into the source code of their program 
and modifying it that way.  We could do the same thing with our Flex app, but 
I'm trying like heck to avoid that...

The problem I'm running into is the Flex Value Objects -- they pretty much have 
to be compiled into the .SWF file, which means we're stuck modifying 
source-code and re-compiling for each individual show.  Not the solution we 
want.

Is there a way to dynamically create and/or modify Value Objects so they can be 
changed without re-compiling the .SWF file?  So that if a particular client 
wants stuff tracked that a different client doesn't want tracked, we don't have 
to create a generic version of our database that has all these extra fields in 
it, which most clients don't need?

As it stands right now, the Value Objects force us to make every database for 
every show exactly the same -- unless we modify the Value Objects for each 
individual show and re-compile a separate .SWF file for that show...  If there 
were a way to write, say, an .XML file that the program could read and modify 
itself accordingly for each show, that would be brilliant.  Is there a way to 
do that?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Dynamically create a Value Object...

2010-03-02 Thread Laurence
I should also mention we're using CF9 on the back-end.  So the VOs have to be 
defined in .CFC files as well.  So if anyone can tell me how to do dynamic VOs 
in both CF9 and Flex, that'd be wonderful.

Alternatively, if there's a way to transfer data between Flex and CF9 that 
doesn't involve VOs (but is still strongly structured and typed, like VOs are), 
then perhaps we need to do it that way?  I'm extremely confused here...  I've 
written this program from the beginning with statically-defined VOs, and now I 
discover that that's just not going to work.

So if anyone can point me in the right direction to help me learn what my 
alternatives to statically-defined VOs are, I'd really appreciate it.  I have 
found a couple of blog posts about bindable dynamic value objects, but only 
how to create them in Flex -- not how to export the data in them from Flex to 
CF9.  And the posts are pretty darn confusing, anyway...  Heck, at this point 
I'd be willing to PAY someone to teach me how to do this, one-on-one.  I really 
need someone who's an expert in both Flex 3.5a and ColdFusion 9.

Thanks,
L.


--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 The program that I'm working on is for a company that does registrations for 
 conventions and trade-shows.  Different clients want different information 
 stored for each show.  Most of the information is the same from show-to-show, 
 but every show has certain customizations that need to be done.
 
 The way they're doing it now is by going into the source code of their 
 program and modifying it that way.  We could do the same thing with our Flex 
 app, but I'm trying like heck to avoid that...
 
 The problem I'm running into is the Flex Value Objects -- they pretty much 
 have to be compiled into the .SWF file, which means we're stuck modifying 
 source-code and re-compiling for each individual show.  Not the solution we 
 want.
 
 Is there a way to dynamically create and/or modify Value Objects so they can 
 be changed without re-compiling the .SWF file?  So that if a particular 
 client wants stuff tracked that a different client doesn't want tracked, we 
 don't have to create a generic version of our database that has all these 
 extra fields in it, which most clients don't need?
 
 As it stands right now, the Value Objects force us to make every database for 
 every show exactly the same -- unless we modify the Value Objects for each 
 individual show and re-compile a separate .SWF file for that show...  If 
 there were a way to write, say, an .XML file that the program could read and 
 modify itself accordingly for each show, that would be brilliant.  Is there a 
 way to do that?
 
 Thanks,
 Laurence MacNeill
 Mableton, Georgia, USA





[flexcoders] Re: Dynamically create a Value Object...

2010-03-02 Thread Laurence
We're using an SQL database with a ColdFusion intermediary between the Flex 
app and the database...  I've used XML files to configure a couple of the 
components -- give the user the option to change the layout of a component, for 
example, by modifying the contents of a config.xml file, that sort of thing...  
But I don't see us replacing our database with a bunch of XML files...  (Or 
maybe I completely misunderstood your reply, which is quite possible...)

I was hoping that there might be a way to get the program to modify its VOs by 
reading from an XML file what fields I want the VO to store...  But honestly, I 
don't care where that info is stored...  I just need to figure out how to 
dynamically modify a VO (and have ColdFusion realize that the VO has been 
changed by the Flex app) so I can deal with databases that have had fields 
added or changed without having to re-compile the entire program every time...  
And then, of course, how to reference these dynamically-modified VOs in my 
program.

Thanks,
L.

--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 Hi Laurence,
 
 I'm pretty new to Flex so there might be reasons to stick with Value Objects
 that I'm unaware of but you can definitely read and write XML and generate
 forms, layouts, etc on the fly based on the XML contents. I've used E4X to
 query XML data that I've sucked in from an HTTP call, modified the XML using
 E4X and pinged it back up to the HTTP server to save the XML data for later
 use.
 
 Hope that helps...
 
 
 Cheers,
 Nick
 --
 http://blog.middleweek.co.uk/
 
 
 
 On 2 March 2010 19:19, Laurence lmacne...@... wrote:
 
 
 
  The program that I'm working on is for a company that does registrations
  for conventions and trade-shows. Different clients want different
  information stored for each show. Most of the information is the same from
  show-to-show, but every show has certain customizations that need to be
  done.
 
  The way they're doing it now is by going into the source code of their
  program and modifying it that way. We could do the same thing with our Flex
  app, but I'm trying like heck to avoid that...
 
  The problem I'm running into is the Flex Value Objects -- they pretty much
  have to be compiled into the .SWF file, which means we're stuck modifying
  source-code and re-compiling for each individual show. Not the solution we
  want.
 
  Is there a way to dynamically create and/or modify Value Objects so they
  can be changed without re-compiling the .SWF file? So that if a particular
  client wants stuff tracked that a different client doesn't want tracked, we
  don't have to create a generic version of our database that has all these
  extra fields in it, which most clients don't need?
 
  As it stands right now, the Value Objects force us to make every database
  for every show exactly the same -- unless we modify the Value Objects for
  each individual show and re-compile a separate .SWF file for that show... If
  there were a way to write, say, an .XML file that the program could read and
  modify itself accordingly for each show, that would be brilliant. Is there a
  way to do that?
 
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 
 





[flexcoders] Re: Dynamically create a Value Object...

2010-03-02 Thread Laurence
Thanks for the suggestion...  I may be able to make that work...

If I understand you correctly, I'd need to return an array-within-an-array kind 
of thing...  My normal array of VOs, with one property of each VO being an 
array itself...  Sounds easy enough...

But I've tried before to get CF to do that (for a different problem), and 
failed...  Does anyone know how to get CF to return an array-within-an-array 
kind of structure?  I kept getting weird errors the last time I tried something 
like that - it kept acting like I was trying to create a two-dimensional array, 
when I only wanted a 1-dimensional array nested within another 1-dimensional 
array...  So obviously I was doing something wrong there...

Any suggestions are appreciated - thanks,
L.



--- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote:

 You could probably try having a base VO for all the properties that you know
 will be there and include a single property in the VO which would be either
 a Dictionary or a generic object used as an associative array to handle all
 your custom properties.  Then just populate the VO like you normally would
 and when it comes to extra properties, throw them in that one extra VO
 property.  You'd have to have some kind of parsing method on both ends but
 I'd think this would work without too much trouble.
 
 -Jake
 
 On Tue, Mar 2, 2010 at 3:21 PM, Laurence lmacne...@... wrote:
 
 
 
  We're using an SQL database with a ColdFusion intermediary between the
  Flex app and the database... I've used XML files to configure a couple of
  the components -- give the user the option to change the layout of a
  component, for example, by modifying the contents of a config.xml file, that
  sort of thing... But I don't see us replacing our database with a bunch of
  XML files... (Or maybe I completely misunderstood your reply, which is quite
  possible...)
 
  I was hoping that there might be a way to get the program to modify its VOs
  by reading from an XML file what fields I want the VO to store... But
  honestly, I don't care where that info is stored... I just need to figure
  out how to dynamically modify a VO (and have ColdFusion realize that the VO
  has been changed by the Flex app) so I can deal with databases that have had
  fields added or changed without having to re-compile the entire program
  every time... And then, of course, how to reference these
  dynamically-modified VOs in my program.
 
  Thanks,
  L.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Nick
  Middleweek nick@ wrote:
  
   Hi Laurence,
  
   I'm pretty new to Flex so there might be reasons to stick with Value
  Objects
   that I'm unaware of but you can definitely read and write XML and
  generate
   forms, layouts, etc on the fly based on the XML contents. I've used E4X
  to
   query XML data that I've sucked in from an HTTP call, modified the XML
  using
   E4X and pinged it back up to the HTTP server to save the XML data for
  later
   use.
  
   Hope that helps...
  
  
   Cheers,
   Nick
   --
   http://blog.middleweek.co.uk/
  
  
  
   On 2 March 2010 19:19, Laurence LMacNeill@ wrote:
  
   
   
The program that I'm working on is for a company that does
  registrations
for conventions and trade-shows. Different clients want different
information stored for each show. Most of the information is the same
  from
show-to-show, but every show has certain customizations that need to be
done.
   
The way they're doing it now is by going into the source code of their
program and modifying it that way. We could do the same thing with our
  Flex
app, but I'm trying like heck to avoid that...
   
The problem I'm running into is the Flex Value Objects -- they pretty
  much
have to be compiled into the .SWF file, which means we're stuck
  modifying
source-code and re-compiling for each individual show. Not the solution
  we
want.
   
Is there a way to dynamically create and/or modify Value Objects so
  they
can be changed without re-compiling the .SWF file? So that if a
  particular
client wants stuff tracked that a different client doesn't want
  tracked, we
don't have to create a generic version of our database that has all
  these
extra fields in it, which most clients don't need?
   
As it stands right now, the Value Objects force us to make every
  database
for every show exactly the same -- unless we modify the Value Objects
  for
each individual show and re-compile a separate .SWF file for that
  show... If
there were a way to write, say, an .XML file that the program could
  read and
modify itself accordingly for each show, that would be brilliant. Is
  there a
way to do that?
   
Thanks,
Laurence MacNeill
Mableton, Georgia, USA
   
   
  
 
   
 





[flexcoders] Re: Printing in Flex...

2010-02-27 Thread Laurence
--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 1) Is there any way to control what printer a print job goes to?  Or will it 
 always go to the default printer?
 
 2) Is there any way to configure it so that the browser's Print window 
 doesn't come up?  You know the one where you get to choose which printer you 
 want to print to, and have to click OK to get it to print.
 
 Thanks for any info you can provide,
 Laurence MacNeill
 Mableton, Georgia, USA


Bump.



[flexcoders] Re: Accessing 'change' property in a dynamically-created TextInput.

2010-02-25 Thread Laurence
So simple - thanks.

L.


--- In flexcoders@yahoogroups.com, Peeyush Tuli peeyus...@... wrote:

 myTextInput.addEventListener(
 flash.events.Event.CHANGEfile:///C:/Documents%20and%20Settings/peeyushtuli/My%20Documents/flex3_documentation/langref/flash/events/Event.html#CHANGE,myChangeHandler);
 
 
 On Thu, Feb 25, 2010 at 4:44 AM, Laurence lmacne...@... wrote:
 
 
 
  Suppose I have the following code:
  var myTextInput:TextInput = new TextInput();
  this.addChild(myTextInput);
 
  How do I access the 'change' property of that TextInput? If I try:
  myTextInput.change=myChangeHandler()
  it gives me a error:
  Access of possibly undefined property change through a reference with
  static type mx.controls:TextInput.
 
  So, how do I tell that dynamically-created TextInput what to do when its
  value is changed?
 
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 
   
 





[flexcoders] Accessing 'change' property in a dynamically-created TextInput.

2010-02-24 Thread Laurence
Suppose I have the following code:
 var myTextInput:TextInput = new TextInput();
 this.addChild(myTextInput);

How do I access the 'change' property of that TextInput?  If I try:
 myTextInput.change=myChangeHandler()
it gives me a error:
 Access of possibly undefined property change through a reference with 
static type mx.controls:TextInput.

So, how do I tell that dynamically-created TextInput what to do when its value 
is changed?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-23 Thread Laurence
Ok, then...  Fantastic.  I am using AMF to communicate with the CFC's, and I'm 
using the SecureColdFusion channel I created to transfer the secure stuff, and 
the regular ColdFusion channel to transfer the non-secure stuff...  So even if 
I serve the .SWF over HTTPS, nothing will change (except I won't need to set 
'secure=false' in my crossdomain.xml file.)  Perfect.

So far, the only major differences I've noticed between CF8 and CF9 are the 
configurations of the channels themselves.  I found a comparison in this 
article: 
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS5B9C73A8-5FA2-4a54-B0C6-CECA2E20052D.html

That, and the fact that my un-patched CF 8.01 server didn't enforce the 
public vs. remote policies on the functions in my .CFC's.  I've checked all 
my CFC functions to ensure that they have 'access=remote' set in the 
cffunction declaration.  Other than that, I've made no changes to my .CFCs, 
and they work fine with CF9.

But I've only been running CF9 for about a week or so?  I'm sure I'll notice 
other differences as time goes on.  But, so far, the transition to CF9 really 
hasn't been all THAT bad.  Just gotta make sure you specify CF9 when you're 
asking for advice -- that was my earlier mistake, assuming CF8 and CF9 were 
more similar than they actually are.

Best of luck in your transition.  Hope my experience helps you to avoid a 
couple of the pitfalls I fell into.  :-)

L.


--- In flexcoders@yahoogroups.com, Warren warrenony...@... wrote:

 It depends on how you are communicating with the CFC.
 
 If you are using the remoting protocols, then how those channels are 
 configured is what counts.  Just because the swf is served thru HTTPS doesn't 
 mean your data will be IF you are using the AMF channels.  I have used (in 
 test) https channels under an http web server. If you want secure data 
 transmission under AMF then you need to create and use a secure channel.  
 
 If you are using other means (wsdl, URL, parameters, etc.) to move data back 
 and forth, then the web server protocol comes into play.
 
 It would be nice for someone from Adobe to comment on this, especially with 
 some sort of overview of the differences between CF8 and CF9.  I'm going to 
 have to move soon to CF9 and you've already found one difference in the 
 services-conf.xml file (the endpoints) that I'm going to have to deal with.
 
 - Original Message - 
   From: Laurence 
   To: flexcoders@yahoogroups.com 
   Sent: Monday, February 22, 2010 3:16 PM
   Subject: [flexcoders] Re: Security issues SOLVED. (Mostly...)
 
 
 
   So, you're saying that serving the .SWF via HTTPS won't automatically make 
 all my ColdFusion calls through HTTPS? Like, I can have the majority of my 
 calls through HTTP, and just secure the couple of calls that need to be 
 secured?
 
   I thought if you served the .SWF via HTTPS, all the calls to CF were 
 automatically sent through HTTPS?
 
   L.
 
   --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
   
An Idea...

Put the SWF on the HTTPS Server. There will be a one time hit as the user 
 loads the SWF. Place your secure calls to the same HTTPS server. Place the 
 other calls to an HTTP server.

I don't know how or even if that would work but it's worth a try.

--- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:

 Yes but HTTPS is *so* much slower than HTTP... Some of the data that we 
 don't need secured can get as high as 50,000 records... I only need one 
 credit-card number per account secured. Not much data at all...
 
 So how, exactly, does setting the secure=false tag open it up to 
 snooping or spoofing? I still don't really get that... I mean, it's still 
 using HTTPS over the secure ColdFusion channel I created, right? Wouldn't 
 that still be secure?
 
 And if setting the secure=false tag removes all HTTPS security, then 
 why bother offering the ability to create secure channels in ColdFusion? I 
 mean, if you're serving the .SWF over HTTPS, then all channels are 
 automatically secure, yes? So the only point of having a separate secure 
 channel is to do exactly what I'm trying to do... Why offer that, if it's not 
 truly secure? I'm still confused...
 
 L.
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  
  
  
  From the Adobe Help files:
  ==
  Each allow-access-from tag also has the optional secure attribute, 
 which defaults to true. You can set the attribute to false if your policy 
 file is on an HTTPS server, and you want to allow SWF files on a non-HTTPS 
 server to load data from the HTTPS server.
  
  Setting the secure attribute to false could compromise the security 
 offered by HTTPS. In particular, setting this attribute to false opens secure 
 content to snooping and spoofing attacks. Adobe strongly recommends

[flexcoders] Printing in Flex...

2010-02-22 Thread Laurence
1) Is there any way to control what printer a print job goes to?  Or will it 
always go to the default printer?

2) Is there any way to configure it so that the browser's Print window 
doesn't come up?  You know the one where you get to choose which printer you 
want to print to, and have to click OK to get it to print.

Thanks for any info you can provide,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread Laurence
Yes but HTTPS is *so* much slower than HTTP...  Some of the data that we don't 
need secured can get as high as 50,000 records...  I only need one credit-card 
number per account secured.  Not much data at all...

So how, exactly, does setting the secure=false tag open it up to snooping or 
spoofing?  I still don't really get that...  I mean, it's still using HTTPS 
over the secure ColdFusion channel I created, right?  Wouldn't that still be 
secure?

And if setting the secure=false tag removes all HTTPS security, then why 
bother offering the ability to create secure channels in ColdFusion?  I mean, 
if you're serving the .SWF over HTTPS, then all channels are automatically 
secure, yes?  So the only point of having a separate secure channel is to do 
exactly what I'm trying to do...  Why offer that, if it's not truly secure?  
I'm still confused...

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 
 
 
 From the Adobe Help files:
 ==
 Each allow-access-from tag also has the optional secure attribute, which 
 defaults to true. You can set the attribute to false if your policy file is 
 on an HTTPS server, and you want to allow SWF files on a non-HTTPS server to 
 load data from the HTTPS server.
 
 Setting the secure attribute to false could compromise the security offered 
 by HTTPS. In particular, setting this attribute to false opens secure content 
 to snooping and spoofing attacks. Adobe strongly recommends that you not set 
 the secure attribute to false.
 
 If data to be loaded is on a HTTPS server, but the SWF file loading it is on 
 an HTTP server, Adobe recommends that you move the loading SWF file to an 
 HTTPS server so that you can keep all copies of your secure data under the 
 protection of HTTPS.
 ==
 
 If I needed secure access, I would move everything over to https.
 
 The only other thing I could suggest is to use encryption. Check out 
 AS3Crypto (http://code.google.com/p/as3crypto/). Of course, if you serve the 
 SWF over HTTP, someone could analyze the SWF and find the encryption key. 
 Again, for security reasons, I would move everything over to https.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  So, here's my crossdomain.xml in its final form:
  
  cross-domain-policy
  site-control permitted-cross-domain-policies=master-only /
  
  allow-http-request-headers-from domain=www.mydomain.com headers=* 
  secure=false/
  allow-access-from domain=www.mydomain.com secure=false /
  
  /cross-domain-policy
  
  This allows all the stuff on the SecureColdFusion channel I created to work 
  just fine, as long as I access the site from mydomain.com and not from 
  localhost or myserver01 (its NetBIOS name).
  
  Even if I put allow-access-from domain=localhost/ (or 
  domain=myserver01/) in there, it still won't allow access from localhost 
  (or myserver01), because the security certificate is issued to mydomain.com 
  -- the names don't match, so the browser/Flash/CF rejects it.  (I don't 
  know exactly which one is rejecting it, but somewhere along the line it's 
  being rejected because of the name-mismatch.)
  
  The only way that I can see to change that behavior is to create two more 
  virtual websites that point to the same location, and give each of those 
  virtual sites their own certificate (one assigned to myserver01 and one 
  assigned to localhost.  Otherwise, I can't access the app on my local 
  server if the Internet goes down.  Yuck.  (If anyone knows a better way, 
  I'm all ears.)
  
  The one thing that still bothers me about this setup is the 
  'secure=false' tags.  I cannot get a straight answer as to exactly what 
  this does to my security.  It enables http .SWFs to access https data, 
  sure.  But does that mean it's disabling all https when it does that?  Or 
  does it mean that it is secure during transit over the Internet, but not 
  when it's being held in the Flex app?  Or does it mean something entirely 
  different?  There is no site that has a direct answer to this -- they all 
  just say it's not recommended due to security issues, or something along 
  those lines.  But they don't specify WHAT security issues there are.  I 
  need to know -- I can't serve my entire app over an https connection 
  because it'll be too slow, but I must have secure access to some of the 
  data...
  
  So if anyone can answer the 'secure=false' question specifically, I would 
  be very grateful.
  
  Thanks,
  L.
 





[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread Laurence
So, you're saying that serving the .SWF via HTTPS won't automatically make all 
my ColdFusion calls through HTTPS?  Like, I can have the majority of my calls 
through HTTP, and just secure the couple of calls that need to be secured?

I thought if you served the .SWF via HTTPS, all the calls to CF were 
automatically sent through HTTPS?

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 An Idea...
 
 Put the SWF on the HTTPS Server. There will be a one time hit as the user 
 loads the SWF. Place your secure calls to the same HTTPS server. Place the 
 other calls to an HTTP server.
 
 I don't know how or even if that would work but it's worth a try.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  Yes but HTTPS is *so* much slower than HTTP...  Some of the data that we 
  don't need secured can get as high as 50,000 records...  I only need one 
  credit-card number per account secured.  Not much data at all...
  
  So how, exactly, does setting the secure=false tag open it up to snooping 
  or spoofing?  I still don't really get that...  I mean, it's still using 
  HTTPS over the secure ColdFusion channel I created, right?  Wouldn't that 
  still be secure?
  
  And if setting the secure=false tag removes all HTTPS security, then why 
  bother offering the ability to create secure channels in ColdFusion?  I 
  mean, if you're serving the .SWF over HTTPS, then all channels are 
  automatically secure, yes?  So the only point of having a separate secure 
  channel is to do exactly what I'm trying to do...  Why offer that, if it's 
  not truly secure?  I'm still confused...
  
  L.
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   
   
   
   From the Adobe Help files:
   ==
   Each allow-access-from tag also has the optional secure attribute, 
   which defaults to true. You can set the attribute to false if your policy 
   file is on an HTTPS server, and you want to allow SWF files on a 
   non-HTTPS server to load data from the HTTPS server.
   
   Setting the secure attribute to false could compromise the security 
   offered by HTTPS. In particular, setting this attribute to false opens 
   secure content to snooping and spoofing attacks. Adobe strongly 
   recommends that you not set the secure attribute to false.
   
   If data to be loaded is on a HTTPS server, but the SWF file loading it is 
   on an HTTP server, Adobe recommends that you move the loading SWF file to 
   an HTTPS server so that you can keep all copies of your secure data under 
   the protection of HTTPS.
   ==
   
   If I needed secure access, I would move everything over to https.
   
   The only other thing I could suggest is to use encryption. Check out 
   AS3Crypto (http://code.google.com/p/as3crypto/). Of course, if you serve 
   the SWF over HTTP, someone could analyze the SWF and find the encryption 
   key. Again, for security reasons, I would move everything over to https.
   
   --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
   
So, here's my crossdomain.xml in its final form:

cross-domain-policy
site-control permitted-cross-domain-policies=master-only /

allow-http-request-headers-from domain=www.mydomain.com 
headers=* secure=false/
allow-access-from domain=www.mydomain.com secure=false /

/cross-domain-policy

This allows all the stuff on the SecureColdFusion channel I created to 
work just fine, as long as I access the site from mydomain.com and 
not from localhost or myserver01 (its NetBIOS name).

Even if I put allow-access-from domain=localhost/ (or 
domain=myserver01/) in there, it still won't allow access from 
localhost (or myserver01), because the security certificate is issued 
to mydomain.com -- the names don't match, so the browser/Flash/CF 
rejects it.  (I don't know exactly which one is rejecting it, but 
somewhere along the line it's being rejected because of the 
name-mismatch.)

The only way that I can see to change that behavior is to create two 
more virtual websites that point to the same location, and give each of 
those virtual sites their own certificate (one assigned to myserver01 
and one assigned to localhost.  Otherwise, I can't access the app on 
my local server if the Internet goes down.  Yuck.  (If anyone knows a 
better way, I'm all ears.)

The one thing that still bothers me about this setup is the 
'secure=false' tags.  I cannot get a straight answer as to exactly 
what this does to my security.  It enables http .SWFs to access https 
data, sure.  But does that mean it's disabling all https when it does 
that?  Or does it mean that it is secure during transit over the 
Internet, but not when it's being

[flexcoders] Re: Capturing a browser-refresh event...

2010-02-21 Thread Laurence
That works perfectly.  They can't hit refresh/back/close without triggering 
that pop-up window.  Exactly what I needed.

Thanks,
L.


--- In flexcoders@yahoogroups.com, Peeyush Tuli peeyus...@... wrote:

 window.onbeforeunload = function() {
 return It is not recommended to use the browser
 close/refresh/close buttons unless you have saved your data and logged out;
 }
 
 Add the above code to a javascript section on the html wrapper which loads
 your application. This will raise a javascript alert on all browser actions
 which cause a redirect away from the current page. I dont think there is a
 foolproof way to listen to this event directly in your swf.
 
 ~Peeyush
  http://www.mds.asia
 
 
 On Sun, Feb 21, 2010 at 12:40 PM, Laurence lmacne...@... wrote:
 
 
 
  In my app, if you click the browser's refresh button, it re-loads the app
  and starts it over from the beginning (as you'd expect.)
 
  I want my app to be able to capture this refresh event (or perhaps just
  block it completely?) so that users won't lose all the data they've entered
  if they accidentally click the browser's refresh button. Ideally it would
  give them a pop-up window telling them that they're about to lose all their
  data, and allow them to cancel the refresh if they desire.
 
  Is this possible? How can I do that from my Flex app?
 
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 
   
 





[flexcoders] Re: .CFC cannot be accessed remotely...

2010-02-20 Thread Laurence
I'm guessing you're right.  I was running CF 8.01 (not ever patched, to my 
knowledge) on the old server, and CF9 on the new one.  So that explains the 
lack of enforcement of public vs. remote on the old server.

Where do I go to keep up with the patches for CF9?  Is there a single page 
somewhere that lists all the patches that have been released for CF9?  I'd like 
to do a better job of keeping this server up-to-date.

Thanks,
L.


--- In flexcoders@yahoogroups.com, Jochem van Dieten joch...@... wrote:

 On Fri, Feb 19, 2010 at 12:11 PM, Laurence wrote:
  Very weird...  The access was set to public.  Don't know how that was 
  working on my old server -- I didn't change any code at all...  And it 
  worked fine on the old setup...
 
 Your old server probably was not up to date on its security patches:
 http://kb2.adobe.com/cps/403/kb403328.html
 
 Did you install this months patch on your new server?
 
 Jochem
 
 
 -- 
 Jochem van Dieten
 http://jochem.vandieten.net/





[flexcoders] Re: SQL Question

2010-02-20 Thread Laurence
First off, I would suggest making your query much simpler, just to diagnose the 
problem.  Then add complexity to it and see if/when it goes wrong...

Start with (for example):
SELECT roomDisplay, roomID, ageGroup, accountType
FROM chatrooms
WHERE
cfqueryparam value=#arguments.accountType# 
 cfsqltype=cf_sql_varchar / IN (accountType)
AND cfqueryparam value=#arguments.ageGroup# 
 cfsqltype=cf_sql_integer / IN (ageGroups)

See what that returns for you...  Then start adding your Concat statements one 
at a time and see what changes.  It may not be following the same logic you are 
in your head, and this will force you to see it one step at a time, so you can 
figure out why it's doing what it's doing...

Best of luck,
Laurence MacNeill
Mableton, Georgia, USA


--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 I know this is out of the core topic, but I am banging my head on this 
 simple issue..or probably is...
 
 I am trying to write a SQL query (in ColdFusion) for my database (MySQL 
 5) when I am looking for a passed in argument value in the column (which 
 is set as a varchar).
 
 I am passing in '0' for the ageGroup and 'kids' for the accountType I 
 have 'kids'
 
 My Query is:
 
 Select CONCAT(roomDisplay, (National)) as roomDisplay,
  CONCAT(cfqueryparam value=#arguments.ageGroup#, 
 -, roomDisplay, -, National) as roomID
  FROM chatrooms
  WHERE cfqueryparam value=#arguments.accountType# IN 
 (accountType)
  AND cfqueryparam value=#arguments.ageGroup# 
 cfsqltype=cf_sql_integer / IN (ageGroups)
  ORDER BY roomDisplay ASC
 
 I have a record where 'ageGroups' is '0, 1, 2, 3, 4, 5, 6, 7, 8' and the 
 'accountType' is 'kids, siblings, parents'
 
 I keep getting 0 returns but I know both values exist in at least 1 record
 
 What am I doing wrong?





[flexcoders] Re: Still getting Security Sandbox violations...

2010-02-20 Thread Laurence
Well, the lesson learned here is -- trust that the services-config.xml file 
that came with your CF installation is probably properly formatted.  Don't make 
changes unless you know precisely what you're doing.  :-)

In all seriousness, though, don't go copying everything from your old 
installation to your new one.  You will overwrite files that are important.  
You have to manually go through each file and ensure that EXACTLY the same 
stuff belongs in there on the new CF as did belong there on the old CF.  It's 
painstakingly slow, unfortunately...

--- In flexcoders@yahoogroups.com, Warren warrenony...@... wrote:

 Yes, I'm using CF8.  I didn't know the endpoints changed in.  When you get 
 all this to work, could you post it.  Soon I will be transitioning to CF9 and 
 would like the benefit of your lessons learned.
 
 
   - Original Message - 
   From: Laurence 
   To: flexcoders@yahoogroups.com 
   Sent: Friday, February 19, 2010 11:27 PM
   Subject: [flexcoders] Re: Still getting Security Sandbox violations...
 
 
 
   Ok -- I figured out #2 below... 
 flex.messaging.endpoints.SecureAMFEndpoint in the services-config.xml file 
 only belongs there in ColdFusion 8. For ColdFusion 9 it's different: 
 coldfusion.flash.messaging.SecureCFAMFEndPoint (Warren's message earlier 
 said my endpoints were funky -- I'm guessing he's using CF8.)
 
   So I changed it, and now I'm not getting the 404 error.
 
   But I still want to know about the secure=false tag. Will setting that 
 prevent my channel from being secure? Yet setting it seems to be the only way 
 I can access my data, which is very stupid if that's going to un-secure my 
 channel. I mean, what's the point?
 
   Thanks,
   L.
 
   --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
2) If I go ahead and set secure=false and leave the domain=*, instead 
 of getting the Security Sandbox violation, I'm getting a 
 Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: 
 url: 'https://mydomain.com/flex2gateway/secureamf' So HTTP 404, that's 
 file-not-found... What file is it not finding?





[flexcoders] Security issues SOLVED. (Mostly...)

2010-02-20 Thread Laurence
So, here's my crossdomain.xml in its final form:

cross-domain-policy
site-control permitted-cross-domain-policies=master-only /

allow-http-request-headers-from domain=www.mydomain.com headers=* 
secure=false/
allow-access-from domain=www.mydomain.com secure=false /

/cross-domain-policy

This allows all the stuff on the SecureColdFusion channel I created to work 
just fine, as long as I access the site from mydomain.com and not from 
localhost or myserver01 (its NetBIOS name).

Even if I put allow-access-from domain=localhost/ (or 
domain=myserver01/) in there, it still won't allow access from localhost (or 
myserver01), because the security certificate is issued to mydomain.com -- the 
names don't match, so the browser/Flash/CF rejects it.  (I don't know exactly 
which one is rejecting it, but somewhere along the line it's being rejected 
because of the name-mismatch.)

The only way that I can see to change that behavior is to create two more 
virtual websites that point to the same location, and give each of those 
virtual sites their own certificate (one assigned to myserver01 and one 
assigned to localhost.  Otherwise, I can't access the app on my local server 
if the Internet goes down.  Yuck.  (If anyone knows a better way, I'm all ears.)

The one thing that still bothers me about this setup is the 'secure=false' 
tags.  I cannot get a straight answer as to exactly what this does to my 
security.  It enables http .SWFs to access https data, sure.  But does that 
mean it's disabling all https when it does that?  Or does it mean that it is 
secure during transit over the Internet, but not when it's being held in the 
Flex app?  Or does it mean something entirely different?  There is no site that 
has a direct answer to this -- they all just say it's not recommended due to 
security issues, or something along those lines.  But they don't specify WHAT 
security issues there are.  I need to know -- I can't serve my entire app over 
an https connection because it'll be too slow, but I must have secure access to 
some of the data...

So if anyone can answer the 'secure=false' question specifically, I would be 
very grateful.

Thanks,
L.




[flexcoders] Capturing a browser-refresh event...

2010-02-20 Thread Laurence
In my app, if you click the browser's refresh button, it re-loads the app and 
starts it over from the beginning (as you'd expect.)

I want my app to be able to capture this refresh event (or perhaps just block 
it completely?) so that users won't lose all the data they've entered if they 
accidentally click the browser's refresh button.  Ideally it would give them a 
pop-up window telling them that they're about to lose all their data, and allow 
them to cancel the refresh if they desire.

Is this possible?  How can I do that from my Flex app?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: .CFC cannot be accessed remotely...

2010-02-20 Thread Laurence
Thanks!

L.


--- In flexcoders@yahoogroups.com, Jochem van Dieten joch...@... wrote:

 On Sun, Feb 21, 2010 at 5:27 AM, Laurence wrote:
  Where do I go to keep up with the patches for CF9?  Is there a single page 
  somewhere that lists all the patches that have been released for CF9?
 
 Security patches: http://www.adobe.com/support/security/#coldfusion
 Optional updates: 
 http://www.adobe.com/support/coldfusion/downloads_updates.html
 
 Jochem
 
 -- 
 Jochem van Dieten
 http://jochem.vandieten.net/





[flexcoders] .CFC cannot be accessed remotely...

2010-02-19 Thread Laurence
I've reinstalled everything on my server, including FlexBuilder and 
ColdFusion...

Now, when I run my app from within FlexBuilder, I get the following error 
message:
The method 'updateLoginInfo' in component 
C:\Inetpub\wwwroot\QMS\cfcs\dao\LoginDAO.cfc cannot be accessed remotely.

What does that mean?  It accesses the .CFC file when it reads the login info, 
but won't access it when it updates (writes) login info?  I really don't get 
that...

One note: I did have a problem importing the project into FlexBuilder.  It kept 
looking for a file called {CFROOT_FLEX}/wwwroot/WEB-INF/flex/libs/fds.swc but 
that file (and the entire folder, for that matter) isn't on this computer 
anymore...  Is that causing the remote-access problem?  If so, where/how do I 
get my CF web-inf/flex/libs stuff back?  I've installed CF9, and I was 
running CF8 before, so is there something in FB3 that I have to change for it 
to realize I'm now using CF9?  Should I have installed FB3 before I installed 
CF9?

Thanks for any help you can give me.
L.




[flexcoders] Re: .CFC cannot be accessed remotely...

2010-02-19 Thread Laurence
Very weird...  The access was set to public.  Don't know how that was working 
on my old server -- I didn't change any code at all...  And it worked fine on 
the old setup...  So now, I have to set the access to remote, and it works 
fine...

Thanks a bunch!!
L.


--- In flexcoders@yahoogroups.com, Darrin Kay dar...@... wrote:

 I wouold need to see the code, but I would check the path.  You did make the
 function access=remote?
 
 Darrin
 



[flexcoders] Flex doesn't appear to be using my services-config.xml file...

2010-02-19 Thread Laurence
I've added a secure channel to my services-config.xml file, yet Flex tells me 
the channel doesn't exist when I try to use it.  No Security Sandbox errors or 
anything -- just Destination 'SecureColdFusion' either does not exist or the 
destination has no channels defined

But it does exist, and the channel is defined:
destination id=SecureColdFusion
channels
channel ref=my-cfamf-secure/
/channels
properties
source*/source
/properties
/destination

channel-definition id=my-cfamf-secure 
class=mx.messaging.channels.SecureAMFChannel
endpoint 
uri=https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure;
 class=coldfusion.flash.messaging.SecureCFAMFEndPoint/
properties
polling-enabledfalse/polling-enabled

add-no-cache-headersfalse/add-no-cache-headers
serialization

enable-small-messagesfalse/enable-small-messages
/serialization
coldfusion
!-- define the resolution rules and access 
level of the cfc being invoked --
access
!-- Use the ColdFusion 
mappings to find CFCs--

use-mappingstrue/use-mappings
!-- allow public and remote 
or just remote methods to be invoked --

method-access-levelremote/method-access-level
/access

!-- Whether the Value Object CFC has 
getters and setters. Set the value of use-accessors to true if there are 
getters and setters in the Value Object CFC. --
use-accessorstrue/use-accessors
!--Set the value of use-structs to 
true if you don't require any translation of ActionScript to CFCs. The 
assembler can still return structures to Flex, even if the value is false. The 
default value is false.--
use-structsfalse/use-structs

property-case
!-- cfc property names --
force-cfc-lowercasefalse/force-cfc-lowercase
!-- Query column names --
force-query-lowercasefalse/force-query-lowercase
!-- struct keys --
force-struct-lowercasefalse/force-struct-lowercase
/property-case
/coldfusion
/properties
/channel-definition
   
So why is Flex telling me this destination has no defined channels?




[flexcoders] Re: Flex doesn't appear to be using my services-config.xml file...

2010-02-19 Thread Laurence
You say within Flex.  Where, exactly?  I thought the only place 
services-config.XML was supposed to be was in the WEB-INF folder?

So maybe that's my problem -- Flex is looking for servces-config.xml somewhere 
else.  But I did a search and it doesn't appear anywhere but in WEB-INF...  So 
where should it be?

Thanks,
L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 I don't know whether it is the same in ColdFusion or not but in my case with 
 WebORB I have to have the destination set in the services-config.xml file in 
 the WEB-INF directory on the server as well as within Flex.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  I've added a secure channel to my services-config.xml file, yet Flex tells 
  me the channel doesn't exist when I try to use it.  No Security Sandbox 
  errors or anything -- just Destination 'SecureColdFusion' either does not 
  exist or the destination has no channels defined
  
  But it does exist, and the channel is defined:
  destination id=SecureColdFusion
  channels
  channel ref=my-cfamf-secure/
  /channels
  properties
  source*/source
  /properties
  /destination
  
  channel-definition id=my-cfamf-secure 
  class=mx.messaging.channels.SecureAMFChannel
  endpoint 
  uri=https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure;
   class=coldfusion.flash.messaging.SecureCFAMFEndPoint/
  properties
  polling-enabledfalse/polling-enabled
  
  add-no-cache-headersfalse/add-no-cache-headers
  serialization
  
  enable-small-messagesfalse/enable-small-messages
  /serialization
  coldfusion
  !-- define the resolution rules and access 
  level of the cfc being invoked --
  access
  !-- Use the ColdFusion 
  mappings to find CFCs--
  
  use-mappingstrue/use-mappings
  !-- allow public and remote 
  or just remote methods to be invoked --
  
  method-access-levelremote/method-access-level
  /access
  
  !-- Whether the Value Object CFC has 
  getters and setters. Set the value of use-accessors to true if there are 
  getters and setters in the Value Object CFC. --
  use-accessorstrue/use-accessors
  !--Set the value of use-structs to 
  true if you don't require any translation of ActionScript to CFCs. The 
  assembler can still return structures to Flex, even if the value is false. 
  The default value is false.--
  use-structsfalse/use-structs
  
  property-case
  !-- cfc property names --
  force-cfc-lowercasefalse/force-cfc-lowercase
  !-- Query column names --
  force-query-lowercasefalse/force-query-lowercase
  !-- struct keys --
  
  force-struct-lowercasefalse/force-struct-lowercase
  /property-case
  /coldfusion
  /properties
  /channel-definition
 
  So why is Flex telling me this destination has no defined channels?
 





[flexcoders] Re: Flex doesn't appear to be using my services-config.xml file...

2010-02-19 Thread Laurence
I was able to go into my compiler and point it to the proper place with the 
-services tag.  That seems to have fixed the channel not defined error that I 
was getting.

Thanks.

--- In flexcoders@yahoogroups.com, Warren warrenony...@... wrote:
 In our configurations I have no access to the web-inf so we had to fool 
 builder.  We placed a copy of the services-config.xml where I could get at 
 it.  Then I pointed builder at it by setting a compiler argument.  In your 
 project properties go to the Flex Compiler and put in something like 
 
 -services myfullyresolvedpath\services-config.xml -locale en_US
 




[flexcoders] Still getting Security Sandbox violations...

2010-02-19 Thread Laurence
Here's my crossdomain.xml file:
?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
allow-access-from domain=*/
/cross-domain-policy

So how is it, with EVERY domain allowed, I'm getting the same old Connection 
to https://mydomain.com/flex2gateway/secureamf halted - not permitted from 
http://mydomain.com/myappfolder/myapp.swf;?

Now, I've read some of the information on policy files...  They mentioned 
something about setting secure=false in the allow-access-from line if 
you're accessing https: data from an SWF file that was loaded with the http: 
protocol.

I have two questions about that:
1) If I set secure=false won't that negate the whole point of using a secure 
channel in the first place?  I mean, why have a secure channel if you're going 
to set secure=false?!  (Further, if I put my actual domain in there instead 
of *, setting secure=false still gives me the Security Sandbox violation 
anyway... So what's the point, really?  secure=false doesn't seem to be what 
I want here.)

2) If I go ahead and set secure=false and leave the domain=*, instead of 
getting the Security Sandbox violation, I'm getting a Channel.Connect.Failed 
error NetConnection.Call.Failed: HTTP: Status 404: url: 
'https://mydomain.com/flex2gateway/secureamf'  So HTTP 404, that's 
file-not-found...  What file is it not finding?

Did I mention that I truly despise dealing with network security?  Especially 
when it won't work correctly.  LOL

Thanks,
L.



[flexcoders] Re: Still getting Security Sandbox violations...

2010-02-19 Thread Laurence
Ok -- I figured out #2 below... flex.messaging.endpoints.SecureAMFEndpoint in 
the services-config.xml file only belongs there in ColdFusion 8.  For 
ColdFusion 9 it's different: coldfusion.flash.messaging.SecureCFAMFEndPoint  
(Warren's message earlier said my endpoints were funky -- I'm guessing he's 
using CF8.)

So I changed it, and now I'm not getting the 404 error.

But I still want to know about the secure=false tag.  Will setting that 
prevent my channel from being secure?  Yet setting it seems to be the only way 
I can access my data, which is very stupid if that's going to un-secure my 
channel.  I mean, what's the point?

Thanks,
L.

  

--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:
 2) If I go ahead and set secure=false and leave the domain=*, instead of 
 getting the Security Sandbox violation, I'm getting a Channel.Connect.Failed 
 error NetConnection.Call.Failed: HTTP: Status 404: url: 
 'https://mydomain.com/flex2gateway/secureamf'  So HTTP 404, that's 
 file-not-found...  What file is it not finding?



[flexcoders] Re: Will Flash 10.1 do much for Flex or is it mostly for video?

2010-02-19 Thread Laurence
Assuming they bother to bring those optimizations to the big computers, of 
course...  But if they do, I think your theory has merit.


--- In flexcoders@yahoogroups.com, tntomek tnto...@... wrote:

 Meant more for all of our 'regular' web based apps. I would think that the 
 mobile work would carry through to standard browser players in terms of 
 optimizing vector CPU usage hence making our web Flex apps run a bit slicker.
 
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  Well, when they get 10.1 working on Mobile Phones, it'll mean all our Flex 
  apps can go mobile.  And I believe AIR 2.0 is scheduled for a release at 
  the same time as Flash 10.1, yes?  AIR 2.0 is also supposed to run on 
  mobile platforms, if I'm not mistaken.
  
  But other than the new mobile abilities, I'm not real sure there's going to 
  be much that affects us Flex developers.
  
  Laurence MacNeill
  Mableton, Georgia, USA
  
  --- In flexcoders@yahoogroups.com, tntomek tntomek@ wrote:
  
   bump
   
   --- In flexcoders@yahoogroups.com, tntomek tntomek@ wrote:
   
Seems like the recent Adobe vs Jobs fiasco brought up some good 
performance debates. So will 10.1 really improve core non-video line of 
business Flex apps? or is is mostly to help CPU of youtube down and 
enable better mobile flash
   
  
 





[flexcoders] Any Adobe folks on here?

2010-02-18 Thread Laurence
How hard is it to understand?  I purchased a copy of ColdFusion 8 about two 
years ago.  We've been running it this entire time.  I had been running the 
32-bit version of CF8, and recently discovered that enabling 32-bit apps on our 
64-bit version of IIS is what was causing all the security problems (or at 
least it appeared to be the case, because when I formatted and re-installed 
everything, the IIS server started doing its weird stuff again immediately 
after I installed the 32-bit Reporting Services for MS SQL Server 2005.)

Anyway -- long story short -- I need to install the 64-bit version of CF8.  But 
my license key won't work with it.  It only works with the 32-bit version of 
CF8.  I can go all the way through the install process on the 32-bit version of 
CF8.  But on the 64-bit version, it chokes when I enter the key.  The very same 
key that WORKS in the 32-bit version.

So all I need is a key that will work with the 64-bit version of CF8.  I've 
been on the phone and on the live-chat with Adobe tech-support for HOURS!!!  
And they just don't get it!!  I just need a damn key that will work.  I've 
given them my existing key, and they tell me that it is a valid key.  So why 
won't it work with the 64-bit version of CF8?!!!  It's a simple request -- give 
me a key that will work with CF8 64-bit!  Damn!




[flexcoders] Re: Any Adobe folks on here?

2010-02-18 Thread Laurence
With the help of an Adobe person who e-mailed me privately, we have figured out 
what is wrong...  Apparently 64-bit ColdFusion 8 is only available for the 
Enterprise Edition.  My key only covers the Standard Edition.  So at least we 
know why the key wasn't working.  Why the customer-service and/or tech-support 
people couldn't tell me that is just beyond me...  Would've save a LOT of time 
if they'd just known that fact from the beginning.

Anyway -- now my problem is this:  How do I install 32-bit CF8 on a 64-bit IIS 
without killing CertSrv?  Heck, I guess I should join a CF group, eh?  LOL  I 
think I'll do that right now.  But if there are any folks in the Flex group 
here who've dealt with this problem, please feel free to e-mail me.

Thanks,
L.


--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 How hard is it to understand?  I purchased a copy of ColdFusion 8 about two 
 years ago.  We've been running it this entire time.  I had been running the 
 32-bit version of CF8, and recently discovered that enabling 32-bit apps on 
 our 64-bit version of IIS is what was causing all the security problems (or 
 at least it appeared to be the case, because when I formatted and 
 re-installed everything, the IIS server started doing its weird stuff again 
 immediately after I installed the 32-bit Reporting Services for MS SQL Server 
 2005.)
 
 Anyway -- long story short -- I need to install the 64-bit version of CF8.  
 But my license key won't work with it.  It only works with the 32-bit version 
 of CF8.  I can go all the way through the install process on the 32-bit 
 version of CF8.  But on the 64-bit version, it chokes when I enter the key.  
 The very same key that WORKS in the 32-bit version.
 
 So all I need is a key that will work with the 64-bit version of CF8.  I've 
 been on the phone and on the live-chat with Adobe tech-support for HOURS!!!  
 And they just don't get it!!  I just need a damn key that will work.  I've 
 given them my existing key, and they tell me that it is a valid key.  So why 
 won't it work with the 64-bit version of CF8?!!!  It's a simple request -- 
 give me a key that will work with CF8 64-bit!  Damn!





[flexcoders] Re: Will Flash 10.1 do much for Flex or is it mostly for video?

2010-02-18 Thread Laurence
Well, when they get 10.1 working on Mobile Phones, it'll mean all our Flex apps 
can go mobile.  And I believe AIR 2.0 is scheduled for a release at the same 
time as Flash 10.1, yes?  AIR 2.0 is also supposed to run on mobile platforms, 
if I'm not mistaken.

But other than the new mobile abilities, I'm not real sure there's going to be 
much that affects us Flex developers.

Laurence MacNeill
Mableton, Georgia, USA

--- In flexcoders@yahoogroups.com, tntomek tnto...@... wrote:

 bump
 
 --- In flexcoders@yahoogroups.com, tntomek tntomek@ wrote:
 
  Seems like the recent Adobe vs Jobs fiasco brought up some good performance 
  debates. So will 10.1 really improve core non-video line of business Flex 
  apps? or is is mostly to help CPU of youtube down and enable better mobile 
  flash
 





[flexcoders] Re: Any Adobe folks on here?

2010-02-18 Thread Laurence
Well, I figured this one out, too...  Apparently it's not possible to install 
32-bit *anything* on 64-bit IIS, unless you put IIS into 32-bit mode by 
running the following script:
C:\Inetpub\AdminScripts\cscript.exe adsutil.vbs set 
W3SVC/AppPools/enable32BitAppOnWin64 true

And it's that script that kills CertSrv on 64-bit IIS.  This flag must be set 
to false in order for CertSrv to work on IIS.

So to solve the problem, I talked my boss into buying 64-bit ColdFusion 9 
Standard Edition Upgrade.  Hell of a solution, eh?  LOL

Anyway -- thanks to the guy from Adobe who e-mailed me off-list (and especially 
thanks to the group-member here who forwarded my e-mail to him!!)  Without your 
help, I'd never have figured this out.  (I'm not naming names, in case they 
want their identities kept private -- but I know who you are, and you have my 
gratitude.)

L.


--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:
 Anyway -- now my problem is this:  How do I install 32-bit CF8 on a 64-bit 
 IIS without killing CertSrv?  Heck, I guess I should join a CF group, eh?  
 LOL  I think I'll do that right now.  But if there are any folks in the Flex 
 group here who've dealt with this problem, please feel free to e-mail me.
 
 Thanks,
 L.
 
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  How hard is it to understand?  I purchased a copy of ColdFusion 8 about two 
  years ago.  We've been running it this entire time.  I had been running the 
  32-bit version of CF8, and recently discovered that enabling 32-bit apps on 
  our 64-bit version of IIS is what was causing all the security problems (or 
  at least it appeared to be the case, because when I formatted and 
  re-installed everything, the IIS server started doing its weird stuff again 
  immediately after I installed the 32-bit Reporting Services for MS SQL 
  Server 2005.)
  
  Anyway -- long story short -- I need to install the 64-bit version of CF8.  
  But my license key won't work with it.  It only works with the 32-bit 
  version of CF8.  I can go all the way through the install process on the 
  32-bit version of CF8.  But on the 64-bit version, it chokes when I enter 
  the key.  The very same key that WORKS in the 32-bit version.
  
  So all I need is a key that will work with the 64-bit version of CF8.  I've 
  been on the phone and on the live-chat with Adobe tech-support for HOURS!!! 
   And they just don't get it!!  I just need a damn key that will work.  I've 
  given them my existing key, and they tell me that it is a valid key.  So 
  why won't it work with the 64-bit version of CF8?!!!  It's a simple request 
  -- give me a key that will work with CF8 64-bit!  Damn!
 





[flexcoders] FlexBuilder 3 and ColdFusion 9 Extensions...

2010-02-18 Thread Laurence
Anyone know where I can download the ColdFusion 9 Extensions for  Eclipse?  I 
can find only the CF8 Extensions...  I'd really like to install the CF9 
Extensions, assuming they exist...

Thanks,
L.




[flexcoders] Re: Any Adobe folks on here?

2010-02-18 Thread Laurence
That is exactly correct.  You can have either a 64-bit app pool or a 32-bit app 
pool running on any given site.  But not both at the same time on the same site.


--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:
 I think you may be able to just set up a single application pool to 32 bit, 
 but I am not sure if CertSrv can run in one application pool while CF8 runs 
 in another.
 
 For more details, check out 
 http://www.insideria.com/2009/09/64-bit-windows-iis-and-microso-1.html
 
 HTH;
 
 Amy





[flexcoders] I hate dealing with security issues...

2010-02-17 Thread Laurence
Ok.  I finally figured out how to create my own security certificate on my 
Windows 2003 server, using Certificate Services.  I can access my server using 
https:// right now -- the browser gives me an error because it's not a trusted 
cert, of course, but https:// does work if I ignore the not trusted message...

So, I'm trying to secure a ColdFusion 8 data-channel on my intranet.  I've 
edited the services-config.xml file to give me a cf-amf-secure channel, and I'm 
directing one of my remote objects to my new SecureColdFusion destination...

Obviously the CF part appears to be working -- because it IS attempting to 
access https://localhost/flex2gateway/cfamfsecure.  But every time it does, I 
get a cross-domain policy error.  If I run the program in Debug mode, I 
actually get a failed to load https://localhost/crossdomain.xml; error message 
immediately before I get the general security sandbox error.

What I think is happening is that Flex is trying to load the crossdomain.xml 
file through https:// not http:// and the untrusted security certificate is 
preventing the crossdomain.xml file from being loaded.  I did add a 
'Security.loadPolicyFile(http://localhost/crossdomain.xml;);' command to my 
program, and that didn't change anything.  It still gives me the failed to 
load error.  Did I mention I hate security issues?

Anyway -- I think the trick is to somehow make Flex trust my self-created cert. 
 If I can do that, then it should be able to load crossdomain.xml from the 
https.  Can anyone help me get Flex to trust my self-created certificate?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: I hate dealing with security issues...

2010-02-17 Thread Laurence
Ok...  I installed the Cert in IE.  It shows up in the Trusted Root Authority 
tab in Internet Options.

Now, I'm getting the following error:  (I've replaced my actual domain with 
{myDomain} in the following example)
Warning: Domain {myDomain} does not specify a meta-policy.  Applying default 
meta-policy 'master-only'.  This configuration is deprecated.  See 
http://www.adobe.com/go/strict_policy_files to fix this problem.

Error: Request for resource at https://{myDomain}/flex2gateway/cfamfsecure by 
requestor from http://{myDomain}/QMS/QMS.swf is denied due to lack of policy 
file permissions.

*** Security Sandbox Violation ***
Connection to https://{myDomain}/flex2gateway/cfamfsecure halted - not 
permitted from http://{myDomain}/QMS/QMS.swf


So is the lack of a meta-policy now causing my problem?  (I did read that 
website it links to -- totally didn't understand a thing...)  I'm no longer 
getting the error loading policy file message, so I assume that means it's 
loading.  And {myDomain} is listed in the policy, so I really don't understand 
why this isn't working...  It should.

Did I mention I despise security problems?

Thanks for any help you can give me.
L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 This may help out:
 
 http://stackoverflow.com/questions/195275/connect-to-self-signed-https-web-services-from-flex
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  Ok.  I finally figured out how to create my own security certificate on my 
  Windows 2003 server, using Certificate Services.  I can access my server 
  using https:// right now -- the browser gives me an error because it's not 
  a trusted cert, of course, but https:// does work if I ignore the not 
  trusted message...
  
  So, I'm trying to secure a ColdFusion 8 data-channel on my intranet.  I've 
  edited the services-config.xml file to give me a cf-amf-secure channel, and 
  I'm directing one of my remote objects to my new SecureColdFusion 
  destination...
  
  Obviously the CF part appears to be working -- because it IS attempting to 
  access https://localhost/flex2gateway/cfamfsecure.  But every time it does, 
  I get a cross-domain policy error.  If I run the program in Debug mode, I 
  actually get a failed to load https://localhost/crossdomain.xml; error 
  message immediately before I get the general security sandbox error.
  
  What I think is happening is that Flex is trying to load the 
  crossdomain.xml file through https:// not http:// and the untrusted 
  security certificate is preventing the crossdomain.xml file from being 
  loaded.  I did add a 
  'Security.loadPolicyFile(http://localhost/crossdomain.xml;);' command to 
  my program, and that didn't change anything.  It still gives me the failed 
  to load error.  Did I mention I hate security issues?
  
  Anyway -- I think the trick is to somehow make Flex trust my self-created 
  cert.  If I can do that, then it should be able to load crossdomain.xml 
  from the https.  Can anyone help me get Flex to trust my self-created 
  certificate?
  
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 





[flexcoders] Re: I hate dealing with security issues...

2010-02-17 Thread Laurence
Ok - I've already posted a reply to this once, but that was an hour ago and it 
still hasn't showed up in the messages list.  So my apologies in advance if 
this winds up being a double-post.

Anyway -- I followed the intstructions for importing my cert into IE.  I can 
now browse to https://{myDomain} with no cert-errors.  But Flex still isn't 
dealing with it correctly.  (Obviously, I've replaced my real domain with 
{myDomain} in this example.)

I get the following error:
Warning: Domain {myDomain} does not specify a meta-policy.  Applying default 
meta-policy 'master-only'.  This configuration is deprecated.  See 
http://www.adobe.com/go/strict_policy_files to fix this problem.

Error: Request for resource at https://{myDomain}/flex2gateway/cfamfsecure by 
requestor from http://{myDomain}/QMS/QMS.swf is denied due to lack of policy 
file permissions.

*** Security Sandbox Violation ***
Connection to https://{myDomain}/flex2gateway/cfamfsecure halted - not 
permitted from http://{myDomain}/QMS/QMS.swf


So I'm no longer getting the error loading crossdomain.xml problem that I had 
before...  But now this new error about a meta-policy?  I went to the web-site 
it told me to go to, but I didn't understand a damn thing.  Is my lack of a 
meta-policy the problem here?

So someone please give me a clearer understanding of what a meta-policy is, and 
how to create one?  (If that is, indeed, my problem...  It's still telling me 
there's a lack of policy file permissions which is completely wrong -- 
{myDomain} is in there...)

Thanks for the help.  I truly despise security issues...  Ugh...
L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 This may help out:
 
 http://stackoverflow.com/questions/195275/connect-to-self-signed-https-web-services-from-flex
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  Ok.  I finally figured out how to create my own security certificate on my 
  Windows 2003 server, using Certificate Services.  I can access my server 
  using https:// right now -- the browser gives me an error because it's not 
  a trusted cert, of course, but https:// does work if I ignore the not 
  trusted message...
  
  So, I'm trying to secure a ColdFusion 8 data-channel on my intranet.  I've 
  edited the services-config.xml file to give me a cf-amf-secure channel, and 
  I'm directing one of my remote objects to my new SecureColdFusion 
  destination...
  
  Obviously the CF part appears to be working -- because it IS attempting to 
  access https://localhost/flex2gateway/cfamfsecure.  But every time it does, 
  I get a cross-domain policy error.  If I run the program in Debug mode, I 
  actually get a failed to load https://localhost/crossdomain.xml; error 
  message immediately before I get the general security sandbox error.
  
  What I think is happening is that Flex is trying to load the 
  crossdomain.xml file through https:// not http:// and the untrusted 
  security certificate is preventing the crossdomain.xml file from being 
  loaded.  I did add a 
  'Security.loadPolicyFile(http://localhost/crossdomain.xml;);' command to 
  my program, and that didn't change anything.  It still gives me the failed 
  to load error.  Did I mention I hate security issues?
  
  Anyway -- I think the trick is to somehow make Flex trust my self-created 
  cert.  If I can do that, then it should be able to load crossdomain.xml 
  from the https.  Can anyone help me get Flex to trust my self-created 
  certificate?
  
  Thanks,
  Laurence MacNeill
  Mableton, Georgia, USA
 





Re: [SPAM] [flexcoders] How to stop execution?

2010-02-15 Thread Laurence
Yeah, that's what I thought  Ugh...  That means re-writing a bunch of code 
just to add a damn Yes/No choice for the user...  Not fun...  I just with the 
bosses would stop wanting stuff changed!!  LOL

L.


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

 .Is there a way to stop the program's running until. No, there is no way
 to stop a function from running.  A Flex app is essentially single threaded,
 from the developers perspective.  You must have your alert box call a
 handler function, then in that function, complete whatever action you need
 based on the event.detail.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Laurence
 Sent: Sunday, February 14, 2010 10:32 PM
 To: flexcoders@yahoogroups.com
 Subject: [SPAM] [flexcoders] How to stop execution?
 
  
 
   
 
 Here's what I've got... I have an 'if' statement that calls a boolean
 function -- problem is, that function pops up a Yes/No Alert window. In
 order to know what button the user clicked, the handler-function must be
 called from the Alert pop-up, thereby preventing the boolean function from
 returning a proper value based on the outcome of the Alert window...
 
 Lemme 'splain a bit better with an example:
 
 private myMainFunction():void {
 //many things going on here before we get to the 'if' statement below.
 if (myBooleanFunction()) {
 //set a local-to-this-function variable here.
 } else {
 //set a local-to-this-function variable to something else.
 }
 //More things going on here that need the above-referenced
 local-to-this-function variable to be set before they can run.
 }
 
 private function myBooleanFunction():Boolean {
 Alert.show(Do you want to do this?,Alert...,(Alert.YES | Alert.NO, this,
 alertHandler, null, Alert.NO);
 //Flex is expecting a true/false return HERE, but I can't give one because I
 don't know the result until the alertHandler has run.
 }
 
 private function alertHandler(event:CloseEvent):void{
 if (event.detail == Alert.YES) {
 return true; //of course alertHandler isn't a boolean, so this doesn't work.
 } else {
 return false; //of course alertHandler isn't a boolean, so this doesn't
 work.
 }
 
 Of course the above example does NOT work, because the alertHandler function
 is of type void, and the myBooleanFunction doesn't return anything. So, how
 do I get the myBooleanFunction to return true/false based on the outcome of
 the alertHandler function? Is there any way to do this? If not, what's my
 alternative? Is there a way to stop the program's running until alertHandler
 sets a public variable, perhaps? What's the proper way to handle this?
 
 Thanks,
 Laurence MacNeill
 Mableton, Georgia, USA





[flexcoders] How to stop execution?

2010-02-14 Thread Laurence
Here's what I've got...  I have an 'if' statement that calls a boolean function 
-- problem is, that function pops up a Yes/No Alert window.  In order to know 
what button the user clicked, the handler-function must be called from the 
Alert pop-up, thereby preventing the boolean function from returning a proper 
value based on the outcome of the Alert window...

Lemme 'splain a bit better with an example:

private myMainFunction():void {
   //many things going on here before we get to the 'if' statement below.
   if (myBooleanFunction()) {
  //set a local-to-this-function variable here.
   } else {
  //set a local-to-this-function variable to something else.
   }
   //More things going on here that need the above-referenced 
local-to-this-function variable to be set before they can run.
}

private function myBooleanFunction():Boolean {
   Alert.show(Do you want to do this?,Alert...,(Alert.YES | Alert.NO, this, 
alertHandler, null, Alert.NO);
   //Flex is expecting a true/false return HERE, but I can't give one because I 
don't know the result until the alertHandler has run.
}

private function alertHandler(event:CloseEvent):void{
   if (event.detail == Alert.YES) {
  return true;  //of course alertHandler isn't a boolean, so this doesn't 
work.
   } else {
  return false;  //of course alertHandler isn't a boolean, so this doesn't 
work.
   }


Of course the above example does NOT work, because the alertHandler function is 
of type void, and the myBooleanFunction doesn't return anything.  So, how do I 
get the myBooleanFunction to return true/false based on the outcome of the 
alertHandler function?  Is there any way to do this?  If not, what's my 
alternative?  Is there a way to stop the program's running until alertHandler 
sets a public variable, perhaps?  What's the proper way to handle this?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




Re: [flexcoders] Credit Card number encryption

2010-02-11 Thread Laurence MacNeill
At 09:35 AM 2/11/2010, you wrote:


As far as I am aware you aren't allowed to store credit card numbers 
yourself without a weekly security audit from the card issuer...


Do what?!  I've never heard of this...  If that's the case, then the 
company I work for has been breaking the law for YEARS!  We store CC 
data (encrypted, of course) in our current database so that if a 
customer changes their mind, we don't have to reacquire the CC info 
from them to charge (or refund) their account.

In the Flex app that I'm writing, the plan is to continue to do the 
same thing...

And how would the CC issuers (dozens of 'em?  Hundreds?) all have the 
time to audit every company that uses CC info for any purpose 
whatsoever?  Doesn't sound possible to me.

Laurence MacNeill
Mableton, Georgia, USA



Re: [flexcoders] Re: Credit Card number encryption

2010-02-11 Thread Laurence MacNeill
At 12:51 PM 2/11/2010, you wrote:


You need to make your superiors aware of the PCI Compliance regulations.

You're not actually breaking the law, but you may be breaking your 
contract with your merchant provider. I read all 80+ pages or so of 
my merchant account contract. Someone at your company should do the 
same to make sure that your development practices are in compliance.

I will definitely be bringing this to their attention.  Thanks.

L.



[flexcoders] Another security question...

2010-02-11 Thread Laurence MacNeill
With all this talk about security, I figured now was the time to get 
SSL running on my Windows Server 2003 computer...

I'm sure that others here have dealt with this before -- so although 
it's not specifically a Flex topic, I'd imagine it'd be of interest 
to enough members that my posting this here won't be totally 
offensive to everyone.

Anyway -- I installed Certificate Services from the Add/Remove 
Programs on the Control Panel.  That seems to have completed successfully.

I've completed the steps in IIS to 'request a certificate' -- saved 
the request to a file on my desktop.

Now, the next step is supposed to be going to 
'http://localhost/CertSrv' and creating a new certificate from my 
.txt file that contains the saved request.  But when I browse to that 
page, it says 404 Page Not Found.

I've checked all the usual suspects -- IIS shows that CertSrv is a 
valid page, all the proper .ASP files are in there, ASP services are 
enabled on my IIS server, at a command prompt 'certutil -vroot' says 
all the virtual pages and directories are properly installed...   I'm 
just at a complete loss as to why my browser can't find the CertSrv 
page...  Heck -- I even re-booted the computer, just in case that was it.

Anyone dealt with this before?  Got any tips?

Thanks,

Laurence MacNeill
Mableton, Georgia, USA



[flexcoders] Re: Flex Project Hosting

2010-02-10 Thread Laurence
If your host can send a .SWF file to the client's browser, you can run a simple 
Flex program. 

If you want the program to do anything useful, like storing data on the server, 
for example, the host needs to offer back-end support for ColdFusion, and some 
sort of SQL database.  There are many other back-ends that will work also 
(besides ColdFusion), but I'm not knowledgeable enough to list them all here... 
 Someone else, I'm sure, will have that info.

Laurence MacNeill
Mableton, Georgia, USA

--- In flexcoders@yahoogroups.com, Shabir Gilkar shabirgil...@... wrote:

 Hi All!
 
 Do we need to purchase special hosting plans from any particular hosting
 company to host flex projects/ website OR we can go far any normal hosting
 plan e.g of Godaddy.
 
 As i personally host flash websites on simple godaddy hosting accounts. Now
 i wanna to know about Flex project hosting.
 
 -- 
 With Regards
 
 Shabir Ahmad Gilkar
 
 Srinagar Kashmir JK
 
 Voice: +91 9419942501
 email: shabirgil...@...
 URL:   http://shabirgilkar.wordpress.com
 Skype: shabirgilkar





[flexcoders] Re: Limited Heap Space Problem

2010-02-10 Thread Laurence
Well, first of all, I'd try to find another way of allowing users to view your 
50 .PNG files, without embedding them in your code.  That'll free up a TON of 
memory.  (It's why Hard Drives were invented.  GRIN)  Maybe load them into 
memory from a folder, as they're needed, rather than embedding them all?

Through a little experimentation, I've found that you CAN increase the Xms and 
Xmx variables to 1024m, if your -XX:MaxPermSize is 512m or less.  (And 
obviously the -XX:PermSize must be equal to or less than -XX:MaxPermSize.)

Also, each thread you're running will use a stack -- if the stack size is too 
big, that will limit the number of threads you can run.  So maybe the default 
stack size is too large for your particular app?  Try adding an -Xss1204k to 
the .ini file and see if that changes anything...

Best of luck.


--- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote:

 Ok I've managed to find the file which controls the heap space which Flex 
 Builder allows called the FlexBuilder.ini file in 
 Computer/C/ProgramFiles(86)/Adobe/Flex Builder 3/ but the problem is I can't 
 raise the xms and xmx attributes above 512 as when I try to start Flex I get 
 the message Unable to load the java virtual machine and then a window comes 
 up with a message of JVM terminted. Exit code=1
 
 But if I leave both values at 512 it works fine but I get an out of memory 
 error whenever I run a big application I've made. This is why I wanted to 
 increase them to 1024 like I have done with the perm sizes to solve this out 
 of memory error. Does anyone know why this is happening? My system is quite 
 new and has 2gb of RAM. The contents of my flexbuilder.ini file are:-
 
 -vmargs
 -Xms512m
 -Xmx512m
 -XX:MaxPermSize=1024m
 -XX:PermSize=1024m
 -Djava.net.preferIPv4Stack=true





[flexcoders] A security question...

2010-02-10 Thread Laurence
So, let's say I have a mx:RemoteObject in my program...  I want it to 
communicate with the server via SSL, or some other method whereby the 
credit-card numbers it sends to-and-from the server are encrypted.

Here's how it's structured currently:
mx:RemoteObject id=roPaymentInfo destination=ColdFusion
   showBusyCursor=true source={'cfcs.dao.PaymentsDAO'}
   mx:method name=getPayments result=roGetPaymentsResultHandler(event) 
fault=roFaultHandler(event)/
   mx:method name=addPayment result=roAddPaymentResultHandler(event) 
fault=roFaultHandler(event)/
/mx:RemoteObject

Do I have to make my entire program secure via an https:// in the URL, or is 
there a way to encrypt just that one mx:RemoteObject?  If there is a way to 
secure just the one object, how is that done?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: A security question...

2010-02-10 Thread Laurence
Well, I guess that begs the question -- is there an easy way to encrypt 
something in Flex?  Like ColdFusion's encrypt() function?  Does Flex have 
something like that built-in?

L.


--- In flexcoders@yahoogroups.com, Booking Heaven booking2hea...@... wrote:

 The best thing you have to do is you should encrypt it in client side before 
 it is passed to webservice (whatever it is, https or http) because man in 
 middle attack can tap your creditcard information before it is passed to 
 webservice. 
 
 Reinhart
 
 --- On Wed, 2/10/10, Laurence lmacne...@... wrote:
 
 From: Laurence lmacne...@...
 Subject: [flexcoders] A security question...
 To: flexcoders@yahoogroups.com
 Date: Wednesday, February 10, 2010, 6:18 PM
 
 
 
 
 
 
 
  
 
 
 
   
 
 
 
   
   
   So, let's say I have a mx:RemoteObject in my program...  I want it to 
 communicate with the server via SSL, or some other method whereby the 
 credit-card numbers it sends to-and-from the server are encrypted.
 
 
 
 Here's how it's structured currently:
 
 mx:RemoteObject id=roPaymentInfo destination= ColdFusion
 
showBusyCursor= true source={'cfcs. dao.PaymentsDAO' }
 
mx:method name=getPayments result=roGetPaymen tsResultHandler( event) 
 fault=roFaultHandl er(event) /
 
mx:method name=addPayment result=roAddPaymen tResultHandler( event) 
 fault=roFaultHandl er(event) /
 
 /mx:RemoteObject
 
   
 
 Do I have to make my entire program secure via an https:// in the URL, or is 
 there a way to encrypt just that one mx:RemoteObject ?  If there is a way 
 to secure just the one object, how is that done?
 
 
 
 Thanks,
 
 Laurence MacNeill
 
 Mableton, Georgia, USA





Re: [flexcoders] Flash 10.1 - When???

2010-02-09 Thread Laurence MacNeill
At 10:16 AM 2/9/2010, you wrote:


When are the official releases for Flashbuilder, Flash 10.1 and Air 
2.0. I am bragging about some of the new features , and i get asked when?

Please don't reply with, when it's ready

thanks,
Patrick

Don't know when it's coming, but it can't come soon enough for my 
Motorola Droid.  I want it NOW!  :-)


Laurence MacNeill
Mableton, Georgia, USA



Re: [flexcoders] Re: Custom ItemRenderer still not working... [1 Attachment]

2010-02-09 Thread Laurence MacNeill
I fear I'm not explaining the problem properly.  So I'm attaching a 
screen-shot of what the problem is, exactly.

As you can see from the screen-shot, the selected combo-box is 
displaying a number -- the correct number ($275.00) -- in the main 
display area.  But in the combo-box's drop down, are two completely 
unrelated numbers ($315.00 and $325.00).  If you were to select, say 
$315.00, the displayed number would change to $255, and the next time 
you open that combo box, the drop-down would show the proper numbers 
($255.00 and $275.00).

I hope that helps to explain the problem, if there are some folks out 
there who aren't understanding it.

Thanks,
L.

Re: [flexcoders] Re: Custom ItemRenderer still not working...

2010-02-09 Thread Laurence MacNeill
At 12:48 PM 2/9/2010, you wrote:


That was exactly what I was expecting to experience from your 
instructions. Of course, I don't get that experience. I also tried 
it in IE6 with the same result.

Have you confirmed that others have actually seen the problem?

I'm pretty sure Alex Hauri saw it -- he said the first 5 and last 5 
don't ever change for him.  But that implies that some of the others 
do change, which is why I think he's seen the problem.  Don't know if 
anyone else has D/L'ed the code, other than you.  I think Tracy 
Spratt is working on it, though, so he probably D/L'ed the code as well...

L.



Re: [flexcoders] Re: Custom ItemRenderer still not working...

2010-02-09 Thread Laurence MacNeill
At 01:10 PM 2/9/2010, you wrote:


At 12:48 PM 2/9/2010, you wrote:
 
 
 That was exactly what I was expecting to experience from your
 instructions. Of course, I don't get that experience. I also tried
 it in IE6 with the same result.

Just for kicks, I downloaded and installed Firefox 3.6.  The problem 
shows up in there, too...  At least, on my computer it does.  :-)

One thing I noticed, however, is that in Firefox the Flash-version 
shows up as 10,0,32,18 -- even after I visited the adobe.com site to 
update it to the newest 10,0,42,34 version...  Bug or deliberate?

L.



Re: [flexcoders] Re: Custom ItemRenderer still not working...

2010-02-09 Thread Laurence MacNeill
I just installed the latest nightly-build for Flex 3.6 -- version 3.6.0.13443.

THAT FIXED THE PROBLEM!!!

Weird that 3.6.x would fix the problem, whereas 4.0.x didn't...

And I still don't know where to get that 3.5.0.13209 or later that 
Alex Hauri talked about...  Latest 3.5 build I can find is the 3.5a 
that I've already got...  If someone could show me where to get 
3.5.0.13209, I'd appreciate it.

So -- I guess the only question I have left is this:  Can I use 3.6 
in a production build, or is it too beta for that?  I'm reluctant 
to trust a nightly build to a production environment...

Thanks,
L.



[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-08 Thread Laurence
--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 Post it here, the more eyes that look at it the better for you.
 

Know an easy way to export my SQL data as something I can post here?  Something 
like an SQL to XML conversion, so I can include the data in a text file that 
the test-program can read?


 Your DataGrid is not editable, correct?  And your render is not set
 as an editor, right?

The data grid IS editable, and one of the columns has renderer-as-editor set.  
NOT the column that's giving me the trouble.  In fact all the columns have 
editable set to false, except one column -- again, NOT the one that's giving me 
trouble.


 I assume you have debugged this and have tested to see that the
 dataProvider is set when you set selectedItem?  Maybe there is a
 timing issue with the bound dataProvider. Loop over the items to
 make sure the item exists.  And make sure it matches the
 selectedIndex.  I'd probably suggest you do this any way and use
 selectedItem always.
 
 I would use a conditional, testing for the selectedItem, rather
 than blindly setting selectedIndex every time.

Not 100% certain what you mean here...  Check to see if the selectedItem isn't 
null?  The problem I'm having is not that the selectedItem changes (or appears 
to change) when you scroll.  It's solely in the drop-down.  The data that 
appears in the drop-down will change from time-to-time as you scroll -- but the 
selected value doesn't change ever, unless you change it manually.  And when 
you do change it manually, it shows the value it's supposed to show!  Then you 
re-open the drop-down and THAT show's the correct values, too!  That's what's 
so weird about this problem.


 Finally, I strongly suggest you move that work into
 commitProperties() The set data() function gets called much more
 often than you may realize.

I've never used the commitProperties() function...  What does it do?  And when 
does it get called?  Would that work 100% of the time?  Basically you're 
telling me to do super.data = value in the set data() function, then 
populate the drop-down and selectedItem stuff in the commitProperties() 
function?  Is that what you're saying?

I'll be working on writing a test-case -- the biggest part of it seems to be 
exporting my data.  I can't find a shortcut to doing that.  But if you can 
answer my above questions, then maybe I won't have to write the test-case?

Anyway, thanks a bunch!
Laurence MacNeill
Mableton, Georgia, USA




Re: [flexcoders] Custom ItemRenderer still not working... [1 Attachment]

2010-02-08 Thread Laurence MacNeill
Well, I'm hoping that by attaching the .ZIP file to this e-mail, 
y'all can access it...  (This particular group won't let me upload a 
file to the Files section...)  It's the test-case for my custom 
ItemRenderer not working, in FlexBuilder Archived zip-file 
format.  Should be a simple matter of importing it to your FB, then 
you can see what I'm dealing with...

Thanks again, guys, for all your help.  And please let me know if the 
attachment doesn't come through...


Laurence MacNeill
Mableton, Georgia, USA


Re: [flexcoders] Custom ItemRenderer still not working... [1 Attachment]

2010-02-08 Thread Laurence MacNeill
Ok -- the first file I sent didn't include the XML data...  Sorry 
'bout that.  Trying again...


Laurence MacNeill
Mableton, Georgia, USA


[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-07 Thread Laurence
--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Maybe Tracy can figure it out from just the renderer code, but I
 think I need a complete (but small) test case with some sample data.

Can I send it to you via this list?  Or do I have to e-mail you privately 
somehow?  Just let me know where to send it, and I'll put together a small 
test-case for ya sometime in the next couple of days.

 
 The only thing I see that looks unusual (besides calling refrehs()
 is setting both selectedItem and selectedIndex.  One should be good
 enough.

Yeah, one should be good enough, I agree...  If you notice, however, that I set 
selectedItem first, then selectedIndex.  There are times (rare, but it happens) 
when the database has been corrupted or accidentally changed, and none of the 
items match in the selectedItem list.  The boss wants it to default, in that 
case, to whatever is returned by selectedIndex.  Kind of an auto-repair for his 
database.  LOL

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-06 Thread Laurence
Well, I found a work-around...

I added the following code inside my ComboBox ItemRenderer:
override protected function focusInHandler(event:FocusEvent):void {
 listOfFees.refresh();
}

For some reason, with this in there, you have to double-click on the combo box 
to open it, but the drop-down shows the correct data 100% of the time.  Good 
enough for now.





--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 Well, I installed FlashBuilder 4 Premium Beta 2, imported the project into 
 there, and ran the code.
 
 It is EXACTLY THE SAME in FB3 and FB4 -- the exact same problem appears.  I 
 scroll down in the DataGrid, and the numbers in the ItemRenderer's drop down 
 change (but not the selected number being displayed.)  If I select one of the 
 incorrect numbers, the drop-down immedately changes to the correct numbers, 
 and the number I would've selected (had it been displayed correctly) shows as 
 the selected item in the combo box.  It's just SO WEIRD!
 
 So...  What is that problem, exactly?  Anyone able to figure it out?  I'm 
 totally confused...  It should be working!  (See my earlier post for the code 
 -- I beg you, PLEASE help me figure this out!)
 
 Thanks,
 Laurence MacNeill
 Mableton, Georgia, USA
 
 
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  
  
  --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
  
   I didn't take the time to debug your code, just looked for the usual 
   suspects and didn't see any.  It was supposed to be fixed in 3.5 but 
   somehow got busted so now will be in 3.6 but not sure when that ships.
   
   I didn't really want you to port the whole project, just write a test 
   case with Flex 4 to see if you are hitting that same problem, then we can 
   figure out what to do from there.
  
  I will try that if the Array vs. ArrayCollection idea doesn't pan out...  
  Hate to go through all the trouble of installing Flex 4 Beta just for this, 
  though...  Or can I just install the 4.0 SDK in my existing FlexBuilder Pro?
 





[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-06 Thread Laurence


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

 Refresh() is intended to re-apply a sort of filter to a collection.  If it
 is working in your case it is a side effect.

Yeah, I figured as much.  I noticed that if I opened then closed then re-opened 
the drop-down, the data would sync itself properly.  Adding this refresh() 
statement was a way to force that to happen -- the user clicks on the combo 
box, the refresh happens (forcing the box closed), then the second click opens 
the drop-down with the proper data...  Total hack-job, but it works.

 
 I couldn't find your previous post to look at the code, but I still suspect
 recycling issues.  For a combo box, you have to do two actions on set data
 (actually  in commitProperties, of course).  You must re-assign to
 dataProvider, and you must set the selectedIndex (you can only use
 selectedItem if your items are simple strings or numbers).  Are you doing
 both of those things?

Here's my code as it stands right now.  Thanks for taking a look:
?xml version=1.0 encoding=utf-8?
mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml;  height=100% 
width=100%
 dataProvider={listOfFees} 
labelFunction=formatLabel change=changeHandler(event) 
 openDuration=0 closeDuration=0
mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.utils.ObjectUtil;
import mx.formatters.CurrencyFormatter;
import mx.controls.DataGrid;
import flash.events.Event;

[Bindable]private var listOfFees:ArrayCollection;

public override function set data(value:Object):void{
super.data = value;
if (value == null) {
listOfFees = null;
} else {
if (data.comp != y) {
listOfFees = new 
ArrayCollection([data.course_fee1]);
if (data.course_fee2 != 0) {
listOfFees.addItem(data.course_fee2); }
if (data.course_fee3 != 0) {
listOfFees.addItem(data.course_fee3); }
if (data.course_fee4 != 0) {
listOfFees.addItem(data.course_fee4); }
if (data.course_fee5 != 0) {
listOfFees.addItem(data.course_fee5); }
} else {
listOfFees = new ArrayCollection([0] as Array);
}

if (data.editable == y) {
this.enabled = true;
} else {
this.enabled = false;
}

this.selectedItem = data.fee_chosen;
this.selectedIndex = data.fee_type - 1;
}
}

private function formatLabel(item:Object):String {
return currencyFormat.format(item);
}

override protected function 
focusInHandler(event:FocusEvent):void {
listOfFees.refresh();
}

public function changeHandler(event:Event):void {
data.fee_chosen = this.selectedItem;
data.fee_type = this.selectedIndex + 1;
}

]]
/mx:Script

mx:CurrencyFormatter id=currencyFormat precision=2/

/mx:ComboBox




[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-05 Thread Laurence
Hmmm...  That's an idea...  data.course_fees is coming out of the database as 
an Array -- perhaps I should rewrite that so it comes out as an ArrayCollection 
from the very beginning...  I'll give that a shot...  (Yes, I know I can put an 
Array into an ArrayCollection, but if Array isn't behaving properly, I 
shouldn't use it at all, right?)

If I were to do something like:
listOfFees:ArrayCollection = new ArrayCollection(data.course_fees);
would that pass a reference to the ArrayCollection, or will that be making a 
copy?

--- In flexcoders@yahoogroups.com, wrhinfl wrhi...@... wrote:

 I thought array does not broadcast updates nicely (uniformly/as expected), 
 can you change the declaration of listOfFees from:
 [Bindable]private var listOfFees:Array;
 to:[Bindable]private var listOfFees:ArrayCollection;
 



[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-05 Thread Laurence


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

 I didn't take the time to debug your code, just looked for the usual suspects 
 and didn't see any.  It was supposed to be fixed in 3.5 but somehow got 
 busted so now will be in 3.6 but not sure when that ships.
 
 I didn't really want you to port the whole project, just write a test case 
 with Flex 4 to see if you are hitting that same problem, then we can figure 
 out what to do from there.

I will try that if the Array vs. ArrayCollection idea doesn't pan out...  Hate 
to go through all the trouble of installing Flex 4 Beta just for this, 
though...  Or can I just install the 4.0 SDK in my existing FlexBuilder Pro?





[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-05 Thread Laurence
Well, hmmm...  I can't rewrite it so data.course_fees is an ArrayCollection -- 
when I change the 'EventVO.as' such that course_fees is an ArrayCollection 
instead of an Array, it comes back from the database as null...  Perhaps that's 
a problem with my CF code (EventVO.cfc and EventDAO.cfc)?  How do you get CF to 
send data back as an ArrayCollection instead of an Array?  I'm thinking that's 
not possible...

If I leave the EventVO.as alone, and course_fees is an Array, then I still have 
the same problem in my ItemRenderer -- doesn't seem to matter if I make 
listOfFees an Array or ArrayCollection...


--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 Hmmm...  That's an idea...  data.course_fees is coming out of the database as 
 an Array -- perhaps I should rewrite that so it comes out as an 
 ArrayCollection from the very beginning...  I'll give that a shot...  (Yes, I 
 know I can put an Array into an ArrayCollection, but if Array isn't behaving 
 properly, I shouldn't use it at all, right?)
 
 If I were to do something like:
 listOfFees:ArrayCollection = new ArrayCollection(data.course_fees);
 would that pass a reference to the ArrayCollection, or will that be making a 
 copy?
 
 --- In flexcoders@yahoogroups.com, wrhinfl wrhinfl@ wrote:
 
  I thought array does not broadcast updates nicely (uniformly/as 
  expected), can you change the declaration of listOfFees from:
  [Bindable]private var listOfFees:Array;
  to:[Bindable]private var listOfFees:ArrayCollection;
 





[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-05 Thread Laurence
Well, I installed FlashBuilder 4 Premium Beta 2, imported the project into 
there, and ran the code.

It is EXACTLY THE SAME in FB3 and FB4 -- the exact same problem appears.  I 
scroll down in the DataGrid, and the numbers in the ItemRenderer's drop down 
change (but not the selected number being displayed.)  If I select one of the 
incorrect numbers, the drop-down immedately changes to the correct numbers, and 
the number I would've selected (had it been displayed correctly) shows as the 
selected item in the combo box.  It's just SO WEIRD!

So...  What is that problem, exactly?  Anyone able to figure it out?  I'm 
totally confused...  It should be working!  (See my earlier post for the code 
-- I beg you, PLEASE help me figure this out!)

Thanks,
Laurence MacNeill
Mableton, Georgia, USA



--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  I didn't take the time to debug your code, just looked for the usual 
  suspects and didn't see any.  It was supposed to be fixed in 3.5 but 
  somehow got busted so now will be in 3.6 but not sure when that ships.
  
  I didn't really want you to port the whole project, just write a test case 
  with Flex 4 to see if you are hitting that same problem, then we can figure 
  out what to do from there.
 
 I will try that if the Array vs. ArrayCollection idea doesn't pan out...  
 Hate to go through all the trouble of installing Flex 4 Beta just for this, 
 though...  Or can I just install the 4.0 SDK in my existing FlexBuilder Pro?





[flexcoders] Re: Trying to use an Array inside a VO.

2010-02-04 Thread Laurence
THANKS so much!!!  I was taking it too literally -- trying to make an actual 
blank array, rather than just setting it to null.  LOL  Been working too long 
without a break, I guess.

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 try param2:Array= null
 C
 
 
 
 
 
 From: laurence5905 lmacne...@...
 To: flexcoders@yahoogroups.com
 Sent: Thu, February 4, 2010 12:18:47 PM
 Subject: [flexcoders] Trying to use an Array inside a VO.
 

 I have a Value Object called EventVO.  Inside this object, I want there to be 
 an Array, in addition to the various Strings and ints that are in there 
 already of course.
 
 My problem comes in the initialization function.  It currently looks 
 something like this:
 public function EventVO ( param1:String= , param2:int=0) {
 this.param1 = param1;
 this.param2 = param2;
 }
 
 Let's say I want to make param2 an Array instead.  I would think it should 
 look something like this:
 public function EventVO (param1:String= , param2:Array= []) {
 this.param1 = param1;
 this.param2 = param2;
 }
 
 But that gives me the following error:
 1047: Parameter initializer unknown or is not a compile-time constant.
 
 So how the heck do you initialize an Array inside a list of 
 function-parameters ?  This has been driving me CRAZY!!  I can't find the 
 answer anywhere.
 
 Your help would be greatly appreciated.  Thanks.





[flexcoders] Custom ItemRenderers and scrolling on a DataGrid...

2010-02-04 Thread Laurence
Ok, I know this question has been asked a thousand times (or more), but when I 
search for information on Item Renderers here, it just returns SO many results 
that I just can't find what I'm looking for...

How do you get a custom Item Renderer not to change its data when you scroll 
down a list on a DataGrid?  I just can't remember the trick to making it 
happen...

Here's the link to a site with an example of what I want to do: 
http://butterfliesandbugs.wordpress.com/2007/09/11/dynamic-itemrenderer-using-a-combobox/
  

If you take that above example, and set the DataGrid's rowCount = 3, then 
scroll it back and forth a few times, it corrupts the data in the ComboBoxes... 
 How would you fix that?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Assigning arrays...

2010-02-04 Thread Laurence
I need to copy one array to another -- NOT copy a reference to the array...  

For example:
array1 = array2 will simply copy a reference to array2 into array1.

I want to do something like this:
array1 = new Array(array2).

Of course, that doesn't work...  It simply creates a blank array that's 
pre-allocated to be the length of whatever array2's length was...  (At least 
that's what I think is going on...)

Anyway -- how do I copy one array to another, without looping through the 
entire array?




[flexcoders] Re: Custom ItemRenderers and scrolling on a DataGrid...

2010-02-04 Thread Laurence
Never mind -- I think I've figured it out...  Sorry for the bother...


--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 Ok, I know this question has been asked a thousand times (or more), but when 
 I search for information on Item Renderers here, it just returns SO many 
 results that I just can't find what I'm looking for...
 
 How do you get a custom Item Renderer not to change its data when you scroll 
 down a list on a DataGrid?  I just can't remember the trick to making it 
 happen...
 
 Here's the link to a site with an example of what I want to do: 
 http://butterfliesandbugs.wordpress.com/2007/09/11/dynamic-itemrenderer-using-a-combobox/
   
 
 If you take that above example, and set the DataGrid's rowCount = 3, then 
 scroll it back and forth a few times, it corrupts the data in the 
 ComboBoxes...  How would you fix that?
 
 Thanks,
 Laurence MacNeill
 Mableton, Georgia, USA





[flexcoders] Custom ItemRenderer still not working...

2010-02-04 Thread Laurence
I thought I had this figured out...  But apparently I don't...

Can someone please tell me why this won't work as a custom ItemRenderer?  I 
scroll up and down, and the selected value in the ComboBox does NOT change, but 
the values in the drop-down DO change.  I'm at a loss as to why...

BEGIN CODE:
?xml version=1.0 encoding=utf-8?
mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml;  height=100% 
width=100%
 dataProvider={listOfFees} 
labelFunction=formatLabel change=changeHandler(event) 
 openDuration=0 closeDuration=0
mx:Script
![CDATA[
import mx.formatters.CurrencyFormatter;
import mx.controls.DataGrid;
import flash.events.Event;

[Bindable]private var listOfFees:Array;

public override function set data(value:Object):void{
super.data = value;
if (value == null) {
listOfFees = null;
} else {
if (data.comp != y) {
listOfFees = data.course_fees.concat();
} else {
listOfFees = new Array([0]);
}

if (data.editable == y) {
this.enabled = true;
} else {
this.enabled = false;
}

this.selectedItem = data.fee_chosen;
}
}

private function formatLabel(item:Object):String {
return currencyFormat.format(item);
}

public function changeHandler(event:Event):void {
data.fee_chosen = this.selectedItem;
}

]]
/mx:Script

mx:CurrencyFormatter id=currencyFormat precision=2/

/mx:ComboBox



[flexcoders] Re: Assigning arrays...

2010-02-04 Thread Laurence
Well, it appears they both work...

But my ItemRenderer (see my other post) is still not working correctly.  I had 
assumed it wasn't working because I was passing it a reference to the array 
that's used to populate the ComboBox, rather than passing it a new array...  
But no matter what I do, I can't get the comboBox drop-down to render properly 
after a scroll...

Very frustrating...


--- In flexcoders@yahoogroups.com, Fotis Chatzinikos fotis.chatzini...@... 
wrote:

 ObjectUtil.copy() ?
 
 On Thu, Feb 4, 2010 at 6:10 PM, claudiu ursica the_bran...@...wrote:
 
 
 
  Array.splice method (Array.concat or Array.join) check the docs I don;t
  know them by heart.
  C
 
  --
  *From:* Laurence lmacne...@...
  *To:* flexcoders@yahoogroups.com
  *Sent:* Thu, February 4, 2010 6:02:46 PM
  *Subject:* [flexcoders] Assigning arrays...
 
 
 
  I need to copy one array to another -- NOT copy a reference to the array...
 
 
  For example:
  array1 = array2 will simply copy a reference to array2 into array1.
 
  I want to do something like this:
  array1 = new Array(array2) .
 
  Of course, that doesn't work... It simply creates a blank array that's
  pre-allocated to be the length of whatever array2's length was... (At least
  that's what I think is going on...)
 
  Anyway -- how do I copy one array to another, without looping through the
  entire array?
 
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 LivinData Technologies
 www.styledropper.com
 fotis.chatzini...@...,





[flexcoders] Re: Custom ItemRenderer still not working...

2010-02-04 Thread Laurence
Unfortunately, that won't work...  This is part of a larger project, and that 
would mean migrating the entire project to Flex 4.  Not gonna happen, 
unfortunately...

I *am* using the Flex 3.5 SDK for this, however...  Wouldn't they have fixed 
any issues, if they found them when creating Flex 4?  Or maybe not...  Not real 
sure what 3.5 fixed from 3.2...

But I am assuming that, from your response, you can't find anything wrong with 
my code?  It should work, but for some reason it just doesn't, right?

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

 Try the Flex 4 prerelease build.  You might be hitting a combobox issue that 
 is fixed in Flex 4.
 
 
 On 2/4/10 8:41 AM, Laurence lmacne...@... wrote:
 
 
 
 
 
 
 I thought I had this figured out...  But apparently I don't...
 
 Can someone please tell me why this won't work as a custom ItemRenderer?  I 
 scroll up and down, and the selected value in the ComboBox does NOT change, 
 but the values in the drop-down DO change.  I'm at a loss as to why...
 
 BEGIN CODE:
 ?xml version=1.0 encoding=utf-8?
 mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml;  height=100% 
 width=100%
  dataProvider={listOfFees} labelFunction=formatLabel 
 change=changeHandler(event)
  openDuration=0 closeDuration=0
 mx:Script
 ![CDATA[
 import mx.formatters.CurrencyFormatter;
 import mx.controls.DataGrid;
 import flash.events.Event;
 
 [Bindable]private var listOfFees:Array;
 
 public override function set data(value:Object):void{
  super.data = value;
  if (value == null) {
  listOfFees = null;
  } else {
 if (data.comp != y) {
 listOfFees = data.course_fees.concat();
 } else {
 listOfFees = new Array([0]);
 }
 
 if (data.editable == y) {
 this.enabled = true;
 } else {
 this.enabled = false;
 }
 
 this.selectedItem = data.fee_chosen;
  }
  }
 
 private function formatLabel(item:Object):String {
 return currencyFormat.format(item);
 }
 
 public function changeHandler(event:Event):void {
 data.fee_chosen = this.selectedItem;
 }
 
 ]]
 /mx:Script
 
 mx:CurrencyFormatter id=currencyFormat precision=2/
 
 /mx:ComboBox
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Searching a DataGrid...

2009-09-09 Thread Laurence MacNeill
Hi,

I have a DataGrid that contains a long (sometimes VERY long) list of 
names -- anywhere from a couple hundred to over 5,000.  I need to be 
able to allow the user to search this list by typing a name (or 
part of a name) into a TextInput and clicking a button.

Implementing the TextInput and the Button are no problem of course, 
but how do I get the DataGrid to scroll down to the closest match in the list?

Thanks,

Laurence MacNeill
Mableton, Georgia, USA



Re: [flexcoders] Re: Value Objects

2009-05-28 Thread Laurence MacNeill
At 03:49 PM 5/28/2009, you wrote:

3.) Boiling everything down, the need is to manage DBase -- View 
interactions. JSP/CF can assign properties to DB elements which 
Flex/AS can map to for increased efficiencies. Cost/Benefit of CF 
included, are JSP a more programmically straightforward option??

Being relatively new to Flex, I'm probably not qualified to answer 
this question, but in my (admittedly limited) experience, I've found 
CF to be the more straightforward approach, albeit the more 
expensive one, when compared to JSP.

FlexBuilder just makes it so easy (especially with the CFEclipse 
add-on) to work with your CF server-side stuff at the same time 
you're coding in Flex.  And the CF-wizards that are included with 
FlexBuilder are so easy to use -- only a few clicks to create the CF 
VO to go with your Action-Script VO, with minimal changes needed in 
the wizard-generated CF code to make it work.

I just find woking with CF to be a ton easier than working with JSP, 
I guess is what I'm trying to say.  FlexBuilder was created by Adobe, 
so they're probably biased towards CF, which is probably why working 
with CF within FlexBuilder is easier out-of-the-box.  But it works well for me.

Just a newbie's $0.02 worth.

Laurence MacNeill
Mableton, Georgia, USA



[flexcoders] Resetting IViewCursor

2009-05-25 Thread Laurence MacNeill
I'm using an IViewCursor to find stuff in an ArrayCollection.  The 
first time I use the FindAny() method, it works fine.  The second 
time I use it, it doesn't seem to find anything.  Do I have to reset 
the cursor before I can use it again?  Move it back to the beginning 
of the ArrayCollection so it will be able to find everything?  I 
would think that FindAny() would find any instance of the search 
object, no matter where it is in the collection, but maybe I'm wrong.

So, do I need to reset the cursor to use FindAny twice?  And, if so, 
how do I do that?

Thanks,

Laurence MacNeill
Mableton, Georgia, USA



  1   2   >