Re: [flexcoders] Big flex web

2007-06-15 Thread Darron J. Schall
Tom Chiverton wrote:
 Only if most people won't use that particular panel.
 There's no point shaving a bit off the initial load time if most people have 
 to wait for a Module to load at a later time.
   
I think that's an unfair assumption.  Choosing to use modules in an 
architecture is more beneficial than just thinking about it in terms of 
a load-on-demand scenario.

A few other benefits:

 * Separation of concerns / better project organization (especially 
important in large projects with many developers)
 * Each module can be worked on/updated independently of the others
* Easier maintenance
* Less strain on users when you push an update out.
 * Letting the user into the application faster while other 
functionality loads in the background.  This increase perceived speed, 
which makes users happy.

For the less strain on users point, let me illustrate.  If only 
moduleA changes, then only moduleA.swf needs to be redownloaded by the 
user.  The rest of the application will/should still be cached by the 
browser.  If the application is 2mb size, and moduleA.swf is 200k, you 
just saved your users a long wait.

There's some more as well, such as faster build times because modules 
can be compiled separately, better use of interfaces for 
inter-application communication, etc.

That said, I don't think every project needs to use modules, but 
deciding not to use them just because you don't have a load-on-demand 
scenario is shortsighted when thinking about all of the other benefits a 
modular architecture bring to the table.

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Flowcharting/Drawing Components

2007-01-24 Thread Darron J. Schall
Getting slightly off-topic here, but Gliffy iss actually written in 
OpenLaszlo [1].  Because of that, I would doubt that they're worknig on 
a Flex 2.0/AS3 version.


-d

[1] - http://www.gliffy.com/about.shtml

Doug McCune wrote:


That's not Flex though, I guess it's older Flash. They only require 
Flash Player 7. Although I wouldn't be surprised if they're working on 
a Flex AS3 version as we speak...


JesterXL wrote:


http://www.gliffy.com http://www.gliffy.com/


Don't see a download link, doesn't look like they are sharing the love.

On Jan 24, 2007, at 12:08 PM, Jim Zafrani wrote:

Hello All,

I am just getting started with Flex and was wondering whether or not a
component existed that would allow me to draw a flowchart on a canvas
or a tree-like diagram. Are there any such components/libraries for
flex out there?

Thanks in advance,

Jim Zafrani




 




Re: [flexcoders] error when including a swc ?

2007-01-18 Thread Darron J. Schall
To compile a Flex Library project, you have to edit the project 
properties and select the classes that you want to be included in the 
library.  Upon doing so, the .swc file will be built.  For some more 
instruction, you might want to check out a wiki article I made for the 
AS 3.0 libraries on settingn up a Flex Library project from the SVN 
source code in google code:  
http://code.google.com/p/as3corelib/wiki/FlexBuilderLibraryProject

Also, I've set up a build.xml file that will let you compile a library 
with ANT, create ASDoc documentation, and compile/run unit tests.  Take 
a look at the build script for the AS 3.0 YouTube library as an 
example:  http://as3youtubelib.googlecode.com/svn/trunk/build/   -- 
You'll obvisouly need to modify the build.xml and build.properties to 
match your system/project, but it should be a good start for you.

Hope that helps..

-d

arpan srivastava wrote:
 Hi All,

I have a SWC file, but when i try to load it in any project it 
 gives error:

 Error: unable to load xyz.swc : multiple points

 and one thing more, how do you compile a Flex Library Project.



 
 Never miss an email again!
 Yahoo! Toolbar 
 http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/
  
 alerts you the instant new Mail arrives. Check it out. 
 http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/
  

  



Re: [flexcoders] Where are all the 3rd party components

2007-01-09 Thread Darron J. Schall
Just a few resources:

 * Mike has some components for sale here: 
http://www.teotigraphix.com/flex2/
 * You can find a lot of components on the Adobe Flex Exchange:  
http://www.adobe.com/cfusion/exchange/index.cfm?view=sn610
 * Try searching MXNA - A lot of people post components on their 
weblogs: http://weblogs.macromedia.com/mxna/
 * There's also a FlexComponents Yahoo Group: 
http://tech.groups.yahoo.com/group/flexcomponents
 * With the inclusion of runtime CSS in Flex 2.0.1, we might start 
seeing Flex themes for sale.  More info here: 
http://www.onflex.org/ted/2007/01/flex-201-understand-runtime-css.php

Hope that helps...  There is some info out there already, but the market 
is still young. 

-d

boy_trike wrote:

 I am surprised that while Flex has been out for quite a while there 
 are no people selling:
 * Additional Components
 * Themes and StyleSheets
 et. al.

 I know when I started with Delphi, there were many companies that made 
 a nice profit
 selling additional components. Where is this community with Flex? I 
 can think of dozens
 of visual components that I would be happy to purchase. From reading 
 this newsgroup
 there seem to be at least 2 types of users
 * Business application developer (like me!) who want / need and can 
 justify the cost for
 this because we have a customer who is paying $$$ for a rich solution
 * Opps / AS3 and Flex/Flash experts who live, love and embrace 
 extending and enhancing
 existing components , themes, skins

 Where are all of the 2's

 Bruce

 P.S. and if there are sites that have these, where is the list of them?

  



Re: [flexcoders] FLEX 2 FDS Hibernate Help

2007-01-09 Thread Darron J. Schall
Take a look at My First Hibernate Enabled Flex Application - 
http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html

Also, Victor Rubba has a lot of good Hibernate  Flex information on his 
weblog: http://viconflex.blogspot.com

There's also the Flex 2 Help - 
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=1201.html

Hope that helps...  I'd personally like to see a little more Hibernate  
Flex information out there.  It's a powerful combination.

-d


Makker, Meenakshi wrote:
 Hi Friends,
  
 I would really appreciate if any one of you could direct me to some 
 example or send me the sample code to use Flex 2 FDS+Hibernate and how 
 to setup all this. I am working on Flex but not aware of 
 Hibernate/Java background and from .NET side. I want to try Flex 2 FDS 
 with Hibernate setup. Please help.
  
 Thanks,
 Meenakshi
  
  



Re: [flexcoders] StringBuilder Class?

2007-01-09 Thread Darron J. Schall
There used to be a StringBuilder class, but it was removed.  The regular 
String class had its performance improved enough that adding an 
additional StringBuilder class didn't make sense.

I would've liked to see it stick around.. but that's only because I had 
already written a chapter on it for the AS3 Cookbook before it was 
removed.. doh!  :-)

-d

h8me4everplus1 wrote:

 I remember there was suppose to be a StringBuilder class, except, I
 don't know what happened to it.

 I remember their being controversy over whether it was actually faster
 than the String class operations.

 Am I just looking in the wrong packages?

  



Re: [flexcoders] fyi : Open Source ActionScript 3 Libraries Moved to Google Code

2007-01-09 Thread Darron J. Schall
You shouldn't use those instructions anymore.  The code in the Adobe 
Labs SVN is now out-of-date, and is not going to be updated anymore.  
All projects going forward will be using the Google Code SVN 
repositories.  Each project on Google Code, then, has instructions for 
downloading the latest code from SVN.

When projects reach milestones, we'll create official releases which 
will include .swc files in a .zip archive on the main project page.  
However, if you want to use the latest, you'll have to pull from the 
Google Code SVN.  It's on my roadmap to create ANT scripts to make it 
easier to get docs/swc from the source, I just haven't had the time to 
get to it yet.

The latest release for each project right now is just a copy of what 
was previously available on labs.  We haven't updated any of the 
individual downloads for the libraries, though some of the code in the 
Google SVN is already different that what was in the labs SVN.

To pull source for the AS3 libraries now, use instructions found on the 
Source tab of the Google Code project home page.  For example, to get 
the latest corelib source, the instructions are here: 
http://code.google.com/p/as3corelib/source

-d

