Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6657
    masha
    Member

    My EmEditor crashes when I try to access collections from Python macro:

    #language=”Python”

    Window.OutputBar.Visible = True
    debug = Window.OutputBar.writeln
    document = Window.document
    debug(document.Config.Highlight) # ok, it prints >
    # debug(document.Config.Highlight.XXXXXX) # ok, it raises an exception for no XXXXXX is there
    # debug(document.Config.Highlight.List) # it crashes EmEditor :(

    I use Windows 2000, EmEditor 8.00 and ActivePython 2.5.1.1

    Can you provide me an example of Python macro where a collection is enumerated ?

    #6658
    masha
    Member

    Seems there is a bug related to Config object
    I can enumerate windows and documents in Python but not the collections of the Config object.
    The latest ActivePython 2.6.0.0 has the problem as well.

    #language=”Python”

    Window.OutputBar.Visible = True
    debug = Window.OutputBar.writeln

    # ok
    for x in Window.shell.windows: debug(x); debug(x.Caption)

    # ok
    for x in Window.editor.Documents: debug(x); debug(x.FullName)

    # crash
    for x in Window.document.Config.Keyboard.List: debug(str(x))

    # crash
    for x in Window.document.Config.Highlight.List: debug(x)

    #6662
    Yutaka Emura
    Keymaster

    masha wrote:
    Seems there is a bug related to Config object
    I can enumerate windows and documents in Python but not the collections of the Config object.
    The latest ActivePython 2.6.0.0 has the problem as well.

    #language=”Python”

    Window.OutputBar.Visible = True
    debug = Window.OutputBar.writeln

    # ok
    for x in Window.shell.windows: debug(x); debug(x.Caption)

    # ok
    for x in Window.editor.Documents: debug(x); debug(x.FullName)

    # crash
    for x in Window.document.Config.Keyboard.List: debug(str(x))

    # crash
    for x in Window.document.Config.Highlight.List: debug(x)

    This is a sensitive area because the list is very large. It might cause out of memory situations.
    Did you try Versin 7 and was it OK?
    Also, you might want to try something like:


    list = Window.document.Config.Highlight.List
    for x in list: debug(x)

    #6667
    masha
    Member

    two lines macro:


    #language="Python"
    list = Window.document.Config.Highlight.List

    is enough to crash

    I will try EmEditor 7.0 a bit later

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.