Re: [flexcoders] FW: Flash Videos & Download Video Link in Real Player ?

2008-09-09 Thread Sid Maskit
In fact, anybody who is using firebug can use the net tab to see any files which have been downloaded, and can just copy the URL into the address bar to download the video directly. I'm sure there are other ways of doing this too. The basic point is that videos played in the flash player are not protected from downloading any more than are image files such as JPEG's. Sid MaskitPartner CraftySpaceBetter Websites for a Better Worldhttp://www.CraftySpace.comblog: http://smaskit.blogspot.com/- Original Message
 From: Sherif Abdou <[EMAIL PROTECTED]>To: flexcoders@yahoogroups.comSent: Tuesday, September 9, 2008 6:13:51 AMSubject: Re: [flexcoders] FW: Flash Videos & Download Video Link in Real Player ?











No There is not a way you can protect it, even if 
You stop Real Player, there is another Tool SWF Catcher and the person will get 
the video if they wanted. 
--Sherif Abdouhttp://VadexFX. comhttp://Sherifabdou. com

  - Original Message - 
  From: 
  Bharath 
  
  To: [EMAIL PROTECTED] ups.com 
  Sent: Tuesday, September 09, 2008 1:16 
  AM
  Subject: [flexcoders] FW: Flash Videos 
  & Download Video Link in Real Player ?
  
  
  
  
  Hi All, 
   
  Latest Version of Real Player 
  Gives an option to download Videos with link “Download This 
  Video”. 
   
  How to protect the videos from 
  this plugin ?.  
   
  I am very much shocked to see it 
  appears exactly over the flash video object. 
   
  How does the realplayer checks for 
  the video object that too which is placed inside an SWF 
  ? 
   
  We are basically using Flash to 
  deliver videos in both MP4 and FLV format. 
   
  I am very much disappointed with 
  this option can client can easily rip the content. 
   
  Is there any work around for 
  this? 
   
  Does Adobe is working on this 
  issue? 
   
   
   
   
   
  Thanks 
   
  - 
  Bharath 
   
   
   
   
   
   
  

  


	
	

  

Re: [flexcoders] Re: how to search an arraycollection

2008-08-13 Thread Sid Maskit
My understanding of a binary search is that you keep adjusting the floor and 
ceiling. You would need to check to find when floor and ceiling are consecutive 
items. At that point, you would only have two items, and you could run a 
comparison to see which is closer to your target number.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: blc187 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, August 13, 2008 3:11:06 PM
Subject: [flexcoders] Re: how to search an arraycollection


can i use a binary search if the value i am searching for is not 
explicitly in my arraycollection? i want to get the closest value to 
the timestamp i am searching for.

--- In [EMAIL PROTECTED] ups.com, "Michael VanDaniker" <[EMAIL PROTECTED] > 
wrote:
>
> If your collection is sorted by timestamp a binary search would be 
faster.
> 
> --- In [EMAIL PROTECTED] ups.com, "Alex Harui"  wrote:
> >
> > You'll have to loop through yourself and keep track of the minimum
> > difference
> > 
> > 
> > 
> >  _ _ __
> > 
> > From: [EMAIL PROTECTED] ups.com 
[mailto:[EMAIL PROTECTED] ups.com] On
> > Behalf Of blc187
> > Sent: Wednesday, August 13, 2008 12:57 PM
> > To: [EMAIL PROTECTED] ups.com
> > Subject: [flexcoders] how to search an arraycollection
> > 
> > 
> > 
> > I have an arraycollection of objects, each of which has a 
timestamp.
> > ex: {timestamp:43424234 32, value:5}
> > 
> > I want to search the arraycollection for the object which has the 
> > closest timestamp to the time I'm looking for.
> > Is there a way to search the arraycollection for an approximate 
value?
> > 
> > As of right now I'm looping through each object in my 
arraycollection 
> > to find if the value is between 2 numbers.
> > 
> > for(var i:int = 0; i < dataProvider. length; i++) {
> > if(myTimestamp > dataProvider[ i] && myTimestamp < dataProvider
[i+1])
> > //this is the correct spot.
> > }
> >
>




  

Re: [flexcoders] Data Binding works/does not work

2008-08-09 Thread Sid Maskit
One more thing on this, since it only sets the binding to nbItems if that is 
done before the XML parsing, you could hack around the apparent bug in the 
following ugly manner:



This sets the binding without affecting the string that is ultimately returned 
to the text attribute.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Heiko Niemann <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, August 9, 2008 9:41:16 AM
Subject: [flexcoders] Data Binding works/does not work


Hi,

with the code below I experience some strange behaviour of the data
binding - at least it does not work the way I want. :)
There are two text fields each saying 'Cart' plus the number of items.
Then there are two buttons: one will increase the number of items and
the other will switch the language (so the second text field will
either say 'Cart' or 'Wagen').

Now - when I press 'add item' the number of items will just change in
the first text field. In the second text field the number of items
remains 0 - until I press the second button to switch languages. So
why is that? Is it because of the filter I use in the second text
field? Or is it simply a bug? 

Thanks for your help,

Heiko




http://www.adobe. com/2006/ mxml" 
layout="absolute" >



Cart< /plain>

Cart< /label>
Wagen< /label>




0
 en



 










-




  

Re: [flexcoders] storage directory debugging AIR in FLEX3

2008-08-09 Thread Sid Maskit
Although there are no doubt exceptions, in general you want to avoid using full 
paths, and instead use the handles provided by the AIR environment. That way 
data will be put in the right place regardless of which operating system the 
application is installed on.

On the same machine, the handle will point to the same place in the filesystem 
for both debugging and release versions, except that the file for the 
application itself will be slightly different. The debug version will just be 
the name of the application whereas the release version will contain some sort 
of unique id (which I'm not sure how AIR generates although I would guess that 
it is related to the certificate used to sign the release version).

So for example, I have a hello world application. When I am in debug mode, I 
store my local data here:

C:\Documents and Settings\[my username]\Application Data\AIRHelloWorld

But the release version is here:

C:\Documents and Settings\[my username]\Application 
Data\AIRHelloWorld.1A63E0D1F441D84D82E5395BB5C59EA19782A4AD.1

See the air documentation on the available file system handles, and where they 
point.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: slackware2142 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, August 8, 2008 5:02:39 PM
Subject: [flexcoders] storage directory debugging AIR in FLEX3


Sorry, if this is a newbie question, but I google'd about it, and I 
didn't find any answer. While debugging AIR apps in FLEX3, what is the 
storage directory to write files (windows)?. Once the application is 
compiled and installed, the default directory is something like: 
C:\Documents and Settings\UserName\ Application Data\Test.XXX\ Local 
Store\ (windows xp). But what if I'm only debugging the app?

Thanks in advance!




  

Re: [flexcoders] Data Binding works/does not work

2008-08-09 Thread Sid Maskit
It works if you switch the second text field so it looks like this:



So it seems as though somehow the compiler gets confused by the deeper XML 
parsing, and bypasses the subsequent binding call. Maybe somebody else has a 
better explanation, but it looks like a bug to me.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Heiko Niemann <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, August 9, 2008 9:41:16 AM
Subject: [flexcoders] Data Binding works/does not work


Hi,

with the code below I experience some strange behaviour of the data
binding - at least it does not work the way I want. :)
There are two text fields each saying 'Cart' plus the number of items.
Then there are two buttons: one will increase the number of items and
the other will switch the language (so the second text field will
either say 'Cart' or 'Wagen').

Now - when I press 'add item' the number of items will just change in
the first text field. In the second text field the number of items
remains 0 - until I press the second button to switch languages. So
why is that? Is it because of the filter I use in the second text
field? Or is it simply a bug? 

Thanks for your help,

Heiko




http://www.adobe. com/2006/ mxml" 
layout="absolute" >



Cart< /plain>

Cart< /label>
Wagen< /label>




0
 en



 










-




  

Re: [flexcoders] Can the browser embedded swf invoke the installed AIR app?

2008-08-09 Thread Sid Maskit
Maybe somebody has a workaround, but I'm pretty sure that checking what is 
installed on the local file system is exactly the sort of thing that the 
browser's sandbox is going to keep you from doing.

An imperfect, but relatively simple thing to do would be to set a cookie 
(whether browser, flash, or both) when a user downloads the AIR application. 
You can then have the browser version look for that cookie. Obviously, all this 
will tell you is whether the user tried to download the AIR application, not 
whether they succeeded in doing so. There are probably some other shortcomings 
to this approach, but it might get you a fair amount of the way to where you 
want to be.

Note that the cookie approach actually has an advantage over the approach of 
registering users because you are interested in a specific client machine--the 
one on which the AIR application is actually installed--not in a user who might 
be on any number of machines.

Hope that helps,

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Jo Morano <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, August 8, 2008 11:20:01 PM
Subject: [flexcoders] Can the browser embedded swf invoke the installed AIR app?


Hi!

Can I check from my swf whether the 'full' version is already installed as an 
AIR application and if not, prompt the user to install it (based on user's 
attempt to access the advanced features on the browser version)? If so, how? I 
am good at reading manuals, so if you point me to one, that will help as well.

Regards



  

Re: [flexcoders] Re: Changing Parents

2008-08-07 Thread Sid Maskit
I may be wrong, but I have a guess here.

First, you should not need your calls to removeChild. If you take an item that 
is currently in the display list, and use addChild to put it somewhere else in 
the display list, flex will automatically switch its parent from the old one to 
the new one.

My guess is that this is what is happening: "subcomponent. addChild( 
imageViewer) ;" is doing what you wanted to, but "app.removeChild( imageViewer) 
;" is then removing the imageViewer from the display list so that it disappears.

Try just removing the calls to removeChild.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: wwwpl <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, August 7, 2008 10:13:06 AM
Subject: [flexcoders] Re: Changing Parents


Forgive me, but how do you remove the child from the stage?  Did you 
do the following (using my example):

//Go to full screen
app.addChild( imageViewer) ;
subcomponent. removeChild( imageViewer) ;

//Go to normal screen
subcomponent. addChild( imageViewer) ;
app.removeChild( imageViewer) ;

The problem I am having is putting the imageViewer back into the 
subcomponent.  It does not reappear in the subcomponent.

--- In [EMAIL PROTECTED] ups.com, "Brian Deitte" <[EMAIL PROTECTED] > wrote:
>
> I did this recently, and it didn't cause havoc.  What are seeing 
that
> goes wrong?  I had two issues that I did needed to fix.  One is that
> you have to remember to remove the child from the stage before 
adding
> it back to the application.  The second is that the bindings were
> reexecuted when added back to the application, which I worked around
> by checking for the same value in the places I was observing 
bindings.
>  -Brian
> 
> On Thu, Aug 7, 2008 at 11:53 AM, wwwpl <[EMAIL PROTECTED]> wrote:
> > I have an image viewer that I would like to go full screen. I now 
have
> > my app taking up the full screen, but I need the image viewer 
window
> > to become the size of the app window. The image viewer is a child 
of a
> > child of a child of the Application. I am calling 
application. addChild
> > (imageViewer) to get this to go full screen, but when I want to 
go back
> > to the normal view, I do a application. removeChild( imageViewer) 
and I
> > want to add it back to the parent it had before. But that doesn't
> > work. How can I change parents of a component without causing 
havoc?
> >
> >
>




  

Re: [flexcoders] XML Document and Navigation

2008-08-07 Thread Sid Maskit
If you have to perform basically the same operation at each level of your XML, 
one way to deal with an open-ended number of levels is to use recursion.

I apologize for not saying more, but I am running out the door, and don't have 
time to write up any kind of sample code on this. However, I'm sure that if you 
google for things like recursion or recursive function, you should find lots of 
information on how this approach works. I'd also guess that Wikipedia has a 
good article on this.

Hope that helps,


 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Patrick J. Jankun <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, September 7, 2008 4:30:50 AM
Subject: [flexcoders] XML Document and Navigation


Hello Everyone,

I run into a problem, something that probably a lot of people here knows how to 
solve.
But after sitting for 2 days building nestes for loops, i can't see the light 
by the end of the tunnel :-)

So, here is a problem:

I have to build an xml based navigation, so far, quite simple and clear. Made 
it already a few times,
but, now, this is a bit more complicated, because i got a much deeper nested 
sub levels, and i really
don't know how to efficient traverse the document and build the navigation out 
of it :|

The most complex navigation i made had 2 levels, so it wasn't really hard to 
imagine the code for this task:
2 for loops done the nav creation and that's it, but i got now, an "undefined" 
deep, and i don't know how to
bite the code that will build the nav, that goes a bit deeper then one-sub 
level.

Do you guys got any examples or thoughts on how to solve the task?
Im pretty sure that i got an logical error in my approach, since i will use 
some nested for loops, but i can't
think the "formula" since i don't know how deep each of the nodes goes, and 
this task gives me headaches.

any kind of help and pinpointing to right direction would be VERY appreciated

cheers,
Patrick


 - - - ---
fancy skills to pay the bills
www.jankun.org
 
Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun. org 



  

Re: [flexcoders] Multiple Builder instances / windows?

2008-08-06 Thread Sid Maskit
I don't know much about eclipse so I have no idea if there is a good way to do 
this. I'm pretty sure this is not the answer you would like, but one way to do 
this would be with virtualization. If you are running a Windows box, you can 
use Microsoft's free virtualPC program.

I'm not sure whether you would run into problems with trying to use the same 
license for multiple copies this way. In theory, it should be okay since they 
are all on the same machine, but since each virtual PC instance appears to be 
its own machine, the license enforcement mechanism might object.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Josh McDonald <[EMAIL PROTECTED]>
To: "flexcoders@yahoogroups.com" 
Sent: Wednesday, August 6, 2008 4:03:23 PM
Subject: [flexcoders] Multiple Builder instances / windows?


Hey guys,

Is there an easy way I can have multiple copies of Builder running at the same 
time (with different workspaces)? This would really make my life easier!

-Josh

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

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



  

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

2008-08-01 Thread Sid Maskit
"Eww," eh? Well, gee, Tom, I hope I didn't spoil your breakfast or anything ;)

I think both your refactorings are good ones. I was definitely in "how do we 
get this working" mode, not "how do we get this as elegantly written as 
possible" mode: i.e. I was in code-writing not refactoring mode. So I suppose I 
shouldn't complain about you pointing out a bad smell coming from the code 
writing.

Having said that, I have to admit that I am not at all clear as to protocol for 
how much ActionScript is acceptable within braces while assigning to an MXML 
attribute, or whether there are accepted standards for this. I have the fear 
that this might be a religious question, but maybe not. If there are accepted 
protocols, I'd love to hear what they are.

Just to help clarify things, I'm wondering whether you have any objection to 
ternary statements, or if you do just feel that this is too much code to have 
within an attribute assignment. For example, would this satisfy your objection:







 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Tom Chiverton <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, August 1, 2008 5:04:56 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

On Thursday 31 Jul 2008, Sid Maskit wrote:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links




  

Re: [flexcoders] Re: problem adding images to UIComponents using AS3

2008-07-31 Thread Sid Maskit
This works too:







So maybe I'm missing something, but I'm not seeing why you need either 
UIComponent or Sprite, as things seem to work and be simpler replacing the two 
of them with canvas
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message ----
From: Sid Maskit <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 2:41:37 PM
Subject: Re: [flexcoders] Re: problem adding images to UIComponents using AS3


 I'm not going to pretend to understand this, but here's a little more 
information which may be useful.

This works:

myCanvas.addChild( myHelpImage) ; 

This doesn't work:

myHelpUIComponent. addChild( myHelpImage) ; 
myCanvas.addChild( myHelpUIComponen t); 

Which leads me to suspect that the problem is with the UIComponent rather than 
the sprite, but again I have no idea really.
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/



- Original Message 
From: Jason 
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, July 31, 2008 2:18:09 PM
Subject: [flexcoders] Re: problem adding images to UIComponents using AS3


Oh, and also an article which discusses the problem adding a sprite as 
a child to a Flex container:

http://www.sebastia anholtrop. com/archives/ 3

Jason





  

Re: [flexcoders] Re: problem adding images to UIComponents using AS3

2008-07-31 Thread Sid Maskit
 I'm not going to pretend to understand this, but here's a little more 
information which may be useful.

This works:

myCanvas.addChild(myHelpImage); 

This doesn't work:

myHelpUIComponent.addChild(myHelpImage); 
myCanvas.addChild(myHelpUIComponent); 

Which leads me to suspect that the problem is with the UIComponent rather than 
the sprite, but again I have no idea really.
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Jason <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 2:18:09 PM
Subject: [flexcoders] Re: problem adding images to UIComponents using AS3


Oh, and also an article which discusses the problem adding a sprite as 
a child to a Flex container:

http://www.sebastia anholtrop. com/archives/ 3

Jason

 


  

Re: [flexcoders] problem adding images to UIComponents using AS3

2008-07-31 Thread Sid Maskit
There is probably more to it than this, but note that the action script 
language reference listing for UIComponent says, "The UIComponent class is not 
used as an MXML tag, but is used as a base class for other classes."

My suspicion is that it does not contain the logic needed to properly display 
children that are added to it, and that its descendents provide this logic.
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: "Merrill, Jason" <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 1:18:27 PM
Subject: [flexcoders] problem adding images to UIComponents using AS3


I don't get why this code is failing, it's reproducible if you put an image in 
the path shown below.  (This isn't the actual code in my app, I just isolated a 
problem and made the problem reproducible it here.  In my real app, it's 
failing to embed an image into a class that is added to a UI component. The 
class extends Sprite). 
The first Image class instance declared with MXML embeds the image just fine. 
The second, using a UIComponent and adding an instance of the image class to it 
fails. Why?  See comments in the code below:

 
http://www.adobe. com/2006/ mxml"> 

 
 
 

 
 

 
 

 
 

 
 

 

Jason Merrill
Bank of America 
Enterprise Technology & Global Risk L&LD
Instructional Technology & Media 
Join the Bank of America Flash Platform Developer Community 
Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GT&O Innovative Learning Blog & subscribe. 



  

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

2008-07-31 Thread Sid Maskit
True. Good point. Event handler attributes are assumed to contain code. Most 
attributes are of a type like string or number, and will need braces to get a 
value treated as code. I'm not sure if there are other attributes beside event 
handlers which are also assumed to contain code, but it wouldn't surprise me if 
there are some others.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 1:01:13 PM
Subject: [flexcoders] Re: NaN and Infinity showing in output - How to modify?


--- In [EMAIL PROTECTED] ups.com, Sid Maskit <[EMAIL PROTECTED] > wrote:
>
> I think I see your point here, and I guess that I have not made 
mine clearly enough, so here is a little more on this.
> 
> When we say text="{myNumber} ", we are really setting up whatever is 
within the braces as an event handler for the event dispatched 
whenever myNumber changes. If we think of binding as setting up that 
relationship, then yes, everything in this thread is using binding. 
However, I think it is common for beginners to think of that 
statement as binding the text attribute to the latest value of 
myNumber, and to think of binding as doing no more than such 
assignments.
> 
> I think it is important part of learning flex to realize that one 
can do much more than that. In the largest sense, one can do almost 
anything that is possible with a single ActionScript statement, so 
long as it returns a valid value for the attribute to which it is 
assigned, in this case the text attribute. For example, one could do 
something rather complicated, like this:
> 
> text="{(myNumber != 0) ? myFunction() : myOtherFunction( )}"
> 
> So long as both functions returned a value that could be validly 
assigned to the text attribute, this approach is valid, and we can 
obviously do any valid ActionScript within either function. I'm not 
sure that this approach would be a best practice, but the point is 
that we are doing a lot more than simply taking the value of myNumber 
and assigning it to text.
> 
> Finally, although I do not think you meant to imply this, I think 
it is worth saying that one cannot use ActionScript within an 
assignment to an MXML attribute without using braces. Well, one can, 
but it will be treated as a string, not as code to be run.

In at least some instances, MXML will run code that is not within 
braces, for instance 



It's not treating the text within the itemClick property as a string, 
but as code to be run.  I'm not certain exactly where the line is, 
but you don't ALWAYS have to enclose your as expressions in brackets 
to get them to run.

-Amy

 


  

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

2008-07-31 Thread Sid Maskit
I think I see your point here, and I guess that I have not made mine clearly 
enough, so here is a little more on this.

When we say text="{myNumber}", we are really setting up whatever is within the 
braces as an event handler for the event dispatched whenever myNumber changes. 
If we think of binding as setting up that relationship, then yes, everything in 
this thread is using binding. However, I think it is common for beginners to 
think of that statement as binding the text attribute to the latest value of 
myNumber, and to think of binding as doing no more than such assignments.

I think it is important part of learning flex to realize that one can do much 
more than that. In the largest sense, one can do almost anything that is 
possible with a single ActionScript statement, so long as it returns a valid 
value for the attribute to which it is assigned, in this case the text 
attribute. For example, one could do something rather complicated, like this:

text="{(myNumber != 0) ? myFunction() : myOtherFunction()}"

So long as both functions returned a value that could be validly assigned to 
the text attribute, this approach is valid, and we can obviously do any valid 
ActionScript within either function. I'm not sure that this approach would be a 
best practice, but the point is that we are doing a lot more than simply taking 
the value of myNumber and assigning it to text.

Finally, although I do not think you meant to imply this, I think it is worth 
saying that one cannot use ActionScript within an assignment to an MXML 
attribute without using braces. Well, one can, but it will be treated as a 
string, not as code to be run.
 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Amy <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 10:47:30 AM
Subject: [flexcoders] Re: NaN and Infinity showing in output - How to modify?


--- In [EMAIL PROTECTED] ups.com, Sid Maskit <[EMAIL PROTECTED] > wrote:
>
> Try something like this:
> 
> 
> 
> Note that you need to give the Label component and id, and use that 
id to refer to it in your statements within braces.
> 
> By the way, as you are no doubt noticing, the larger point here is 
that braces are not just for binding, but can contain all sorts of 
ActionScript.

The braces actually _are_ executing a binding here, as they will do 
something different when the value of the variable changes.  If the 
value was not expected to change, you could do the same without the 
braces.

HTH;

Amy

 


  

Re: [flexcoders] SQL crashing program

2008-07-31 Thread Sid Maskit
How about posting the relevant code. Also, am I right in assuming that this is 
in AIR, and that you are using its local database?

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Josh Millstein <[EMAIL PROTECTED]>
To: "flexcoders@yahoogroups.com" 
Sent: Thursday, July 31, 2008 9:59:09 AM
Subject: [flexcoders] SQL crashing program


