You Are Here:

Community: Developer Discussion Boards

#1 Old Question 7 litle questions about Amaretto ! - 2005-02-28, 18:52

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Hello ,

After searching in the documentation and trying other things i can resolve these following problems !

1) How to use sub-menu in menu. I try to use sublist but it doesn't work :-(

Options -> menu 1 -> submenu 1
-> submenu 2

2) How to exit directly from a python script without entering in Python Installer ?

3) I try and i succeed to use the right soft key (app.exit_key_handler) for making other things than exiting python script but how to change the name of this right soft key ?

4) How to retrieve the text selected in the text editor UI control (with pencil and arrow keys) ?

5) How to capture in the text editor UI control the following keys with bind : Pencil or ABC , alphabetic character ( A,B,C,D etc.) , Keys 0 to 9
Menu key , Red key and Green key , key combinations (pencil and 1) ?

6) How to modify the following properties of the text editor UI control ?

- Font color (It appears in green only ?)
- Font size (Only 8 lines per screen ?)
- Proportional font only ? (Can i use fixed font instead ?)

7) Last but not least ... The callable object in a bind statement is called for a specified event in the following order :


a) callback function setup by bind
b) real function

Can i replace the real function by the callback or inverse the previous calling order ?

Thank you for your answers !
Reply With Quote

#2 Old answer to question 2 - 2005-03-02, 03:26

Join Date: Jan 2005
Posts: 8
rjstone
Offline
Registered User
Quote:
Originally posted by cyke64

2) How to exit directly from a python script without entering in Python Installer ?
Well, I know this one. Use appuifw.app.set_exit(). Here's a function that only sets this for a script that wasn't executed from the interpreter (such as a py2sis application):

Code:
def set_exit_if_standalone():
    """Only set_exit() if this wasn't invoked from the interpreter ui."""
    appname = appuifw.app.full_name()
    if appname[-10:] != u"Python.app":
        appuifw.app.set_exit()
Reply With Quote

#3 Old Re: 7 litle questions about Amaretto ! - 2005-03-02, 10:18

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Quote:
Originally posted by cyke64
Hello ,

After searching in the documentation and trying other things i can resolve these following problems !

1) How to use sub-menu in menu. I try to use sublist but it doesn't work :-(

Options -> menu 1 -> submenu 1
-> submenu 2

2) How to exit directly from a python script without entering in Python Installer ?

3) I try and i succeed to use the right soft key (app.exit_key_handler) for making other things than exiting python script but how to change the name of this right soft key ?

4) How to retrieve the text selected in the text editor UI control (with pencil and arrow keys) ?

5) How to capture in the text editor UI control the following keys with bind : Pencil or ABC , alphabetic character ( A,B,C,D etc.) , Keys 0 to 9
Menu key , Red key and Green key , key combinations (pencil and 1) ?

6) How to modify the following properties of the text editor UI control ?

- Font color (It appears in green only ?)
- Font size (Only 8 lines per screen ?)
- Proportional font only ? (Can i use fixed font instead ?)

7) Last but not least ... The callable object in a bind statement is called for a specified event in the following order :


a) callback function setup by bind
b) real function

Can i replace the real function by the callback or inverse the previous calling order ?

Thank you for your answers !
You already got the answer for question 2. Features 1,3,4,6 and 7 are not supported. As to question 5, you should be able to bind at least the green button and the menu key.
Reply With Quote

#4 Old Re: 7 litle questions about Amaretto ! - 2005-06-23, 15:30

Join Date: Sep 2003
Posts: 209
Location: Finland
otsov
Offline
Regular Contributor
Quote:
Originally posted by cyke64

1) How to use sub-menu in menu. I try to use sublist but it doesn't work :-(

Options -> menu 1 -> submenu 1
-> submenu 2
This is supported in the new alpha releases (1.1.1 onwards, inclusive):

Code:
    appuifw.app.menu = [(u"item 1", func1),
                        (u"Submenu 1", ((u"sub item 1", func2), 
                                        (u"sub item 2", func3) ))
                        ]
Notice though that "py2sis" generated SIS files will not be able to use sub-menus yet - this results in "CONE 14" panic. There is a workaround though: "unsis" the release package and move the "python.rsc" to folder "templates" (under "py2sis") and rename "python.rsc" to "pyrsc_template.tmp".
Reply With Quote

#5 Old Re: 7 litle questions about Amaretto ! - 2005-06-23, 15:39

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Quote:
Originally posted by cyke64
Hello ,

6) How to modify the following properties of the text editor UI control ?

- Font color (It appears in green only ?)
- Font size (Only 8 lines per screen ?)
- Proportional font only ? (Can i use fixed font instead ?)

This is now supported in the 1.1 series.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia