On Mon, 20 May 2013 08:47:35 -0500
Terry Brown <[email protected]> wrote:

> On Mon, 20 May 2013 04:00:59 -0700 (PDT)
> Fidel Pérez <[email protected]> wrote:
> 
> > Ok, in order to print icons, the code is this:
> > 
> > c.editCommands.insertIconFromFile(path)
> > 
> > Im quoting from this Leo 
> > manual<http://leoeditor.com/scripting.html#import-objects>, 
> > "inserting and deleting icons" section -_-
> > 
> > Although I still have a mess on which functions can be called how, and 
> > where to find the list of classes that can be called such as "editCommands" 
> > and the rest that they might exist.
> 
> I'm not aware of a general solution to the problem of finding the
> various pieces of Leo's class structure.  Basically there are all these
> classes defined in the source, and instances of these are attached to
> each other in a hierarchical network (with loops).

I didn't really finish the above para.  The problem is that it's hard
to guess what the names of the attachment points are, and the attaching
is done in a variety of places, sometimes by factory functions which
further obscure linkages.  Not a fault with Leo, just the way programs
work.  So the tool I've written may be the best approach to mapping
Leo's runtime structure. Another thing it could do, try and map 'major'
classes, or at least classes from leo.core.* - i.e. ignore the built in
types.

Cheers -Terry

> I've written an introspection function which lists the methods and
> instance variables (and class variables) of an arbitrary object by name
> and by type.  I should release it.  It builds its lists in a Leo
> outline, so you can navigate around that outline and expand nodes by
> introspection as needed.
> 
> It occurs to me that the same code could be used to search Leo's
> runtime object hierarchy for you, i.e. you enter 'insertIconFromFile'
> and it recursively searches for it.
> 
> Cheers -Terry
> 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to