Author Topic: The 17 September 2011 build (7452) is out.  (Read 86057 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) is out.
« Reply #30 on: September 23, 2011, 07:59:57 am »
My English isn't so good too :)
I'll try to explain.

1. Open the file
2. Select some function in the combobox:


3. The editor should display this function. I see this almost always:

Function name appears at the lowest editor line.

But I want to see the body of this function, I try to scroll it up and... As the combobox is still focused it selects another function.
A bit late reply. :D
I have the same behavior as you said. so what's your expect behavior.
After the step 2, do we need to switch the editor focus to editor control??
Or, we can always set the function name in the middle of the editor view. (By default, the jump to some line of an editor takes the smallest view change method, which means if the target line is in the current view, scintilla do not scroll the view. but we can force the target to show in the middle of the view)
Any comments?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Kaïwann

  • Guest
Re: The 17 September 2011 build (7452) is out.
« Reply #31 on: September 23, 2011, 11:04:30 am »
Hi,

Nice update.

However, I have a question : do you plan to add the prototype and the comment of function when hovering cursor over the box of code completion ?
Less important : highlight the choice under the cursor in the box ?

Thanks.
« Last Edit: September 27, 2011, 01:36:06 pm by Kaïwann »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) is out.
« Reply #32 on: September 23, 2011, 11:06:44 am »
However, I have a question : do you plan to add the prototype and the comment of function when hovering cursor over the box of code completion ?
I have see such feature request several times, but currently it seems no one was brave enough to implement it.  :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: The 17 September 2011 build (7452) is out.
« Reply #33 on: September 23, 2011, 11:08:56 am »
A bit late reply. :D
I have the same behavior as you said. so what's your expect behavior.
After the step 2, do we need to switch the editor focus to editor control??
Or, we can always set the function name in the middle of the editor view. (By default, the jump to some line of an editor takes the smallest view change method, which means if the target line is in the current view, scintilla do not scroll the view. but we can force the target to show in the middle of the view)
Any comments?
I guess both of these two. :)

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: The 17 September 2011 build (7452) is out.
« Reply #34 on: September 23, 2011, 11:26:11 am »
Agreed, focus the editor and function in the middle of the view would be cool!  8)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: The 17 September 2011 build (7452) is out.
« Reply #35 on: September 23, 2011, 01:23:17 pm »
Agreed, focus the editor and function in the middle of the view would be cool!  8)

Why in the middle, and not at the top ?
If we want to see the body of the function, this would be the natural position.

Offline Micool121

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: The 17 September 2011 build (7452) is out.
« Reply #36 on: September 23, 2011, 01:30:52 pm »
yes, please  return back to the editor and function focus (like done before)

Any place of the function between middle and top will make me pleased !

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: The 17 September 2011 build (7452) is out.
« Reply #37 on: September 23, 2011, 02:13:26 pm »
Agreed, focus the editor and function in the middle of the view would be cool!  8)

Why in the middle, and not at the top ?
If we want to see the body of the function, this would be the natural position.
Top is fine with me as well, but sometimes it's good to see some context, so middle make sense for me...

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) is out.
« Reply #38 on: September 23, 2011, 02:46:54 pm »
In cbEditor.h, see a function prototype:
Code
        /** Move the caret at the specified line.
          * @param line Line to move caret to.
          * @param centerOnScreen If true (default), tries to bring the specified line to the centre of the editor.*/
        void GotoLine(int line, bool centerOnScreen = true);

So, it should be quite easy to implement this feature.

About the other feature, put the focus on the editor window, probably it is easy too.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6035
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 17 September 2011 build (7452) is out.
« Reply #39 on: September 23, 2011, 03:35:36 pm »
A simple patch to implement both features:
Code
Index: E:/code/cb/cb_trunk/src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- E:/code/cb/cb_trunk/src/plugins/codecompletion/codecompletion.cpp (revision 7460)
+++ E:/code/cb/cb_trunk/src/plugins/codecompletion/codecompletion.cpp (working copy)
@@ -416,7 +416,9 @@
     if (line > control->GetLineCount())
         return false;
 
-    control->GotoLine(line);
+    //control->GotoLine(line);
+    editor->GotoLine(line,true);
+    editor->SetFocus();
     const int startPos = control->GetCurrentPos();
     const int endPos = startPos + control->LineLength(line);
     if (endPos <= startPos)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: The 17 September 2011 build (7452) is out.
« Reply #40 on: September 23, 2011, 04:12:06 pm »
Just a hint, the Serach/Goto Function... does exactly this, i.e. sets the function name at the top of the editor...
But, I'm supposing that your patch does the same, right?

Offline k1mgy

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: The 17 September 2011 build (7452) is out.
« Reply #41 on: September 24, 2011, 06:37:00 pm »
Installed just a few days ago.. it has been a while (about 6 months) since I've updated from nightly!

Windows 7
CB: 7452

Every so often, perhaps every 2 minutes, CB will freeze during an editing session.  At this same time I notice that CB does not appear in the open program list when I ALT-TAB.

I turned off both code completion and symbols browser, as these in the past have caused delays.  However, the problem continues.

Any way someone can suggest to diagnose this?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: The 17 September 2011 build (7452) is out.
« Reply #42 on: September 24, 2011, 06:56:30 pm »
@k1mgy:

Verify the problem still exists after turning off anti-virus software.

If it goes away, look for how to configure your AV right.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: The 17 September 2011 build (7452) is out.
« Reply #43 on: September 24, 2011, 07:01:32 pm »
@k1mgy:

Verify the problem still exists after turning off anti-virus software.

If it goes away, look for how to configure your AV right.

Tim S.
And make sure, that no libs from an older nightly remain in C::B's (sub-)folder(s).

Offline k1mgy

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: The 17 September 2011 build (7452) is out.
« Reply #44 on: September 24, 2011, 08:46:44 pm »
@jens @tim
Thank you very much!

1. My anti-virus, Norton Internet Security 2012, had crashed (and I didn't know it).
2. Ran norton removal tool
3. Reinstalled anti virus
4. Applied update.
various reboots..

Now CB operates normally.
 
Perhaps it was Norton's check on program legitimacy that had failed and caused the delays?