[flexcoders] Context Menus on TextArea/TextField in AIR

2008-08-21 Thread Derrick Grigg
Hey everyone,

I am pulling my hair out trying to get a custom context menu to work
on a TextArea or TextField. In a normal Flex project, it's easy,
create a new ContextMenu and assign it the TextArea, everything works
fine. I take the exact same code, put it in an Air project and
nothing, the normal 'edit,copy,paste,select all' is the only thing I
get inside any TextArea or TextField.

Has anyone run across this issue and found a solution.

Thanks,

Derrick



[flexcoders] Re: Cairngorm design questions about Command-View communication

2007-12-06 Thread Derrick Grigg
You're not the first and likely not the last to struggle with that
exact issue. I ran across that same problem when starting with
Cairngorm in Flex. I ran across a few interesting articles on
something called a ViewController which seems to work quite well.
Essentially the View registers as a listener to the ViewController.
When the command needs to inform the view(s) of something it can tell
the ViewController to dispatch an event, which the listening Views
will catch and then do their thing appropriately.

You can read more about it here.
http://www.dgrigg.com/post.cfm/04/12/2007/Cairngorm-Commands-Views-and-Harikiri

Derrick
--
Derrick Grigg
www.dgrigg.com



[flexcoders] Re: How to upload file with Flex and coldfusion?

2007-12-06 Thread Derrick Grigg
Check this post, it should help.

http://www.dgrigg.com/post.cfm/08/02/2007/Flex-and-Flash-file-uploading-with-return-data

Derrick

--
Derrick Grigg
www.dgrigg.com




[flexcoders] Re: Save XML to mySQL and retrieve back to Flex

2007-10-26 Thread Derrick Grigg
To get the xml into the database via some server side technology the
xml will need to get converted into string format at some point. When
you retrieve it from the database via server side tech, it will again
be as a string, you will have to convert it back into a proper xml
object at some point, either on the server or in the flex client. I
don't think there is any way around that. 

I have done the same thing for many projects and have never had a
problem. The database thinks you're saving a huge string (which it is)
and actionscript can quickly parse a large xml string back into an XML
object very quickly. Go for the easy, clean, quick solution.

Derrick
-----
Derrick Grigg
www.dgrigg.com



--- In flexcoders@yahoogroups.com, "Ben Marchbanks" <[EMAIL PROTECTED]> wrote:
>
> I have a complex XML object that is constructed in Flex. I would like
> to store this in mySQL whole in a single field and then retrieve and
> display the data at a later time in my Flex app. What I would like to
> avoid is parsing and reconstructing the XML in order to display it
> again in Flex.
> 
> Any suggestions or points on how to handle this...
>




[flexcoders] Re: File upload in Flex

2007-09-12 Thread Derrick Grigg
Stephen,

Check this post

http://www.dgrigg.com/post.cfm/08/02/2007/Flex-and-Flash-file-uploading-with-return-data

Derrick

--
Derrick Grigg
www.dgrigg.com

--- In flexcoders@yahoogroups.com, "stephen50232" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> I've got a new project, which requires that the user can upload
> resources to a system, which other users can access and download
> through the same system.
> 
> The types of documents which can be uploaded through the system will
> include PDFs, Word docs, Excel docs, but this list may increase (e.g.
> MP3 files etc).
> 
> I have not seen an example of a Flex system which allows users to
> browse there local PC and upload files. Is it possible and if so how?
> 
> Stephen
>




[flexcoders] Re: How to converst an XML to AS Object ?

2007-09-09 Thread Derrick Grigg
You can't automatically convert XML to a strong typed object. You 
should create a method in your Album class that takes an xml 
variable, and then populate the Album from there.

ie 
var album:Album = new Album();
album.setData(event.result);


class Album
{
   public function setData(data:XML):void 
   {
  //populate the album
   }
}

Derrick

Derrick Grigg
www.dgrigg.com

--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> Situation I have XML like that 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> using HTTPService I'm getting this XML.
> 
> I have AS Class:
> 
> public class Album {
> public var name:String;
> public var images:ArrayCollection;
> }
> 
> straight cast like:
> 
> 
> var album:Album = Album (event.result);
> 
> 
> doesn't work
> 
> Is any suggestion around this, what I do wrong, may be there are 
some
> other way to do that
> 
> Thank you.
>




[flexcoders] Complete event from mx:Image

2007-03-21 Thread Derrick Grigg
Does anyone know why the mx:Image fires the complete event before the
image has been completely loaded?

I have the following code

private function photoComplete(event:Event):void
{
   trace (photo_img.width + ' ' + photo_img.height);
}



When the photoComplete gets called the width and height are traced out
as '0'. What I had to do was add a little logic snippet to say if the
width and height are '0' do a callLater, and call back to the
photoComplete again, sometimes it takes 2 or 3 callbacks for the size
to register.

Any idea why? I would think that when the 'complete' gets fired the
mx:Image should know the size of the picture it has loaded.

Derrick



[flexcoders] Re: Simulating "clicking the X" of a TitleWindow

2007-03-16 Thread Derrick Grigg
Have the window dispatch the close event, you can do this from
anywhere, you just need a reference point to the title window you want
to dispatch the event.

ie. in the code inside the TitleWindow instance

var e:Event = new Event(Event.CLOSE);
//parent is a reference to the parent title window instance
parent.dispatchEvent(e); 

You can also 'bubble' the event up from any child within the title
window instance and it will have the same effect. 

var e:Event = new Event(Event.CLOSE, true);
dispatchEvent(e); 

Only listeners to that specific title window instance will hear the
close event, not listeners to other windows.

Derrick
------
Derrick Grigg
www.dgrigg.com
[EMAIL PROTECTED]





[flexcoders] Re: Preventing PopupManager to make popups over the MenuBar?

2007-03-15 Thread Derrick Grigg
Use the application's instance of the 'mx.manager.SystemManager' and 
add the MenuBar as a child of that. It will put the MenuBar above 
everything else. 

Derrick
------
Derrick Grigg
www.dgrigg.com
[EMAIL PROTECTED]



[flexcoders] Re: Just curious, A big development team or individual developers

2007-02-23 Thread Derrick Grigg
TEAM ... thankfully



[flexcoders] Re: htmlText css Span tag

2007-02-23 Thread Derrick Grigg
I have been able to get that to work in TextArea's with the htmlText,
however, the fonts start to act crazy for some reason. I was never
able to get it to reliably work so I just went with using the 
tag in the htmlText to get it to work. A real pain but it does work.

Derrick
-
Derrick Grigg
[EMAIL PROTECTED]



[flexcoders] Re: Are other developers hesitant to extend existing classes in Flex?

2007-02-22 Thread Derrick Grigg
I am currently working on a project where we have had to extend many
of the framework controls and containers to add extra functionality or
fix little things that were bothersome. While it has been an very
difficult task in places is has not been impossible. I certainly would
not advocate the 'cut and paste' method, there are always ways around
that, it's just a case of finding the right solution. One thing I
would recommend is really digging into all the source code for the
framework stuff. Being able to understand the different pieces and how
they relate and inter operate is a huge first step in being able to
make any significant extensions. 

Regarding the private vars and functions, I would suggest looking hard
at how they work, what it is you need to do, and then trying very hard
to find something that works (sometimes thinking completely outside of
the box, ie deleting and reinitializing certain inherited variables or
objects to get them working correct). I have found that the areas in
the framework that are private are so for a reason and workarounds can
be found. Anywhere they exist means Adobe would be having the same
issues in attempting to extend them, so there must be another way.
Determining exactly which item to extend is a big part of the process.
Sometimes (especially with containers) the one you think you need to
extend is not always the right one, potentially the parent class is
actually a better fit and you can reuse some of the extended logic in
the container you wanted to extend, in your own new class, to get the
job done.

Good luck, it's painful, but doable.

Derrick
-----
Derrick Grigg
[EMAIL PROTECTED]



[flexcoders] Re: How can google index a Flex / SWF site ?

2007-02-20 Thread Derrick Grigg
Not sure how your app is structured but Flex FXT might be a solution

http://www.onflex.org/FXT/

Derrick

-
Derrick Grigg
[EMAIL PROTECTED]



[flexcoders] Re: Enterprise Architect and AS3 any advice- to import code libraries and swc(bi

2007-02-15 Thread Derrick Grigg
I have a post on my blog about AS3 and EA

http://www.dgrigg.com/post.cfm/09/14/2006/UML-Stub-Code-and-ASDocs

I haven't tried importing code from an SWC, not sure you can, since
it's compiled, but importing .as files is a breeze.

Derrick

-----
Derrick Grigg
www.dgrigg.com







[flexcoders] Re: StartDrag() versus DragManager.doDrag()

2007-02-09 Thread Derrick Grigg
 
> I can't find anywhere that we use startDrag()in the framework, 
> including in the DragManager.

My bad, you know what they say about 'assuming'. 

Just did some more digging, in the DragProxy class and was very
surprised to see that it actually uses a mouse move event listener and
then repositions the drag proxy based on the the x/y of the mouse.

var pt:Point = new Point();
var point:Point = new Point(event.localX, event.localY);
point = DisplayObject(event.target).localToGlobal(point);
point =
DisplayObject(dragInitiator.systemManager.topLevelSystemManager).globalToLocal(point);
var mouseX:Number = point.x;
var mouseY:Number = point.y;
x = mouseX - xOffset;
y = mouseY - yOffset;

This just begs the question, why??? Why go through all that instead of
just using the startDrag that is a core method of the Sprite class?
Just to offset the DragProxy slightly from the mouse pointer? I don't
get it, why bloat (in my opinion) the code. From my understanding
classes and methods that are actually compiled into the flash plugin
(ie the flash.* package) run faster than those that are not (ie. the
mx.* package). I don't understand why all the extra code is required
to accomplish something the plugin already has the ability to do.


 




[flexcoders] Re: StartDrag() versus DragManager.doDrag()

2007-02-08 Thread Derrick Grigg
Hey Mike,

My understanding of the DragManager is that it is used to facilitate
drag and drop operations, ie moving nodes from a trees, rows from a
grid, etc. It's purpose is more for moving data from point A to point
B with some type of visual reference.

The startDrag is a method on the Sprite class and it used for any
object dragging. All dragging in Flash/Flex comes from that function
(even the DragManager uses the startDrag method) so I don't think it
will be deprecated anytime (if ever).

I would say the startDrag is always the preferred method for dragging
items around and only consider using the DragManager when you actually
need to move/copy data from source to target by mouse interaction.

Hope that helps,

Derrick Grigg
--
www.dgrigg.com



[flexcoders] Re: What is the best way to draw about 10,000 to 15,000 rectangles?

2007-02-02 Thread Derrick Grigg
I ran across a similar problem for an application I worked on in
Actionscript 2. I had a very large image broken into 10x10 tiles. Each
tile related to an image and some data. Instead of drawing a pile of
boxes (or rectangles) as MovieClips, I created a Bitmap drawing that
had all the tiles I needed on it (so in effect, it looked like a bunch
of individual movieclips). I then created an associative array that
stored the class instances I needed that correlated with each tile on
the drawing, based on an x-y position (ie array['0-0'] = instance1;
array['10-0'] = instance2, etc). I registered the mouse and click
events against the movieclip that had the bitmap in it. As the user
moved across or clicked on the bitmap I had a simple function that
would calculate the tile that user had moused over or clicked on, find
the necessary instance in array and then do the work that need to be
done. It worked super fast, since the application was not bogged down
with thousands of movieclips.

Derrick Grigg
--
www.dgrigg.com



[flexcoders] Re: Cairngorm support for Flex 2.0.1 modules?

2007-01-16 Thread Derrick Grigg
My team is currently in the process of developing a large modular Flex
application that is based on Cairngorm and uses the mx:Modules.

We put the Cairngorm framework and all 'core' classes (ie Controller,
ModelLocator, ValueObject, centralized Commands) into a Flex Library.
Each module was setup as a separate Flex project along with a shell
project that was responsible for loading the modules and creating the
basic shell application. Each of the modules accessed the 'core'
classes as an RSL during development and then the option was set to
'external' for deployment to reduce file size and duplication. The
shell used the 'include' compiler option to compile the entire 'core'
library into the shell so that all classes where available for the
modules. Each module ran a method upon loading that would register any
module specific Commands with the FrontController and register for any
events, etc.

The one thing that was quite tricky was uncoupling binding from the
ModelLocator during module unloads. Using the {} method in the
property attribute of a control (ie ) does not allow you to uncouple
the binding at a later time, which prevents garbage collection.
Instead we had to use the BindingUtils and then call a method just
before unloading a module to remove the bindings, then the module
could be properly unloaded and garbage collected. Also we had to make
sure we used weak reference event listeners in order to ensure garbage
collection would properly occur on the unloaded modules.

Hope that information helps you out.

Derrick
-
Derrick Grigg
[EMAIL PROTECTED]



[flexcoders] Re: How do you get the color changed for a Radio Button Label for mouseOnRollOve

2007-01-13 Thread Derrick Grigg
Check the help files but I believe it is text-rollover.

Derrick



[flexcoders] Re: detect activity on audio stream

2006-12-19 Thread Derrick Grigg
Hey Jesus,

I don't have an answer for your question but I do have a question 
regarding the activity on the microphone. Are you able to detect the 
audio signal or just the start and stop events? I have been trying to 
find a way to get the SoundChannel from the microphone or outgoing 
netstream with no luck.

Derrick




[flexcoders] Re: using coldfusion to return height and width of flex swf

2006-12-15 Thread Derrick Grigg
You can try the FlashInspector created by Doug Hughes.

Here's some info and a download for it.

http://www.dgrigg.com/post/Read-SWF-height-and-width-with-Coldfusion";>http://www.dgrigg.com/post/Read-SWF-height-and-width-with-Coldfusion

Derrick Grigg
--
www.dgrigg.com




[flexcoders] Re: The most strange behavior I've seen with Flex...

2006-12-03 Thread Derrick Grigg
A friend of mine ran across similar weirdness with Flash 8 and wmode.

http://blog.scottgmorgan.com/php/default.php?topicID=170&contentID=739&rowID=114

I'm not sure he ever found a full answer as to why.

Derrick

--- In flexcoders@yahoogroups.com, "John Nagle" <[EMAIL PROTECTED]> wrote:
>
> Thanks Matt,
> 
> I seem to have found a way to make it work, and maybe this will
provide a clue for your engineers.  I had initiated the send on the
"activate" event for a viewstack, but when I change the send to
trigger on the "show" event it seems to work.  I'll need to do more
testing to see if it's solid, but so far so good.
> 
> -John
>




[flexcoders] Re: Shortcut for creating and dispatching events

2006-11-04 Thread Derrick Grigg
I'm assuming you are using Cairngorm. If so your model will also need 
to use the EventDispatcher or CairngormEventDispatcher class to 
dispatch the event since the Model does not have that built in 
natively.

Derrick

-
Derrick Grigg
www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Cairngorm, dispatching application events and managing states

2006-10-26 Thread Derrick Grigg
Hey Dustin,

Thanks for the feedback. Yeah I figured I could do it with Commands
and some boolean values in the model locator. I like the idea of
having the states listed out in the model locator. My only concern is
that it seems a bit disjointed and tedious when the states etc get
complicated (probably more my own bias than anything). Great ideas
though and something I will keep in mind.

Derrick




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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Cairngorm, dispatching application events and managing states

2006-10-25 Thread Derrick Grigg
The biggest things I need to do are update/change the state of views
within the application. For instance, when a user has logged in
certain buttons get enabled, or certain panels become visible that
would not be so when the user is logged out.

I was thinking along the lines of using Commands, but I don't think
Commands should be concerned about the specific details (ie text
fields, buttons, etc) of a view. Using Commands would also entail
having to register all my views with a locator that would be used to
allow the Commands to find Views. Seems like a huge pain.

To me it seems much cleaner to allow the views to listen for certain
events (likely dispatched from a Manager) and then respond accordingly.

Derrick

--- In flexcoders@yahoogroups.com, "Dustin Mercer" <[EMAIL PROTECTED]>
wrote:
>
> Out of curiosity, what is it you want to do when the login happens.  I
> have only found a few things that were difficult to do from within a
> command.  If you can tell me what you want to do, I can tell you what I
> have done in the past and how I accomplished it from within a command.
> In my Cairngorm trials, I had come to some of the same thinking as you
> described here, but I found that there were ways to accomplish it within
> the command instead of a management class.  There were situations I
> chose to implement management classes though, for example, I had a class
> that managed all the media playing on a media player I am building...
> It just didn't feel right broken into commands, just didn't feel very
> cohesive, although accomplishable through commands, just felt better in
> a singleton class  Especially since I was going to be using these
> same functions across many different commands and didn't want to rewrite
> the logic in each command.
> 
>  
> 
> ________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Derrick Grigg
> Sent: Wednesday, October 25, 2006 12:11 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Cairngorm, dispatching application events and
> managing states
> 
>  
> 
> Here's a question for any Cairngorm devotees to weigh in on.
> 
> I have an application that has many seperate parts that function
> independently of each other. Each part uses the centralized Cairngorm
> fare (FrontController, ModelLocator, Commands etc). For most parts
> using the ModelLocator and bound properties (ie
> dataProvider={model.users}) works perfect for keeping everything in
> order.
> 
> One case where this seems to fall apart is when one part or the shell
> application needs to notify the other parts of something that has
> happened. For example, a user logs into the application. I can update
> the model.user to reflect a value object for the new user and the
> various components that need to update on this do, BUT, what to do
> when I need something programatic to occur in one of the parts. 
> 
> I have tried unsuccessfully to use the 'mx.binding' classes. I think
> the issue there is that when you initially set the binding it is set
> to a specific instance of an object (ie model.user). When the user
> logs in I typically completely replace the model.user with a new user
> instance, which kills the bindings. The only way around this is to
> never replace object instances in the model but rather update them.
> Thinking this through though, that seems like a ticking time bomb. Any
> accidental overwrite of a instance in the model and all the bindings
> falls apart.
> 
> What I have done in past, pre Cairngorm, applications it to create
> Manager classes, based on the Singleton pattern, that can dispatch
> events, and perform logic that doesn't really belong in a command or
> business delegate. For example an ApplicationManager class that can
> dispatch 'loggedIn' and 'loggedOut' events. Any part of the
> application can register as a listener and act appropriately upon
> receiving the event.
> 
> My question then (to get to the point), is using a Manager class like
> this considered a best practice in the Cairngorm framework (mindframe)
> or is there a better or more acceptable method of doing what I would
> like to accomplish?
> 
> Thanks in advance for any feedback,
> 
> Derrick
>





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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Cairngorm, dispatching application events and managing states

2006-10-25 Thread Derrick Grigg
Here's a question for any Cairngorm devotees to weigh in on.

I have an application that has many seperate parts that function
independently of each other. Each part uses the centralized Cairngorm
fare (FrontController, ModelLocator, Commands etc). For most parts
using the ModelLocator and bound properties (ie
dataProvider={model.users}) works perfect for keeping everything in order.

One case where this seems to fall apart is when one part or the shell
application needs to notify the other parts of something that has
happened. For example, a user logs into the application. I can update
the model.user to reflect a value object for the new user and the
various components that need to update on this do, BUT, what to do
when I need something programatic to occur in one of the parts. 

I have tried unsuccessfully to use the 'mx.binding' classes. I think
the issue there is that when you initially set the binding it is set
to a specific instance of an object (ie model.user). When the user
logs in I typically completely replace the model.user with a new user
instance, which kills the bindings. The only way around this is to
never replace object instances in the model but rather update them.
Thinking this through though, that seems like a ticking time bomb. Any
accidental overwrite of a instance in the model and all the bindings
falls apart.

What I have done in past, pre Cairngorm, applications it to create
Manager classes, based on the Singleton pattern, that can dispatch
events, and perform logic that doesn't really belong in a command or
business delegate. For example an ApplicationManager class that can
dispatch 'loggedIn' and 'loggedOut' events. Any part of the
application can register as a listener and act appropriately upon
receiving the event.

My question then (to get to the point), is using a Manager class like
this considered a best practice in the Cairngorm framework (mindframe)
or is there a better or more acceptable method of doing what I would
like to accomplish?

Thanks in advance for any feedback,

Derrick




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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Forcing class inclusion in applications

2006-10-24 Thread Derrick Grigg
Has anyone had any luck using the -includes option or the 
node in an external config file to get the flex compiler to include
certain classes that are not directly referenced in the main
application. I have tried everything I can think of, searched
everywhere for answers, and all I find are more questions.

Any help would be very much appreciated.

Derrick





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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Custom Cell Renderer for Rows of a DataGrid

2006-10-23 Thread Derrick Grigg
I do not believe there is any way to have variable row
renderers. You could use a datagrid with one column
and make that a complex itemrenderer that could toggle
the 'row' based on some data value. That would likely
be your best option.

Derrick

------
Derrick Grigg
[EMAIL PROTECTED]
www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Architecting a large, modular Flex application

2006-10-20 Thread Derrick Grigg
Hey Vito,

I would suggest creating Module 4 as a seperate Flex Project, which
you can create an SWF from. Have you shell application use the
SWFLoader to load the Module4.swf instead of adding Module4.swc as an
RSL. This will make the module development easier (since you can
compile,run and test seperate from the main app) and also give you
some options with regards to preventing the modules from being cached
by the browser.

I have not had any problems with the Debug mode, could be because I'm
loading the seperate SWF's instead of using SWCs.

Derrick

-----
Derrick Grigg
www.dgrigg.com
[EMAIL PROTECTED]




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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Label rotations, text disappears

2006-10-19 Thread Derrick Grigg
You need to an embed the font anytime you rotate text.

Derrick

--
Derrick Grigg
[EMAIL PROTECTED]
www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Drag and Drop tutorials/Samples of mixed types of dragging

2006-10-18 Thread Derrick Grigg
The DragManager's purpose is to allow drag/drop
functionality for moving data around, not for just
moving components from place to place. That is
probably why you are having such a time with it. The
DragManager use's a DragProxy which is basically a
snapshot of what you want to move/drag, but it is not
the original you are moving.

Here's a quick sample that will let you drag the
original component (a small red box) around and drop
it onto two seperate canvases. Whichever canvas gets
dropped onto changes to green. Hope this helps
you out.


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




 

 



 



Good luck

Derrick

--
Derrick Grigg
[EMAIL PROTECTED]
www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Drag and Drop tutorials/Samples of mixed types of dragging

2006-10-17 Thread Derrick Grigg
There is a decent sample in the online Flex docs of
dragging an image around.

http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=0967.html

General overview of the drag manager and usage
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=0967.html

I have found the drag manager to be pretty easy to use
and useful, however when using the datagrid/lists and
dragging between them, using anything other than the
default drag proxy becomes painful. You can work
around it by extending the datagrid class and
overwriting the dragProxy setter/getter to use a
different one instead.

Good luck,

Derrick

------
Derrick Grigg
[EMAIL PROTECTED]
www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: CFC to AS3 Class Mapping

2006-10-16 Thread Derrick Grigg
Hey Adam,

Thanks for tip, it worked. I'm sure I tried that before with no
success, but it worked today, maybe I had something else missing
previously.

Derrick




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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: CFC to AS3 Class Mapping

2006-10-16 Thread Derrick Grigg
Hey Adam,

Sorry, I should clarify (for those who run across this), the 'alias'
attribute in the CFComponent was what I added from your post that made
it work. I set it to match exactly the alias in the AS file and
presto, worked like a charm.

Derrick




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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: e4x and namespaces

2006-10-13 Thread Derrick Grigg
You can access the information using either the wildcard namespace
operator:

var title: String = xmlResponse.*::channel.*::title;

or by the namespace (you may need to test the different namespaces to
find the right one, my experience has been to use the one without a
prefix) :

var ns:Namespace = new Namespace("http://www.mydomain.com/myown/";);
default xml namespace = ns;

var title: String = xmlResponse.channel.title;

Derrick Grigg
-
www.dgrigg.com

--- In flexcoders@yahoogroups.com, "Diego Guebel"
<[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I'm trying to read some nodes with e4x and was dealing with the
syntax for  
> the namespaces for a while without luck. I could read the node when
it has  
> only one namespace, but dont know how is the syntax when I have more
> 
> I have an xml like this:
> 
>xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
>   xmlns="http://www.mydomain.com/myown/";
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> 
>   
>   iTunes 10 New Releases
>   http://phobos.apple.com/WebObjects/MZStore.woa/wa/
viewNewReleases?pageType=newReleases&id=1
>   iTunes Store: Today's 10 Newest 
> Releases
>   en
>   Copyright 2006 Apple Computer, Inc.
> 
> 
> Any clue?
> Thanks, Diego.
>





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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] CFC to AS3 Class Mapping

2006-10-12 Thread Derrick Grigg
I was having a great deal of difficultly getting my CFC classes to map
properly to my AS3 classes. I found a few posts here that dealt with
the issue but nothing seemed to work properly. 

I discovered one key thing that made it all work. In the AS3 class
file I needed two Remote Class mappings and they had to be in the
correct order. 

[RemoteClass(alias="cftest.com.uservo")]
[RemoteClass(alias="cftest.com.UserVO")]

The all lower case one had to be first, the camel case one second.
Once I did that everything worked perfectly.

I have come across a few snippets here and there in my searching that
mentioned this problem, a few mentioned it was a problem with CF that
should be fixed. 

Does anyone know if this problem has been resolved yet? I am running
version 7,0,2,142559  of CF.

Derrick




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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Catching selectedIndex in ItemRenderer

2006-10-11 Thread Derrick Grigg
I have an itemrenderer in which I want to change the visual state
based on whether or not the row the itemrenderer is in is selected.
Aside from adding a 'change' event listener to the 'parent.parent'
(datagrid) in the itemrenderer and then comparing the
datagrid.selectedIndex against the itemrenderer.listData.rowIndex in
the change handler, is there any other (or better) way to do this?

Derrick






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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: e4x with XMLListCollections?

2006-10-04 Thread Derrick Grigg
I ran into a similar problem when using xml data returned from a web 
service. You need to either use the wildcard namespace or declare 
and add one on to the result. I found it easier just to use the 
wildcard.

myCollection.*::source.*::trainingEvent.*::trainingEventInstance.*::
(@keyID == instanceID).parent()[EMAIL PROTECTED]; 

or something to that effect should do the trick

http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwh
elp.htm?href=1918.html

Derrick Grigg
-
www.dgrigg.com

--- In flexcoders@yahoogroups.com, "Clare Todd" <[EMAIL PROTECTED]> 
wrote:
>
> I have a hunk of XML that I have loaded into an 
XMLListCollection.  It describes a training course catalog.  I'm 
trying to write a function to return the title of a course when 
passed the "KeyID" of a specific course instance, and am running 
into all sorts of problems (it ain't working being the worst of 
them).
> 
> Here's the XML:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ... it's loaded into an XMLListCollection called myCollection 
using HTTP service with resultFormat=e4x
> 
> I'm trying to ignore the trainingEventID attribute, since it might 
be going away.  I was trying to do some e4x magik to find the title 
like this, where the parameter is the KeyID of the 
trainingEventInstance:
> 
> public function getCourseTitle( instanceID:Number ):String {
>return myCollection.source.trainingEvent.trainingEventInstance.
(@keyID == instanceID).parent()[EMAIL PROTECTED];
>   }
> 
> so when the function is passed 4, it returns "Miter Saw Safety"
> 
> Am I doing something wrong?  Can I not e4x using the "source" 
property?  Any thoughts?  Thanks!
>







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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: Can I force a redraw of my dataGrid?

2006-10-04 Thread Derrick Grigg
I don't think you can add metadata like the bindable property at 
runtime, it has to be declared/defined in a class. Using the binding 
utils is a way to compensate for not having declared bindable 
properties. 

Personally I prefer to use VO's and bindable properties, overall a 
much cleaner solution than generic objects and the binding utils.

Derrick Grigg
-
www.dgrigg.com

--- In flexcoders@yahoogroups.com, "livinginswitzerland" 
<[EMAIL PROTECTED]> wrote:
>
> Derrick,
> Thanks again, and once again, you have led me to another 
question.  
> I'm aware of using the bindable metatag, and also am using the 
> binding.utils.bindProperty method to handle some other bindings I 
> need manually, but I'm now wondering if i can do the following:  
Can 
> I create an Object, and as I create properties on that Object, 
tell 
> the property to be bindable, in ActionScript.  I'm assuming the 
> metatag tells the compiler to create the necessary watchers, but 
it 
> would be really nice if that were a property I could set while I'm 
> dynamically creating properties of an Object...something like:
> 
> var myObj:Object = new Object();
> myObj.publisher = '';
> myObj.publisher.bindable=true;
> 
> Using the binding.utils.bindProperty method works great when I 
know 
> exactly the two locations between which I want to share data, but 
it 
> isn't as nice as creating a typed class within an ArrayCollection 
as 
> bindable that you can easily fit into (and broadcast changes to) a 
> datagrid.   
> 
> 
> >
> > A typed value object is basically an object that matches to some 
> data
> > entity you are working with. You create a class to define the 
> entity,
> > give it properites (that are bindable) and then put instances of 
> that
> > class into the ArrayCollection instead of non descript Objects
> > 
> > ie
> > 
> > class BookVO {
> >[Bindable]
> >public var title: String;
> > 
> >[Bindable]
> >public var author: String;
> > 
> >[Bindable]
> >public var ISBN: String;
> > 
> >public function BookVO():void {
> > 
> >}
> > }
> > 
> > ... and then loop through the results from the webservice and 
for 
> each
> > item, create a new BookVO, fill in the properties and add that 
to 
> the
> > ArrayCollection. I imagine you are probably currently doing 
> something
> > similiar to 
> > 
> > var book = new Object();
> > book.author = xmlNode.ItemAttributes.author;
> > book.title =  xmlNode.ItemAttributes.title;
> > book.ISBN =  xmlNode.ItemAttributes.ISBN;
> > 
> > This is certainly very easy to start with, but in the long run 
> causes
> > more headaches for a variety of reasons.
> > 
> > By using typed objects with bindable properties, it leverages 
the 
> Flex
> > components awareness of changes in those objects, basically the
> > components listen to the objects for changes, which means you 
don't
> > have to manually refresh things when changes happen.
> > 
> > Derrick Grigg
> > -
> > www.dgrigg.com
> > 
> > --- In flexcoders@yahoogroups.com, "livinginswitzerland"
> >  wrote:
> > >
> > > Thanks Derrick...
> > > 
> > > I had tried invalidateDisplay list, but not 
invalidateList..which 
> did 
> > > it.  interesting.  when you say typed value objects...can you 
> elaborate 
> > > on that?  I am doing some 'non standard' things, and all of my 
> data is 
> > > read into an ArrayCollection via a web service, but i'm not 
using 
> XML 
> > > but text instead.  Curious if what you are saying regarding 
typed 
> value 
> > > objects is something i'm bumping up against.
> > > 
> > > thanks again!
> > > 
> > > -rick
> > > 
> > > --- In flexcoders@yahoogroups.com, "Derrick Grigg"  
> wrote:
> > > >
> > > > I think you can use the 'invalidateDisplayList()'  or 
possibly 
> > > > the 'invalidateList()' to refresh your datagrid.
> > > > 
> > > > Alternatively, if you use typed value objects in the 
> dataProvider any 
> > > > changes to those, should automatically be reflected (and 
> viewed) in 
> > > > the DataGrid if you are using databinding.
> > > > 
> > > > Derrick Grigg
> > > > 
> > > > www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: Can I force a redraw of my dataGrid?

2006-10-03 Thread Derrick Grigg
A typed value object is basically an object that matches to some data
entity you are working with. You create a class to define the entity,
give it properites (that are bindable) and then put instances of that
class into the ArrayCollection instead of non descript Objects

ie

class BookVO {
   [Bindable]
   public var title: String;

   [Bindable]
   public var author: String;

   [Bindable]
   public var ISBN: String;

   public function BookVO():void {

   }
}

... and then loop through the results from the webservice and for each
item, create a new BookVO, fill in the properties and add that to the
ArrayCollection. I imagine you are probably currently doing something
similiar to 

var book = new Object();
book.author = xmlNode.ItemAttributes.author;
book.title =  xmlNode.ItemAttributes.title;
book.ISBN =  xmlNode.ItemAttributes.ISBN;

This is certainly very easy to start with, but in the long run causes
more headaches for a variety of reasons.

By using typed objects with bindable properties, it leverages the Flex
components awareness of changes in those objects, basically the
components listen to the objects for changes, which means you don't
have to manually refresh things when changes happen.

Derrick Grigg
-
www.dgrigg.com

--- In flexcoders@yahoogroups.com, "livinginswitzerland"
<[EMAIL PROTECTED]> wrote:
>
> Thanks Derrick...
> 
> I had tried invalidateDisplay list, but not invalidateList..which did 
> it.  interesting.  when you say typed value objects...can you elaborate 
> on that?  I am doing some 'non standard' things, and all of my data is 
> read into an ArrayCollection via a web service, but i'm not using XML 
> but text instead.  Curious if what you are saying regarding typed value 
> objects is something i'm bumping up against.
> 
> thanks again!
> 
> -rick
> 
> --- In flexcoders@yahoogroups.com, "Derrick Grigg"  wrote:
> >
> > I think you can use the 'invalidateDisplayList()'  or possibly 
> > the 'invalidateList()' to refresh your datagrid.
> > 
> > Alternatively, if you use typed value objects in the dataProvider any 
> > changes to those, should automatically be reflected (and viewed) in 
> > the DataGrid if you are using databinding.
> > 
> > Derrick Grigg
> > 
> > www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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




[flexcoders] Re: Click Event in Item Renderer... firing a second barrel ?!

2006-10-02 Thread Derrick Grigg
Since both events 'click' events, the event is bubbling up from the 
renderer to the main application. In order to stop it you need to do 
an event.preventDefault(), event.stopPropagation() or 
event.stopImmediatePropagation() in the first event handler to stop 
the event bubbling.

http://livedocs.macromedia.com/flex/2/langref/flash/events/Event.html

http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/w
whelp.htm?context=LiveDocs_Parts&file=00000475.html



Derrick Grigg
--
www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: Can I force a redraw of my dataGrid?

2006-10-02 Thread Derrick Grigg
I think you can use the 'invalidateDisplayList()'  or possibly 
the 'invalidateList()' to refresh your datagrid.

Alternatively, if you use typed value objects in the dataProvider any 
changes to those, should automatically be reflected (and viewed) in 
the DataGrid if you are using databinding.

Derrick Grigg

www.dgrigg.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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Datagrid catching changes in dataprovider

2006-10-02 Thread Derrick Grigg
I have a DataGrid that has it's DataProvider set to an ArrayCollection
that is defined in a ModelLocator (I'm using Cairngorm). The
ArrayCollection has defined ValueObjects in it. When I make a change
to any of the ValueObjects in the ArrayCollection, the DataGrid is
updated (via binding) and the changed values are displayed. 

What I want to do is catch the data changing so that I can also update
some text around the DataGrid that notes the total number of items in
the DataGrid vs. the total number that meet a certain criteria. 

Is there a way to listen for changes to the underlying data in a
DataGrid? I have tried the valueCommit and dataChange but they do not
seem to get fired when a change the ArrayCollection happens.






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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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




[flexcoders] Re: centering popups to the application, not a container object?

2006-09-30 Thread Derrick Grigg
Use 'DisplayObject(Application.application)' as the parent argument 
when you use the PopupManager.createPopUp(), or PopupManager.addPopUp
()

Derrick
---
www.dgrigg.com


--- In flexcoders@yahoogroups.com, "aaron smith" 
<[EMAIL PROTECTED]> wrote:
>
> is there a way that you can center a popup to the entire 
application. I
> don't see anything in the docs. I don't neccessarily want to 
center it to
> whatever is opening the pop-up.  I guess what i mean is moving it 
to dead
> center, not center to the opening object.
> 
> thanks all
> smith
>







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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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




[flexcoders] Re: Architecting a large, modular Flex application

2006-09-28 Thread Derrick Grigg
Hi Paul,

That is exactly my concern. I haven't been able to test the RSL
caching thoroughly but experience tells me it will happen. I was
hoping that I could somehow modify the url that the RSL uses but I
have not found a way to do that. I am starting to think that what may
be required is a seperate swf that duplicates the RSL contents, but
gets loaded from a command in the application, as opposed to some code
that the compiler generates. That would allow modification of the URL
to prevent against caching.

Derrick


--- In flexcoders@yahoogroups.com, Paul Spitzer <[EMAIL PROTECTED]> wrote:
> 
> Certainly. The caching issue I'm referring to is when a new RSL SWF is 
> published and pushed to a server the end user may not immediately see 
> the new SWF. Or, more accurately the users browser may load the old 
> version of the SWF from the browser cache and not the more recent from 
> the server.
> 
> Does that make sense?
> 





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

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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





[flexcoders] Re: Architecting a large, modular Flex application (with Cairngorm)

2006-09-28 Thread Derrick Grigg
Hi Carlos,

Actually the application I am developing (the one that started this
thread) is built on Cairngorm.

In order to give the seperate modules access to Cairngorm and core
application classes (ie models, commands) I have put our core
application classes and the Cairngorm classes and in an RSL. This
allows any of the modules to access all the key pieces of the main
application. As each module gets loaded into the application shell,
they register events/commands with the main application controller. As
far as unloading goes I have not dealt with that (for now). In the
application, modules only get loaded as users need them, but not
unloaded. 

All in all it is a fairly straightforward process, BUT, you do need to
have a really good architecture plan before you start because it can
get a little confusing as to which pieces are where. Also,
understanding RSLs and how to use external libraries is hugely beneficial.

Derrick

--- In flexcoders@yahoogroups.com, "Carlos Rovira" <[EMAIL PROTECTED]>
wrote:
>
> Hi to all,
> 
> I was following this thread with interest since there is very useful
info.
> 
> One thing that you are not talking about at the moment is about Modular
> Cairngorm Apps. Cairngorm is a great framework for monolithic flex
apps, but
> if you try to modularize it you don't have the necesary artifacts to
> accomplish the task (or maybe I can't find those).
> 
> if you make a module, you should have a way to add commands and add
services
> on the fly. And the same as you remove a module you should have a way to
> unregister commands and services. Maybe the shell application should
build
> the main MVC structure and let modules contribute its own commands,
services
> and so on as soon as are loaded. But it seems that nothing of this
are taked
> into account in the microarchitecture. Maybe that would be a topic of
> interest for many people and a subject fot Steven, Ali and others next
> article.
> 
> Maybe someone has invest time in this subject?
> 
> Best,
> 
> C.
> 
> 
> 
> On 9/28/06, Anatole Tartakovsky <[EMAIL PROTECTED]> wrote:
> >
> >   Paul,
> > *>>*
> > *Certainly. The caching issue I'm referring to is when a new RSL
SWF is
> > published and pushed to a server the end user may not immediately see
> > the new SWF. Or, more accurately the users browser may load the old
> > version of the SWF from the browser cache and not the more recent from
> > the server.
> > <<*
> >I think browser cache should recognise new RSL. You can use any
HTTP
> > tracer to verify that every application startup causes appropriate
HTTP
> > request and get 304 and 200 codes. I am not aware of any problems
so far.
> > >>
> > *Certainly. The caching issue I'm referring to is when a new RSL
SWF is
> > published and pushed to a server the end user may not immediately see
> > the new SWF. Or, more accurately the users browser may load the old
> > version of the SWF from the browser cache and not the more recent from
> > the server.
> > *<<
> > I would like to confirm that there is a problem first. Also,
please refer
> > to initialize method for Preloader object - by subclassing it you
can mangle
> > URLs  any way you like.
> >
> > Sincerely,
> > Anatole
> >
> >
> > On 9/27/06, Paul Spitzer <[EMAIL PROTECTED]> wrote:
> > >
> > >   Anatole Tartakovsky wrote:
> > > > Paul,
> > > > Could you please clarify your question - it seems that there are
> > > > number of issues that are mixed up here. First, there is no
issue of
> > > > RSL caching in the browser unless you specifically enable some
> > > > expiration scheme.
> > >
> > > Certainly. The caching issue I'm referring to is when a new RSL
SWF is
> > > published and pushed to a server the end user may not
immediately see
> > > the new SWF. Or, more accurately the users browser may load the old
> > > version of the SWF from the browser cache and not the more
recent from
> > > the server.
> > >
> > > Does that make sense?
> > >
> > > >
> > > > I have seen people loading multiple applications side by side
- using
> > > > the same RSLs - that is essentially the question if you want to
> > > > isolate your runtime libraries in case of versioning in the
future -
> > > > that would essentially hurt performance
> > > >
> > > > Finally, there is an issue of loading RSLs in the root appDomain -
> > > > essentially you do not have a chance to do reloading of the
classes
> > > > till the application startup. Also, there is obvious problem with
> > > > versioning.
> > > >
> > > > Seems we are done with the client - now the question is how to
build
> > > > RSLs so it is the smallest, most recent, and up to date one.
> > > >
> > > > That's were it breaks in the beginning. Essentially, if you
are using
> > > > dynamic instantiation of any class in the RSL, the main
application
> > > > would not know whic objects to initialize/which dependent
classes to
> > > > include. One solution we are using is to build self initializing
> > > > modules and use them instead of RSLs that would o

[flexcoders] Re: Architecting a large, modular Flex application

2006-09-25 Thread Derrick Grigg
Thanks everyone. Using Flex Builder I created a new flex library
project, added the cairngorm source files (com/adobe/cairngorm) and in
the project properites, set all the libraries in 'Flex Build
Path/Library Path' to 'external'. This reduced the compiled swc from
around 350k to 6k. Plugged the new swc into a project and everything
worked great.

--- In flexcoders@yahoogroups.com, "Dirk Eismann" <[EMAIL PROTECTED]> wrote:
>
> 76k? That seems quite large - mine is 9290 bytes only.
>  
> You may want to add the rpc.swc and utilities.swc to the external
library path as the two SWCs add another bunch of dependencies to the
resulting SWC file.
>  
> Dirk.
> 
> 
> 
> 
>   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas
>   Sent: Sunday, September 24, 2006 8:00 PM
>   To: flexcoders@yahoogroups.com
>   Subject: RE: [flexcoders] Re: Architecting a large, modular Flex
application
>   
>   
>   The cairngorm2-config.xml is used by the compiler to know which
classes/MXML files to compile (which it finds under the src folder).
>
>   the -external-library-path option will use those file during
compile time but not include them in the resulting SWC.
>
>   my cairngorm.swc is 76k.
>
>   Dimitrios Gianninas
>   RIA Developer
>   Optimal Payments Inc.
>
> 
> ________
> 
>   From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Derrick Grigg
>   Sent: Thursday, September 21, 2006 11:45 AM
>   To: flexcoders@yahoogroups.com
>   Subject: [flexcoders] Re: Architecting a large, modular Flex
application
>   
>   
> 
>   Hey Dimitrios,
>   
>   I have tried using the 'compc' compiler that ships with Flex2, but I
>   am still getting an SWC for cairngorm that's around 350k. Using the
>   'compc' compiler, the syntax is a little different from your file's
>   but I think it's all correct. I have noticed two differences:
>   
>   1. you include '${SDK_LIB}/fds.swc' which I'm assuming is Flex Data
>   Services. I don't have that swc on my system, however I do have
>   rpc.swc, which my library will not compile without.
>   
>   2 you use a config filevalue="-load-config+=${basedir}/cairngorm2-config.xml"/> which I also
>   can not find anywhere in the Cairngorm package I downloaded from Adobe
>   labs. Is this a file you have created to exclude certain classes?
>   
>   Derrick
>   
>   --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> , "Dimitrios Gianninas"
>wrote:
>   >
>   > 
>   > Now that I am back in the office, here is the full ant command we
>   use to compile cairngorm and exclude all unneccesary libraries:
>   > 
>   >> dir="${BUILD}" 
>   > vmlauncher="false"
>   > failonerror="true">
>   > 
>   > 
>   >  
value="-external-library-path+=${SDK_LIB}/playerglobal.swc,${SDK_LIB}/framework.swc,${SDK_LIB}/fds.swc"/>
>   > 
>   >  
>   > 
>   > 
>   > Dimitrios Gianninas
>   > RIA Developer
>   > Optimal Payments Inc.
>   > 
>   > -Original Message-
>   > From: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> 
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ]
>   On Behalf Of Dimitrios Gianninas
>   > Sent: Tuesday, September 19, 2006 6:26 PM
>   > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
>   > Subject: RE: [flexcoders] Architecting a large, modular Flex
application
>   > 
>   > Hi,
>   > 
>   > I think you have setup things pretty much the same way I would.
>   Although I have never gone that far... yet :)
>   > 
>   > One thing I did notice which you can change is that you said the
>   entire flex framework gets included in the cairngorm.swc ... doesn't
>   have to be. I build the carngorm.swc using the command-line compiler
>   and made sure to exclude the framework.swc, this did reduce the size
>   and is basically what I think you want to do. Don't remember the exact
>   switch, will have to get that to you tomorrow once I'm back in the
office.
>   > 
>   > Regards,
>   > 
&

[flexcoders] Re: Architecting a large, modular Flex application

2006-09-21 Thread Derrick Grigg
Hey Dimitrios,

I have tried using the 'compc' compiler that ships with Flex2, but I
am still getting an SWC for cairngorm that's around 350k. Using the
'compc' compiler, the syntax is a little different from your file's
but I think it's all correct. I have noticed two differences:

1. you include '${SDK_LIB}/fds.swc' which I'm assuming is Flex Data
Services. I don't have that swc on my system, however I do have
rpc.swc, which my library will not compile without.

2 you use a config file  which I also
can not find anywhere in the Cairngorm package I downloaded from Adobe
labs. Is this a file you have created to exclude certain classes?

Derrick


--- In flexcoders@yahoogroups.com, "Dimitrios Gianninas"
<[EMAIL PROTECTED]> wrote:
>
> 
> Now that I am back in the office, here is the full ant command we
use to compile cairngorm and exclude all unneccesary libraries:
> 
>dir="${BUILD}" 
>   vmlauncher="false"
>   failonerror="true">
>   
>   
>   
>   
>  
> 
> 
> Dimitrios Gianninas
> RIA Developer
> Optimal Payments Inc.
> 
> -Original Message-
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Dimitrios Gianninas
> Sent: Tuesday, September 19, 2006 6:26 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Architecting a large, modular Flex application
> 
> Hi,
> 
> I think you have setup things pretty much the same way I would.
Although I have never gone that far... yet :)
> 
> One thing I did notice which you can change is that you said the
entire flex framework gets included in the cairngorm.swc ... doesn't
have to be. I build the carngorm.swc using the command-line compiler
and made sure to exclude the framework.swc, this did reduce the size
and is basically what I think you want to do. Don't remember the exact
switch, will have to get that to you tomorrow once I'm back in the office.
> 
> Regards,
> 
> Dimitrios Gianninas
> Optimal Payments Inc.
> 
> 
> -Original Message-
> From: flexcoders@yahoogroups.com on behalf of derrickgrigg
> Sent: Tue 9/19/2006 11:23 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Architecting a large, modular Flex application
>  
> I just want to bounce this idea/concept off the larger Flex
community to see if there are any holes or possibly better solutions.
> 
> I am currently working with a team of developers on a large, modular
Flex application based on the Cairngorm framework. One issue that we
are trying to get our heads around is creating the application in a
modular fashion (ie seperate SWFs for application modules). Each
module will only get loaded as needed by the main shell application in
order to keep the overall size and memory use as small as possible. 
> 
> The big issue that we are running into is how to setup and develop
the module flex projects in Flex Builder. We need to give the module
projects access to the models, value objects etc (especially bindable
> properties) that they need from the main application without having
the actual application implemented version of those classes get
compiled into the module swfs and causing problems when they get
loaded into the main application. Our current thinking is that in
order to allow the modules to have full access to the models, value
objects, etc that have been defined in the main application we create
Abstract versions of those classes and put them in a seperate flex
library project which will get compiled as an SWC and get included
into the seperate modules as a runtime shared library (RSL), basically
an library of Abstract classes only (and maybe some Interfaces). The
module projects will also include the Cairngorm.swc as an RSL in order
to have access to the interfaces etc that are defined there and
provide the neccessary hooks into the main application. 
> 
> The main application will have all of it's models, value objects etc
extend the abstract classes that are defined in the Abstract RSL
library. The main application will also use the cairngorm.swc as an
RSL to ensure that the module swfs load properly when called upon (ie
they won't throw a run time shared library error because they can't
find the cairngorm.swc). This results in a download hit because the
entire flex framework gets downloaded in the cairngorm.swc but we do
not see any way around that.
> 
> Any feedback, comments, etc from any of you would be greatly
appreciated.
> 
> Regards,
> 
> Derrick
> 
> 
> 
> 
> 
> 
> 
> -- 
> WARNING
> ---
> This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient.  No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message.  If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system.  The reading, distribution, c

RE: [flexcoders] Object properties

2005-10-13 Thread Derrick Grigg
Try the code below, you'll need to put a TextArea somewhere on screen
with the id="trace_txt".

trace_txt.text = 'Object type: ' + typeof(obj) + '\n';
for (var p in obj){
trace_txt.text += p + ' - ' + obj[p] + '\n';
}

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alban Soupper
Sent: Thursday, October 13, 2005 8:14 AM
To: Flexcoders (E-mail)
Subject: [flexcoders] Object properties

Hi all,
is there a way to get the property list and the type of an object?

Best regards,
Alban.



***

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager to [EMAIL PROTECTED]


***




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



 







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

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

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

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

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






RE: [flexcoders] PopupManager.createPopUp - varying the className argument

2005-10-07 Thread Derrick Grigg
Thanks Matt and Jester
 
No luck though. The background of my app goes white the first time this 
function gets called, and the app completely disappears the second time. If I 
put hard codeed class names in everything works. I have come up another 
solution that seems to work. Each option that calls the loadWin function is 
based on a class so instead of dispatching an event to loadWin I am having the 
class use popupmanager to open it's respective window.
 
 var win1: views.elements.image;
 var win2: views.elements.swf;
 var win3: views.elements.text;
 
 function loadWin(event){
  var cn:String = "views.elements."+ event.target.type;
  var initObj = {
   helpButton: true,
   stateButton: true,
   resizeButton: true,
   closeButton: true
  }
  var win = mx.managers.PopUpManager.createPopUp( _root, _global[cn], true, 
initObj, false ); 
  win.centerPopUp(_root);
 }
 
Thanks for the help though.



From: flexcoders@yahoogroups.com on behalf of Matt Chotin
Sent: Fri 07/10/2005 10:44 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className 
argument



Also you need to make sure that the class still gets linked into your app.  
Create some dummy variables of the potential types that could be loaded:

 

Var linkhelper1:MyWindow1;

Var linkhelper2:MyWindow2;

 

Etc.

 

Matt

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Friday, October 07, 2005 7:38 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] PopupManager.createPopUp - varying the className 
argument

 

Close!

var yourClass:String = "Pooki";
PopUpManager.createPopUp(this, _global[yourClass], false);

- Original Message ----- 
From: "Derrick Grigg" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 07, 2005 10:04 AM
Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className 
argument


Tried the string idea, no luck. The switch/if looks like the only way. I was 
hoping not to have to do that since I want to have a lot of variability on 
the user's window options but not luck apparenetly.

Thanks.



From: flexcoders@yahoogroups.com on behalf of Mink, Joseph
Sent: Fri 07/10/2005 9:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className 
argument


I would guess you could use a string...like, instead of ...createPopUp( 
_root, SomeClass, true, initObj, false ); maybe you could do createPopUp( 
_root, "SomeClass", true, initObj, false );

But I would guess your best bet is to arrange your implementation in such a 
way that you can just go through a few if-statements and based on your 
user's input, execute the necessary call to createPopUp.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of derrickgrigg
Sent: Friday, October 07, 2005 9:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PopupManager.createPopUp - varying the className 
argument


I have a instance where I want to vary the pop window that gets
created based on a user's selection. Instead of having to hard code in
the a seperate instance of:

var popup = mx.managers.PopUpManager.createPopUp( _root,
views.OptionX, true, initObj , false );

in a switch statement I would like to just be able to use a variable
for the className argument.

Ideally I would like to do the following:

var winClass = options_cmb.value;
var popup = mx.managers.PopUpManager.createPopUp( _root, winClass,
true, initObj, false );

I have tried unsuccessfully using a shared libray. Does anyone know if
this is even possible, and it so how I would go about it.






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





YAHOO! GROUPS LINKS



* Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> " 
on the web.

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

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
<http://docs.yahoo.com/info/terms/> .








--
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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 





SPONSORED LINKS 
Web site design development 
<http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development

RE: [flexcoders] PopupManager.createPopUp - varying the className argument

2005-10-07 Thread Derrick Grigg
Tried the string idea, no luck. The switch/if looks like the only way. I was 
hoping not to have to do that since I want to have a lot of variability on the 
user's window options but not luck apparenetly.
 
Thanks.



From: flexcoders@yahoogroups.com on behalf of Mink, Joseph
Sent: Fri 07/10/2005 9:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className 
argument


I would guess you could use a string...like, instead of ...createPopUp( _root, 
SomeClass, true, initObj, false ); maybe you could do createPopUp( _root, 
"SomeClass", true, initObj, false );
 
