From: Tux H. <tu...@ya...> - 2007-05-22 06:26:24
|
Ok. thanks a lot. BTW: does eidt_number support dynamic switch format? e.g. when I choose weight from popup, the format is "#.##", else the format is "#" ----- Original Message ---- From: Sean Parent <sp...@ad...> To: Tux Han <tu...@ya...> Cc: SourceForge ASL Users <ado...@li...> Sent: Tuesday, May 22, 2007 5:11:47 AM Subject: Re: [Adobe-source-devel] question about unit. The edit_number field is intended to handle related values (hence why they are units) - if there truly is no relationship then I would use a popop and an edit_number without units. - That can better model the mutual exclusion. Note that you can plug in your own functions for use with Adam as well as using lookup tables directly in Adam - you might want to model an approximate relationship so users could easily switch units (answering the question "about how many kgs is 5 apples?"). Since the contributing information is handed to your app you still know what was specified if you later want to refine the model (by, for example, actually weighing apples at the shipping doc). Sean On May 21, 2007, at 7:29 AM, Tux Han wrote: you mean I needn't know which unit the user choose? But some times the relationship is hard to handle in the Adam file, for example, different apple has different weight, I can't get the apple number from the weight of apple. So I must send the request to my client code to handle such relationship... ----- Original Message ---- From: Sean Parent <sp...@ad...> To: Tux Han <tu...@ya...> Cc: SourceForge ASL Users <ado...@li...> Sent: Monday, May 21, 2007 6:17:55 AM Subject: Re: [Adobe-source-devel] question about unit. The assumption is that it doesn't matter which the user chooses as the logic in the property model (Adam) description will handle the relationship and provide the output with the desired result. The information that led to the result is reported in the contributing information (usually used for scripting - but could also be used to remember what it is the user requested). Effectively, an edit_number is multiple controller/views when bound to more than one cell. Sean On May 20, 2007, at 12:31 AM, Tux Han wrote: Now I want to display an edit_number on my dialog. For example the edit_number represents how many apples I should choose, the user has 2 options, he can choose the numbers of apples or the weight of apples( e.g. 3 apples or 1kg apple ), so I use a unit to represent this: edit_number( name: "Apples", min_value: 0, units:[ { name: "num", bind: @apple_num, format: "#" }, { name: "kg", bind: @apple_kg, format: "#.##" } ] ); Then I want to know how I can know which unit the user choose? Or can the edit_number "bind" to another value to show the unit? Thanks Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/_______________________________________________ Adobe-source-devel mailing list Ado...@li... https://lists.sourceforge.net/lists/listinfo/adobe-source-devel Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. ____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting |