Menu

About class browser window and MDI windows

liyinghui
2004-04-05
2004-04-15
  • liyinghui

    liyinghui - 2004-04-05

    HI, I'v compared your software with PyPe. I found that, the class browser window in PyPe is tree view style, but yours is plain. Another thing is : when I open a new file, it'll popup a new window. But PyPe used a tabbed frame, each file in a tabbed page, so all files can be access easily. I report these to you,that you can consider them.

     
    • Daniel Pozmanter

      Class Browser:  Seems to me exactly the same, except that DrPython handles code like drpython.py correctly, and DrPython does not have the tiny icons for folders/documents that PyPe does.

      DrPython supports tabs too.  Check the "MDI" option in Preferences, Under General.  Viola!  Noweach file is in its own tabbed page (and each file has its own dedicated prompt).

      Cheers,

      Dan

       
    • liyinghui

      liyinghui - 2004-04-06

      Oh, I see them. Wonderful!

      BTW, could you tell me how to find the document about the wxStyledTextCtrl. I can't find it in the wxWindows' document

       
    • Daniel Pozmanter

      On the main docs page:
      http://www.wxwidgets.org/docs.htm

      "wxStyledTextCtrl documentation (oriented towards wxPython users). This guide is looking for a new owner."

      http://www.yellowbrain.com/stc/index.html

       
    • liyinghui

      liyinghui - 2004-04-07

      Thank you very much!

       
    • Chris Wilson

      Chris Wilson - 2004-04-10

      The class browser only shows "plain text" (no structure) if your source file uses spaces rather than tabs. I noticed this when loading up code I'd originally written using IDLE.

      If you run "Edit" -> "Whitespace" -> "Clean Up Indentation" -> "Replace Spaces With Tabs" the class browser should work as you are expecting it to.

      Don't know if this should be addressed, or just left as it is. Always using tabs seems harmless enough, in fact it makes code navigation via Scintilla easier, but I've seen many people recommending the use of spaces rather than tabs to avoid problems when editing code with other editors such as IDLE.

      It would also be nice if the class browser could be integrated into the MDI interface. It would make sense to have it as a separate pane alongside the source file to which it relates.

       
    • Daniel Pozmanter

      This is a bug.  I will try my best to fix it.
      DrPython should be able to handle files with spaces.

       
    • Daniel Pozmanter

      Fixed in CVS.  DrPython now checks indentation type
      when opening the class browser.

      If indentation is mixed, the class browser notifies the user, then closes.

       
    • Chris Wilson

      Chris Wilson - 2004-04-13

      Marvellous.

      Any thoughts on integrating the class browser into the MDI version of the interface?

       
    • Daniel Pozmanter

      I have given this some thought.

      The question is, should I add it as a display option
      like the prompt?  (You can view either the prompt or the class browser in the lower pane)?

      Or should it be on the right or left side, in a completely new section?

      What thoughts?

       
    • Daniel Pozmanter

      Another thing to keep in mind is updating.

      Right now, the nice thing about a dialog is that whenever it gets the focus, it reloads the information form the file.

      I would have to make this a manual process if I made it part of the main program, as the overhead may be a bit too much otherwise.

       
    • Chris Wilson

      Chris Wilson - 2004-04-15

      How about both?

      I envisaged it as a new section on the immediate left of the source pane, but I also feel it should be a display option like to prompt as generally when I've got my head down coding, I want all the space I can get for code editing and as few distractions as possible.

      I'm usually working in 1280x1024 or above, so it wouldn't normally matter, but in lower resolutions (such as the 1024x768 on my travel laptop) an IDE interface can quickly become over-crowded.

      As far as updating goes, a simple "Refresh" button with a shortcut option would be ideal. I agree that an automatic update would be too expensive in terms of processing. I've got development files which contain 2000+ lines of code (one day I'll split them up into nice functional chunks) and a refresh using the class browser takes a second or two even on my 3Ghz machine.

       
    • Chris Wilson

      Chris Wilson - 2004-04-15

      If there were to be more panes added to the interface, it would be handy to be able to resize them using the mouse.

      At the moment with only the prompt and source panes it doesn't really matter, but when navigating a tree-view which may be quite a few levels deep, being able to resize the pane to see the entire structure would be pretty important.

       
    • Daniel Pozmanter

      Perhaps I should redesign the whole sizer system for each tab.

      For example, allowing the user to view one file alongside another would be a VERY useful feature.

      Perhaps allowing as many "panes" per tab as the user wants.

      You can add a Prompt Pane, Second File Pane, or Class Browser Pane.

      The second file pane would not be connected to the prompt or class browser, and would allow you to look at two files side by side.

      Then opening a prompt would simply be a matter of adding a prompt pane.

       
    • Chris Wilson

      Chris Wilson - 2004-04-15

      That'd be great, but it sounds like it might be quite a bit of work. After this coming weekend I'd be happy to help out if you want, although I'd suggest that fundamental changes such as these are best implemented by just one person, and that person in this case would really be you.

      Where I might be able to help is that I'd love to see the session concept extended to be more of a project manager. This along with the bookmark feature (which I find really handy) could be incorporated into the MDI interface, using panes that were independent of source files as you mention.

      I was planning on putting together and sending you a proposal document for a project manager feature, and if you felt it was a good idea, I could then carry on and code a rough version to play with. Let me know what you think.

      Whilst I'm thinking on - something minor I changed in the code myself and might as well mention now, is that when selecting a section of code to indent/de-dent or (un-)comment, it always affected one line more than I was expecting at the end. The reason was that it auto-selected to the end of the current line, so the current cursor line was also being affected even if the cursor was in column 1 which is not how most editors handle things. I simply changed the "(selend)" to "(selend-1)" in lines 1733, 1770, 1913 and 2782 of the v2.4.2 distribution so it now works as I'd expected. Don't know whether this should be changed, added as an option or just left as it is.

       
    • Daniel Pozmanter

      I'd be glad to have your help.  I can add you as a developer, and you can be in charge of changing Sessions into a full fledged project manager.

      In terms of selection, I am thinking it would be best to leave this as is, as right now it only indents exactly what the user selects.  However this could find its way in as an option, I am just not quite sure what I would call it.
      ("Smart Selection?"  "Sharp Selection?").

      In terms of redoing the panes, I think you are right in terms of coding, only because it could have an effect beyond the scope of changing the view.  However in terms of planning it (which in python, is a huge part of the process), I think we should continue to hash out exactly what we want DrPython to do with this feature.  What kinds of stuff would we like to be able to do?

      For example, maybe instead of a second file pane, there should simply be the ability to view more than one tab at once?

      DrPython is not true MDI.  It is really a notebook in an SDI Frame, which allows it to switch between MDI and SDI mode.

      So in terms of implementation, this may entail some messy fiddling with sizers, and re-coding the way the prompt works.

       
    • Chris Wilson

      Chris Wilson - 2004-04-15

      If you want for me to look at adding project management I'd be glad to. I've got a pretty good idea of what would make a good interface and how it could be incorporated with what's already in place. For now I'll look at putting together a basic specification and start a new thread in which to discuss it. As I've said, I'll be free to do this after the weekend.

      The problem with the selection, is that is doesn't indent what the user selects but an additional line. For example - the selection would show the four lines I have highlighted, but the cursor would be at the very start of the fifth line rather than the end of the fourth. When I hit indent this fifth line gets automatically highlighted and indented as well. It struck me as being odd the first time I used it, and it is certainly different from the likes of IDLE and all the other editors I've used with block indentation features. That said, anyone who's used DrPython for a while will be expecting this behaviour, so an option would be the answer. But what to call it.....?

      In terms of adding additional sizeable panes, I'll put together and play with some working examples for my own benefit (as you say in Python the time is on design rather than coding) and let you have my thoughts ASAP. There are one or two other things (e.g. a to-do list) that I think would be both simple and beneficial to add once a multi-pane mechanism is in place.

      Hope you don't think I'm trying to change things too much. I've used quite a few different Python development environments and DrPython is certainly the most productive I've found in terms of raw coding, which is why I'm using and recommending it. Adding things like a project manager would make DrPython even better for anyone developing larger projects.

       
    • Daniel Pozmanter

      Cool beans.  I am adding you as a developer.  I look forward to the project manager.  It should be of benefit, and will probably be more intuitive than Sessions.

      In terms of selection, I tried out a sample in kwrite, and it works the way you suggest it should.  I am going to take kwrite as the norm, and put this in as a bug-report with fix, and add your code.

      Once I mess with the panes a bit more, in terms of what can be displayed, we can do lots.  I think I have a solution for viewing another file.  You can drag a tab into the current window, and the current window will become split between the main file, and the secondary file.  This may make comparing files much easier (simple drag and drop).

       

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.