Re: {Disarmed} RE: {Disarmed} Re: [flexcoders] First flex app - looking for feedback

2007-03-05 Thread Toby Tremayne
You have to make sure your hands are lined up so they're displaying  
in green pixels on the edges of the frame (where the panels are).  It  
works best if you hod your hands parallel to the keyboard so you're  
only tracking a single lump of green pixels.  if you're moving too  
much or your shoulders and elbows are filling the shot then the  
camera gets confused.


Toby

On 06/03/2007, at 15:08 , Jeff Hindman wrote:



Doesn’t work for me … couldn’t move paddles.



--Jeff





From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Toby Tremayne

Sent: Monday, March 05, 2007 6:11 PM
To: flexcoders@yahoogroups.com
Subject: Re: {Disarmed} Re: [flexcoders] First flex app - looking  
for feedback




Um :) Yeah a link would have been handy wouldn't it *blush*



http://www.tobytremayne.com



Toby



On 06/03/2007, at 10:07 , Adam Royle wrote:






Do you have a link to your app?

- Original Message -

From: Toby Tremayne

To: flexcoders@yahoogroups.com

Sent: Monday, March 05, 2007 5:04 PM

Subject: [flexcoders] First flex app - looking for feedback



Hi all,



   i'm new to this list, and to flex and flash. I've  
just posted my first experiment with flex up on the web and if  
anyone has time to examine it and would like to offer any feedback  
I'd be very grateful. It's a very simplistic pong game, where you  
can control the movement of the paddles up and down by waving your  
hands in front of the webcam. I wrote it as a proof of concept, and  
in doing so tried to learn about the bitmap API and various things  
like filters and matrices - making use of the excellent tutorial by  
Guy Watson on webcam motion tracking. Code is posted, so if it's of  
any use to other noobs like me please feel free, and if anyone can  
tell me where I might do things better I'd love to hear from you.




cheers,

Toby







---



   Life is poetry, write it in your own words



---



Toby Tremayne

Senior Technical Consultant

Lyricist Software

0416 048 090

ICQ: 13107913















---



Life is poetry, write it in your own words



---



Toby Tremayne

Senior Technical Consultant

Lyricist Software

0416 048 090

ICQ: 13107913













---

Life is poetry, write it in your own words

---

Toby Tremayne
Senior Technical Consultant
Lyricist Software
0416 048 090
ICQ: 13107913




AW: [flexcoders] Re: Not able to generate GUID

2007-03-05 Thread Harald Dehn
Hi,

 

there is a static function in the UIDUtil class called createUID(). Ot works
fine in my project.

 

Harald

 

 

Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im
Auftrag von scott_flex
Gesendet: Dienstag, 6. März 2007 05:06
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Re: Not able to generate GUID

 


Thanks for the reply... i probably will look into writing my own 
implementation. Never really thought of it...

Generating GUIDs on server, while i can do that, just makes more 
sense if it's done in the flex app itself.

and yes... these IDs will be used as primary keys in my database... 
at least that's the current design i'm thinking about.

I'm generating an XML document in my flex app, where each 
node/element and its attributes represent a single row and child rows 
in a parent child/foreign key relationship.

When i call a web service, i get my xml document which contains pre-
existing primary keys but when i add elements that have not yet had 
been persisted to the database i don't want to both send up my xml 
data and then turn right around and pull it back down just so my new 
xml elements/nodes have the correct primary keys attached. That's 
especially important when i save/send up the xml a second and third 
time.

If i can assign my IDs earlier in the process, that solves that 
issue. I still have to check pre-existence on my server side when i 
actually commit my changes to either run an insert or update sql 
statement.

--- In flexcoders@yahoogroups.com  ,
Jim Cheng <[EMAIL PROTECTED]> wrote:
>
> scott_flex wrote:
> > Is there no function or object to generate a GUID, a true 
globally 
> > unique identifier?
> 
> Just write your own--it's dirt simple. FYI, GUIDs and UUIDs aren't 
> actually guaranteed to be absolutely unique--however, given the 
number 
> of random bits involved, a repeat is statistically highly unlikely 
to 
> happen.
> 
> They're essentially just concatenated random bits, although in 
some 
> cases a few bits are derived from MAC addresses (per version 1 
UUIDs, 
> which you won't have to access to) or hashes of a URL (version 3 
and 5 
> UUIDs).
> 
> See:
> 
> http://en.wikipedia.org/wiki/Globally_Unique_Identifier
> 
> http://www.ietf.org/rfc/rfc4122.txt
> 
> If you need it to play with a server and you're worried about 
repeats 
> enough to expend some developer cycles, a better use of your time 
is to 
> hash the GUIDs that you're given on the server-side and do a quick 
> search for a collision prior to creating a database entry. This 
tactic 
> also gets you around the possibility of malicious folk passing in 
faked 
> GUIDs that they know may result in a collision.
> 
> Jim Cheng
> effectiveUI
>

 



[flexcoders] Re: OT sort of..need SCORM help

2007-03-05 Thread lincmitch
I need to do the same thing, did you get anywhere with it - find any
resources?

Linc

--- In flexcoders@yahoogroups.com, Russell Sprague <[EMAIL PROTECTED]> wrote:
>
> I have to develop a SCORM 2004 compliant course, and I have a course 
> interface built in flex, but it is not SCORM ready.  I know a little 
> about SCORM 1.2, but not much about 2004.  Does anyone have any good 
> resources for SCORM 2004 using Flash/Flex, or know of any good 
> Flash/SCORM consultants. 
> 
> thanks
> Russ
>




Re: [flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's Normal?

2007-03-05 Thread shaun
Matt Chotin wrote:
> Two places to learn about weak refs and memory:
> http://livedocs.adobe.com/flex/201/html/16_Event_handling_172_6.html,
> http://livedocs.adobe.com/flex/201/html/performance_118_27.html
>

Its funny(read: typical), just after i pressed send I noticed the week 
reference arg to the addListener function (FB code hints).

> When I say removing children from the display list I mean that for every
> addChild call you make, if the component you added is meant to go away
> forever, make sure to call removeChild.  Don't just set something to
> invisible and expect it to free up.
>  

Oh ok. I would have called removeChild so thats no worries.

thanks,
  - shaun


[flexcoders] image hotspots

2007-03-05 Thread Mrinmoyee Sanyal

How do we create hotspots (linkable areas) in an image?

-MS


RE: [flexcoders] Re: FileReference.upload,URLVariables,uploadDataFieldNamenot working as expect

2007-03-05 Thread [EMAIL PROTECTED]
dual mode has issues whihc i havent fixed. Single mode should work fine.

besides .. the admin scrren shot that u send me looked ok, u need to put
the info select the date and hit add

Original Message:
-
From: w4kpm [EMAIL PROTECTED]
Date: Mon, 05 Mar 2007 19:18:01 +
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
Re: FileReference.upload,URLVariables,uploadDataFieldNamenot working as
expect


Found the problem.

It appears that the upload code works differently on a linux player.
The exact same code works as advertised on windows/mac players.

I tried getting an update from Adobe, and got the latest player for
linux (FP9_plugin_beta_112006.tar.gz or Shockwave Flash 9.0 d78) and
it did not fix.

;-(



--- In flexcoders@yahoogroups.com, "w4kpm" <[EMAIL PROTECTED]> wrote:
>
> Ben,
> 
> My server side is simply a django procedure that dumps the post call
> giving the output that I listed in the last post.
> 
> 
> def importCsvFile(request):
> 
> print "made it in"
> 
> print request.raw_post_data
> 
> 
> I *know* that I can re-name it on my end, but it really bugs me when I
> do what the docs say and it doesn't do what is expected., I followed
> the docs, and it's not working, so I'm trying to figure out what is
wrong.
> 
> If I figure out what it is, I'll post back here, just thinking someone
> else had run across this before.
> 
> 
> The main issue that I need to solve is that I need to send other
> variables back with the file in the post. That doesn't appear to be
> happening.
> 
> Thanks,
> 
> Kelly
> 
> --- In flexcoders@yahoogroups.com, Ben Marchbanks  wrote:
> >
> > What server-side does your server-side script / 
> > code look like. Most likely this is where the 
> > problem lies.
> > 
> > BTW:You can always rename your upload on the 
> > server side which is very easy and reliable.
> > 
> > -- 
> > Ben Marchbanks
> > 
> > ::: alQemy ::: transforming information into 
> > intelligence
> > http://www.alQemy.com
> > 
> > ::: magazooms ::: digital magazines
> > http://www.magazooms.com
> > 
> > Greenville, SC
> > 864.284.9918
> >
>





mail2web.com – What can On Demand Business Solutions do for you?
http://link.mail2web.com/Business/SharePoint




RE: [flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's Normal?

2007-03-05 Thread Matt Chotin
Two places to learn about weak refs and memory:
http://livedocs.adobe.com/flex/201/html/16_Event_handling_172_6.html,
http://livedocs.adobe.com/flex/201/html/performance_118_27.html
 
When I say removing children from the display list I mean that for every
addChild call you make, if the component you added is meant to go away
forever, make sure to call removeChild.  Don't just set something to
invisible and expect it to free up.
 
Matt



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of shaun
Sent: Monday, March 05, 2007 10:20 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's
Normal?



Matt Chotin wrote:
> Funny you bring this up, it came up in a separate discussion today. We
> don't have a "typical" memory usage for a Flex app, it really depends
on
> what kind of work your application does. Do you load lots of images?
> Those can take up space. How many components do you have, do you load
> them in a deferred manner or all at once? One thing to remember is
that
> the Flash Player allocates memory in chunks, and it may not release
> memory until enough has been allocated to force it to GC. So let's say
> it allocated 40 megs. If the app happened to get to 33 megs there may
> be no need for the Player to GC. And it could be that in reality the
> Player could get away with only 20 megs, but it will take that whole
40
> b/c the OS is letting it and it. Still not technically a memory leak,
> even if you think the task manager should show less.
> 
> Remember to remove children from the display list. Remember to remove
> event listeners or use weak listeners where appropriate. 
> 

Hmm, can you elaborate? Or is there a specific doc. I can read for some 
enlightenment on these? I don't know what weak listeners are or when I 
would need/want to remove children from the display list.

cheers,
- shaun


 


[flexcoders] Re: How Can I save the drawing made at runtime

2007-03-05 Thread sanjaypmg
Thanks to all of you for your suggestions...

Sanjay
--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]> 
wrote:
>
> Tom's suggestion is a decent one if you're looking to save the 
image in an
> editable form. If you're wanting to save the image as a 
GIF/JPG/PNG/etc.,
> then you should search around for the various PNG enconders (I 
believe
> Adobe's ascorelib has at least a JPG encoder, maybe a few other 
formats as
> well). To turn your shapes into a bitmap, you'll need to use the 
Bitmap API,
> in particular BitmapData.draw() to draw the DisplayObjectContainer 
that
> serves as the shapes' root (a Canvas or other UIComponent most 
likely) to a
> bitmap, use the ascorelib/etc. methods to turn that into a 
ByteArray of JPG
> data, then send that to the server which will roundtrip back to 
the user as
> a downloadable file (since Flex can't directly save a file to the 
user's
> machine).
> 
> Troy.
> 
> 
> On 3/5/07, Tom Chiverton <[EMAIL PROTECTED]> wrote:
> >
> > On Monday 05 Mar 2007, sanjaypmg wrote:
> > > I have made a screen where user can draw some SHAPES using 
graphics
> > > class at runtime using . I wanna give a functionality to save 
that
> > > object/drwaings once the it is completed.
> >
> > You could push() each drawing operation and parameters onto an 
Array as
> > the
> > user draws them.
> >
> > --
> > Tom Chiverton
> > Helping to carefully benchmark bleeding-edge e-commerce
> > On: http://thefalken.livejournal.com
> >
> > 
> >
> > This email is sent for and on behalf of Halliwells LLP.
> >
> > Halliwells LLP is a limited liability partnership registered in 
England
> > and Wales under registered number OC307980 whose registered 
office address
> > is at St James's Court Brown Street Manchester M2 2JF.  A list 
of members is
> > available for inspection at the registered office. Any reference 
to a
> > partner in relation to Halliwells LLP means a member of 
Halliwells LLP.
> > Regulated by the Law Society.
> >
> > CONFIDENTIALITY
> >
> > This email is intended only for the use of the addressee named 
above and
> > may be confidential or legally privileged.  If you are not the 
addressee you
> > must not read it and must not use any information contained in 
nor copy it
> > nor inform any person other than Halliwells LLP or the addressee 
of its
> > existence or contents.  If you have received this email in error 
please
> > delete it and notify Halliwells LLP IT Department on 0870 365 
8008.
> >
> > For more information about Halliwells LLP visit 
www.halliwells.com.
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
>




[flexcoders] Show\Hide Column in DataGrid

2007-03-05 Thread sanjaypmg
Hi All,

I am facing an Error while making Grid columns visible\Invisible at 
runtime.

I have made a function showHideColumns in my application which accepts 
2 arrays as parameters. One is "colNameArr" Which has all the column 
names of GRID and another one is "colStatusArr", which has TRUE or 
FALSE corresponding to that partifular column.

When I call the method "showHideColumns" It is making the column 
visible\invisible but showing an ERROR also Which is "Cannot Create a 
Property on String".

How Can I remove that error? pls suggest me something. the function is 
given below:


**  FUNCTION   *
public function showHideColumns(colNameArr:Array, 
colStatusArr:Array):void{

   for(var i:int=0; i

Re: [flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's Normal?

2007-03-05 Thread shaun
Matt Chotin wrote:
> Funny you bring this up, it came up in a separate discussion today.  We
> don't have a "typical" memory usage for a Flex app, it really depends on
> what kind of work your application does. Do you load lots of images?
> Those can take up space.  How many components do you have, do you load
> them in a deferred manner or all at once?  One thing to remember is that
> the Flash Player allocates memory in chunks, and it may not release
> memory until enough has been allocated to force it to GC.  So let's say
> it allocated 40 megs.  If the app happened to get to 33 megs there may
> be no need for the Player to GC.  And it could be that in reality the
> Player could get away with only 20 megs, but it will take that whole 40
> b/c the OS is letting it and it.  Still not technically a memory leak,
> even if you think the task manager should show less.
>  
> Remember to remove children from the display list.  Remember to remove
> event listeners or use weak listeners where appropriate.  
>  

Hmm, can you elaborate? Or is there a specific doc. I can read for some 
enlightenment on these? I don't know what weak listeners are or when I 
would need/want to remove children from the display list.

cheers,
  - shaun


[flexcoders] Re: Limitation of ObjectUtil.copy???

2007-03-05 Thread Dan
Reply to my own question, I think i didn't register the object in the 
class by [RemoteClass brala brala, now it works fine after registering 
it. Thanks

Dan
--- In flexcoders@yahoogroups.com, "Dan" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> 
> Does anyone try using ObjectUtil.copy and get the fail to convert 
> object error?
> 
> I use this for some Java external generated class, then it work fine. 
> But as I try to copy a class that is construct in AS, then it failed 
> and get a runtime fail to convert error. Is there any limitation on 
> this? I search some post on web and it mention about externalizable, 
> what is that? and is it related?
> 
> Best Regards,
> Dan
>




[flexcoders] Problem with Content spilling over beyond it's container's bounds

2007-03-05 Thread Mike Anderson
Hello All,

I have an irritating problem with a draggable TitleWindow, that houses a
UIComponent w/embedded SWF.

My Custom Class extending a UIComponent embeds an external SWF File,
which gives me the ability to wrap it with code.  This way I can control
the SWF and all the MovieClips it contains, programmatically.

Basically, upon the initial Load of the UIComponent, it exceeds the size
of the TitleWindow - and instead of the TitleWindow Container masking
off the extents of the UIComponent, it literally lets the entire SWF
File show through.

Now if I trigger a Resize Event by actually sizing the TitleWindow (I
have code in place, that allows the user to resize the window), THEN the
TitleWindow immediately clips the Content properly.

The UIComponent can be controlled by the User, via a Slider Control
(which controls the Zoom Level), and the user can also pan the Component
around via startDrag() and stopDrag().  Because of all this potential
interaction, it's imperative that the Content's Parent Container,
properly clips the parts that should not be showing.

So with all that said, is there anything I can do differently, to ensure
that the TitleWindow always clips the Children that it houses?

Thanks in advance for your help,

Mike


[flexcoders] Re: Managing Multiple Modules

2007-03-05 Thread aaronvm707
One more question. After loading a module, then unloading it and 
removing it from the display then loading the module again my 
ModuleEvent "info.addEventListener(ModuleEvent.READY, 
modEventHandler)" fires twice. Any thoughts?

Aaron

--- In flexcoders@yahoogroups.com, "Roger Gonzalez" <[EMAIL PROTECTED]> 
wrote:
>
> The module manager knows what modules have been loaded, but it 
doesn't
> provide an iterator.
>  
> If you know the URLs, you can check a given module's load status.  
It is
> harmless (other than creating some cached state) to probe a given 
URL
> before you call "load".
>  
> Removing the tab (and ensuring that you have no other references to 
the
> child control) will only cause instance data to be GC'ed, not the
> underlying bytecode.
>  
> The module's code will never get fully recycled unless you call
> "unload", because there is a ModuleInfo reference handing onto its
> internal module class factory (in case there is a subsequent need to
> reuse it).
>  
> -rg
> 
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of aaronvm707
>   Sent: Monday, March 05, 2007 10:40 AM
>   To: flexcoders@yahoogroups.com
>   Subject: [flexcoders] Re: Managing Multiple Modules
>   
>   
> 
>   Roger, thank you for your quick response.
>   
>   Does the module factory hold information (module ID, URL 
etc...)
> 
>   about the modules I have loaded?
>   
>   How important is it to unload modules? If I remove a specific
> tab 
>   from the navigator will GC eventually clean up the child 
module
> on 
>   that tab?
>   
>   Aaron
>   
>   --- In flexcoders@yahoogroups.com
>  , "Roger Gonzalez" 
 
>   wrote:
>   >
>   > The URL for a given module is a unique key for the module at
> that 
>   URL,
>   > no matter how many times you get it. Each time you get a 
>   ModuleInfo,
>   > you can use it to request an unload. (Note that unload just
> makes
>   > things available for GC, it does not force things to 
unload.)
>   > 
>   > There's no reason why you need to always put the module info
> into a
>   > single variable though, of course its going to get 
overridden.
> You
>   > could always keep an array of module infos. Or, you can just
> call
>   > getModule again. No big deal.
>   > 
>   > -rg
>   > 
>   > 
>   > 
>   > 
>   > From: flexcoders@yahoogroups.com
>  
>   > [mailto:flexcoders@yahoogroups.com
>  ] On Behalf Of aaronvm707
>   > Sent: Sunday, March 04, 2007 10:13 PM
>   > To: flexcoders@yahoogroups.com
>  
>   > Subject: [flexcoders] Managing Multiple Modules
>   > 
>   > 
>   > 
>   > Hello, I am trying to create an application that has a tab
>   > navigator 
>   > that gets loaded with different modules, similar to a 
browser
>   > window 
>   > opening multiple tabs. I have tried different methods but 
do 
>   not
>   > know 
>   > how to get a reference to a module to unload it once 
multiple
>   > modules 
>   > have been loaded. This is the code I am using to load the
>   > modules:
>   > 
>   > public var info:IModuleInfo;
>   > 
>   > private function LoadModule(strUrl:String):void
>   > {
>   > info = ModuleManager.getModule(strUrl);
>   > 
>   > info.addEventListener(ModuleEvent.READY, modEventHandler);
>   > info.load();
>   > }
>   > private function modEventHandler(e:ModuleEvent):void 
>   > {
>   > var m:Module = info.factory.create() as Module;
>   > myTabs.addChild(m);
>   > }
>   > 
>   > This code works very well to load as many modules as I 
need. 
>   The
>   > 
>   > problem is the public var info gets updated as each new 
module
>   > get 
>   > loaded. So I do I get an IModuleInfo object for a module 
that
>   > has 
>   > already been loaded that I can then call the unload() 
method.
>   > Please 
>   > any help or suggestions would be greatly appreciated. Thanks
>   > 
>   > Aaron
>   >
>




RE: [flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's Normal?

2007-03-05 Thread Matt Chotin
Funny you bring this up, it came up in a separate discussion today.  We
don't have a "typical" memory usage for a Flex app, it really depends on
what kind of work your application does. Do you load lots of images?
Those can take up space.  How many components do you have, do you load
them in a deferred manner or all at once?  One thing to remember is that
the Flash Player allocates memory in chunks, and it may not release
memory until enough has been allocated to force it to GC.  So let's say
it allocated 40 megs.  If the app happened to get to 33 megs there may
be no need for the Player to GC.  And it could be that in reality the
Player could get away with only 20 megs, but it will take that whole 40
b/c the OS is letting it and it.  Still not technically a memory leak,
even if you think the task manager should show less.
 
Remember to remove children from the display list.  Remember to remove
event listeners or use weak listeners where appropriate.  
 
Hope this helps,
Matt



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jeofmoyster
Sent: Monday, March 05, 2007 12:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's
Normal?



So I'm developing what will be a good-sized application, but I'll be
carefully planning for download speed and runtime efficiency through
ModuleLoader, SWFLoader, etc. 

Right now I've barely begun but have finished the ground level for the
Data Retrieval, Normalization and Management (no FDS). The memory
monitor object shows about 40 megabytes of memory being used when the
data comes in, and drops to 24 MB if I leave the app still for a a
couple minutes afterward (I assume that's garbage collection kicking
after the data normalization). 

Flex is one my first forays into needing to worry about things like
memory management, so I'm looking for best practice and a baseline of
what's expected and acceptable. 

1) What's "average" memory load for a Flex application? When do I
start freaking out about using too much memory? 

2) How do I optimize memory management during run time? What's the
best way to encourage good garbage collection? 

Ideally this app will cache the data it receives over the course of
its runtime so switching back to older sets is faster than reloading
it from the server, but if this seriously chokes memory, I need to
come up with a new strategy.

Any help is appreciated!



 


Re: [flexcoders] Re: Not able to generate GUID

2007-03-05 Thread shaun
Hi,

scott_flex wrote:
> Thanks for the reply... i probably will look into writing my own 
> implementation.  Never really thought of it...
> 
> Generating GUIDs on server, while i can do that, just makes more 
> sense if it's done in the flex app itself.
> 

No, it doesnt.

> and yes... these IDs will be used as primary keys in my database... 
> at least that's the current design i'm thinking about.
> 

Your kidding..

> I'm generating an XML document in my flex app, where each 
> node/element and its attributes represent a single row and child rows 
> in a parent child/foreign key relationship.
> 
> When i call a web service, i get my xml document which contains pre-
> existing primary keys but when i add elements that have not yet had 
> been persisted to the database i don't want to both send up my xml 
> data and then turn right around and pull it back down just so my new 
> xml elements/nodes have the correct primary keys attached.  That's 
> especially important when i save/send up the xml a second and third 
> time.
> 
> If i can assign my IDs earlier in the process, that solves that 
> issue.  I still have to check pre-existence on my server side when i 
> actually commit my changes to either run an insert or update sql 
> statement.
> 

What will happen with things like collision handling or other 
applications wanting to insert into the database in future etc? Do they 
have to ask you to generate them a PK with your
"special actionscript function"? ;)

Why not do something simple like assign a tempid on the client, do the 
all the DB stuff on the server and return a list of 
temp_client_id=server_side_id key/value pairs, then put those values 
back in the xml on the client? Should be simple enough.

At least that way you are not generating database primary keys in your 
client app. You can also implement a strategy on the server side so your 
client app never gets a real database PK.

cheers,
  shaun


[flexcoders] Re: Managing Multiple Modules

2007-03-05 Thread aaronvm707
Roger, I used your suggestion about storing the open module data in 
an array then pulling up the details when I need it for unload or 
other operations. Works great. Thanks again.

Aaron

--- In flexcoders@yahoogroups.com, "Roger Gonzalez" <[EMAIL PROTECTED]> 
wrote:
>
> The module manager knows what modules have been loaded, but it 
doesn't
> provide an iterator.
>  
> If you know the URLs, you can check a given module's load status.  
It is
> harmless (other than creating some cached state) to probe a given 
URL
> before you call "load".
>  
> Removing the tab (and ensuring that you have no other references to 
the
> child control) will only cause instance data to be GC'ed, not the
> underlying bytecode.
>  
> The module's code will never get fully recycled unless you call
> "unload", because there is a ModuleInfo reference handing onto its
> internal module class factory (in case there is a subsequent need to
> reuse it).
>  
> -rg
> 
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of aaronvm707
>   Sent: Monday, March 05, 2007 10:40 AM
>   To: flexcoders@yahoogroups.com
>   Subject: [flexcoders] Re: Managing Multiple Modules
>   
>   
> 
>   Roger, thank you for your quick response.
>   
>   Does the module factory hold information (module ID, URL 
etc...)
> 
>   about the modules I have loaded?
>   
>   How important is it to unload modules? If I remove a specific
> tab 
>   from the navigator will GC eventually clean up the child 
module
> on 
>   that tab?
>   
>   Aaron
>   
>   --- In flexcoders@yahoogroups.com
>  , "Roger Gonzalez" 
 
>   wrote:
>   >
>   > The URL for a given module is a unique key for the module at
> that 
>   URL,
>   > no matter how many times you get it. Each time you get a 
>   ModuleInfo,
>   > you can use it to request an unload. (Note that unload just
> makes
>   > things available for GC, it does not force things to 
unload.)
>   > 
>   > There's no reason why you need to always put the module info
> into a
>   > single variable though, of course its going to get 
overridden.
> You
>   > could always keep an array of module infos. Or, you can just
> call
>   > getModule again. No big deal.
>   > 
>   > -rg
>   > 
>   > 
>   > 
>   > 
>   > From: flexcoders@yahoogroups.com
>  
>   > [mailto:flexcoders@yahoogroups.com
>  ] On Behalf Of aaronvm707
>   > Sent: Sunday, March 04, 2007 10:13 PM
>   > To: flexcoders@yahoogroups.com
>  
>   > Subject: [flexcoders] Managing Multiple Modules
>   > 
>   > 
>   > 
>   > Hello, I am trying to create an application that has a tab
>   > navigator 
>   > that gets loaded with different modules, similar to a 
browser
>   > window 
>   > opening multiple tabs. I have tried different methods but 
do 
>   not
>   > know 
>   > how to get a reference to a module to unload it once 
multiple
>   > modules 
>   > have been loaded. This is the code I am using to load the
>   > modules:
>   > 
>   > public var info:IModuleInfo;
>   > 
>   > private function LoadModule(strUrl:String):void
>   > {
>   > info = ModuleManager.getModule(strUrl);
>   > 
>   > info.addEventListener(ModuleEvent.READY, modEventHandler);
>   > info.load();
>   > }
>   > private function modEventHandler(e:ModuleEvent):void 
>   > {
>   > var m:Module = info.factory.create() as Module;
>   > myTabs.addChild(m);
>   > }
>   > 
>   > This code works very well to load as many modules as I 
need. 
>   The
>   > 
>   > problem is the public var info gets updated as each new 
module
>   > get 
>   > loaded. So I do I get an IModuleInfo object for a module 
that
>   > has 
>   > already been loaded that I can then call the unload() 
method.
>   > Please 
>   > any help or suggestions would be greatly appreciated. Thanks
>   > 
>   > Aaron
>   >
>




Re: [flexcoders] Data Provider refresh problems

2007-03-05 Thread Jeremy Tooley

and this is how I set my initial DP back to normal

private function clearSearch():void{

   itemsDiscontinued = new ListCollectionView(regions);

   itemsDiscontinued.filterFunction = null
   itemsDiscontinued.refresh();
   myGrid.dataProvider = itemsDiscontinued;
  }

 // itemsDiscontinued = new ListCollectionView(regions); is set to the 
intial DP... which would be your xml data


Jeremy


Jeremy Tooley wrote:


Dude,

I just fought this battle. I had an Array Collection and I would 
filter it.. but the I couldnt access the indexs of the 
arrayCollection. It would only change my dataGrid and comboboxes based 
on what was in the view.


Here is my code snip

//import the class first
import mx.collections.ListCollectionView;
// you can then use this later. to me I store my intial data in it 
without changing my dataProvider


private function checkBoxFilter():void{
  // regions is my DP... can be xml or arrayCollection
 listMyFavorites = new ListCollectionView(regions);
// I check against the item to see if its true. 
but I never change the original DP
listMyFavorites.filterFunction = function 
(item:Object):Boolean {return String(item.var1) == 
"assets/blueStar.png"};

listMyFavorites.refresh();
// update my datagrid.. but it is not reflective on my 
original DP.. as my ListCollectionView just took over that duty

myGrid.dataProvider = listMyFavorites;
// dont want sorting after the function has played 
out.. so I null it

listMyFavorites.filterFunction = null
   

  }


All I know is ListCollectionView stores the stuff for me while I am in 
the application and changes things based on my inital dp.


This functionality rocks.
If you were filtering your initial DP... you could trace it and it 
would all show up fine but come to use it and your screwed


so use the ListCollectionView

Jeremy

tdexterus wrote:


Hi All
I have a relatively simple template, we are using XML data generated
and embedded into the template. The template has a combo box that is
initialized upon opening the template - it has a list of Departments
+ 'All'. The user can change the combo choice, the XML is filtered
and a chart and table are refreshed with the same data.
All is fine except when the user comes back to 'All' ... nothing is
rendered as if no data is returned. I have debugged and the code is
returning all XMLdata:
Code snippet
private function getEmployees(deptVal:String):void
{
if (deptVal == 'All')
{
// we want the complete data set again so use empty filter
EmpTable.dataProvider = dataXML.ROW.(DEPARTMENT_NAME != null);
deptChart.dataProvider = dataXML.ROW.(DEPARTMENT_NAME != null);
}
// Combo box selection has been made so filter by Deprtment
EmpTable.dataProvider = dataXML.ROW.(DEPARTMENT_NAME ==
deptVal);
deptChart.dataProvider = dataXML.ROW.(DEPARTMENT_NAME == deptVal);
}

Any ideas why the All option is not refreshing the output, I have
tried variations on this theme. Is there a method to force a refresh
of the components ?
Thanks for any help, Tim



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.7/711 - Release Date: 3/5/2007 9:41 AM
  





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.7/711 - Release Date: 3/5/2007 9:41 AM
  




Re: [flexcoders] Data Provider refresh problems

2007-03-05 Thread Jeremy Tooley

Dude,

I just fought this battle. I had an Array Collection and I would filter 
it.. but the I couldnt access the indexs of the arrayCollection. It 
would only change my dataGrid and comboboxes based on what was in the view.


Here is my code snip

//import the class first
import mx.collections.ListCollectionView;
// you can then use this later. to me I store my intial data in it 
without changing my dataProvider


private function checkBoxFilter():void{
 // regions is my DP... can be xml or arrayCollection
listMyFavorites = new ListCollectionView(regions);
   // I check against the item to see if its true. but 
I never change the original DP
   listMyFavorites.filterFunction = function 
(item:Object):Boolean {return String(item.var1) == "assets/blueStar.png"};

   listMyFavorites.refresh();
   // update my datagrid.. but it is not reflective on my 
original DP.. as my ListCollectionView just took over that duty

   myGrid.dataProvider = listMyFavorites;
   // dont want sorting after the function has played out.. 
so I null it

   listMyFavorites.filterFunction = null
  
   
 }


All I know is ListCollectionView stores the stuff for me while I am in 
the application and changes things based on my inital dp.


This functionality rocks.
If you were filtering your initial DP... you could trace it and it would 
all show up fine but come to use it and your screwed


so use the ListCollectionView

Jeremy

tdexterus wrote:


Hi All
I have a relatively simple template, we are using XML data generated
and embedded into the template. The template has a combo box that is
initialized upon opening the template - it has a list of Departments
+ 'All'. The user can change the combo choice, the XML is filtered
and a chart and table are refreshed with the same data.
All is fine except when the user comes back to 'All' ... nothing is
rendered as if no data is returned. I have debugged and the code is
returning all XMLdata:
Code snippet
private function getEmployees(deptVal:String):void
{
if (deptVal == 'All')
{
// we want the complete data set again so use empty filter
EmpTable.dataProvider = dataXML.ROW.(DEPARTMENT_NAME != null);
deptChart.dataProvider = dataXML.ROW.(DEPARTMENT_NAME != null);
}
// Combo box selection has been made so filter by Deprtment
EmpTable.dataProvider = dataXML.ROW.(DEPARTMENT_NAME ==
deptVal);
deptChart.dataProvider = dataXML.ROW.(DEPARTMENT_NAME == deptVal);
}

Any ideas why the All option is not refreshing the output, I have
tried variations on this theme. Is there a method to force a refresh
of the components ?
Thanks for any help, Tim




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.7/711 - Release Date: 3/5/2007 9:41 AM
  




[flexcoders] Re: Trouble passing data between components

2007-03-05 Thread helihobby
I think this may help.

http://www.helihobby.com/html/alon_desingpattern.html

Sean.

--- In flexcoders@yahoogroups.com, "Jack OMelia" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
> I'm more of a designer than a developer, and as such my coding 
skills
> are not outstanding, so bear with me.
> 
> I have an application with custom components inside a viewstack. In 
one
> component I have a datagrid and I would like to have data from the
> selected row of the datagrid populate text fields in a separate
> viewstack child, and I can't seem to get this to work.
> 
> Here is the viewstack (edited to show just the relevant sections):
> 
>  height="100%">
>   id="ViewAssurance">
>   width="1003"/>
>   fontFamily="Verdana"
>  fontWeight="bold" fontSize="11" color="#ff"/>
>fontFamily="Verdana" fontWeight="bold" 
fontSize="11"
> color="#ff"/>
>  
>  
>  
>   id="ViewAssuranceTest" buttonMode="true" >
> 
>backgroundColor="#dd" borderStyle="solid"
>  borderColor="#bb" cornerRadius="8"
> id="cvsATGeneral">
>  
>  
>  
>  
>  
>fontWeight="bold" fontSize="11" color="#99"/>
>   id="assurenceTestDetails"/>
>  
>  
> 
> The datagrid is in the component instantiated in the "ViewAssurance"
> viewstack child at , and 
the
> datagrid code is here:
> 
>headerColors="[#ed8e5f, #ed8e5f]" headerHeight="20"
> borderColor="#66"
>  id="dgAssuranceResults"  selectedIndex="0" wordWrap="false"
>  alternatingItemColors="[#dd,#cc]" textAlign="left"
>  dataProvider="{assuranceTestsXML.item}" >
>  
>   dataField="taskName" width="250"
>  headerRenderer="comps.cmpHeaderRenderer"/>
>   width="70"
>  editable="true" rendererIsEditor="true"
>  headerRenderer="comps.cmpHeaderRenderer"
>  itemRenderer="comps.ckbxAssurRenderer"/>
>   dataField="frequency"
>  headerRenderer="comps.cmpHeaderRenderer"/>
>headerRenderer="comps.cmpHeaderRenderer"/>
>headerRenderer="comps.cmpHeaderRenderer"/>
>   sortable="false" width="100"
>  editable="true" rendererIsEditor="true"
>  headerRenderer="comps.cmpHeaderRenderer"
>  itemRenderer="comps.checkboxRenderer"/>
>  
>  
> 
> If they were part of the same file I would use something like:
> 
>  id="txtATDetailsName"/>
> 
> but I need a more explicit path between the two. I've tried
> "Application.application.viewstackMain..etc,etc," but whatever
> combinations I try don't work.
> 
> What am I missing here?
> 
> Thanks,
> Jack
>




[flexcoders] firstTabStyleName?

2007-03-05 Thread Michael Imhoff
Does firstTabStyleName work for either the TabNavigator or TabBar?  I see
the style definitions in both classes, but I don't see how and/or if they
are implemented.

 

Thanks for your help,

Michael

 

 

 

 



Re: [flexcoders] Right-Click -> View Source

2007-03-05 Thread André Rodrigues Pena

Thanks Jim and Muzak. It works :)

On 3/5/07, Jim Cheng <[EMAIL PROTECTED]> wrote:


  André Rodrigues Pena wrote:

> Allow you to view the source by Right-Click -> View Source. As I saw
> this trick in several applications I guess it is a flex native
> support.. isnt it? How do I do it?

Yup. From Flex Builder 2, select Project...Publish Application Source
from the main menu bar. It outputs the source in HTML format and adds
in the link as an attribute to your main MXML's application element.

Jim Cheng
effectiveUI
 





--
André Rodrigues Pena

LOCUS
www.locus.com.br

Blog
www.techbreak.org


RE: {Disarmed} Re: [flexcoders] First flex app - looking for feedback

2007-03-05 Thread Jeff Hindman
Doesn't work for me . couldn't move paddles.

 

--Jeff

 

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Toby Tremayne
Sent: Monday, March 05, 2007 6:11 PM
To: flexcoders@yahoogroups.com
Subject: Re: {Disarmed} Re: [flexcoders] First flex app - looking for
feedback

 

Um :) Yeah a link would have been handy wouldn't it *blush*

 

http://www.tobytrem  ayne.com

 

Toby

 

On 06/03/2007, at 10:07 , Adam Royle wrote:





 

Do you have a link to your app?

- Original Message -

From:   Toby Tremayne

To:   flexcoders@yahoogroups.com

Sent: Monday, March 05, 2007 5:04 PM

Subject: [flexcoders] First flex app - looking for feedback

 

Hi all,

 

   i'm new to this list, and to flex and flash. I've just posted
my first experiment with flex up on the web and if anyone has time to
examine it and would like to offer any feedback I'd be very grateful. It's a
very simplistic pong game, where you can control the movement of the paddles
up and down by waving your hands in front of the webcam. I wrote it as a
proof of concept, and in doing so tried to learn about the bitmap API and
various things like filters and matrices - making use of the excellent
tutorial by Guy Watson on webcam motion tracking. Code is posted, so if it's
of any use to other noobs like me please feel free, and if anyone can tell
me where I might do things better I'd love to hear from you.

 

cheers,

Toby

 

 

 

---

 

   Life is poetry, write it in your own words

 

---

 

Toby Tremayne

Senior Technical Consultant

Lyricist Software

0416 048 090

ICQ: 13107913

 

 

 

 

 

 

 

---

 

Life is poetry, write it in your own words

 

---

 

Toby Tremayne

Senior Technical Consultant

Lyricist Software

0416 048 090

ICQ: 13107913





 

 



Re: [flexcoders] Re: cairngorm strategy question

2007-03-05 Thread slangeberg

Actually, SoundManager doesn't seem to fit MVC. You have no view and no user
input, correct? Why not just use a Command (or whatever patterns fit)
structure without worrying too much about Cairngorm..? Cairngorm's great and
all, but it is intended to manage large applications with many views, in the
end.

