RE: [flexcoders] Re: nested viewstacks, creationPolicy of none and the creation dilemma

2005-08-09 Thread Gordon Smith
I think that childDescriptors[childIndex].properties.creationPolicy should work. If it does, please do not use _properties as this isn't documented. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: Monday,

RE: [flexcoders] Re: How to render a foreground color on an mx:Image

2005-08-16 Thread Gordon Smith
Using a Panel to simply draw a rounded rectangle seems awfully wasteful. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: Wednesday, August 10, 2005 2:29 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders]

RE: [flexcoders] Dynamic controls

2005-08-22 Thread Gordon Smith
I know this is old, but I'm catching up on flexcoders... You usually want to call createChild() instead of createClassObject(). createChild() is for creating content children inside of containers. The dynamically created children contribute to the numChildren count, can be accessed via

RE: [flexcoders] Why changing global variable also changes the model data?

2005-08-23 Thread Gordon Smith
The assignment _global.arrayFruit = fruitModel.fruit; doesn't make a copy of the array; it just makes _global.arrayFruit contain another reference to the same array. This is how arrays and objects work in many languages, because making copies of large data structures is expensive and

RE: [flexcoders] Special Chars. in AS

2005-08-25 Thread Gordon Smith
Title: Special Chars. in AS In MXML, Flex recognizes the following XML escape sequences for named characters:     lt; for     gt; for     amp; for     quot; for     apos for ' I don't think there is any way to declare others, but you can always specify any Unicode character

RE: [flexcoders] the \n doesn't work in XML

2005-08-26 Thread Gordon Smith
The #13; inserts a CR into the label string, but the Button doesn't display the second line. I think the problem is that a Button's internal TextField doesn't have its multiline property set, and the measurement of the label width and height is done assuming only a single line of text. - Gordon

RE: [flexcoders] Handling mx.controls.Alert.show() Yes/No Options (Or A Better Way To Do It)

2005-08-29 Thread Gordon Smith
I just wanted to mention that vars defined in the mx:Script of an mx:Application aren't global variables. They are instance variables of that application, in the same way that vars defined in the mx:Script of a component are instances variables of that component. If the application's

RE: [flexcoders] Creating flex gui on the fly

2005-08-29 Thread Gordon Smith
The Flash Player can't turn MXML into SWF. Only the Flex compiler can do that. There is no real reason to turn the XML describing a screen into MXML. Just get the XML into your Flex application. Then parse through it and call createChild() to create components based on what your XML says the

RE: [flexcoders] Strange List behaviour

2005-09-01 Thread Gordon Smith
Yes, addItemAt(0, item) should insert an item at the top of the List. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Thursday, September 01, 2005 5:58 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Strange

RE: [flexcoders] Strange List behaviour

2005-09-01 Thread Gordon Smith
It doesn't work because Array methods like push(), unshift(), and splice() can't trigger databinding or any kind of notification to other objects that the array has changed. They are low-level player-level methods that don't send out events. Flex data provider APIs do send out events: push() -

RE: [flexcoders] TabNavigator's createTab method

2005-09-01 Thread Gordon Smith
Why can't you follow the call to createTab() with newTab.dsID = foo? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mink, Joseph Sent: Thursday, September 01, 2005 7:11 AM To: flexcoders@yahoogroups.com Subject: [flexcoders]

RE: [flexcoders] Re: checkbox in repeater tag

2005-09-09 Thread Gordon Smith
Husain, you didn't say what you were trying to do with your repeated checkboxes that made you think you needed to put a different id on each one. But you should never need to do this; their id acts like an array so that each one can be directly accessed. For example, if you have mx:Repeater ...

RE: [flexcoders] Re: Need help on Fliping the components

2005-09-13 Thread Gordon Smith
Perhaps you missed Steven Webster's reply: There is no code [for Flip] available for release at present, nor is there likely to be in the immediate future. It sounds to me like you'll have to develop it yourself if you absolutely positively must have a Flip. - Gordon -Original Message-

RE: [flexcoders] Re: HOw combo box populated

2005-09-16 Thread Gordon Smith
Write a handler for the change event coming from the State combo box. In that handler, set the dataProvider of the City combo box. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sandip_patil01 Sent: Friday, September 16, 2005 1:40 AM

RE: [flexcoders] How to pass value selected from combo box to my Java class method

2005-09-16 Thread Gordon Smith
The selected item in the ComboBox is item.selectedItem. Do you know about the ASDoc? It tells you about the properties, methods, events, styles, and effects of every component. There should be a link to it at Start Macromedia Macromedia Flex

RE: [flexcoders] How to pass value selected from combo box to my Java class method

2005-09-16 Thread Gordon Smith
I know this. But you said I want to pass value selected from combo box and you didn't say anything about a text box. You have to ask the right question to get the right answer. :-) If you have a TextInput control, you can get what the user has entered by getting is 'text'

RE: [flexcoders] Question about alligning code

2005-09-17 Thread Gordon Smith
It goes on the parent, not on the child, and affects all children so that you don't have to put horizontalAlign=left on every child. If you need a single child to be differently aligned, nest it in an HBox, which has horizontalAlign=left by default. - Gordon From:

RE: [flexcoders] Communication betwen two .as files

2005-09-20 Thread Gordon Smith
Call parentDocument.tna.press() from the second component. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 8:27 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Communication betwen

RE: [flexcoders] Question about mouseMove

2005-09-21 Thread Gordon Smith
Try calling updateAfterEvent(). - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, September 21, 2005 9:34 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Question about mouseMove I am not sure

RE: [flexcoders] flex has watch?

2005-09-27 Thread Gordon Smith
no -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of andrehfraga Sent: Monday, September 26, 2005 8:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] flex has watch? hello, flex has watch? I need make a app with wacth. If yes, send me a

RE: [flexcoders] Can someone read this please

2005-09-27 Thread Gordon Smith
Since I'm reading it, this is an example of a message which proves its own falsity. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 27, 2005 1:34 PM To: flexcoders@yahoogroups.com Subject:

RE: [flexcoders] flex has watch?

2005-09-27 Thread Gordon Smith
Flex has DateChooser and DateField controls for choosing a date, but it doesn't have time controls, if that is what you need. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Tuesday, September 27, 2005 3:16 PM

RE: [flexcoders] setting effects to createChild()

2005-09-28 Thread Gordon Smith
MXML attributes like mouseOver=... set up event handlers, not effects. In ActionScript, you have to use code like img.addEventListener(mouseOver, Delegate.create(this, myMouseOverHandler)); to dynamically attach an event handler; you can't simply set properties in createChild's

RE: [flexcoders] Force initialization of ViewStack children?

2005-09-28 Thread Gordon Smith
That's the brute force way. It causes all controls in all panes of the ViewStack to get created at startup, and so will cause your app to start up slower. A better way is to initialize the control would be in the childrenCreationComplete event on the pane of the ViewStack where it

RE: [flexcoders] Force initialization of ViewStack children?

2005-09-28 Thread Gordon Smith
] On Behalf Of Gordon Smith Sent: Wednesday, September 28, 2005 9:42 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Force initialization of ViewStack children? That's the brute force way. It causes all controls in all panes of the ViewStack to get created at startup, and so

RE: [flexcoders] Re: Number(011) = 9 ????

2005-10-04 Thread Gordon Smith
If you do parseInt(011, 10), I'm pretty sure what happens is this: 1. The octal literal 011 is compiled as the decimal Number 9. 2. It is converted at runtime to the string 9, because parseInt expects to parse a string. 3. parseInt parses 9 to produce 9. Obviously, this is a waste of time. 011

RE: [flexcoders] pass multiple objects from dispatchEvent()to addEventListener()

2005-10-07 Thread Gordon Smith
Why not combine actualScore and potentialScore in a single event? dispatchEvent({ type: score, actual: actual, potential: potential }) - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin Sent: Thursday, October 06,

RE: [flexcoders] Re: Unable to refer controls in Accordion !

2005-10-11 Thread Gordon Smith
I'd like to suggest that it's better to learn how to make deferred instantiation your friend than to simply turn it off. The point of deferred instantiation is to not waste time at app startup creating controls that you don't need yet. If you had a ViewStack with 500 views, it probably wouldn't

RE: [flexcoders] Any explanation as to why this would happen(Question about accordions)

2005-10-13 Thread Gordon Smith
This is due to a feature of Flex known as Deferred Instantiation. My post on Tuesday entitled Re: Unable to refer controls in Accordion ! addressed the issue. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of [EMAIL PROTECTED]

[flexcoders] Why you shouldn't set creationPolicy=all to solve your deferred instantiation problems

2005-10-13 Thread Gordon Smith
: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith Sent: Thursday, October 13, 2005 12:57 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Any explanation as to why this would happen(Question about accordions) This is due to a feature of Flex known

RE: [flexcoders] Why you shouldn't set creationPolicy=all to solve your deferred instantiation problems

2005-10-14 Thread Gordon Smith
something done, setting creation policy to all is a common work around. Best, allen From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith Sent: 13 October 2005 21:56 To: flexcoders@yahoogroups.com Cc: Flex IMD Subject: [flexcoders] Why you shouldn't

RE: [flexcoders] Re: Ok, im lost with Flex 2

2005-10-18 Thread Gordon Smith
Application tag doesn't have an initialize event any more, use creationComplete. It should have both events. Please file a bug if that's not the case. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Spike Sent: Tuesday, October 18, 2005

RE: [flexcoders] Flex 1.5 mx.events.LowLevelEvents bug(99911) addition

2005-10-18 Thread Gordon Smith
Please file it if it doesn't work in Flex 2.0. Mouse event handling has completely changed. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Tuesday, October 18, 2005 4:15 PM To: Flexcoders Subject: [flexcoders] Flex 1.5

RE: [flexcoders] Flex 2: Where is the Timer Class

2005-10-20 Thread Gordon Smith
setInterval() still exists; it's now a function in the flash.util package. But we do want folks to move to use Timer instead. Here's a Flex 2.0 example of using Timer: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml; mx:Script ![CDATA[

RE: [flexcoders] Timers

2005-10-20 Thread Gordon Smith
Title: RE: [flexcoders] Timers Two corrections... The event handler argument type would be TimerEvent, not TimerEventType, and you'd start with timer with timer.start() rather than Timer.start() because start() is an instance method. I posted a working example of using Timer earlier

RE: [flexcoders] TextArea - getting the caret x,y location?

2005-10-25 Thread Gordon Smith
I don't think this is possible in Flex 1.5, but it should be in Flex 2.0. Player 8.5 will have TextField APIs such as function get selectionBeginIndex():int; function get selectionEndIndex():int; function getCharBoundaries(charIndex:int):Rectangle; - Gordon -Original

RE: [flexcoders] How to access control attributes inside a repeater

2005-10-27 Thread Gordon Smith
Hi, Hari. Does the indexing of the id make sense to you? I designed the Repeater so I'm curious whether you were expecting it to work a different way. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doodi, Hari - BLS CTR Sent: Thursday,

RE: [flexcoders] Custom component rollover (Flex 1.5)

2005-10-27 Thread Gordon Smith
I think mouseEnabled is Flex 2 only. How are you doing the rollover? Are you handling the mouseOver and mouseOut events? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Fitzpatrick Sent: Thursday, October 27, 2005 4:50 PM To:

RE: [flexcoders] Re: set Effect at runtime

2005-10-27 Thread Gordon Smith
Hi, Keishichi. I'm confused about why you're using that long dotted expression to get to the image. You should be able to simply specify id=image1 on the mx:Image and use that to refer to it; you would just write image1.getStyle(fontSize). (Also, what does the fontSize of an Image do?) The only

RE: [flexcoders] Re: Start Project with Flex 1.5 or Flex 2.0

2005-11-02 Thread Gordon Smith
Waddya mean by not fly? Leaving off type annotations is legal AS3, but it isn't recommended for serious apps. Without them the compiler can't help you find a lot of programming mistakes, and your app will run slower because all properties and methods have to be looked up in hash tables on dynamic

RE: [flexcoders] Flex2: watch/unwatch AS3 solution to track component enabled property

2006-03-10 Thread Gordon Smith
You should file a bug for us to make the 'enabled' property bindable. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Blazejewicz Sent: Thursday, March 09, 2006 4:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex2:

RE: [flexcoders] Component that has event listeners and handles it's own event

2006-03-10 Thread Gordon Smith
In Flex 1.X, the order in which event handlers on an object execute isn't well-defined. In Flex 2, the order in which event handlers on an object execute is deterministic: 1. Higher priority handlers execute before lower priority ones. 2. For handlers with the same priority, those added earlier

RE: [flexcoders] Re: Weird Gradient Fill error

2006-03-10 Thread Gordon Smith
Soon. From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Scott Fanetti Sent: Thursday, March 09, 2006 5:30 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Weird Gradient Fill error Roger, Do you have any timeline on when

RE: [flexcoders] Component that has event listeners and handles it's own event

2006-03-10 Thread Gordon Smith
generally listeners execute in the order they were added, though that order is not guaranteed. Yes, it is now, if they have the same priority. I've sent a reply to the list. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin

RE: [flexcoders] Can we change upIcon of Button class dynamically without Embed?

2006-03-10 Thread Gordon Smith
You could write a subclass of Button that displayed a dynamic icon. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: Friday, March 10, 2006 2:38 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can we

RE: [flexcoders] Re: FB2 :: Error subclass :: What is 'native' attribute FB2 inserts

2006-03-10 Thread Gordon Smith
If FlexBuilder is inserting 'native', that's a bug. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Michael Schmalle Sent: Friday, March 10, 2006 11:36 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: FB2 :: Error

RE: [flexcoders] Re: Forced to use MoveEvent?

2006-03-10 Thread Gordon Smith
That's right, your move event was conflicting with the one inherited from UIComponent. When you write an event handler attribute in MXML such as mx:Label id=label move=label.text=event.x/ the MXML compiler autogenerates an event handler that looks something like this:

RE: [flexcoders] Re: Component that has event listeners and handles it's own event

2006-03-13 Thread Gordon Smith
@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: In Flex 1.X, the order in which event handlers on an object execute isn't well-defined. In Flex 2, the order in which event handlers on an object execute is deterministic: 1. Higher priority handlers execute before lower priority ones. 2

RE: [flexcoders] enumerable instance properties

2006-03-13 Thread Gordon Smith
In AS3, only dynamic properties show up in for-in loops, and there is no 'enumerable' attribute. However, you can use the flash.util.describeType() method to discover the public properties and methods of a non-dynamic class. - Gordon -Original Message- From: flexcoders@yahoogroups.com

RE: [flexcoders] Re: Capture events a la the underlying transparent window from PopUpManager

2006-03-13 Thread Gordon Smith
Like Manish, I'm also rusty now on 1.5, but my recollection is the same: Setting event.bubbles = false in your Panel's mouseDown handler should prevent it from bubbling up the parent chain. And if this doesn't work and we can't figure out how to prevent the bubbling, then you could put protection

RE: [flexcoders] Re: 2.0B1 - Use of CSS style sheet with DataGridColumn styleName

2006-03-16 Thread Gordon Smith
Best practice in Flex apps is to use fooBarIck, because this works in both CSS and in ActionScript. But if you have an old HTML CSS file that uses foo-bar-ick, our CSS parser -- but no other code in Flex -- will convert it to fooBarIck. This is a convenience conversion for CSS compatibility. -

RE: [flexcoders] Need to add EventListener at the Application level

2006-03-16 Thread Gordon Smith
This works for a click event because it's a bubbling event that will bubble up the parent chain all the way to the Application. It wouldn't work for a change event, which is non-bubbling. However you can use the capture phase of event processing to give the Application a crack at an

RE: [flexcoders] Re: Is there anywhere to post Flex 2 bugs and enhancement requests?

2006-03-16 Thread Gordon Smith
Hi, Mike. Sorry, I'm not clear on what the problem is. Pretty much all software companies have public betas now. In our case, they don't substitute for Adobe's own QA, they augment it. We have approximately a 1:1 QA-engineer-to-dev-engineer, so we're not skimping on in-house QA.

RE: [flexcoders] Re: 2.0B1 - Use of CSS style sheet with DataGridColumn styleName

2006-03-17 Thread Gordon Smith
Matt, please read my previous reply before revising the documentation. Camelcase is best practice. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Horn Sent: Friday, March 17, 2006 9:46 AM To: flexcoders@yahoogroups.com Subject:

RE: [flexcoders] AS3 :: Multiline RegExp declarations :: Future enhancement ? ;-)

2006-03-17 Thread Gordon Smith
Forget StringBuilder... it's going away in B3. The player team decided it didn't give enough performance gain in enough useful cases to justify having both String and StringBuilder. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of

RE: [flexcoders] AS3 :: Multiline RegExp declarations :: Future enhancement ? ;-)

2006-03-18 Thread Gordon Smith
To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] AS3 :: Multiline RegExp declarations :: Future enhancement ? ;-) Gordon Smith wrote: Forget StringBuilder... it's going away in B3. The player team decidedit didn't give enough performance gain in enough useful cases to justifyhaving both String

RE: [flexcoders] getURL problem.

2006-03-21 Thread Gordon Smith
I'd expect the Word doc to start downloading after the nested loops complete. Maybe counting to 10,000,000 is just taking longer than you think? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, March 21,

RE: [flexcoders] tabEnabled has no effect on TextArea or/and TextInput component

2006-03-21 Thread Gordon Smith
It's a bug. If it hasn't been fixed in Flex 2 Beta 2, can you file a bug report? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andriy Panas Sent: Monday, March 20, 2006 1:54 AM To: flexcoders@yahoogroups.com Subject: [flexcoders]

RE: [flexcoders] getURL problem.

2006-03-22 Thread Gordon Smith
. |-+- | | | | | Gordon Smith | | | [EMAIL PROTECTED]| | | Sent by: | | | flexcoders@yahoogroups.com | | | 03/22/2006 12:59 AM| | | Please respond

RE: [flexcoders] Re: How to hide backMonthButton and fwdMonthButton of DateChooser Control?

2006-03-23 Thread Gordon Smith
] On Behalf Of flexhtoo Sent: Thursday, March 23, 2006 12:07 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to hide backMonthButton and fwdMonthButton of DateChooser Control? --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: In Beta 2, try mx:DateChooser

RE: [flexcoders] Question about RemoveChild

2006-03-23 Thread Gordon Smith
I assume this is Flex 2. If you've called removeChild() or removeChildAt() and you don't have any other references to this child, it will get garbage collected at some point. But if you've stored a reference to that child on some object, it won't go away. - Gordon -Original Message-

RE: [flexcoders] List Component Bug!!

2006-03-27 Thread Gordon Smith
My understanding is that you have to implement IUID if your dataProvider items are a custom class. If they're a plain Object, I don't think you have to. What's the story, Alex? - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Lance

RE: [flexcoders] why is trace(1+0.9+0.7+0.3) = 2.8999999999999995

2006-03-27 Thread Gordon Smith
Of Michael Schmalle Sent: Monday, March 27, 2006 6:24 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] why is trace(1+0.9+0.7+0.3) = 2.8995 I could swear there was a thread on this precision issue that Gordon Smith answered and it did have to do with the trace function

RE: [flexcoders] Format of UIDUtils.createUid() string is incorrect

2006-03-27 Thread Gordon Smith
I've entered this bug into our bugbase. We'll probably fix it for Beta 3. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tobias Patton Sent: Friday, March 24, 2006 4:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders]

RE: [flexcoders] Format of UIDUtils.createUid() string is incorrect

2006-03-27 Thread Gordon Smith
We do indeed have a lot of official beta testers who have access to a formal bug tracking system. But we also like anyone to file bugs using www.macromedia.com/go/wish - Gordon From: flexcoders@yahoogroups.com

RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.controls.TextInput restrict Property

2006-03-27 Thread Gordon Smith
No; 'restrict' specifies what is accepted, not what is rejected. The problem is that the minus sign (a.k.a. hyphen) is a metacharacter: look at how you're using it in 0-9 to mean 0 through 9. So you have to escape it by preceding it with a backslash. - Gordon From:

RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.controls.TextInput restrict Property

2006-03-28 Thread Gordon Smith
with mx.controls.TextInput restrict Property Hello Gordon, Please look at the example: TextInput.restrict = 0-9 ,.\- There is a backslash before the minus sign, but it doesnt work. Harry Von: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] Im Auftrag von Gordon Smith Gesendet: Dienstag

RE: [flexcoders] Re: need help with programatic skin

2006-03-29 Thread Gordon Smith
You can set the button's paddingLeft and paddingRight styles. I have no problem making the left and right padding larger, or somewhat smaller. But I can't get it down to only 2 pixels; there seems to be some extra slop. When I try using negative numbers that are too large, the label becomes

RE: [flexcoders] Re: need help with programatic skin

2006-03-29 Thread Gordon Smith
They've been renamed to paddingLeft, etc. I'm not sure why Button doesn't support paddingTop and paddingBottom, but I agree it should. I've just filed a bug about it. - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Michael

RE: [flexcoders] Beta 2: Evaluating interfaces

2006-03-29 Thread Gordon Smith
'is' can only be used to test *instances* of classes that implement interfaces. You don't use it with the class itself. So... function checkImp(className:Class):Boolean { return new className() is IMyInterface; } will work. You could also use describeType(className) and

RE: [flexcoders] dispatching an event from an itemRenderer

2006-03-29 Thread Gordon Smith
event.target is whatever object called dispatchEvent(). It stays fixed through the capture and bubble phases of event dispatching. event.currentTarget is the object whose event listeners are being processed. It changes during the capture and bubble phases, but will always be an ancestor of the

RE: [flexcoders] Re: need help with programatic skin

2006-03-29 Thread Gordon Smith
Override measure() and updateDisplayList(). - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of shemeshkale Sent: Wednesday, March 29, 2006 5:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: need help with programatic skin

RE: [flexcoders] Beta 2: TitleWindow.titleBar = No Double Clicking!

2006-03-29 Thread Gordon Smith
I think the problem is that the TextField displaying the title is actually getting the click (rather than the title bar background) but it isn't doubleClickEnabled. We're fixing the doubleClickEnabled setter to recurse into children. - Gordon From:

RE: [flexcoders] Does flex has a plug-in for IDEA IntelliJ !!!!

2006-03-30 Thread Gordon Smith
We don't have one, and I don't think it's in our roadmap - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sanjeeb Patel Sent: Thursday, March 30, 2006 3:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Does flex has a plug-in

RE: [flexcoders] cloning was: in operator (F2B2)

2006-04-04 Thread Gordon Smith
There is no easy way in Flex 2 to clone an arbitrary type of. Can you explain why you need to? - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of David Moylan Sent: Tuesday, April 04, 2006 11:03 AM To: flexcoders@yahoogroups.com Subject:

RE: [flexcoders] cloning was: in operator (F2B2)

2006-04-04 Thread Gordon Smith
, 2006 3:31 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] cloning was: in operator (F2B2) Gordon Smith wrote: There is no easy way in Flex 2 to clone an arbitrary type of. Can youexplain why you need to? Peter posted a neat approach here: http://www.peterjoel.com/blog

RE: [flexcoders] Help on Illegal assignment to function

2006-04-05 Thread Gordon Smith
In AS3, if a class has declared a method at compile time, you can't reset that method at runtime to be a different function. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of parinda_b_patel Sent: Wednesday, April 05, 2006 8:39 AM To:

RE: [flexcoders] Flex 2 Beta 2 - dynamic headerRenderer / IFactory error

2006-04-05 Thread Gordon Smith
I think you need to do value[i].headerRenderer = new ClassFactory(HeadRendererAddRemove); - Gordon From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Bruno Martins Sent: Wednesday, April 05, 2006 10:53 AM To: flexcoders@yahoogroups.com

RE: [flexcoders] F2B2: Namespaces breaking E4X

2006-04-05 Thread Gordon Smith
Well, you'd have to change the E4X expressions to specify the appropriate namespace. In XML you can put various namespaces on various tags, and E4X completely supports this. I don't have any examples at the moment, but I'd expect our docs to cover this somewhere. Maybe someone else can post an

RE: [flexcoders] Testing if a variable exist?

2006-04-05 Thread Gordon Smith
if (idName in this) - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of alpharythms Sent: Wednesday, April 05, 2006 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Testing if a variable exist? I imagine this is something

RE: [flexcoders] Re: GENERAL actionscript question

2006-04-05 Thread Gordon Smith
By the way, the Flex team considers Dirk's way to be best practice in two regards: 1. Always use the narrowest type that will work. If the event is a ResultEvent, don't type it as Event, Object, or *. 2. Don't use fully-qualified class names like mx.rpc.events.ResultEvent (except

RE: [flexcoders] Flex2 - Beta2 Integer to Character Conversion

2006-04-05 Thread Gordon Smith
There are no characters in AS3; there are only Strings, which can have length 1. You can create Strings of any length out of character code integers using the static method fromCharCode() of the String class: String.fromCharCode(65, 66, 67) - ABC - Gordon -Original Message- From:

RE: [flexcoders] Question to Adobe about Flex Framework 1.5 Code Quality

2006-04-06 Thread Gordon Smith
So how Adobe can create such code??? Yep, that's a Copy/Paste job. I guess we're just incredibly bad programmers. Maybe we've done a better job on the Flex 2 code. If you can repro your ViewStack bug in Flex 2, I hope you will let us know about it. Sleepless with shame, Gordon -Original

RE: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality

2006-04-06 Thread Gordon Smith
Hi, Maxym. I'm sorry that you're unhappy with the design of the event system in Flex. However, we believe that it's usable, high-performance, and follows a standard. I'm sure there are ways it could be better, but we won't be changing it -- at least for this release! -- as the product

RE: [flexcoders] What is the best way to add a variable to a component that already exist?

2006-04-06 Thread Gordon Smith
The Flex component classes like TextInput aren't dynamic, so you can't add any properties to them that aren't declared at compile time. However, if you create a dynamic subclass public dynamic class TextInputSpecial extends TextInput { ... } you should be able to add

RE: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality

2006-04-06 Thread Gordon Smith
Thanks, Ted. You've done a great job of explaining the benefits of the new event system! I just want to correct one thing, though. You said Events that utilize the DOM walk from the root of the DisplayList (your base class) to their target This seems to confuse the distinction between the

RE: [flexcoders] Re: What is the best way to add a variable to a component that already exist?

2006-04-06 Thread Gordon Smith
the data I need. I'm still curious if it is possible to dynamically re-type something at runtime. The only way I could see it working if the new type is an extened class of the orginal. I imagine you can't do this... Thanks again, Adam --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL

RE: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality

2006-04-06 Thread Gordon Smith
@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Thursday, April 06, 2006 4:04 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality Thanks, Ted. You've done a great job of explaining the benefits of the new

RE: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality

2006-04-06 Thread Gordon Smith
Instance inserted here! _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Smith Sent: Thursday, April 06, 2006 5:13 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Question to Adobe about Flex Framework 1.5 Code Quality Ah, I see that you're

RE: [flexcoders] Re: Testing if a variable exist?

2006-04-07 Thread Gordon Smith
--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: if (idName in this) - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of alpharythms Sent: Wednesday, April 05, 2006 3:19 PM To: flexcoders

RE: [flexcoders] BETA 2: Setting global Vars at creationComplete

2006-04-10 Thread Gordon Smith
You wouldn't be able to use the variable names x and y like this because an Application inherits from DisplayObject which already has x and y properties (implemented as getter/setters). Also, such variables wouldn't technically be global vars; they'd be Application instance vars. But you can

RE: [flexcoders] Flex2B2: cannot convert flash.display::SimpleButton to mx.core.IUIComponent

2006-04-11 Thread Gordon Smith
What does your component extend? If you're extending a Container, you can only use addChild() to content children which implement the IUIComponent interface. In order to support the LayoutManager, a content child has to implement things like measure(), etc. However you should able to

RE: [flexcoders] Re: AS3 Array Question

2006-04-11 Thread Gordon Smith
You can use a plain Object as a Set... see the code below. You first put key/value pairs into the Object, but it makes no difference what the values are. You just care about the keys, and the Object's hash table takes care of ensuring that setting a key more than once is harmless. Then you

RE: [flexcoders] Re: AS3 Array Question

2006-04-12 Thread Gordon Smith
[array[i].status] = new Object(); status.push(array[i].status); } } status.sort(); ModelLocator.getInstance().statusArray = status; } Tim Hoff --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: You can use a plain Object

RE: [flexcoders] programatically assigning an ArrayCollection as the DataProvider bug...

2006-04-12 Thread Gordon Smith
One correction... o.doIt() would compile because Object is a dynamic class and you can try to access anything on it. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jens Halm Sent: Wednesday, April 12, 2006 5:54 PM To: Ted Patrick

RE: [flexcoders] programatically assigning an ArrayCollection as the DataProvider bug...

2006-04-12 Thread Gordon Smith
I suspect that valueOf() returns *, not Object. You can assign something of compile-time type * to something of any other type without casting. However, when you assign something of compile-time type Object, you must downcast it. By the way, expressions like a[i] where a is an Array, or o.prop

RE: [flexcoders] Flex2B2 - few questions

2006-04-13 Thread Gordon Smith
1. This method has been removed. Just use dispatchEvent(). 2. Yes. Private vars can only be accessed from within the same class where they are declared. 3. I'm not clear on whether myBoxComponent is using myBox or myBox is using myBoxComponent, but I suspect what you are looking for is

RE: [flexcoders] Preinitialize

2006-04-14 Thread Gordon Smith
I think I have some of this wrong Matt's description of these three events is accurate. We moved initialize after child creation because most developers were expecting the children to exist during this event. But that means initialize is too late for setting properties which affect

RE: [flexcoders] parseDateString and parseNumberString

2006-04-16 Thread Gordon Smith
parseDateString() is currently a protected static method, intended for use only in subclasses of DateFormatter. In general, I don't think our formatter classes are designed to be used as parsers, so we're not exposing public parsing methods that some of them may use in their implementations. -

RE: [flexcoders] [F2B2] Newbie question about styling a nested panel

2006-04-19 Thread Gordon Smith
If you get back the inner Panel's alpha, it will be 1, it isn't getting overridden. But the alpha of a parent determines a transparency not only for it but for all of its children; this is the Player handles many properties in a hierarchy of DisplayObjects. If you had alpha=0.5 on both, the

  1   2   3   4   5   6   7   8   9   10   >