What kind of children are you adding to the TabBar? I have a tabbed
based app where the children all extend Panel and are located in
separate MXML files. I simply set the toolTip=Custom tooltip text in
the attribute of the root MXML tab and each child shows its own
tooltip when hovered. Is that
Well my thought was that it would actually be quicker to do it on the client
since the data is there, instead of asking the server to filter and return
matching IDs into the dataset I already have, so filtering under a progress
bar on the client would be a better user experience to me.
So
With a reference to the object you can get it's coordinates within the
container that is scrolling. If it is nested you will have to get its index
withing it's parent container, convert that to global coordinates, then
convert that to the local coordinates of the scrolling container. From there
So what is the approach to use for non-rectangular borders? If someone has
some good resources for programmatic border skins I'll happily digest them,
I've read anything I can find.
So let's say I've got a VBox and I create a custom skin that tapers the
right side into a point. I extend Border
I get asked this by new Flex developers I work with all the time, especially
people from a more traditional web development background who are not used
to embedding assets.
Here's something that bugged me a while back and I never took the time to
look into: So the button icon takes a Class,
Sure switching on the type of an argument to a setter would work, for some
reason I thought the 'source' on an image was a style instead of a property.
I try to expose as many styles as possibly for custom components so they're
easily skinnable in CSS, but I guess there's no way to expose a style
I would think you'd have to write completely custom drag functions that
listen for mouse down on your component, and then on mouse move keep
listening for the target to not be your container, as soon as it isn't,
accept the DragDrop and start listening for mouse up to handle the removal.
I keep
in order for your drag anywhere to be
implemented. Each container has to explicitly accept the drop with
DragManager.acceptDragDrop()
On Sun, Apr 6, 2008 at 9:08 AM, Daniel Gold [EMAIL PROTECTED] wrote:
I would think you'd have to write completely custom drag functions that
listen for mouse down
if your structure is that simple, in the child you could do
parent.selectedChild = newChild. It depends in what scope the code is
executing. If your viewstack and children are defined in a single MXML file,
then in a script block myviewstack would still be in scope and
myviewstack.selectedChild
I've seen a few different approaches to the checkbox grid. Alex has a clean
implementation, but without the select all header renderer. I believe Josh
Tynjala has a few checkbox list components as well
http://www.zeuslabs.us/
My take on the checkbox datagrid with a header renderer can be found
I'm apparently still having problems grasping custom border skins. I'm
extending RectangularBorder and I have a few custom CSS styles declared for
my class. I'm trying to set defaults for these styles using the static
function method
private static const DEFAULT_STYLE_NAME:String =
depends on your architecture and what feels best in your project. Problem
with filtering an ArrayCollection directly in the model is that any views
bound to that model will also be filtered. Usually I have a large dataset in
an ArrayCollection in the model, and have a view that might have a search
I probably do a little more work in views than other people. Our commands
have a great deal of logic but most of that is for client/server
communication. We have a fairly large application where most of the model
data is shared. In my case it really doesn't make sense to have an event and
a
I'm with Glenn on this. We use Cairngorm in our project, and since service
lookup/communication is a delegate job it fits in well there. Our delegates
grab a hold of a ServiceManager specific to the service it needs to send
data to, and that ServiceManager has a send function that takes a few
I think if you wanted to reuse a single DataGrid and states, you would have
to keep multiple Arrays representing the columns each DataGrid needed, and
in your states set the columns property of the DataGrid to the appropriate
Array of columns, and then set the dataProvider to the appropriate
worked for me using this:
debugModel.employees.node.(@display == Employee First Name)
On Tue, Apr 15, 2008 at 10:43 AM, Derrick Anderson
[EMAIL PROTECTED] wrote:
can someone please explain why this does not return an XMLList?
public var debugModel:XML = mergefields display=Merge Fields
Binding will not work with dynamic objects, which it sounds like you're
using. I have a feeling your invisible text field trick is only working when
you switch selectedItem. Seems like if you kept the same item selected and
the TYPE property changed on that item, the binding would not fire, but
to learn
and understand how Binding works. If you know of a good tutorial or
explanation, could you please let me know.
Thanks
Dominic
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
Gold [EMAIL PROTECTED]
wrote:
Binding will not work with dynamic objects, which
={myCustomObj.status}/
In the case above, I cannot get the text to update when the object
updates. Do I need the class to dispatch a specific event to trigger
the binding to update?
Thanks
Dominic
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
Gold [EMAIL PROTECTED]
wrote
I've never used the attribute syntax you're using, so I'm not familiar with
it, but in your first employee example this syntax returned the matching
node, have you tried it?
debugModel.employees.node.(@display == Employee First Name)
looks like you added another level in your latest example so
was
not showing it.
thanks for your help on this!
d.
On Tue, Apr 15, 2008 at 2:53 PM, Daniel Gold [EMAIL PROTECTED]
wrote:
I've never used the attribute syntax you're using, so I'm not familiar
with it, but in your first employee example this syntax returned the
matching node, have you
I've used that approach many times. Store the data in a central model, views
each have a local ArrayCollection with a filterFunction and the source set
to the data in the model.
On Wed, Apr 16, 2008 at 12:37 PM, Richard Rodseth [EMAIL PROTECTED]
wrote:
Hi
I'm working on a dashboard where
Encapsulation is a good thing. The events themselves should hold all the
data you need about the action as Ben said above. If you create new custom
events you should make sure they have storage for all the properties any
listener would need to know about what triggered the event, etc. If there's
When I get large datasets back from the server that could trigger multiple
times, I add them to a WorkQueue which is a simple singleton class. It has
an Array of tasks and a timer that fires every 200ms, it pops the next task
off the Array and executes it. The Task object itself takes a Function
should just be able to do xmlObj.name();
On Tue, Apr 22, 2008 at 8:58 AM, Derrick Anderson
[EMAIL PROTECTED] wrote:
i have a function which accepts XML as an argument, how can i retrieve
the root node name for that XML?
so if the xml was node2 attrib1=asdf... i need to get the 'node2'
If I want to add paging information to a list, ie there are 10 items in view
and 40 total so you are on page 1/4, what is the best way to get that data.
Obviously length of the dataProvider will give me total items, but how can I
see how many are currently visible? Looks like there is a protected
I've extended the Flex Dashboard from Adobe Devnet for a few applications.
Pretty easy to take out the ability to close/minimize and you'd be left with
a tiling container that supports maximization and drag/drop re-ordering.
http://www.adobe.com/devnet/flex/samples/dashboard/dashboard.html
You
I believe since the content is a DisplayObject, it's just falling under
normal Flex parenting rules, a child can only have a single parent, so using
the same content actually re-parents the content object to the new
SWFLoader. If your navigation window is just a small preview of the total
app,
I believe you can draw any DisplayObject onto a BitmapData instance and get
an Image that way. So something like
var bmpData:BitmapData = new BitmapData();
bmpData.draw(loaderObject.content);
var bmp:Bitmap = new Bitmap(bmpData);
var image:Image = new Image();
image.source = bmp;
that's all
you're telling the flash player when to fire bindings on the listeners for
your property. Sure, if you don't want to use their binding mechanism you
could hook it all up yourself, but you'd have to make all your classes
explicitly listen for the custom events you're firing. If you specify a
custom
Just be sure to use it wisely. If you have a class with 25 variables and
only 4 variables that really need to be Bindable, you're going to be
generating a lot of wasted code. Binding is great when you need it, but I
see a lot of classes where the [Bindable] tag is thrown at the top out of
laziness
It doesn't get any faster than a typed class as far as data access, but
there are some things to think about. To get the data into the typed class
you have to parse the XML at some point, so it will probably come down to
how often each property is accessed. If you're only going to hit each
Is the server round trip a huge problem? I have a loopback CSV servlet
that I hit quite often in our application. Most of our datagrids are
subclassed and have an Export CSV button at the bottom. Simple function to
convert all the rows to CSV and send it the server as a parameter to a
contains is an object comparison, so it is by reference except when dealing
with primitives I believe. The collection wouldn't know how you wanted to
compare your objects so you'll have to iterate and check the relevant
properties or extend a collection class, add a containsByValue, and have
your
The List is simply the view for your data. You need to sort the dataProvider
of the list so when the List is iterating over your data rendering it, it
will be accessing the data in the order specified.
I would pull the data from lastResult, store it in an ArrayCollection or
This peaked my interested and I quickly flipped through the Alert class to
see what was going on. Nothing really caught my attention so it seems like
this is enforced by the MXML compiler. I verified this by adding an Alert in
AS without using the static show funciton. In a simple test application
I believe I've seen XMLChangeWatchers used in generated source to listen for
attribute changes, etc, on XML data. I think the DataBinding chapter of the
Flex developers guide claims you can only bind to XML attributes and changes
in MXML, but at some point it gets compiled to AS.
On Mon, May 5,
Cepends on what your states are defined to do, but sounds like you're adding
and removing children on the state change, which is pretty common. The view
objects will still be in memory, just not on the display list and with no
parent.
On Thu, May 8, 2008 at 10:31 AM, David Ham [EMAIL PROTECTED]
I think if you wanted to modify the default drag proxy you could subclass
DataGrid and override the get dragImage function, which looks like this (in
Flex 2.01)
override protected function get dragImage():IUIComponent
{
var image:DataGridDragProxy = new DataGridDragProxy();
I've done it that way before, although sometimes its better to create an
updateAll() method, because now all of your bindings will fire when a
single property changes since your entire class is Bindable on the same
event. Just depends on exactly what the use case is, if your class is set up
with
member is updated, or that simply all members will be
marked as changed when any one of them is?
Cheers,
-J
On Mon, May 19, 2008 at 6:02 AM, Daniel Gold [EMAIL PROTECTED]
wrote:
I've done it that way before, although sometimes its better to create
an updateAll() method, because now all
It sounds like you need to set up a ChangeWatcher, take a look at the docs,
but basically you can listen for updates to a property on an object and call
a function when the update occurs
On Mon, Jun 2, 2008 at 9:01 AM, Felipe Fernandes
[EMAIL PROTECTED] wrote:
Jeff,
Look at setter and
I think if you create a Sort with the SortField that the server is sorting
by and apply that to the dataProvider, the DataGrid will check if that field
is a field in a DataGridColumn and display the sort arrow on that column.
On Fri, Jun 6, 2008 at 7:57 AM, Dennis van Nooij [EMAIL PROTECTED]
I believe in using MVC in whatever way feels right for the application. A
lot of times it's just easier to grab an instance of the model from wherever
you need it.
That being said, whenever possible I try to follow the pattern of top level
display objects referencing the model and then handing
You may want to look at the code in PodLayoutManager.as from the Flex
Dashboard example as it seems to be very similar to what you're doing
http://examples.adobe.com/flex3/devnet/dashboard/main.html
On Fri, Jun 6, 2008 at 12:04 AM, Josh McDonald [EMAIL PROTECTED] wrote:
Measure can always
Sometimes when I've had issues setting breakpoints, especially in an SWC,
it's a caching issue with Firefox. I've installed the developer toolbar
extension and disabled caching which has helped tremendously with that
problem.
On Thu, Jun 5, 2008 at 12:40 PM, Alex Harui [EMAIL PROTECTED] wrote:
Are there any events raised when the mainScreen is changed in an AIR
application? I've noticed this happens if you're using Spaces in OS X and
therefore assume it happens when using similar virtual workspace
applications under Windows and Linux. For raising notification windows, etc,
I would like
does determineFlag() do some asynch service call? If so you need to wait and
raise an event or update a var in a model and listen for changes that way.
Otherwise your determineFlag() method will run to completion before the
loader.loadSomeStuff() line is executed, Flash is single threaded for user
that make any sense?
-R
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
Gold [EMAIL PROTECTED] wrote:
does determineFlag() do some asynch service call? If so you need to
wait and
raise an event or update a var in a model and listen for changes
that way.
Otherwise
did you have any TitleWindows previously? My guess is the code size increase
is due to extra components from the framework library being compiled into
your project. Add another TitleWindow component that is similar and see what
the code size increase.
From some other applications I've worked with
,
Daniel Gold danielggold@ wrote:
It makes sense when dealing with concurrent programming, but Flash
is single
threaded and you won't have a case where multiple threads are task
switching
and simultaneously executing functions. Every function call and event
handler in flex is basically
I'm working on an online/offline AIR app and was wondering if there was any
way to detect that an AIR app is closing so I can cache my data models? If
the user closes the app while online and then opens it later offline, I'd
like them to have access to the last data set. I could achieve this by
Nevermind. Didn't find it right away because my AIR app is based off
mx:Application and is chromeless, but I can listen for the closing event
on the main Window I spawn and cache the data there.
On Sun, Jun 22, 2008 at 12:31 AM, Daniel Gold [EMAIL PROTECTED] wrote:
I'm working on an online
this a hack, I'm simply using a lighter weight root tag because I don't
need the extended functionality of WindowedApplication at that level of the
app.
On Sun, Jun 22, 2008 at 10:15 AM, Amy [EMAIL PROTECTED] wrote:
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Daniel Gold [EMAIL
AIR updated itself this morning, and now it seems I can no longer quit an
app I'm developing using Apple-Q on my Mac or by choosing Quit from the
Dock/Menu bar. It is quite possible something in my code broke this but I
haven't found any likely culprits yet.
Has anyone seen an issue like this in
is anyone else seeing this? If I click the close button on my main window
the application will exit, but choosing Quit from menu bar or dock icon
seems to do absolutely nothing?
On Mon, Jun 23, 2008 at 3:49 PM, Daniel Gold [EMAIL PROTECTED] wrote:
AIR updated itself this morning, and now
list's have a selectedItem property that does the comparison for you to find
the index and select it, so according to your description you could set
grid.selectedItem = selectedItem(the var you're keeping)
On Thu, Jun 26, 2008 at 7:04 AM, bray_6 [EMAIL PROTECTED] wrote:
You can use
since you're making a service call the return will be asynchronous, but you
can still accomplish what you want to do. Your service call, this case
send() on the HTTPService, will return an AsyncToken which you can regiser
an IResponder to, specifying a result and fault method that will be called
If you're not listening for the event directly on the component that will be
dispatching it, you need to toggle the 'bubbles' property so that the event
will will trigger handlers up the display list from where it was dispatched.
So in your case change your dispatch line to:
dispatchEvent( new
The only difference in what you're doing in the two examples is declaring a
custom event in the second example. As Doug said, you can place the Binding
metadata tag over the getter or the setter, it makes no difference. If you
don't declare a custom event, an extra set of functions will be wrapped
Message -
From: Daniel Gold [EMAIL PROTECTED] danielggold%40gmail.com
To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
Sent: Sat, 28 Jun 2008 10:16:29 -0500
Subject: Re: [flexcoders] Custom Event Not Dispatched
If you're not listening for the event directly on the component
It is used as the default Binding event and you can create one using the
static method createUpdateEvent on the PropertyChangeEvent class
var changeEvent:PropertyChangeEvent =
PropertyChangeEvent.createUpdateEvent(changedObject,changedProperty,oldVal,newVal);
dispatchEvent(changeEvent);
That
add the listener on creationComplete of your component to ensure the
component is not null. creationComplete of the Application should be OK too,
but probably best practice to just add it on the component.
On Mon, Jun 30, 2008 at 8:14 PM, Merrill, Jason
[EMAIL PROTECTED] wrote:
Such a
I gave up on this temporarily and decided to revisit this morning. Around
the time the AIR 1.1 update came out, I started having issues quitting the
AIR app I'm developing using Apple-Q, the ApplicaitonMenu, and the DockMenu.
It seems to be related to the fact that I have other windows opened by
I had never used it either, and did a quick search before taking the easy
way out on my original response with creationComplete on the component. From
everything I've read applicationComplete is pretty much the last event
dispatched during the bag bang. I found this link (not sure how
and look at
keystrokes. If someone presses Apple-Q, dispatch a click event to the
close box of the main window.
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
Gold [EMAIL PROTECTED] wrote:
AIR updated itself this morning, and now it seems I can no longer
quit an
app I'm
be
looking for the updater patch. Thanks again.
On Sat, Jul 5, 2008 at 9:46 AM, Paul Evans
[EMAIL PROTECTED] wrote:
On 2 Jul 2008, at 15:32, Daniel Gold wrote:
I'm looking for potential culprits so I can file a well documented
bug report.
Are you using ApplicationUpdaterUI ?
There's
What are you attempting to do with the reference to the setter? Maybe
there's some other workaround since I haven't seen a way to get a reference
to it, but also haven't really found a need to.
On Wed, Jul 9, 2008 at 2:43 PM, Charlie Hubbard [EMAIL PROTECTED]
wrote:
Ok, I think I've got a
I've started using velo's mojos to build with Maven. Working great so far
and he seems to be working on it quite a bit.
http://code.google.com/p/flex-mojos/
On Wed, Jul 9, 2008 at 3:49 PM, pankajtandon2003 [EMAIL PROTECTED]
wrote:
Thanks Douglas and Tracy!
That was good information.
Any
Have a look at Ben Stucki's work, it may solve your icon problems.
http://blog.benstucki.net/?p=42
As far as getting a class reference from an instance, you could use
getQualifiedClassName on the instance to get the name, and then pass that to
getDefinitionByName to get the class
On Wed, Jul 9,
All AS code needs to be inside the curly braces and you need to concatenate
your static string to the string returned from your function
mx:Text text={returnEmail() + ' is logged on'} /
On Fri, Jul 11, 2008 at 7:06 PM, Scott [EMAIL PROTECTED] wrote:
I'm working on a logon class in Flex 3.
Sounds like he may want to choose which corners are rounded, an area where
the framework is definitely lacking.
I always look to Degrafa for advanced CSS skinning like that.
Pick up the library here: http://code.google.com/p/degrafa/downloads/list
Then you can create a css style like this:
I've hit a few places in the past and will attempt to drudge them up, but no
warranties here.
How about a case where you create a timer as a local variable in a function
and add a weak listener. Since there are no strong references to the Timer I
beilieve it is eligible for garbage colleciton,
I would agree that's not a best practice for writing timer code, just the
quickest example I could think of. When people read about how bad strong
references are and how they cause memory leaks, they tend to make EVERYTHING
weak which can lead to some nasty problems. Since you can't control the
That seems like over kill for such a simple thign
Welcome to Flex!
I can never get the textRollOverColor to work on the header. Here's a stab
at a simple renderer that just grabs the textRollOverColor style from the
DataGrid
?xml version=1.0 encoding=utf-8?
mx:Label text={_listData.label}
I've worked on two fairly large Flex projects at two different jobs and we
had a Cairngorm callback pattern similar to UMs as well (before the UM
extensions were released)
In my mind I justify it as still being fairly decoupled. The view is
creating the event and stuffing in parameters anyways,
Are you wanting the application to be transparent as in showing what's
'under' it on a page? If so have fun. I've seen Flash ads do this on
websites and it looks like they actually discern the bitmap data for that
section of the page and use that as the background. If you see one of these
ads
You're initializing the acUser collection when the singleton is created and
adding a listener, which is fine. However, when you're getting the results
back, you're changing the acUser collection reference to a different
ArrayCollection
GlobalVars.instance.acUser = event.result as ArrayCollection;
A display object can only have a single parent, so you will have to have two
instances.
On Mon, Jul 21, 2008 at 3:31 PM, blc187 [EMAIL PROTECTED] wrote:
Is there a way to attach a displayobject to more than one container?
I have a canvas that I instantiated and drew onto, but I want to
I'm surprised we don't hear more public complaints about how Flex deals with
scrollbars and not resizing children when a scrollbar is added, ESPECIALLY
if the children are relatively laid out.
The last large project I worked on we got so tired of adding fudge factor
padding for the vertical
are you using the MouseEvent in the event handler? If not, default that
parameter and just call the function directly
private function clickHandler(event:MouseEvent=null):void
{
}
private function otherFunction():void
{
clickHandler();
}
On Tue, Jul 29, 2008 at 8:30 PM, markgoldin_2000
As I understand it, the collections APIs like XMLListCollection and
ArrayCollection don't reorder their source lists at all, they just modify
the way the lists are iterated over to return data in the requested order.
So wrapping an Array in an ArrayCollection, adding a sort, and then trying
to
Whenever I need to do this I usually put up a loading screen that covers the
entire screen or the section of the screen pertaining to the loading data.
This can be done a number of ways such as a full screen Popup, a modal popup
thats just a Loading... label, etc.
On Thu, Jul 31, 2008 at 5:40 PM,
Not to mention that the itemRenderers created probably won't be created and
available in the same frame as the result from the service.
Since the Image controls are in an ItemRenderer, you should probably listen
for Complete as Alex said, and then dispatch a new Event that bubbles so you
can
in the app) or do something all fancy schmancy like Daniel. I've used
both... I just like poking fun at fellow Flexcoders and using the word
'schmancy.'
Rick Winscot
On 7/31/08 7:28 PM, Daniel Gold [EMAIL PROTECTED] wrote:
Whenever I need to do this I usually put up a loading screen that covers
I've seen a lot of posts with performance related to using Bindable
Collections like that. One of the dangerous of having such a useful easy API
for updating controls...
Just to expand on what Alex is suggesting, suppose your service call returns
to a function called updateData, and your control
it to any existing array of data. You shouldn't have
to call refresh unless there is a sort or filter applied.
--
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Daniel Gold
*Sent:* Thursday, July 31, 2008 5:02 PM
*To:* flexcoders
.
--
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Daniel Gold
*Sent:* Thursday, July 31, 2008 5:02 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] How to temporarily stop a dataProvider from
updating UI
I've seen a lot
PM, Daniel Gold [EMAIL PROTECTED]wrote:
My preferred schmancy approach is to put up a full screen loading
component that is so visually intensive that it requires it's own loading
screen that is just slightly less schmancy. Isn't recursion fun?
On Thu, Jul 31, 2008 at 6:41 PM, Rick Winscot
Hmmm, a framework for that could be pretty interesting. Have the ability to
specify certain sections of code/certain components as optional based on a
current performance metric.
As far as metering, could be as simple as listening to ENTER_FRAME and
taking timestamps to determine how long each
!
--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com ,
Daniel Gold
danielggold@
wrote:
I've seen a lot of posts with performance related to using
Bindable
Collections like that. One of the dangerous
Sure, as long as you hit your base case and the constructor actually returns
for the last one you create you'll be fine. Just to test and prove the logic
to yourself, create a static class variable and decrement it each time you
create a new one, check it in the constructor if its 0 declare a new
I don't think I've seen anything like this before and maybe I'm just going
crazy.
I've got a class that extends TitleWindow, it has a few setters and some of
these can affect what the displayed title should be. These all use
invalidation flags and don't get fully committed until commitProperties.
, so super.commitProperties() never
bothers to update _myTitleComponent.title
Result: It *never* makes it to the screen.
-Josh
On Thu, Aug 7, 2008 at 9:25 AM, Daniel Gold [EMAIL PROTECTED] wrote:
I don't think I've seen anything like this before and maybe I'm just
going crazy.
I've got
I definitely put a HUGE comment when moving that call to super to the end of
commitProperties, with a note that I should look into refactoring things to
not set any properties in commit. It may have been the only comment I wrote
this year.
My logic was that I WAS propagating changes in
should all be based on property change events, the heart of binding
On Thu, Aug 14, 2008 at 8:55 AM, Richard Rodseth [EMAIL PROTECTED] wrote:
Oh, I just stepped through Observe, and I guess the standard binding
mechanism calls the source setter again, which calls the handler.
On Thu, Aug
96 matches
Mail list logo