Looking back at your orig. post, looks like Command/Event structure may be
just fine, but that also doesn't mean you need to use the CairngormCommand
(if such exists). maybe what you really want is a state machine that fires
some events (probably). That state machine could very well sit in your model
and fire events. Or not!

You might want to take a look at the concept of CRC's (
http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card) as a
starting point. In the end, KISS works!

-Scott

On 05 Mar 2007 19:15:18 -0800, hank williams <[EMAIL PROTECTED]> wrote:


  Thanks guys,

I still dont know what I am going to do, but it is very helpful to
hear the arguments. Sometimes it is really helpful just to get other
peoples views. Obviously this is a bit of a gray area and there is no
*wrong* answer here, which is why nuance and opinion are quite
helpful.

Regards,
Hank


On 3/5/07, JWOpitz <[EMAIL PROTECTED] > wrote:
> I should probably clarify a few things. If you have MVC, and I had to
> qualify a SoundManager class as one of those, I would probably see it
> first as a command class. Manager type classes generally are of this
> nature anyway. But that can easily be argued to say Sound is also a
> view type nature too and there is enough supporting information to be
> so. Maybe this is more about personal preference as I can see both
> sides.
>
> As to why I don't like the Model doing command-ish like things is that
> again it is not its responsibility. Now that is not too say that it
> can't dispatch events. In fact when you have a [Bindable] class, it
> automatically dispatches propertyChange events. So that is perfectly
> acceptable in my book. In fact if you look in the flex2 reference
> material and search metadata, it explains how this works internally
> and how you can do it manually. I do not, however, like methods in
> the Model aside from getters/setters.
>
> Many of the developers on my team, however do like to stick methods
> (not getters/setters) in the model. I don't like it and advocate
> against it. For instance we have a customizable dataGrid where users
> can add various column types with specific data. I suggested having a
> command-type class build columns for it. However, my teammates wanted
> to have a method in the model. For what reasons I do not now. All I
> know is that although I love democracy in terms of politics, I cannot
> stand it in application development. Sorry for that. Just a rant and
> rave for a sec. Back to the point though, to maintain consistency
> with the MVC framework, some sort of ColumnManager would be
> appropriate and would be in the command family.
>
> I am not any kind of MVC purist and occasionaly bend the rules or do
> something questionable with regards to what we have been discussing.
> But when developers start deviating dramatically from the core
> purposes of what a model is, what a command is, what a view is, then I
> will raise an eyebrow and possibly a stink.
>
> Again my 2 cents. Hope it helps in your decision making.
>
> --- In flexcoders@yahoogroups.com , "Troy
Gilbert" <[EMAIL PROTECTED]>
> wrote:
> >
> > Coming from a game development background, I always consider sound to
be
> > apart of the view. Generally, I consider anything directly consumed
> by the
> > user to be "view" while internal state that has meaning independent
> of the
> > view is the model.
> >
> > So, while your sound player does maintain state (the currently playing
> > sound, the current position in the sound being played), you need to
> answer
> > for yourself whether that state is on par with (to use a trivial
> example)
> > the contacts in an address book or the position of a scroll bar on a
> text
> > box. If the sounds are used to convey information about state, then it
> > sounds to me they're more like scrollbars. If the sounds *are* your
> state
> > that you're concerned with (like an audio editing application), then
> they
> > should be in the model.
> >
> > Another way to judge it: if you were going to persist the current
> state of
> > your application to disk, would you worry about persisting the state
> related
> > to sound? Or to put it another way: if I was forced to manipulate
> the data
> > in your application through an API instead of a UI, do I care about
the
> > sounds or are they only there for the pleasure of the human audience?
> >
> > Troy.
> >
> >
> > On 3/5/07, hank williams <[EMAIL PROTECTED]> wrote:
> > >
> > > Thanks,
> > >
> > > > Make a SoundManager Singleton class that extends the
> EventDispatcher.
> > > > That way if you make use of the basic Flex events, you can then
have
> > > > the soundManager instance assign its event han

[flexcoders] Re: Not able to generate GUID

2007-03-05 Thread scott_flex

Thanks for the reply... i probably will look into writing my own 
implementation.  Never really thought of it...

Generating GUIDs on server, while i can do that, just makes more 
sense if it's done in the flex app itself.

and yes... these IDs will be used as primary keys in my database... 
at least that's the current design i'm thinking about.

I'm generating an XML document in my flex app, where each 
node/element and its attributes represent a single row and child rows 
in a parent child/foreign key relationship.

When i call a web service, i get my xml document which contains pre-
existing primary keys but when i add elements that have not yet had 
been persisted to the database i don't want to both send up my xml 
data and then turn right around and pull it back down just so my new 
xml elements/nodes have the correct primary keys attached.  That's 
especially important when i save/send up the xml a second and third 
time.

If i can assign my IDs earlier in the process, that solves that 
issue.  I still have to check pre-existence on my server side when i 
actually commit my changes to either run an insert or update sql 
statement.



--- In flexcoders@yahoogroups.com, Jim Cheng <[EMAIL PROTECTED]> wrote:
>
> scott_flex wrote:
> > Is there no function or object to generate a GUID, a true 
globally 
> > unique identifier?
> 
> Just write your own--it's dirt simple.  FYI, GUIDs and UUIDs aren't 
> actually guaranteed to be absolutely unique--however, given the 
number 
> of random bits involved, a repeat is statistically highly unlikely 
to 
> happen.
> 
> They're essentially just concatenated random bits,  although in 
some 
> cases a few bits are derived from MAC addresses (per version 1 
UUIDs, 
> which you won't have to access to) or hashes of a URL (version 3 
and 5 
> UUIDs).
> 
> See:
> 
>http://en.wikipedia.org/wiki/Globally_Unique_Identifier
> 
>http://www.ietf.org/rfc/rfc4122.txt
> 
> If you need it to play with a server and you're worried about 
repeats 
> enough to expend some developer cycles, a better use of your time 
is to 
> hash the GUIDs that you're given on the server-side and do a quick 
> search for a collision prior to creating a database entry.  This 
tactic 
> also gets you around the possibility of malicious folk passing in 
faked 
> GUIDs that they know may result in a collision.
> 
> Jim Cheng
> effectiveUI
>




[flexcoders] How to display the datatip for a bar chart accross all series at the same time ?

2007-03-05 Thread Claude Hussenet
How to display the datatip for a bar chart accross all series at the same time ?
   
  Thx-Claude
   


Regards
Claude Hussenet
 
-
Have a burning question? Go to Yahoo! Answers and get answers from real people 
who know.

[flexcoders] Limitation of ObjectUtil.copy???

2007-03-05 Thread Dan
Hi all,

Does anyone try using ObjectUtil.copy and get the fail to convert 
object error?

I use this for some Java external generated class, then it work fine. 
But as I try to copy a class that is construct in AS, then it failed 
and get a runtime fail to convert error. Is there any limitation on 
this? I search some post on web and it mention about externalizable, 
what is that? and is it related?

Best Regards,
Dan




[flexcoders] Re: How to Copy object with same base class

2007-03-05 Thread Dan
Hi JWOpitz,

It works great, Thx!!!

Dan
--- In flexcoders@yahoogroups.com, "JWOpitz" <[EMAIL PROTECTED]> wrote:
>
> Check into mx.utils.ObjectUtils.getClassInfo(value:Object):Object 
> 
> 
> --- In flexcoders@yahoogroups.com, "Dan"  wrote:
> >
> > Hi,
> > 
> > Does anyone know the way how to copy two objects of differet 
class say 
> > D1 and D2, that derived from the same B1 base class?
> > Is that i need to copy all the attribute from B1 one by one in D1 
to D2 
> > explicity
> > 
> > The reason i want to do it is because the DTO from the server 
side is 
> > quite different from what a datagrid or other client side 
component 
> > expected, so what i trying to do is to flatten some of the 
attribute of 
> > those DTO first ( a type conversion ). and the B1 is some how 
some 
> > version keeping information which i don't want to touch with.
> > 
> > Any people has any idea? Thx for any opinion.
> > 
> > Daniel
> >
>




Re: [flexcoders] Re: cairngorm strategy question

2007-03-05 Thread hank williams
Thanks guys,

I still dont know what I am going to do, but it is very helpful to
hear the arguments. Sometimes it is really helpful just to get other
peoples views. Obviously this is a bit of a gray area and there is no
*wrong* answer here, which is why nuance and opinion are quite
helpful.

Regards,
Hank

On 3/5/07, JWOpitz <[EMAIL PROTECTED]> wrote:
> I should probably clarify a few things.  If you have MVC, and I had to
> qualify a SoundManager class as one of those, I would probably see it
> first as a command class.  Manager type classes generally are of this
> nature anyway.  But that can easily be argued to say Sound is also a
> view type nature too and there is enough supporting information to be
> so.  Maybe this is more about personal preference as I can see both
> sides.
>
> As to why I don't like the Model doing command-ish like things is that
>  again it is not its responsibility.  Now that is not too say that it
> can't dispatch events.  In fact when you have a [Bindable] class, it
> automatically dispatches propertyChange events.  So that is perfectly
> acceptable in my book.  In fact if you look in the flex2 reference
> material and search metadata, it explains how this works internally
> and how you can do it manually.  I do not, however, like methods in
> the Model aside from getters/setters.
>
> Many of the developers on my team, however do like to stick methods
> (not getters/setters) in the model.  I don't like it and advocate
> against it.  For instance we have a customizable dataGrid where users
> can add various column types with specific data.  I suggested having a
> command-type class build columns for it.  However, my teammates wanted
> to have a method in the model.  For what reasons I do not now.  All I
> know is that although I love democracy in terms of politics, I cannot
> stand it in application development. Sorry for that.  Just a rant and
> rave for a sec.  Back to the point though, to maintain consistency
> with the MVC framework, some sort of ColumnManager would be
> appropriate and would be in the command family.
>
> I am not any kind of MVC purist and occasionaly bend the rules or do
> something questionable with regards to what we have been discussing.
> But when developers start deviating dramatically from the core
> purposes of what a model is, what a command is, what a view is, then I
> will raise an eyebrow and possibly a stink.
>
> Again my 2 cents.  Hope it helps in your decision making.
>
> --- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
> wrote:
> >
> > Coming from a game development background, I always consider sound to be
> > apart of the view. Generally, I consider anything directly consumed
> by the
> > user to be "view" while internal state that has meaning independent
> of the
> > view is the model.
> >
> > So, while your sound player does maintain state (the currently playing
> > sound, the current position in the sound being played), you need to
> answer
> > for yourself whether that state is on par with (to use a trivial
> example)
> > the contacts in an address book or the position of a scroll bar on a
> text
> > box. If the sounds are used to convey information about state, then it
> > sounds to me they're more like scrollbars. If the sounds *are* your
> state
> > that you're concerned with (like an audio editing application), then
> they
> > should be in the model.
> >
> > Another way to judge it: if you were going to persist the current
> state of
> > your application to disk, would you worry about persisting the state
> related
> > to sound? Or to put it another way: if I was forced to manipulate
> the data
> > in your application through an API instead of a UI, do I care about the
> > sounds or are they only there for the pleasure of the human audience?
> >
> > Troy.
> >
> >
> > On 3/5/07, hank williams <[EMAIL PROTECTED]> wrote:
> > >
> > >   Thanks,
> > >
> > > > Make a SoundManager Singleton class that extends the
> EventDispatcher.
> > > > That way if you make use of the basic Flex events, you can then have
> > > > the soundManager instance assign its event handlers.
> > > >
> > > This is the way the code currently works.
> > >
> > > > As for using the Cairngorm class, I think that could also be a good
> > > > idea. I have written a little blog on it here:
> > > > http://jwopitz.wordpress.com/2007/03/01/
> > > >
> > >
> > > I read your blog, and it seems to finish right where I am beginning. I
> > > agree with your premise that commands can and should be used for
> > > internal app communication and not just for remote access. In fact
> > > that is why I posted my question. The issue is where in the cairngorm
> > > architecture a singleton type class of this type should sit. In
> > > cairngorm you have events, commands, delegates, views and model. As I
> > > have spent time thinking about this today, I have started to think
> > > that it is indeed closest to being an element of the model. It retains
> > > state and ca

Re: [flexcoders] Not able to generate GUID

2007-03-05 Thread Jim Cheng
scott_flex wrote:
> Is there no function or object to generate a GUID, a true globally 
> unique identifier?

Just write your own--it's dirt simple.  FYI, GUIDs and UUIDs aren't 
actually guaranteed to be absolutely unique--however, given the number 
of random bits involved, a repeat is statistically highly unlikely to 
happen.

They're essentially just concatenated random bits,  although in some 
cases a few bits are derived from MAC addresses (per version 1 UUIDs, 
which you won't have to access to) or hashes of a URL (version 3 and 5 
UUIDs).

See:

   http://en.wikipedia.org/wiki/Globally_Unique_Identifier

   http://www.ietf.org/rfc/rfc4122.txt

If you need it to play with a server and you're worried about repeats 
enough to expend some developer cycles, a better use of your time is to 
hash the GUIDs that you're given on the server-side and do a quick 
search for a collision prior to creating a database entry.  This tactic 
also gets you around the possibility of malicious folk passing in faked 
GUIDs that they know may result in a collision.

Jim Cheng
effectiveUI




[flexcoders] Data Provider refresh problems

2007-03-05 Thread tdexterus
Hi All
I have a relatively simple template, we are using XML data generated 
and embedded into the template. The template has a combo box that is 
initialized upon opening the template - it has a list of Departments 
+ 'All'. The user can change the combo choice, the XML is filtered 
and a chart and table are refreshed with the same data. 
All is fine except when the user comes back to 'All' ... nothing is 
rendered as if no data is returned. I have debugged and the code is 
returning all XMLdata:
Code snippet
private function getEmployees(deptVal:String):void
{
 if (deptVal == 'All')
 {
 // we want the complete data set again so use empty filter
  EmpTable.dataProvider = dataXML.ROW.(DEPARTMENT_NAME != null);
  deptChart.dataProvider = dataXML.ROW.(DEPARTMENT_NAME != null);
}
 // Combo box selection has been made so filter by Deprtment
 EmpTable.dataProvider = dataXML.ROW.(DEPARTMENT_NAME == 
deptVal);   
deptChart.dataProvider = dataXML.ROW.(DEPARTMENT_NAME == deptVal);
  }

Any ideas why the All option is not refreshing the output, I have 
tried variations on this theme. Is there a method to force a refresh 
of the components ?
Thanks for any help, Tim




[flexcoders] How to highlight a bar serie from a bar chart when the mouse is over the chart ?

2007-03-05 Thread Claude Hussenet
What is the easiest way to highlight a bar serie from a bart chart when the 
mouse is over the chart ?
Thx


Regards
Claude Hussenet
 
-
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

[flexcoders] Re: Not able to generate GUID

2007-03-05 Thread Paul DeCoursey
Because the Flash Player has does not currently give us access to the
MAC address of the client machine we cannot create uuid's.  There are
plently of server side solutions, such as Jakarta Commons ID for java.

Paul


--- In flexcoders@yahoogroups.com, "scott_flex" <[EMAIL PROTECTED]> wrote:
>
> 
> Is there no function or object to generate a GUID, a true globally 
> unique identifier?
> 
> the createUID is not what i'm looking for, just figured generating a 
> GUID would be something pretty basic.
>




[flexcoders] Re: cairngorm strategy question

2007-03-05 Thread JWOpitz
I should probably clarify a few things.  If you have MVC, and I had to
qualify a SoundManager class as one of those, I would probably see it
first as a command class.  Manager type classes generally are of this
nature anyway.  But that can easily be argued to say Sound is also a
view type nature too and there is enough supporting information to be
so.  Maybe this is more about personal preference as I can see both
sides.  

As to why I don't like the Model doing command-ish like things is that
 again it is not its responsibility.  Now that is not too say that it
can't dispatch events.  In fact when you have a [Bindable] class, it
automatically dispatches propertyChange events.  So that is perfectly
acceptable in my book.  In fact if you look in the flex2 reference
material and search metadata, it explains how this works internally
and how you can do it manually.  I do not, however, like methods in
the Model aside from getters/setters.  

Many of the developers on my team, however do like to stick methods
(not getters/setters) in the model.  I don't like it and advocate
against it.  For instance we have a customizable dataGrid where users
can add various column types with specific data.  I suggested having a
command-type class build columns for it.  However, my teammates wanted
to have a method in the model.  For what reasons I do not now.  All I
know is that although I love democracy in terms of politics, I cannot
stand it in application development. Sorry for that.  Just a rant and
rave for a sec.  Back to the point though, to maintain consistency
with the MVC framework, some sort of ColumnManager would be
appropriate and would be in the command family.  

I am not any kind of MVC purist and occasionaly bend the rules or do
something questionable with regards to what we have been discussing. 
But when developers start deviating dramatically from the core
purposes of what a model is, what a command is, what a view is, then I
will raise an eyebrow and possibly a stink.  

Again my 2 cents.  Hope it helps in your decision making.

--- In flexcoders@yahoogroups.com, "Troy Gilbert" <[EMAIL PROTECTED]>
wrote:
>
> Coming from a game development background, I always consider sound to be
> apart of the view. Generally, I consider anything directly consumed
by the
> user to be "view" while internal state that has meaning independent
of the
> view is the model.
> 
> So, while your sound player does maintain state (the currently playing
> sound, the current position in the sound being played), you need to
answer
> for yourself whether that state is on par with (to use a trivial
example)
> the contacts in an address book or the position of a scroll bar on a
text
> box. If the sounds are used to convey information about state, then it
> sounds to me they're more like scrollbars. If the sounds *are* your
state
> that you're concerned with (like an audio editing application), then
they
> should be in the model.
> 
> Another way to judge it: if you were going to persist the current
state of
> your application to disk, would you worry about persisting the state
related
> to sound? Or to put it another way: if I was forced to manipulate
the data
> in your application through an API instead of a UI, do I care about the
> sounds or are they only there for the pleasure of the human audience?
> 
> Troy.
> 
> 
> On 3/5/07, hank williams <[EMAIL PROTECTED]> wrote:
> >
> >   Thanks,
> >
> > > Make a SoundManager Singleton class that extends the
EventDispatcher.
> > > That way if you make use of the basic Flex events, you can then have
> > > the soundManager instance assign its event handlers.
> > >
> > This is the way the code currently works.
> >
> > > As for using the Cairngorm class, I think that could also be a good
> > > idea. I have written a little blog on it here:
> > > http://jwopitz.wordpress.com/2007/03/01/
> > >
> >
> > I read your blog, and it seems to finish right where I am beginning. I
> > agree with your premise that commands can and should be used for
> > internal app communication and not just for remote access. In fact
> > that is why I posted my question. The issue is where in the cairngorm
> > architecture a singleton type class of this type should sit. In
> > cairngorm you have events, commands, delegates, views and model. As I
> > have spent time thinking about this today, I have started to think
> > that it is indeed closest to being an element of the model. It retains
> > state and can be queried as any element of the model can. The only
> > weird thing is that it can broadcast events. But it makes sense to me
> > that certain types of model information perhaps should be able to
> > generate events.
> >
> > Currently models generate events surreptitiously via the binding
> > architecture. They really do generate events, just not in the
> > cairngorm way. So why not allow model elements to generate cairngorm
> > events?
> >
> > > I would not start having the model do any command-ish activities
since
> 

Re: {Disarmed} Re: [flexcoders] First flex app - looking for feedback

2007-03-05 Thread Toby Tremayne

Um :)  Yeah a link would have been handy wouldn't it *blush*

http://www.tobytremayne.com

Toby

On 06/03/2007, at 10:07 , Adam Royle wrote:



Do you have a link to your app?


- Original Message -
From: Toby Tremayne
To: flexcoders@yahoogroups.com
Sent: Monday, March 05, 2007 5:04 PM
Subject: [flexcoders] First flex app - looking for feedback

Hi all,


	i'm new to this list, and to flex and flash.  I've just posted my  
first experiment with flex up on the web and if anyone has time to  
examine it and would like to offer any feedback I'd be very  
grateful.  It's a very simplistic pong game, where you can control  
the movement of the paddles up and down by waving your hands in  
front of the webcam.  I wrote it as a proof of concept, and in  
doing so tried to learn about the bitmap API and various things  
like filters and matrices - making use of the excellent tutorial by  
Guy Watson on webcam motion tracking.  Code is posted, so if it's  
of any use to other noobs like me please feel free, and if anyone  
can tell me where I might do things better I'd love to hear from you.


cheers,
Toby



---

Life is poetry, write it in your own words

---

Toby Tremayne
Senior Technical Consultant
Lyricist Software
0416 048 090
ICQ: 13107913









---

Life is poetry, write it in your own words

---

Toby Tremayne
Senior Technical Consultant
Lyricist Software
0416 048 090
ICQ: 13107913




Re: [flexcoders] Disable Clicks while on busyCursor

2007-03-05 Thread Anthony Lee

The obvious solutions would be:

1) Enable/disable a transparent button that's as big as the stage and has
the greatest z depth / lowest childIndex

2) Make all your active components register themselves then loop through and
disable/enable them according to your busy state

I'm sure there are fancier ways to do it but these should get the job done.

tonio


[flexcoders] Not able to generate GUID

2007-03-05 Thread scott_flex

Is there no function or object to generate a GUID, a true globally 
unique identifier?

the createUID is not what i'm looking for, just figured generating a 
GUID would be something pretty basic.









Re: [flexcoders] Right-Click -> View Source

2007-03-05 Thread Jim Cheng
André Rodrigues Pena wrote:

> Allow you to view the source by Right-Click -> View Source. As I saw
> this trick in several applications I guess it is a flex native
> support.. isnt it? How do I do it?

Yup.  From Flex Builder 2, select Project...Publish Application Source 
from the main menu bar.  It outputs the source in HTML format and adds 
in the link as an attribute to your main MXML's application element.

Jim Cheng
effectiveUI


Re: [flexcoders] problem firing ChangeWatcher event on specific ModelLocator property

2007-03-05 Thread itsthetaste


Webdevotion wrote:
> 
> This fires the event I want:
> var collection : Array = model.downloads.toArray();
> collection.push( newDownloadVO );
> model.downloads = new ArrayCollection( collection );
> 
> 
> model.downloads.addItem( aNewDownloadVO ) will not fire an event.
> 
> Any one knows why ?
> 
> 

Check this out
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg55479.html
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg55479.html 

It looks like it doesnt look inside your array for changes, so you need to
do what you just did then create a new array with the source of you ammended
one.

model.downloads.addItem( aNewDownloadVO );
model.downloads = new ArrayCollection( model.downloads.source );

-- 
View this message in context: 
http://www.nabble.com/Re%3A-problem-firing-ChangeWatcher-event-on-specific-ModelLocator-property-tf3326942.html#a9296054
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Trouble passing data between components

2007-03-05 Thread Jack OMelia
Hi All,

I'm more of a designer than a developer, and as such my coding skills
are not outstanding, so bear with me.

I have an application with custom components inside a viewstack. In one
component I have a datagrid and I would like to have data from the
selected row of the datagrid populate text fields in a separate
viewstack child, and I can't seem to get this to work.

Here is the viewstack (edited to show just the relevant sections):


 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

The datagrid is in the component instantiated in the "ViewAssurance"
viewstack child at , and the
datagrid code is here:

 
 
 
 
 
 
 
 
 
 

If they were part of the same file I would use something like:



but I need a more explicit path between the two. I've tried
"Application.application.viewstackMain..etc,etc," but whatever
combinations I try don't work.

What am I missing here?

Thanks,
Jack



[flexcoders] Re: Keyboard issues on VISTA - Important

2007-03-05 Thread iko_knyphausen

I think I finally found the problem source...

It seems to be connected to the hosting HTML file (and possibly its JS
code - not sure). That is the file that pulls flash player, checks for
the required version, etc. This file is generated automatically by Flex
and used as default on the web server...

I don't know how this can affect the keyboard input, but after pulling a
lot on my hair over this issue, I swear I am not making this up.

If I start the application by loading the SWF file directly, all
keyboard issues are gone...

Ideas anyone (someone at Adobe maybe?)


--- In flexcoders@yahoogroups.com, "camlinaeizerous" <[EMAIL PROTECTED]>
wrote:
>
> Have you been able to try it on home basic or professional? It is odd
> that it would only happen on premium and not ultimate.
>





[flexcoders] Can I access HTTP session variables in Flex without using Flashvars?

2007-03-05 Thread thegators_2002
I am able to create a web service request in Flex, using parameters
sent to the html page via a query string which is then passed in using
flashvars.  However, now I am being asked if I can do this without
having a query string for all to see with this information in plain
sight.  The idea is to use session variables to store this info.  It's
just a few items, like an account ID, user ID, a URL for the WSDL
file, and a couple others.

I am not familiar with web sessions or with how that info gets
accessed by Flex, I am more of a desktop developer.  So I ask if this
is a sound strategy, or if there are other, better ways to do this? 
And if there are any good examples available?  

The app has users log in and get authenticated, and we want to pass
that info to the web service.  As it is right now, not authenticating
the user request and passing a couple IDs and a URL in the query
string would allow anybody anywhere to access that web service at any
time.  I need some way to secure it or at least drastically limit the
amount of time it would be valid.

Thank you for any assistance!


Here is my code as of right now:

private var accountID:String;   
private var systemUserID:String;
private var myWebServiceURL:String;

public var MyService:WebService = new mx.rpc.soap.WebService();

// This method runs on start-up.  It pulls in Flashvars from the
parent HTML file, and starts up the web service.
public function initApp():void
{   
accountID = Application.application.parameters.accountID;
systemUserID = Application.application.parameters.systemUserID; 
myWebServiceURL = Application.application.parameters.webServiceURL;

// Call the web service to get an RRM results doc
UseWebService( myWebServiceURL + "?WSDL");
}



// Create a web service and load the WSDL, using ActionScript
public function UseWebService( wsdl:String):void 
{
// Set the path to the WSDL
MyService.wsdl = wsdl;
 
// Set listeners for the result and fault events of the specific web
service method   
   
MyService.GetRRMAnalysisResultsFromAccountIDStr.addEventListener("result",
resultHandler);
   
MyService.GetRRMAnalysisResultsFromAccountIDStr.addEventListener("fault",
faultHandler);  

// Add a listener event for the web service load completion
MyService.addEventListener("load", loadHandler);

// Load the WSDL into the web service
MyService.loadWSDL();
}



// Once the WSDL is loaded into the web service, this handler will
run.  Call the appropriate service and send credentials.
public function loadHandler(event:LoadEvent):void 
{
MyService.GetRRMAnalysisResultsFromAccountIDStr( accountID, systemUserID);
}



// If there is a fault in setting up the web service, this will run. 
It informs the user there was a problem.
public function faultHandler(event:FaultEvent):void 
{
Alert.show("An error occurred while accessing the web service: " +
event.fault.faultString + ".\nPlease close this application.", "Error");
}  



// Event Handler: listens for the web service call to be completed   
private function resultHandler(event:ResultEvent):void 
{   
// Create an XML doc and load it with the XML string returned from the
web service
var myXml:XML = new
XML(MyService.GetRRMAnalysisResultsFromAccountIDStr.lastResult);

// Copy the XML doc to the custom class which will handle extracting 
ResultSet.XmlResults( myXml);
}




Re: [flexcoders] First flex app - looking for feedback

2007-03-05 Thread Adam Royle
Do you have a link to your app?


  - Original Message - 
  From: Toby Tremayne 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, March 05, 2007 5:04 PM
  Subject: [flexcoders] First flex app - looking for feedback


  Hi all,



i'm new to this list, and to flex and flash.  I've just posted my first 
experiment with flex up on the web and if anyone has time to examine it and 
would like to offer any feedback I'd be very grateful.  It's a very simplistic 
pong game, where you can control the movement of the paddles up and down by 
waving your hands in front of the webcam.  I wrote it as a proof of concept, 
and in doing so tried to learn about the bitmap API and various things like 
filters and matrices - making use of the excellent tutorial by Guy Watson on 
webcam motion tracking.  Code is posted, so if it's of any use to other noobs 
like me please feel free, and if anyone can tell me where I might do things 
better I'd love to hear from you.


  cheers,
  Toby







  ---


Life is poetry, write it in your own words


  ---


  Toby Tremayne
  Senior Technical Consultant
  Lyricist Software
  0416 048 090
  ICQ: 13107913





   

Re: [flexcoders] Re: cairngorm strategy question

2007-03-05 Thread Troy Gilbert

Coming from a game development background, I always consider sound to be
apart of the view. Generally, I consider anything directly consumed by the
user to be "view" while internal state that has meaning independent of the
view is the model.

So, while your sound player does maintain state (the currently playing
sound, the current position in the sound being played), you need to answer
for yourself whether that state is on par with (to use a trivial example)
the contacts in an address book or the position of a scroll bar on a text
box. If the sounds are used to convey information about state, then it
sounds to me they're more like scrollbars. If the sounds *are* your state
that you're concerned with (like an audio editing application), then they
should be in the model.

Another way to judge it: if you were going to persist the current state of
your application to disk, would you worry about persisting the state related
to sound? Or to put it another way: if I was forced to manipulate the data
in your application through an API instead of a UI, do I care about the
sounds or are they only there for the pleasure of the human audience?

Troy.


On 3/5/07, hank williams <[EMAIL PROTECTED]> wrote:


  Thanks,

> Make a SoundManager Singleton class that extends the EventDispatcher.
> That way if you make use of the basic Flex events, you can then have
> the soundManager instance assign its event handlers.
>
This is the way the code currently works.

> As for using the Cairngorm class, I think that could also be a good
> idea. I have written a little blog on it here:
> http://jwopitz.wordpress.com/2007/03/01/
>

I read your blog, and it seems to finish right where I am beginning. I
agree with your premise that commands can and should be used for
internal app communication and not just for remote access. In fact
that is why I posted my question. The issue is where in the cairngorm
architecture a singleton type class of this type should sit. In
cairngorm you have events, commands, delegates, views and model. As I
have spent time thinking about this today, I have started to think
that it is indeed closest to being an element of the model. It retains
state and can be queried as any element of the model can. The only
weird thing is that it can broadcast events. But it makes sense to me
that certain types of model information perhaps should be able to
generate events.

Currently models generate events surreptitiously via the binding
architecture. They really do generate events, just not in the
cairngorm way. So why not allow model elements to generate cairngorm
events?

> I would not start having the model do any command-ish activities since
> that is not its responsibility.

Why not?

If a model contains data that changes, why is it appropriate that the
only way to "tell the world" is via binding, when binding just doesnt
always match the need?

Regards,
Hank
 



Re: [flexcoders] Re: cairngorm strategy question

2007-03-05 Thread hank williams
Thanks,

> Make a SoundManager Singleton class that extends the EventDispatcher.
>  That way if you make use of the basic Flex events, you can then have
> the soundManager instance assign its event handlers.
>
This is the way the code currently works.


> As for using the Cairngorm class, I think that could also be a good
> idea.  I have written a little blog on it here:
> http://jwopitz.wordpress.com/2007/03/01/
>

I read your blog, and it seems to finish right where I am beginning. I
agree with your premise that commands can and should be used for
internal app communication and not just for remote access. In fact
that is why I posted my question. The issue is where in the cairngorm
architecture a singleton type class of this type should sit. In
cairngorm you have events, commands, delegates, views and model. As I
have spent time thinking about this today, I have started to think
that it is indeed closest to being an element of the model. It retains
state and can be queried as any element of the model can. The only
weird thing is that it can broadcast events. But it makes sense to me
that certain types of model information perhaps should be able to
generate events.

Currently models generate events surreptitiously via the binding
architecture. They really do generate events, just not in the
cairngorm way. So why not allow model elements to generate cairngorm
events?

> I would not start having the model do any command-ish activities since
> that is not its responsibility.

Why not?

If a model contains data that changes, why is it appropriate that the
only way to "tell the world" is via binding, when binding just doesnt
always match the need?

Regards,
Hank


[flexcoders] Re: handling both MOUSE_DOWN and MOUSE_CLICK

2007-03-05 Thread Paul DeCoursey
There is nothing abnormal about these gestures.  A click is a mouse
press and release, it cannot be without both actions.  

You don't want to mess with timers, just set a var to true on a mouse
down and reset it to false on mouse up and click.  if that var is true
on the mouse move then start drag. you can keep select on click, and
perhaps you need to do something on the start drag like select.

All these gestures work as expected.

> 1. click
Fires the CLICK
> 2. double-click
Fires the DOUBLE_CLICK event
> 3. press and hold (move is optional)
press is the MOUSE_DOWN event, hold isn't an event, it's the lack of
event.
> 4. release
Fires the MOUSE_UP event

try the above strategy and I think you'll find it's what you are
expecting.


Paul

--- In flexcoders@yahoogroups.com, "Engkee Kwang" <[EMAIL PROTECTED]> wrote:
>
> Paul,
> 
> Your explanation is correct in why I'm not getting the behavior I 
> want. In a way, what I'm looking for is "logical" mouse event 
> behavior that more closely corresponds to what I would consider to 
> be "normal" user gestures and expectations, namely, the following
> 
> 1. click
> 2. double-click
> 3. press and hold (move is optional)
> 4. release
> 
> Those are the gestures that users learn when using the mouse. Seems 
> like those would be desirable events to be able to map to directly 
> and not have to do code like... catch mouse down... fire off timer... 
> if timer expires before mouse-up, it's a click... otherwise, we are 
> pressing-and-holding... so start a drag...
> 
> -Engkee
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "Paul DeCoursey"  wrote:
> >
> > Click isn't going to happen until after mouse up, and if you start a
> > drag I'd think that would supress any click events.  I'm thinking 
> you
> > will just want to do the select on the mouse down.  Then trigger the
> > drag on mouse_move if no mouse_up or Mouse_click has occurred.
> > --- In flexcoders@yahoogroups.com, "Engkee Kwang"  wrote:
> > >
> > > what is the trick to listen for and handle both MOUSE_CLICK (say 
> to 
> > > select) and MOUSE_DOWN (to start dragging)?
> > > 
> > > I have a Label on a canvas. First I added a listener on 
> MOUSE_CLICK and 
> > > that works. My handler gets called and I can "select" the item.
> > > 
> > > Then to support D&D, I added another listener on MOUSE_DOWN. When 
> I do 
> > > that, I get call on mouse-down and I can then initiate the drag. 
> > > Unfortunately, I no longer get called on click.
> > > 
> > > Presumably, rather than listening for MOUSE_DOWN, what I really 
> need to 
> > > do is listen for the mouse-down but without any mouse-up for some 
> > > interval... so as to distinguish it from a click. Is there such 
> an 
> > > event?
> > > 
> > > -Engkee
> > >
> >
>




[flexcoders] Re: cairngorm strategy question

2007-03-05 Thread JWOpitz
I am sure there will be plenty of suggestions, but it sounds like you
need some sort of static point of access for your sounds.  There are
few approaches that I would try:

Make a SoundManager Singleton class that extends the EventDispatcher.
 That way if you make use of the basic Flex events, you can then have
the soundManager instance assign its event handlers.

As for using the Cairngorm class, I think that could also be a good
idea.  I have written a little blog on it here:
http://jwopitz.wordpress.com/2007/03/01/

I would not start having the model do any command-ish activities since
that is not its responsibility.  And I would not make it a view-type
since, well, its not a view, its a sound.  

Hope that helps.

--- In flexcoders@yahoogroups.com, "hank williams" <[EMAIL PROTECTED]> wrote:
>
> I have a class that is basically a sound server. It both generates
> events - like "sound #1234 is finished" and receives commands like
> "start playing sound #4567".
> 
> My problem is that I am not sure where to put this in the cairngorm
universe.
> 
> If I were to put it in the model, thats kinda wierd since it generates
> events, and models dont ususally generate cairngorm events. One
> thought I had was not to have it generate events, but to use binding
> to get information out of the object, but events really are better
> since it may be playing multiple sounds and events allow me to specify
> that multiple things are happening. Binding would be less clean
> because my binding subscribers would have to bind to an array since
> any number of sounds may be in play at one time.
> 
> If I were to make the class a view, thats wierd because views dont
> generally get modified by cairngorm events.
> 
> Of course the third way is just to use standard AS3 events - which is
> the way it currently works - but the architecture of commands in
> cairngorm is so clean with a class for each command that it makes it
> really easy to read the code.  So if I can, I would like to use the
> cairngorm command structure for this piece if I can make it work.
> 
> Any thoughts greatly appreciated.
> 
> Hank
>




[flexcoders] cacheAsBitmap

2007-03-05 Thread Guy Morton
I've created an mxml component that uses a canvas object and writes a  
graphic on it based on some input parameters. This graphic is then  
animated over a bitmap background. If I set cacheAsBitmap on the  
graphic's canvas to true, then rotate the canvas, am I improving  
performance? Or does the rotate mean flash will throw away the  
previously cached bitmap and make a new one?

Also, does having a drop shadow filter on the parent canvas container  
affect the behaviour of cacheAsBitmap?

Guy


[flexcoders] Re: handling both MOUSE_DOWN and MOUSE_CLICK

2007-03-05 Thread Engkee Kwang
Paul,

Your explanation is correct in why I'm not getting the behavior I 
want. In a way, what I'm looking for is "logical" mouse event 
behavior that more closely corresponds to what I would consider to 
be "normal" user gestures and expectations, namely, the following

1. click
2. double-click
3. press and hold (move is optional)
4. release

Those are the gestures that users learn when using the mouse. Seems 
like those would be desirable events to be able to map to directly 
and not have to do code like... catch mouse down... fire off timer... 
if timer expires before mouse-up, it's a click... otherwise, we are 
pressing-and-holding... so start a drag...

-Engkee



--- In flexcoders@yahoogroups.com, "Paul DeCoursey" <[EMAIL PROTECTED]> wrote:
>
> Click isn't going to happen until after mouse up, and if you start a
> drag I'd think that would supress any click events.  I'm thinking 
you
> will just want to do the select on the mouse down.  Then trigger the
> drag on mouse_move if no mouse_up or Mouse_click has occurred.
> --- In flexcoders@yahoogroups.com, "Engkee Kwang"  wrote:
> >
> > what is the trick to listen for and handle both MOUSE_CLICK (say 
to 
> > select) and MOUSE_DOWN (to start dragging)?
> > 
> > I have a Label on a canvas. First I added a listener on 
MOUSE_CLICK and 
> > that works. My handler gets called and I can "select" the item.
> > 
> > Then to support D&D, I added another listener on MOUSE_DOWN. When 
I do 
> > that, I get call on mouse-down and I can then initiate the drag. 
> > Unfortunately, I no longer get called on click.
> > 
> > Presumably, rather than listening for MOUSE_DOWN, what I really 
need to 
> > do is listen for the mouse-down but without any mouse-up for some 
> > interval... so as to distinguish it from a click. Is there such 
an 
> > event?
> > 
> > -Engkee
> >
>




[flexcoders] Re: Can I use Flash Library items in Flex, if so, how?

2007-03-05 Thread Mark
I started looking over the examples by Jesse and realized he's using 
the symbols as new components to be placed on the stage.  These are 
great examples but before I get too deep I'm wondering if I can use 
these to accomplish what I'm looking to do, which is…

My Flash app that I'm converting into Flex is a Project Management 
tracker.  In one view the PM can look at a "radar view" that plots 
points on a circle (radar graphic).  The center of the circle is 
today's date and the outer most edge is 2 years out.  Each project 
(point in the Library) gets placed on the radar depending on date.   
So I guess what I need to do is similar to Jesse's example but I 
think I need more control in that I need to place the graphic but 
then need to add points from the library.  





--- In flexcoders@yahoogroups.com, "greg h" <[EMAIL PROTECTED]> wrote:
>
> Mark,
> 
> I have had success making calls to my AS3 SWFs  compiled in Flash
> using the Flash
> Professional 9 ActionScript 3.0
> Preview
> .
> 
> The "Flash Professional 9 ActionScript 3.0 Preview" has been 
public for over
> 8 months.  I say shame on Adobe for publishing nothing on how to 
integrate
> Flash authored AS3 SWFs into Flex 2 apps.  Nothing.
> 
> But huge thanks to Jesse Warden.  If you have not already, please 
review the
> following 2 posts by Jesse on the topic.  Note:  the first link 
includes
> downloadable code.  It has been a few weeks since I was in either 
Jesse or
> my code.  I do recall that in the first article Jesse documented a 
few
> requirements that I had not seen elsewhere and likely never would 
have
> guessed.
> 
> Flash 9 Button in Flex 2, August 27, 2006
> http://www.jessewarden.com/archives/2006/08/flash_9_button.html
> 
> Integrating a Flash Interface into Flex 2, December 17, 2006
> http://www.jessewarden.com/archives/2006/12/integrating_a_f.html
> 
> If you are still unable to accomplish what you need to after 
reviewing
> Jesse's posts, please post back and I will go into the code and 
see if I can
> provide you a walkthrough.
> 
> Of course, please also post back if you do succeed in getting your 
Flash
> authored AS3 SWFs working in Flex 2.
> 
>  hth,
> 
>  g
> 
> On 3/3/07, Mark <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to load a flash 9 SWF into Flex with some luck.  I can
> > get it in there with SWFLoader but now how can I use something 
from
> > the Flash Library… or can I?
> >
> > I get this error when I run the code below "ReferenceError: Error
> > #1065: Variable Radar is not defined."  But when I "Dismiss All"
> > then click the button in the app it will move the radar movieClip
> > that sits on the Flash Stage.  I'm confused as to what this 
error is.
> >
> > For the library item - If it was being done in Flash, I'd use
> > attachMovie () like:
> >
> > var cPoint:MovieClip = circle.attachMovie(pointer, 'point' +
> > counter, 0 + counter, {_x:centerX + x, _y:centerY + y, 
date:cDate});
> >
> > which would place the item on the stage as many times as I need 
it
> > depending on the number of nodes from my XML.  Is there a way to 
do
> > this in Flex using my loaded SWF?
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute" creationComplete="init(event)">
> > 
> > 
> > 
> > 
> > 
> >
>




[flexcoders] Re: handling both MOUSE_DOWN and MOUSE_CLICK

2007-03-05 Thread Paul DeCoursey
Click isn't going to happen until after mouse up, and if you start a
drag I'd think that would supress any click events.  I'm thinking you
will just want to do the select on the mouse down.  Then trigger the
drag on mouse_move if no mouse_up or Mouse_click has occurred.
--- In flexcoders@yahoogroups.com, "Engkee Kwang" <[EMAIL PROTECTED]> wrote:
>
> what is the trick to listen for and handle both MOUSE_CLICK (say to 
> select) and MOUSE_DOWN (to start dragging)?
> 
> I have a Label on a canvas. First I added a listener on MOUSE_CLICK and 
> that works. My handler gets called and I can "select" the item.
> 
> Then to support D&D, I added another listener on MOUSE_DOWN. When I do 
> that, I get call on mouse-down and I can then initiate the drag. 
> Unfortunately, I no longer get called on click.
> 
> Presumably, rather than listening for MOUSE_DOWN, what I really need to 
> do is listen for the mouse-down but without any mouse-up for some 
> interval... so as to distinguish it from a click. Is there such an 
> event?
> 
> -Engkee
>




RE: [flexcoders] Special characters after end tag of XML document (HTTPService issue)

2007-03-05 Thread Peter Farland
If you're not using the proxy, then HTTPService is ultimately using 
flash.net.URLLoader to load and receive the data. You could try to take Flex 
out of the equation for a second and try the raw URLLoader API to see if it 
still occurs there.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian 
Dunphy
Sent: Monday, March 05, 2007 3:29 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Special characters after end tag of XML document 
(HTTPService issue)



Peter,

I have not made any changes to the XML.ignoreWhitespace property.

I have implemented the trim as suggested, and I have also put a check
to see if the last character of the string is a > (a quick way to see
if there's trailing junk characters).

What I'm experiencing now is the same issue as before, however now I
can see the trailing characters traced in my flashlog. Just as a
sample, `á!àê!àî!`á! ï! appears at the end of one of them.

I have noted that we are experiencing this with more than one servlet
at this point, it appears that all of the servlets in our application
might be affected.

Any other thoughts/suggestions?

Thanks again,

Brian

On 3/5/07, Peter Farland <[EMAIL PROTECTED]  > 
wrote:
>
>
>
>
>
>
>
> Perhaps your special characters trailing the document are whitespace (tabs,
> new lines, etc)?
>
> There are known issues with constructing an XML instance (the basis for E4X)
> from Strings containing whitespace between processing instructions and the
> start of the root element (or trailing whitespace after the root element)
> and with XML.ignoreWhitespace set to false.
>
> Have you by any chance set XML.ignoreWhitespace to false?
>
> If so, for your particular scenario of trailing special characters you could
> keep HTTPService's resultFormat as "text" to get it as a raw String, then
> use mx.utils.StringUtil.trim() on the String, and then construct a new XML
> instance from your String new XML(result).
>
>
> 
> From: flexcoders@yahoogroups.com   
> [mailto:flexcoders@yahoogroups.com  ] On
> Behalf Of klumikaze
> Sent: Monday, March 05, 2007 2:40 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Special characters after end tag of XML document
> (HTTPService issue)
>
>
>
>
>
> I've got an E4X HTTPService in Flex that is calling a servlet which returns
> an XML
> document. Approximately 80% of the time, the servlet works fine and the
> HTTPService
> result is a valid XML doc -- the rest of the time, the HTTPService is giving
> me a fault:
>
> [RPC Fault faultString="Error #1088: The markup in the document following
> the root
> element must be well-formed." faultCode="Client.CouldNotDecode"
> faultDetail="null"]
>
> After taking a look at the servlet directly in the browser (removing Flex
> from the equation),
> I have not noticed any issue with the XML returned and we have run it
> through several
> online validation tools. The servlet code that generated the XML is fine as
> well, we have
> checked that numerous times.
>
> I thought that the problem might be the resultFormat of the HTTPService
> (currently E4X),
> so I changed it to 'text' so I could see if there was any special characters
> or issues with the
> XML after Flex called the servlet. I discovered that there are seemingly
> random special
> characters being appended to the end of the document (after the end tag).
> The string of
> random special characters ranges from 2-10 in length.
>
> Note: I have since put the resultFormat of the HTTPService back to e4x.
>
> Does anybody have any idea why this might be happening? We have observed
> this on
> Windows, OS X and Ubuntu Linux platforms, in IE7, Safari, Firefox (Mac) and
> Firefox
> (Ubuntu).
>
> Thanks for your help,
>
> Brian
>
>
>
> 

-- 
Brian Dunphy


 


[flexcoders] Flex Player 9's (Flex 2) Memory Usage - What's Normal?

2007-03-05 Thread jeofmoyster
So I'm developing what will be a good-sized application, but I'll be
carefully planning for download speed and runtime efficiency through
ModuleLoader, SWFLoader, etc. 

Right now I've barely begun but have finished the ground level for the
Data Retrieval, Normalization and Management (no FDS). The memory
monitor object shows about 40 megabytes of memory being used when the
data comes in, and drops to 24 MB if I leave the app still for a a
couple minutes afterward (I assume that's garbage collection kicking
after the data normalization). 

Flex is one my first forays into needing to worry about things like
memory management, so I'm looking for best practice and a baseline of
what's expected and acceptable. 

1) What's "average" memory load for a Flex application? When do I
start freaking out about using too much memory? 

2) How do I optimize memory management during run time? What's the
best way to encourage good garbage collection? 

Ideally this app will cache the data it receives over the course of
its runtime so switching back to older sets is faster than reloading
it from the server, but if this seriously chokes memory, I need to
come up with a new strategy.

Any help is appreciated!




[flexcoders] Re: I want to write a tutorial

2007-03-05 Thread danneri21
Wow guys thanks for all the awesome suggestions!

Most of the stuff is a bit over my head, but I will gladly look into it!

Thanks a TON!

--- In flexcoders@yahoogroups.com, "danneri21" <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
> 
> I want to write another tutorial on Flex.
> 
> So far I've written on how to create a login system with flex and php,
> and an mp3 player in flex.
> 
> Any suggestions on what I should do next?
> 
> I'm fresh out of ideas :p
>




Re: [flexcoders] Special characters after end tag of XML document (HTTPService issue)

2007-03-05 Thread Brian Dunphy
Peter,

I have not made any changes to the XML.ignoreWhitespace property.

I have implemented the trim as suggested, and I have also put a check
to see if the last character of the string is a > (a quick way to see
if there's trailing junk characters).

What I'm experiencing now is the same issue as before, however now I
can see the trailing characters traced in my flashlog. Just as a
sample, `á!àê!àî!`á! ï! appears at the end of one of them.

I have noted that we are experiencing this with more than one servlet
at this point, it appears that all of the servlets in our application
might be affected.

Any other thoughts/suggestions?

Thanks again,

Brian


On 3/5/07, Peter Farland <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> Perhaps your special characters trailing the document are whitespace (tabs,
> new lines, etc)?
>
> There are known issues with constructing an XML instance (the basis for E4X)
> from Strings containing whitespace between processing instructions and the
> start of the root element (or trailing whitespace after the root element)
> and with XML.ignoreWhitespace set to false.
>
> Have you by any chance set XML.ignoreWhitespace to false?
>
> If so, for your particular scenario of trailing special characters you could
> keep HTTPService's resultFormat as "text" to get it as a raw String, then
> use mx.utils.StringUtil.trim() on the String, and then construct a new XML
> instance from your String new XML(result).
>
>
>  
>  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of klumikaze
> Sent: Monday, March 05, 2007 2:40 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Special characters after end tag of XML document
> (HTTPService issue)
>
>
>
>
>
> I've got an E4X HTTPService in Flex that is calling a servlet which returns
> an XML
> document. Approximately 80% of the time, the servlet works fine and the
> HTTPService
> result is a valid XML doc -- the rest of the time, the HTTPService is giving
> me a fault:
>
> [RPC Fault faultString="Error #1088: The markup in the document following
> the root
> element must be well-formed." faultCode="Client.CouldNotDecode"
> faultDetail="null"]
>
> After taking a look at the servlet directly in the browser (removing Flex
> from the equation),
> I have not noticed any issue with the XML returned and we have run it
> through several
> online validation tools. The servlet code that generated the XML is fine as
> well, we have
> checked that numerous times.
>
> I thought that the problem might be the resultFormat of the HTTPService
> (currently E4X),
> so I changed it to 'text' so I could see if there was any special characters
> or issues with the
> XML after Flex called the servlet. I discovered that there are seemingly
> random special
> characters being appended to the end of the document (after the end tag).
> The string of
> random special characters ranges from 2-10 in length.
>
> Note: I have since put the resultFormat of the HTTPService back to e4x.
>
> Does anybody have any idea why this might be happening? We have observed
> this on
> Windows, OS X and Ubuntu Linux platforms, in IE7, Safari, Firefox (Mac) and
> Firefox
> (Ubuntu).
>
> Thanks for your help,
>
> Brian
>
>
>
>  


-- 
Brian Dunphy


[flexcoders] httpservice; ie and 2032 error

2007-03-05 Thread dantmcgowan
Hi,
  I am getting a 2032 (stream error )what I first hit my httpservice
using internet explorer. This does not happen with firefox. In either
case I am getting a success response back from the service (status =
200). When I clear the cache on ie, I do not get the error. Only on
the first access. Here is my service:



{someServiceAction}
{deviceIndex}



I am executing via someService.send() which is executed in a method
that is invoked on a module preinitialize. Thanks,

Dan



[flexcoders] handling both MOUSE_DOWN and MOUSE_CLICK

2007-03-05 Thread Engkee Kwang
what is the trick to listen for and handle both MOUSE_CLICK (say to 
select) and MOUSE_DOWN (to start dragging)?

I have a Label on a canvas. First I added a listener on MOUSE_CLICK and 
that works. My handler gets called and I can "select" the item.

Then to support D&D, I added another listener on MOUSE_DOWN. When I do 
that, I get call on mouse-down and I can then initiate the drag. 
Unfortunately, I no longer get called on click.

Presumably, rather than listening for MOUSE_DOWN, what I really need to 
do is listen for the mouse-down but without any mouse-up for some 
interval... so as to distinguish it from a click. Is there such an 
event?

-Engkee




RE: [flexcoders] Special characters after end tag of XML document (HTTPService issue)

2007-03-05 Thread Peter Farland
Perhaps your special characters trailing the document are whitespace
(tabs, new lines, etc)?
 
There are known issues with constructing an XML instance (the basis for
E4X) from Strings containing whitespace between processing instructions
and the start of the root element (or trailing whitespace after the root
element) and with XML.ignoreWhitespace set to false.
 
Have you by any chance set XML.ignoreWhitespace to false?
 
If so, for your particular scenario of trailing special characters you
could keep HTTPService's resultFormat as "text" to get it as a raw
String, then use mx.utils.StringUtil.trim() on the String, and then
construct a new XML instance from your String new XML(result).
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of klumikaze
Sent: Monday, March 05, 2007 2:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Special characters after end tag of XML document
(HTTPService issue)



I've got an E4X HTTPService in Flex that is calling a servlet which
returns an XML 
document. Approximately 80% of the time, the servlet works fine and the
HTTPService 
result is a valid XML doc -- the rest of the time, the HTTPService is
giving me a fault:

[RPC Fault faultString="Error #1088: The markup in the document
following the root 
element must be well-formed." faultCode="Client.CouldNotDecode"
faultDetail="null"]

After taking a look at the servlet directly in the browser (removing
Flex from the equation), 
I have not noticed any issue with the XML returned and we have run it
through several 
online validation tools. The servlet code that generated the XML is fine
as well, we have 
checked that numerous times.

I thought that the problem might be the resultFormat of the HTTPService
(currently E4X), 
so I changed it to 'text' so I could see if there was any special
characters or issues with the 
XML after Flex called the servlet. I discovered that there are seemingly
random special 
characters being appended to the end of the document (after the end
tag). The string of 
random special characters ranges from 2-10 in length.

Note: I have since put the resultFormat of the HTTPService back to e4x.

Does anybody have any idea why this might be happening? We have observed
this on 
Windows, OS X and Ubuntu Linux platforms, in IE7, Safari, Firefox (Mac)
and Firefox 
(Ubuntu).

Thanks for your help,

Brian



 


RE: [flexcoders] Flex embedding SWF file and using it like a component

2007-03-05 Thread Roger Gonzalez
You should use the 2.0.1 Modules feature for this, its pretty much
exactly what you want.
 
In any case, whenever you do make a reference to objects within
dynamically loaded code, you should design some interfaces for
communication so that you're not making hard type references to
implementation classes.  There are many design patterns that can provide
a useful scheme design base (the 2.0.1 Modules feature uses the
"factory" pattern to good effect here.)
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of jack_freud
Sent: Monday, March 05, 2007 10:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex embedding SWF file and using it like
a component



I'm planning a rather large application that has several
sub-modules
that I thought should be loaded individually as separate swf's
to
decrease load time and memory requirements since the sub-modules
would
never need to be loaded at the same time.

I'm having trouble finding any articles on how to access the swf
from
the swfloader once it's loaded.

I found one blog from Peter Ent:

http://weblogs.macromedia.com/pent/archives/2004/12/accessing_swfs.cfm



but the sample files are not there any more, and it's from 2004
so I'm
not sure if it would work with Flex 2 either...

I'm trying to access the content of the loaded swf throught the
swfloader's content property, but it's not finding the objects
within
the swf because it hasn't been loaded yet, and so the outer mxml
will
not compile without errors.

Does anyone have any sample code that does this, or have a
suggestion
as to whether this is a good design idea or not - I'm afraid of
loading a Flex app with hundreds of screens and having it take
forever
to load.

Thanks!



 



Re: [flexcoders] Re: Problems with "The E4X approach to XML processing"

2007-03-05 Thread slangeberg

I think in the docs, these should be returning XMLList, technically. Not
sure if it evals to XML in typeof().

-Scott

On 3/5/07, greg h <[EMAIL PROTECTED]> wrote:


  Hi Allen,

Glad to be of help.

btw ... you wrote:
it seems like that the return type is ArrayCollection or XMLList(I'm not
sure)

I did some tests using the ActionScript typeOf() operator and all values
returned from the E4x operators are showing as typeOf XML.

For example, I popped the following into the MXML from my last post:



I did a few more statements than just the one above, and regardless of the
nodeKind(), typeOf() consistently returned XML.

Best regards,

g

 





--

: : ) Scott


[flexcoders] Special characters after end tag of XML document (HTTPService issue)

2007-03-05 Thread klumikaze
I've got an E4X HTTPService in Flex that is calling a servlet which returns an 
XML 
document. Approximately 80% of the time, the servlet works fine and the 
HTTPService 
result is a valid XML doc -- the rest of the time, the HTTPService is giving me 
a fault:

[RPC Fault faultString="Error #1088: The markup in the document following the 
root 
element must be well-formed." faultCode="Client.CouldNotDecode" 
faultDetail="null"]

After taking a look at the servlet directly in the browser (removing Flex from 
the equation), 
I have not noticed any issue with the XML returned and we have run it through 
several 
online validation tools. The servlet code that generated the XML is fine as 
well, we have 
checked that numerous times.

I thought that the problem might be the resultFormat of the HTTPService 
(currently E4X), 
so I changed it to 'text' so I could see if there was any special characters or 
issues with the 
XML after Flex called the servlet. I discovered that there are seemingly random 
special 
characters being appended to the end of the document (after the end tag). The 
string of 
random special characters ranges from 2-10 in length.

Note: I have since put the resultFormat of the HTTPService back to e4x.

Does anybody have any idea why this might be happening? We have observed this 
on 
Windows, OS X and Ubuntu Linux platforms, in IE7, Safari, Firefox (Mac) and 
Firefox 
(Ubuntu).

Thanks for your help,

Brian





[flexcoders] Re: FileReference.upload, URLVariables,uploadDataFieldName not working as expect

2007-03-05 Thread w4kpm
Hmm, I started out with flash 9.0 r31 which should be the latest, not
sure how I downloaded this other one. In any event, both players have
the same problem on linux.

--- In flexcoders@yahoogroups.com, "w4kpm" <[EMAIL PROTECTED]> wrote:
>
> Found the problem.
> 
> It appears that the upload code works differently on a linux player.
> The exact same code works as advertised on windows/mac players.
> 
> I tried getting an update from Adobe, and got the latest player for
> linux (FP9_plugin_beta_112006.tar.gz or Shockwave Flash 9.0 d78) and
> it did not fix.
> 
> ;-(
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "w4kpm"  wrote:
> >
> > Ben,
> > 
> > My server side is simply a django procedure that dumps the post call
> > giving the output that I listed in the last post.
> > 
> > 
> > def importCsvFile(request):
> > 
> > print "made it in"
> > 
> > print request.raw_post_data
> > 
> > 
> > I *know* that I can re-name it on my end, but it really bugs me when I
> > do what the docs say and it doesn't do what is expected., I followed
> > the docs, and it's not working, so I'm trying to figure out what is
> wrong.
> > 
> > If I figure out what it is, I'll post back here, just thinking someone
> > else had run across this before.
> > 
> > 
> > The main issue that I need to solve is that I need to send other
> > variables back with the file in the post. That doesn't appear to be
> > happening.
> > 
> > Thanks,
> > 
> > Kelly
> > 
> > --- In flexcoders@yahoogroups.com, Ben Marchbanks  wrote:
> > >
> > > What server-side does your server-side script / 
> > > code look like. Most likely this is where the 
> > > problem lies.
> > > 
> > > BTW:You can always rename your upload on the 
> > > server side which is very easy and reliable.
> > > 
> > > -- 
> > > Ben Marchbanks
> > > 
> > > ::: alQemy ::: transforming information into 
> > > intelligence
> > > http://www.alQemy.com
> > > 
> > > ::: magazooms ::: digital magazines
> > > http://www.magazooms.com
> > > 
> > > Greenville, SC
> > > 864.284.9918
> > >
> >
>




Re: [flexcoders] an as3 zip library

2007-03-05 Thread Bruce Hopkins

Very cool,

I can't wait to try it out.

Bruce

On 05 Mar 2007 05:56:22 -0800, Ian Thomas <[EMAIL PROTECTED]> wrote:


  Brilliant - thanks David.

Ian

On 3/5/07, David Chang <[EMAIL PROTECTED] > wrote:
> Hello,
>
> I had put together a small library for handling zip files and thought
> I'd share it. Anyways if you're interested, you can find more info at
> http://nochump.com/blog/?p=15
>
> David
 



[flexcoders] Re: FileReference.upload, URLVariables,uploadDataFieldName not working as expect

2007-03-05 Thread w4kpm
Found the problem.

It appears that the upload code works differently on a linux player.
The exact same code works as advertised on windows/mac players.

I tried getting an update from Adobe, and got the latest player for
linux (FP9_plugin_beta_112006.tar.gz or Shockwave Flash 9.0 d78) and
it did not fix.

;-(



--- In flexcoders@yahoogroups.com, "w4kpm" <[EMAIL PROTECTED]> wrote:
>
> Ben,
> 
> My server side is simply a django procedure that dumps the post call
> giving the output that I listed in the last post.
> 
> 
> def importCsvFile(request):
> 
> print "made it in"
> 
> print request.raw_post_data
> 
> 
> I *know* that I can re-name it on my end, but it really bugs me when I
> do what the docs say and it doesn't do what is expected., I followed
> the docs, and it's not working, so I'm trying to figure out what is
wrong.
> 
> If I figure out what it is, I'll post back here, just thinking someone
> else had run across this before.
> 
> 
> The main issue that I need to solve is that I need to send other
> variables back with the file in the post. That doesn't appear to be
> happening.
> 
> Thanks,
> 
> Kelly
> 
> --- In flexcoders@yahoogroups.com, Ben Marchbanks  wrote:
> >
> > What server-side does your server-side script / 
> > code look like. Most likely this is where the 
> > problem lies.
> > 
> > BTW:You can always rename your upload on the 
> > server side which is very easy and reliable.
> > 
> > -- 
> > Ben Marchbanks
> > 
> > ::: alQemy ::: transforming information into 
> > intelligence
> > http://www.alQemy.com
> > 
> > ::: magazooms ::: digital magazines
> > http://www.magazooms.com
> > 
> > Greenville, SC
> > 864.284.9918
> >
>




Re: [flexcoders] flex bluetooth.

2007-03-05 Thread Chris Allen
Jim's right. This is way beyond the scope of Flex by itself.

I feel like a broken record because I keep suggesting Red5
(http://osflash.org/red5) on this list, but in this case (like many
others) It could be just what you need. It in this scenario Red5 would
be used as a sort of proxy to do the Bluetooth communication.

There are some Java libraries for bluetooth that you could hook up and
use with Red5. Or you could use JNI to do the communication to a C++
application. Then you could have calls from Flex/Flash sent either
through RTMP or remoting then get broadcasted to your Bluetooth device
via this Java API.

There's also a book on the subject of using Bluetooth with Java:
http://www.amazon.com/Bluetooth-Java-Bruce-Hopkins/dp/1590590783

I certainly think that it would be a pretty cool and novel way of
using these technologies. I would love to hear more about it if you
have some success getting this to work.

I hope this helps and good luck.

-Chris

On 3/2/07, Jim Cheng <[EMAIL PROTECTED]> wrote:
> Tom Chiverton wrote:
>
> > Does the bluetooth keyboard work without Flex, i.e. with Notepad ?
> > If not, it's not Flex's fault, and we can't help.
>
> If it's something that's not handled natively by Windows (for instance,
> Bluetooth keyboard or mouse), getting it to work with Flex is probably
> beyond the scope of this list.
>
> Gunadi's best bet at that point would be to access the appropriate
> driver for the device using an adapter program and exposing the API to
> it for Flex to use via a socket or ActiveX control.  If an ActiveX
> control already exists for accessing the particular Bluetooth device, a
> third party extender like Zinc or SWF Studio might be able to do the
> trick via direct API calls.
>
> Unfortunately, such solutions are more hackish than not and are unlikely
> to work well outside of IE (with additional trusted ActiveX controls) or
> a third party wrapper to the SWF.
>
> Jim Cheng
> effectiveUI
>
>
>
> --
> 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
>
>
>
>


Re: [flexcoders] Right-Click -> View Source

2007-03-05 Thread Muzak

- Original Message - 
From: "André Rodrigues Pena" <[EMAIL PROTECTED]>
To: 
Sent: Monday, March 05, 2007 7:16 PM
Subject: [flexcoders] Right-Click -> View Source


>Hi all,
>Some applications like this:
>http://www.brucephillips.name/flex/tilelistuserQty/bin/TileListUserQty.html

>Allow you to view the source by Right-Click -> View Source. As I saw
>this trick in several applications I guess it is a flex native
>support.. isnt it? How do I do it?

By reading the docs ;-)
http://livedocs.macromedia.com/flex/201/html/build_044_13.html





--
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: Managing Multiple Modules

2007-03-05 Thread Roger Gonzalez
The module manager knows what modules have been loaded, but it doesn't
provide an iterator.
 
If you know the URLs, you can check a given module's load status.  It is
harmless (other than creating some cached state) to probe a given URL
before you call "load".
 
Removing the tab (and ensuring that you have no other references to the
child control) will only cause instance data to be GC'ed, not the
underlying bytecode.
 
The module's code will never get fully recycled unless you call
"unload", because there is a ModuleInfo reference handing onto its
internal module class factory (in case there is a subsequent need to
reuse it).
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of aaronvm707
Sent: Monday, March 05, 2007 10:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Managing Multiple Modules



Roger, thank you for your quick response.

Does the module factory hold information (module ID, URL etc...)

about the modules I have loaded?

How important is it to unload modules? If I remove a specific
tab 
from the navigator will GC eventually clean up the child module
on 
that tab?

Aaron

--- In flexcoders@yahoogroups.com
 , "Roger Gonzalez" <[EMAIL PROTECTED]> 
wrote:
>
> The URL for a given module is a unique key for the module at
that 
URL,
> no matter how many times you get it. Each time you get a 
ModuleInfo,
> you can use it to request an unload. (Note that unload just
makes
> things available for GC, it does not force things to unload.)
> 
> There's no reason why you need to always put the module info
into a
> single variable though, of course its going to get overridden.
You
> could always keep an array of module infos. Or, you can just
call
> getModule again. No big deal.
> 
> -rg
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com
 
> [mailto:flexcoders@yahoogroups.com
 ] On Behalf Of aaronvm707
> Sent: Sunday, March 04, 2007 10:13 PM
> To: flexcoders@yahoogroups.com
 
> Subject: [flexcoders] Managing Multiple Modules
> 
> 
> 
> Hello, I am trying to create an application that has a tab
> navigator 
> that gets loaded with different modules, similar to a browser
> window 
> opening multiple tabs. I have tried different methods but do 
not
> know 
> how to get a reference to a module to unload it once multiple
> modules 
> have been loaded. This is the code I am using to load the
> modules:
> 
> public var info:IModuleInfo;
> 
> private function LoadModule(strUrl:String):void
> {
> info = ModuleManager.getModule(strUrl);
> 
> info.addEventListener(ModuleEvent.READY, modEventHandler);
> info.load();
> }
> private function modEventHandler(e:ModuleEvent):void 
> {
> var m:Module = info.factory.create() as Module;
> myTabs.addChild(m);
> }
> 
> This code works very well to load as many modules as I need. 
The
> 
> problem is the public var info gets updated as each new module
> get 
> loaded. So I do I get an IModuleInfo object for a module that
> has 
> already been loaded that I can then call the unload() method.
> Please 
> any help or suggestions would be greatly appreciated. Thanks
> 
> Aaron
>



 



[flexcoders] no cookie?

2007-03-05 Thread Stormcrow

I can't seem to figure this one out. I'm embedding a strike out font for a
text editing application. I can imbed it and use it throughout the
application except within textarea fields (or any field that reads the font
face from a  Tag.) Has anyone had this problem before? I've searched
for hours...

Thanks in advance for any help!
-S
-- 
View this message in context: 
http://www.nabble.com/%3CFONT-FACE%3Dembedded-font%3E-no-cookie--tf3344974.html#a9302900
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Can I use Flash Library items in Flex, if so, how?

2007-03-05 Thread Mark
Thank you for the URLs.  I'll see what I can or can't do then post 
back with an update.

Thanks again!

Mark



--- In flexcoders@yahoogroups.com, "greg h" <[EMAIL PROTECTED]> wrote:
>
> Mark,
> 
> I have had success making calls to my AS3 SWFs  compiled in Flash
> using the Flash
> Professional 9 ActionScript 3.0
> Preview
> .
> 
> The "Flash Professional 9 ActionScript 3.0 Preview" has been 
public for over
> 8 months.  I say shame on Adobe for publishing nothing on how to 
integrate
> Flash authored AS3 SWFs into Flex 2 apps.  Nothing.
> 
> But huge thanks to Jesse Warden.  If you have not already, please 
review the
> following 2 posts by Jesse on the topic.  Note:  the first link 
includes
> downloadable code.  It has been a few weeks since I was in either 
Jesse or
> my code.  I do recall that in the first article Jesse documented a 
few
> requirements that I had not seen elsewhere and likely never would 
have
> guessed.
> 
> Flash 9 Button in Flex 2, August 27, 2006
> http://www.jessewarden.com/archives/2006/08/flash_9_button.html
> 
> Integrating a Flash Interface into Flex 2, December 17, 2006
> http://www.jessewarden.com/archives/2006/12/integrating_a_f.html
> 
> If you are still unable to accomplish what you need to after 
reviewing
> Jesse's posts, please post back and I will go into the code and 
see if I can
> provide you a walkthrough.
> 
> Of course, please also post back if you do succeed in getting your 
Flash
> authored AS3 SWFs working in Flex 2.
> 
>  hth,
> 
>  g
> 
> On 3/3/07, Mark <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to load a flash 9 SWF into Flex with some luck.  I can
> > get it in there with SWFLoader but now how can I use something 
from
> > the Flash Library… or can I?
> >
> > I get this error when I run the code below "ReferenceError: Error
> > #1065: Variable Radar is not defined."  But when I "Dismiss All"
> > then click the button in the app it will move the radar movieClip
> > that sits on the Flash Stage.  I'm confused as to what this 
error is.
> >
> > For the library item - If it was being done in Flash, I'd use
> > attachMovie () like:
> >
> > var cPoint:MovieClip = circle.attachMovie(pointer, 'point' +
> > counter, 0 + counter, {_x:centerX + x, _y:centerY + y, 
date:cDate});
> >
> > which would place the item on the stage as many times as I need 
it
> > depending on the number of nodes from my XML.  Is there a way to 
do
> > this in Flex using my loaded SWF?
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute" creationComplete="init(event)">
> > 
> > 
> > 
> > 
> > 
> >
>




[flexcoders] Re: Managing Multiple Modules

2007-03-05 Thread aaronvm707
Roger, thank you for your quick response.

Does the module factory hold information (module ID, URL etc...) 
about the modules I have loaded?

How important is it to unload modules? If I remove a specific tab 
from the navigator will GC eventually clean up the child module on 
that tab?

Aaron

--- In flexcoders@yahoogroups.com, "Roger Gonzalez" <[EMAIL PROTECTED]> 
wrote:
>
> The URL for a given module is a unique key for the module at that 
URL,
> no matter how many times you get it.  Each time you get a 
ModuleInfo,
> you can use it to request an unload.  (Note that unload just makes
> things available for GC, it does not force things to unload.)
>  
> There's no reason why you need to always put the module info into a
> single variable though, of course its going to get overridden.  You
> could always keep an array of module infos.  Or, you can just call
> getModule again.  No big deal.
>  
> -rg
> 
> 
> 
> 
>   From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of aaronvm707
>   Sent: Sunday, March 04, 2007 10:13 PM
>   To: flexcoders@yahoogroups.com
>   Subject: [flexcoders] Managing Multiple Modules
>   
>   
> 
>   Hello, I am trying to create an application that has a tab
> navigator 
>   that gets loaded with different modules, similar to a browser
> window 
>   opening multiple tabs. I have tried different methods but do 
not
> know 
>   how to get a reference to a module to unload it once multiple
> modules 
>   have been loaded. This is the code I am using to load the
> modules:
>   
>   public var info:IModuleInfo;
>   
>   private function LoadModule(strUrl:String):void
>   {
>   info = ModuleManager.getModule(strUrl);
>   
>   info.addEventListener(ModuleEvent.READY, modEventHandler);
>   info.load();
>   }
>   private function modEventHandler(e:ModuleEvent):void 
>   {
>   var m:Module = info.factory.create() as Module;
>   myTabs.addChild(m);
>   }
>   
>   This code works very well to load as many modules as I need. 
The
> 
>   problem is the public var info gets updated as each new module
> get 
>   loaded. So I do I get an IModuleInfo object for a module that
> has 
>   already been loaded that I can then call the unload() method.
> Please 
>   any help or suggestions would be greatly appreciated. Thanks
>   
>   Aaron
>




[flexcoders] Right-Click -> View Source

2007-03-05 Thread André Rodrigues Pena
Hi all,
Some applications like this:
http://www.brucephillips.name/flex/tilelistuserQty/bin/TileListUserQty.html

Allow you to view the source by Right-Click -> View Source. As I saw
this trick in several applications I guess it is a flex native
support.. isnt it? How do I do it?

Thanks

-- 
André Rodrigues Pena

LOCUS
www.locus.com.br

Blog
www.techbreak.org


[flexcoders] Flex embedding SWF file and using it like a component

2007-03-05 Thread jack_freud
I'm planning a rather large application that has several sub-modules
that I thought should be loaded individually as separate swf's to
decrease load time and memory requirements since the sub-modules would
never need to be loaded at the same time.

I'm having trouble finding any articles on how to access the swf from
the swfloader once it's loaded.

I found one blog from Peter Ent:
http://weblogs.macromedia.com/pent/archives/2004/12/accessing_swfs.cfm

but the sample files are not there any more, and it's from 2004 so I'm
not sure if it would work with Flex 2 either...

I'm trying to access the content of the loaded swf throught the
swfloader's content property, but it's not finding the objects within
the swf because it hasn't been loaded yet, and so the outer mxml will
not compile without errors.

Does anyone have any sample code that does this, or have a suggestion
as to whether this is a good design idea or not - I'm afraid of
loading a Flex app with hundreds of screens and having it take forever
to load.

Thanks!



RE: [flexcoders] Re: Populate ComboBox from database - NOT using Flex Data Services

2007-03-05 Thread Piotrowski, John
Are you sure the data is coming back from the remote object properly and
it is in the right format?  I would try to set a breakpoint private
function getJobResult(event:Object):void and then look at the event
object in the debugger.  

 

Also try replacing the getJobResult with

 

private function getJobResult(event:Object):void{
jobs = event.result["RESULTS"] as ArrayCollection;
}



 

and move the Bindable jobs... to the top right after the import
statements.

 

You have a databinding to the variable jobs and this is bound to the
comboBox, so the result of the remoteobject should update this bound
jobs variable and then it will update the combobox automatically.

 

John

 

** 

 John R. Piotrowski 

 Programmer Analyst 

 Wharton Computing 

 Email: [EMAIL PROTECTED]

**

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of April
Sent: Monday, March 05, 2007 10:20 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Populate ComboBox from database - NOT using
Flex Data Services

 

Thank you for everyone's responses, but I'm still not having any luck.
I'm not getting any 
errors - but my combobox is not populating. Again, I'm really new to
Flex.

My app is called PreTraffic with the following structure:

PreTraffic
cfc (folder)
job.cfc
JobSearch.cfc

**

job.cfc contatins:









SELECT job_id, job_title
FROM job
WHERE status = 'O'
ORDER BY job_title


SELECT job_title AS label, job_id AS data
FROM job
ORDER BY label


 


**

JobSearch.mxml contains:


http://www.adobe.com/2006/mxml
 " 
xmlns="*"
layout="absolute" 
backgroundGradientColors="[#ff, #d0d0d0]"
creationComplete="InitApp()">









 
















 



[flexcoders] Re: Top and Bottom padding on DataGrid

2007-03-05 Thread Matt Maher

Never did, sorry. I posted several messages here and no one replied, 
which leads me to believe that it's not doable without extending (a 
la understanding) the grid rows themselves.

Sorry. Please let me know if you get anywhere on it. I sure as heck 
wish I could do something about it.

-M@


--- In flexcoders@yahoogroups.com, "Douglas Knudsen" 
<[EMAIL PROTECTED]> wrote:
>
> ever have any luck with this?
> 
> DK
> 
> On 1/22/07, Matt Maher <[EMAIL PROTECTED]> wrote:
> >
> > Is there a simple way to change the forced padding on the top and 
bottom
> > of datagrid rows?
> >
> > If I make font-size="6" I would expect the row to shrink to a 
tiny size,
> > but there seems to be a forced top and bottom margin that keeps 
the row
> > at a certain height.
> >
> >
> >
> > ItemRenderers are possible, but that means trouble with as much 
data as
> > I am displaying.
> >
> > Any css'ers or skinners out there know how to do this?
> >
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> 
> 
> -- 
> Douglas Knudsen
> http://www.cubicleman.com
> this is my signature, like it?
>




[flexcoders] Re: printJob on a textArea

2007-03-05 Thread scott_flex

Try removing the height from your text area object and just let flex 
determine the height automatically... ie, it doesn't have scroll bars 
itself.  Then print it, you should get it all.

You'll probably also want to set the width manually when you print it 
to the width of the print object...  Flex prints at 72 dpi... so 8.5 X 
11 paper is 612 pixels wide, assuming you are not counting for any 
margins.

