[flexcoders] Odd FormItem Behavior
Question #1: Is it considered a departure from best-practices to design and/or use data input forms with input fields side-by-side, i.e. use FormItem with direction="horizontal"? I have to say that I do not recall encountering its use very often, and I seem to be catching potential Flex bugs when I use it. Hence my next question... Question #2: The following code is the entire section of the mxml file...in case my problem is one of inheritence. The problem is that no matter how wide I make the box, panel, or form, the two textinput fields contained in the first FormItem (the one using direction="horizontal") will 1) not be placed/rendered on the same line, and 2) the width of both textinput fields are seemingly ignored and are both set to some system computed width, *IF* the sum of each TextInput width field + ((# of fields - 1) * FormItem.horizontal-gap) exceeds 250. I tested and confirmed this formula holds true for 2, 3, & 4 textinput fields, and assume it would for 5+. I realize I can workaround the unexpected behavior by surrounding all the TextInput items with HBox, but all the optimization documentation stresses that over use of containers is not desirable, and obviously would/should not be necessary if FormItem functioned as expected. So, is this behavior expected, or is this indeed a bug? Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Lose reference to my Validator object after an asynchronous call
Could you perhaps just use/call the isStructureValid() function of the validator class whenever you return from the remote call. Seems like it might be the easiest way to deal with this AND just give one last check of the form fields. --- In flexcoders@yahoogroups.com, "bhaq1972" <[EMAIL PROTECTED]> wrote: > Hi > > I'm doing an async call (using the Pending call procedure) in my > extended TextInput (which has a object attached). > > I save the validator object reference in a class variable (so i can > use it in the result handler later on), but when I return to the > result handler i dont get the red box appearing. > > I have a work around for this but i wanted to make sure i wasn't > doing something wrong. > > Here's some test code. You will need to make your own async call > (mine's checking to see if a code exists and returning a > description...standard stuff!). > > > test.mxml > - > > http://www.macromedia.com/2003/mxml"; > xmlns:nx="*" backgroundColor="#C0DCC2"> > >endpoint="http://localhost/flashremoting/gateway.aspx"; > source="FlexTestClassLibrary.Class1" showBusyCursor="true" > fault="alert(event.fault.faultstring, 'Error')"/> > > > > > > > > > > > > > > > > > > myTextInput.mxml > > http://www.macromedia.com/2003/mxml"; > > > > {text} > > > > > > > > > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: How can I show validation error message with ActionScript progrmming?
I was just about to begin working on what you discribe. My initial thought was to simply take the already formatted tooltip and tie it's appearance, or lack thereof, to the logic that controls the on/off status of the red box around the invalid field. Until I see how it looks with multiple errors on the form I have no idea if I will then feel the need to allow flexibility of placement on the message. Again, initially I figured that I could just extend the existing inputField class and add another label that was either blank/null, or matched the tooltip. I suspect someone here has already done this. If not I will probably have it done by Monday if you are still in need by then. --- In flexcoders@yahoogroups.com, "cto" <[EMAIL PROTECTED]> wrote: > Hi~ > > I want to show a validation error messgae with ActionScript. > > I general, if there is invalid data in form with validator, user can see the > > error message(ErrorTip) when he rollover the formItem. > > But, my customer want to show this error message without mouse rollOver. > > Do you have any idea? Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Performance question relating to array element referencing
I am about to embark on building a component that will involve heavy usage of arrays, and before I write a benchmark routine to answer my question, I thought I would see if anyone already had the answer. My question is basic: When referencing array elements using the following approaches/methods which is the fastest to execute, and then what is the next best method relative to best? For example: Method x is best, method y would be about 1.4x, and method z would be 1.8x. Method A (Integer ordinals from 0 or 1 to Length): Array[0] Array[1] Array[2] Method B (Text ordinals short in length): Array[i00] Array[i01] Array[i02] Method C (Text ordinals long in length): Array[ArrayItemDescriptionThatIsVeryInformative1] Array[ArrayItemDescriptionThatIsVeryInformative2] Array[ArrayItemDescriptionThatIsVeryInformative3] I am just looking for a realistic approximation so I can make an informed decision. Obviously Method C offers the greatest flexibility, but if the execution price is 2+ times the quickest method then it needs to be reconsidered...at least in my intended usage. Also, in the case of text based ordinals are there ranges that are better to use than others (i.e. a-z or A-Z). Sorry if this has been covered in a tech doc. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/