[flexcoders] Re: Tracking a sprite's position

2009-05-08 Thread Tim Hoff
s that's why they're lightweight. > > Thanks guys. I don't want to use much more of your time. I really > appreciate your input and you've given me some good fuel to work with. > > Aaron > > On Thu, May 7, 2009 at 11:40 PM, Tim Hoff timh...@... wrote: > &

[flexcoders] Re: Setting currentState from a function located a child mxml file

2009-05-09 Thread Tim Hoff
While I've also suggested using these in the past, in the spirit of loose coupling, the prefered method would be to dispatch an event, from the component, that would trigger the drillDown method in the parent; where the states are actually located. This way the child doesn't know or care about th

[flexcoders] Re: change color text when doing toggle The button

2009-05-09 Thread Tim Hoff
Use the textSelectedColor style. -TH --- In flexcoders@yahoogroups.com, "ade_huh" wrote: > > hello there. > do u know how to change color text when doing 'toggle function'(it is similar 'selected function') The button? > > thank before >

[flexcoders] Re: Custom component itemRenderer

2009-05-12 Thread Tim Hoff
Yes, you can definetely set properties on an itemRenderer if it is created using ClassFactory. Perhaps a little better than binding the itemRenderer to a model, but it would certainly be debated. -TH --- In flexcoders@yahoogroups.com, Jeffry Houser wrote: > > > I didn't know that, definitely g

[flexcoders] Re: Application Idea

2009-05-13 Thread Tim Hoff
I once had to create an application that had a light bulb button. On mouse over the light bulb turned on. Would that help? -TH --- In flexcoders@yahoogroups.com, kanu kukreja wrote: > > Hello, > > I'm looking for an idea, so that i can create a application on based > on that idea in flash or

[flexcoders] Re: backgroundGradientColors

2009-05-14 Thread Tim Hoff
Hi Thomas, The style is defined in mx.core.Application.as: [Style(name="backgroundGradientColors", type="Array", arrayType="uint", format="Color", inherit="no")] And it is implemented in mx.skins.halo.ApplicationBackground.as: var fillColors:Array = getStyle("backgroundGradientColors"); var fill

[flexcoders] Re: Sorry i am not a rocket scientist...

2009-05-14 Thread Tim Hoff
This might help: http://ntt.cc/2009/02/18/set-background-color-for-headers-of-datagrid.ht\ ml -TH --- In flexcoders@yahoogroups.com, "djhatrick" wrote: > > but how do I remove the header highlight fill from a datagr

[flexcoders] Re: Sorry i am not a rocket scientist...

2009-05-14 Thread Tim Hoff
Looks like it's drawn in the mouseOverHandler function in DataGridHeader.as: drawHeaderIndicator(s, r.x, 0, visibleColumns[i].width, cachedHeaderHeight - 0.5, getStyle("rollOverColor"), r); You'll have to try to extend DataGrid and DataGridHeader, or monkeyPatch DataGridHeader. -TH --- In flex

[flexcoders] Re: Sorry i am not a rocket scientist...

2009-05-14 Thread Tim Hoff
Monkey patching DataGridHeader works. Just copy DataGridHeader.as into mx/controls/dataGridClasses (you'll have to create these folders in the src folder of your project), comment out the drawHeaderIndicator line in the mouseOverHandler function. -TH --- In flexcoders@yahoogroups.com,

[flexcoders] Re: Sorry i am not a rocket scientist...

2009-05-15 Thread Tim Hoff
use.com/?p=14 > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > Monkey patching DataGridHeader works. Just copy DataGridHeader.as into > > mx/controls/dataGridClasses (you'll have to create these folders in the > >

[flexcoders] Re: Sorry i am not a rocket scientist...

2009-05-15 Thread Tim Hoff
uot;highlight". > > If you could skin/style the rollovercolor to be the same as the nonrollovercolor then that should achieve the required result. Of course, I have no idea whether skinning/styles allows that as I have not tried it. > > > --- In flexcoders@yahoogroups.com, &quo

[flexcoders] Re: Form with 3 Custom Components...

2009-05-17 Thread Tim Hoff
There are several techniques that you can use for this; it really depends on what the need is and the sophistication of the application. Personally, I would employ a presentationModel to solve this, but using an MVC framework and VO's can be challenging for some. In this case, using public prope

[flexcoders] Re: Form with 3 Custom Components...

2009-05-18 Thread Tim Hoff
sputing that public properties are a viable approach. Just pointing out that Flex is an event driven framework. -TH --- In flexcoders@yahoogroups.com, "Amy" wrote: > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > There

[flexcoders] Re: Listening for events fired from ArrayCollections

2009-05-18 Thread Tim Hoff
You can change acUsers to a getter/setter and do what you want in the setter. The default setter event is propertyChange, but you can change that to whatever you want. -TH --- In flexcoders@yahoogroups.com, "lampei" wrote: > > Anyone have any suggestions? Seems like something everyone uses at

[flexcoders] Re: Form with 3 Custom Components...

2009-05-18 Thread Tim Hoff
s-EventMaps-Managers. Anyway, that's .02. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Don't agree. The smoke test for tight coupling is that if component A > is tightly coupled to component B and you take away component B, you get > a compiler error

[flexcoders] Re: Form validation before submitting...

2009-05-18 Thread Tim Hoff
import mx.core.UIComponent; private function formIsValid():Boolean { var validForm:Boolean = true; for (var i:int = 0; i < this.numChildren; i++) { if ( UIComponent(this.getChildAt(i)).errorString != "" ) { validForm = false; }

[flexcoders] Re: Form with 3 Custom Components...

2009-05-18 Thread Tim Hoff
ps.com, "Amy" wrote: > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > Don't agree. The smoke test for tight coupling is that if component A > > is tightly coupled to component B and you take away component B, you get >

[flexcoders] Re: Form with 3 Custom Components...

2009-05-18 Thread Tim Hoff
Both classes are still dependent on the event class; you just get it baked in automatically when you use metadata. -TH --- In flexcoders@yahoogroups.com, "Amy" wrote: > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > Not disputing

[flexcoders] Re: Form with 3 Custom Components...

2009-05-18 Thread Tim Hoff
et/2008/04/13/architectural-atrocities-part-x-cair\ ngorms-model-locator-pattern/> . That's why I prefer Mate. -TH --- In flexcoders@yahoogroups.com, "Amy" wrote: > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > A couple mo

[flexcoders] Re: Form with 3 Custom Components...

2009-05-18 Thread Tim Hoff
n, May 18, 2009 at 2:35 PM, Tim Hoff timh...@... wrote: > > > > > > > That's certainly an interesting opinion, but those terms usually go along > > with Cairngorm, which isn't universally accepted as being loosely coupled > > http://blog.iconara.net/2008/04/

[flexcoders] Re: Form validation before submitting...

2009-05-18 Thread Tim Hoff
Yep, good re-factor. -TH --- In flexcoders@yahoogroups.com, Ivan Perez wrote: > > Why not stop and return when validForm just turns false, like this: > > On Mon, May 18, 2009 at 5:54 PM, Tim Hoff timh...@... wrote: > > > > > > > * > > > > impor

[flexcoders] Re: Using RegExp's...

2009-05-18 Thread Tim Hoff
For this particular case, you can catch it before you validate: -TH --- In flexcoders@yahoogroups.com, Laurence MacNeill wrote: > > I want to check to see that data has been entered into a > textInput. Specifically, I want to ensure that only letters, not > spaces, commas, or anything else ha

[flexcoders] Re: Using RegExp's...

2009-05-18 Thread Tim Hoff
I'll let you figure out how to include lower-case letters as well. -TH --- In flexcoders@yahoogroups.com, Laurence MacNeill wrote: > > At 07:01 PM 5/18/2009, you wrote: > > > >For this particular case, you can catch it before you validate: > > > > > > > Good idea -- thanks! > > Laurence MacNeil

[flexcoders] Re: Form validation before submitting...

2009-05-18 Thread Tim Hoff
> >On Mon, May 18, 2009 at 5:54 PM, Tim Hoff > ><<mailto:timh...@...timhoff@... wrote: > > > > > >import > >mx.core.UIComponent; > > > >private function formIsValid():Boolean > >{ > > > > for (var i:int = 0; i < this.nu

[flexcoders] Re: Form validation before submitting...

2009-05-18 Thread Tim Hoff
Almost seems like you'd want to loop through the validators instead, huh? -TH --- In flexcoders@yahoogroups.com, Laurence MacNeill wrote: > > At 07:56 PM 5/18/2009, you wrote: > > > > >Are you sure that you are looking for the children in the correct > >parent? Worked for me. > > > >-TH > > Ahh

[flexcoders] Re: Transition only works once

2009-05-19 Thread Tim Hoff
Try resetting the dimensions of bottomBox back to 0 when you change to the base state; or use widthFrom/widthTo, heightFrom/heightTo on the resize tag. -TH --- In flexcoders@yahoogroups.com, "jimmy5804" wrote: > > I don't use transitions often, so I may be missing something. The transition > w

[flexcoders] Re: Looking for ability to know which item I selected when using Lists

2009-05-19 Thread Tim Hoff
Hi Anthony, Use the itemClick event on the List tag. -TH --- In flexcoders@yahoogroups.com, "a.scavarelli" wrote: > > Hey there, > > I am trying to figure out how to get the data (some text) from a list I have set to editable. It is binded to an array of Strings but I can't figure out how to d

[flexcoders] Re: Form validation before submitting...

2009-05-19 Thread Tim Hoff
Just one technique: using AS, throw the validators into an ArrayCollection on creationComplete. Before you submit, loop through the validators and execute the validate() function on each. If one fails, bail out. The docs can show you how to work with ValidationResultEvent. Also remember that

[flexcoders] Re: Transition only works once

2009-05-20 Thread Tim Hoff
ndle on it. > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > Try resetting the dimensions of bottomBox back to 0 when you change to the base state; or use widthFrom/widthTo, heightFrom/heightTo on the resize tag. > > > > -TH > > >

[flexcoders] Re: Gradient Color in Bar Chart

2009-05-20 Thread Tim Hoff
Hi, Use a gradient "fill" (see docs) for the BarSeries. Alternatively, you could create a custom itemRenderer for the BarSeries. Then use Degrafa or draw the gradient with the drawing api. -TH --- In flexcoders@yahoogroups.com, ak wrote: > > Hi, > > > How can i fill the gradient color in the

[flexcoders] Re: Filtering multiple conditions in an arraycollection

2009-05-23 Thread Tim Hoff
Well, looks like you're on the right track. Just a couple suggestions: 1) In the resultHandler, refresh after you set the filterFunction: myData.filterFunction=processFilter; myData.refresh(); 2) Booleans are easier to read then ints. Also, not sure about the logic

[flexcoders] Re: 2 similar functions. One works, the other doesn't...

2009-05-23 Thread Tim Hoff
The functions look ok, so its probably a problem with the second VO. Since they are so similar, there's probably a mis-spelling due to copy/paste. Also, make sure that the [RemoteClass(alias="com.blah.blah.blah.MyVO")] line is included and correct. -TH

[flexcoders] Re: Multiple events dispatched, data lost

2009-05-24 Thread Tim Hoff
Hi Steve, What's going on in stuffToGetNewAlbum()? -TH --- In flexcoders@yahoogroups.com, "steve horvath" wrote: > > > I have a function which loops and for each iteration dispatches an > event. The event handler is inside a new class (AddSourceCommand). > Inside the event handler class I am d

[flexcoders] Re: Multiple events dispatched, data lost

2009-05-24 Thread Tim Hoff
Nevermind, was looking at it backwards. Usually, you would go through the FrontController, with a second command, for the second Event. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Hi Steve, > > What's going on in stuffToGetNewAlbum()?

[flexcoders] Re: Multiple events dispatched, data lost

2009-05-24 Thread Tim Hoff
Actually yes, what's going on with phSet.id in stuffToGetNewAlbum()? Add a second trace for that field. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Nevermind, was looking at it backwards. Usually, you would go through > the FrontController, wit

[flexcoders] Re: Run time Warning

2009-05-28 Thread Tim Hoff
Hence the warning. Like Array, XML is not bindable. You might try converting the XML to an XMLListCollection. -TH --- In flexcoders@yahoogroups.com, "markgoldin_2000" wrote: > > But my XML is set to bindable. > > --- In flexcoders@yahoogroups.com, "Jake Churchill" jake@ wrote: > > > > Convert

[flexcoders] Re: Flex Data Grid Question

2009-05-28 Thread Tim Hoff
Check out the AdvancedDataGrid control and documentation. -TH --- In flexcoders@yahoogroups.com, guess what wrote: > > > I need to draw a data grid where I need to do paint subtotals and and page total and group by some category . Can anyone provide me witha same xml for this kind of table > >

[flexcoders] Re: data binding in textinput ?

2009-05-28 Thread Tim Hoff
> You could use an onchange event in the text input to fire a function that > would place the myName.text into userName. But if you did that, you'd create > a circular binding which probably wouldn't be good. It wouldn't be an infinite loop; so its not all that bad. -TH --- In flexcoders@yaho

[flexcoders] Re: popup systemManager not working

2009-05-28 Thread Tim Hoff
Popups are not on the same DisplayList as other components; so they have to be treated a bit differently. -TH --- In flexcoders@yahoogroups.com, hoz wrote: > > > Hey guys, > > I added bubbles to true in my custom event, and it worked! OK, so I'm a > little puzzled b/c I have other custom events

[flexcoders] Re: Flex Data Grid Question

2009-05-28 Thread Tim Hoff
> --- On Thu, 5/28/09, Tim Hoff timh...@... wrote: > > > From: Tim Hoff timh...@... > > Subject: [flexcoders] Re: Flex Data Grid Question > > To: flexcoders@yahoogroups.com

[flexcoders] Re: data binding in textinput ?

2009-05-28 Thread Tim Hoff
Ha, now you're just showing off. :) -TH --- In flexcoders@yahoogroups.com, Manish Jethani wrote: > > On Thu, May 28, 2009 at 11:15 PM, luvfotography > ygro...@... wrote: > > How do I get databinding to work in textinput? > > In this example below, I have a TextInput defined with the text bound

[flexcoders] Re: Run time Warning

2009-05-28 Thread Tim Hoff
gt; > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On > Behalf Of Tim Hoff > Sent: Thursday, May 28, 2009 2:35 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Run time Warning > > > > > > > > > > Hence the warning.

[flexcoders] Re: FilterFunction creating duplicate items in the list

2009-05-31 Thread Tim Hoff
Sounds like your itemRenderer might not be clearing out old data correctly. Check out Question 2 in Amy's FAQ: http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf -TH --- In flexcoders@yahoogroups.com, Rohit Shar

[flexcoders] Re: FilterFunction creating duplicate items in the list

2009-06-01 Thread Tim Hoff
ayCollection, because of a filter. Updating the source Array itself would also do the trick. But, you would have to re-cast the ArrayCollection after an update. Just a few thoughts, -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Sounds like your itemRenderer might

[flexcoders] Re: Performance Question

2009-06-03 Thread Tim Hoff
Using the 80-20 rule, loading all of the individuals up-front would be the way to go (even 1000 records is reasonable). It's going to much better handling the search on the client with a filter; instead of making a call for each key-stroke. If the user types fast, it can get very expensive. You

[flexcoders] Re: Creating Link inisde a Data Grid Collumn

2009-06-04 Thread Tim Hoff
If you're creating the column in AS, you'll need to use ClassFactory for the itemRenderer: var urlItemRenderer:ClassFactory = new ClassFactory(com.myPath.urlRenderer); urlItemRenderer.properties = { myItemRendererPublicProperty: myProperty }; myColumnID.itemRenderer = urlItemRenderer; -TH ---

[flexcoders] GoogleMaté Sample Application

2009-06-04 Thread Tim Hoff
Hi all, For any of you interested in learning more about the Maté framework, I've created a sample that's publically available. It's a simple AIR application, but hopefully those that want to learn more about MVC, will get some benefit out of it; especially those

[flexcoders] Re: GoogleMat� Sample Application

2009-06-04 Thread Tim Hoff
Coming, but the only thing that will be different will be the view code. :) -TH --- In flexcoders@yahoogroups.com, "Bjorn Schultheiss" wrote: > > Would be nice with flex 4 and catalyst : ) > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > &

[flexcoders] Re: ArrayCollection to Delimited String

2009-06-04 Thread Tim Hoff
Assuming that you don't want the trailing pipes: private function parseArrayCollection():void { var myString:String = ""; for each ( var myObject:Object in myAC ) { myString += myObject.label + "|" + myObject.data; if ( myAC.getItemIndex( myObject )

[flexcoders] Re: ArrayCollection to Delimited String

2009-06-04 Thread Tim Hoff
yString); } -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Assuming that you don't want the trailing pipes: > > private function parseArrayCollection():void { > > > > var myString:String = ""; > > > > for

[flexcoders] Re: GoogleMaté Sample Application

2009-06-05 Thread Tim Hoff
Thanks Richard, I appreciate it. Most of my good stuff is behind coporate firewalls, so I wanted to put something out there that might help others in the community. Thanks again, -TH --- In flexcoders@yahoogroups.com, Richard Rodseth wrote: > > Looks very clean, Tim! > > I've been itching to c

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-05 Thread Tim Hoff
Hi Jason, Have you tried it from within the itemRenderer? Something like: private var adg : AdvancedDataGrid; override public function set data(value:Object):void { super.data = value; adg = owner as AdvancedDataGrid; } override protected function updateDisplayList( w:Number, h:N

[flexcoders] Re: Question about ArrayCollections

2009-06-05 Thread Tim Hoff
for each ( var item:Object in socketsToMonitor ) { trace(item.ip); } -TH --- In flexcoders@yahoogroups.com, Raymond Brown wrote: > > Here is some code of what I am using today: > > private function startAliveDeadCheck():void { > startMonitor("127.0.0.1", 80); > } > > private function star

[flexcoders] Re: Resource Reference

2009-06-07 Thread Tim Hoff
Hi, In CSS, you usually use ClassReference for a programatic skin. For a Graphical skin use: .bgCanvas { background-image: Embed(source='/localAssets/localIMAGES.IMAGE_ICON128'); } Notice that CSS uses "/" instead of a dot. Does the image file have an extension (.png, .jpg) ? -TH ---

[flexcoders] Re: Wrapping components

2009-06-07 Thread Tim Hoff
Hi Mke, This might be what you're looking for: http://www.munkiihouse.com/?p=60 -TH --- In flexcoders@yahoogroups.com, Mike Chang wrote: > > Hi, > I have a newbie question on layout.I'm looking for a container component > that would "wrap" the components ins

[flexcoders] Re: Resource Reference

2009-06-07 Thread Tim Hoff
oops, didn't read the top all the way. This should work: .bgCanvas { background-image: Embed(source='/localAssets/img/icon128.png'); } -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Hi, > > In CSS, you usually use ClassReference f

[flexcoders] Re: ArrayCollection to Delimited String

2009-06-08 Thread Tim Hoff
for the tip(s). Was able to make this thing work out. > > > > Regards, > > > > Angelo > > > > -- > > *From:* Tim Hoff timh...@... > > *To:* flexcoders@yahoogroups.com > > *Sent:* Friday, 5 June, 2009 14:05:46

[flexcoders] Re: Grab the Current State of a Button

2009-06-08 Thread Tim Hoff
For a ToggleButton, look at the selected property: if ( myButton.selected ) { // my state is down } -TH --- In flexcoders@yahoogroups.com, "ericmaslowski" wrote: > > Hello, > I have been trying to do something very simple here with Flex but have hit a wall. I have several toggle buttons

[flexcoders] Re: ArrayCollection to Delimited String

2009-06-09 Thread Tim Hoff
umns2, Columns3. When I send the array collection to the .NET WebService, the first item in the ArrayList does not necessarily correspond to the first column and so forth. > > Thanks for the pointers. Good to learn a lot lot more. > > > > > ____ &

[flexcoders] Re: Flex and Reporting

2009-06-09 Thread Tim Hoff
Crystal Reports is great for generating data driven .Net reports. But, if you wanted to generate a wysiwyg type of report, that mirrors what the user sees in the flex app, you're going to run into a lot of problems. AlivePDF is good for simple client-side pdf report generation. However, IMHO, i

[flexcoders] Re: How do I Change Event on a CheckBox

2009-06-09 Thread Tim Hoff
Hi Mark, import mx.events.FlexEvent; calendarCheckbox.addEventListener(FlexEvent.VALUE_COMMIT, changeCBF); Notice that this is a FlexEvent; rather than a regular Event. So: private function changeCBF( event:FlexEvent ):void -TH --- In flexcoders@yahoogroups.com, "Mark" wrote: > > I'd like

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Tim Hoff
Just a thought, but what if you call drawHighlightIndicator manually; after you set the variable? Maybe even callLater. -TH --- In flexcoders@yahoogroups.com, Pan Troglodytes wrote: > > 1) Yes, this works fine, for the display portion only. It doesn't address > the actual problem of needing to

[flexcoders] Re: how to fix poor performance in this example (AdvancedDataGrid and Binding)

2009-06-09 Thread Tim Hoff
Nice Paul, So, extend ADG and add a highlightedItem:MyItemVO property that uses a Bindable "highlightedChange" event; with the same getter/setter structure as below. Not sure, in MyADG, if you'd set the highlightedItem on itemRollover or initialte from the itemRenderer, with an Event though; jus

[flexcoders] Re: LinkBar without viewstack

2009-06-10 Thread Tim Hoff
Hi Richard, Here's a ToggleLinkBar control that might suit your needs. Just set the selectedIndex of the control and you're good to go. I used an underline for the non-selected items, but you can take that out if you want. http://www.timothyhoff.com/misc/GMToggleLinkBar.as.html

[flexcoders] Re: Trying to find slide/flip/rotate component

2009-06-10 Thread Tim Hoff
Hi Nate, http://www.efflex.org/ -TH --- In flexcoders@yahoogroups.com, "Nate Pearson" wrote: > > I bookmarked a component a while ago that did some cool slid, flip, rotate stuff on forms. It was a box that kinda moved around. I think there was an option for a TV transi

[flexcoders] Re: LinkBar without viewstack

2009-06-10 Thread Tim Hoff
Cool, here's the implementation: -TH --- In flexcoders@yahoogroups.com, Richard Rodseth wrote: > > Thanks, Tim. I'll take a look. > > On Wed, Jun 10, 2009 at 12:12 PM, Tim hofftimh...@... wrote: > > > > > > Hi Richard, > > > > Here's a ToggleLinkBar control that might suit your needs. Just

[flexcoders] Re: LinkBar without viewstack

2009-06-10 Thread Tim Hoff
Yeah, the control is specific for what I needed in GoogleMate (See FavoritesNavigation). It works for me, but your changes look fine. I suspect that you ran into a problem if the selectedIndex was -1. I should have accounted for that. -TH --- In flexcoders@yahoogroups.com, Richard Rodseth wr

[flexcoders] Re: Dispatch Event Issue on BreadCrumb Trail Click

2009-06-11 Thread Tim Hoff
Hi, If you're not using an MVC framework, an easy way is to create a public method in contentpane.mxml, that will set the tree selection. On breadcrumb click, pass the event: contentpane.myPublicSelectionMethod( event ). -TH --- In flexcoders@yahoogroups.com, "n_manjunatha" wrote: > > Hi, > I

[flexcoders] Re: Dispatch Event Issue on BreadCrumb Trail Click

2009-06-12 Thread Tim Hoff
rumclicked for contentpane. > > Thanks > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > Hi, > > > > If you're not using an MVC framework, an easy way is to create a public > > method in contentpane.mxml, that will set the tree selection. On > > breadcrumb click, pass the event: contentpane.myPublicSelectionMethod( > > event ). > > > > -TH > > >

[flexcoders] Re: ambiguous reference error

2009-06-12 Thread Tim Hoff
Are you by any chance using a getter/setter for the isValid var? If so, you may need to change the setter to public. -TH --- In flexcoders@yahoogroups.com, "[p e r c e p t i c o n]" wrote: > > Hi Tracy,that was a mistake, actually i called it 'isValid' like this > > label="Continue"click="S

[flexcoders] Re: ambiguous reference error

2009-06-13 Thread Tim Hoff
d > Ambiguous reference to MediaProfile. [Generated code (use -keep to save): > Path: com\media\views\MediaProfile-generated.as, Line: 349, Column: 14] > mediaupload Unknown 1244912081333 16143 > > > thanks > > On Fri, Jun 12, 2009 at 3:16 PM, Tim Hoff timh...@... wrote: > &

[flexcoders] Re: ambiguous reference error

2009-06-13 Thread Tim Hoff
; Ambiguous reference to MediaProfile. [Generated code (use -keep to save): > Path: com\media\views\MediaProfile-generated.as, Line: 349, Column: 14] > mediaupload Unknown 1244912081333 16143 > > > thanks > > On Fri, Jun 12, 2009 at 3:16 PM, Tim Hoff timh...@... wrote: > >

[flexcoders] Re: ambiguous reference error

2009-06-13 Thread Tim Hoff
alled MediaProfile.as that has a bindable public var > called isValid > shouldn't this be accessible? > > > > On Sat, Jun 13, 2009 at 10:28 AM, Tim Hoff timh...@... wrote: > > > > > > > > @Timno all methods and vars have to be public in order to

[flexcoders] Re: ambiguous reference error

2009-06-13 Thread Tim Hoff
My advice is to add the -keep compiler argument, build the project, and look at Line: 349 in the generated class MediaProfile-generated.as. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > I think that the error is pointing to mediaupload. Is that a variabl

[flexcoders] Re: ambiguous reference error

2009-06-14 Thread Tim Hoff
flexcoders@yahoogroups.com ups.com] On > Behalf Of [p e r c e p t i c o n] > Sent: Saturday, June 13, 2009 4:06 PM > To: flexcod...@yahoogro <mailto:flexcoders@yahoogroups.com ups.com > Subject: Re: [flexcoders] Re: ambiguous reference error > > > > > > > > oh yes,

[flexcoders] Re: how can I get a popupButton's popUp to resize while popped up?

2009-06-15 Thread Tim Hoff
Hi Jason, Put this at the end of addCategory(): myPopupButton.popUp.scrollRect = new Rectangle(0, 0, myPopupButton.popUp.width, myPopupButton.popUp.height + 30); Add an id: This will trick the popup into redrawing. -TH --- In flexcoders@yahoogroups.com, Pan Troglodytes wrote: > > Okay, so

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-16 Thread Tim Hoff
I'm with you Steve; about using AS for an itemRenderer. I do wonder why you would use addChild in the set data function though; rather than in createChildren . For mxml, this should work Angelo: For the HBox, notice the use of

[flexcoders] Re: how can I get a popupButton's popUp to resize while popped up?

2009-06-16 Thread Tim Hoff
t; grid.height + gr.measuredHeight + (isNaN(verticalGap) ? 0 : > verticalGap)); > > This seems more "right", though if you add some big numbers to height and > width it will always auto-calc them. But I found if you add numbers that > are too small, you wind up with it cho

[flexcoders] Re: how can I get a popupButton's popUp to resize while popped up?

2009-06-16 Thread Tim Hoff
an the > window its in, then you're screwed! You'd have to implement your own "don't > grow when bigger than this and turn on scrollbars instead" logic. Luckily I > don't need that right now. > > On Tue, Jun 16, 2009 at 10:20 AM, Tim Hoff timh...@... wr

[flexcoders] [Bindable] public var - getter/setter hybrid

2009-06-16 Thread Tim Hoff
Consider these two options for creating an accessor in Flex: Public Var: [Bindable] public var searchResults:ArrayCollection; Getter/Settter: [Event( name="searchStringChange", type="flash.events.Event" )] private var _searchResults:ArrayCollection; [Bindable( event="searchResultsChange" )

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-16 Thread Tim Hoff
or" wrote: > > I use addChild in the set data function only because I always have. > > I have built hundreds of renderers this way and none of them have given me a problem. If there's a good reason why I shouldn't do it this way, I'm all ears. > > > --- In fl

[flexcoders] Re: how can I get a popupButton's popUp to resize while popped up?

2009-06-16 Thread Tim Hoff
r that old post. Can't believe it was "years ago"! > Where does the time go? > > Oh, that's right, the bugs in my program eat most of it! > > > On Tue, Jun 16, 2009 at 11:08 AM, Tim Hoff timh...@... wrote: > > > > > > > > > Ha, wha

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-16 Thread Tim Hoff
spacers in between controls. :) > > Regards, > Angelo > > > > > > From: Tim Hoff timh...@... > To: flexcoders@yahoogroups.com > Sent: Tuesday, 16 June, 2009 23:18:09 > Subject: [flexcoders] Re: Binding two elements in a single datag

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-17 Thread Tim Hoff
he example using createChildren ? > > > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > > > > > > Yes, createChildren will only execute once; while set data will execute > > many times. Perhaps it's not a problem if the same child gets

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-17 Thread Tim Hoff
bly not fair to spread bad habits like this to others; that are just learning. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Ok, here's how I would do it; with efficiency and best-practice in mind: > > http://www.timothyhoff.com/projects/AgeItemRendererSa

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff
rers (And other components) to be more efficient. > > From a new users perspective, if I had seen your item renderer when I first started using Flex, I would have been totally intimidated and probably tried very hard never to need an item renderer. > > > --- In flexcoders@yahoogroups.co

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff
x27;ve learned from it; as well as others following along. On this specific issue though, I stand by my assertions completely. Anyway, nice discussing this with you Steve. No hard feelings. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Very well, you go with that.

[flexcoders] Re: Creating a new ListEvent - how to specify ItemRenderer?

2009-06-18 Thread Tim Hoff
Look at the itemFocusIn ListEvent. -TH --- In flexcoders@yahoogroups.com, "flexcoder2008" wrote: > > I have a List that handles a Click event - the ClickEvent takes a ListEvent, > and inside that handler I have access to the ListEvent's itemRenderer > property. > > This allows me to align a b

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff
Yep, should have said, those that don't implement IDataRenderer, IListItemRenderer and/or IDropInListItemRenderer manually. Nice snype. -TH --- In flexcoders@yahoogroups.com, "Amy" wrote: > > --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote: > >

[flexcoders] Re: Creating a new ListEvent - how to specify ItemRenderer?

2009-06-18 Thread Tim Hoff
The list has to editable in order to use that event though. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > Look at the itemFocusIn ListEvent. > > -TH > > --- In flexcoders@yahoogroups.com, "flexcoder2008" djohnson29@ wrote: > > > &

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Tim Hoff
Hi Patrick, private function resizeDataGrid():void { myDataGrid.height = myDataGrid.measureHeightOfItems(0, myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2; } -TH --- In flexcoders@yahoogroups.com, "djhatrick" wrote: > > My datagrid won't measure correctly, i have variabl

[flexcoders] Re: Binding two elements in a single datagrid column

2009-06-18 Thread Tim Hoff
Actually, its ILayoutManagerClient that supports validateProperties(), validateSize() and validateDisplayList(). I'll get it right one of these days. :) -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Yep, should have said, those that don&#

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Tim Hoff
: > > idSGrid.measureHeightOfItems 612 > Measuring each row height> 560 > idSGrid.measureHeightOfItems 612 > Measuring each row height> 560 > > > It's off by 72 pixels... that's quite a difference. > > Patrick > > > > --- In flexcod

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-19 Thread Tim Hoff
If you can't get it to work, you could always use a Repeater instead. In this case, since you want to display all of the items, this would probably work out better. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Yeah, maybe not. Good luck; this is a co

[flexcoders] Re: multiple filters on XMLListCollection how?

2009-06-19 Thread Tim Hoff
Looks like you have a little problem in the logic. It will either include all of the items or those that meet the two selected criteria. But it won't include all of one and a selected criteria of the other. A suggestion is to break up the individual criteria into seperate sub filterFunctions.

[flexcoders] Re: multiple filters on XMLListCollection how?

2009-06-19 Thread Tim Hoff
ean { var includeItem:Boolean = true; includeItem = (sizeFilter.selectedItem == "All sizes" || item.sizes == sizeFilter.selectedItem); return includeItem; } -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Looks like you have a little problem in th

[flexcoders] Re: Creating a new ListEvent - how to specify ItemRenderer?

2009-06-19 Thread Tim Hoff
Nice! -TH --- In flexcoders@yahoogroups.com, "flexcoder2008" wrote: > > Thanks Tim, > > That's not quite the behavior I was looking for though - my List can not be in edit mode. > > I figured out exactly what I needed - I had to use the indexToItemRenderer method of the List - hopefully this wi

[flexcoders] Re: htmlText truncation when changing from embedded to device font

2009-06-22 Thread Tim Hoff
I'll let the engineers let you know why this is happening. But, you can get it to work with the following steps (hack): 1) Remove height="200" from the test Text control. 2) Add this function: private function updateTextSize():void { test.invalidateSize(); } 3) On the ComboBox change e

[flexcoders] Re: MenuBar ItemRenderers on Sub-Menus

2009-06-23 Thread Tim Hoff
An easy way would be to extend MenuBar: package { import mx.controls.Menu; import mx.controls.MenuBar; import mx.core.ClassFactory; public class MyMenuBar extends MenuBar { public function MyMenuBar() { super(); }

[flexcoders] Re: Flex Browse File

2009-06-23 Thread Tim Hoff
Not sure if this available for flex, but for air: var file:File = new File(); file.addEventListener(Event.SELECT, dirSelected); file.browseForDirectory("Select a directory"); function dirSelected(e:Event):void { trace(file.nativePath); } -TH --- In flexcoders@yahoogroups.com, "reversible_82" w

<    2   3   4   5   6   7   8   9   10   11   >