Thanks Edward.

> Reading it I found out it calls the following function:

def anyAtFileNodeName (self):
> """Return the file name following an @file node or an empty string."""
> names = (
> "@auto",
> "@auto-otl",
> "@auto-rst",
> "@edit",
> "@file",
> "@thin", "@file-thin", "@thinfile",
> "@asis", "@file-asis", "@silentfile",
> "@nosent", "@file-nosent", "@nosentinelsfile",
> "@shadow",)
> return self.findAtFileName(names)


Since the @image nodes are not there, they wont show up as file for it.


I found another function which -almost- does perfectly what I intend:

> leoPluginsRef.leo#Plugins-->Files and nodes-->@file 
> active_path.py-->getPath


It is accessible by rightclick;path;show-current-path  if you have the 
plugin active.
But funnily enough it just doesn't work in the specific situation I wont 
(it does for the rest -_-) Looks like my superpower that makes me want to 
use the not working function is striking again.

*So what I want to do is:*


   1. Have a node with a path inside, which points to an image
   2. Be able to name that node as I want (its ok if I must add @image, but 
   would like to then name "Icon for BlaBlah")
   3. Have the image show up in the RenderPane when its selected
   

The functions I found so far will work with two of each, none of them with 
the three:
(getPath) fails with step 2
If I take @image out I get step 2 but loose step 3
And so forth.

This is going to be the icons catalogue for the easy scripting-button 
making in Leo, which just by selecting the node (which will be very visual 
through render pane) will apply that icon to your desired new 
button/function.

I appreciate your help, thank you.

 

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to