Author Topic: Slick-C stack in Python mode  (Read 4726 times)


  • Senior Community Member
  • Posts: 145
  • Hero Points: 15
Slick-C stack in Python mode
« on: July 03, 2007, 03:35:13 pm »
I just got the book Dive into Python, and was entering "Your First Python Program" from page 11.  I didn't get very far.

Code: [Select]
def buildConnectionString (params):
    """Build a connection string from a dictionary of parameters.

    Returns string."""
    return ";".join(["%s=%s" % (k,v) for k, v in params.items()])

if __name__ == "__main__":
    myParams = {"server":"mpilgrim", \
                "database":"master", \
                "uid":"sa", \
                "pwd":"secret" \

At this point, I'm trying to type a closing brace, when I get the error "Slick-C Error: Procedure needs more arguments. file= offset=0"

In /tmp/vsstack.david, we find:
Code: [Select]
Slick-C STACK TRACE ******************************
 Created on 7/3/2007 at 8:29:5 (31 ms)
 SlickEdit Version Copyright 1988-2007 SlickEdit Inc.
 Edit module and type "st -f <offset>" to get the
 run-time error position

 error code=-3019
 Procedure needs more arguments

/tmp/vsstack.david (END)

This is on Mac OS X 10.4.10, and SlickEdit 12.0.1 with latest hotfixes installed (though I had the same error before the hotfixes).

[update]  Forget about the code sample.  I get the Slick-C stack when entering a closing } in a new empty file (again in Python mode).

« Last Edit: July 03, 2007, 03:47:00 pm by dmw »


  • Senior Community Member
  • Posts: 145
  • Hero Points: 15
Re: Slick-C stack in Python mode
« Reply #1 on: July 05, 2007, 02:18:14 am »
Well, after some troubleshooting on my own, I discovered that my key bindings have somehow become corrupted.  I checked the keybinds dialog to see if anything was bound to '}'.  I found many bindings, but all were mode specific, and none were for Python mode.  So I had the bright idea of binding my own macro that did an _insert_text('}') to try to do an end-run around the problem.  When I tried to bind '}' to my new macro, I was informed that that key was already bound to something else!  I went back to the keybindings dialog to double-check, and sure enough, no binding was showing for '}'.  Then I had a look at what the error message said '}' was bound to.  Apparently, and I have no idea how this can even happen, it was bound to a macro function in vusrmacs.e.  A macro defined like this:

_str get_include_header(_str filename)

AFAIK, a function with this declaration can't even be bound to a key.  It surely doesn't appear as a key-bindable command in the keybindings dialog.

Anyhow, the problem is now solved.  I couldn't unbind it directly, since the binding didn't appear in the list.  But I did manage to rebind it to something else, then unbind it.  Interestingly, the bogus key binding was only for Python mode.  I've never even looked at Python code in Slickedit before, so, again, I have no idea how this could have happened.  I'm left wondering if other things in my configuration might not be corrupted, and if I should try to start with a clean config.
« Last Edit: July 05, 2007, 02:24:04 pm by dmw »