On Sun, 5 Jul 2009 00:04:15 +0200, Andreas wrote: Hey,
>> > >Another question: It seems that you use "\n" as a separator >> > Er, this is completely up to you which character you use assuming >> > you are using your own userlist (index > 1). >> Hmm, I don't know what you mean by "userlist (index > 1)" actually. > >Ah, I just saw that user lists are another Scintilla feature. Sorry, I >just started with all this GTK and Scintilla stuff. Is it better to use >user lists? And does index > 1 mean that you use index = 1 in Geany and >anything above is free to use? I just had a look at the code and we are currently using only index 0 in Geany, so you could use index 1. The problem is there is currently no way to find out what indixes are already in use. That is, if there is another plugin which uses userlists, they could interfere eachother by using the same index, We probably need to some API and a bit code behind to maintain used indexes. But for now, if you want to use the userlist feature, use index 1. Index 0 is in use by Geany. >The separator for user lists is also set with SCI_AUTOCSETSEPARATOR, >though, right? So if I'd set my own separator it would influence >other lists as well, wouldn't it? I have no problem with "\n". I just >wanted to know if it's the general separator to use for lists in Well, if you use your own userlist (index > 0 as mentioned above) you can use whatever separator you want and set it SCI_AUTOCSETSEPARATOR for the used userlist index. If you use the autocompletion list, you should keep the \n separator to not confuse Geany too much :). But then you must also maintain the SCN_AUTOCSELECTION and SCN_AUTOCCANCELLED notifications to stop Geany handling them if your plugin shows the autocompletion list. Otherwise there could be weird side effects when Geany receives these notifications from Scintilla which are triggered by your plugin. So, I'd say you better use an userlist even though you need a bit more code handling the event when the user chose an item from the list. For an example how to do that, see the actest plugin I wrote some time ago (http://lists.uvena.de/pipermail/geany/2009-June/004655.html, the code is attached to the mail on the link). Regards, Enrico -- Get my GPG key from http://www.uvena.de/pub.asc
pgp7P4TD7TRES.pgp
Description: PGP signature
_______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel