Re: p.isSelected()
On Sun, Sep 15, 2019 at 8:20 AM vitalije wrote: Curiously enough, both: p.setSelected, p.isSelected delegate to > v.isSelected and v.setSelected. Apart from these delegations no other calls > to any of these methods is found inside Leo core. I haven't searched for > them inside plugins and other places. But it seems that Leo would work > properly even without those methods. > I suspect you are correct. What you must not ever do is change any of Leo's selection methods. They are surprisingly fragile. Edward -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS1UOz7EZ025XrMOGLbHhYO%2Bo8m13AB%2BsaW9G0uZVTvnGg%40mail.gmail.com.
Re: p.isSelected()
On Sun, Sep 15, 2019 at 1:04 AM Robert Cholette wrote: > Figured it out myself, made it work with this code (trying to set the > 'selected' property of 'w_ap' if p is the currently selected node): > Good work. I'm not sure I would have been any help. Edward -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS1qF5Gb505mbQ7g%2B%2BgvmbW9G%2BHk745Ug3WgzH5XniRDqw%40mail.gmail.com.
Re: p.isSelected()
Thank you, indeed comparing a position to commander.p, or as you guys call it, c.p, did the trick. -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/fc2da498-ada1-48c7-b729-7a6241a79ffc%40googlegroups.com.
Re: p.isSelected()
It seems that p.isSelected is actually never used in Leo core. Most probably it is just a remnant from ancient times. To get currently selected position you can use c.p, and if you wish to check if certain position p is the selected one, use: p == c.p. Vitalije -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/4707d100-e3d4-4450-a46c-29c33f4f711c%40googlegroups.com.
Re: p.isSelected()
Figured it out myself, made it work with this code (trying to set the 'selected' property of 'w_ap' if p is the currently selected node): if p == commander.p: w_ap['selected'] = True Latest version of leoInteg implements the 'getParent' method which is a requirement in vscode to have the powerful 'reveal' functionality in the tree. I try it out in the public test() method, with the 'getSelectedNode' function. I've yet to implement body/outline editing and manipulation having any effect on leo's side of things, but I think its going to be trivial once this basic 2 way communication and gui rendering is more fleshed out. On Friday, September 13, 2019 at 1:26:18 PM UTC-4, Robert Cholette wrote: > > while developping the leo-Integration plugin for vsCode, the only one > thing that did not work from leoBridge is "p.isSelected()" as I'm trying > to set the right selected node upon opening a leo file in the plugin i'm > developing in vscode. is this the right function for that? or should i just > compare each node to c.p to check if it's the currently selected node?) > > Thanks! > -- > Félix > > -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/a1f00d80-f7a5-4000-8751-8a335b925d2c%40googlegroups.com.
p.isSelected()
while developping the leo-Integration plugin for vsCode, the only one thing that did not work from leoBridge is "p.isSelected()" as I'm trying to set the right selected node upon opening a leo file in the plugin i'm developing in vscode. is this the right function for that? or should i just compare each node to c.p to check if it's the currently selected node?) Thanks! -- Félix -- 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 leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/2daca24e-7cb8-4fd6-9258-4e33aff6a0af%40googlegroups.com.