It appears flex will just print exactly what's on screen, scroll bars 
and all and it's not intelligent for printing text.  So in my case, i 
transform the objects and put them in a better printing state before I 
send them tothe printer... because the format for printing is not 
always desired for how it shows on screen.

I wish flex had better printing utilities for page breaks and making it 
easier to put more than one display object on a single page... but then 
again, you have a lot more control than trying to generate a html and 
print a web page... IF you want complete control over how things are 
printed.


--- In flexcoders@yahoogroups.com, Jeremy Tooley <[EMAIL PROTECTED]> wrote:
>
> When I go to print my text area in flex. The Text area gets clipped 
by 
> what is shown and the rest does not print. The styles and everything 
> come out great, I just cant print the data that is not shown.
> 
> Any Ideas
> 
> Jeremy Tooley
>




[flexcoders] Re: FileReference.upload, URLVariables,uploadDataFieldName not working as expect

2007-03-05 Thread w4kpm
Ben,

My server side is simply a django procedure that dumps the post call
giving the output that I listed in the last post.


def importCsvFile(request):

print "made it in"

print request.raw_post_data


I *know* that I can re-name it on my end, but it really bugs me when I
do what the docs say and it doesn't do what is expected., I followed
the docs, and it's not working, so I'm trying to figure out what is wrong.

If I figure out what it is, I'll post back here, just thinking someone
else had run across this before.


The main issue that I need to solve is that I need to send other
variables back with the file in the post. That doesn't appear to be
happening.

Thanks,

Kelly

--- In flexcoders@yahoogroups.com, Ben Marchbanks <[EMAIL PROTECTED]> wrote:
>
> What server-side does your server-side script / 
> code look like. Most likely this is where the 
> problem lies.
> 
> BTW:You can always rename your upload on the 
> server side which is very easy and reliable.
> 
> -- 
> Ben Marchbanks
> 
> ::: alQemy ::: transforming information into 
> intelligence
> http://www.alQemy.com
> 
> ::: magazooms ::: digital magazines
> http://www.magazooms.com
> 
> Greenville, SC
> 864.284.9918
>




RE: [flexcoders] Managing Multiple Modules

2007-03-05 Thread Roger Gonzalez
The URL for a given module is a unique key for the module at that URL,
no matter how many times you get it.  Each time you get a ModuleInfo,
you can use it to request an unload.  (Note that unload just makes
things available for GC, it does not force things to unload.)
 
There's no reason why you need to always put the module info into a
single variable though, of course its going to get overridden.  You
could always keep an array of module infos.  Or, you can just call
getModule again.  No big deal.
 
-rg




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of aaronvm707
Sent: Sunday, March 04, 2007 10:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Managing Multiple Modules



Hello, I am trying to create an application that has a tab
navigator 
that gets loaded with different modules, similar to a browser
window 
opening multiple tabs. I have tried different methods but do not
know 
how to get a reference to a module to unload it once multiple
modules 
have been loaded. This is the code I am using to load the
modules:

public var info:IModuleInfo;

private function LoadModule(strUrl:String):void
{
info = ModuleManager.getModule(strUrl);

info.addEventListener(ModuleEvent.READY, modEventHandler);
info.load();
}
private function modEventHandler(e:ModuleEvent):void 
{
var m:Module = info.factory.create() as Module;
myTabs.addChild(m);
}

This code works very well to load as many modules as I need. The

problem is the public var info gets updated as each new module
get 
loaded. So I do I get an IModuleInfo object for a module that
has 
already been loaded that I can then call the unload() method.
Please 
any help or suggestions would be greatly appreciated. Thanks

Aaron 



 



[flexcoders] cairngorm strategy question

2007-03-05 Thread hank williams
I have a class that is basically a sound server. It both generates
events - like "sound #1234 is finished" and receives commands like
"start playing sound #4567".

My problem is that I am not sure where to put this in the cairngorm universe.

If I were to put it in the model, thats kinda wierd since it generates
events, and models dont ususally generate cairngorm events. One
thought I had was not to have it generate events, but to use binding
to get information out of the object, but events really are better
since it may be playing multiple sounds and events allow me to specify
that multiple things are happening. Binding would be less clean
because my binding subscribers would have to bind to an array since
any number of sounds may be in play at one time.

If I were to make the class a view, thats wierd because views dont
generally get modified by cairngorm events.

Of course the third way is just to use standard AS3 events - which is
the way it currently works - but the architecture of commands in
cairngorm is so clean with a class for each command that it makes it
really easy to read the code.  So if I can, I would like to use the
cairngorm command structure for this piece if I can make it work.

Any thoughts greatly appreciated.

Hank


RE: [flexcoders] Need help in dynamically updating datagrid

2007-03-05 Thread Tracy Spratt
So the selected item in the combobox contains the key/filter value for
the php query?

 

In the change event of the combo, invoke send() on the HTTPService,
passing in the key(s).  In a result handler function, assign the
returned data to the dataProvider of the DataGrid and chart..

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of devil_love_99
Sent: Friday, March 02, 2007 12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Need help in dynamically updating datagrid

 

Hi All,

I am developing a flex app, for the first time. I have three main
components. A combo-box, datagrid and a graph. The combobox is
populated using httprequest to a php page which provides data from
mysql database. My problem is I need to populate the datagrid and
update graph depending on the value selected from combo-box but can't
seem to get it working. I have tried states and also went to the
extent of replacing the whole datgrid with another one (visible
property) but still stuck. I can send the code as soon as my
workstation comes up, but if someone has any pointer he/she can spare
me, it will be greatly appriciated.

thanks in advance

 



[flexcoders] Re: How to Copy object with same base class

2007-03-05 Thread JWOpitz
Check into mx.utils.ObjectUtils.getClassInfo(value:Object):Object 


--- In flexcoders@yahoogroups.com, "Dan" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> Does anyone know the way how to copy two objects of differet class say 
> D1 and D2, that derived from the same B1 base class?
> Is that i need to copy all the attribute from B1 one by one in D1 to D2 
> explicity
> 
> The reason i want to do it is because the DTO from the server side is 
> quite different from what a datagrid or other client side component 
> expected, so what i trying to do is to flatten some of the attribute of 
> those DTO first ( a type conversion ). and the B1 is some how some 
> version keeping information which i don't want to touch with.
> 
> Any people has any idea? Thx for any opinion.
> 
> Daniel
>




RE: [flexcoders] Simple form submit example

2007-03-05 Thread Tracy Spratt
A Flex "form" is just a layout container.  There is no built-in "submit"
functionality.  There is no "submit button".

 

You will need to use one of the RPC data services to send your data to
the server.

 

Also be aware that two-way binding is not automatic.  Modifying a form
field does not automatically update the dataProvider.  You will need to
set this up if you want it.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nasawebguy
Sent: Sunday, March 04, 2007 12:19 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Simple form submit example

 

I need basic example code for a simple form submit. 
I'm using a flex form 
and have a ColdFusion CFC to do the insert. 

What I need is what gets the two talking?

I'm not using FDS at this point. Just ColdFusion MX7.02.

I assume I should use a remoteobject, but I don't know how to pass 
the flex form data to it when the user click submit.

What goes in the onclick on the submit button?
What AS do I need to pass the form data to the remoteobject?
What should the remoteobject look like to pass the data to the CFC?

I'm just learning flex, but I'm used to ColdFusion flash forms using 
cfinvoke arguments. I assume it is done using remoteobject instead 
of cfinvoke. But I'm open to the easiest way to do it.

Thanks,
Don

 



RE: [flexcoders] How can I pass variables to mx-code?

2007-03-05 Thread Tracy Spratt
Try:

[Bindable]var myText:String = "I am beginner";

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of edvard.karvinen
Sent: Monday, March 05, 2007 7:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How can I pass variables to mx-code?

 

Hello.

I have very simple problem, which I cannot solve. How can I pass
variables from actionscript 
to mx code. 

For example:
var myText:String = "I am beginner";

...


Re: [flexcoders] Re: Problems with "The E4X approach to XML processing"

2007-03-05 Thread greg h

Hi Allen,

Glad to be of help.

btw ... you wrote:
it seems like that the return type is ArrayCollection or XMLList(I'm not
sure)

I did some tests using the ActionScript typeOf() operator and all values
returned from the E4x operators are showing as typeOf XML.

For example, I popped the following into the MXML from my last post:



I did a few more statements than just the one above, and regardless of the
nodeKind(), typeOf() consistently returned XML.

Best regards,

g


[flexcoders] Re: ctrl key with a combination - doesnt seem to work

2007-03-05 Thread iko_knyphausen

Try it upon a KEYUP event


--- In flexcoders@yahoogroups.com, "jmorpher03" <[EMAIL PROTECTED]> wrote:
>
> Does anyone know how the the CTRL +  work ? Is this a
> Flex bug ? The Flex sample code in the help docs talks about this, but
> it doesn't seem to work. Whats wrong ???
>
> --- In flexcoders@yahoogroups.com, "jmorpher03" asgartali@ wrote:
> >
> > Hi,
> >
> > I am trying to trap the ctrl key along with a combination of any
other
> > alphanumeric key by using the following code on a DataGrid control:
> >
> > public void myKeyDown(event:KeyBoardEvent):void {
> > if ( event.ctrlKey && event.keyCode == 67 ) // for 'C'
> > {
> > // copy selected row
> > }
> > }
> >
> > This does not seem to work. Nor is any other key combination
detected
> > when we use the ctrl key.
> >
> > Isnt this the way to handle keyboard events ? Is there any other
> > explicit way to handle it ?
> >
> > Regards,
> > Asgar.
> >
>





RE: [flexcoders] Re: I want to write a tutorial

2007-03-05 Thread Tracy Spratt
"How do I save an xml file to the server?"  Flex's back-end agnosticism
always poses a challenge for Flex developers that need to retrieve/save
data, but do not have team of developers behind them to help.

 

I wrote an example that retrieves an xml file from the server, allows
you to edit it, and then save it back.  It includes two backend platform
examples, asp.net, and jsp.  A similar tutorial using php, of cf, or
anything would be helpful.

 

Actually, the xml editor part of my example may make the example too
complex for many, and maybe should be a separate example.  If I do it
over, I will make the save/retrieve functionality the focus.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of michael_ramirez44
Sent: Monday, March 05, 2007 9:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: I want to write a tutorial

 

I worte a Flex 2/Amfphp 1.9 tutorial that is on 
http://www.HowToForge.com   . I plan to write
a similar tutorial using 
Fluorine.

Michael Ramirez

--- In flexcoders@yahoogroups.com 
, "danneri21" <[EMAIL PROTECTED]> 
wrote:
>
> Hey guys,
> 
> I want to write another tutorial on Flex.
> 
> So far I've written on how to create a login system with flex and php,
> and an mp3 player in flex.
> 
> Any suggestions on what I should do next?
> 
> I'm fresh out of ideas :p
>

 



[flexcoders] Re: I want to write a tutorial

2007-03-05 Thread iko_knyphausen

There is one from Adobe, called Training from the Source, and then there
is one called Total Training for Adobe Flex 2 available at
TotalTraining.com


--- In flexcoders@yahoogroups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
>
> Where can one find such tutorials?
>
> At 12:38 AM 3/5/2007, you wrote:
>
> >Hey guys,
> >
> >I want to write another tutorial on Flex.
> >
> >So far I've written on how to create a login system with flex and
php,
> >and an mp3 player in flex.
> >
> >Any suggestions on what I should do next?
> >
> >I'm fresh out of ideas :p
> >
> >
>
> --
> Jeffry Houser, Software Developer, Writer, Songwriter, Recording
Engineer
> AIM: Reboog711 | Phone: 1-203-379-0773
> --
> My Company: 
> My Podcast: 
> My Blog: 
> Connecticut Macromedia User Group: 
>





Re: [flexcoders] How Can I save the drawing made at runtime

2007-03-05 Thread Troy Gilbert

Tom's suggestion is a decent one if you're looking to save the image in an
editable form. If you're wanting to save the image as a GIF/JPG/PNG/etc.,
then you should search around for the various PNG enconders (I believe
Adobe's ascorelib has at least a JPG encoder, maybe a few other formats as
well). To turn your shapes into a bitmap, you'll need to use the Bitmap API,
in particular BitmapData.draw() to draw the DisplayObjectContainer that
serves as the shapes' root (a Canvas or other UIComponent most likely) to a
bitmap, use the ascorelib/etc. methods to turn that into a ByteArray of JPG
data, then send that to the server which will roundtrip back to the user as
a downloadable file (since Flex can't directly save a file to the user's
machine).

Troy.


On 3/5/07, Tom Chiverton <[EMAIL PROTECTED]> wrote:


On Monday 05 Mar 2007, sanjaypmg wrote:
> I have made a screen where user can draw some SHAPES using graphics
> class at runtime using . I wanna give a functionality to save that
> object/drwaings once the it is completed.

You could push() each drawing operation and parameters onto an Array as
the
user draws them.

--
Tom Chiverton
Helping to carefully benchmark bleeding-edge e-commerce
On: http://thefalken.livejournal.com



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

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office address
is at St James's Court Brown Street Manchester M2 2JF.  A list of members is
available for inspection at the registered office. Any reference to a
partner in relation to Halliwells LLP means a member of Halliwells LLP.
Regulated by the Law Society.

CONFIDENTIALITY

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

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




--
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






RE: [flexcoders] Re: tileIcon

2007-03-05 Thread Giles Roadnight
Fantastic, I had tried something similar to that with no luck.

 

Thanks a lot.

 

Giles Roadnight

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bhaq1972
Sent: 05 March 2007 16:05
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: tileIcon

 

try



--- In flexcoders@yahoogroups.com  ,
"Giles Roadnight" <[EMAIL PROTECTED]> wrote:
>
> Hi All
> 
> I have a panel that has a title set but I want to put an image in 
there
> instead.
> 
> Are there any titleIcon examples out there? I've not been able to 
find any.
> A class is required to go in there. How do I create a class with 
graphical
> elements in?
> 
> Many Thanks
> 
> Giles Roadnight
>

 

<>
<>


RE: [flexcoders] Inserting Checkbox into Datagrid Field

2007-03-05 Thread Tracy Spratt
The critical piece here is to drive the state(selected=true/false) of
the check box from a property in the dataProvider, and set the value of
that property when the user clicks the checkbox control.  This is
required because the list controls re-use the renderers whne the list is
scrolled or the dtaProvider is updated.

 

Here is a full example:

http://www.cflex.net/showFileDetails.cfm?ObjectID=559&Object=File&Channe
lID=1

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of missgiggygirl
Sent: Monday, March 05, 2007 11:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Inserting Checkbox into Datagrid Field

 

I am populating a Datagrid with an XML file. The first field is
always a 1 or 0 for whether a checkbox is present. Right now I know
only how to populate the grid with whatever the data is in the XML,
but now I need a little piece of logic that will dynamically insert a
checkbox is required (value=1), or insert an empty space (value=0).

(The general effect will be similar to an email program, like hotmail
or Yahoo mail, where you have checkboxes to the left of every
row/message, except a few of the rows should NOT have checkboxes.)

I do not know how to add the little bit of logic that is required. 
Can anyone help?

Thanks,
Ann, the Original Giggle Girl

 



Re: [flexcoders] Re: Problems with "The E4X approach to XML processing"

2007-03-05 Thread Troy Gilbert

This same problem tripped me up as well... I couldn't figure out why I kept
getting XMLList's that contained elements when I was *sure* that the
elements shouldn't be there. I was checking for "list.length > != 0" which
of course was always true as ".length" was undefined for my XML elements.

What I realized (and already knew but just wasn't thinking) was that XML and
XMLList don't have any properties... everything is a method. It does that to
avoid colliding with your own element names. So, whenever you're wanting to
access any "property" of an XML node or XMLList don't forget your parens!

Troy.


On 05 Mar 2007 01:08:04 -0800, allenyoungsjtu <[EMAIL PROTECTED]>
wrote:


  Hi greg h,

Thank you for replying. With your help, my program is OK now. I've found
the problem. In my program, I was using blockXML.block.length, and it
reported a property not found error. I was thinking that it's because of
"block", but now I find the reason is "length".I thoungt
"blockXML.block" should return an Array, but it seems like that the
return type is ArrayCollection or XMLList(I'm not sure), so "length"
cannot be used and "length()" is the right way.

Thanks again for you reply. It really helps.

Allen.


--- In flexcoders@yahoogroups.com , "greg h"
<[EMAIL PROTECTED]> wrote:
>
> Hi allenyoungsjtu,
>
> When I run your code, this is what I get returned:
>
> 
> 
> 
> 
> 
>
> Is this what you meant by "the  node"? If not,
could you
> please cut and paste in the return value that you would expect given
the
> value of blockXML. Or what are you seeing that leads you to conclude
"it
> turned out that as cannot recognise block as blockXML's property"?
>
> Here is my MXML:
>
> 
> http://www.adobe.com/2006/mxml"; >
>
> 
> 
> 
>
>  height="100%"
> width="90%"/>
>
> 
>
> hth,
>
> g
>
> On 3/4/07, allenyoungsjtu [EMAIL PROTECTED] wrote:
> >
> > Hi all,
> >
> > I want to process some xml documents using actionscript. The
document
> > is something like this:
> >
> > [code]
> > private var blockXML:XML =
> > 
> > 
> > 
> > 
> > 
> > 
> > ;
> > [/code]
> >
> > I thought I could use the statement as follows:
> >
> > [code]
> > blockXML.block[0]
> > [/code]
> >
> > to get the  node, but it turned out that as cannot
> > recognise block as blockXML's property.
> >
> > Is there something wrong with my approach? Or I just cannot write it
> > in this way? Thanks a lot!
> >
>

 



[flexcoders] Inserting Checkbox into Datagrid Field

2007-03-05 Thread missgiggygirl
I am populating a Datagrid with an XML file.  The first field is
always a 1 or 0 for whether a checkbox is present.  Right now I know
only how to populate the grid with whatever the data is in the XML,
but now I need a little piece of logic that will dynamically insert a
checkbox is required (value=1), or insert an empty space (value=0).

(The general effect will be similar to an email program, like hotmail
or Yahoo mail, where you have checkboxes to the left of every
row/message, except a few of the rows should NOT have checkboxes.)

I do not know how to add the little bit of logic that is required. 
Can anyone help?

Thanks,
Ann, the Original Giggle Girl



[flexcoders] Re: tileIcon

2007-03-05 Thread bhaq1972
try




--- In flexcoders@yahoogroups.com, "Giles Roadnight" <[EMAIL PROTECTED]> wrote:
>
> Hi All
> 
> I have a panel that has a title set but I want to put an image in 
there
> instead.
> 
> Are there any titleIcon examples out there? I've not been able to 
find any.
> A class is required to go in there. How do I create a class with 
graphical
> elements in?
> 
> Many Thanks
> 
> Giles Roadnight
>




Re: [flexcoders] Re: Making itemRenders call a function on the component they're in

2007-03-05 Thread leds usop
when you say 'some data' on the component, do you
really mean just bits of data per se? or are there
some sort of 'validating' functions in that component?
 Having your item renderers access  data from your
wrapping component does not necessarily mean 'bad
practice'. It depends  on how you allowed the
renderers to access those data. ;) (i.e. is it  via
direct property access, via events? etc).

--- João <[EMAIL PROTECTED]> wrote:

> Great, thanks! That should work just fine. 
> 
> But in the meanwhile i've realized that i need the
> checkboxes to
> access some data on the component to define their
> selected state.
> The right solution would be to change my
> dataProvider
> (listOfAllSports:ArrayCollection) of SportVO
> (id:Number, name:String)
> so it included another field on the VO's
> (selected:Boolean), but that
> would change the meaning of my VO's (bad practice).
> 
> So i'm stuck. Or i find a way of having a
> dataProvider which is a
> modified version of my listOfAllSports including a
> selected:Boolean
> for each VO, or i find a way of making my
> itemRenderers access data on
> my component (bad practice). I can't figure out how
> to solve this,
> since, for the first solution, i would need two
> ArrayCollections
> "binded" but with different datatypes. 
> 
> 
> Flex is a new world to me, i'm loving it, but hating
> being stuck all
> the time i try to do something new.
> 
> João Saleiro
> 
> 



 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121


[flexcoders] Re: Eclipse 3.2.2

2007-03-05 Thread ben.clinkinbeard
Hi Dave,

Thanks for the link. I used it to install 3.2.2 this morning and
everything seems to be working so far. However, when I installed
FlexBuilder for the new Eclipse installation, it wouldn't let me
install to the eclipse_extensions directory. I had to install it
directly onto the 3.2.2 installation, which was kind of a bummer.

Were you able to install FB to the extensions folder or is this just
not possible with the way the FB plugin is built?

Thanks again,
Ben


--- In flexcoders@yahoogroups.com, "Dave Carabetta" <[EMAIL PROTECTED]>
wrote:
>
> Hi Andriy,
> 
> I found this article a little over a year ago, and I haven't looked back
> since:
> 
> http://www.javalobby.org/java/forums/t18678.html
> 
> It describes how to externalize the location of your eclipse plugins
so that
> upgrading the IE doesn't cause you to have to re-install everything you
> have.
> 
> Hope this helps.
> 
> Regards,
> Dave.
> Cynergy Systems, Inc.
> 
> 
> On 3/2/07, Andriy Panas <[EMAIL PROTECTED]> wrote:
> >
> >   Hello Dave,
> >
> > DC> I just did it and there are no issues to speak of thus far.
> >
> > This is probably OT, but I always wonder how do you install Flex
> > Builder Eclipse plugin (and other Eclipse plugins too) when you do
upgrade
> > to the new version of Eclipse?
> >
> > Do you:
> >
> > a) reinstall every Eclipse plugin manually from the scratch from
> > "Software update" menu;
> >
> > b) just copy "plugins" and "features" folders to the location
> > of new version of Eclipse IDE;
> >
> > c) install new Eclipse IDE on the top of old Eclipse IDE
> > installation folder and this makes a trick.
> > --
> > Best regards,
> > Andriy mailto:[EMAIL PROTECTED] 
> >
> >  
> >
>




Re: [flexcoders] Re: Flex Prototyping Best Practices

2007-03-05 Thread Douglas Knudsen

http://www.digimmersion.com/
checkout the visio stencil.  Our UI person is starting to use this some.

DK

On 3/5/07, akhilbhaskar <[EMAIL PROTECTED]> wrote:


Well, yes and no.  You're right about finding the balance part.  Since
you're in the agile world, it really is dependent on your experience
and whether or not you are a partner in the design, or just the
implementor.

If you find that you don't have time to get things set up beforehand,
you always have the option of fleshing out the UI with the client,
then telling them that you'd have some sample data fleshed out for
them for the next day (or more depending on number of
screens/complexity, etc.)

Architecting an app is IMHO a different paradigm from how it looks and
feels.  If the app is being built to replace an existing application,
there's already a model for how the client is used to interacting with
the system.  If it's a brand new app, the client needs help thinking
about interaction paths, and there's great value in putting in a
little extra thought ahead of time to help you flesh out what might be
possible in the time period given.  (I don't know about you, but my
clients always want the sun, moon, and the stars, and they want it
now- and it becomes my job to tell them how long things will take and
help them make a decision about what they want within the allocated time)

I've always found that when I am looking at a (potential) project, I
already know (or find out very soon) what the overarching business
functions are.  This allows me to build a very simple setup to allow
for this rapid prototyping.  (Remember that Cairngorm is a
micro-architecture, not just a framework).  It really only takes a few
hours to set up simple events and once you have one set up, the others
follow the same, or a very similar pattern.


-Akhil Bhaskar
Amentra, Inc. (www.amentra.com)




--- In flexcoders@yahoogroups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
>
>   Prototyping is tricky.  It sounds like you're putting in most of
> the app building work into your prototype.  Is that correct?
>
>   Prototypes are supposed to be fast and as far as I can tell,
> setting up Cairngorm is not a trivial task.
>   Once you start using a framework, aren't you then starting to think
> about how to architect the app not what it's supposed to do.  I've
> had horrible results with architecting the app before the client
> 'see's it's functionality.  I've always been torn on whether a
> framework should be used to prototype or not.
>
>   I haven't found the right balance yet.
>
> At 01:51 AM 3/5/2007, akhilbhaskar wrote:
>
> >I've actually been using Cairngorm
>
>(
http://labs.adobe.com/wiki/index.php/Cairngorm)

> >as a
> >micro-architecture for my apps. Once I have most of my "back-end"
> >architecture in place, I simply create a Mock Business Delegate and
> >populate the values in that class using my real DTOs. Once you know
> >where the values are actually coming from, simply swap out your mock
> >object with the real HTTPService/DataService,etc call.
> >
> >-Akhil Bhaskar
> >Amentra, Inc. (http://www.amentra.com)
> >
> >--- In
> >flexcoders@yahoogroups.com,
> >Jeffry Houser  wrote:
> > >
> > >
> > > I've been hard coding sample data into ArrayCollections.
> > >
> > > I bet there are better ways, though.
> > >
> > >
> > >
> > > At 05:19 PM 3/2/2007, Clarke Bishop wrote:
> > >
> > > >I've become a big believer in iterative development and in starting
> > > >my Flex apps by working on the U/I. Then, only after I can freeze
> > > >the U/I, do I start on the backend.
> > > >
> > > >It's easy enough to drag some controls into an application, but I'm
> > > >not as sure the best ways to populate the controls with sample
data.
> > > >What's the best practice? And what way makes it easiest to modify
> > > >the sample data and ultimately switch to developing the back end
> > > >with minimum impact on my Flex code?
> > > >
> > > >If any of you have any other tips for a good Flex development
> > > >process, I'd love to hear your thoughts on that, too!
> > > >
> > > >Thanks,
> > > >
> > > > Clarke
> > > >
> > >
> > > --
> > > Jeffry Houser, Software Developer, Writer, Songwriter, Recording
> >Engineer
> > > AIM: Reboog711 | Phone: 1-203-379-0773
> > > --
> > > My Company: <http://www.dot-com-it.com>
> > > My Podcast: <http://www.theflexshow.com>
> > > My Blog: <http://www.jeffryhouser.com>
> > > Connecticut Macromedia User Group:
> > <http://www.ctmug.com>
> > >
> >
> >
>
> --
> Jeffry Houser, Software Developer, Writer, Songwriter, Recording
Engineer
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> My Company: 
> My Podcast: 
> My Blog: 
> Connecticut Macromedia User Group: 

Re: [flexcoders] Flex Builder Syntax Highlighting Not Working

2007-03-05 Thread Mark Robinson

It works on some files and others it doesn't.  What syntax causes it to
fail?

-Mark

On 3/1/07, Brendan Meutzner <[EMAIL PROTECTED]> wrote:


  There are bugs depending on certain syntax used in your files... is it
not working for all your files?

Brendan

On 2/28/07, Mark Robinson < [EMAIL PROTECTED]> wrote:
>
>   I installed the stand alone Flex Builder and all the highlighting came
> back.  I tried reinstalling the eclipse plugin but that didn't make any
> difference.
>
> Adobe support is looking into this but right now they don't have any
> ideas.  They pointed me to this post but it doesn't really help me:
> 
http://www.morearty.com/blog/2006/05/22/undocumented-flex-builder-changing-the-
> syntax-coloring/
>
> -Mark
>
> On 2/27/07, feiy <[EMAIL PROTECTED]> wrote:
> >
> >   give me the detail about your mxml code!maybe the namespace define
> > error
> >
> > 2007/2/27, mark_c_robinson < [EMAIL PROTECTED]>:
> > >
> > >   Has anyone experienced syntax highlighting for the Flex Builder
> > > plugin
> > > (2.0.1) in Eclipse (3.2.1) failing all together or at best working
> > > sporadically?
> > >
> > > And has anyone determined a fix?
> > >
> > >
> >
> >
> > --
> > 闲云孤鹤 - 清冷香中抱膝吟
> >
> >
>


--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca
 



[flexcoders] Re: Populate ComboBox from database - NOT using Flex Data Services

2007-03-05 Thread April
Thank you for everyone's responses, but I'm still not having any luck.  I'm not 
getting any 
errors - but my combobox is not populating.  Again, I'm really new to Flex.

My app is called PreTraffic with the following structure:

PreTraffic
 cfc (folder)
  job.cfc
 JobSearch.cfc

**

job.cfc contatins:









SELECT  job_id, job_title
FROMjob
WHERE   status = 'O'
ORDER BYjob_title


SELECT  job_title AS label, job_id AS data
FROMjob
ORDER BYlabel


   


**

JobSearch.mxml contains:


http://www.adobe.com/2006/mxml"; 
xmlns="*"
layout="absolute" 
backgroundGradientColors="[#ff, #d0d0d0]"
creationComplete="InitApp()">









 



















RE: [flexcoders] Re: ctrl key with a combination - doesnt seem to work

2007-03-05 Thread Robert Chyko
Did a little further testing... if I use Firefox when I am debugging I
get 2 KeyBoard events that are captured.  The second event has the
correct keyCode that I am looking for (67).
 
If I debug using IE, only one event ever gets handled, its keyCode is
17.  So I guess the question becomes, is Flash Player dropping the
second event, or is IE blocking it?
 
 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Robert Chyko
Sent: Monday, March 05, 2007 10:00 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: ctrl key with a combination -
doesnt seem to work




I am having the same problem.  At least from where I am standing
there doesn't appear to be a way to capture the second key.  I also get
true for the value of event.ctrlKey and 17 for event.keyCode.
 
Anyone have any insight?
 
 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of jmorpher03
Sent: Monday, March 05, 2007 8:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ctrl key with a combination -
doesnt seem to work



Hi Adam,

That was a typo. Here's what I have :

public function myKeyDown(event:KeyboardEvent):void {

}

And I have specified the event listener in the DG as 


The problem is not with the Event generation. I have put
trace and it
seems to call the function when the event occurs. The
problem is
detecting the CTRL + .

The keyCode always returns 17 (for CTRL key) and the
ctrlKey is TRUE.
What happens to the keyCode of the other key , for Ex: C
or c which
would be 67 or 99 ???

Is there any other way of detecting it, which I am not
aware or is
this a Flex bug ? It does not work as suggestec in the
Flex help docs.

--- In flexcoders@yahoogroups.com
 , "Adam Royle" <[EMAIL PROTECTED]> wrote:
>
> Umm... you've got 
> 
> public void myKeyDown
> 
> when it should be:
> 
> public function myKeyDown...
> 
> and make sure you have
> 
>  
> 
> Adam
> 
> - Original Message - 
> From: jmorpher03 
> To: flexcoders@yahoogroups.com
  
> Sent: Monday, March 05, 2007 9:11 PM
> Subject: [flexcoders] Re: ctrl key with a combination
- doesnt
seem to work
> 
> 
> Does anyone know how the the CTRL + 
work ? Is this a
> Flex bug ? The Flex sample code in the help docs talks
about this, but
> it doesn't seem to work. Whats wrong ???
> 
> --- In flexcoders@yahoogroups.com
 , "jmorpher03"  wrote:
> >
> > Hi,
> > 
> > I am trying to trap the ctrl key along with a
combination of any
other
> > alphanumeric key by using the following code on a
DataGrid control:
> > 
> > public void myKeyDown(event:KeyBoardEvent):void {
> > if ( event.ctrlKey && event.keyCode == 67 ) // for
'C'
> > {
> > // copy selected row
> > }
> > }
> > 
> > This does not seem to work. Nor is any other key
combination
detected
> > when we use the ctrl key. 
> > 
> > Isnt this the way to handle keyboard events ? Is
there any other
> > explicit way to handle it ?
> > 
> > Regards,
> > Asgar.
> >
>





 



RE: [flexcoders] Re: ctrl key with a combination - doesnt seem to work

2007-03-05 Thread Robert Chyko
I am having the same problem.  At least from where I am standing there
doesn't appear to be a way to capture the second key.  I also get true
for the value of event.ctrlKey and 17 for event.keyCode.
 
Anyone have any insight?
 
 

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of jmorpher03
Sent: Monday, March 05, 2007 8:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ctrl key with a combination - doesnt
seem to work



Hi Adam,

That was a typo. Here's what I have :

public function myKeyDown(event:KeyboardEvent):void {

}

And I have specified the event listener in the DG as 


The problem is not with the Event generation. I have put trace
and it
seems to call the function when the event occurs. The problem is
detecting the CTRL + .

The keyCode always returns 17 (for CTRL key) and the ctrlKey is
TRUE.
What happens to the keyCode of the other key , for Ex: C or c
which
would be 67 or 99 ???

Is there any other way of detecting it, which I am not aware or
is
this a Flex bug ? It does not work as suggestec in the Flex help
docs.

--- In flexcoders@yahoogroups.com
 , "Adam Royle" <[EMAIL PROTECTED]> wrote:
>
> Umm... you've got 
> 
> public void myKeyDown
> 
> when it should be:
> 
> public function myKeyDown...
> 
> and make sure you have
> 
>  
> 
> Adam
> 
> - Original Message - 
> From: jmorpher03 
> To: flexcoders@yahoogroups.com
  
> Sent: Monday, March 05, 2007 9:11 PM
> Subject: [flexcoders] Re: ctrl key with a combination - doesnt
seem to work
> 
> 
> Does anyone know how the the CTRL +  work ?
Is this a
> Flex bug ? The Flex sample code in the help docs talks about
this, but
> it doesn't seem to work. Whats wrong ???
> 
> --- In flexcoders@yahoogroups.com
 , "jmorpher03"  wrote:
> >
> > Hi,
> > 
> > I am trying to trap the ctrl key along with a combination of
any
other
> > alphanumeric key by using the following code on a DataGrid
control:
> > 
> > public void myKeyDown(event:KeyBoardEvent):void {
> > if ( event.ctrlKey && event.keyCode == 67 ) // for 'C'
> > {
> > // copy selected row
> > }
> > }
> > 
> > This does not seem to work. Nor is any other key combination
detected
> > when we use the ctrl key. 
> > 
> > Isnt this the way to handle keyboard events ? Is there any
other
> > explicit way to handle it ?
> > 
> > Regards,
> > Asgar.
> >
>



 



[flexcoders] Re: I want to write a tutorial

2007-03-05 Thread michael_ramirez44
I worte a Flex 2/Amfphp 1.9 tutorial that is on 
http://www.HowToForge.com . I plan to write a similar tutorial using 
Fluorine.

Michael Ramirez
 
--- In flexcoders@yahoogroups.com, "danneri21" <[EMAIL PROTECTED]> 
wrote:
>
> Hey guys,
> 
> I want to write another tutorial on Flex.
> 
> So far I've written on how to create a login system with flex and php,
> and an mp3 player in flex.
> 
> Any suggestions on what I should do next?
> 
> I'm fresh out of ideas :p
>




[flexcoders] Re: Flex Prototyping Best Practices

2007-03-05 Thread akhilbhaskar
Well, yes and no.  You're right about finding the balance part.  Since
you're in the agile world, it really is dependent on your experience
and whether or not you are a partner in the design, or just the
implementor.

If you find that you don't have time to get things set up beforehand,
you always have the option of fleshing out the UI with the client,
then telling them that you'd have some sample data fleshed out for
them for the next day (or more depending on number of
screens/complexity, etc.)

Architecting an app is IMHO a different paradigm from how it looks and
feels.  If the app is being built to replace an existing application,
there's already a model for how the client is used to interacting with
the system.  If it's a brand new app, the client needs help thinking
about interaction paths, and there's great value in putting in a
little extra thought ahead of time to help you flesh out what might be
possible in the time period given.  (I don't know about you, but my
clients always want the sun, moon, and the stars, and they want it
now- and it becomes my job to tell them how long things will take and
help them make a decision about what they want within the allocated time)

I've always found that when I am looking at a (potential) project, I
already know (or find out very soon) what the overarching business
functions are.  This allows me to build a very simple setup to allow
for this rapid prototyping.  (Remember that Cairngorm is a
micro-architecture, not just a framework).  It really only takes a few
hours to set up simple events and once you have one set up, the others
follow the same, or a very similar pattern.


-Akhil Bhaskar
Amentra, Inc. (www.amentra.com)




--- In flexcoders@yahoogroups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
> 
>   Prototyping is tricky.  It sounds like you're putting in most of 
> the app building work into your prototype.  Is that correct?
> 
>   Prototypes are supposed to be fast and as far as I can tell, 
> setting up Cairngorm is not a trivial task.
>   Once you start using a framework, aren't you then starting to think 
> about how to architect the app not what it's supposed to do.  I've 
> had horrible results with architecting the app before the client 
> 'see's it's functionality.  I've always been torn on whether a 
> framework should be used to prototype or not.
> 
>   I haven't found the right balance yet.
> 
> At 01:51 AM 3/5/2007, akhilbhaskar wrote:
> 
> >I've actually been using Cairngorm
>
>(http://labs.adobe.com/wiki/index.php/Cairngorm)

> >as a
> >micro-architecture for my apps. Once I have most of my "back-end"
> >architecture in place, I simply create a Mock Business Delegate and
> >populate the values in that class using my real DTOs. Once you know
> >where the values are actually coming from, simply swap out your mock
> >object with the real HTTPService/DataService,etc call.
> >
> >-Akhil Bhaskar
> >Amentra, Inc. (http://www.amentra.com)
> >
> >--- In 
> >flexcoders@yahoogroups.com, 
> >Jeffry Houser  wrote:
> > >
> > >
> > > I've been hard coding sample data into ArrayCollections.
> > >
> > > I bet there are better ways, though.
> > >
> > >
> > >
> > > At 05:19 PM 3/2/2007, Clarke Bishop wrote:
> > >
> > > >I've become a big believer in iterative development and in starting
> > > >my Flex apps by working on the U/I. Then, only after I can freeze
> > > >the U/I, do I start on the backend.
> > > >
> > > >It's easy enough to drag some controls into an application, but I'm
> > > >not as sure the best ways to populate the controls with sample
data.
> > > >What's the best practice? And what way makes it easiest to modify
> > > >the sample data and ultimately switch to developing the back end
> > > >with minimum impact on my Flex code?
> > > >
> > > >If any of you have any other tips for a good Flex development
> > > >process, I'd love to hear your thoughts on that, too!
> > > >
> > > >Thanks,
> > > >
> > > > Clarke
> > > >
> > >
> > > --
> > > Jeffry Houser, Software Developer, Writer, Songwriter, Recording
> >Engineer
> > > AIM: Reboog711 | Phone: 1-203-379-0773
> > > --
> > > My Company: <http://www.dot-com-it.com>
> > > My Podcast: <http://www.theflexshow.com>
> > > My Blog: <http://www.jeffryhouser.com>
> > > Connecticut Macromedia User Group: 
> > <http://www.ctmug.com>
> > >
> >
> >
> 
> --
> Jeffry Houser, Software Developer, Writer, Songwriter, Recording
Engineer
> AIM: Reboog711  | Phone: 1-203-379-0773
> --
> My Company: 
> My Podcast: 
> My Blog: 
> Connecticut Macromedia User Group: 
>




  1   2   >