I have this weird deal going on right now.  I'm running through a for loop
creating a bunch of sql statements (within an exclusive transaction) with
eventlisteners for the results and errors.  The result eventlistener is
relaying the status of the progress through the sql statements ("record x of
y inserted").  The program crashes when I run the program, but when I put
code in the result eventlistener to write sql.text to a file (trying to see
if there is a bad sql statement crashing the program) it stopped the program
from crashing and everything works well.  I don't understand why that would
be.  The only thing I can think of is that there is some timing issue that
I'm skirting around with writing to a file in between each sql statement.
Does anybody have any idea why putting the code to write to a dblog file
would make the program work?  I'm sure it's is just that piece of code as
well.  Comment it and it crashes, put it back and it works.

Weird.

-- 
[EMAIL PROTECTED] .com

 


  

Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Sid Maskit
Sure, just replace the 0 with whatever text you want, putting it inside single 
quotes since the entire statement is inside of double quotes. Since you are 
setting the value of a label, what ever you put in is going to be cast to a 
string anyway.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Blair Cox <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:27:02 AM
Subject: Re: [flexcoders] NaN to return a string?


Turns out showing a zero could be implied that the calculation was a zero. This 
is bad, especially if the result is actually zero. Is there any way to return a 
string rather than a number?


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com






From: Sid Maskit <[EMAIL PROTECTED] com>
Reply-To: <[EMAIL PROTECTED] ups.com>
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: <[EMAIL PROTECTED] ups.com>
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:



I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:



If you put the two together, it would look something like this:



 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
  


  

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

2008-07-31 Thread Sid Maskit
Actually, if you are just going to hide the label field, you can just have it 
display the result of the formatting, and put the checking for NaN and infinity 
into the setting for visibility. Since you are going to hide the label and it 
has a value you don't like, you don't really care what it is displaying when it 
is invisible.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message ----
From: Sid Maskit <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:37:19 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Try something like this:



Note that you need to give the Label component and id, and use that id to refer 
to it in your statements within braces.

By the way, as you are no doubt noticing, the larger point here is that braces 
are not just for binding, but can contain all sorts of ActionScript.

Finally, the reason that there is && instead of  && is that we are 
inside of MXML, which is to say inside of XML, and we cannot use the & 
character there, but must escape it.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/



- Original Message 
From: Blair Cox <[EMAIL PROTECTED] a.com>
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, July 31, 2008 9:19:46 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Just one more question. The zero works for me, but I’m sure I’ll be asked to 
make it blank. Any hints as to how this could be accomplished? Coming from the 
Flash side of things, all I would be looking to do is change the alpha value of 
the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com





____
From: Sid Maskit <[EMAIL PROTECTED] com>
Reply-To: <[EMAIL PROTECTED] ups.com>
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: <[EMAIL PROTECTED] ups.com>
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:



I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:



If you put the two together, it would look something like this:



 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
 
 


  

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

2008-07-31 Thread Sid Maskit
Try something like this:



Note that you need to give the Label component and id, and use that id to refer 
to it in your statements within braces.

By the way, as you are no doubt noticing, the larger point here is that braces 
are not just for binding, but can contain all sorts of ActionScript.

Finally, the reason that there is && instead of  && is that we are 
inside of MXML, which is to say inside of XML, and we cannot use the & 
character there, but must escape it.

 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: Blair Cox <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 9:19:46 AM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?


Just one more question. The zero works for me, but I’m sure I’ll be asked to 
make it blank. Any hints as to how this could be accomplished? Coming from the 
Flash side of things, all I would be looking to do is change the alpha value of 
the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com





________
From: Sid Maskit <[EMAIL PROTECTED] com>
Reply-To: <[EMAIL PROTECTED] ups.com>
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: <[EMAIL PROTECTED] ups.com>
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:



I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:



If you put the two together, it would look something like this:



 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com
blog: http://smaskit. blogspot. com/
  


  

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

2008-07-31 Thread Sid Maskit
If the format function is a custom function you have written, you could just 
have it check whether you like the result it is about to return, and if not, 
return something else. If that is not the case, I believe that you should be 
able to put tests into your binding statement. 

You could test for NaN with something like this:



I'm not sure about infinity, but I assume that you can test for this by looking 
for the greatest possible value of the number. Assuming that you have set up 
the variable maxValue to contain that value, you should be able to do something 
like this:



If you put the two together, it would look something like this:



 Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



- Original Message 
From: cox.blair <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 6:41:18 AM
Subject: [flexcoders] NaN and Infinity showing in output - How to modify?


I seem to have trouble explaining myself here, hard when you are just
learning. Perhaps this will be better.

Is it possible to remove, change or hide any label or text output that
displays NaN or Infinity?

I'm performing a very simply calculation where the user enters a
number in a form and it is calculated and displayed. Simple and does
what I need. In some instances, there are more variables required and
until they are provided, the output display NaN or Infinity. 

How could I easily adjust these? It could be a default display of
zero, it could be to display nothing, whatever is the easiest and most
straight forward method.

Below is only an example of how I'm taking the user input from the
form and passing the variable on to the Label text output.

{Number( userInput. text) * (1 +
Number(otherUserInp ut.text)) * 1 /
Number(otherOtherUs erInput.text) }

The answer is output to:



Thank you, any assistance you can provide would be welcomed.

 


  

Re: [flexcoders] popup window

2008-07-30 Thread Sid Maskit
Two things. First, a label can only display a single line. If you want 
multiline text, you should use a Text component. Second, Text components 
automatically wrap if, and only if, they have their width set. I believe you 
can set it to a percentage, and it will still wrap, but you have to set it to 
something.

On a side note, this may seem like a hack, but how else can the system know 
what it should do?



- Original Message 
From: Dan Vega <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 8:24:50 PM
Subject: [flexcoders] popup window


I have a popup window (a quick about win) and I am having an issue. How can I 
add a bunch of text to the title windows content area. If I just add the text 
it runs off the screen. I can set the width but that seems like a bit of a hack 
to me. I know im probably just missing something dumb here.

private function showAbout(event: MouseEvent) :void {
// the popup window
_popup = new TitleWindow( );
_popup.title = "About this component";
_popup.width = 400;
_popup.height = 200;
_popup.showCloseBut ton = true;
_popup.addEventList ener(CloseEvent. CLOSE,closeAbout Window);

var label:Label= new Label();
label.text = " * * * 
* * " +
" * * * * * " +
" * * * * * " +
" * * * * * " +


_popup.addChild( label);
_popup.autoLayout = true;

PopUpManager. addPopUp( _popup,container );
PopUpManager. centerPopUp( _popup);
}


Thank You
Dan Vega
[EMAIL PROTECTED] com
http://www.danvega. org



  

Re: [flexcoders] Value of AS variable dissapearing

2008-07-30 Thread Sid Maskit
Not sure if this has anything to do with your problem, but it looks as though 
you have two different function set up to handle the result: remote_result and 
register_result. I wonder if maybe one of them is overriding the other.



- Original Message 
From: Scott <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, July 27, 2008 2:15:13 PM
Subject: [flexcoders] Value of AS variable dissapearing


I’ve got a weird issue that I’m trying to track
down… It’s all part of the life of a class instance that I posted
before (I’ve got an update on that one coming soon).
 
In my user registration validation class, I check to see if
the email address already exists in the DB.  I created a CFC function called
val_email( string:strEMail) :Boolean
 
My remote object is defined as:

   

 
In my AS script I have the following config:

  

Re: [flexcoders] dynamic remote objects

2008-07-30 Thread Sid Maskit
Interesting. Is the error indicating a line number, and if so what is the code 
on that line?



- Original Message 
From: Dan Vega <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 12:33:07 PM
Subject: Re: [flexcoders] dynamic remote objects


That makes total sense because I also have an mxml tag in the document.I 
changed the code 

// setup the remote method
var service:mx.rpc. remoting. RemoteObject = new 
mx.rpc.remoting. RemoteObject( );
service.destination = "ColdFusion";
service.source = component.text;

// the method needs to know about the remote object
var operation:Operation = new Operation(service) ;
operation.name = method.selectedItem .NAME;
operation.addEventL istener(ResultEv ent.RESULT, 
loadGridData) ;
operation.send( );

and it still gives me the same error.


Thank You
Dan Vega



On Wed, Jul 30, 2008 at 2:29 PM, Sid Maskit <[EMAIL PROTECTED] com> wrote:

ActionScript has two RemoteObject classes. The compiler is telling you that it 
does not know which of them you want to use when you say 'var 
service:RemoteObjec t = new RemoteObject("ColdFusion");'. From the looks of the 
error message, I would guess that you have a RemoteObject tag in your MXML, or 
that you are otherwise importing the mx.rpc.remoting. mxml:RemoteObjec t class.

You either need to remove whatever tag or script that is using the MXML version 
of RemoteObject, or you need to fully qualify the class name in your statement, 
something like this:

var service:mx.rpc. remoting. RemoteObject = new mx.rpc.remoting. 
RemoteObject("ColdFusion");'

Hope that helps,

Sid



- Original Message 
From: Dan Vega <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, July 30, 2008 9:29:54 AM
Subject: Re: [flexcoders] dynamic remote objects


Ok, I figured out what I was doing wrong but I am still getting an error. I 
think this is the right way to use remote object in AS3 

import mx.rpc.remoting. RemoteObject;
import mx.rpc.remoting. Operation;

// setup the remote method
var service:RemoteObjec t = new 
RemoteObject("ColdFusion");

service.source = component.text;
// the method needs to know about the remote object
var operation:Operation = new Operation(service) ;
operation.name = method.selectedItem .NAME;

operation.addEventL istener(ResultEv ent.RESULT, 
loadGridData) ;

operation.send( );

But I am still getting this error and I am  not sure why? 


Can not resolve a multiname reference unambiguously. mx.rpc.remoting. 
mxml:RemoteObjec t (from C:\Program Files\Adobe\ Flex Builder 3\sdks\3.0.0\ 
frameworks\ libs\rpc. swc(mx/rpc/ remoting/ mxml/RemoteObjec t)) and 
mx.rpc.remoting: RemoteObject (from C:\Program Files\Adobe\ Flex Builder 
3\sdks\3.0.0\ frameworks\ libs\rpc. swc(mx/rpc/ remoting/ RemoteObject) ) are 
available.RemoteObject/ srcMain.mxmlUnknown12174353413651308


Thank You
Dan Vega


On Wed, Jul 30, 2008 at 11:46 AM, Tom Chiverton  wrote:

On Wednesday 30 Jul 2008, Dan Vega wrote:
> I have a remote object that is very dynamic.The user is actually selecting
> the source of the component and the method name.

Send the component name, method and arguments list to a generic service method
that does the invoke for you.
And be sure to check that the object name and method are at least members of a
list you expect to receive, or you risk creating a security problem.

--
Tom Chiverton

 * * * * 

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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

For more information about Halliwells LLP visi

Re: [flexcoders] Interesting problem: dynamically creating id's and later referencing them.

2008-07-30 Thread Sid Maskit
My understanding is that id's get converted into public variables. Probably the 
easiest way to do what you are trying to do here is to set up a variable in the 
ActionScript, and assign your new Text object to it. Then you can just use that 
variable when you want to access the object. With this approach, the first part 
of your script would look like this:

import mx.controls.Text;

private var myChild:Text;

private function addMyChild():void {
myChild = new Text();
myChild.text = "Hello World!!";
myChild.id = "kid1";
myChild.name = "kid1";
myChild.uid = "kid1";
myPanel.addChild(myChild);
}


If you need to have references to multiple components, you could store them in 
an array.



- Original Message 
From: Thatcher <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 12:18:29 PM
Subject: [flexcoders] Interesting problem: dynamically creating id's and later 
referencing them.


Hi Guys (and Girls),

Ok, so I have been fighting a couple of days to figure this out. 

In order to make a large and compliated form with drag and drop in of 
more form fields I want to dynamically add an id to an display 
object, and then be able to reference it later to get data out.

Somehow it only seems possible to find these objects by navigating 
trough the the displaylist, and I cannot assign any 'real' id to a 
newly created child.

The following example should illustrate what I want to do (it should 
run). You will find it quite imposssible to get the object by it's id 
(or uid). 

Why is that?? Is there any other way of referencing an object of 
which you do not know who his parent is?

Thank you in advance and greetings,
Thatcher


http://www.adobe. com/2006/ mxml" 
layout="vertical" >

















  

Re: [flexcoders] Re: Complete metadata information and Where to Find it???

2008-07-30 Thread Sid Maskit
We just had a thread discussing this. It turns out that the [Exclude] tag does 
not limit the ability to use what is excluded, but only keeps it from showing 
up in FlexBuilder's code hinting. In this sense, it sounds as though it works 
exactly the same as [ExcludeClass] except for a different type of item.



- Original Message 
From: anubhav.bisaria <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 2:28:33 AM
Subject: [flexcoders] Re: Complete metadata information and Where to Find it???


Hi There,

the [Exclude] tag is used to hide the subcomponents. so that they are 
not accessible like

.

http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 65B3-
D59C-464EC981E0A2EA 8F

for [ExcludeClasses] metadata tag, please go through this link:
http://nondocs. blogspot. com/2007/ 04/metadataexclu declass.html

Thanks, 
anubhav

--- In [EMAIL PROTECTED] ups.com, "flexnadobe"  
wrote:
>
> Hello,
> 
> I have been looking at some of the MX classes that are in the Flex 
SDK
> 2.0/frameworks/ source folder and there are some metadata properties
> that I cannot find in any documentation. For instance, in the
> RichTextEditor. mxml there is the:
> 
> [Exclude(name= "alignButtons" , kind="property" )]
>   [Exclude(name= "boldButton" , kind="property" )]
>   [Exclude(name= "bulletButton" , kind="property" )]
>   [Exclude(name= "colorPicker" , kind="property" )]
>   [Exclude(name= "defaultButton" , kind="property" )]
>   [Exclude(name= "fontFamilyArray ", kind="property" )]
>   [Exclude(name= "fontFamilyCombo ", kind="property" )]
>   [Exclude(name= "fontSizeArray" , kind="property" )]
>   [Exclude(name= "fontSizeCombo" , kind="property" )]
>   [Exclude(name= "icon", kind="property" )]
>   [Exclude(name= "italicButton" , kind="property" )]
>   [Exclude(name= "label", kind="property" )]
>   [Exclude(name= "layout", kind="property" )]
>   [Exclude(name= "linkTextInput" , kind="property" )]
>   [Exclude(name= "toolBar" , kind="property" )]
>   [Exclude(name= "toolBar2" , kind="property" )]
>   [Exclude(name= "underlineButton ", kind="property" )]
> 
> which I assume just Excludes some properties from a class??
> 
> Since I am talking about the richTextEditor. mxml any one know where
> there is information on a  mxml tag??
> 
> and the:
> 
> [ExcludeClass]
> 
> This one is in just about every class in the mx folder I have no 
idea
> what this refers to.
> 
> Just curious because I can't find any information out there.
> 
> Rich
>




  

Re: [flexcoders] Form Processing in Flex

2008-07-30 Thread Sid Maskit
I'm not sure if I am understanding your question, but maybe this will help. 

Flex can communicate with a server in several ways.

One way that flex can communicate with a server is by pretty much acting the 
same as a browser: i.e. it can submit get and post requests which will look 
exactly the same to the server as get and post requests submitted by a browser. 
Thus you can probably process form submissions on the server using exactly the 
same PHP code that you are using for browser-submitted forms.

Similarly, flex can get the server's response to such a request, and can 
process the provided information. However, unless you are simply going to 
display it to the user, you probably do not want the server to respond with a 
page of HTML, but rather was something that will be useful for flex. Thus this 
might be where you would want to start changing your server-side code to act 
differently for flex as opposed to the browser.

Flex also has built-in classes for communicating with web services, Flash 
Remoting, and LiveCycle Data Services.

One of the nice things about the latter two approaches is that a gateway takes 
care of translating data between flash and the server so that each can work in 
its native datatypes. For example, if one is using a PHP server, the gateway 
will take submitted flash data and convert it to PHP data, and take the 
returned PHP data and convert it to flash data. Thus you can work with native 
datatypes on both the client and server without having to worry about 
conversions.

Obviously, none of the above tells you how to do any of this, but hopefully it 
gives you some starting points for further research, or asking more specific 
questions.



- Original Message 
From: brucewhealton <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, July 28, 2008 3:26:30 PM
Subject: [flexcoders] Form Processing in Flex


Hello all,
I think I wasn't clear when I discussed something related to
this previously in a posting.  I see some very useful and elegant
tools for creating form elements using Flex.  When designing in xhtml,
using Dreamweaver, I call the form processor from the opening form
tag, which calls a php file - that's I have been using, mainly for
form processing.  It returns the values entered.
I'm not clear how this would work in Flex.  Everything in the
Flex application is compiled.  So, how do you access the content
entered by the user that comes to the form?  Can someone explain how
this works, please?  Does this require a certain type of form processor?
Thanks,
Bruce




  

Re: [flexcoders] dynamic remote objects

2008-07-30 Thread Sid Maskit
ActionScript has two RemoteObject classes. The compiler is telling you that it 
does not know which of them you want to use when you say 'var 
service:RemoteObject = new RemoteObject("ColdFusion");'. From the looks of the 
error message, I would guess that you have a RemoteObject tag in your MXML, or 
that you are otherwise importing the mx.rpc.remoting.mxml:RemoteObject class.

You either need to remove whatever tag or script that is using the MXML version 
of RemoteObject, or you need to fully qualify the class name in your statement, 
something like this:

var service:mx.rpc.remoting.RemoteObject = new 
mx.rpc.remoting.RemoteObject("ColdFusion");'

Hope that helps,

Sid



- Original Message 
From: Dan Vega <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 9:29:54 AM
Subject: Re: [flexcoders] dynamic remote objects


Ok, I figured out what I was doing wrong but I am still getting an error. I 
think this is the right way to use remote object in AS3 

import mx.rpc.remoting. RemoteObject;
import mx.rpc.remoting. Operation;

// setup the remote method
var service:RemoteObjec t = new 
RemoteObject("ColdFusion");
service.source = component.text;
// the method needs to know about the remote object
var operation:Operation = new Operation(service) ;
operation.name = method.selectedItem .NAME;
operation.addEventL istener(ResultEv ent.RESULT, 
loadGridData) ;
operation.send( );

But I am still getting this error and I am  not sure why? 


Can not resolve a multiname reference unambiguously. mx.rpc.remoting. 
mxml:RemoteObjec t (from C:\Program Files\Adobe\ Flex Builder 3\sdks\3.0.0\ 
frameworks\ libs\rpc. swc(mx/rpc/ remoting/ mxml/RemoteObjec t)) and 
mx.rpc.remoting: RemoteObject (from C:\Program Files\Adobe\ Flex Builder 
3\sdks\3.0.0\ frameworks\ libs\rpc. swc(mx/rpc/ remoting/ RemoteObject) ) are 
available.RemoteObject/ srcMain.mxmlUnknown12174353413651308


Thank You
Dan Vega


On Wed, Jul 30, 2008 at 11:46 AM, Tom Chiverton  wrote:

On Wednesday 30 Jul 2008, Dan Vega wrote:
> I have a remote object that is very dynamic.The user is actually selecting
> the source of the component and the method name.

Send the component name, method and arguments list to a generic service method
that does the invoke for you.
And be sure to check that the object name and method are at least members of a
list you expect to receive, or you risk creating a security problem.

--
Tom Chiverton

 * * * * 

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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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

 - - --


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

   http://groups. yahoo.com/ group/flexcoders /







  

Re: [flexcoders] Running Flex application on Mac

2008-07-25 Thread Sid Maskit
In theory, flex applications, like flash movies, run the same way on Windows 
and OS X. In reality, there are a number of differences. If you can provide 
details as to what is actually happening differently, including some relevant 
code, somebody might be able to help you out.



- Original Message 
From: kaushal_bshah <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, July 25, 2008 6:50:32 AM
Subject: [flexcoders] Running Flex application on Mac


I have create one Flex Application, which runs properly on Windows OS.
But same application behaving wrong on Mac. Application loads
completely but while interacting sometime user getting improper response.

So my question is, does Mac need anything to run flex application
properly, or is there anything required on coding side?




  

Re: [flexcoders] Re: Web-based Sync data - Flex/Air & VS.NE

2008-07-24 Thread Sid Maskit
Yeah, she doesn't return my calls either.

My favorite signature is from somebody on the speechcoders mailing group. It 
goes like this: "This message written using speech recognition software. It 
makes mistakes. I correct some of them."

I do most of my message writing using speech recognition, and I try to 
proofread it, but it is obviously an imperfect process. (I'm really hoping this 
message has no glaring errors in it.)



- Original Message 
From: Josh McDonald <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 24, 2008 10:12:50 PM
Subject: Re: [flexcoders] Re: Web-based Sync data - Flex/Air & VS.NE


Speech-to-text again?

I've been ready for Millie for weeks, but she just doesn't return my calls :)


On Fri, Jul 25, 2008 at 2:53 PM, Sid Maskit <[EMAIL PROTECTED] com> wrote:

It sounds like this won't matter in your case, but there is the often important 
point that flex and air applications run not only on Windows, but also on OS X, 
and maybe even on Linux as well.

I don't know enough about .net to address this question, but I do wonder 
whether it provides for a desktop database, assuming that not all of your users 
have something like Access installed.

The truth is that you could probably use SQLite along with .net, but I'm not 
sure how easy or difficult that would be. Adobe has done a pretty nice job of 
integrating Air with SQLite.

There is also the question of whether you already have a bunch of programmers 
who are experts in .net, or have a bunch of folks who are experts in 
ActionScript. In my experience, programmers tend to be way more effective in an 
environment that they are already for Millie or with, as opposed to trying to 
learn a whole new environment on the fly.



- Original Message 
From: itdanny2002 <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, July 24, 2008 9:00:50 PM
Subject: [flexcoders] Re: Web-based Sync data - Flex/Air & VS.NET


But if the only to do the sync is to 
install a program in desktop. Then, 
any benefit of AIR is better than 
Microsoft'stuf ? Sorry, it is a management
question so that we can sell our management
while our other development is on MS platform.
Inshort, any good point in AIR which is better ?

Thanks

--- In [EMAIL PROTECTED] ups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> Anything that lives in a browser is not going to be able to have a 
local
> database, going to microsoft won't change that.
> 
> On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002  
wrote:
> 
> > I need to build a web-based Application which
> > has data in Client & Server, sync is required.
> >
> > AIR
> > ---
> > Support SQLite in client side - It's ok but we
> > want web-based so that installation is not
> > required. Go to anywhere, just a click to see
> > data.
> >
> > FLEX
> > 
> > It can't have database operation such as SQLite
> > in client. I don't think cookie is a solution due
> > to large volume of data.
> >
> > I need to defence and stay in Flex faction in
> > my company. Any good point(s) that make me won't
> > in camp of VS.Net ?
> >
> >
> >
> >
> >  - - --
> >
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
> > Search Archives:
> > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! 
Groups
> > Links
> >
> >
> >
> >
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for 
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>


 


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

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


  

Re: [flexcoders] Re: Web-based Sync data - Flex/Air & VS.NET

2008-07-24 Thread Sid Maskit
It sounds like this won't matter in your case, but there is the often important 
point that flex and air applications run not only on Windows, but also on OS X, 
and maybe even on Linux as well.

I don't know enough about .net to address this question, but I do wonder 
whether it provides for a desktop database, assuming that not all of your users 
have something like Access installed.

The truth is that you could probably use SQLite along with .net, but I'm not 
sure how easy or difficult that would be. Adobe has done a pretty nice job of 
integrating Air with SQLite.

There is also the question of whether you already have a bunch of programmers 
who are experts in .net, or have a bunch of folks who are experts in 
ActionScript. In my experience, programmers tend to be way more effective in an 
environment that they are already for Millie or with, as opposed to trying to 
learn a whole new environment on the fly.



- Original Message 
From: itdanny2002 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 24, 2008 9:00:50 PM
Subject: [flexcoders] Re: Web-based Sync data - Flex/Air & VS.NET


But if the only to do the sync is to 
install a program in desktop. Then, 
any benefit of AIR is better than 
Microsoft'stuf ? Sorry, it is a management
question so that we can sell our management
while our other development is on MS platform.
Inshort, any good point in AIR which is better ?

Thanks

--- In [EMAIL PROTECTED] ups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> Anything that lives in a browser is not going to be able to have a 
local
> database, going to microsoft won't change that.
> 
> On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002  
wrote:
> 
> > I need to build a web-based Application which
> > has data in Client & Server, sync is required.
> >
> > AIR
> > ---
> > Support SQLite in client side - It's ok but we
> > want web-based so that installation is not
> > required. Go to anywhere, just a click to see
> > data.
> >
> > FLEX
> > 
> > It can't have database operation such as SQLite
> > in client. I don't think cookie is a solution due
> > to large volume of data.
> >
> > I need to defence and stay in Flex faction in
> > my company. Any good point(s) that make me won't
> > in camp of VS.Net ?
> >
> >
> >
> >
> >  - - --
> >
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
> > Search Archives:
> > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! 
Groups
> > Links
> >
> >
> >
> >
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for 
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>




  

Re: [flexcoders] Can SQLite work in non-AIR envirnoment ?

2008-07-23 Thread Sid Maskit
The SQLite database is part of the AIR architecture, not of flex. So you can 
only use the database in an air application, not in a flex application that is 
running inside a web browser.

If you do deploy an air application, it will provide you with the basic tools 
for synchronizing your data, but does not provide any actual synchronization 
engine. In other words, it allows you to insert into and select from the SQLite 
database, arrange selected data however you wish, and communicate with the 
server, but the actual logic of synchronization is completely up to you. You 
should be aware that this can get quite daunting if you need to allow for 
multiple users to share data and/or each user to store data on multiple 
computers.



- Original Message 
From: itdanny2002 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 6:51:39 PM
Subject: [flexcoders] Can SQLite work in non-AIR envirnoment ?


Hi All,

I found that a lot of FLEX application used
SQLite. However, most of them is in AIR. Can
it be used in web-based and do sync with server ?

I wanna to design a web application which has data 
in client PC and sync with data in server side. Can 
it be ? Any light/direction on it ?

DC




  

Re: [flexcoders] Re: Encapsulating a custom flex component?

2008-07-23 Thread Sid Maskit
Ah, I see. Thanks for the clarification.



- Original Message 
From: Josh McDonald <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 6:23:19 PM
Subject: Re: [flexcoders] Re: Encapsulating a custom flex component?


You're almost right. [Exclude] doesn't affect the compiled code at all - it 
only affects the introspector built into Builder, and ASDoc generation. It's 
different from "private".

-Josh


On Thu, Jul 24, 2008 at 11:17 AM, Sid Maskit <[EMAIL PROTECTED] com> wrote:

Well, unfortunately, I did some further testing, and it turns out not to be as 
complete a solution as it initially appears to be. Here's a comment that I just 
posted on that blog entry:

It is sort of true that "btn" won't be accessible outside that component, but 
there are limits on this. Let's say that your custom component is in the file 
MyComponent. mxml, and that we would therefore instantiate it within another 
file as follows:



If we try to use the btn attribute within that tag, it will not be available to 
us. However, we can still access the button subcomponent for things such as 
binding. Thus we can add another tag which would bind to the button 
subcomponent, like this:



Not only would this not cause a compiler error, but it would work correctly. 
Further, we can access the subcomponent button using ActionScript, such as this:

this.myComponent. btn.label = "modified";

And that will also work. Thus it turns out that [Exclude] is limited to 
altering what attributes are available within the tag that declares a component.



- Original Message 
From: Josh McDonald <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com

Sent: Wednesday, July 23, 2008 4:52:15 PM
Subject: Re: [flexcoders] Re: Encapsulating a custom flex component?


Damn, why didn't I think of that? I'd been trying to think of ways to do that 
for ages a few months ago, trying to clean up the ctrl-space on some APIs :)

-Josh


On Thu, Jul 24, 2008 at 8:40 AM, Sid Maskit <[EMAIL PROTECTED] com> wrote:

I just found this blog post which seems to provide a way of doing this that is 
very straightforward: http://blog. ashier.com/ 2008/03/25/ hiding-propertie 
s-in-flex- components/



- Original Message 
From: Nate Beck <[EMAIL PROTECTED] com>

To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, July 23, 2008 9:27:13 AM
Subject: [flexcoders] Re: Encapsulating a custom flex component?


A feature request has been opened for adding accessors to MXML.  Please vote on 
this if 
you see fitting.  It also better explains the issue that I am running into.

http://bugs. adobe.com/ jira/browse/ SDK-16181

There is also discussion going on about this issue at Jeff's blog: 
http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 65B3-D59C-
464EC981E0A2EA8F

Thanks,
Nate

--- In [EMAIL PROTECTED] ups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> 
>  In an ActionScript component, you can make the component internal to 
> the package.  You might also combine it with the "ExcludeClass" metadata 
> tag to 'hide' the class name from people using your SWC. 
> 
>  I'm not sure if I'd equate either of these approach to private, though.
> 
>  I blogged about this in a bit more detail:
> 
> http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 
> 65B3-D59C-
464EC981E0A2EA8F
> 
> Josh McDonald wrote:
> > Not in MXML components.
> >
> > -Josh
> >
> > On Wed, Jul 23, 2008 at 9:53 AM, Nate Beck <[EMAIL PROTECTED] 
> > <mailto:nate@ ...>> wrote:
> >
> > Newbish question... but after searching on google, I can't get a
> > concise answer.
> >
> > Is it possible to encapsulate (mark private) components within a
> > Flex component?
> >
> > So I have custom MXML component (ResourcesTree) that has a Tree
> > inside of it. I don't want
> > the Tree to directly be available outside the ResourcesTree Component.
> >
> > Any input?
> >
> >
> >  - - --
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder 
> > sFAQ.txt
> > Search Archives:
> > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo!
> > Groups Links
> >
> >
> >mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com
> > <mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com>
> >
> >
> >
> >
> >
> > -- 
> > "Therefore, send not to know For whom the bell tolls. It tolls for thee."
> >
> > :: Josh 'G-Funk' McDona

Re: [flexcoders] Re: Encapsulating a custom flex component?

2008-07-23 Thread Sid Maskit
Well, unfortunately, I did some further testing, and it turns out not to be as 
complete a solution as it initially appears to be. Here's a comment that I just 
posted on that blog entry:

It is sort of true that "btn" won't be accessible outside that component, but 
there are limits on this. Let's say that your custom component is in the file 
MyComponent.mxml, and that we would therefore instantiate it within another 
file as follows:



If we try to use the btn attribute within that tag, it will not be available to 
us. However, we can still access the button subcomponent for things such as 
binding. Thus we can add another tag which would bind to the button 
subcomponent, like this:



Not only would this not cause a compiler error, but it would work correctly. 
Further, we can access the subcomponent button using ActionScript, such as this:

this.myComponent.btn.label = "modified";

And that will also work. Thus it turns out that [Exclude] is limited to 
altering what attributes are available within the tag that declares a component.



- Original Message 
From: Josh McDonald <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 4:52:15 PM
Subject: Re: [flexcoders] Re: Encapsulating a custom flex component?


Damn, why didn't I think of that? I'd been trying to think of ways to do that 
for ages a few months ago, trying to clean up the ctrl-space on some APIs :)

-Josh


On Thu, Jul 24, 2008 at 8:40 AM, Sid Maskit <[EMAIL PROTECTED] com> wrote:

I just found this blog post which seems to provide a way of doing this that is 
very straightforward: http://blog. ashier.com/ 2008/03/25/ hiding-propertie 
s-in-flex- components/



- Original Message 
From: Nate Beck <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, July 23, 2008 9:27:13 AM
Subject: [flexcoders] Re: Encapsulating a custom flex component?


A feature request has been opened for adding accessors to MXML.  Please vote on 
this if 
you see fitting.  It also better explains the issue that I am running into.

http://bugs. adobe.com/ jira/browse/ SDK-16181

There is also discussion going on about this issue at Jeff's blog: 
http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 65B3-D59C-
464EC981E0A2EA8F

Thanks,
Nate

--- In [EMAIL PROTECTED] ups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> 
>  In an ActionScript component, you can make the component internal to 
> the package.  You might also combine it with the "ExcludeClass" metadata 
> tag to 'hide' the class name from people using your SWC. 
> 
>  I'm not sure if I'd equate either of these approach to private, though.
> 
>  I blogged about this in a bit more detail:
> 
> http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 
> 65B3-D59C-
464EC981E0A2EA8F
> 
> Josh McDonald wrote:
> > Not in MXML components.
> >
> > -Josh
> >
> > On Wed, Jul 23, 2008 at 9:53 AM, Nate Beck <[EMAIL PROTECTED] 
> > <mailto:nate@ ...>> wrote:
> >
> > Newbish question... but after searching on google, I can't get a
> > concise answer.
> >
> > Is it possible to encapsulate (mark private) components within a
> > Flex component?
> >
> > So I have custom MXML component (ResourcesTree) that has a Tree
> > inside of it. I don't want
> > the Tree to directly be available outside the ResourcesTree Component.
> >
> > Any input?
> >
> >
> >  - - --
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder 
> > sFAQ.txt
> > Search Archives:
> > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo!
> > Groups Links
> >
> >
> >mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com
> > <mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com>
> >
> >
> >
> >
> >
> > -- 
> > "Therefore, send not to know For whom the bell tolls. It tolls for thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:josh@ ...>
> > 
> 
> -- 
> Jeffry Houser
> Flex, ColdFusion, AIR
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> Adobe Community Expert 
<http://www.adobe. com/communities/ experts/members/ JeffryHouser. html>
> My Company: <http://www.dot- com-it.com> 
> My Podcast: <http://www.theflexs how.com>
> My Blog: <http://www.jeffryho user.com>
>


 


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

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


  

Re: [flexcoders] Re: Encapsulating a custom flex component?

2008-07-23 Thread Sid Maskit
I just found this blog post which seems to provide a way of doing this that is 
very straightforward: 
http://blog.ashier.com/2008/03/25/hiding-properties-in-flex-components/



- Original Message 
From: Nate Beck <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 9:27:13 AM
Subject: [flexcoders] Re: Encapsulating a custom flex component?


A feature request has been opened for adding accessors to MXML.  Please vote on 
this if 
you see fitting.  It also better explains the issue that I am running into.

http://bugs. adobe.com/ jira/browse/ SDK-16181

There is also discussion going on about this issue at Jeff's blog: 
http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 65B3-D59C-
464EC981E0A2EA8F

Thanks,
Nate

--- In [EMAIL PROTECTED] ups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> 
>  In an ActionScript component, you can make the component internal to 
> the package.  You might also combine it with the "ExcludeClass" metadata 
> tag to 'hide' the class name from people using your SWC. 
> 
>  I'm not sure if I'd equate either of these approach to private, though.
> 
>  I blogged about this in a bit more detail:
> 
> http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 
> 65B3-D59C-
464EC981E0A2EA8F
> 
> Josh McDonald wrote:
> > Not in MXML components.
> >
> > -Josh
> >
> > On Wed, Jul 23, 2008 at 9:53 AM, Nate Beck <[EMAIL PROTECTED] 
> > > wrote:
> >
> > Newbish question... but after searching on google, I can't get a
> > concise answer.
> >
> > Is it possible to encapsulate (mark private) components within a
> > Flex component?
> >
> > So I have custom MXML component (ResourcesTree) that has a Tree
> > inside of it. I don't want
> > the Tree to directly be available outside the ResourcesTree Component.
> >
> > Any input?
> >
> >
> >  - - --
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder 
> > sFAQ.txt
> > Search Archives:
> > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo!
> > Groups Links
> >
> >
> >mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com
> > 
> >
> >
> >
> >
> >
> > -- 
> > "Therefore, send not to know For whom the bell tolls. It tolls for thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED] 
> > 
> 
> -- 
> Jeffry Houser
> Flex, ColdFusion, AIR
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> Adobe Community Expert 

> My Company:  
> My Podcast: 
> My Blog: 
>




  

Re: [flexcoders] How to check all children have been loaded?

2008-07-23 Thread Sid Maskit
Have you tried using the creationComplete event on the UIComponent?



- Original Message 
From: flexawesome <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 10:56:50 AM
Subject: [flexcoders] How to check all children have been loaded?


Hey there,

I have a UIcomponent which contents 5 more image components inside. I would 
like to show 
the UIcomponent after all images have loaded successfully.

If any image is still loading, the UIcomponent will not be displayed.

Is there a easy way to add a event listener on the UIcomponent rather than add 
them for each 
of image component?

any suggestions?




  

Re: [flexcoders] Sending multiple arguments to a CFC

2008-07-23 Thread Sid Maskit
You should be able to send multiple arguments by just separating them with a 
comma, like this:

chartmth_RO.qMonthlyUsage( 2008, 04);

By the way, I notice that there is no comma in the sample you provided. 
Assuming that there is a comma in the code you're actually using, what is 
happening when you run it? Are you getting some sort of error? Also, have you 
declared multiple parameters for the CFC you are calling?



- Original Message 
From: Marc Broom <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 10:46:42 AM
Subject: [flexcoders] Sending multiple arguments to a CFC


I currently connect to Coldfusion with a RemoteObject and pass a single 
argument. Is there a way to pass multiple arguements? Just adding a 
comma separated list of arguments in the parens does not seem to work.

http://www.adobe. com/2006/ mxml" 
layout="absolute" creationComplete= "initApp( event)">

In Script block

private function initApp(e:Event) :void {
chartmth_RO. qMonthlyUsage( 200804);
}



 




  

Re: [flexcoders] Re: Encapsulating a custom flex component?

2008-07-23 Thread Sid Maskit
In thinking about this a little more, I have come up with a third way of 
achieving a private sub-component within an MXML-based component. Like the 
others, this is somewhat hacky, but it should work. This one has the advantage 
of allowing you to fully declare the sub-component using MXML. Further, using 
this approach, your other MXML components can bind to the private 
sub-component, although indirectly using what I'm calling a proxy.

Here's some sample code:








Since the textProxy variable is private, and the TextInput control for which it 
is a proxy has no id, I believe that this should create a situation equivalent 
to where there was the ability to mark the TextInput control itself as private.

Hope that helps,

Sid



- Original Message 
From: Nate Beck <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 23, 2008 9:27:13 AM
Subject: [flexcoders] Re: Encapsulating a custom flex component?


A feature request has been opened for adding accessors to MXML.  Please vote on 
this if 
you see fitting.  It also better explains the issue that I am running into.

http://bugs. adobe.com/ jira/browse/ SDK-16181

There is also discussion going on about this issue at Jeff's blog: 
http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 65B3-D59C-
464EC981E0A2EA8F

Thanks,
Nate

--- In [EMAIL PROTECTED] ups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> 
>  In an ActionScript component, you can make the component internal to 
> the package.  You might also combine it with the "ExcludeClass" metadata 
> tag to 'hide' the class name from people using your SWC. 
> 
>  I'm not sure if I'd equate either of these approach to private, though.
> 
>  I blogged about this in a bit more detail:
> 
> http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 
> 65B3-D59C-
464EC981E0A2EA8F
> 
> Josh McDonald wrote:
> > Not in MXML components.
> >
> > -Josh
> >
> > On Wed, Jul 23, 2008 at 9:53 AM, Nate Beck <[EMAIL PROTECTED] 
> > > wrote:
> >
> > Newbish question... but after searching on google, I can't get a
> > concise answer.
> >
> > Is it possible to encapsulate (mark private) components within a
> > Flex component?
> >
> > So I have custom MXML component (ResourcesTree) that has a Tree
> > inside of it. I don't want
> > the Tree to directly be available outside the ResourcesTree Component.
> >
> > Any input?
> >
> >
> >  - - --
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder 
> > sFAQ.txt
> > Search Archives:
> > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo!
> > Groups Links
> >
> >
> >mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com
> > 
> >
> >
> >
> >
> >
> > -- 
> > "Therefore, send not to know For whom the bell tolls. It tolls for thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED] 
> > 
> 
> -- 
> Jeffry Houser
> Flex, ColdFusion, AIR
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> Adobe Community Expert 

> My Company:  
> My Podcast: 
> My Blog: 
>




  

Re: [flexcoders] Encapsulating a custom flex component?

2008-07-22 Thread Sid Maskit
I'm not sure whether either of these would serve your purposes, but I believe 
there are two ways to have a private property within an MXML-coded component.

Declare your tree using an MXML tag, but do not give it an id attribute. For 
MXML components, the id is treated as the name of a public property. If there 
is no id, there is no accessible property. Of course, this will only work if 
you do not need to be able to access the tree component at all, but only need 
to declare it: i.e. if you can completely set it up using the MXML, and do not 
need to bind to any of its properties.

Within an MXML script tag, declare a private variable of type Tree. To 
initialize the variable, you will need to have a function do so. Generally, one 
does this within an init function which handles the creationComplete event. You 
could then add the tree object as a child, using the addChild method of the 
component. Within your custom component, you will have access to the private 
variable, but nothing outside of the custom component will have access to it.

What you cannot do is declare as private (or public, protected, or internal) an 
item declared using an MXML tag. By definition, anything declared using an MXML 
tag is public, although not necessarily accessible.



- Original Message 
From: Nate Beck <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 22, 2008 4:53:04 PM
Subject: [flexcoders] Encapsulating a custom flex component?


Newbish question... but after searching on google, I can't get a concise 
answer. 

Is it possible to encapsulate (mark private) components within a Flex 
component? 

So I have custom MXML component (ResourcesTree) that has a Tree inside of it. I 
don't want 
the Tree to directly be available outside the ResourcesTree Component.

Any input?




  

Re: [flexcoders] Re: htmlText to Text

2008-07-19 Thread Sid Maskit
Oops, please ignore the Singleton line; it's old code in my testing file.

Also, here's slightly revised to correctly remove listener instead of using 
boolean flag:

private var myControl:TextInput;

private function init():void {
var myText:String = 'my text';
myControl = new TextInput();
this.addEventListener(Event.ENTER_FRAME, onFrame);
myControl.htmlText = myText;
this.addChild(myControl);
trace("from init");
trace(myControl.htmlText);
trace(myControl.text);
}

private function onFrame(event:Event):void {
this.removeEventListener(Event.ENTER_FRAME, onFrame);
trace("from onFrame");
trace(myControl.htmlText);
trace(myControl.text);
this.removeChild(myControl);
}




- Original Message 
From: Sid Maskit <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, July 19, 2008 9:49:01 AM
Subject: Re: [flexcoders] Re: htmlText to Text


I don't know if this will be of interest to anyone, but I learned something 
trying to respond to this post. I thought that it would be cool to do this 
entire thing within ActionScript. I managed to get it working, but it took a 
little bit more than I thought it would.

One can use the text input control to convert from HTML to plain text, but the 
control must be on the stage for at least one frame. Thus I end up with the 
following code (within a script tag):

private var myControl:TextInput ;
private var done:Boolean;

private function init():void {
Singleton.getInstan ce().doSomething ();
var myText:String = 'my text';
myControl = new TextInput();
this.addEventListen er(Event. ENTER_FRAME, onFrame);
myControl.htmlText = myText;
this.addChild( myControl) ;
trace("from init");
trace(myControl. htmlText) ;
trace(myControl. text);
}

private function onFrame(event: Event):void {
if (done) {return;}
done = true;
trace("from onFrame");
trace(myControl. htmlText) ;
trace(myControl. text);
this.removeChild( myControl) ;
}

To show the change that results from having the control on the stage for a 
frame, here's the trace result:

from init

null
from onFrame
my text
my text

If somebody has a way to have the text input control do the conversion without 
having to put the control onto the stage, I would be interested to hear about 
that.

Hope somebody finds that useful,

Sid



- Original Message 
From: hugocorept 
To: [EMAIL PROTECTED] ups.com
Sent: Saturday, July 19, 2008 5:55:24 AM
Subject: [flexcoders] Re: htmlText to Text


Nevermind, i resolved it.

Create a RichTextEditor pass the "htmlText" to it, then accessing to is "Text" 
proproety it's 
tag free :D 

Example:








The text in the TextArea are not formated was i wanted :)

Thanks, anyway

--- In [EMAIL PROTECTED] ups.com, "hugocorept"  wrote:
>
> Hi guys,
> 
> Does somebody have an idea to convert htmlText to text, it means remove the 
> Angle 
> Brackets.
> 
> Example:
> 
> Lorem Ipsum
> 
> to
> 
> Lorem Ipsum
> 
> 
> 
> I don't know, RegExp, some String Method ? :S
> 
> Thanks,
> Core
>





  

Re: [flexcoders] Re: htmlText to Text

2008-07-19 Thread Sid Maskit
I don't know if this will be of interest to anyone, but I learned something 
trying to respond to this post. I thought that it would be cool to do this 
entire thing within ActionScript. I managed to get it working, but it took a 
little bit more than I thought it would.

One can use the text input control to convert from HTML to plain text, but the 
control must be on the stage for at least one frame. Thus I end up with the 
following code (within a script tag):

private var myControl:TextInput;
private var done:Boolean;

private function init():void {
Singleton.getInstance().doSomething();
var myText:String = 'my text';
myControl = new TextInput();
this.addEventListener(Event.ENTER_FRAME, onFrame);
myControl.htmlText = myText;
this.addChild(myControl);
trace("from init");
trace(myControl.htmlText);
trace(myControl.text);
}

private function onFrame(event:Event):void {
if (done) {return;}
done = true;
trace("from onFrame");
trace(myControl.htmlText);
trace(myControl.text);
this.removeChild(myControl);
}

To show the change that results from having the control on the stage for a 
frame, here's the trace result:

from init

null
from onFrame
my text
my text

If somebody has a way to have the text input control do the conversion without 
having to put the control onto the stage, I would be interested to hear about 
that.

Hope somebody finds that useful,

Sid



- Original Message 
From: hugocorept <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, July 19, 2008 5:55:24 AM
Subject: [flexcoders] Re: htmlText to Text


Nevermind, i resolved it.

Create a RichTextEditor pass the "htmlText" to it, then accessing to is "Text" 
proproety it's 
tag free :D 

Example:








The text in the TextArea are not formated was i wanted :)

Thanks, anyway

--- In [EMAIL PROTECTED] ups.com, "hugocorept"  wrote:
>
> Hi guys,
> 
> Does somebody have an idea to convert htmlText to text, it means remove the 
> Angle 
> Brackets.
> 
> Example:
> 
> Lorem Ipsum
> 
> to
> 
> Lorem Ipsum
> 
> 
> 
> I don't know, RegExp, some String Method ? :S
> 
> Thanks,
> Core
>




  

Re: [flexcoders] htmlText to Text

2008-07-19 Thread Sid Maskit
I've only tested this with the actual sample below, so it may need some 
refinement, but this should get you started:

var myText:String = 'my text';
myText = myText.replace(/\<.*?\>/g, "");
trace(myText);

Hope that helps,

Sid



- Original Message 
From: hugocorept <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Saturday, July 19, 2008 3:37:38 AM
Subject: [flexcoders] htmlText to Text


Hi guys,

Does somebody have an idea to convert htmlText to text, it means remove the 
Angle 
Brackets.

Example:

Lorem Ipsum

to

Lorem Ipsum

I don't know, RegExp, some String Method ? :S

Thanks,
Core




  

Re: {Disarmed} Re: [flexcoders] Variable Typecasting

2008-07-19 Thread Sid Maskit
Interesting. Thanks for the clarification. I guess I have been thinking that if 
FlexBuilder doesn't show something as an option in the code completion menu 
that I should avoid using it, or should only use it with bracket syntax.

This might just be me, but I would go a little further and say that I like 
using brackets to call out that I am using a dynamic property. On the other 
hand, if I am using a strongly typed object, then I like to cast, and use the 
dot notation. And if I cast first, then the code completion will in fact show 
the property as an option.

So I would want to do something like this:

var vo:VoClass = new VoClass; // some custom class
var obj:Object = {strEMail: "foo"};
var acUser:ArrayCollection = new ArrayCollection();
acUser.addItem(obj);
acUser.addItem(vo);
var strEMail:String = acUser.getItemAt(0)["strEMail"] as String;
strEMail = (acUser.getItemAt(1) as OSData).comment;

Admittedly, as you have made clear, this approach is not necessary. However, I 
do think it has some benefit, particularly since it allows one to both lean a 
little more on FlexBuilder, and give the compiler a little more information to 
work with.

However, having said all that, you are nonetheless quite right that I misspoke 
about what can be done.




- Original Message 
From: Gordon Smith <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, July 18, 2008 2:26:47 PM
Subject: RE: {Disarmed} Re: [flexcoders] Variable Typecasting


There is no reason why 
 
strEMail = acUser.getItemAt( 0).strEMail;
 
shouldn't both compile and run if the 0th
item in the ArrayCollection acUser has a property named strEMail of type
String. And, in fact, I had no problem compiling and running
 
var acUser:ArrayCollect ion
= new ArrayCollection( [ { strEMail: "foo" } ]);
var strEMail:String =
acUser.getItemAt( 0).strEMail;
trace(strEMail) ;
 
It traced "foo" as one would
expect.
 
Since getItemAt()' s return type is Object,
the compiler lets you access any property on it. (Of course, strong typing is
better practice). And when you access a property on an Object, the compiler
treats that property as having type *, which can be assigned to a String var
without casting it to a String.
 
Gordon Smith
Adobe Flex SDK Team
 


 
From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of Sid Maskit
Sent: Friday, July 18, 2008 1:35
PM
To: [EMAIL PROTECTED] ups.com
Subject: Re: {Disarmed} Re:
[flexcoders] Variable Typecasting
 
As someone else explained, it is better to use strongly typed objects
then generic ones. However, if you are going to use a generic one, something
like the following should work:

strEMail =
GlobalVars.instance .acUser.getItemA t(0)["strEMail" ] as
String;

Two things to note here. First, if you are using a generic object, you can
access its properties using bracket offsets with the property name in quotes.
You need to do this since what you actually have is an associative array, and
the compiler cannot know what its keys are. Second, the preferred method of
casting is not to use a constructor, a la String(whatIAmCasti ng), but to
use the as operator, a la whatIAmCasting as String.
 
- Original Message

From: Scott <[EMAIL PROTECTED] us>
To: [EMAIL PROTECTED] ups.com
Sent: Friday, July 18, 2008 6:48:58 AM
Subject: RE: {Disarmed} Re: [flexcoders] Variable Typecasting
Wow.  This was incredibly frustrating but after playing around
(and rebooting my computer numerous times from the debugger crashing) I finally
figured out how to reference the data in the arraycollection.
 
I didn’t have to typecast it.  However, I had to process
it one function at a time.
 
I tried strEMail = String(GlobalVars. instance. acUser.getItemAt
(0).strEMail) ; and that didn’t work; it kept throwing an error that it
didn’t know about strEMail.  After playing around I discovered that
if I broke out the functions it would work.
 
This is what worked for me:
 
private var objUser:Object;
 
private function blah( acUser:arrayCollect ion): void
{
 
   
objUser = GlobalVars.instance .acUser.getItemA t(0);
   
strEMail = String(objUser. strEMail) ;
}
 
After I got the results I wanted, I tried it again as one line and
Flex threw an error that it again didn’t know about strEMail. 
Perhaps that’s a bug…?
 
-sj


 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Scott
Sent: Friday, July 18, 2008 8:12
AM
To: [EMAIL PROTECTED] ups.com
Subject: {Disarmed} Re:
[flexcoders] Variable Typecasting
 
It seemed to have taken that but now it’s still not pulling
the data in as I would expect it.
 
The getItemAt(x) in reading looks like it would pull in the whole
record at ‘x’.  However, it won’t let me refer to the
record as getItemAt(0) .strEMail since it doesn’t know strEMail exists in
that collection.
 
In s

Re: {Disarmed} Re: [flexcoders] Variable Typecasting

2008-07-18 Thread Sid Maskit
As someone else explained, it is better to use strongly typed objects then 
generic ones. However, if you are going to use a generic one, something like 
the following should work:

strEMail = GlobalVars.instance.acUser.getItemAt(0)["strEMail"] as String;

Two things to note here. First, if you are using a generic object, you can 
access its properties using bracket offsets with the property name in quotes. 
You need to do this since what you actually have is an associative array, and 
the compiler cannot know what its keys are. Second, the preferred method of 
casting is not to use a constructor, a la String(whatIAmCasting), but to use 
the as operator, a la whatIAmCasting as String.



- Original Message 
From: Scott <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, July 18, 2008 6:48:58 AM
Subject: RE: {Disarmed} Re: [flexcoders] Variable Typecasting


Wow.  This was incredibly frustrating but
after playing around (and rebooting my computer numerous times from the
debugger crashing) I finally figured out how to reference the data in the
arraycollection.
 
I didn’t have to typecast it. 
However, I had to process it one function at a time.
 
I tried strEMail = String(GlobalVars. instance. acUser.getItemAt (0).strEMail) ;
and that didn’t work; it kept throwing an error that it didn’t know
about strEMail.  After playing around I discovered that if I broke out the
functions it would work.
 
This is what worked for me:
 
private var objUser:Object;
 
private function blah( acUser:arrayCollect ion):
void
{
 
objUser = GlobalVars.instance .acUser.getItemA t(0);
strEMail
= String(objUser. strEMail) ;
}
 
