Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 8:49 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Using MLDropDownList
PostPosted: Fri Sep 03, 2010 12:13 pm 
Offline

Joined: Thu Jan 21, 2010 11:04 am
Posts: 9
I am in the process of building a multi language app, and I have been using the MultiLanguage objects which have been great to use except the MLDropDownList. The question I have is, does the drop down list need to have it's list set only at runtime, or can it be set from design view?


Top
 Profile  
 
 Post subject: Re: Using MLDropDownList
PostPosted: Fri Sep 03, 2010 12:21 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
In the Properties Window, there is a section called "Language Initial Values" Under that you will find properties called "InitialListContent1, InitialListContent2, " etc. Just set those properties and everything should work.

Things will work best if you don't change the length of the list from language to language.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: Using MLDropDownList
PostPosted: Fri Sep 03, 2010 1:36 pm 
Offline

Joined: Thu Jan 21, 2010 11:04 am
Posts: 9
Yes, but the initial list does not seem to accept unicode values. I have unicode support turned on, am i missing something or is this just a limitation of the mldropdown?


Top
 Profile  
 
 Post subject: Re: Using MLDropDownList
PostPosted: Fri Sep 03, 2010 1:59 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Ah, that makes more sense.

That is actually a limitation of the aggregate% data type, which is actually an alias for a string (not a unistring). The UI does not support Unicode, because the underlying data does not.

I was able to do what you want, but it did require some programming.

Here is my global code:
Code:
func Startup ()
    handles MSG_INIT
    'Add any code needed to prepare the workspace here.

    'Code that needs to intereact with other objects, or that needs the
    'Z-order to be established should be placed in PostInit function
    UserDirectMsg(default, _MSG_POST_INIT, 0, false)
    return
endfunc

func PostInit(parm as integer) returns boolean
    handles _MSG_POST_INIT
    'This function will be called after all objects have processed their Startup function

    'Add any startup code that needs to interact with other objects here

    _main_mlcoordinator.langNumber = 1
    md1.AddString("a")
    md1.AddString("b")
    md1.AddString("c")
    _main_mlcoordinator.langNumber = 2
    md1.AddString("1")
    md1.AddString("2")
    md1.AddString("3")
    _main_mlcoordinator.langNumber = 1

    return true
endfunc


Unfortunately, it does not look like there is an easy way to handle this if you need Unicode support. (You could, however, set up what languages you can with the normal Qlarity Foundry UI, and reserve the remaining ones for this type of coding)

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: Using MLDropDownList
PostPosted: Fri Sep 03, 2010 2:29 pm 
Offline

Joined: Thu Jan 21, 2010 11:04 am
Posts: 9
Ok, thanks for the help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group