On Wed, Aug 24, 2011 at 9:16 AM, Truong Nghiem <[email protected]> wrote:
> Also, will the function g.app.gui.runAskOkCancelStringDialog() returns
> None if the user clicked Cancel? Or will it return an empty string?
> How about runAskOkCancelNumberDialog()?
>
> It'd be great if someone can help me with those questions. I know
> Python, however I could not find those details in Leo's docs.
Not everything is in the docs. That's just the way it is.
Since you know Python, it is best to open leoPy.leo (or LeoPyRef.leo)
and search for "def runAskOkCancelStringDialog"
You will find the actual code in the node:
Code-->Qt gui-->@file ../plugins/qtGui.py-->Gui wrapper-->class
leoQtGui-->Dialogs & panels (qtGui)-->runAskOkCancelStringDialog
You can see that None sometimes is returned. Or you could simply run
the code :-) Just put the following in a node and do Ctrl-B
(execute-script)
g.es(g.app.gui.runAskOkCancelStringDialog(None,'my title','my message'))
I don't mind answering these questions, but it will be good for you to
become comfortable with answering them for yourself.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.