Error 403 from Google Calendar? Upgrade to the new Google Calendar support. See here for details. close
Welcome, Guest
Please Login or Register.    Lost Password?

[Solved] About "Show SubMenu"
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: [Solved] About "Show SubMenu"
#17812
[Solved] About "Show SubMenu" 2 Years, 3 Months ago  
I want to create a menu containing sub-menu, and the Help-file wrote:
If the table value is a table too ("{SubMenuName={Item1, Item2, Item3}}}") a sub menu is created from it.
But, the "SubMenuName" can not be chinese-characters.
Please help me solve it or told me how can I do? thanks.
anoob
Platinum Boarder
Posts: 508
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
Last Edit: 2013/03/06 12:40 By anoob.
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#17813
Re: About "Show SubMenu" 2 Years, 3 Months ago  
I think it's because SubMenuName is in fact a variable, and you cannot use chinese characters for variable's names.

As it works now, I think it's the same as doing:
SubMenuName = {Item1, Item2, Item3}
Menu = {Item1, Item2, {SubMenuName}, Item3}

And if this is right, there's no way to change by user code.
Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#17818
Re: About "Show SubMenu" 2 Years, 3 Months ago  
Thanks, it seems so.
anoob
Platinum Boarder
Posts: 508
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#17824
Re: About "Show SubMenu" 2 Years, 3 Months ago  
It's actually not a variable but a key in the table. The lua's short syntax for keys just doesn't allow foreign letters when defined this way but you can try to do it like this:

Code:

menu = { "green", "orange", {["汉语漢語"]={"yellow", "blue", "red"}}}


While debugging this I noticed that the submenu needs to be wrapped inside another table which is unnecessary. I'll change this in the next build so you'll need to remove the middle { and } chars or you'll get an extra submenu.


Edit: Ok, it seem I can't enter foreign characters here either but those encoded numeric values are supposed to be chinese.
Rainy
Moderator
Posts: 6068
graph
User Offline Click here to see the profile of this user
Last Edit: 2012/08/21 12:52 By Rainy.
The administrator has disabled public write access.
 
#17828
Re: About "Show SubMenu" 2 Years, 3 Months ago  
Thanks you, Rainy. Now, It working fine.
anoob
Platinum Boarder
Posts: 508
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#17976
Re:About "Show SubMenu" 2 Years, 2 Months ago  
If set:
table={{['A1']={'1','2','3'}},{['B2']={'4','5','6'}},{['C3']={'7','8','9'}}},
on b122, it can be displayed the format I want (1),
but on b123, it is more than a layer of sub-menu (2).

And, if change set as:
table={['A1']={'1','2','3'},['B2']={'4','5','6'},['C3']={'7','8','9'}},
it will occur error of sort (3).

How can I do? Please help.

anoob
Platinum Boarder
Posts: 508
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
Go to topPage: 12
get the latest posts directly to your desktop