|
#1
|
|||
|
|||
|
Hello everybody.
My suspect is the following is a bug of AMS 7. I wanted to use a ComboBox to select among three items. I wanted also to display some text in two labels, according to the selected item. That's how I wrote down the code. In On Startup section tAppName (table) and bIsDebug (boolean) are initialized, according to ini file values (boolean variable is set to true). In Global Functions section the following function is present. function ShowDebugMessage( sInString ) if bIsDebug then Dialog.Message( "Debug", sInString ); end end In On Preload section of a given Page, the following instructions are present. ShowDebugMessage( "Press OK to continue" ); ComboBox.ResetContent( "CoBAppName" ); for i = 1, Table.Count( tAppName ), 1 do ComboBox.AddItem( "CoBAppName", tAppName[ i ], "" ); end If ShowDebugMessage is invoked, CoBAppName ComboBox is correctly initialized. Vice-versa, if I comment that function, all items of ComboBox are blank!!! Why? I just cannot understand. I moved around the obstacle using a ListBox instead of a ComboBox (it works!), but I am still curious... Thanks to everyone that will try to help me. |
|
#2
|
||||
|
||||
|
Hi,
Have you tried switching the codes from the Page OnPreload to Page OnShow?
__________________
Newbie Examples ------> AMS 7.5 : amstudio.azman.info ----> AMS 6 & 5: www.azman.info/ams/ ----> Twitter: www.twitter.com/azmanar/ |
|
#3
|
|||
|
|||
|
You can't add items to a ComboBox in the On Preload event. You must do it in the On Show event.
__________________
Dermot AMS Add-ons - xDialog.com A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine. |
|
#4
|
|||
|
|||
|
Dermot, azmanar, you are right!!!
It just works moving that portion of code from On Preload to On Show event. But I can tell you this: since I started learning and using AMS, I am used to write code in On Preload event as much as I can. (The final effect is more elegant, to me.) And, believe me, I made a working application in AMS 6 with a similar portion of code in On Preload event! That's why I was thinking to a bug of AMS 7... Thanks a lot anyway, you guys were very fast!!! |
|
#5
|
||||
|
||||
|
Hi Davide,
I learnt it from Dermot.
__________________
Newbie Examples ------> AMS 7.5 : amstudio.azman.info ----> AMS 6 & 5: www.azman.info/ams/ ----> Twitter: www.twitter.com/azmanar/ |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TrueUpdate 2.0 Update (v2.0.6.0) Released | Brett | TrueUpdate 2.0 | 0 | 10-31-2006 02:10 PM |
| ComboBox Reset | azmanar | AutoPlay Media Studio 6.0 | 2 | 12-29-2005 01:46 PM |
| New Setup Factory 7.0 (v 7.0.2.0) Available | Darryl | Setup Factory 7.0 Discussion | 9 | 03-06-2005 02:57 PM |
| AutoPlay Media Studio 4.0.0.3 Released | Brett | AutoPlay Media Studio 4.0 | 0 | 12-11-2002 09:39 AM |
All times are GMT -6. The time now is 04:36 AM.








Linear Mode

