BBC BASIC for Windows
« Wishlist of minor editor suggestions »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:59pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Wishlist of minor editor suggestions  (Read 6785 times)
donquibeats
New Member
Image


member is offline

Avatar




Homepage PM


Posts: 4
xx Wishlist of minor editor suggestions
« Thread started on: May 26th, 2009, 1:04pm »

Hello

I can think of about half a dozen "it would be nice if..." suggestions that I could make about the BB4W Program Editor. It's a great editor and it does a brilliant job, so these aren't criticisms, just suggestions for extra non-essential functionality.

As Richard has said in the past that BB4W is pretty much completed, would there be any value in it if I posted a short wishlist here, or would I just come across as ungrateful?

Stuart
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Wishlist of minor editor suggestions
« Reply #1 on: May 26th, 2009, 4:50pm »

Quote:
would there be any value in it if I posted a short wishlist here, or would I just come across as ungrateful?

I wouldn't consider it "ungrateful" but the likelihood of any suggestions being incorporated is small, especially as the editor is exceptionally vulnerable to nasty bugs being introduced if 'fiddled with'.

Richard.
User IP Logged

donquibeats
New Member
Image


member is offline

Avatar




Homepage PM


Posts: 4
xx Re: Wishlist of minor editor suggestions
« Reply #2 on: May 26th, 2009, 5:40pm »

on May 26th, 2009, 4:50pm, Richard Russell wrote:
the likelihood of any suggestions being incorporated is small


I appreciate that. Just for your interest, then, rather than any real intention that these should be added features, here are a few:

- Find only works 'down' the document (searching from your current position to the end). It would be helpful if it could also work 'up' the document. Maybe there could be checkboxes for 'up' and 'down' in the Find dialogue box (a bit like Textpad www.textpad.com)

- Right-clicking lists all the procedures in program order. Maybe it's just a sign of my disorganisation but it would be useful for larger programs if there were the option to list the procedures in alphabetical name order instead.

- Automatic line renumbering (this one's probably a bit frivolous)

Stuart.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Wishlist of minor editor suggestions
« Reply #3 on: May 26th, 2009, 9:38pm »

Quote:
Find only works 'down' the document (searching from your current position to the end). It would be helpful if it could also work 'up' the document.

Personally I can't say I've ever felt the need for this. In those editors I use which have that capability, I never utilise it myself.

Quote:
Right-clicking lists all the procedures in program order.

Yes, partly because of the way the menu is created and partly because the idea is that you can see things like ON SYS lines in the context of their position in the program. You can even add your own 'separator' lines to the menu, which wouldn't make sense if alphabetically sorted.

Crucially, both the above features could be implemented as Add-in Utilities. I don't have to modify BB4W to provide them, you just have to persuade somebody skilled in the art of writing such utilities to create them for you (or you can learn how to do it yourself)!

Quote:
Automatic line renumbering (this one's probably a bit frivolous)

How would this differ from the Renumber facility already provided?

Richard.
User IP Logged

Stuart
Guest
xx Re: Wishlist of minor editor suggestions
« Reply #4 on: May 27th, 2009, 1:07pm »

on May 26th, 2009, 9:38pm, Richard Russell wrote:
Crucially, both the above features could be implemented as Add-in Utilities. I don't have to modify BB4W to provide them, you just have to persuade somebody skilled in the art of writing such utilities to create them for you (or you can learn how to do it yourself)![/qupte]

To be honest, this is the first I've heard about add-in utilities. Is there any documentation about how to create them?

[quote]How would this differ from the Renumber facility already provided?


It would renumber lines instantly whenever code was typed or cut or pasted. At the moment if you cut or copy and paste code with line numbers to a different part of the code, the line numbers remain attached, which arguably serves no purpose.

As I said to begin with, they are frivolous little remarks and I wouldn't stand by them in any sort of proper argument.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Wishlist of minor editor suggestions
« Reply #5 on: May 27th, 2009, 2:08pm »

Quote:
To be honest, this is the first I've heard about add-in utilities. Is there any documentation about how to create them?

There's not very much documentation, as such, but they have been widely discussed recently both here and on the Yahoo group. Check out these threads:

http://bb4w.conforums.com/index.cgi?board=ide&action=display&num=1236183192
http://bb4w.conforums.com/index.cgi?board=ide&action=display&num=1241010025
http://bb4w.conforums.com/index.cgi?board=ide&action=display&num=1241940860
http://bb4w.conforums.com/index.cgi?board=ide&action=display&num=1236220487

Also see this Wiki article:

http://bb4w.wikispaces.com/Tools+and+Utilities

Quote:
At the moment if you cut or copy and paste code with line numbers to a different part of the code, the line numbers remain attached, which arguably serves no purpose.

Simple solution - don't use line numbers. Line numbers are provided for legacy reasons, so that ancient BBC Micro programs can be run. You should never use line numbers in programs these days, and I certainly won't be adding any functionality which makes their use more convenient!

On the other hand, a modification to BB4W which automatically gave a mild electric shock to anybody using line numbers in their programs would be very worthwhile wink

Richard.
« Last Edit: May 27th, 2009, 2:13pm by admin » User IP Logged

donquibeats
New Member
Image


member is offline

Avatar




Homepage PM


Posts: 4
xx Re: Wishlist of minor editor suggestions
« Reply #6 on: Jun 1st, 2009, 3:28pm »

Thanks for the links. A couple of them went quite far over my head, but the idea of doing an add-in utility will be another thing on my "to do" list.

I use line numbers. I'm not ashamed.

The largest two pieces of software I've written are used on each of 20 computers on our Intranet. If the software crashes on any machine, it creates a little log file of the crash into a shared folder, and the error line ERL is a very helpful number to have. I don't know what the line-number-free alternative to ERL would be?

I don't use GOTO or RESTORE 1000 or anything like that, I promise. Just ERL.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Wishlist of minor editor suggestions
« Reply #7 on: Jun 1st, 2009, 4:42pm »

Quote:
If the software crashes on any machine, it creates a little log file of the crash into a shared folder, and the error line ERL is a very helpful number to have.

Except that the compiler (assuming you've not disabled the 'concatenate lines' option) will have deleted many of those line numbers anyway! So in fact your log file probably isn't giving you the detailed information you thought it was.

Quote:
I don't know what the line-number-free alternative to ERL would be?

The line-number-free alternative to ERL is !408, which is the actual memory address of the statement (or part of a statement) in which the error was detected. The function ERL simply scans the program to find which line contains that address. You could log that value (in fact the value !408-PAGE might be better) and write a little utility that takes the log file and locates where the error occurred within the program.

Richard.
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Wishlist of minor editor suggestions
« Reply #8 on: Oct 3rd, 2010, 07:12am »

Hi,

Thought of a couple of suggestions for the Program Editor (wish list only - don't take seriously, but I would like oppinions for them).

1. As well as/instead of the context menu with link references to procs and fns, there might be tabs for these (top or bottom) (possibly with a complete listing on one of the tabs). This might alow quick clicking from one section to another. Don't get me wrong, I think the context menu is far, far better than the good old fashioned scrolling through thousands of lines. Just a thought.

2. Option to have loop completion, e.g. when you enter a FOR I=1 TO 10, and press return, it automatically puts in a blank line and a NEXT and returns the curser to the blank line. The only loop that might complicate this (that I can think of) is the REPEAT UNTIL..., but this could end with either a blank or a default setting - say FALSE.

Both of these are Lazyitus setting in, but I thought I might just suggest them.

As I said - not serious. What do you think?

Matt
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Wishlist of minor editor suggestions
« Reply #9 on: Oct 3rd, 2010, 09:00am »

on Oct 3rd, 2010, 07:12am, Matt wrote:
As well as/instead of the context menu with link references to procs and fns, there might be tabs for these

I think the (potential) problem with this is scaling. I quite often have well over a hundred PROCs/FNs in one program, and that number of tabs would be unmanageable. I suspect it's something that looks like a good idea with relatively small programs, but not large ones.

Quote:
Option to have loop completion, e.g. when you enter a FOR I=1 TO 10, and press return, it automatically puts in a blank line and a NEXT

I have no fundamental objection, but it's one of those 'where do you stop' issues. Once you've set a precedent for automating the NEXT statement, there are probably many other similar situations that you could argue deserve the same treatment (DEF PROC producing an ENDPROC etc.).

Are you aware of the macro facility in BB4W? You could easily program one of the function keys to generate the 'newline NEXT' sequence, then you'd only have to press one key for it. Check out the Macro Recorder add-in utility.

Richard.
User IP Logged

donquibeats
New Member
Image


member is offline

Avatar




Homepage PM


Posts: 4
xx Re: Wishlist of minor editor suggestions
« Reply #10 on: Oct 5th, 2010, 6:18pm »

As this topic seems to have sprung back to life, I will mention another entirely unessential "wouldn't it be nice if..." idea.

In Notepad++ when I'm working with XML or PHP, on the left hand side there are + and - symbols which allow you to 'hide' certain functions or sections by shrinking them down to one line.

If BB4W had this whenever there's a DEFPROC or DEFFN or FOR or REPEAT or WHILE, you could make PROCedures or sections of code you know are finished only show up as a single line, thus reducing scrolling.

Once again it really is only a thought.
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Wishlist of minor editor suggestions
« Reply #11 on: Oct 5th, 2010, 7:35pm »

I like this idea, although, as it is, you could always 'hide' them by putting them in a library file.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Wishlist of minor editor suggestions
« Reply #12 on: Oct 5th, 2010, 9:02pm »

on Oct 5th, 2010, 6:18pm, donquibeats wrote:
If BB4W had this whenever there's a DEFPROC or DEFFN or FOR or REPEAT or WHILE, you could make PROCedures or sections of code you know are finished only show up as a single line

I'm pretty sure this has come up before. It's similar in principle to requests to indent or otherwise highlight the 'body' of a PROC/FN. The problem with all such ideas is that, in BBC BASIC, there's no reliable way to detect where a PROC/FN ends. A PROC can contain multiple ENDPROCs and an FN can contain multiple =s. Also, there's no reason in principle why a PROC or FN shouldn't itself contain one or more single-line PROCs or FNs within its 'body' (although it's a rather perverse thing to do).

So any attempt to implement such a feature would involve some 'guesswork' as to where the PROC/FN actually ends, which wouldn't always be right.

Anyway, such a feature would require the BB4W editor to be completely restructured, because it relies on the position of a line in the editing window corresponding exactly to its position in the program (which is why line 'wrapping' is not supported).

Richard.
User IP Logged

knudvaneeden
Developer

member is offline

Avatar




Homepage PM


Posts: 32
xx Re: Wishlist of minor editor suggestions
« Reply #13 on: Oct 6th, 2010, 08:33am »

FYI That is called 'folding'
User IP Logged

knudvaneeden
Developer

member is offline

Avatar




Homepage PM


Posts: 32
xx Re: Wishlist of minor editor suggestions
« Reply #14 on: Oct 6th, 2010, 08:38am »

It might be that it is difficult to find out where a function, procedure or method *ends*.

But inversely, it is probably much easier to find out where a (new) function, procedure or methods *begins*.

The idea is that the *end* of a previous function, procedure or method is usually just before the *begin* of a new one.

So if you know where the new one begins, then you are set.

And this begin of a new function, procedure or method one usually finds by parsing (e.g. using regular expressions).

That is the way I do it to create e.g. dependency graphs for programs, beautifiers, .... And could in principle very probably also be used for folding.

User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls