Zeus IDE Forum Index Zeus IDE
Use this forum to ask for help, submit a bug report or make a suggestion.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

macro mistakenly clears function window

 
Post new topic   Reply to topic    Zeus IDE Forum Index -> Reporting a Bug
View previous topic :: View next topic  
Author Message
JackR



Joined: 16 Jun 2006
Posts: 58

PostPosted: Wed Mar 14, 2007 7:55 pm    Post subject: macro mistakenly clears function window Reply with quote

Hi Jussij

I am using version 3.95z. If I have a function window open ( created by pressing the tool bar icon {} ), and then I press the home key in ANY window, the function window is cleared of everything except the copyright header added by Zeus. My home key is mapped to the following macro.

Thanks,
Jack



function key_macro()
screen_update_disable()
local cursor_after_move = 1
local start_cursor = get_cursor_pos()

if ( start_cursor ~= 1) then
MoveLineHome()
MoveWordNext()
cursor_after_move = get_cursor_pos()
end

if (start_cursor == cursor_after_move or start_cursor == 1) then
MoveDocumentStartEx()
end
screen_update_enable()
screen_update()
end

key_macro() -- run the macro

FYI, the goal of this macro is for the 1st time home is press, move the cursor to the 1st character on the line. 2nd press, 1st column, then top of page, last home, top of document.
Back to top
View user's profile Send private message
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 2187

PostPosted: Wed Mar 14, 2007 10:09 pm    Post subject: Reply with quote

Hi Jack,
Quote:
I am using version 3.95z. If I have a function window open ( created by pressing the tool bar icon {} ), and then I press the home key in ANY window, the function window is cleared of everything except the copyright header added by Zeus.

Unfortunately I could not replicate this bug Sad

What I did to test for the bug was as follows:

(1) I started the Zeus for Windows Programmers Editor - Version 3.95z.

(2) I took your macro and bound it to the Home key:
Code:
function key_macro()
    screen_update_disable()
    local cursor_after_move = 1
    local start_cursor = get_cursor_pos()

    if ( start_cursor ~= 1) then
        MoveLineHome()
        MoveWordNext()
        cursor_after_move = get_cursor_pos()
    end

    if (start_cursor == cursor_after_move or start_cursor == 1) then
        MoveDocumentStartEx()
    end

    screen_update_enable()
    screen_update()
end

key_macro()

(2) I then ran the Function List for the macro itself and I pressed the Home key several times for both windows.

For me all I get is the expected result of the macro moving the cursor with no change at all to the contents of the function list.

(3) I repeated the test for other files with exactly the same results Confused

If you try these exact same steps, do you still see the problem Question

Cheers Jussi
Back to top
View user's profile Send private message Send e-mail
JackR



Joined: 16 Jun 2006
Posts: 58

PostPosted: Thu Mar 15, 2007 12:46 pm    Post subject: Reply with quote

Hi Jussi,

This occurs every time UNTIL I exited and re-started Zeus. Now all is good. Sorry, I should have thought of that before I wrote you. Interestingly, File->Exit didn't work either but the Clsoe button to the right of the title bar did.

Jack
Back to top
View user's profile Send private message
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 2187

PostPosted: Thu Mar 15, 2007 1:22 pm    Post subject: Reply with quote

Hi Jack,

I don't quite understand your reply Confused

If you perform the steps I outlined earlier, do you see the clearing of the function list or does the function list behave as expected Question

If you do continually see this function list error, what steps do you perform to make the problem occur Question

As I mentioned earlier, while using the 3.95z version I was not able to replicate the error Sad

Cheers Jussi
Back to top
View user's profile Send private message Send e-mail
JackR



Joined: 16 Jun 2006
Posts: 58

PostPosted: Thu Mar 15, 2007 9:15 pm    Post subject: Reply with quote

Hi Jussij,

Sorry my answer wasn't clear, I'll try again.

If I follow the steps you listed, the problem will occur everytime, extremely repeatable. Every press of the home key clears the function window.

HOWEVER, I then exited Zeus and re-invoked it and now the problem never occurs. Somehow, Zeus got corrupted. Now it's working fine. Zeus was running for a couple days. I've editted many files switching through numerous workspaces. I can't say how to re-create the state I got Zeus in.

Hopefully, this is more clear

Jack
Back to top
View user's profile Send private message
jussij
Site Admin


Joined: 13 Aug 2004
Posts: 2187

PostPosted: Thu Mar 15, 2007 10:15 pm    Post subject: Reply with quote

Hi Jack,

Ok, that makes more sense now. Thanks Wink

Quote:
HOWEVER, I then exited Zeus and re-invoked it and now the problem never occurs.

As you suggest, I agree this was most likely cause by some sort of memory corruption. It might be quite difficult to track down since the corruption could have been caused by anything that happened to Zeus over the last few days since the last time it was started Confused

Cheers Jussi
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Zeus IDE Forum Index -> Reporting a Bug All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group