Menu

CallTips 0.0.3

Plugins
2004-08-16
2004-09-01
  • Tom De Muer

    Tom De Muer - 2004-08-16

    Hi, CallTips 0.0.3 beta is available at http://users.skynet.be/tom.demuer and follow "python".  If feedback is positive I'll release it at sourceforge, but I think there are still some rough edges to it.

    New features:
    * autocomplete built-in (Dan-> after beta I can update the AutoComplete plugin code)
    * autocomplete/calltips on variables

    regards,
    Tom

     
    • Franz Steinhaeusler

      Hi Tom,
      for the builtin: sometimes, call tips appear, sometimes not.

      example:
      list(   [here no calltips)
      map(  [here calltips]

      as for the calltips for variables, I got none calltips.
      Do you have an example, of how to get working this.

      If this will work, this plugin together with Autcomplete
      will be really fine.

      Franz

       
    • Tom De Muer

      Tom De Muer - 2004-08-17

      Franz, I'll have a look at it, I already noticed that for builtins it is now a problem.  I have no clue why.  The inspect.isbuiltin('open') also returns false. 

      Did you try the autocomplete function on variables, did that work?

      Tom

       
    • Franz Steinhaeusler

      Hello Tom,
      yes the "show autocomplete" works.

      somewhere in the current document i have the line:
      topsizer = wx.FlexGridSizer(2,2,5,5)

      to I typed: topsizer =>
      Show Autocomplete:
      this works like a charm. (shows all possible methods
      and it's baseclass wx.Sizer's methods)
      then i select one of the methods, but
      after typing '(', no calltip appears.

      I got following console output:

      getting doc for topsizer.GetChildren
      resolved imports {'wx': 'wx'}
      except getdoc exceptions.TypeError : cannot concatenate 'str' and 'NoneType' obj
      ects
      qualifiedName is  None

      Franz

       
    • Tom De Muer

      Tom De Muer - 2004-08-17

      Franz, it should be fixed now, it's ready for download at the same place :)

      regards,
      Tom

       
    • Daniel Pozmanter

      Shiny, I'm downloading it as we "speak"

       
    • Daniel Pozmanter

      It doesn't seem to work at all.  No traceback, just no working.

      I tried (in a blank file, the calltips file)

      "sys
      sys.exit("

      Nothing for either attempt.

       
    • Franz Steinhaeusler

      For me, it works good (Windows XP).
      I typed (also in blank file):
      "sys" => show autocomplete
      (not "sys." => show autocomplete)
      I get much more possible completion as in
      normal autocomplete (for example sys.api_version)
      Then I took "exit"; then typed '(':
      I got the calltip: exit([status])

      >to I typed: topsizer =>
      >Show Autocomplete:
      >this works like a charm. (shows all possible methods
      >and it's baseclass wx.Sizer's methods)
      >then i select one of the methods, but
      >after typing '(', no calltip appears.

      this also works now ;)

       
      • Tom De Muer

        Tom De Muer - 2004-08-18

        ok, good news then :)  The reason it shows more autocompletion is that I don't filter anything out.  I think it might be a good idea to set some preferences about this though, like filtering out all members starting with '__' or so...

        I'll have to check on that sys thing...

        regards,
        Tom

         
    • Daniel Pozmanter

      Its in general on linux.  I know this can be terribly frustrating (unless you have access to linux).

      If you can try and figure it out, I can try to run possible patches.

      All in all, this is a rather essential plugin to have (calltips), and when you get it working, I look forward to adding the enhancements to the autocomplete plugin (or you can release the next version yourself).

       
      • Tom De Muer

        Tom De Muer - 2004-08-19

        I will try it under Mandrake 10.0, just installed it at my old pc.  What version of python did you use?

         
      • Tom De Muer

        Tom De Muer - 2004-08-19

        Dan, I tried it under Mandrake 10.0 with wxPython2.3 for RH9 and had no problems.  As a sanity check: did you set the keyboard shortcuts?

        regards,
        Tom

         
    • Daniel Pozmanter

      sorry for the delay. 
      Yes, I did set the keyboard shortcuts.

      If you can get it to work, do not worry about it, I will try to work out the bug on this end.

      Cheers,
      Dan

       
    • Daniel Pozmanter

      I am an idiot!

      I didn't realize you had moved the calltips keybinding from prefs to ... gasp... the shortcuts dialog.

      Now it works fine!

      Very good work.  It is a tad slower than autocomplete, however only just barely on my machine.  When you are ready to release, please do so. If you want to update the autocomplete plugin too (or keep them integrated), you are more than welcome to do so.

      Cheers,
      Dan

      (And sorry for my gross incompetence).

       
    • Daniel Pozmanter

      Hey, a suggestion:

      Set Hide CallTip to the Standard stc shortcut Cancel, if you can.

      (Or maybe  apref to do that?)

      I just like being able to hit 'escape' to cancel a call tip.

       
      • Tom De Muer

        Tom De Muer - 2004-08-27

        Ok good suggestion.  I'll add that this weekend, wrap things up and call it a release :) 

        About autocomplete... the calltips now also supports autocomplete.  Releasing calltips and autocomplete as twice the same code but only different shortcuts seems like a not so good idea.  What do you think?  Make it new all-in-one plugin "CodeCompletion" or still have the two separate.

        regards,
        Tom

         
    • Daniel Pozmanter

      I like the idea of a CodeCompletion Plugin.
      (CodeCompletion 0.0.1, or 1.0.0?)

      I'd deprecate the AutoComplete Function.

      By letting users not assign the shortcut, you let them choose if they want autocomplete and/or calltips.  That's flexible enough for me.

      Cheers,
      Dan

       
    • Tom De Muer

      Tom De Muer - 2004-08-27

      CodeCompletion 0.0.0 is released :)

      cheers,
      Tom

       
    • Franz Steinhaeusler

      Hi Tom,
      I tried the CodeCompletion a little bit.

      would it make sense only to enable the complete
      and calltips, if the current doc is a *.py or *.pyw?
      (self.txtDocument.currentlanguage == 0)

      (sometimes it takes very long time, until
      a completion word or a calltip is suggested;
      but that would be the prize for this ;) )

      C://drpython/plugins\CodeCompletion.py:1: DeprecationWarning: the regex module i
      s deprecated; please use the re module
        #     Programmer:     Tom De Muer

      I tried in drPython.py: after app = DrApp(0)
      app => then '.'
      nothing is suggested

      :1: SyntaxWarning: assignment to None
      :1: SyntaxWarning: assignment to None

      app. then (
      took again longer time, no tooltip is displayd

      resolved imports {'DrPrompt': 'drPrompt.DrPrompt', 'cStringIO': 'cStringIO', ....

      except getdoc exceptions.TypeError : cannot concatenate 'str' and 'NoneType' obj

      If i try:
      e = wx.App()
      e.MainLoop(
      the calltips and the code completion works.

      cheers,
      Franz

       
      • Tom De Muer

        Tom De Muer - 2004-09-01

        Hi Franz,

        I will add the check for python documents.  If you have the sense that the parsing takes too long, you can define yourself the points at which CodeCompletion starts to parse by binding a shortcut...

        I would like to make this more smart but it's hard to tell when a user has changed anything that could cause a different python parsing.

        The reason you don't get autocompletion on DrApp is that the CodeCompletion was not able to import DrApp as module... that is what I think at least.  I will check this.

        About that deprecation warning... this comes from the parser module I think.  I don't have any control over that.  I don't import regex but parser must.

        cheers!
        Tom

         
    • Franz Steinhaeusler

      Hi Tom,

      Yes, I will bind it to an extra shortcut, which
      doesn't automatically trigger the completition, when
      typing.

      Cheers,
      Franz

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.