BBC BASIC
Development >> Integrated Development Environment >> SDLIDE - feedback requested
http://bbcbasic.conforums.com/index.cgi?board=ide&action=display&num=1470490621

SDLIDE - feedback requested
Post by Richard Russell on Aug 6th, 2016, 1:37pm

To date I've received very little feedback on SDLIDE (and 'dlglib' and 'dlgdemo'), which is rather disappointing. I'm particularly interested to learn what features you think most need to be added to bring them 'up to scratch'.

Richard.

Re: SDLIDE - feedback requested
Post by michaelgallup on Aug 7th, 2016, 02:58am

It looks intresting. I am currently working on many projects as I get time. I don't have a mac anymore, but will try the cross platform version on one of my computers. I was working on a revival of SET, for old style large graphics plotting, but I named it PSET. Oh well.. If you want to use the tool you can for your cross platform. Also you can use PROCcolor and SBOX tools I have in the same program. It is in GENERAL. I made the commands for everyone to use.
Re: SDLIDE - feedback requested
Post by Richard Russell on Aug 7th, 2016, 2:53pm

on Aug 7th, 2016, 02:58am, michael wrote:
will try the cross platform version on one of my computers.

There's no reason not to run it on the same PC that you use for BB4W - that's what I do - just don't put it in the same place.

SDLIDE.bbc and dlgdemo.bbc will run under BB4W anyway (the appearance is a little different, and it's a bit slow1), but in that case you would need to copy dlglib.bbc into your BB4W LIB folder first.

Richard.

1. Some display-related operations are faster in BBCSDL than in BB4W, partly because SDL (designed primarily for games) is more tuned for graphics performance, and partly because the multi-threading is handled differently (a requirement of OpenGL).

Re: SDLIDE - feedback requested
Post by MarsFS on Sep 1st, 2017, 05:52am

Bit late to this conversation but here's a few things I've noticed:

I'll think of some more but above would go a long way to making the IDE more enjoyable to use.

Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 1st, 2017, 08:41am

on Sep 1st, 2017, 05:52am, MarsFS wrote:
would be nice to be able to double click a verb so that it highlights...

I entirely agree that the lack of double-click actions is a shortcoming. The difficulty, as you probably appreciate, is that BBC BASIC doesn't have a cross-platform mechanism for distinguishing between a single and double mouse click: neither the MOUSE statement nor the ON MOUSE event convey that information. One would be faced with trying to deduce it by means of a timer mechanism, which could be quite unreliable, especially on a slow platform such as the Raspberry Pi. Some experimentation is perhaps called for.

Quote:
Trying to delete a single blank line is tricky at best and sometimes annoyingly impossible with using just keyboard, pressing delete or backspace on a blank line should delete it

Pressing backspace does delete a blank line, so long as the caret (text cursor) is at the very start of the line. This is entirely consistent with the way the BB4W editor works, so I'd be reluctant to make a change that would make them dissimilar. Are you also unhappy with the way the BB4W editor works in that respect (in which case I'm afraid there is no possibility of a change, since that's worked the same way for 16 years!) or is there something different about the behaviour of the SDLIDE editor that I've not spotted?

Do please feel free to make changes to SDLIDE.bbc yourself and submit them for possible incorporation in the distributed version. Implementing the IDE in BASIC has a number of benefits, and allowing user-contributed enhancements is definitely one of them!

Richard.

Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 2nd, 2017, 3:42pm

on Sep 1st, 2017, 08:41am, Richard Russell wrote:
Some experimentation is perhaps called for.

I've tried the BASIC timer technique for detecting a double-click, and it seems fairly reliable on a fast machine. I'll need to check it on something slow like a Raspberry Pi as a more robust test.

Richard.

Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 2nd, 2017, 8:14pm

on Sep 1st, 2017, 05:52am, MarsFS wrote:
double clicking or highlighting a verb shows all matches for that verb in the current listing...

I've now implemented that (double-clicking only).

Richard.

Re: SDLIDE - feedback requested
Post by MarsFS on Sep 2nd, 2017, 8:48pm

Quote:
I've now implemented that (double-clicking only).

Thanks for taking the suggestion on board and implementing s solution, it's really great to see active ongoing development for this amazing language.

Will have to spend some more time digging through the IDE code, it's really amazing that it's written in the same language that it's used to create code for.
Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 2nd, 2017, 10:21pm

on Sep 2nd, 2017, 8:48pm, MarsFS wrote:
it's really amazing that it's written in the same language that it's used to create code for.

It was the obvious approach to creating a cross-platform IDE for a cross-platform language (and indeed SDLIDE.bbc will run in BBC BASIC for Windows too). And to be fair the 'other' IDE (Andy Parkes' BBCEdit.bbc), which is also written in BASIC, came first so he should take some of the credit for demonstrating that it was practical.

It's quite telling, I think, that I was able to implement the 'highlight all occurrences of a word' facility quite quickly and easily in BBC BASIC, whereas I wouldn't have dared attempt to do the same for the BB4W IDE (which is coded in C). It would be much more difficult and much riskier.

Richard.

Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 3rd, 2017, 4:08pm

on Sep 2nd, 2017, 8:48pm, MarsFS wrote:
Thanks for taking the suggestion on board and implementing a solution.

If you want to try it out, you can download the revised version of SDLIDE.bbc from here. I hope it does something approximating to what you had in mind, but don't expect that any other suggestions will be actioned so quickly (if at all)!

Richard.


Re: SDLIDE - feedback requested
Post by MarsFS on Sep 3rd, 2017, 7:56pm

Works really well thank you for getting it implemented so fast and hope you and others find it a useful addition smiley

One other idea to add to the list when you have time, when searching and reaching the end of a file listing, is it possible to loop back to the start of the program with a notification perhaps to inform the user when the original search reference or starting line is reached?

This is something I've found extremely useful in other IDEs and it works well with replace also.


Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 4th, 2017, 06:52am

on Sep 3rd, 2017, 7:56pm, MarsFS wrote:
is it possible to loop back to the start of the program

Actually it's quite straightforward to make it work like BB4W, which is for the 'string not found' message to be reported as it is now (when it gets to the end of the program) but to automatically loop to the start of the program so you can continue the find/replace operation from there.

To make that change, you will find that there are two places in SDLIDE.bbc where it reports the message:

Existing Code:
      PROCmessagebox("SDLIDE", "String not found", MB_ICONINFORMATION) 

Simply insert this line after both:

New Code:
      CaretX% = 0 : CaretY% = 0 : AnchorX% = 0 : AnchorY% = 0 

Quote:
with a notification perhaps to inform the user when the original search reference or starting line is reached?

That would be a lot more difficult, since it doesn't know where the starting line was (and it might change as a result of a replace operation).

Richard.
Re: SDLIDE - feedback requested
Post by MarsFS on Sep 4th, 2017, 11:02pm

Thanks Richard!

I have implemented this and the loop around seems to work well, I have been playing with also showing a dialog but have noticed an anomaly and just wondering if you've seen or noticed this before?

Code:
              REM PROCmessagebox("SDLIDE", "End Of File Reached", MB_ICONINFORMATION)
              PROCmessagebox("SDLIDE", "String not found", MB_ICONINFORMATION)
              CaretX% = 0 : CaretY% = 0 : AnchorX% = 0 : AnchorY% = 0
 


The PROCmessagebox is truncating the message part and not showing an icon, I've tested just the SDL part and it appears to truncate the message but not sure what the trigger is... strange ???

Code:
MB_ICONINFORMATION = 64
SYS "SDL_ShowSimpleMessageBox", MB_ICONINFORMATION, "TEST 123 ABC Hello World", "The quick brown fox jumps over the lazy dog...", @hwnd% 


The BB4W equivalent works correctly and does not truncate the message and does show the icon.

I haven't dug much deeper than that as my knowledge of the SDL system calls needs a primer session :-[

If you have the time to confirm whether the issue is present on your end that would be much appreciated.
Re: SDLIDE - feedback requested
Post by Richard Russell on Sep 5th, 2017, 08:48am

on Sep 4th, 2017, 11:02pm, MarsFS wrote:
The PROCmessagebox is truncating the message part and not showing an icon

As you can see, it works here with no truncation (I don't think the absence of an icon is relevant; it's platform dependent). What version of SDL are you running ('about.bbc' will report that)? The current/latest version is 2.0.5 so if that's what you have too it's a mystery.

Richard.

User Image

Re: SDLIDE - feedback requested
Post by MarsFS on Sep 5th, 2017, 10:08am

Hmm, tried it at home and its working ok, will double check work PC and go from there, thought i'd downloaded the latest version but I'll see tomorrow... otherwise not too fussed as seems ok at home. Thanks for checking smiley
Re: SDLIDE - feedback requested
Post by mschmalenbach on Dec 30th, 2017, 1:59pm

Firstly, Happy New Year!
Secondly, thank you for creating all of this, and continuing to work on it.

I'm finally able to spend time doing 'geekery' as my wife calls it!

I've been working on a 'tiny pascal' compiler, written in BBC Basic. It's aimed at generating code for smaller Microchip PIC microcontrollers. I plan to port it to my BBC Master once it's up & running.

Everything has been fine until this morning.

I'm using the SDLIDE v0.19b environment, which took only a short while to become familiar with.

This morning I fired it up and got strange mouse behaviour. As SDLIDE starts up, the mouse point jumps to approx the same place on the IDE screen - towards the top right.

Within the edit space itself the mouse behaves after this jump. But moving to anywhere in the ribbon bar across the top of the window, where the various tools & command icons are, and the mouse pointer jumps towards the top edge of the window, above the ribbon bar. Any attempt to move the mouse pointer back down to whichever icon I want to click on, or menu bar element I want to click on, and the mouse pointer jumps back up towards the top again. This behaviour happens only in the vertical axis. In the horizontal axis it is fine.

If I move the mouse pointer outside the SDL window to the rest of my desktop, mouse pointer behaviour returns to normal.

This has made using SDLIDE impossible.

I tried to put SDLIDE in to full screen mode, which was easy - the mouse pointer behaves around the normal window controls (the 3 coloured circles top left on any MacOS window) - once in full screen mode normal service was resumed with the mouse pointer, including after taking it out of full screen mode.

I've been able to repeatedly observe these behaviours having shut down SDLIDE multiple times etc - and restarted my Mac - not something you normally have to do compared with a Windows PC.

The other IDE that comes with this version of BBC Basic for the Mac is lacking many of the features of SDLIDE I rely on, and won't run the source code I've created anyway...

I have a short piece of video - a screen recording - of the problem, should this prove of use to you.

Cheers

Martin
Re: SDLIDE - feedback requested
Post by mschmalenbach on Dec 30th, 2017, 2:04pm

Feature adds...

I've only been working with SDLIDE for a few days. There are many things about it I really like.

One thing I do miss is when at the end of a line of text, when moving the cursor to the right with the keyboard cursor keys, I would love for the cursor to move to the start of the line below.

Equally, when at the start of a line of source code, moving the cursor to the left via the keyboard, I'd love for the cursor to move to the end of the text of the line above.

It's perhaps my only enduring niggle.

For the runtime environment, I would love it if the output of my session when running my apparently text-only basic code (I don't make use of graphics, windows or anything like that) - I'd love to be able to scroll the output screen up and see previously created output... like I can scrolling a TERMINAL screen when I'm in a CLI session on my Mac.

I appreciate there may be weird & wonderful reasons why none of these requests for feature adds is possible, and none of them are show stoppers.

Cheers

Martin
Re: SDLIDE - feedback requested
Post by Richard Russell on Dec 30th, 2017, 4:38pm

on Dec 30th, 2017, 1:59pm, mschmalenbach wrote:
I have a short piece of video - a screen recording - of the problem, should this prove of use to you.

No, unfortunately I can't help unless there's some way in which I can reproduce the issue here, which seems unlikely. It probably stems from SDL 2.0 anyway, rather than being a fault in my own code (one would expect that to affect all platforms, rather than just the Mac). I could try updating SDL to a later version in case it's a bug they've fixed, but past experience causes me to be cautious about doing that!

As you may have read elsewhere, BBCSDL will in any case stop working on Macs sometime in 2018 because Apple is dropping support for 32-bit applications, and only today I realised that the experimental 64-bit version (which I had hoped might be able to replace it) has a fatal flaw, for which I currently know of no workaround. sad

Quote:
when moving the cursor to the right with the keyboard cursor keys, I would love for the cursor to move to the start of the line below.

By all means make that modification yourself, and submit the code changes here if you like, but I wouldn't be keen on making it the 'standard' behaviour because it's different from how the BB4W editor works (which after 16 years I, and I suspect rather a lot of other people, am very accustomed to).

Quote:
when at the start of a line of source code, moving the cursor to the left via the keyboard, I'd love for the cursor to move to the end of the text of the line above.

Again, feel free to make that modification. It currently works the same as the BB4W editor, but I'm not as 'attached' to that behaviour as I am to the 'moving right past the end of line' case, so I might be prepared to incorporate the change.

There are certainly 'oddities' in the way the SDLIDE editor behaves that I'm not happy with, but have failed to find a solution to (without breaking something else). For example the fact that you cannot backspace through the 'line number field' is peculiar, as is the way search-and-replace can sometimes cause numeric constants to turn into line numbers! embarassed

Richard.