Paul Evans wrote:


 On 9 Jan 2007, at 08:59, Carlos Rovira wrote:

  or I download the zip from a bad place
  Then I had a problem with some classes that was not usable (for
  example the JPGEncoder does not compile).

 Sounds like my comment on Christrian Cantrell's How To Get Code From
 Adobe Labs still applies ?

 http://weblogs.macromedia.com/cantrell/archives/2006/08/ 
 http://weblogs.macromedia.com/cantrell/archives/2006/08/
 how_to_get_code.cfm

 Basically the zip file is out of date, but SVN is (was) up-to-date.

 Must admit I haven't looked at the Google-code version as yet. In-
 case downloading from Google code doesn't work for you, the SVN line
 described on Christian's page is still active.

 Paul
 -- 
 [ http://www.creative-cognition.co.uk/ 
 http://www.creative-cognition.co.uk/ ]
 [ http://creacog.wordpress.com/ http://creacog.wordpress.com/ ]

  



Re: [flexcoders]Does the Accordion have an Icon Function?

2006-12-13 Thread Darron J. Schall
I think you've actually stumbled on a bug that I submitted a couple 
months ago -- where the icon set in the last accordion header gets 
applied to all previous headers, or something like that.  I narrowed it 
down to a reproducible test case, and I believe Adobe was able to fix it 
(as part of the upcoming 2.0.1 release). 

I don't have that test case anymore, but it sounds like exactly the same 
thing I ran into when I filed the bug.  I don't remember if there was a 
workaround or not... sorry.

-d

dorkie dork from dorktown wrote:

 Er, I created a simplified example and got that to work. So there must 
 be some gremlins in my code somewhere. I checked the source and did 
 not see an iconFunction.

 On 12/13/06, * dorkie dork from dorktown* 
 [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Does the Accordion have an iconFunction? Similar to the
 iconFunction used in the Tree and List controls.

 For example, this code is supposed to set the icon for headers 0
 and 1 but each statement sets the icon across all headers.

 [Bindable]
 [Embed(source=images/Company-Icon.png)]
 public var companyIcon:Class;

 [Bindable]
 [Embed(source=images/Market-Icon.png)]
 public var marketIcon:Class;

 // in init
 navigationMenu.getHeaderAt(0).setStyle('icon', companyIcon);
 navigationMenu.getHeaderAt(1).setStyle('icon', marketIcon);



  



Re: [flexcoders] Fade from one color to another

2006-12-09 Thread Darron J. Schall
Dorkie, this one's for you:  
http://www.darronschall.com/weblog/archives/000251.cfm

I see from your sample color values that you found my old ActionScript 1 
code to fade colors  ;-)  I went ahead and turned the logic into a new 
effect so you can easily apply color transitions in Flex 2. 

Usage is as follows:

ds:AnimateColor xmlns:ds=com.darronschall.effects.*
id=fadeColor
target={Application.application}
property=backgroundColor isStyle=true
toValue=0x00
duration=4000 /

Demo .swf here (view-source enabled): 
http://www.darronschall.com/downloads/AnimateColorDemo/AnimateColorDemo.html
Download source here: 
http://www.darronschall.com/downloads/AnimateColorDemo/srcview/AnimateColorDemo.zip

Enjoy.

-d

dorkie dork from dorktown wrote:

 I need to fade my application background color from 0xC47D31 to 
 0x67DEF9 and I have no idea where to start. I've seen AS2 actionscript 
 around that I can try to convert but what I'm looking for is a already 
 built MXML component Effect, similar to mx:Fade or Dissolve.

 I tried this and received errors:
 creationCompleteEffect={fadeColor}
 mx:AnimateProperty id=fadeColor property=backgroundColor 
 toValue=#00 target={Application.application} duration=5000/

 ReferenceError: Error #1069: Property backgroundColor not found on 
 TestApplication and there is no default value.
 at 
 mx.effects.effectClasses::AnimatePropertyInstance/::getCurrentValue()

 dorkie mood changing dork from dorktown

  



Re: [flexcoders] TextArea as Console: Controlling cursor position and intercepting arrow keys

2006-12-07 Thread Darron J. Schall
Since TextEvents are cancellable, you can also look at using 
event.preventDefault(); in the TEXT_INPUT event handler to stop the 
Flash Player from automatically moving the cursor when the up key is 
pressed.

-d

Daniel Freiman wrote:

 What you're looking for is setSelection() to set the cursor position.  
 Simply put the same value in for the start and end value to place the 
 caret instead of the selection.  However I'm not sure this is going to 
 be as responsive as you like.  You may want to consider using a 
 different design such as having the history in a textarea and having 
 the user input in a textinput to simplify this problem.

 - Dan

 On 12/7/06, *chuvakgu* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi all,

 How does one control position of the cursor inside a mx:TextArea?

 What I am really trying to do is create a console
 out of a TextArea. A user would enter commands at a
 prompt, and at some point they would be sent to
 the server for evaluation. I looked for something like this
 but didn't find...

 So, control of cursor will come in a case such as:
 I want to use up-arrow as history, for example, but while
 I can intercept the up-arrow on a keyDown or keyUp event
 and show the item from history, the cursor still moves.
 In this case, maybe intercepting the arrow's
 defautl behavior is good enough, but in another case
 (e.g., if a line ends with \, the next line is indented -
 but the cursor by default is in the first column, but whne
 I mouse click on the area, it ends up in the proper place).

 Thanks.


  



Re: [flexcoders] Disclosure triangles

2006-12-01 Thread Darron J. Schall
Yes, it's possible.  You have to embed the symbol from the Assets.swf 
that comes with the Flex framework.  I'm using CSS to do this in a 
similar scenario, and my code looks like this:

ClassName
{
disclosure-open-icon: Embed( souce=Assets.swf, 
symbol=TreeDisclosureOpen );
disclosure-closed-icon: Embed( souce=Assets.swf, 
symbol=TreeDisclosureClosed );
}

Then, I have an mx:Image/ that gets its source property modified based 
on disclosure state:

disclosureIcon.source = getStyle( disclosureOpenIcon );   // or 
disclosureClosedIcon

-d

Lachlan Cotter wrote:

 Hi List,

 Is it possible to use the disclosure triangle from the Tree view
 control outside of a tree view? I want to use it to switch between
 states on an item renderer (a collapsed, summary state, and a full,
 detail state). There doesn't seem to be a disclosure triangle component.

 Cheers,
 Lach

  



Re: [flexcoders] Embed or Load PDF File

2006-12-01 Thread Darron J. Schall
If you would decide to take this approach, consider the recent articles 
I've published on my weblog about FlashPaper and Flex 2 integration:

How to load FlashPaper Documents in Flex 2 - 
http://www.darronschall.com/weblog/archives/000249.cfm
Batch Convert PDF files to FlashPaper 2 - 
http://www.darronschall.com/weblog/archives/000250.cfm

By converting the PDF to FlashPaper, you can load the FlashPaper 
equivalent of the PDF report inside of a container in Flex 2.  It's not 
exactly a trivial process, but it works well enough for my use cases so far.

-d

John Dowdell wrote:

 Options for similar effects:

 o Convert PDF to FlashPaper, which can be displayed in Adobe Flash
 Player, although I'm not sure offhand of invocation via Flex's MXML.




Re: [flexcoders] Re: Flex Builder Linux

2006-11-16 Thread Darron J. Schall
Tom Chiverton wrote:
 I thought that FDS would run over any transport, not just RTMP.
   
FDS can work via client polling, but for true real time sharing via 
server push, RTMP is the way to go.

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Remote object - Nullable type

2006-11-14 Thread Darron J. Schall
You can't match it exactly.  Trying to use a boolean type means you can 
only have either true or false as the value.  It's in a proposal 
somewhere to add nullable type support to ECMAScript, but in the 
meantime you can try using the * data type since it can assume any value 
(which includes the set of true, false, and null).  You'll lose the 
performance gains of using a known compile-time type, but you'll get the 
flexibility you're looking for client-side.

Alternatively, you can create your own custom datatype for values of 
null, false, and true on both the client and server, but that's a bit 
more work.  I've gone this route by making a custom NullableBoolean type 
in the past...

-d

Diego Guebel wrote:
 Hi there,
 I'm trying to pass back and forth an object to the server(.NET) that has a  
 property with boolean type that can also be assigned a null.

 Something like the following in c#:

 public class TestClass
 {
[XmlElement(IsNullable=true)]
public Nullablebool Deleted { get; set; }
 }

 the question is: how can I match that in AS?

 package
 {
   [Bindable]
   [RemoteClass(alias=package.TestClass)]
   public class TestClassVO
   {
   public var Deleted: ??
   }
 }

 Thanks in advance,
 Diego.



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Convert Object to a Value Object

2006-10-29 Thread Darron J. Schall






Originally it was written so that JSON
behaved more like RemoteObject (returning class instances from the
server instead of just plain objects), but the method is generic enough
to be useful in a lot of situations.

Hope that helps...

-d

mvbaffa wrote: 

  
  
  
  
- Type Coercion failed: cannot convert [EMAIL PROTECTED] to 
com.mvb.boe.vo.UserAccountVO.
  
  
  
  
  



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Convert Object to a Value Object

2006-10-29 Thread Darron J. Schall
Interesting, Yahoo garbled most of the content of that message.  Here's 
what I actually sent:

For those having trouble converting generic objects into class instances 
(Value Objects), I've created an ObjectTranslator.objectToInstance 
method to take care of the problem: 
http://www.darronschall.com/weblog/archives/000247.cfm

Essentially, it allows you to convert any plain old object into a class 
instance.  Usage is as follows:

import com.darronschall.examples.vo.Book;
import com.darronschall.serialization.ObjectTranslator;

// Define an object with properties that mimic the variable names
// inside of the Book class
var bookObj:Object = { title: My Book title, pageCount: 10, inLibrary: true };

// Convert the generic object into an instance of the Book class
var book:Book = ObjectTranslator.objectToInstance( bookObj, Book ) as Book;


Originally it was written so that JSON behaved more like RemoteObject 
(returning class instances from the server instead of just plain 
objects), but the method is generic enough to be useful in a lot of 
situations.

Hope that helps...

-d

Darron J. Schall wrote:

 Originally it was written so that JSON behaved more like RemoteObject 
 (returning class instances from the server instead of just plain 
 objects), but the method is generic enough to be useful in a lot of 
 situations.

 Hope that helps...

 -d

 mvbaffa wrote:


 - Type Coercion failed: cannot convert [EMAIL PROTECTED] to
 com.mvb.boe.vo.UserAccountVO.


  




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] FlashPaper in SWFLoader

2006-10-25 Thread Darron J. Schall
If you're using Flex 1.5, use the FlashPaperLoader class from Matt 
Chotin:  
http://www.cflex.net/showfiledetails.cfm?ChannelID=1Object=FileobjectID=117

If you're using Flex 2, it's a lot trickier.  Normally, you resize the 
FlashPaper.swf by using the FlashPaper API [1], and just calling the 
setSize( width, height ) method.  However, because the FlashPaper.swf 
lives inside of AVM1 and the Flex 2 loading .swf lives inside of AVM2, 
you can't just directly talk between them.

I've come up with a solution, but it's not exactly trivial.  I'll 
describe it here at a high level, and hopefully get it up on my weblog 
sometime in the near future when I have some time to package it up.

* Create a FlashPaperLoader.swf in Flash that uses a MovieClipLoader to 
load the FlashPaper document.  In this loader.swf, you need to shimmy in 
methods for communication between AVM1 and AVM2.  It's possible to use 
either LocalConnection or ExternalInterface for this, but essentially, 
the FlashPaperLoader.swf is responsible for exposing methods to AVM2 
that simply proxy the method call and parameters to the loaded 
FlashPaper.swf document.
* Instead of loading the FlashPaper.swf directly, load the 
FlashPaperLoader.swf proxy and pass it the URL of the real 
FlashPaper.swf to load.  Use the AVM1/AVM2 communication mechanism you 
created in the previous step to send progress information from the 
loading movie over to Flex 2, so that you can report load progress 
effectively to the user.
* When the load is complete, call the setSize on the 
FlashPaperLoader.swf, again, using the AVM1/AVM2 communication 
mechanism.  When you call setSize on FlashPaperLoader, it should proxy 
that call to the loaded FlashPaper document.
* Use the resize event in Flex 2 to make setSize calls, so that 
resizes the browser or container sets the correct FlashPaper size.

When all is said and done, you end up with the desired behavior of 
loading a FlashPaper document, having it fill the available area, and 
having the correct scale.  Again, it's not exactly trivial to get this 
working, but I'm hoping to release my FlashPaperLoader component and 
support files sometime in the near future.

Good luck,

-d

[1] 
http://www.adobe.com/support/documentation/en/flashpaper/2/flashpaper_api/flashpaper_api4.html

Nick Collins wrote:

 I'm having problems loading a FlashPaper document into a SWFLoader. It 
 loads just fine, but the scaling isn't as I'd like it. Instead of 
 scaling like it does when you load it into a browser window, where the 
 controls stay the same height and just the viewing area scales, the 
 FlashPaper maintains it's default scaling. I think the default size is 
 like 400 x 300, and it just scales that, control bar and all. Is there 
 any way within the SWFLoader to have the FlashPaper display like it 
 does in the browser window?

  



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] FlashPaper in SWFLoader

2006-10-25 Thread Darron J. Schall
The solution I used was to just create a unique id when you want to load 
a FlashPaper.swf, and pass that value to the loader.  The AVM1/AVM2 
communication channels then use that specific id so that you can load 
multiple isntances of them without interfering with each other.

As and aside, we're using cfreport to load our FlashPaper.swfs into 
Flex 2 as well.  My fingers are crossed that theres an upgrade coming 
down the line to ColdFusion that would make FlashPaper SWF9 compatible 
so we can talk directly with the loaded reports.  One can hope.. but 
until then, the AVM1/AVM2 solution isn't bad once you get it in place. 

Like I said, I'll try to get it packaged up on my weblog soon so you can 
see how to do it.

-d

Nick Collins wrote:

 Yeah, I did something similar to that but ran into problems with it 
 loading multiple instances of that flashpaper loader swf where it 
 kinda crapped out, so I was looking for a way to just load in the 
 Flashpaper swfs (cfreport generated) directly.





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



[flexcoders] Problem sending AMF data to ColdFusion over SSL

2006-10-24 Thread Darron J. Schall
Hi,

I'm running into an interesting situation that leaves me scratching my 
head.  I've tried a few things that I could think of, but can't seem to 
come up with a solution, and there doesn't seem to be any help in the 
archives or on google.

Here's the situation:  I'm sending [RemoteClass]'d objects from Flex to 
ColdFusion, mapping ActionScript classes to ColdFusion components.  I'm 
using the same Flex application to connect to both Flex Data Services 
and ColdFusion, so I'm defining the channel for the ColdFusion 
RemoteObject at runtime.  The ActionScript code looks like this:

var channels:ChannelSet = new ChannelSet();
var customChannel:SecureAMFChannel = new SecureAMFChannel( 
cf-secure-amf, 
https://{server.name}{context.root}/flex2gateway/secureamf; );
channels.addChannel( customChannel );
theRemoteObject.channelSet = channels;

The error I get when sending a typed object over (one that is 
[RemoteClass]'d) is:

[RPC Fault faultString=Cannot create class of type 'package.to.my.VO'. 
faultCode=Client.Message.Encoding faultDetail=Type 'package.to.my.VO' 
not found.]
at 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\dev\enterprise_bali\frameworks\mx\rpc\AbstractInvoker.as:193]
at 
mx.rpc::Responder/fault()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:56]
at 
mx.rpc::AsyncRequest/fault()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest.as:107]
at 
NetConnectionChannel.as$31::NetConnectionMessageResponder/NetConnectionChannel.as$31:NetConnectionMessageResponder::statusHandler()[C:\dev\enterprise_bali\frameworks\mx\messaging\channels\NetConnectionChannel.as:463]
at 
mx.messaging::MessageResponder/status()[C:\dev\enterprise_bali\frameworks\mx\messaging\MessageResponder.as:225]


This is something that just broke when we switched over to SSL.  When 
we're using just a regular AMFChannel, everything works just fine.. the 
error only happens over SSL when we changed customChannel to 
SecureAMFChannel.