But I would guess your best bet is to arrange your implementation in such a way 
that you can just go through a few if-statements and based on your user's 
input, execute the necessary call to createPopUp.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
derrickgrigg
Sent: Friday, October 07, 2005 9:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PopupManager.createPopUp - varying the className argument


I have a instance where I want to vary the pop window that gets 
created based on a user's selection. Instead of having to hard code in 
the a seperate instance of:

var popup = mx.managers.PopUpManager.createPopUp( _root, 
views.OptionX, true, initObj , false );

in a switch statement I would like to just be able to use a variable 
for the className argument. 

Ideally I would like to do the following:

var winClass = options_cmb.value;
var popup = mx.managers.PopUpManager.createPopUp( _root, winClass, 
true, initObj, false );

I have tried unsuccessfully using a shared libray. Does anyone know if 
this is even possible, and it so how I would go about it.






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





YAHOO! GROUPS LINKS 



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







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

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

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

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

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

RE: [flexcoders] Naming Conventions..

2005-07-13 Thread Derrick Grigg
A good starting point. 

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

I have used this as our team's development practices for Flash and Flex
development.

--
Derrick Grigg
Senior Solution Architect
 
Email: [EMAIL PROTECTED]
Tel: 416-204-0342
Toll Free: 1-866-262-5966 ext. 342
Fax: 416-204-3660
 
www.innovasium.com


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Barnes
Sent: Tuesday, July 12, 2005 8:54 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Naming Conventions..


Hi one and all,

I've been thinking as of late with regards to my FLEX development,
mainly concerned with sepration of various tiers into some at-a-glance
naming conventions.

Basicall, for a while i've lived with the following Concept:

/views/security/AttachUserDialog.mxml
/views/security/SecuritySwitchBoard.mxml
/views/security/LoginForm.mxml

etc.

Thats fine, but i've decided as of late to fine tune some of the
conventions used, mainly as i'm putting together the dreaded "Flex
Coding Guidelines" for internal user.

I've been reading Apples "User Experience" documentation (which is
probably the most impressive, freely available doco online) and i've
been taking a page out of their book in terms of UI classications (that
and Macromedia partially).

URL:
http://developer.apple.com/documentation/LegacyTechnologies/Conceptual/A
quaHIGuidelines/index.html


To ellobrate, i've adopted naming prefixes like the following:

/views/security/Dialogs/dlAttachUser.mxml
/views/security/Dialogs/dlLogin.mxml
/views/security/swSecurity.mxml

and so on..

Q. What's everyones thoughts on putting together a "Flex Conventions"
doco? and anyone care to contribute their ideas for such an idea? Or is
it a waste of time and really not a widely requested aspect of
developing in flex?

-- 
Regards,
Scott Barnes
http://www.mossyblog.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 Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

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

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

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