[flexcoders] Re: How do I call a custom tooltip function for my TabBar items?

2008-03-03 Thread Daniel Gold
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

Re: [flexcoders] Best practice for filtering a large dataset

2008-03-26 Thread Daniel Gold
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

Re: [flexcoders] How to scroll to/navigate to an object in an app??

2008-03-31 Thread Daniel Gold
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

Re: [flexcoders] Sizing when dealing with custom borderSkin

2008-04-02 Thread Daniel Gold
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

Re: [flexcoders] How to display a button's icon from a remote source?

2008-04-05 Thread Daniel Gold
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,

Re: [flexcoders] How to display a button's icon from a remote source?

2008-04-06 Thread Daniel Gold
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

Re: [flexcoders] Drop anywhere to remove

2008-04-06 Thread Daniel Gold
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

Re: [flexcoders] Drop anywhere to remove

2008-04-06 Thread Daniel Gold
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

Re: [flexcoders] Need to change the viewstack from a child container

2008-04-06 Thread Daniel Gold
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

Re: [flexcoders] Flex newbie stuck with DataGrid headerRenderer

2008-04-06 Thread Daniel Gold
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

[flexcoders] Initializing styles for custom border skin

2008-04-07 Thread Daniel Gold
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 =

Re: [flexcoders] Cairngorm ModelLocator array filter...

2008-04-14 Thread Daniel Gold
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

Re: [flexcoders] Re: Cairngorm ModelLocator array filter...

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] MVC - Philosophical question

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] View States Vs using the visible flag with multiple UI components..

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] pulling my hair out with e4x!!!

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] BindingUtils question

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] Re: BindingUtils question

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] Re: BindingUtils question

2008-04-15 Thread Daniel Gold
={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

Re: [flexcoders] pulling my hair out with e4x!!!

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] pulling my hair out with e4x!!!

2008-04-15 Thread Daniel Gold
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

Re: [flexcoders] Collections with common source

2008-04-16 Thread Daniel Gold
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

Re: [flexcoders] Re: addEventListener and additional arguments?

2008-04-16 Thread Daniel Gold
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

Re: [flexcoders] Re: A script has executed for longer than the default timeout period of 15 seconds

2008-04-16 Thread Daniel Gold
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

Re: [flexcoders] how to access current xml node name

2008-04-22 Thread Daniel Gold
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'

[flexcoders] Determining visible and total rows in a List

2008-04-22 Thread Daniel Gold
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

Re: [flexcoders] Live tiling

2008-04-22 Thread Daniel Gold
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

Re: [flexcoders] Could the Flex Gurus shed some light on this behavior?

2008-04-23 Thread Daniel Gold
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,

Re: [flexcoders] Having difficulties cloning content within Loader Control

2008-04-23 Thread Daniel Gold
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

Re: [flexcoders] Bindable metadata too smart for its own good!

2008-04-25 Thread Daniel Gold
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

Re: [flexcoders] Re: [Bindable] - Can I specify many vars Bindable in one block?

2008-04-28 Thread Daniel Gold
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

Re: [flexcoders] E4X vs Array Collection

2008-05-01 Thread Daniel Gold
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

Re: [flexcoders] Re: DataGrid and exporting values

2008-05-01 Thread Daniel Gold
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

Re: [flexcoders] ListCollectionView.contains()

2008-05-01 Thread Daniel Gold
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

Re: [flexcoders] Sort a List Comp?

2008-05-01 Thread Daniel Gold
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

Re: [flexcoders] Re: Extending Alert

2008-05-01 Thread Daniel Gold
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

Re: [flexcoders] itemUpdated() functionality for XML properties?

2008-05-06 Thread Daniel Gold
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,

Re: [flexcoders] What happens to objects when you change state?

2008-05-08 Thread Daniel Gold
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]

Re: [flexcoders] Drag and Drop (modify default dragProxy)

2008-05-12 Thread Daniel Gold
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();

Re: [flexcoders] Re: How do I dispatch an everything PropertyChangeEvent on this?

2008-05-18 Thread Daniel Gold
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

Re: [flexcoders] Re: How do I dispatch an everything PropertyChangeEvent on this?

2008-05-18 Thread Daniel Gold
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

Re: [flexcoders] Listening for a value change

2008-06-02 Thread Daniel Gold
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

Re: [flexcoders] Reflect column sorting in AdvancedDataGrid

2008-06-07 Thread Daniel Gold
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]

Re: [flexcoders] Re: Itemrenderer combo's dataprovider from ModelLocator???

2008-06-07 Thread Daniel Gold
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

Re: [flexcoders] Measurement and scrolling

2008-06-07 Thread Daniel Gold
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

Re: [flexcoders] Re: How to remeasure itemRenderer

2008-06-07 Thread Daniel Gold
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:

[flexcoders] Listening for mainScreen changes in AIR

2008-06-09 Thread Daniel Gold
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

Re: [flexcoders] Attaching custom data to events (while avoiding race condition)

2008-06-09 Thread Daniel Gold
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

Re: [flexcoders] Re: Attaching custom data to events (while avoiding race condition)

2008-06-09 Thread Daniel Gold
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

Re: [flexcoders] SWF Size Concerns

2008-06-09 Thread Daniel Gold
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

Re: [flexcoders] Re: Attaching custom data to events (while avoiding race condition)

2008-06-09 Thread Daniel Gold
, 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

[flexcoders] Is an event dispatched when an AIR app is closing?

2008-06-21 Thread Daniel Gold
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

[flexcoders] Re: Is an event dispatched when an AIR app is closing?

2008-06-21 Thread Daniel Gold
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

Re: [flexcoders] Re: Is an event dispatched when an AIR app is closing?

2008-06-22 Thread Daniel Gold
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

[flexcoders] Can no longer quit my AIR app

2008-06-23 Thread Daniel Gold
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

[flexcoders] Re: Can no longer quit my AIR app

2008-06-24 Thread Daniel Gold
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

Re: [flexcoders] Re: selecting a pre-determined row in a datagrid

2008-06-26 Thread Daniel Gold
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

Re: [flexcoders] synchronous events in flex

2008-06-28 Thread Daniel Gold
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

Re: [flexcoders] Custom Event Not Dispatched

2008-06-28 Thread Daniel Gold
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

Re: [flexcoders] Re: Best Practice Data Binding

2008-06-28 Thread Daniel Gold
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

Re: [flexcoders] Custom Event Not Dispatched

2008-06-28 Thread Daniel Gold
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

Re: [flexcoders] what is PropertyChangeEventt.PROPERTY_CHANGE used for?

2008-06-29 Thread Daniel Gold
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

Re: [flexcoders] Setting up custom component listener

2008-06-30 Thread Daniel Gold
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

[flexcoders] Still having issues with quitting AIR app from ApplicationMenu and DockMenu

2008-07-01 Thread Daniel Gold
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

Re: [flexcoders] Re: Setting up custom component listener

2008-07-01 Thread Daniel Gold
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

Re: [flexcoders] Re: Can no longer quit my AIR app

2008-07-02 Thread Daniel Gold
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

Re: [flexcoders] Re: Can no longer quit my AIR app

2008-07-05 Thread Daniel Gold
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

Re: [flexcoders] Stump the Flex Nerd: Getting reference to the set method of a property

2008-07-09 Thread Daniel Gold
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

Re: [flexcoders] Re: mxml to swf on a J2EE server

2008-07-09 Thread Daniel Gold
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

Re: [flexcoders] Why are icons typed as Classes and not just class factories?

2008-07-09 Thread Daniel Gold
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,

Re: [flexcoders] Calling AS3 functions

2008-07-11 Thread Daniel Gold
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.

Re: [flexcoders] Quickie: Round some container's corners

2008-07-14 Thread Daniel Gold
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:

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Daniel Gold
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,

Re: [flexcoders] When not to use weak references?

2008-07-14 Thread Daniel Gold
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

Re: [flexcoders] DataGrid Header Styles

2008-07-15 Thread Daniel Gold
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}

Re: [flexcoders] Flex, Cairngorm callback function

2008-07-15 Thread Daniel Gold
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,

Re: [flexcoders] Transparent Application Background

2008-07-16 Thread Daniel Gold
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

Re: [flexcoders] arrayCollection event COLLECTION_CHANGE issues?

2008-07-17 Thread Daniel Gold
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;

Re: [flexcoders] attaching one instance of a displayobject to multiple containers

2008-07-21 Thread Daniel Gold
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

Re: [flexcoders] Measurement and scrolling

2008-07-23 Thread Daniel Gold
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

Re: [flexcoders] Execute click programmatically

2008-07-29 Thread Daniel Gold
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

Re: [flexcoders] Sorting an XMLList on an attribute

2008-07-30 Thread Daniel Gold
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

Re: [flexcoders] How to block user interaction?

2008-07-31 Thread Daniel Gold
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,

Re: [flexcoders] Re: Load Complete on tilelist

2008-07-31 Thread Daniel Gold
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

Re: [flexcoders] How to block user interaction?

2008-07-31 Thread Daniel Gold
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

Re: [flexcoders] How to temporarily stop a dataProvider from updating UI

2008-07-31 Thread Daniel Gold
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

Re: [flexcoders] How to temporarily stop a dataProvider from updating UI

2008-07-31 Thread Daniel Gold
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

Re: [flexcoders] How to temporarily stop a dataProvider from updating UI

2008-07-31 Thread Daniel Gold
. -- *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

Re: [flexcoders] How to block user interaction?

2008-07-31 Thread Daniel Gold
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

Re: [flexcoders] Determine client performance (not with any accuracy)?

2008-07-31 Thread Daniel Gold
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

Re: [flexcoders] Re: How to temporarily stop a dataProvider from updating UI

2008-08-01 Thread Daniel Gold
! --- 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

Re: [flexcoders] Is it possible to put a custom component inside itself?

2008-08-04 Thread Daniel Gold
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

[flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Daniel Gold
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.

Re: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Daniel Gold
, 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

Re: [flexcoders] Must call super.commitProperties at END of overrided commitProperties when extending TitleWindow?

2008-08-06 Thread Daniel Gold
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

Re: [flexcoders] Re: Observing collections

2008-08-14 Thread Daniel Gold
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