Interestingly, the exception that shows up in the console log has 
flex.messaging.endpoints.AMFEndpoint in the stacktrace.  I would've 
expected this to be flex.messaging.endpoints.SecureAMFEndpoint instead.. 
so my thinking is that the problem lies therein.  I've doubled checked 
the services-config.xml in the cfusion.war and made sure that the 
ColdFusion destination uses the cf-secure-amf channel.  The 
cf-secure-amf channel definition in the XML file is this (though, it 
shouldn't really since the channel is being set in ActionScript):

channel-definition id=cf-secure-amf 
class=mx.messaging.channels.SecureAMFChannel
endpoint 
uri=https://{server.name}{context.root}/flex2gateway/secureamf; 
class=flex.messaging.endpoints.SecureAMFEndpoint/
properties
add-no-cache-headersfalse/add-no-cache-headers
polling-enabledfalse/polling-enabled
/properties
/channel-definition

I can receive typed objects from ColdFusion just fine over SSL, I just 
can't send them.  Any ideas?  Has anyone else run into this?  Why would 
AMFEndpoint be in the stacktrace and not SecureAMFEndpoint? .. bug?

Thanks,

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Problem sending AMF data to ColdFusion over SSL

2006-10-24 Thread Darron J. Schall
I love it when the answer is something simple.  My Secure ColdFusion AMF 
channel definition looks like this (added instantiate-types):

channel-definition id=cf-secure-amf 
class=mx.messaging.channels.SecureAMFChannel
endpoint 
uri=https://{server.name}{context.root}/flex2gateway/secureamf; 
class=flex.messaging.endpoints.SecureAMFEndpoint/
properties
add-no-cache-headersfalse/add-no-cache-headers
polling-enabledfalse/polling-enabled
serialization
instantiate-typesfalse/instantiate-types
/serialization
/properties
/channel-definition

... and now it works like a champ.  Thanks Peter!

-d

Peter Farland wrote:

 You mentioned you're contacting ColdFusion, did you forget to include 
 instantiate-typesfalse/instantiate-types in your 
 channel-definition properties?





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Typecast a generic Object into a VO

2006-10-23 Thread Darron J. Schall
This Article in the CFDJ should be of help to you:

http://it.sys-con.com/read/264726_1.htm
http://it.sys-con.com/read/264726_2.htm

As an aside, I'll be checking in some code to the Adobe Labs SVN this 
week to handle this in a slightly more generic fashion.

-d

mdoberenz wrote:


 I'm pretty sure this is possible, but I can't get it to work.

 I'm wanting to typecast a generic object that gets returned by a
 WebService call into a VO, but I'm having some issues.
 Say I have a VO of the following:

 public class TestVO{
 [Bindable] public var i_test:int;
 [Bindable] public var s_test:String;
 [Bindable] public var o_test:Object;
 }

 Then I get an object back from a WebService call that has a similar
 structure, can't I just do the following?:

 var typeCastTry:TestVO = RETURN_OBJ as TestVO;

 When I do this, typeCastTry gets set to null.

 Any help would be awesome!

 Mark

  




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Re: Socket woes - something simple I'm sure

2006-10-19 Thread Darron J. Schall






To write a null byte to a Socket, just use the writeByte method:

this.writeByte( 0x00 );
this.flush();

-d

e_baggg wrote:


  
  ## Try adding a null byte before flushing the flash.net.Socket.
  
Ted-
Thanks for your response but I am still unable to get it working.
Partly b/c I can't find any help on how to add a null byte. I would
think this (or '\0') would accomplish it but it does not. Sorry,
couldn't find any help online.
  
//this is a connected flash.net.Socket
this.writeUTFBytes(xml.toXMLString() + null);
this.flush();
  
  
  
  



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Error showing up in Flex but not CF

2006-10-19 Thread Darron J. Schall
I know this may sound silly (like, my computer won't turn on... is it 
plugged in?), but haev you checked to make sure the paramters to the 
remote object method call are being passed correctly?

When you run the CFC method outside of flex, you use named parameters 
like:  http://localhost/test.cfc?method=abcarg1=10arg2=false  - 
ColdFusion matches up the URL parameters with the parameters names in 
the method (so arg2 could come before arg1, it doesn't matter), and then 
invokes the method.

When you call a method from Flex, the order of the paramters has to be 
exact.  On the Flex side, you have to call service.abc( arg1, arg2 ).

Since it works from the URL but not from Flex, I would double check to 
make sure that the parameters being passed are the same, and that 
they're being passed in the correct order.

-d

Rachel Maxim wrote:

 Hello,

 I am working on a Flex app with CF/remoting, and have come across an 
 error I cannot track down. The error is Unable to cast an object of 
 type java.lang.String to Query.
 I've seen this error before and it's not normally an issue to solve, 
 however I do not get the error when running the CFC method(s) outside 
 Flex and dumping their return values on an HTML page.
 When I run the page in flex that calls those CFC methods via 
 remoteObject, and display the fault string in flex, I get the error.

 In a nutshell, the CFC creates an array of objects, those objects each 
 hold a string as one property and a query as another.

 Any ideas where I can look or what might be causing it?

 Thanks
 Rachel


  




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Re: Flex and Crystal reports

2006-10-19 Thread Darron J. Schall
If you're looking to integrate Crystal Reporting-like functionality with 
Flex, I highly recommend taking a look at ColdFusion Reporting: 
http://www.adobe.com/products/coldfusion/reporting/

ColdFusion Reporting is done via the ColdFusion Report Builder tool.  
You can design a report visually, lay out exactly how you want the 
report to appear, define the repeating areas, the query to pull the 
data, do calculations, draw lines and charts and images, write 
ColdFusion expressions to generate dynamic fields, pass data into a 
report at runtime, etc.  The report template file is stored as a .cfr 
file.  Then, you use the cfreport tag on the server to display the 
report in one of three formats: PDF, FlashPaper, or Excel (.xls).

If you choose to generate a FlashPaper report, the output is just a .swf 
file.  This report.swf file can then be loaded into Flex via 
mx:SWFLoader /.  If you're not familiar wtih FlashPaper, essentially 
it's a way to bring PDF-style document navigation into the Flash 
Player.  FlashPaper reporting also gives pixel-perfect printing from 
within the report.swf as well, which is a nice bonus (printing in Flash 
has traditionally been somewhat difficult to get perfect results).

Here's an older example of integrating FlashPaper and Flex (for Flex 
1.5):  http://blog.daemon.com.au/archives/000315.html

For an overview of ColdFusion Reporting to get a feel as to how it 
compares to Crystal, check out this developer center article: 
http://www.adobe.com/devnet/coldfusion/articles/reporting.html

For an example FlashPaper document, if you've never seen one before, 
here's an online demo: 
http://www.adobe.com/products/coldfusion/whitepapers/coldfusionmx7_evaluators_guide.swf

I'm working on an application right now that fully integrates ColdFusion 
Reporting and Flex 2, and we're loving the way it works together and the 
final output.  It's just what the doctor ordered, and with the 
cfreport tag, we can deliver the report in-line via an mx:SWFLoader 
/ or let the user download a .pdf for offline viewing, or download an 
Excel .xls to do more calculations, etc...

I hope that helps...

-d

Wendy Espinoza wrote:

 Thank you very much, it helps me very much to begin. Other question, 
 flex has some way of generating his own reports, something similar to 
 the crystal report?





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Bug in Date() class math

2006-10-17 Thread Darron J. Schall
While I'm not sure on the status of this as a bug, I would suggest 
anyway to use the setDate() and getDate() methods instead.  On a date 
object, you can call setDate() with an arbitrary value and have the date 
automatically adjust to stay consistent.  That is, consider this example:

var today:Date = new Date( 2006, 9, 16, 22, 49, 18, 0 );
var result:Date = new Date( 2006, 9, today.getDate() + 16, 22, 49, 18, 0 );

trace( today ); // Mon Oct 16 22:49:18 GMT-0400 2006
trace( result ); // Wed Nov 1 22:49:18 GMT-0500 2006  

Since October 32nd doesn't exist, he Date object was smart enough to 
know to roll over to November when you try to set a date value more 
than the number of days in the month.  Note in this example, the 
timezone changes as well, but thats because of daylight savings time.

As a general rule, if you want to add days to a date, just use setDate( 
getDate() + value ).. value can be positive or negative, it doesn't matter.

-d

Mike Crowe wrote:

 Hi folks,

 I submitted this bug to Adobe today. I was trying to figure out why
 my Date routines wouldn't work. Here's a test function which fails:

 The following code appears to mis-compute the result date. This is
 adding 16 days to the current date:

 public function testMike():void {
 var tday:Date;
 var res:Date;
 var test:Date;

 tday = new Date(2006,9,16,22,49,18,0);
 res = new Date(tday.getTime() + 16*24*60*60*1000);
 test = new Date(2006,10,1,22,49,18,0);
 assertTrue( Test: 16 via addDays(),\nNeed: 2006-11-01
 22:49:18\nComp: +res+\nTest: +test+\n, res==test);

 }

 Results:

 Error: Test: 16 via addDays(),
 Need: 2006-11-01 22:49:18
 Comp: Wed Nov 1 21:49:18 GMT-0500 2006
 Test: Wed Nov 1 22:49:18 GMT-0500 2006
 - expected true but was false

 My unit-test goes from 1-100 days (by 5), All dates below 16 days
 work.

 Anybody else see this?
 TIA
 Mike

  



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] Re: Now Shippi ng: ActionScript 3.0 Cookbook – Solutio ns for Flash Platform and F

2006-10-13 Thread Darron J. Schall






No, it's legit.  I just received my (author) copy yesterday.  The book
is going be available at MAX, and I'm not sure why there'd be a delay
with Amazon... but it's definitely available at this point.

-d

ben.clinkinbeard wrote:


  
  Same here, except mine says it will ship Dec 12. I'm calling BS.
  
--- In [EMAIL PROTECTED]ups.com,
"Jeff Fleitz" [EMAIL PROTECTED] wrote:

 You know, I just ordered this from Amazon this morning, which said
it was
 released, but my order details then showed that the book wasn't
going to
 ship until December 17. That just doesn't sound right.
 
 On 10/12/06, greg h [EMAIL PROTECTED].. wrote:
 
  fyi ... O'Reilly is now shipping:
 
  ActionScript 3.0 Cookbook
  Solutions for Flash Platform and Flex Application Developers
  By Joey Lott, Darron Schall, Keith Peters
  http://www.oreilly.com/catalog/actscpt3ckbk/#top
 
  
 
 
 
 
 -- 
 v/r,
 
 Jeff Fleitz

  
  
  




__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Alternative image file formats

2006-10-12 Thread Darron J. Schall






With the ByteArray capability of Flash Player 9, "anything" is
possible. Jim Cheng has an .xls parser that loads an .xls file, scans
it, and then displays the results in a data grid. See here:
http://www.psalterego.com/2006/05/17/parsing-excel-files-with-actionscript-30/

If you can find the documentation for the .tiff format, you can do the
same to convert it into bitmap data all in the Player. Likewise, you
can read the bytes of a loaded .doc file and pull out the information
you want to display the contents in, say, a text area.

The solution really depends on your use case. It might be smarter to
convert .tiff to .jpg on the server and pull that in directly instead
of trying to write a .tiff decoder.

-d

Peterson, Chris wrote:


  
  I would like to be able to show .tiff images, as well as possibly
word
doc's or adobe acrobat files, inside my flex app. Is this possible
without a server-side converter (which I think would be too slow for my
purposes)?
  
Chris
  
  
  



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] JPEGEncoder.as

2006-10-11 Thread Darron J. Schall






They're in the Adoeb Labs SVN:

http://labs.adobe.com/svn/flashplatform/?/projects/corelib/trunk/src/actionscript3/com/adobe/images/

-d

Rich Tretola wrote:


  
  Anyone have a new copy of JPEGEncoder.as?
  
Rich
  
  
  
  




__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Multiple Inheritance

2006-10-10 Thread Darron J. Schall






Multiple inheritance is actually possible with AS3, despite popular
belief that it's not supported. It's not "true" multiple inheritance
int he C++ sense of the word, and you can't list more than one class as
a super class via extends.. but theres a way to get the job done in
AS3. 

I have a weblog post queued up to go out this week, but I'll push it up
to today and try to get it out over lunch for you to explain how to
simulate it. I don't recommend the approach be taken often, but there
are certain use cases where it's extremely useful. It'll solve your
problem, give me just a few to get it on the old blog.. :-)

-d

Daniel Freiman wrote:


  
  I know that strictly speaking there is no way for an object to
inherit from two superclasses, but doesn't anyone know a good
workaround to simulate this in actionscript? Being able to write code
in interfaces instead of just method definitions would be a perfect
solution to this problem, but a simple test showed me that wasn't
possible. Anyone have any thoughts?
  
  
For those who are confused at what I am asking, a contrived but simple
example:
Let's say I'm trying to layout a user interface. I have two types of
controls (ComboBoxes, Buttons). When doubleclicked I want a control to
report it's x value so a user can determine if the controls are aligned
by x value. Right now what I'm doing is implementing this ability in a
subclass of combobox and of button, and then extending these new
classes when I want to create controls with custom functionality. This
is acceptable except I keep adding functionality to my custom
superclasses. Let's say I want to now want the controls to also report
their y position. I have to go back and both my new combobox and
button classes, which is annoying and doubles my code.
  
  
Any thoughts on a good way around this problem?
  
thanks
  
- Dan
  
  




__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Multiple Inheritance

2006-10-10 Thread Darron J. Schall






As promised, here's how to do multiple inheritance in ActionScript 3.

http://www.darronschall.com/weblog/archives/000245.cfm

-d

Darron J. Schall wrote:


  
  Multiple inheritance is actually possible with AS3, despite
popular
belief that it's not supported. It's not "true" multiple inheritance
int he C++ sense of the word, and you can't list more than one class as
a super class via extends.. but theres a way to get the job done in
AS3. 
  
I have a weblog post queued up to go out this week, but I'll push it up
to today and try to get it out over lunch for you to explain how to
simulate it. I don't recommend the approach be taken often, but there
are certain use cases where it's extremely useful. It'll solve your
problem, give me just a few to get it on the old blog.. :-)
  
-d
  
  
  



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Re: Flex and Screen / application Sharing

2006-09-25 Thread Darron J. Schall






Have you seen my FVNC project yet?

http://osflash.org/fvnc

It's a VNC client for ActionScript 3 that enables screen-sharing in
Flex applications. The basic idea behind a presentation like you
describe would be:

* Host installs a VNC server, such as TightVNC
* Host configures VNC server to be "view only" so clients cannot
control the mouse or keyboard
* Host configures VNC server to allow multiple clients to be connected
* If behind a firewall, Host configures incoming VNC connections to be
allowed through the firewall and to the IP address of the hosts
machine, on port 5190 (usually)
* Viewers download FVNC.swf and run it from their computer
* Viewers enter IP address of server to connect to
* Viewers enter password
* Viewers are now connected and see the Hosts screen, which updates live

You can do this now, today, without having to code anything. FVNC
still needs a few tweaks before I would call it really production
stable, but it works in general, and might be a good solution for you.

-d

brownd_92 wrote:


  
  Paul,
this is part of a videoconferencing suite which I am developing with 
Flex and FMS. I would like the presenter to de able to "drive" the 
presentation from his own machine. A bit like Breeze but on a 
smaller scale.
  
Cheers
  
David
  
  
  



__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___




Re: [flexcoders] Re: Compiler warning about unused CSS type selector

2006-09-19 Thread Darron J. Schall
Have you tried the -compiler.keep-all-type-selectors flag or 
keep-all-type-selectorstrue/keep-all-type-selectors tag?  It might 
add a tiny bit to the file size (since unused types won't be pruned), 
but it might eliminate the warnings.

There doesn't seem to be a specific compiler option to disable the css 
warning.

-d

tobiaspatton wrote:

 That's right. I have three related applications and I would like to
 use a single style sheet for all three. One of the applications does
 not use the ComboBox control, so reports this warning.

 I'm hoping there's a switch in flex-config.xml to disable this
 warning, but can't find one.

 Tobias.





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: What comes after FlexEvent.INITIALIZE and FlexEvent.CREATION_COMPLETE?

2006-09-06 Thread Darron J. Schall
It's not actually the events that are giving you a problem, but rather 
it's the tricky nature of dealing with auto-sizing text measurement.  
Add this statement to your measure function:

trace( textHeight =  + textField.textHeight );
trace( height =  + textField.height );

When the components are first added into your VBox, you'll see that 
their textHeight is actually 0 and the textField height is 4.  Now, when 
you roll over the checkboxes and measure is called again, you'll see 
those numbers change to be the actual values, and that's when they're 
drawn correctly.

Here's what I changed your code to to get something that works.  It's a 
bit of a hack in that it just calls measure again in the constructor 
after things have had time to measure, and I cleaned it up a bit to not 
rely on those events (you should override createChildren, as I've done 
below).  Note I've also re-named the class to describe its purpose better:

package
{
import mx.controls.CheckBox;
import flash.text.TextFieldAutoSize;

public class MultiLineCheckBox extends CheckBox
{
public function MultiLineCheckBox()
{
super();
   
callLater( measure );
}
   
override protected function createChildren():void
{
super.createChildren();
textField.wordWrap = true;
textField.autoSize = TextFieldAutoSize.LEFT;
textField.border = true;
}

override protected function measure():void
{
super.measure();
// Make sure the text field has measured itself
if ( textField.height  4 )
{
measuredMinHeight = minHeight = textField.height;
}
}
}
}


I hope this helps!

-d


ben.clinkinbeard wrote:

 Thanks for the reply Abdul. However, if I remove the
 FlexEvent.CREATION_COMPLETE listener, the checkboxes overlap each
 other. Until I roll over them that is... once I roll over them they
 each pop into the correct, non-overlapping position. I believe the
 problem is that the textbox has not yet resized when INITIALIZE is
 called. The behavior is virtually identical if I remove the INITIALIZE
 listener, leaving only CREATION_COMPLETE; the items overlap until they
 are rolled over. Very strange.

 Any ideas?






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: antiAliasType null exception with Text instances!

2006-07-28 Thread Darron J. Schall






I've ran into this error on two separate occasions, with two different
fixes for it.

1) I was creating a component that used binding to bind a value to a
mx:Text/'s "text" property. In order to fix the antiAliasType
error there, I was able to break out the in-line binding into a binding
tag.

So, this:

mx:Text text="{value}" /

... became this:

mx:Binding source="value" destination="theText.text" /
mx:Text id="theText" text="dummy value" /

2) I was creating an ActionScript component that created an
mx.controls.Text instance programatically. In order to fix the
antiAliasType error in this case, I had to create a fake style:

// In my Component.as file:
var text:Text = new Text();
text.styleName = "advancedAntiAlias"; // Force a style so the
antiAliasType is not null

// In a .css file that gets included:
.advancedAntiAlias {
 font-anti-alias-type: advanced; 
}

I've already file a bug against this, but hopefully one of those 2
solutions should work for you.

-d


Daniel Freiman wrote:


  
  I'm throwing out an idea that I'm not sure will work and I haven't
tested, but it's the best I have right now. Can you instantiate the
textfield in the constructor and do the addchild() in createchildren?
Thus it exists for the setter but will be added at the right time.
  
  
  

  .
  
   
  




__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Adobe Resources

2006-07-17 Thread Darron J. Schall






When the Flex 2 product line was released, the livedocs pages that were
on labs were migrated to the official livedocs site. Because there was
such a long beta period, you'll find that a lot of web sites linked to
the labs livedocs, and now those links are no longer valid.

You can correct the documentation by hand with a little bit of
URL-rewriting. For example, 

http://livedocs.macromedia.com/labs/1/flex/langref/index.html

...becomes...

http://livedocs.macromedia.com/flex/2/langref/index.html

All of the livedocs links may not be as straightforward as the above to
get them working, but hopefully you get the idea. It would've been
nice if the URLs would automatically rewrite themselves to point to the
new documentation to avoid the numerous 404 errors that you may be
seeing

-d

flexnewbie06 wrote:


  
  I just need to say it seems that every page I need to access on
the 
Adobe livedocs is missing...this is very frustrating. Sorry folks, 
needed to see if others are experiencing this also.
  
  
  




__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] best general purpose way to keep textarea scrolled to bottom

2006-07-13 Thread Darron J. Schall






I've done this in the past through code like the following:

textArea.addEventListener( FlexEvent.VALUE_COMMIT, autoScrollToBottom );

private function autoScrollToBottom( event:FlexEvent ):void
 {
  // Auto-scroll to the bottom anytime the text changes
  event.target.validateNow();
  event.target.verticalScrollPosition =
event.target.maxVerticalScrollPosition;
 }

Essentially, with the above code you never have to explicitly tell the
text area to scroll to the bottom - it will automatically do that
anything the text property changes programmatically. So, anytime you
assign the text to be something else, your scrollbar will automatically
adjust for you.

This is code I've used in the past with beta 3, and I haven't tried it
with the released version, so it's not guaranteed to work. :-)

-d

Pan Troglodytes wrote:


  
  I wish TextArea had a property that would set it to scroll to the
bottom on adding text. In the absence of such, I'm struggling to make
it do that. I have a log function that looks like this:
  
   private function
log(s:Object):void {
   debug.text +=
"\n" + s.toString();
  
debug.verticalScrollPosition = debug.maxVerticalScrollPosition;
   }
  
Unfortunately, it seems that the max position isn't updated yet at this
point. I've tried hooking into change/dataChange and other events
without luck. It's always scrolled ALMOST to the bottom.
  
  
What's the best way to solve this?
  
-- 
Jason
  
  




__._,_.___





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








   



  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Change Text Color in FlexBuilder 2 Editors

2006-07-12 Thread Darron J. Schall






You have to tweak an XML file to change the syntax coloring in
FlexBuilder 2. It's undocumented / unsupported, but you can find more
information about it here:
http://www.morearty.com/blog/2006/05/22/undocumented-flex-builder-changing-the-syntax-coloring/

-d

jwc_wensan wrote:


  
  
Under Preferences . . General . . Appearance there is Colors and 
Fonts, but that does not having anything to do with displaying your 
code in a different color than the default.
  
So, what am I missing?
  
Can someone point me the right direction?
  
Thanking you in advance,
  
Jack
  
  
  




__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Excel, Flex Database

2006-07-05 Thread Darron J. Schall
Yes, it's possible for Flex to load Microsoft Excel data.  However, it's 
not easy.  You have to write a custom parser for the .xls file format.  
You can pull the raw binary data in via URLLoader setting it's 
dataFormat to DataFormat.BINARY, and then parse the .xls data into 
something usable for the Flex client.

See Jim Cheng's discussion on it here: 
http://www.psalterego.com/2006/05/17/parsing-excel-files-with-actionscript-30/

Simple demo here: http://dev.psalterego.com/xls/ExcelParser.html

-d

Ritesh Jariwala wrote:

 Hi All,

  

 I have question regarding application development.

  

 I need to develop little application which can load data from database 
 using flex into Microsoft Excel.

  

 Is it possible that flex can load the excel data or suppose if I made 
 changes in excel sheet and click on save it can save data into 
 database using flex?

  

 I know, I already seen such video when fabridge introduced, I am not 
 able to find the link of that video and examples.

  

 Can anyone tell me whether this is possible or not with flex?

  

  

 With Regards,

  

 Ritesh Jariwala (Actkid)

 Freelance Developer

 www.actkid.com http://www.actkid.com

 Company: www.synonymic.com http://www.synonymic.com

  

  

  




 Yahoo! Groups Sponsor ~-- 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Read Local File

2006-06-30 Thread Darron J. Schall






Torey Maerz wrote:


  
  So what can I do to give my internet based application read access
on 
the client's machine?
  
  
  
   
  



You'll need to have the user upload the file to your server. When the
upload is complete you'll then need to download the file from the
server into the Flex application (check out the FileReference class for
upload, and URLLoader to pull data in from a specific URL). You'll
probably want to run a clean-up script on the server then to delete the
user's file after it's been downloaded by the Flex app.

-d

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___




Re: [flexcoders] Reusing code blocks

2006-06-28 Thread Darron J. Schall
Yes, through the concept of base states.  Build a state that has the 
components you want shared between multiple sub-states, then when you 
add a new state in Flex Builder change the Based On drop down to be 
the state that contains the Canvas and Accordian.

-d

mthielman11 wrote:

 Ok I have a MXML file that has 3 states. All of them have one coommon 
 canvas in common
 that holds an accordian. It should look the same in all 3 states. Is 
 there a way to only define
 the accordian (and canvas) container once and have it appear on all 
 thre states??

 Right now in the code the accordian is there 3 times which seems a bit 
 bloated to me.

  




 Yahoo! Groups Sponsor ~-- 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Flex2B2 - PopupManager problem?

2006-04-18 Thread Darron J. Schall
bhaq1972 wrote:
 i'm getting 2 runtime errors when i do the following

Take a look at Peter Ent's post regarding Component Tempaltes in Flex 
2, it should help:
http://weblogs.macromedia.com/pent/archives/2006/03/component_templ.cfm

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Cairngorm and TitleWindow issue

2006-04-13 Thread Darron J. Schall
Suzy Lawson wrote:
 HOWEVER...it does work if I do this. 

 var event : MyEvent = new MyEvent ( eventVO );
 Application.application.dispatchEvent( event );

 It seems like the core Application can't pick up events dispatched
 from a TitleWindow. Is this a known issue or am i missing something??
   

This is a known issue and is a result of the way the PopUpManager 
works.  The reason you can't just dispatch the event from the popup is 
that the event doesn't bubble to the application to be picked up by the 
controller.  By dispatching the event from the application, you ensure 
the controller gets it.

The visual hierarchy, with a popup open, looks something like this 
(sorry for the bad ascii art):

SystemManager
   ||
  ApplicationPopup Window
 ||
ChildForm 1ChildForm 2

Notice that from Child form 1 or 2, the event will bubble up to the 
application and be picked up by the controller. but because the 
application itself is not the root of the hierarchy, the popup 
window's event will never bubble up to it.

Thus, this is a fact of life for now.  It's just the way the 
PopUpManager works (and an easy way to control modal-ness - you can 
just blur, shade, and block input to the entire Application branch 
without affecting the popup window).

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality

2006-04-06 Thread Darron J. Schall
maxym.hryniv wrote:
 Looking at Flex 2 framework event model, and Flex 2 Framework UML 
 (Flex 2 api visual reference by Rocket Boots) I don't believe that 
 Flex 2 is better. 

Can you be more specific?  The event model is fundamentally part of the 
player is an based on the DOM Level 3 Events specification [1].

-d

[1] http://www.w3.org/TR/DOM-Level-3-Events/



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] cloning was: in operator (F2B2)

2006-04-04 Thread Darron J. Schall






Gordon Smith wrote:

  There is no easy way in Flex 2 to clone an arbitrary type of. Can you
explain why you need to?


Peter posted a neat approach here:
http://www.peterjoel.com/blog/index.php?archive=2006_02_01_archive.xml#114064012876401732

 package com.peterjoel.util {

import flash.util.ByteArray;{

public function cloneObject(o:Object):Object{
var bytes:ByteArray = new ByteArray();
bytes.writeObject(o);
bytes.position = 0;
return bytes.readObject();
}
}

-d






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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  










Re: [flexcoders] cloning was: in operator (F2B2)

2006-04-04 Thread Darron J. Schall
jeremy lu wrote:
 last time when I making a copy of arrayCollection of VO's, turned out 
 the copied arrayCollection won't keep VO's type, all the vos are 
 turned into plain Object.
Most likely because the VO's haven't been registered.  Do you have 
[RemoteClass(alias=package.name.ClassName)] metadata above the class 
defintiion?  If not, you'll have to manually register the VO with 
flash.net.registerClassAlias(): 
http://livedocs.macromedia.com/labs/1/flex/langref/flash/net/package.html#registerClassAlias()

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] FB2 :: doubleClick bug event doen't happen

2006-03-21 Thread Darron J. Schall






Jason Hawryluk wrote:

  
  
  i have the same problem, i noticed a
doubleClickEnabled property and setting that did not do it for the tree
which is the only component i use it on. Seems double click is gone.../
not working.
   
  


I'm pretty sure this is a known issue - doubleClickEnabled needs to
propagate down to all children in the Flex components, and it currently
doesn't do this. I'm guessing it'll be fixed in the next build.

It's not gone, but the reason doubleClickEnabled was added is because
of situations where you really want click events, even if the user
clicks fast. For instance, you wouldn't double-click the down arrow
button of a scrollbar, but rather you just want it to fire click events
rapidly.

-d






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  










Re: [flexcoders] Re: Google Finance in AJAX: Can we do this in Flex?

2006-03-21 Thread Darron J. Schall
Renaun Erickson wrote:
 When I right-click it comes up as Flash Player, hmmm... AJAX and Flex
 (FABridge?)  probaby not, Google wouldn't be using Flex2, but probably
 a nice Flash app.

It's a Flash 7 app that uses the Flash JavaScript Integration Kit [1] to 
communicate between Flash/JavaScript.

-d

[1] http://osflash.org/flashjs



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] AS3 :: Multiline RegExp declarations :: Future enhancement ? ;-)

2006-03-18 Thread Darron J. Schall






Gordon Smith wrote:

  Forget StringBuilder... it's going away in B3. The player team decided
it didn't give enough performance gain in enough useful cases to justify
having both String and StringBuilder.


Doh, really? I've actually been using it a decent amount. It's
especially handy in testing the SHA1 hash of a million letter a's to
verify the hash algorithm is correct:

var millionAs:StringBuilder = new StringBuilder( '' );
millionAs.ensureCapacity( 100 );
for ( var i:int = 0; i  100; i++ ) {
	millionAs.append( 'a' );
}
assertSHA1( millionAs.toString(), "34aa973cd4c4daa4f61eeb2bdbad27316534016f" );

I realize the above loop could be unrolled to make it perform even
faster (by appending more 'a's in each append call, and reducing the
number of iterations by 10x, 100x, etc). But StringBuilder in this
case was a lot faster than using a regular string.. though, I imagine
this isn't really a typical use-case.

That said, however, it would be a shame to see StringBuilder go --
especially after having written a decent number of pages for it for an
upcoming book. Can I petition? :-)

-d






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  










Re: [flexcoders] AS3 :: Multiline RegExp declarations :: Future enhancement ? ;-)

2006-03-18 Thread Darron J. Schall
Michael Schmalle wrote:
 The only reason I don't like using the string is the esacped back 
 slash sequences.
If it's a concern, then when you build your regex don't escape the \'s, 
and as a last step before you convert them to strings just do a quick 
find/replace with \ to \\ on the regex.

 ?var\\s([a-zA-Z_]+)\\s?:?\\s?([a-zA-Z_]+)(\\s?=\\s?(.*))?;?

If you're looking for

var ident:type = value; don't forget that identifiers can be more than 
just [a-zA-Z_] in ActionScript.  A slightly better expression might be 
[a-zA-Z_$][0-9a-zA-Z_$]* which allows for a variable name such as 
$person7  To make sure you don't miss anything, you can check out the 
language spec [1] for the structure of identifiers.

-d

[1] http://livedocs.macromedia.com/specs/actionscript/3/



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] AS3 :: Multiline RegExp declarations :: Future enhancement ? ;-)

2006-03-17 Thread Darron J. Schall
Michael Schmalle wrote:
 Do you ever think down the road, you will give us regexp freaks a 
 multiple line regexp declaration?

Don't use a regex literal.  Instead, use the constructor and pass a string:

var regex:RegExp = new RegExp( some realy
+ really really long
+ regex here );


-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flex 2: thread management, synchronous methods, etc

2006-03-16 Thread Darron J. Schall
dos dedos wrote:
 I'm trying to find out from if it's possible to have a separate 
 thread that does constant polling (of new screen data), i.e. without 
 interrupting the AS execution thread. This way I won't have to develop 
 a custom push-pull protocol on top of binary socket (I would rather 
 stick to HTTPService for simplicity)
What kind of data are you sending via HTTPService?  It's easy enough to 
just send this as string data over a Socket connection, and eliminate 
the need for polling.  There's nothing stopping you from using strings 
over a Socket connection, allowing you to keep the same data format 
except move to push technology instead of polling, and eliminate your 
desire to have a separate polling thread.

In this situation, I'd recommend using an XMLSocket instead of a Socket, 
since it makes working with Strings / XML easier.  Binary Sockets are 
better when you need data at the byte level, XMLSocket is a little 
higher-level.  They work roughly the same...

 I think the VNC example by Darron Schall must be using a custom 
 protocol over binary socket to push screen data to the client ... If 
 that's the case I would sign up and check it out ...

My FlashVNC implements the Remote FrameBuffer protocol.  It's not 
terribly difficult, considering there's a really good spec for it:  
http://www.realvnc.com/docs/rfbproto.pdf

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Is is possible to create tabs with multipul rows?

2006-03-09 Thread Darron J. Schall
Gareth Edwards wrote:
 Cheers
 Gareth
   
There's an example of this inside Flex By Example that I wrote:

http://www.ifbin.com/news/2005/11/flex-15-multiline-tabnavigator-by.html

http://www.ifbin.com/?page=xbe

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Questions about Thread

2006-03-06 Thread Darron J. Schall
sn197412 wrote:
 Hi.

 1. RemoteObject doesn't make new threads, right?
 2. Event makes new threads, right?
 3. Which is AVM based on multi thread or thread pool (like VB) ??

The Flash Player provides a single-threaded model for code execution.

Ted did a good job explaining things here:
http://www.powersdk.com/ted/2005/07/flash-player-mental-model-elastic.php

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: JSON support?

2006-03-03 Thread Darron J. Schall
Hi Harry,

Yeah, that's what I was talking about.  I wrote that... ;-)

-d

harald_dehn wrote:
 Hi,

 look at 

 http://labs.macromedia.com/wiki/index.php/ActionScript_3:resources:ap
 is:libraries#corelib

 there is a JSON de- and encoder. I didn't test it.

 Harry


 --- In flexcoders@yahoogroups.com, Darron J. Schall [EMAIL PROTECTED] 
 wrote:
   
 dhirshbe wrote:
 
 Is there a convenient way to generate objects in AS3 from JSON?
   
   
 Yes.  I wrote a JSON library for AS3, but I'm not 100% when it's 
 
 going 
   
 to be released (it's part of a larger library that should be 
 
 released 
   
 soon, I think).  Unofficially, I think it's going to be public in 
 
 the 
   
 next week or two.  I can't say for certain though, because I'm not 
 
 in 
   
 charge of it.

 -d
 



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] AS3 Date month starting at 0?

2006-03-03 Thread Darron J. Schall
Sönke Rohde wrote:
 Hi,
 Using the AS3-Date-Class the first time I recognized that the month is
 starting at 0 means 0 is January. Is this the expected behaviour?

Yeah - it's supposed to be like this (and has been like this for a long 
time).  Not a bug, sorry, you'll just have to account for the 0-indexed 
month in your code.

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] JSON library now available

2006-02-28 Thread Darron J. Schall
For those interested, the JSON library is now available through the 
ActionScript 3 library page on the labs wiki:

http://labs.macromedia.com/wiki/index.php/ActionScript_3:resources:apis:libraries#corelib

If you run into any problems with it, let me know.  It passed all of the 
unit tests, but there's always a chance that a test case is missing and 
there's a hidden bug somewhere..

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flexbuilder 2B1: coercion error at package declaration, JSON

2006-02-24 Thread Darron J. Schall
Matt Chotin wrote:
 As for JSON I don't think anyone has tried it yet.

Nope, it's been done.  :-)  I wrote a JSON library that is part of a 
larger AS3 library set which will be announced at FlashForward.  See the 
earlier JSON Support thread...

Usage will be as follows:

// package might change to adobe, I'm not sure yet
import com.macromedia.serialization.json.JSON;

var jsonString:String = JSON.encode( someValue );
var value = JSON.decode( jsonString );

Stay tuned, it'll be available soon on the labs website (as open source).

-d






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] JSON support?

2006-02-20 Thread Darron J. Schall
dhirshbe wrote:
 Is there a convenient way to generate objects in AS3 from JSON?
   
Yes.  I wrote a JSON library for AS3, but I'm not 100% when it's going 
to be released (it's part of a larger library that should be released 
soon, I think).  Unofficially, I think it's going to be public in the 
next week or two.  I can't say for certain though, because I'm not in 
charge of it.

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Benefits of Flash Security Model and crossdomain.xml

2006-02-13 Thread Darron J. Schall
Eric Raymond wrote:
 My main question is who is this model intended to protect?
   
It's for security of LAN data when a user views a .swf from a remote 
website.  See:  
http://www.martijndevisser.com/blog/article/why-crossdomainxml-is-a-good-thing

No crossdomain on internal servers means the .swf running locally can't 
access them and send data to hacker.com.

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Radio Button Cell Renderer for Data Grids

2006-01-24 Thread Darron J. Schall
maxgsilverscape wrote:
 I have created a custom cell renderer for a datagrid that displays four 
 radio buttons and creates a radiobuttongroup for them. The problem is 
 that the end result only allows one radio button to be selected for the 
 entire grid as opposed to one for each cell. Has anyone done anything 
 like this? Is there some means for generating a dynamically named 
 radiobuttongroup that I haven't figured out?

 Any advice or examples would be appreciated.
I just submitted an example for this in Flex By Example - it should be 
approved and available shortly.  The example demonstrates how to create 
a cell renderer that lays out 4 radio buttons that function together.  
Each row in the datagrid behaves independently of the others (which 
fixes the problem you were having).

http://www.ifbin.com/?page=xbe

-d


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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: Cairngorm Question

2006-01-23 Thread Darron J. Schall
Dave Wolf wrote:
 We are firm believers of precompiling our applications when in
 production rather then using the JIT MXML compiler.  We are big
 proponents of ANT and automate the builds of not only the MXML but of
 the entire production server.  With one command line we build the
 entire site ready to go into production.  Its very powerful and has an
 immeasureable impact on productivity of our teams.  We've built some
 very nice macros in ant that make building Flex applications very simple.
   

For the ANT macros Dave is talking about, check out the end of my weblog 
entry here:

http://www.darronschall.com/weblog/archives/000165.cfm

I outline how to build RSL's and .swf files from your .mxml.  This lets 
you precompile your Flex applications, allowing you to deploy those 
.swfs to the web server for production.

ANT rules for this kind of stuff.  Click a button and watch it go...

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: Cairngorm Question

2006-01-23 Thread Darron J. Schall
Dave Wolf wrote:
 I was just shown your weblog today about this and they are awesome. 
 The crazy part is they look a ton like ours.  Guess you have a couple
 of smart people and they reach the same conclusions!  Really great
 posting Darron.  We have tons of macros for everything from compiling
 the swf, the rsl's, java jars, deploying web services etc.

   
Not so crazy - I was talking with Ted on IM when he was working on them 
for you.  ;-)  Either way, Flex + ANT is a good combination. Sure, 
there's a learning curve.. but it's a powerful technology and one worth 
learning, in my opinion.

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Limiting text input (ComboBox) to numbers

2005-12-08 Thread Darron J. Schall






Ralf Rottmann wrote:

  
  
  
  
  Hi there,
  
  How can I limit the
possible characters which a user can
enter into a TextInput or ComboBox control to lets say just numbers
etc.
  
  R
  


Set the "restrict" property to "0-9"

mx:TextInput id="textInput" restrict="0-9" /
mx:ComboBox id="combo" editable="true" restrict="0-9" /

-d







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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  










Re: [flexcoders] Socket (not XMLSocket) Issue

2005-11-30 Thread Darron J. Schall
Ralf Rottmann wrote:

 In another area of the application I want to call it like this:

 response = SendCommand(login name);
 Alert.show(response),


Welcome to the world of asynchronous socket programming.  In short, you 
can't do what you want to do in the manner in which you have it coded 
above.  There is no way to make the Flash Player block until the socket 
returns a value, so you're only choice is to move everything into event 
handlers. 

Essentially, this was the biggest hurdle for me in developing FlashVNC.  
I was so used to doing thing synchronously that having to deal with 
event handlers and callbacks for socket data threw a monkey wrench into 
my master plan.  The main issues I ran into:

1.  Not sure which socket write the onSocketData event handler is 
triggered by (if any).
2.  Not enough data in the socket to finish processing (i.e. you need to 
call 4 readBytes but only 3 bytes are available, so you get an EOFError 
when trying to read the 4th byte and your program dies).

To fix #1, a simple solution is to use a state variable:

// send the login command
state = SENT_LOGIN;
SendCommand( login name );

// event handler
private function onSocketData( pe:ProgressEvent ):Void {
switch ( state ) {
   // recevied data back after the login was sent, handle the response
   case SENT_LOGIN:  processLoginResponse( pe );  break;
   case OTHER_STATE: processSomeOtherState( pe ); break;
}
}

Somewhere down the line, update the state and write some more data in 
the socket so when data is received as a response you can call the 
appropriate handler in the switch.  This isn't quite100% how I'd 
implement it, but you get the idea.

#2 above is potentially a LOT harder to handle.  The gist of it is you 
need to know how many bytes of data you need in the socket before 
starting to read the data in the socket.  That is, the first line in the 
method body should be:

// method called from within onSocketData
private function processLoginResponse( pe:ProgressEvent ):Void {
if ( socket.bytesAvailable = BYTES_NEEDED ) {
   // have enough data, ok to process
} // else not enough data, so just wait for onSocketData to be 
called again when more data arrives
}

The trick is knowing how many bytes are needed.  After talking with 
Spike about this - the best thing you can do is send the number of bytes 
in the response as the first element in the response.  That way the 
client can read how many bytes the server sent, see how many bytes are 
in the socket, and only process if all of the data has reached the client.

If you want an example of an application built with asynchronous 
sockets, I recommend purchasing IFBIN's Flex By Example and looking at 
the FlashVNC source code.

Also, Ely and Sho at Macromedia have some ideas on how to write easier 
to read code for dealing with asynchronous events.  Maybe they'll 
contribute to this thread?

-d



 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Flex Builder 1.5 Expiry Woes

2005-11-30 Thread Darron J. Schall
Johannes Nel wrote:

 we don't use flex builder at workbut rather eclipse and Oxygen xml 
 plugin. get oxegyn to point to the mxml schema, and with a wee bit 
 more jigging (i can mail you the settings file we import) you haver 
 code hinting for your mxml in eclipse. granted there is no design 
 view, but i never use that anyway so...

I, too, use Eclipse for Flex development.  If you'd rather not pay for 
the Oxygen plugin, the WebTools platform has a great alternative.  I 
wrote a little tutorial on how to set up eclipse for Flex development here:

http://www.darronschall.com/weblog/archives/000182.cfm

And yeah.. there's no design view using WebTools either, but with MXML 
I've found laying out interfaces in code is just as easy with a good editor.

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Changing the background color of row in datagrid

2005-11-08 Thread Darron J. Schall
Parekh, Shweta - BLS CTR wrote:

 I also tried using employee_dg.rows[rowInd].backgroundColor = 
 0xfff00; for changing the background color for a row but this does 
 not work.

This should probably be added the to FAQ as it gets asked a lot:

// Use setPropertiesAt to set the background color of an individual row:
theListOrGrid.setPropertiesAt( rowIndex, { backgroundColor: 0xFF } );


-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] File - flexcodersFAQ.txt

2005-11-06 Thread Darron J. Schall
flexcoders@yahoogroups.com wrote:

Q: Is there a Rich Text Editor?
  

This answer needs to be updated:  Flex 2.0 includes a Rich Text Editor, 
available with the mx:RichTextEditor / tag.  Documentation for the 
component is available here:

http://livedocs.macromedia.com/labs/1/flex/langref/mx/controls/RichTextEditor.html

For Flex 1.5, try the FlashTextEditor component:

http://www.flashtexteditor.com/in.php

Q: How can I make FlexBuilder faster?
  

For Flex Builder 2.0, the best thing you can do is disable the Build 
Automatically option.  Uncheck Project - Build Automatically from the 
menu and you should see increased performance, especially during save 
operations.  Also, if you're not using a project make sure that you 
close it to free up memory.

Q: Are there frameworks available for Flex?
  

ARP is also a Flex framework, but is not included in the list.

http://www.osflash.org/projects/arp/about

Yes, I know the trouble/fued/history between Cairngorm and ARP, but.. 
well a FAQ should be unbiased and list everything available.  Also, I 
prefer ASUnit ( http://www.asunit.org/ ) for unit testing, as opposed to 
FlexUnit.

Q: When will Flex for .NET be available?
  

It looks like this is won't even be available for Flex 2 Enterprise 
Services right away either.  Everything on the labs website seems to 
point to Flex Enterprise Services as being J2EE only.  I would imagine 
MM wants to get things right on one platform before porting things over 
to another..


-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flex2: TitleWindow close button click event error

2005-11-04 Thread Darron J. Schall
Muzak wrote:

When defining a click event for a custom TitleWindow, clicking anywhere within 
the TitleWindow triggers the event, allthough the 
docs say it is used for the close button.

  

I believe that's a known issue.  For now, do this:

closeButton=true  click=if ( event.target == _closeButton ) 
clickHandler( event );

You have to specifically check if the target of the event is the close 
button.  I think this is caused by the change in event models in that 
events propagate now...

-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Multiple Tabs Rows

2005-10-27 Thread Darron J. Schall
jwc_wensan wrote:

Can we set multiple tab rows.  In other words, for example, can we set 
that the tab has 2 rows with 5 tabs each?
  


Not natively, but an example of multiple tab rows will be Flex By 
Example probably in the next few days.  I have the example created, I 
just need to take the time to submit it ( probably over the weekend )

http://www.ifbin.com/?page=xbe

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] How to upload file from local file system

2005-10-25 Thread Darron J. Schall
jagabcdeff wrote:

Hi,

Now i am working on uploading file from local system to oracle 
database.
How to do this with Flex.
  


I've recently done this, and the process I used looks something like this:

If Flash Player 7 and Non ActiveX player
- Disable upload, prompt for upgrade to latest playet with Express 
Install

If Flash Player 7 and ActiveX player
- Use a combination of hidden IFRAME with an upload form and the 
Flash / JavaScript integration kit.  This is similar to the approach 
outline here: 
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19382  
but a cleaner implementation because of the using the Flash / JS kit.

If Flash Player 8
- Create a FileAPI version 8 .swf file to allows for multiple upload 
via FileReferenceList and load the .swf into an mx:Loader.  Call methods 
on FileAPI to handle upload.  The FileIO .swf from 
http://www.macromedia.com/devnet/flex/articles/fp8_features.html only 
allowed for single file uploads, so I created my own to handle multiple 
file uploads.

The reason upload for Flash Player 7 only works on IE is because on 
FireFox you can't programmatically click the input type=file hidden 
form element to have it show the browse dialog.

Sorry I can't be more specific here, but the links above should point 
you in the right direction for creating your own upload solution.

Also, I tried the route of creating intrinsic classes for FileReference 
and FileReferenceList, and then just used the those in a Flex app, then 
wrote a simple Java app to turn the .swfs from version 7 to version 8 
and deployed the .swfs on a server.  This worked for simple Flex 
applications (using the Flash 8 file api directly), but setting a more 
complex Flex application to version 8 broke it, so I had to go back to 
the approach of loading the FileAPI version 8 .swf file into the Flex 
version 7 .swf.

The approach approach is to create a seemless upload experience.  
Clicking the upload button in Flex will open the file browse dialog.  
Upon selecting file(s), the upload process begins showing all of the 
files and their progress.  If you're having trouble, you can also create 
a separate upload process.  Have the upload button open a javascript 
window with an upload form.  Use the upload form's browse and submit 
buttons to handle the file upload.  When the form closes, notify the 
Flex application that the upload is complete.

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flex 2 Alpha huge output swf

2005-10-17 Thread Darron J. Schall
kosirm2000 wrote:

First of all, I've noticed that output swf is huge, empty has about 
246 kb. Does anyone know if this is going to change in future?

Yes, it's going to get smaller.  This is alpha software, and it's still 
deing developed.  The team hasn't had a chance to even think about 
starting the optimization process, but I'm positive the .swf output size 
will be smaller when the final product ships.

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






Re: [flexcoders] how can I change the default browser in Flexbuilder 2?

2005-10-17 Thread Darron J. Schall
Rich Rodecker wrote:

 quick question...how can I tell FB2 to launch IE instead of FireFox 
 (which is currently my default)?


Go to Window - Preferences, expand General, click Web Browser, and make 
your selection there.

-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] DataGridColumn display issue

2005-10-14 Thread Darron J. Schall
Husain Kitabi wrote:

 I tried to use
   mx:DataGridColumn columnName=classgroupVenue 
 headerText=Classgroup Venue /
 mx:DataGridColumn columnName=classgroupCapacity 
 headerText=Classgroup Capacity/
 mx:DataGridColumn columnName=module.moduleName 
 headerText=Module/

  
 The first 2 columns are fine. But module.moduleName - it does not 
 display anything. Has anybody done something like this. Pl advise.


You need to create a custom cell renderer.  The default cell renderer 
only allows you to go 1 deep into an object, so you have to createa 
cell renderer that can understand column names that use a path to get 
deeper into a object.

Heres some partial code to give you an idea.. the entire cell renderer 
will be found in Flex By Example with sample usage.  This code would go 
inside a PathCellRenderer.as file that creates a Label component to 
render text.

private function setValue( str:String, item:Object, selection:String 
):Void
{
if ( item == undefined ) {
label.visible = false;
return;
}

label.visible = true;

// Split up the complex path into pieces
var path = getDataLabel().split(.);
// dot down to the item to display
var toDisplay = item[ path[0] ];
for ( var i:Number = 1; i  path.length; i++ ) {
toDisplay = toDisplay[ path[i] ];
}

label.text = toDisplay;
}


Flex by example will ship on October 24th, I believe.  :-)

-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






Re: [flexcoders] DataGridColumn display issue

2005-10-14 Thread Darron J. Schall
Allen Manning wrote:

Custom cell renderer might be a bit OTT for this, labelFunction would be a
good start.
  


A cell renderer for an object path is reusable, whereas with using a 
label function you have to create a new function for each path.  It may 
be over the top for this particular case, but it's a once and done thing.

Example:

mx:DataGridColumn headerText=Department 
columnName=user.department /
mx:DataGridColumn headerText=Primary Role 
columnName=permissions.role.primary /
mx:DataGridColumn headerText=Username columnName=user.username /

All 3 of the above columns can use a single label with a path cell 
renderer, as opposed to having to create 3 different label functions to 
return the different paths individually.  In a small project this 
probably isn't a big deal (maintaining a long list of label functions), 
but in a large project it could get cumbersome quickly.

I agree that labelFunction is easier to create, but easiest isn't always 
best.  :-)

-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






Re: [flexcoders] Args in functions

2005-10-13 Thread Darron J. Schall
David Harris wrote:

Is there any way to handle undeclared Arguments passed in to function?
  

Check out the arguments array that is created inside of the function 
automatically for you

function foo() {
trace( arguments[0] );
}

foo( bar );  // output bar

-d



 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] a bit OT...eclipse and templates and mxml files

2005-10-10 Thread Darron J. Schall
Douglas Knudsen wrote:

ok, I'm using eclipse, the WST drop.  I have the XML editor set to for
mxml files.  How do I create a standard template so that any time I
create a new *.mxml file it uses this template?


Windows - Preferences

Expand Web and XML, XML Files, click XML Templates, create a new template.

In your .mxml file then, hit CTRL+Space, and then select the template 
name from the content assist dialog to have it auto-write the code for you.

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: Flex or Flash, opinions?

2005-10-06 Thread Darron J. Schall
Greg Johnson wrote:

Even though Flash 8 now has many of the same controls that Flex has 
(acordians, viewstacks, datagrids, etc).?
  


Flex's development model is *way* better for applications.  The controls 
that Flash 8 has are essentially the same that Flash 7 had, which aren't 
as good as the Flex ones anyway.

Yes, if you're building an application, you should be using Flex to do 
it.  That is to say, you can still use Flash to create assets, super 
cool animations, video, etc... but you'll want to tie the application 
together with Flex most likely.

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






Re: AW: [flexcoders] Re: Number(011) = 9 ????

2005-10-05 Thread Darron J. Schall
Christoph Diefenthal wrote:

My last question was only, whether there is a way to use the Number class to
produce this output, because I thought that it is not the most
object-oriented way to use the global function parseInt(...)...
  


Use numVar = parseInt( string, base ) to convert a string to a number of 
a certain base.

Use numVar.toString( base ) to output a number in a certain base.

-d



 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] UML and Flex

2005-09-16 Thread Darron J. Schall
javanatic23 wrote:

Hi.
Does exist any tool with these features:
- Generation of MXML and AS from UML Diagrams.
  

I created an ActionScript 2 code generator here: 
http://www.darronschall.com/weblog/archives/000174.cfm

I've mostly tested it with ArgoUML, your mileage may vary.  Source code 
is available so you can tweak it if you want.  It doesn't generate .mxml 
(how could you from a Class diagram?).

- Reverse engineering of MXML and AS for generation of UML diagrams.
  

Nothing that I know of...

-d



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Input formatting

2005-08-02 Thread Darron J. Schall
James wrote:

 Hello All

  

 Anybody figure out to to-do input formatting:

  

 Exam: I want to save a phone number as 9991234567

 But I want it to appear on input: (999) 123-4567

  

 Any help would be appreciated

  


http://www.darronschall.com/downloads/fti.swf

This component will be available as part of the IFBIN service.  I've 
built a FormattedTextInput component (for both Flash and Flex) that 
allows you to specify a format mask, and it will restrict the user's 
input so that it matches the mask.

Valid format 'input placeholder' characters:
# - any digit  (0-9)
 a - lowercase letter
A - uppercase letter
Z - any letter
* - any letter or digit

Example usage:
my_ti.format = (###) ### - ;

Then, to get the value of out it, use:  my_ti.value   - that will 
return just the input that matches the input placeholders, ie in the 
scernario about, .value will just be 10 digits (with formatting removed).

If you set the .text property of the component, it will 
automatically format it as well:

my_ti.text = 555999;  // will display according to the format

If you want this as a Flex component, you'll have to wait until Flex by 
Example ships.  The Flash component was part of my talk on Extending 
Components at Flash in the Can in april.  You can also either find my 
Flash source and tweak it to work with Flex, or hope someone else builds 
it for you..  but these are the types of high-quality examples and 
useful code snippets that you'll see in Flex by Example.  ;-)

-d




 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12h53s047/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123014254/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOOcmpgn=GRPRTP=http://groups.yahoo.com/;In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!/a./font
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Hope all is watching the Avalon space..

2005-08-01 Thread Darron J. Schall
Rick Bullotta wrote:

I also wouldn't be at all surprised to see a Flex client based on the Java 
plug-in someday.  When looking at the Flex class models, it has a lot of 
similarities to Java rich client stuff - so who knows - maybe the Flash viewer 
someday becomes classes deployed on a JVM!
  

I'd actually be *very* surprised to see this.  There was a Flash Player 
written in Java a long time ago that supported swf version 2.  It was 
horrendously slow, and therefore abandoned.  Granted Java has made some 
performance improvements since then, but how does moving from the Flash 
Player to the JVM help at all?

Flash is already available on a ton of devices, and Java's write once 
run anywhere mantra didn't pan out as much as Sun wanted it to 
especially in the mobile space.  Flash is more portable in it's current 
codebase then it would be as a Java application, and it also runs faster 
as native code anyway.  I don't see any reason why MM would want to 
invest the time in a Flash Player that runs on top of the JVM since it 
doesn't buy them performance or portability, but rather just a new 
series of headaches.

-d




 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12hf4gbc9/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1122911887/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOOcmpgn=GRPRTP=http://groups.yahoo.com/;In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!/a./font
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] How/where do I get the server name

2005-07-29 Thread Darron J. Schall
pb_test wrote:

Hi,

I need to get the server name of where the SWF is served.
For example: if the flex client is servered from
http://www.macromedia.com/flex/, I need to get http://www.macromedia.com/
  


This might help:  
http://www.prismix.com/blog/archives/2005/05/how_do_i_get_th.cfm

-d




 Yahoo! Groups Sponsor ~-- 
font face=arial size=-1a 
href=http://us.ard.yahoo.com/SIG=12h9988r4/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1122672856/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
Fair play? Video games influencing politics. Click and talk back!/a./font
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Extended ComboBox can't use mx:dataProvider /

2005-07-19 Thread Darron J. Schall
I've run into an interesting situation.  I needed to extend the 
combobox, and in doing so, I'm not longer able to nest the 
mx:dataProvider tag.

For example, the following code doesn't work.

controls:MyCustomComboBox
mx:dataProvider
mx:Array
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
/mx:Array
/mx:dataProvider
/controls:MyCustomComboBox

If I replace my custom combobox with mx:ComboBox, the above code works 
fine.

However, the following code *does* work as expected:

mx:Array id=dp
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
/mx:Array
controls:MyCustomComboBox dataProvider={dp} /

So, the data provider isn't broken at all, but rather the compiler just 
can't process the nested dataProvider tag.  The error message is:  
Error: Don't know how to parse element 
http://www.macromedia.com/2003/mxml:dataProvider;.  It is not a known 
type or a property.

... which is odd, because as a subclass of ComboBox, it shoudl be one in 
the same.  I tried extending via an ActionScript file and an MXML file, 
and both yielded the same results.

Is this something that I would need to modify the schema for to be able 
to nest the mx:dataProvider tag in my extended combobox component?  
Anyone have any ideas?  It looks like a bug to me, but I don't think I 
know enough about it to say that it is for sure.

On a related topic, the regular combobox doesn't seem to respect 
Stage.height when loaded into another Flex .swf.  I thought this was 
fixed?  I have a ComboBox opening below the Stage, and no amount of 
_lockroot seems to solve it.

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flex License(s) Performance

2005-07-19 Thread Darron J. Schall
jwc_wensan wrote:

With the above scenario how many simultaneous users can adequately
access the server before I would need a second server?  Or is it
better to ask how many per hour?
  

See Ted's entry here about scaling Flex:  
http://www.powersdk.com/ted/2005/05/scaling-flex.php

I completely agree with him as well.  I don't have Flex running on the 
server at all.  Instead, I take my Flex-compiled .swf and place it on a 
typical web server.  Then, the Flex application is delivered as a .swf 
and there's no need for the server to do any extra processing at all.  
I've never had a server crash because it couldn't send out .swf files 
fast enough.  Keep in mind though, you'll need a Flex license for every 
server the .swf file sits on.

You can use RemoteObjects without a Flex server running as well, but 
you'll need to use another AMF gateway such as OpenAMF (or you can use 
ColdFusion).  If you use WebServices, you might need a little shim 
script to get around the security restrictions of the Flash Player 
(loading data across domains), depending on what server the web services 
are located on.

Also, I read somewhere that RemoteObjects is faster.  Is it a
signficant increase?

In general RemoteObjects are faster because it uses AMF, which is a 
binary format and much less verbose than WebServices.  It's hard to give 
a definite yes/no answer because I've actually seen results go both ways...

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] clone objects

2005-07-18 Thread Darron J. Schall
m00n_de wrote:

how is it possible to clone an object, rather than creating a
reference to an object ?
  


Use mx.utils.ObjectCopy - 
http://livedocs.macromedia.com/flex/15/asdocs_en/mx/utils/ObjectCopy.html

It's for internal use only but usage is as such:

var instance2:SomeClass = SomeClass( ObjectCopy.copy(instance1) );

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: clone objects

2005-07-18 Thread Darron J. Schall
Clint Modien wrote:

 i remember reading a post a few weeks ago that said something about 
 this is broken for v 1.5

 http://www.mail-archive.com/flexcoders@yahoogroups.com/msg09275.html


I fixed ObjectCopy earlier this year here:  
http://www.darronschall.com/weblog/archives/000148.cfm

I'm assuming the Flex its broken is the same as the way it was in 
Flash, which means my fix will still apply.  You might need to just 
download the flash remoting components source code (to get the 
ObjectCopy class source code) to be able to apply the fix manually.

-d






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [FlexCoders] Validator width actionscript and without model tag

2005-07-18 Thread Darron J. Schall
Eric Guesdon wrote:

I do this code and i retreived true or false from validate method but i
would like to retreive default validators behaviors (TextInput with red
border and error tooltip attach to the error field)

That's kind of funny - I actually just ran into this exact same thing 
today.  The Validator revolves around the errorString property of 
UIComponent.

To set the red border and a tooltip on a textInput, set it's errorString 
to some value:

myInput.errorString = This is the tooltip text;

To make the red border / tooltip go away, set the errorString to .

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flash Player 8 Public Beta

2005-07-12 Thread Darron J. Schall
Sjors Pals wrote:

I was wondering or there is some kind of test page where we can actually 
see the new features of the flashplayer (especially stuff like upload).
  

The public (developer) betas have always been to ensure backwards 
compatibility.  The biggest help you can give MM right now is make sure 
that all of your existing content still works in the newest player. 

If you're interested in helping to test new features, you can try 
signing up for the beta program... Rest assured that if MM announced 
that the new player is going to do X, then X will be available once the 
official release happens.  For now, patience is key, though I share the 
same enthusiasm as you do.  :-)

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Filesize generated swf's

2005-07-12 Thread Darron J. Schall
Joost Nuijten wrote:

 We created an empty mxml-template (containing only a mx:application-tag) and
the filesize was still 263Kb. Does anybody have an idea how to reduce the
filesize?

If you're site is comprised of multiple .swf files, consider using 
Shared Libraries.  There's an article explaining the usage and 
implications here: http://www.macromedia.com/devnet/flex/articles/rsl.html