After I got the results I wanted, I tried
it again as one line and Flex threw an error that it again didn’t know
about strEMail.  Perhaps that’s a bug…?
 
-sj


 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Scott
Sent: Friday, July 18, 2008 8:12
AM
To: [EMAIL PROTECTED] ups.com
Subject: {Disarmed} Re:
[flexcoders] Variable Typecasting
 
It seemed to have taken that but now it’s still not pulling
the data in as I would expect it.
 
The getItemAt(x) in reading looks like it would pull in the whole
record at ‘x’.  However, it won’t let me refer to the
record as getItemAt(0) .strEMail since it doesn’t know strEMail
exists in that collection.
 
In structures (in C++/Coldfusion/ etc…) I had to define
the variable names within the structure.  However, in AS3 I just defined
the variable: 
 
[Bindable] public var acUser:ArrayCollect ion = new
ArrayCollection( );
 
How do I access the strEMail from the array collection (or at least
tell the Flex compiler that the variable really does exist).
 
Thanks 
 sj
 


 
From:[EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Peter Witham
Sent: Friday, July 18, 2008 12:02
AM
To: [EMAIL PROTECTED] ups.com
Subject: {Disarmed} Re:
[flexcoders] Variable Typecasting
 
Have you
tried 

 
strEMail = String(GlobalVars. instance. acUser.getItemAt (0));

 
Do not have my
machine in front of me to test but pretty sure you can cast something that way.
I know that's the way I do it to cast MovieClip names.

 
Regards,
Peter
On 7/17/08, Scott <[EMAIL PROTECTED] us> wrote:
I'm trying to pull a variable from an arrayCollection
which I know is type String.
 
Here's the code:
 
  publicvarstrEMail:String;
   
…
Private function … 
{
   
strEMail = GlobalVars.instance .acUser.getItemA t(0);
}
 
That above line of course throws an error because it's
not sure that the variable at (0) is actually a string even though I know it
is.  In C++ I would just tell it using a typecast that it is a string.
 
How can I copy that element into a variable?
 
Thanks!



-- 
Peter Witham
http://www.evolutio ndata.com
Internet and Multimedia developer
Certified Flash Designer. 

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 
-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 


  

Re: [flexcoders] Re: Comparing two array collections

2008-07-17 Thread Sid Maskit
Maybe somebody else will have one, but I am not seeing a simple way to do this 
in a more sophisticated manner. This leads me to the following question: Are 
you experiencing performance problems? If not, I would suggest coding what 
works, and not worrying about the overhead involved in a somewhat brute force 
approach. If you start encountering performance problems, and identify this 
part of the code as where the problem lies, then it might be worth putting in 
the additional work to develop a more subtle solution.




- Original Message 
From: tchredeemed <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 17, 2008 1:13:48 PM
Subject: [flexcoders] Re: Comparing two array collections


Just an update, I know I can pass both into a function that does the
following:

checkForEquality( a:AC, b:AC ):Boolean {
if( a.length != b.length ) return false;

loop through each item
if an item differs, return false;

return true;
}

however, I was hoping for a solution with less overhead.

--- In [EMAIL PROTECTED] ups.com, "tchredeemed" <[EMAIL PROTECTED] > wrote:
>
> How would you go about comparing two array collections?
> 
> Each array collection is populated with items of an ADT ("Order", to
> be exact).
> 
> If I do .toString() comparisons, it only appears as different if I add
> or remove an "Order", because the .toString() shows up as "[object
> Order], [object Order], etc.."
> 
> I need to know if I add or remove an order, as well as if an order
> changes...
> 
> Just wondering if there is an easy solution.
>




  

Re: [flexcoders] how do I read a hexadecimal number value correctly?

2008-07-17 Thread Sid Maskit
I haven't worked with the Google API's, so this is a guess, but I suspect that 
Google is returning XML, and that you are doing some sort of parsing to convert 
some of the XML into the hexadecimal number. If that is correct, you ought to 
be able to use e4x to extract a string from the XML.



- Original Message 
From: ivo <[EMAIL PROTECTED]>
To: FlexCoders 
Sent: Thursday, July 17, 2008 2:47:09 PM
Subject: [flexcoders] how do I read a hexadecimal number value correctly?


Hello all,

I am using the Google APIs and am finding the IDs of the objects in Google are 
not getting translated correctly. When I request for a list of GData objects
I get back objects that in the debugger look like this:

id = mx.collections. ArrayCollection (@10781ec1) 
[0] = 5189229149115242496 [0x4803d86adb1dd800 ] 
dispatchResetEvent = true 
filterFunction = null 
length = 1 
list = mx.collections. ArrayList (@1048bb51) 
sort = null 
source = Array (@106e75b9) 

When I read the value of id[0] I get "518922914911524200 0"   .

What would be the correct way of handling this value? I am attempting to covert 
it into a string so I can build a different URL.

Thanks,

- Ivo



  

Re: [flexcoders] Array reference vs values

2008-07-16 Thread Sid Maskit
Oops. Where my speech recognition software wrote "teen reference", it should 
read "dereference".



- Original Message ----
From: Sid Maskit <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 16, 2008 7:50:07 PM
Subject: Re: [flexcoders] Array reference vs values


It has been a while since I worked in C++, but I am pretty sure that you are 
incorrect about references. If I remember correctly, C++ has a distinction 
between pointers and references where a pointer points at a specific memory 
address, but a reference is an alias for another variable, and that variable 
might or might not itself be a pointer. The actual value of a pointer is a 
memory address, but the value of a reference is the value of whatever variable 
it refers to. In order to get the value of the object at the memory address, 
one has to teen reference the pointer. These differences occur because pointers 
and references used different mechanisms.

Like most, maybe all, more recent languages, ActionScript has references, but 
not pointers.

A reference is simply an alias which gives one access to some object. It is 
sort of like a telephone connection to the object: i.e. you can use it to set 
or get the value of the object; but hanging up the phone only breaks the 
connection, it does not make the object go away. You never have access to 
memory addresses.

When an object has no references to it, it becomes eligible for garbage 
collection. There is no way to determine when an object will in fact be garbage 
collected.

Applying this to the system you are describing, things look like this. (For 
simplicity, I will only deal with one of your dates.)

var person:Person = new Person();

Assuming that you are not assigning default values in your class, at this point 
person.breakfast is null.
 
person.breakfast = new Date();

Now person.breakfast refers to the newly created date object: i.e. the date 
object now has one reference to it.

timeArr[1] = person.breakfast;

Now timeArr[1] refers to the same date object as does person.breakfast: i.e. 
the date object now has two references to it.

You could now access the date object by using either reference, and each of 
them would give you the same information, and the same ability to manipulate 
the date object.

However, setting a reference to null, or to a different object, is essentially 
hanging up the telephone, and dialing a new number. This will connect the 
variable you are using to that new object, but has no effect on other variables 
referring to the previous object.

timeArr[1] = null;

Now timeArr[1] no longer refers to anything, but person.breakfast continues to 
refer to the original date object.

Perhaps the key detail here is that what we have is to variables that refer to 
the same object, but those variables have no relationship with one another. 
This is one of the fundamental aspects of how object-oriented programming 
works. I would not say that one could not have a system where having two 
variables refer to the same object would put them into a relationship with one 
another, but only that that would be a very different system from the one we 
have.

Having said that, I would say that you are going to need to have a way of 
directly accessing your person object if you want to set one or more of its 
properties to null.



- Original Message 
From: Darren Houle <[EMAIL PROTECTED] com>
To: [EMAIL PROTECTED] ups.com
Sent: Wednesday, July 16, 2008 6:55:33 PM
Subject: RE: [flexcoders] Array reference vs values


Josh
 
Yes, what you're describing is exactly what I described and is, in fact, what 
it happening... but to say I don't ever need to do this?  Well... yes... I need 
to do this... and it has nothing to do with the garbage collector.
 
Here, let me explain in another way
 
I have a custom object... lets say it's a Person object.  It has various 
properties, but several are Date types.  These are all consecutive, like a 
workflow, and I want to be able to address them in order via an array... like 
this...
 
var person : Person = new Person();
 
person.wakeup = new Date();
person.breakfast = new Date();
person.lunch = new Date();
person.dinner = null;
person.bedtime = null;
 
var timeArr : Array = new Array();
 
timeArr[0] = person.wakeup;
timeArr[1] = person.breakfast;
timeArr[2] = person.lunch;
timeArr[3] = person.dinner;
timeArr[4] = person.bedtime;
 
 
Then some other code figures out where we are in the flow of the day's events...
 
var status : int;
if (some criteria)
  {  event = 2;  }
 
But I determine lunch hasn't actually happened yet, so it shouldn't have a Date 
yet.  I need to blank out this value that was previously set in the Person 
object...
 
if (some criteria)
 {  timeArr[event] = null;  }
 
But since these references don't seem to propogate backwards, nulling one of 
the array elements doesn't affect the original property

Re: [flexcoders] Array reference vs values

2008-07-16 Thread Sid Maskit
It has been a while since I worked in C++, but I am pretty sure that you are 
incorrect about references. If I remember correctly, C++ has a distinction 
between pointers and references where a pointer points at a specific memory 
address, but a reference is an alias for another variable, and that variable 
might or might not itself be a pointer. The actual value of a pointer is a 
memory address, but the value of a reference is the value of whatever variable 
it refers to. In order to get the value of the object at the memory address, 
one has to teen reference the pointer. These differences occur because pointers 
and references used different mechanisms.

Like most, maybe all, more recent languages, ActionScript has references, but 
not pointers.

A reference is simply an alias which gives one access to some object. It is 
sort of like a telephone connection to the object: i.e. you can use it to set 
or get the value of the object; but hanging up the phone only breaks the 
connection, it does not make the object go away. You never have access to 
memory addresses.

When an object has no references to it, it becomes eligible for garbage 
collection. There is no way to determine when an object will in fact be garbage 
collected.

Applying this to the system you are describing, things look like this. (For 
simplicity, I will only deal with one of your dates.)

var person:Person = new Person();

Assuming that you are not assigning default values in your class, at this point 
person.breakfast is null.
 
person.breakfast = new Date();

Now person.breakfast refers to the newly created date object: i.e. the date 
object now has one reference to it.

timeArr[1] = person.breakfast;

Now timeArr[1] refers to the same date object as does person.breakfast: i.e. 
the date object now has two references to it.

You could now access the date object by using either reference, and each of 
them would give you the same information, and the same ability to manipulate 
the date object.

However, setting a reference to null, or to a different object, is essentially 
hanging up the telephone, and dialing a new number. This will connect the 
variable you are using to that new object, but has no effect on other variables 
referring to the previous object.

timeArr[1] = null;

Now timeArr[1] no longer refers to anything, but person.breakfast continues to 
refer to the original date object.

Perhaps the key detail here is that what we have is to variables that refer to 
the same object, but those variables have no relationship with one another. 
This is one of the fundamental aspects of how object-oriented programming 
works. I would not say that one could not have a system where having two 
variables refer to the same object would put them into a relationship with one 
another, but only that that would be a very different system from the one we 
have.

Having said that, I would say that you are going to need to have a way of 
directly accessing your person object if you want to set one or more of its 
properties to null.



- Original Message 
From: Darren Houle <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 16, 2008 6:55:33 PM
Subject: RE: [flexcoders] Array reference vs values


Josh
 
Yes, what you're describing is exactly what I described and is, in fact, what 
it happening... but to say I don't ever need to do this?  Well... yes... I need 
to do this... and it has nothing to do with the garbage collector.
 
Here, let me explain in another way
 
I have a custom object... lets say it's a Person object.  It has various 
properties, but several are Date types.  These are all consecutive, like a 
workflow, and I want to be able to address them in order via an array... like 
this...
 
var person : Person = new Person();
 
person.wakeup = new Date();
person.breakfast = new Date();
person.lunch = new Date();
person.dinner = null;
person.bedtime = null;
 
var timeArr : Array = new Array();
 
timeArr[0] = person.wakeup;
timeArr[1] = person.breakfast;
timeArr[2] = person.lunch;
timeArr[3] = person.dinner;
timeArr[4] = person.bedtime;
 
 
Then some other code figures out where we are in the flow of the day's events...
 
var status : int;
if (some criteria)
  {  event = 2;  }
 
But I determine lunch hasn't actually happened yet, so it shouldn't have a Date 
yet.  I need to blank out this value that was previously set in the Person 
object...
 
if (some criteria)
 {  timeArr[event] = null;  }
 
But since these references don't seem to propogate backwards, nulling one of 
the array elements doesn't affect the original property.  That's the *whole 
purpose* of reference vs value... a reference is a pointer to memory space... 
so if I null that memory space it should affect all the vars pointing to that 
memory space.
 
Does that make more sense?

Darren





 
To: [EMAIL PROTECTED] ups.com
From: [EMAIL PROTECTED] com
Date: Thu, 17 Jul 2008 11:30:29 +1000
Subject: 

Re: [flexcoders] Navigating from flex to jsp page

2008-07-16 Thread Sid Maskit
Once you've loaded the flex movie, it would seem to me to make more sense to 
treat it as in control, and treat the servlet as a service for the flex movie. 
I would set up a handler for when the servlet returns, and have the servlet 
return some value which tells the flex movie what to do. It could return a URL 
which the flex movie could then navigate to, or it could return an empty string 
in which case the flex movie would do nothing. If you wanted to make it a 
little more secure, you could hard code a default URL into the flex movie, and 
have it navigate there unless it received a message telling it to do something 
else. That way it would default to unloading itself, and would only stick 
around if the servlet told it that was OK.

Hope that helps.




- Original Message 
From: gaurav1146 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 15, 2008 10:17:10 PM
Subject: [flexcoders] Navigating from flex to jsp page


I have a flex application that loads as soon as a user hits a url. Now
this application has a creationComplete method which makes a call to a
java servlet. In the servlet (/servlet filter) I perform certain
authorization checks and if the check fails I want to navigate the
user to a jsp page.

I tried using  the forward method of java's RequestDisptacher class
but once the flex application has loaded this does not seem to work
and the user is not taken to the jsp page. Also I cannot use Flex's
navigateToURL because  jsp redirection is conditional based on
authorization checks in my servlet. Please let me know on how to go
about it.

TIA 
Gaurav




  

Re: [flexcoders] function foo(... args) { ;}

2008-07-16 Thread Sid Maskit
args is already an array:

function foo(... args) 
{
for (var i:int = 0; i < args.length; i++)
{
trace(i + ": " + args[i]);
}
}



- Original Message 
From: Manu Dhanda <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 15, 2008 11:17:12 PM
Subject: RE: [flexcoders] function foo(... args) { ;}



You mean to say:
function foo(... args) 
{
var myArgs:Array = Array(args);
}

Am I right here??

Thanks,
Manu.

Rick Winscot-2 wrote:
> 
> You can treat args as an array.
> 
> 
> 
> Rick Winscot
> 
> 
> 
> 
> 
> From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On
> Behalf Of Manu Dhanda
> Sent: Wednesday, July 16, 2008 1:56 AM
> To: [EMAIL PROTECTED] ups.com
> Subject: [flexcoders] function foo(... args) { ;}
> 
> 
> 
> 
> How to access the parameters passed in the function like this:
> 
> function foo(... args) 
> {
> // How to access the passed arguments here.
> }
> 
> Thanks.
> -- 
> View this message in context:
> http://www.nabble. com/function- foo%28... -args%29- %7B--%7D- 
> tp18480729p18480 72
> 9.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble. com/function- foo%28... 
-args%29- %7B--%7D- tp18480729p18480 961.html
Sent from the FlexCoders mailing list archive at Nabble.com.




  

Re: [flexcoders] Passing variables into your AIR application from a website?

2008-07-15 Thread Sid Maskit
My suspicion is that there are some serious challenges here.

First, getting the operating system to launch the air application based on 
clicking on a link. I think most operating systems map http links to the 
default browser, mailto links to the default a mail client, etc. There may be a 
way to add new mappings, but I don't know what it is. Unless you can find a way 
for the air application to tell the operating system how to map a link to your 
air application, I don't see how this would work. Presumably, you would need 
something unique about the link which the operating system would use for this 
purpose.

Second, if you did get the operating system to launch the application, it would 
then need some way to pass in the video id to the launched application. I'm not 
sure if there is a way to set up air applications so they receive commandline 
parameters, but I think you would need that, or something like that.

What seems much more likely to work is giving people a text input field where 
they can paste in the URL, and parsing it to extract the video id which the air 
application could then display. Needless to say, it would probably be easiest 
to just give people a video id input field, and include a line in your email 
along these lines: "if you already have the video player application installed, 
enter the following id on the video retrieval screen: idNumber."



- Original Message 
From: rin_boating <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 15, 2008 10:20:03 AM
Subject: [flexcoders] Passing variables into your AIR application from a 
website?


Pardon the cross post

Hello everyone,

I'm hoping someone can advise me on the possibilities of this 
functionality:

I have an AIR application that is used to play videos. I'm storing 
the videos remotely and then calling them through several methods 
defined in my application. The videos are also all located on my 
website for quick access (in the event that a person does not have 
the AIR application installed). Right now, inside my AIR application, 
users can pick their video, and then e-mail it to themselves, their 
friends, etc. When a user e-mails it to a friend, I am simply sending 
the user a link to my website with the appropriate video. I need to 
know if the following things are possible (and to what extent):

1. Is it possible to link directly from any HTML compliant area to my 
AIR application (if the user has my AIR application downloaded), with 
a video directly tied in that link? (e.g. through like a URL 
parameter)

Purpose: This would allow my users to click on 
http://www.mywebsit e.com/my_ Air_app_extensio n/user_video_ id
Which in turn would allow my users to start up my AIR application 
with their video selected instead of starting at the default Welcome 
page of my AIR application.

If you have any other thoughts on how to accomplish this 
functionality, please advise.

Thank you 




  

Re: [flexcoders] Finding a date between dates

2008-07-15 Thread Sid Maskit
One of the ways that Adobe modified the SQLite database is to have added a date 
datatype. If you use that, I would think that it would also support standard 
SQL such as the between operator. Also,you should be able to read from the 
database field directly back into a date chooser control. Similarly, if you 
then upload data from the local database to a remote database, it should 
correctly map onto a date field in the remote database.



- Original Message 
From: bredwards358 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, July 15, 2008 8:35:36 AM
Subject: [flexcoders] Finding a date between dates


Sounds like a simple question and easily answered by a search, but
considering my own "search-fu" and not really finding anything
specifically relating to my question after my search I decided just to
post this.

In the app I'm working on, the user can print out reports by selecting
two dates and getting info on orders placed between those two dates.
How it works thus far is that the user picks the two dates from two
date chooser controls, and clicks the button. How the report itself is
generated and displayed doesn't apply here, I just need to figure out
how to get the info I need from the database.

All my dates are saved in the database(SQL Lite as text) using
something like this:

transactionStatemen t.parameters[ ":dateUpdated" ] = new Date().toString( );

This keeps it in the format the user is most familiar with. However
I'm not exactly sure how comparisons can be done to find a date
between too others since they're not exactly numbers. Basically this
all boils down to, what do I need to do to find all dates which fall
between two selected dates?

Thanks in advance,
Brian Ross Edwards,
Tech-Connect LLC




  

[flexcoders] Re: Access of undefined property flash.media.sound

2008-07-15 Thread Sid Maskit
In my experience, the compiler gets unhappy when one tries to run code
outside of a function inside of a script tag. My guess is that it is a
timing issue. I would try putting your code into an init function, and
calling it with an event such as creationComplete.

--- In flexcoders@yahoogroups.com, "Shaq" <[EMAIL PROTECTED]> wrote:
>
> The code below is pulled from the Flex 3 manual but I am unable to get
> it to compile correctly using Flex 3.  Can anyone provide any insight
> as to why the code below raises the following errors:
> 1120: Access of undefined property onSoundLoaded.
> 1120: Access of undefined property req.
> 1120: Access of undefined property s.
> 
> Any help would be greatly appreciated.
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="vertical">
>   
>   
>   
> 
>




Re: [flexcoders] Accessing public function from a different mxml

2008-07-15 Thread Sid Maskit
I can't say that I fully understand the distinction between the two, but I have 
found that sometimes this.parentDocument works better than this.parent

Hope that helps,

Sid



- Original Message 
From: andrewedwards39 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, July 14, 2008 7:54:53 PM
Subject: [flexcoders] Accessing public function from a different mxml


Hello all,

I have a public function in an mxml document (lets call it a.mxml, and
pubfunction ) and I want to access it from another MXML.

this is what I am trying (based on my old as2 knowledge :)

this.parent. parent.a. pubfunction( );

where the mxml calling 'a' is two levels below 'a's parent.

this is not working, so I was wondering if anyone had any tips?

cheers

andrew




  

Re: [flexcoders] flex php login

2008-07-15 Thread Sid Maskit
I only took a quick glance, but I don't see a click event handler being set for 
your "Login to Mixbook" button. So far as I can tell, nothing is set to happen 
when the button is clicked.



- Original Message 
From: nitishdhar <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, July 14, 2008 11:38:24 PM
Subject: [flexcoders] flex php login



I m creating my login page in loginpage.mxml but the values are not getting
sent to the php page login.php... .plz help

loginpage.mxml
 - --

http://www.adobe. com/2006/ mxml" xmlns="*"
layout="absolute" >
http://localhost/ mixbook/login. php"
useProxy="false" method="POST" >

 {emailaddress. text}
{password .text}





































login.php
 -

-- 
View this message in context: http://www.nabble. com/flex- php-login- 
tp18458605p18458 605.html
Sent from the FlexCoders mailing list archive at Nabble.com.




  

[flexcoders] Re: Float number calculation in AS3

2008-07-14 Thread Sid Maskit
This modified version of your function will give the results you are
looking for. I'm not sure what this means in terms of your general
conclusion, or in terms of best practice.


private function add(v1:Number, v2:Number, v0:Number):Number {
var v3:Number = v1+v2;
var status:String = (v0.toPrecision(3)==v3.toPrecision(3))?"OK"
:"failure" ;
trace("("+v1+ ") + ("+v2+") = "+v3.toPrecision(3)+", "+status);
return v3;
}

--- In flexcoders@yahoogroups.com, "Vadim Melnik" <[EMAIL PROTECTED]> wrote:
>
> Hello All,
> 
> Its should be very simple, I saw posts related to this issue before
in this list, but somehow was unable to find it right now. Below is
listed simple test case for problem:
> 
> 
> http://www.adobe.com/2006/mxml";
creationComplete="test()">
> 
> 
> 
> And result output:
> 
> (1.2) + (1) = 2.2, OK
> (1.2) + (-1) = 0.19996, failure
> (82003.9) + (-16923) = 65080.8994, failure
> (3.2) + (-1) = 2.2, OK
> 
> Is it bug or special behavior in AS3 by design, that second and
third "add" calls produces strange results instead of 0.2 and 65080.9.
 In other words it's impossible to compare two calculated financial
values on Flex side .
> 
> 
> --
> Thanks,
> Vadim.
>




Re: {Disarmed} RE: [flexcoders] Calling AS3 functions

2008-07-13 Thread Sid Maskit
I haven't worked much with states, but my sense is that here is how
things might be working.

Either by default, or based on some user action, you are entering the
state where the loginForm component is instantiated. At that point the
user logs in, using the CFC.

By definition, the login process has to be asynchronous. In other
words, you need to make sure that the component which contains the
event handler for replies from the server remains in scope while the
login process occurs on the server.

Assuming that is being handled correctly, you should have a function,
presumably in loginForm, which is triggered by the response from the
server.

I would recommend having that function dispatch a "loggedIn" event.
This would in essence mean that the login form component would be
dispatching that event. Then have the login component listen for that
event, and handle it when it happens.

When dispatching the event, you can include the data received from the
server, and thus that data will be available to the listeners to that
event.

Hope that helps,

Sid
http://CraftySpace.com

--- In flexcoders@yahoogroups.com, "Scott" <[EMAIL PROTECTED]> wrote:
>
> Yes, I did change that already it does say returnEmail on both sides
> now.
> 
>  
> 
> Very interesting...  
> 
>  
> 
> This would be a better question then...  
> 
>  
> 
> I've got a login.mxml file which controls the different states the login
> can be in.  Each state essentially is another mxml file.  I'm calling a
> CFC function to process the login which is in the loginForm.mxml.  This
> function has the email address and name as returned by the CFC.  How can
> I pull that information out and into the login.mxml file?  So if what
> you are saying is that each of the files are their own class, I would
> need a way to call that class from another class.
> 
>  
> 
> I did change that method to be public but still wasn't able to "see" it.
> What is the syntax to access an external class from another class?  Do I
> need to reference class.function()?
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Alex Harui
> Sent: Saturday, July 12, 2008 12:34 AM
> To: flexcoders@yahoogroups.com
> Subject: {Disarmed} RE: [flexcoders] Calling AS3 functions
> 
>  
> 
> Each mxml has its own (document) scope.  It essentially defines a class.
> A method must be public in order to be accessed from outside the class,
> you cannot access protected from outside the class.
> 
>  
> 
> Your snippet doesn't have id's or show the relationship between the two
> classes so it is hard to say why it isn't working. Also, you appear to
> be trying to call returnEmail when the snippet only showed a returnName
> method.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Scott
> Sent: Friday, July 11, 2008 8:30 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Calling AS3 functions
> 
>  
> 
> I'm still getting the same error...
> 
>  
> 
> The class exists in the loginForm.mxml but the mxml code exists in the
> login.mxml file.
> 
>  
> 
> Is there something special I have to do to use the functions that exist
> in the other mxml file?
> 
>  
> 
> Better yet, is there a way to access variables other than setting up a
> function in the active script?
> 
>  
> 
>  Thanks much.
> 
>  
> 
> ---
> 
> 
> All AS code needs to be inside the curly braces and you need to
> concatenate your static string to the string returned from your function
> 
>  
> 
>  
> 
> --
> 
>  
> 
> I'm working on a logon class in Flex 3.  I've got a login.mxml which
> controls the overall views (logon/register/logout) all in the same box
> depending on what state the user is in.
> 
>  
> 
> In the loginForm.mxml (included in the logon.mxml), I've got a function
> called protected returnName():String
> 
>  
> 
>  
> 
> Function I want to call from the loginForm AS3 script:
> 
> protected function returnName():String   (I've also tried public in case
> it was not available in that area of code)
> 
> {
> 
>return this.username.text;
> 
> }
> 
>  
> 
> Snippet from my mxml code:
> 
> Xmlns:login="com.ft.views.login.*";
> 
>  
> 
> ...
> 
>  
> 
> 
> 
>  
> 
>
> 
> 
> 
> 
>width="75%" height="50%" layout="vertical" 
> 
>verticalScrollPolicy="off" horizontalScrollPolicy="off">
> 
> 
> 
> horizontalScrollPolicy="off">
> 
>   <-
> line in question 
> 
>  
>logoutSuccessful="this.currentState='onLogin()';" />
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> I can't seem to figure out how to reference the method as I get the
> error: 1180: Call to a possibly undefined method returnName.
> 
>  
> 
> I've tried:
> 
> 
> 
> 
> 
> Among many others...
> 
>  
> 
> This is probably pretty simple.  I really appreciate your hel

[flexcoders] Re: 3 tier architecture using adobe flex

2008-07-13 Thread Sid Maskit
Well, it's pretty flexible. At one end, you can do as suggested below,
and use flex purely as a presentation layer, keeping business logic
and data storage on the server. At the opposite end, you can deploy as
an air application which functions as a pure desktop application with
all three layers on the user's machine. In such a scenario, you could
use the local database and/or filesystem as needed. 

You can do pretty much anything you want anywhere along the continuum
between those two endpoints. Needless to say, once you get into the
world of air deployment, you open up all sorts of possibilities for
distributing responsibilities between the server and local
environment, and for sharing and/or synchronizing data between those
two locales. Although a browser-deployed solution will not have access
to local file system, never mind a local database, it will nonetheless
have a significant amount of local storage available to it. Needless
to say, the security situation is quite different depending on whether
what one deploys is a browser-based application, or an air application.

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> Well, Flex and FP are presentation layers. You would need to have
> something running on the server. I am using a traditional ASP that
> calls OLE servers that in turn talk to the SQL back-end.
> 
> Mark
> 
> --- In flexcoders@yahoogroups.com, "litesh_b321"  wrote:
> >
> > How to design a 3 tier architecture using adobe flex
> >
>




[flexcoders] Re: Context menu triggers browser crash

2008-07-13 Thread Sid Maskit
You might try running the same behavior from a simple button, instead
of from a context menu, since that might give you a sense of where the
problem lies: i.e. if it occurs even when you run the behavior off a
button, then the problem presumably has nothing to do with the context
menu.

--- In flexcoders@yahoogroups.com, "Guy Morton" <[EMAIL PROTECTED]> wrote:
>
> Hi there
> 
> I have a Flex 2 app that has a custom context menu attached to the
> root application object. It works without incident on the Mac, but on
> windows, choosing an item from the context menu sometimes causes the
> browser to crash. 
> 
> There appears to be no pattern to it, though it does seem to occur
> more frequently when choosing a menu item that calls a function that
> does a couple of sequential HTTP requests and thus can take a little
> while (maybe a second or two) to complete.
> 
> This happens in both IE and Firefox on windows, so for once we can't
> just blame IE. :-)
> 
> Anyone seen this behaviour before and know what causes it, or how to
> work around it?
> 
> TIA 
> 
> Guy
>




[flexcoders] Re: Application Design

2008-07-13 Thread Sid Maskit
Although you could do lots to make this more sophisticated, such as
creating a class for each type of data you are collecting, this looks
like a solid start.

One thing you could do to improve it (which might solve your problem),
is to let the compiler know which variables it should set up for
binding. Like this:

   [Bindable]
   public var client:Object;
   [Bindable]
   public var options:Object;
   [Bindable]
   public var files:ArrayCollection;

Hope that helps.

--- In flexcoders@yahoogroups.com, "Dan Vega" <[EMAIL PROTECTED]> wrote:
>
> Maybe I am going about this the wrong way. I would like to explain
my small
> application and get some feedback. This app started out as 1 big
file but I
> decided to break it into smaller components. The main file is pretty
small
> as you can see below. What the main app does is use a view stack to
display
> the 4 "screens" I have broken into components. The first screen is the
> client selector, once a client is selected you move on to the second
screen.
> In my client selector i dispatch an event that lets anyone listening
know
> that a client was selected, this custom event pushes the client data
back to
> the main app. The next two screens do something very similar in
pushing data
> back out of the custom component and the main app grabs.it. Once the
first 3
> screens are done its time to goto the reivew screen. The final
screen needs
> all of this data I have collected. As you can see below I simply try and
> just pass the data but it does not work. Why can't I pass complex
data but
> strings will pass just fine? Im sure my being a newb to Flex has a
lot to do
> with this but I am just wondering 2 things.
> 
> 1.) What am I doing wrong here?
> 2.) How do others layout a small application similair to this ?
> 
> Thank you so much for the help
> 
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="vertical"
> width="760" height="500"
> backgroundColor="#00"
> creationComplete="init()" xmlns:components="components.*"
> xmlns:views="views.*">
> 
> 
> 
> 
> 
> 
> 
> 
>  clientSelected="onClientSelected(event)"/>
>  fileAdded="onFileAdded(event)"/>
>  optionsSaved="onOptionsSaved(event)"/>
>  options="{options}" files="{files}"/>
> 
> 
> 
> 
> 
> Thank You
> Dan Vega
> [EMAIL PROTECTED]
> http://www.danvega.org
>




[flexcoders] Re: Binding for Dynamic Datagrid

2008-07-13 Thread Sid Maskit
I believe that binding assignments need to use strings. Try:

myDG.dataProvider="{ myData }"

Hope that helps,

Sid
http://CraftySpace.com

--- In flexcoders@yahoogroups.com, "limhy0306" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I've tried using the suggestion:
> 
> myDG.dataProvider={ myData }
> 
> But compilation has syntax errors: rightbrace is unexpected.
> 
> 
> 
> Also, I've read about the binding regarding changes to the property 
> for the ArrayCollection; that we need to use itemUpdated to inform 
> about changes to the list.
> 
> Basically the myData is a list of a class: MyClass.
> 
> public class MyClass
> {
>private var _evt:ArrayCollection;
> 
>   ... 
> }
> 
> The var _evt changes in real-time & this changes need to be 
> refreshed in the Datagrid.
> 
> However, not all instances of MyClass stored in myData changes. 
> In this case, I only want to redraw parts of the Datagrid that 
> changes only.
> 
> Thank you.
> 
> Regards.
> 
> 
> --- In flexcoders@yahoogroups.com, Simon Bailey  wrote:
> >
> > myDG.dataProvider={ myData }
> > 
> > On 7 Jul 2008, at 16:26, limhy0306 wrote:
> > 
> > Hi,
> > 
> > I've created a custom Dynamic Datagrid component. I would like to
> > ask, how can I bind data to this DG?
> > 
> > My codes:
> > 
> > // Data to the datagrid. This data is dynamically changing.
> > [Bindable]
> > public var myData:ArrayCollection();
> > 
> > public var myDG:MyDG;
> > 
> > // Called when creationComplete
> > private function init()
> > {
> > myDG = new MyDG();
> > myDG.createDataGrid(); // Create the datagrid
> > myDG.dataProvider = myData; //Would this bind the data?
> > this.addChild(myDG);
> > }
> > 
> > I've noticed that when myData changed, myDG is not updated. In 
> fact,
> > the set data() function of the ItemRenderer used in myDG is not
> > being called when I call myData.refresh().
> > 
> > Is it the problem that I am not binding myDG correctly?
> > 
> > Thank you.
> >
>




[flexcoders] Re: GroupingCollection compile error

2008-07-12 Thread Sid Maskit
Somebody else may see something wrong with the code you posted, but
I'm not. It's unclear from your message where the error is occurring.
Based on the error message, it may well be that the error is in the
code above what you posted. 

I would start by pulling out the code you posted, and replacing it
with a very simple visible element, such as a label or text input, and
see if that makes the error go away. If it doesn't go away, you know
the error is somewhere else in your code.

Sid

http://CraftySpace.com

--- In flexcoders@yahoogroups.com, coder3 <[EMAIL PROTECTED]> wrote:
>
> 
> Hi
> 
> I added a mx:GroupingCollection to my mxml. 
> 
> 
>   
>   
>   
> 
> 
> 
> 
> but it gives me a compile error:
> 
> Component declarations are not allowed here. (Note: visual children must
> implement mx.core.IUIComponent)
> 
> what is it? how can i fix it? 
> 
> Thanks!
> 
> C.
> -- 
> View this message in context:
http://www.nabble.com/GroupingCollection-compile-error-tp18410128p18410128.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>




[flexcoders] Re: TextInputs - no cursor

2008-07-11 Thread Sid Maskit
Well, without seeing more code, I don't think I can say any more than
I already have.

As a sidenote, having proved myself capable of idiocy in infinite ways
when coding, I would advise against ever seriously saying something
like, "I cannot imagine that there is an error in this code."

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> Yes, running it as a stand alone app. works fine, but in the way I am 
> using this code it does not work properly. I have a cursor for the 
> SKU field only. I cannot imagine that there is an error in this code. 
> All text fields are declared in exactly same way. Strange.
> 



[flexcoders] Re: TextInputs - no cursor

2008-07-10 Thread Sid Maskit
I have been noticing extra spaces in a lot of posts. I'm suspecting
this is a feature of Yahoo groups, or maybe just of the Yahoo mail
reader that I am using to read the group. Anyway, here is the flex/web
version I used (perhaps with a whole bunch of extra spaces inserted by
the time you see it):


http://www.adobe.com/2006/mxml";
layout="absolute">























--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> My code does not have "/ >" anywhere as far as I can see.
> Can you please post your code as well?
> 
> Thanks
> 
> --- In flexcoders@yahoogroups.com, "Sid Maskit"  wrote:
> >
> > After copying and pasting your code, I initially got error messages
> > for things like "/ >" where there cannot be a space between the two
> > characters. However, once I fixed all of those, it seemed to work 
> fine
> > in terms of being able to type into each of the text input fields. I
> > got the same results whether using a flex app in the browser, or an
> > air app. I'm not sure where to go from here. Are you sure you are 
> not
> > getting any compiler errors?
> > 
> > --- In flexcoders@yahoogroups.com, "markgoldin_2000"
> >  wrote:
> > >
> > > I have this simple form:
> > > 
> > > http://www.adobe.com/2006/mxml"; width="150" 
> > > verticalScrollPolicy="off"
> > >   height="128" verticalCenter="true" horizontalCenter="true" 
> > > horizontalScrollPolicy="off">
> > > > > borderThickness="2"
> > > backgroundColor="#DD" paddingTop="0" 
> > > borderStyle="solid"
> > > top="0" 
> > > left="0" 
> > > height="100%" width="100%">
> > >   > > paddingLeft="-38"> 
> > > color="#00"/>
> > > 
> > > 
> > >   > > paddingLeft="4" color="#00">
> > > 
> > > 
> > >  paddingLeft="-
> > > 38">
> > > 
> > > 
> > > 
> > >  paddingLeft="-
> > > 38"> 
> > > > > color="#00"/>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > The only TextInput field that actually accepts input is SKU.
> > > What kind of problem am I having here?
> > > 
> > > Thanks
> > >
> >
>




[flexcoders] Re: Component ClickEvent weirdness

2008-07-10 Thread Sid Maskit
Given that your compiler error concerns converting a HelpEvent to a
MouseEvent,my guess would be that the problem is that the listener
which is receiving your HelpEvent event expects to receive a
MouseEvent. This is a piece of code which you have not yet shown us:
i.e. the listener function for the HelpEvent.

--- In flexcoders@yahoogroups.com, "Jason" <[EMAIL PROTECTED]> wrote:
>
> So I have a simple component which is a help button, (the component 
> is mainly just an image.) I wrote a custom event (extends Event) for 
> use all over my app when a help event occurs, like a request to 
> launch help.  I want to just dispatch this custom event when my 
> custom help button is clicked, so this is my setup:
> 
> in the script tag:
> 
>import myPackage.blahblahblah.event.HelpEvent;
> 
>private function onHelpClicked():void
>{
>   dispatchEvent(new HelpEvent(HelpEvent.HELP_INITIALIZED, true));
>}
> 
> then later in the MXML:
> 
> 
> 
> But the problem is, I get a runtime error when the component is 
> clicked, "Type Coercion failed: cannot convert 
> com.venice.event::[EMAIL PROTECTED] to flash.events.MouseEvent."
> 
> If I don't dispatch my custom event, it runs fine.
> 
> Why and how can I fix this?  I just want to dispatch a custom event 
> when the component is clicked on.
> 
> Also, one thing I have never understood about mixing MXML and 
> Actionscript, is why, when you assign a method to run when something 
> is clicked on, you don't do this:
> 
> 
>
> 
> 
> 
> Why don't you put in (event:MouseEvent) as an argument for that 
> method like you do with other handlers in Actionscript, but not when 
> the method is called from MXML?
> 
> Thanks
> 
> Jason
>




[flexcoders] Re: TextInputs - no cursor

2008-07-10 Thread Sid Maskit
After copying and pasting your code, I initially got error messages
for things like "/ >" where there cannot be a space between the two
characters. However, once I fixed all of those, it seemed to work fine
in terms of being able to type into each of the text input fields. I
got the same results whether using a flex app in the browser, or an
air app. I'm not sure where to go from here. Are you sure you are not
getting any compiler errors?

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> I have this simple form:
> 
> http://www.adobe.com/2006/mxml"; width="150" 
> verticalScrollPolicy="off"
>   height="128" verticalCenter="true" horizontalCenter="true" 
> horizontalScrollPolicy="off">
> borderThickness="2"
> backgroundColor="#DD" paddingTop="0" 
> borderStyle="solid"
> top="0" 
> left="0" 
> height="100%" width="100%">
>   paddingLeft="-38"> 
>
> 
> 
>   paddingLeft="4" color="#00">
> 
> 
> 
> 
> 
> 
>  
> color="#00"/>
> 
> 
> 
> 
> 
> The only TextInput field that actually accepts input is SKU.
> What kind of problem am I having here?
> 
> Thanks
>




[flexcoders] Re: Setting Up a Global Constants File

2008-07-10 Thread Sid Maskit
I believe that using singletons is the traditional design pattern way
to do this although I have seen some people arguing that singletons
conflict with unit testing. I don't know enough to comment on that debate.

I would suggest using a getter for your instance so that, at least,
your call could be SingletonClass.instance.myConstant which, at least
to my eye, is a bit easier to read.

Sorry not to be more helpful, but hope that helps somewhat.

Sid

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I would advise against one big global constants file.  Generally not an
> OOP thing to do.
> 
>  
> 
> I would use static consts on classes.  Look at any mx.events.* class to
> see
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of edlueze
> Sent: Wednesday, July 09, 2008 4:42 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Setting Up a Global Constants File
> 
>  
> 
> I'm trying to fill a file full of global constants that will be used
> by all the other ActionScript files in my project. If I create an
> ActionScript file and start filling it with constants then when I try
> and reference that file from several others I run into the error "A
> file found in a source-path can not have more than one externally
> visible definition". On the other hand, I could create a singleton
> class but then a reference to a simple global constant becomes long
> and unreadable: for example "SingletonClass.getInstance().myConstant".
> 
> What's the best practice in this situation?
> 
> Thanks!
>




[flexcoders] Re: Simple text vs htmlText length question

2008-07-03 Thread Sid Maskit
Interesting. I didn't look at the documentation before I posted, but I
did run a test case. Having played around a bit more, things are
somewhat convoluted. Here is what I have found:

Whether I use \r or \n, if I assign to the text property, and read
from the text property, the result is a blank line separating the line
with 1 from the line with 2 like this:

1

2

If I use \r to assign to the htmlText property, and read from the text
property, the result is both numbers on the same line like this:

12

If I use \n to assign to the htmlText property, and read from the text
property, the result is what I would actually expect, which is the 1
on its own line, with the number two on the line immediately below it,
like this:

1
2

No matter whether I use \r or \n, and whether I assign to the text or
the htmlText property, if I read from the htmlText property, I get the
same result, which is the HTML equivalent of what I get if I both
assign and read from the text property, like this:

'12'

(Note that I have simplified the HTML by removing things like font tags.)

So I no longer think my explanation makes sense, but I'm not really
sure what does.

Here's the code I used to get these results:

var text:String = "1\r\r2"

var textField:TextField = new TextField()
textField.htmlText = text

var textField1:TextField = new TextField()
textField1.text = text

text = "1\n\r2"

var textField2:TextField = new TextField()
textField2.htmlText = text

var textField3:TextField = new TextField()
textField3.text = text

trace("textField.text : '" + textField.text + "'")
trace("textField1.text : '" + textField1.text + "'")
trace("textField2.text : '" + textField2.text + "'")
trace("textField3.text : '" + textField3.text + "'")
trace("textField.htmlText : '" + textField.htmlText + "'")
trace("textField1.htmlText : '" + textField1.htmlText + "'")
trace("textField2.htmlText : '" + textField2.htmlText + "'")
trace("textField3.htmlText : '" + textField3.htmlText + "'")

Sid Maskit
CraftySpace.com

--- In flexcoders@yahoogroups.com, "Rick Winscot" <[EMAIL PROTECTED]>
wrote:
>
> Smaskit - In ActionScript CDATA sections the \n is permitted and is
parsed
> in htmlText as if it were a  - the particular behavior of
htmlText is
> worth a skim - see: Using the htmlText property in FlexDocs.
> 
>  
> 
> Rick Winscot
> 
>  
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of smaskit
> Sent: Wednesday, July 02, 2008 11:13 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Simple text vs htmlText length question
> 
>  
> 
> If you replace this:
> 
> textField.htmlText = text
> 
> with this:
> 
> textField.text = text
> 
> you will get the result you seek. By setting htmlText, you declare
> that the input should be parsed as html. In html \n and \r are
> ignored. You need to use html tags like  and .
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> ,
> "Gordon Smith"  wrote:
> >
> > Try using \n instead of \r.
> > 
> > 
> > 
> > Also try seeing whether setting textField.condenseWhite to true or
false
> > before setting textField.htmlText affects it.
> > 
> > 
> > 
> > Gordon Smith
> > 
> > Adobe Flex SDK Team
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> ]
> On
> > Behalf Of cmalartre
> > Sent: Wednesday, July 02, 2008 1:33 PM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Simple text vs htmlText length question
> > 
> > 
> > 
> > Why does the simple code below output:
> > 
> > -
> > text.length : 4
> > textField.length : 4
> > text : '1
> > 
> > 2'
> > textField.text : '12'
> > -
> > 
> > and not:
> > -
> > textField.text : '1
> > 
> > 2'
> > -
> > 
> > 
> > http://www.adobe.com/2006/mxml
> > <http://www.adobe.com/2006/mxml> "
> > layout="absolute">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
>




[flexcoders] Re: Anyone familiar with CF-Flex remoting?

2008-07-03 Thread Sid Maskit
This definitely works. Just did it using CFC's.

In MXML:

http://domain.com/flex2gateway/]"; 
destination="ColdFusion" 
source="[path to your CFC here: e.g. folder.folder.file" 
>   




Inside script within same MXML:

this.dataManager.requestAddressChange(this.address0.text,
this.password.text);


Within cfc on server:










You'd need to declare the arguments differently, I think as parameters
within a cfm file, but it should still work.

Hope that helps.

Sid Maskit
CraftySpace.com