On Tue, Jan 10, 2012 at 11:31 AM, mdb <[email protected]> wrote:
> What is the role of (c.k.givenArgs) in the saveAs function?
> Is it commonly used in Leo?
Glad you asked, because it gives me a chance to repeat perhaps the
most important part about programming: most of the nitty-gritty work
of changing code has little or nothing to do with memory.
In this case, I had completely forgotten about c.k.givenArgs. So I
searched for it. I found::
self.givenArgs = [] # New in Leo 4.4.8:
# arguments specified after the command name
# in k.simulateCommand.
Searching also reveals that k.givenArgs is used to avoid opening
various dialogs.
Thus, the saveAs code could test c.k.givenArgs first, then the new
args argument, and open a dialog only as a last result.
Please start getting in the habit of searching for answers. It's what
I always do. Leo makes such searching easy, because you can search
all of Leo's core files (including the qt gui files) directly from
leoPy.leo.
HTH.
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.