Essentially, a Shared Library allows you to factor out common 
code/assets (images) in multiple .swf files.  The download size of the 
RSL will be large (usually 100K+ if you include any of the framework), 
but the positive is that the download will only need to occur one time. 

I have a Flex application that loads pieces of the application as needed 
on demand.  Right now the separate pieces are a 15-50K download each, 
which makes loading a piece of the app pretty fast.  The core of the app 
is split into multiple shared libraries that get loaded initially - so 
there's a big initial download hit to get the SL loaded and cached, but 
as the app runs the loading times are much faster as a result.

It's all about perceived performance  :-)  Also, I'm not sure how much 
the website usability rules apply to RIAs.  You'll find that 
application download size and website download size are two different 
things...  in my experience people will wait longer for an App that they 
want to use than for a website they're just browsing.

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flex external desktop application communication

2005-07-06 Thread Darron J. Schall
superabe wrote:

 The app in question is a desktop app that serves up map images.
 Central is not an option because the Flex appp needs to have its own 
 branded UI.
  
 The local connection approach is probably most suited to this case.
  

No one has mentioned XMLSocket yet.  Embedding the Active-X and using 
LocalConnection is a lot of work to go through.  It'd be much easier to 
write a simple Socket server to run locally on some port (you can do 
this in like 20 lines of C# / Java code, prolly 4 lines of python 
code).  Then, use the XMLSocket class in flash to connect to localhost 
on the port.

Then, via the xml socket connection, you can send xml packet from the 
.swf to the server running on the local computer and have that server 
perform desktop-like actions based on what the message was.

-d




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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Flex external desktop application communication

2005-07-06 Thread Darron J. Schall

 I know Flex excels at communicating with server-side data sources.
 Is there any way for a flex app to communicate with a desktop 
 application installed on the same machine as where the app is being 
 viewed (in a controlled kiosk environment for e.g.)


Look into using the XMLSocket class.  You can write a desktop 
application that opens up a socket connection on a specific port, and 
then have the Flex app try connecting on the same port.

See XMLSocket here: 
http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentationfile=1919.htm

.. and where the host would be localhost or 127.0.0.1.

-d



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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Embedding fonts in Shared Libraries

2005-06-15 Thread Darron J. Schall
Has anyone been able to embed a font in a shared library to use across 
multiple Flex-created .swf files?  Specifically, I have this line of 
code in a .sws file:

embed source=../fonts/Arial.ttf newSymbol=mainFont /

And it always complains that Arial.ttf can't be found.  I know the first 
think you'll think of is that the path is incorrect, but I can say 
without a doubt that it's *not* a path issue.  The font is in the right 
location, the relative path is correct, I can see the file on my 
harddrive, all of the cases are correct (even though I'm using Windows 
so that shouldn't matter anyway). 

I have a modular Flex app (i.e. a Flex .swf that loads other Flex 
created .swfs).  I'd like them all to use the same embedded font, the 
user should only have to download the font one time, and I'd like to be 
able to update the font in one location to have all of the .swfs use 
that font. 

I tried putting the font in the main .swf, like this (in a .css file 
including in compilation):

@font-face {
src: url(../fonts/Arial.ttf);
fontFamily: mainFont;
}

Application {
fontFamily: mainFont;
}

... and that works fine for all of the fonts in the main .swf, but the 
fonts in the loaded .swfs turn out to be some sort of serif variant, 
which means the loaded .swfs are *trying* to use the embedded font, but 
they aren't getting a reference to the font correctly.  I want to avoid 
embedding the font in every single loaded .swf, as the user should only 
need to download the glpyhs one time (hence putting the font in a shared 
library).

I've done this type of thing successfully with Flash using a shared 
font.  When using Flash for this, I created a remote shared library with 
a font in it, and then told all of the .swfs to import for runtime 
sharing the shared font symbol.  I can't seem to find the Flex way to 
do this.

Any ideas?  If not, I think I'll need to create the shared library with 
a font symbol from Flash itself, and then post-process the .swf with 
something like swfmill (http://iterative.org/swfmill/) to add in an 
explicit reference to the library.  That seems like a major workaround.

I would think something like this should be easy in Flex, but I can't 
seem to figure it out.  Flex's shared library handling is a million 
times better than dealing with them in Flash, minus this shared fonts 
issue that I can't seem to work around yet.  I know using shared fonts 
in Flash was a royal pain in the butt (all kinds of issues with breaking 
TextFormat, not importing correctly, etc).. but I was hoping the process 
would have been ironed out in Flex.  Maybe I'm just missing something?

-d




 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Embedding fonts in Shared Libraries

2005-06-15 Thread Darron J. Schall
Roger Gonzalez wrote:

So, I think that if you were to make a dummy component with a style
sheet that embeds the font you want, and then put that component into
your RSL, you should be in good shape.  
  

That's genious.  I was able to get that approach working, and I'll 
outline exactly what I did on my weblog either today or tomorrow.

The only problem I've had so far is that the ToolTip isn't drawn 
correctly - the width of the tooltip outline is smaller than the width 
of the text field that the font takes up.  Are you using textWidth to 
measure the border, or _width of the textfield?

All of the fonts are showing up correctly though, even in my 
html-enabled text fields.  I'm pleasantly surprised.

Thanks for the help!  This took me so long to get working in Flash.. I 
love how easily Flex handles shared libraries.

-d




 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Datagrid, Cellrenderer Combos

2005-06-15 Thread Darron J. Schall
Stacy Young wrote:

 Now, if a user were to delete a row then click add for a new rowthe 
 combos appear but they default to the value of the previous record 
 that was deleted! (as if the objects were not really destroyed) Adding 
 a new row at any other time defaults normally.


What does the code for adding a new row look like? Are you adding a new 
object with properties explicitly set to default values? Like... 
dataProvider.addItem({prop1:,prop2:17}); ?

-d



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] I don't understand this error message -

2005-06-15 Thread Darron J. Schall
Mike Anderson wrote:

This code in my app (even know it works fine):

public function popupWindow()
{
   var pop = mx.managers.PopUpManager.createPopUp(this, Categories,
false);
}
  


What's happening is that there is a popupWindow function already defined 
in mx.core.Application.  You can see it if you look on the livedocs, 
under the methods section 
(http://livedocs.macromedia.com/flex/15/asdocs_en/mx/core/Application.html):

|*popupWindow* 
http://livedocs.macromedia.com/flex/15/asdocs_en/mx/core/Application.html#popupWindow(
 
className: Object, initObj: Object) :  MovieClip
| Creates a pop-up TitleWindow container.

So when you define a popupWindow method in your .mxml file, it's 
subclassing mx.core.Application.  Thus, your popupWindow hides the 
Application's popupWindow (due to inheritance rules). 

What you should do is rename your popupWindow to something else, or just 
ignore the message completely if you're not using the original 
popupWindow defined in Application.

-d



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Using custom classes in RSL

2005-05-31 Thread Darron J. Schall
Erik Westra wrote:

class fly.language.English
{
   //button labels
   static public var okLabel:String = OK;
snip


//=== Language.sws ===
library url=Language.swf
component name=fly.language.English uri=* /
/library

//=== Test.mxml ===
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
rsl=Language.sws
mx:Button label={fly.language.English.okLabel}/
/mx:Application

There is no class tag for defining a library, rather you need to use 
component which is a little mislead.  The above has been tested and works.

-d




 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Copyright Symbol in MXML using Eclipse and OxygenXML

2005-05-10 Thread Darron J. Schall
Manish Jethani wrote:

 2.  Save the file as utf-8.  Set this up in your editor's preferences.
  


In Eclipse you can find this under Window - Preferences.  Then, expand 
Workbench, select Editors then find Text file encoding and change it 
to Other - UTF-8

That should do it..

-d




 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Re: More Competition

2005-05-05 Thread Darron J. Schall
dunwerkin wrote:

My reason to not look at SnappMX (or Lazlo for that matter) is that
every XML based implementation for a UI seems to be creating its own
very different dialect. Not very good if you want to repurpose UI
later.  If someone wrote a SWF generator that used either XUL
(Mozilla's dialect) or MXML, I'd be much happier.  At least the
XAMALON effort is using the M$ dialect, which will have a high uptake.

Adam
  


There's an open source project in the works called ActionStep that is a 
port of the NextStep AppKit.  There is already an XML interface language 
for GNUStep (OpenStep, NeXT, whatever).  In theory, this is going to be 
available in ActionScript at some point, though I imagine its quite a 
ways away.. still lots of work to do. 

But, more of an FYI, Renaissance is probably going to be an option in 
the future as well.

http://www.gnustep.it/Renaissance/

I wonder if we'll start to see some XSLT transformers to convert between 
the different UI markups.  I kind of doubt it, as there isn't a real 
need for it (i.e. if you use Flex, you won't be using XAML, etc).  
However, I wonder how long it will take to form a standards committee as 
the official xml format for interfaces like the w3c, with a way to 
specify that code is in a certain language.  Probably not for awhile, if 
ever, as everyone is competing with their proprietary format to see who 
comes out on top...

-d




 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] AS help. Multi deleting from a list.

2005-05-01 Thread Darron J. Schall
[EMAIL PROTECTED] wrote:

 Have you considered de-incrementing the loop? Take the last one first 
 then the compression would not change the lesser values. I think this 
 might be more computationally more efficient if the array was larger 
 than 50.

If you're really worried about the efficiency you shouldn't use 
removeItemAt, but rather just call:

states.splice( index, 1 );

That will delete a single element at a specified index.  Then, when 
you're done deleting all elements, you'll want to dispatch a 
modelChanged event so that all of the listening elements to the data 
provider get updated:

states.dispatchEvent({type:modelChanged});

Doing it the above way will avoid the modelChanged event being 
dispatched for every element removal, avoiding all of that extra 
processing.  Rather, you can batch your changes via splice then notify 
all of the listeners at the end.

And yes, looping over the elements backwards would be slightly faster 
than subtracting i again each iteration..

-d



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] String Trimming

2005-04-26 Thread Darron J. Schall

Ronald Kinion wrote:

 I've been looking for a way to trim strings in flex/actionscript 
 (removing leading and trailing whitespace, a curious omission I think) 
 and was not having much luck finding existing methods so I wrote my 
 own based off how java does it:

This is how I do it -- code attached at bottom.  There's more to 
StringExtensions that I use, but I've only included the trim related 
functions.

Usage:

// adds trim, rtrim, and ltrim to strings
com.darronschall.extensions.StringExtensions.initialize();

var s1 = one two three   ;

trace( : + s1.rtrim() + : );
trace( : + s1.ltrim() + : );
trace( : + s1.trim() + : );

-d



// StringExtensions.as
dynamic class com.darronschall.extensions.StringExtensions {

public static var TAB:Number = 9;
public static var LINEFEED:Number = 10;
public static var CARRIAGE:Number = 13;
public static var SPACE:Number = 32;

/** Constructor */
private function StringExtensions() {
// private to prevent instantiation outside of this class   
}

public static function initialize() {
var instance = new StringExtensions();
   
var sp = String.prototype;
if (!sp.rtrim) {
sp.rtrim = instance.rtrim;
sp.ltrim = instance.ltrim;
sp.trim = instance.trim;
}
}   
   
   
/**
 * Trims whitespace at the beginning of a string
 */
public function ltrim() {
var s:String = this.toString();
var i:Number = 0;
var code:Number = s.charCodeAt(i);
   
while ( code == SPACE|| code == CARRIAGE|| code == 
LINEFEED|| code == TAB ) {
// move to the next char in the string
i++;
   
// read the code to test for whitespace again
code = s.charCodeAt(i);
}
   
return s.substring( i, s.length );
}
   
/**
 * Trims whitespace at the end of a string
 */
public function rtrim() {
var s:String = this.toString();
var i:Number = s.length - 1;
var code:Number = s.charCodeAt(i);
   
while ( code == SPACE || code == CARRIAGE || code == LINEFEED  
|| code == TAB ) {
// move to the previous char in the string
i--;
   
// read the code to test for whitespace again
code = s.charCodeAt(i);
}
   
return s.substring( 0, i+1 );   
}
   
/**
 * Trims whitespace at the beginning and end of a string
 */
public function trim() {
// untyped because we add ltrim and rtrim at runtime
var s = this.toString();
return s.ltrim().rtrim();   
}
   
}




 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





  1   2   >