Date   

Is there anybody there?

Richard Russell
 

I am very conscious that messages that I have posted here in the last few days are not receiving any replies.  I announced the release of BBCSDL v1.00c with a request for feedback: NOTHING.  I specifically asked David Nichols to test the new version and report back: NOTHING.  I responded to Leslie Baker about his window resizing problems: NOTHING.  Either I am being ignored or a technical fault is causing my messages not to be forwarded to members who receive them as emails (in which case I am talking to myself); I'm not sure which is preferable!!


Re: A minor query?

Richard Russell
 

On Tue, Feb 12, 2019 at 02:14 PM, Leslie Baker wrote:
Its round the houses but it does work.
However it's most unlikely to be reliable.  The underlying cause, I am almost certain, is what I described: the 'window size changed' notification is being generated before the window has 'settled' to its final size, so the VDU 26 is not picking up the correct dimensions.  Please try the modification to SDLIDE.bbc that I suggested, if the addition of a small delay resolves the issue I will incorporate that change in the 'master' version.


Re: A minor query?

 

Not quite, but similar.
When I invoke the ide it initially appears as a small window. If I click
maximize a larger window fills the screen but the ide window only occupies
the top left quadrant.
All I need to do before I click maximize is load any basic program, then
click maximize and it does it ok. I can then select new to remove the loaded
program. Its round the houses but it does work.

-----Original Message-----
From: bb4w@groups.io [mailto:bb4w@groups.io] On Behalf Of J.G.Harston
Sent: 12 February, 2019 2:05 PM
To: bb4w@groups.io
Subject: Re: [bb4w] A minor query?

On 12-02-2019 08:36, Leslie Baker wrote:
initially is in a smallish window, if I click the maximise button the
screen fills with the white window, but the actual ide area is only
about one quarter of that.
Here when running BBSDL on Windows 7 the 'chose IDE' window initially opens
twice the needed size then resizes within less than a second to the size
needed. When SDLIDE is selected there is a very brief flicker of a window
smaller than needed, then the correct size IDE window is drawn, smaller than
full screen.

If I click 'maximize', the window maximises, and the IDE area appears within
it for about a second, then it is redrawn filling the window.
Is that what you mean? It was a bit fiddly to capture this:

http://mdfs.net/temp/resize1.gif
http://mdfs.net/temp/resize2.gif

--
J.G.Harston - jgh@... - mdfs.net/jgh


Re: A minor query?

J.G.Harston
 

On 12-02-2019 08:36, Leslie Baker wrote:
initially is in a smallish window, if I click the maximise button the
screen fills with the white window, but the actual ide area is only
about one quarter of that.
Here when running BBSDL on Windows 7 the 'chose IDE' window initially
opens twice the needed size then resizes within less than a second to
the size needed. When SDLIDE is selected there is a very brief flicker
of a window smaller than needed, then the correct size IDE window
is drawn, smaller than full screen.

If I click 'maximize', the window maximises, and the IDE area appears
within it for about a second, then it is redrawn filling the window.
Is that what you mean? It was a bit fiddly to capture this:

http://mdfs.net/temp/resize1.gif
http://mdfs.net/temp/resize2.gif

--
J.G.Harston - jgh@... - mdfs.net/jgh


Re: A minor query?

Richard Russell
 

On Tue, Feb 12, 2019 at 08:38 AM, Leslie Baker wrote:
Is this considered normal for this version of your bbc basic?
It doesn't do it here, but then I'm running a different version of Linux (Ubuntu 18.04) on different hardware.   So unfortunately there's no "normal" when it comes to a cross-platform product like BBCSDL, and of all the supported OSes Linux is probably the most variable!

A Google search finds this relevant comment at the old SDL2 forum: "For example, on Linux, when a window is resized, the app will receive the event sequence {LEAVE, FOCUS_LOST, MOVED, (RESIZED, EXPOSED)*... FOCUS_GAINED, ENTER} depending upon the flavor of Linux and the desktop focus policy".

The key phrase there is "depending on the flavour of Linux" and it would seem that yours is behaving in an unhelpful fashion.   That being the case I fear that the only solution will be an ugly workaround.  The key piece of code in SDLIDE.bbc is this:

      IF Resized% THEN
        Resized% = FALSE
        VDU 26
        IF POS REM SDL thread sync.
        PROCdrawall(@vdu%!208, @vdu%!212)
        Refresh% = TRUE
      ENDIF

Try playing with this to see if you can find a modification which fixes the issue without any undesirable side-effects.   An 'obvious' thing to try would be to add a small delay before the VDU 26 to allow the window to settle in its new size before being interrogated.  Since you are the only one who is experiencing the issue I am totally dependent on you to find a solution.


A minor query?

 

Richard, and all ..

I recently installed bbcsdl on my Linux Mint 19 desktop and it seems to be ok apart from a minor point ... Having opened the IDE, it initially is in a smallish window, if I click the maximise button the screen fills with the white window, but the actual ide area is only about one quarter of that. If I load a program before maximising, the ide area does then fill the screen. Is this considered normal for this version of your bbc basic?

 


Virus-free. www.avast.com


Re: Problem with SWAP on Android using BBCSDL

Richard Russell
 

On Mon, Feb 11, 2019 at 10:15 AM, alan836975 wrote:
And the thing I miss most about BBCSDL is not having any menu/dialog calls. That stops me dead.
What a strange thing to say.  Dialogue boxes are quite well supported in BBCSDL: there's a library ('dlglib.bbc') and an example program ('dlgdemo.bbc') which are supplied with all the desktop editions.  'SDLIDE.bbc', 'compiler,bbc', 'listvars.bbc' and 'profiler.bbc' all use dialogue boxes, or components thereof (e.g. list boxes) created using the supplied library.  The syntax is deliberately very similar to that used by the WINLIB2 library so porting existing code is usually straightforward (although there's no combobox, so you would need to fabricate it from a textbox and a listbox if you required one).

It's true that there is currently no library support for menus, but both 'SDLIDE.bbc' and 'BBCEdit.bbc' have drop-down menus so code can be borrowed from them or quite easily written from scratch (a menu is little more than a clickable text viewport).  If somebody would like to contribute a menu library, either written from scratch or containing code taken from, say, 'SDLIDE.bbc' I would be more than happy to consider including it (the latest release of BBCSDL contains a user-supplied TreeView control as you know). 

Anyway, when asking about features 'missing' from BBCSDL I am of course talking about BBC BASIC language features.  No version of BBC BASIC has ever had built-in support for menus or dialogue boxes, or indeed any kind of GUI.  If that's what you are after, consider a language like Liberty BASIC (or LB Booster) which does.


Re: Problem with SWAP on Android using BBCSDL

 

I tried using RECTANGLE SWAP in a little program I was writing, and it worked nicely, but I then dropped it in favour of scrolling the screen - much easier to understand for the user.

And the thing I miss most about BBCSDL is not having any menu/dialog calls. That stops me dead.

Alan Roberts

--
Alan Roberts - Mugswell, Surrey
+44 (0)1737832586
+44 (0)7749387934


Re: Problem with SWAP on Android using BBCSDL

Richard Russell
 

On Thu, Feb 7, 2019 at 01:56 PM, Richard Russell wrote:
No.  It's not a 'standard' BBC BASIC feature anyway: it's something I added in BB4W (because I could) but it's not present in any other version, including Acorn versions and BBCSDL.  I've never seen it used in a program so I didn't think it would be missed.
I was expecting (or at least hoping for) some reaction to this, for example in respect of what your use case is (were you experimenting with RECTANGLE SWAP out of curiosity or because you have a specific application?) or whether anybody else considers the absence of this feature from BBCSDL to be of concern.  I'm willing to bet that 90% of BB4W users have never been aware that it existed!

There are several other features of BB4W which have never made it into BBCSDL, either because of the difficulty involved or because I haven't been able to motivate myself to do so.  When I canvassed opinion on whether to bump the version number to 1.00 I drew attention to the fact that BBCSDL is 'incomplete' but that didn't seem to be of great concern, at least not sufficiently so to warrant delaying that move.

But I am still interested to know if there are features that people think should be added.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Sat, Feb 9, 2019 at 08:37 PM, DaveinSpain wrote:
I have recorded the faulty one and am enclosing it - although only you, Richard, will be able to receive it, I believe.
I have explained before that I view the group using its web interface which does not support attachments.

Have you tried version 1.00c and if so what are your findings in respect of the questions I asked?


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

DaveinSpain
 

Richard, I have been experimenting, with some very strange results!
I have two Android machines. One I can't make go wrong, the other always goes wrong - a Blackview with v7.0

I have modified "elipses.bbc" with:- a=GET : CLG after the A% = A%+1 increment.
I have modified "elipse.bbc" with variables for the eight "4,3" in the relevant places.
The same mod on both machines

I now have "stop motion"  and get different results on each.
I have recorded the faulty one and am enclosing it - although only you, Richard, will be able to receive it, I believe.

Regards, Dave N


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

I've uploaded BBCSDL v1.00c (Android only) to make it easier for people to do some more testing without needing to edit the ellipse library themselves.  In this version I've set the number of line segments per Bezier curve to six (twice the original number) and also done some more tidying up.  For example there is now error trapping to catch the possibility of it being interrupted whilst in an unstable state.

I'd like as many people with Android devices as possible to respond to the following questions:

1.  Is six line segments per Bezier working better than, worse than or no different from the original three?
2.  For those who experimented with four segments, is six segments better, worse or no different?
3.  Does it seem that increasing the number of line segments results in a general improvement, or does it simply alter the angles at which the flood-fill 'leaks'?

Unfortunately I cannot provoke it to fail on any of my Android devices (six in all) so I am reliant on these reports in order to make any progress.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

LifesVoyager
 

Sorry.  That should be  Android 5.0.2


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Fri, Feb 8, 2019 at 01:35 PM, DaveinSpain wrote:
I then tried changing the short axis in 'elipses.bbc' from 80 to 480, effectively  making it draw circles and the fault reappeared
Of course a circle has a greater circumference than the ellipse (and hence the straight-line segments comprising the Bezier curves are longer) so can I assume you tried increasing the number above 4?  I did say to try increasing it "from 3 to 4 (or more)" so to keep the segments short - if indeed that helps - implies increasing the number pro-rata with the circumference.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

LifesVoyager
 

Also

Running Android 8.0.2 on a different XiaoMi phone,  ellipses.BBC works perfectly


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

Richard Russell
 

On Fri, Feb 8, 2019 at 12:49 PM, lettersquash wrote:
the angles change and ellipses still fail at particular angles.
That's what I would have expected.  It would still be interesting to know whether the 'gaps' through which the flood-fill is apparently leaking are at the junctions between the four Bezier curves, or between the straight-line segments comprising the Bezier curves.  The former would be amenable to a workaround of 'plugging the gaps' but the latter not.  The way I would probably make that determination would be to colour the four Bezier curves differently (that would involve changing the flood-fill to the more common 'fill while background' type rather than the 'fill until foreground' used by the ellipse library).


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

DaveinSpain
 

It fails on my Android v7.0 phone too.
After the 4 to 3 mod it seemed to be okay.
I then tried changing the short axis in 'elipses.bbc' from 80 to 480, effectively  making it draw circles and the fault reappeared.
Tried making the line thicker but elipses only uses single pixel lines.
Dave N


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

As I said earlier, something else is quite different depending on the device or OS or something, because on my Galaxy Tab, each ellipse is erased before the next one is drawn (without any leaking, at least at those defaults - I haven't edited either file on that machine), whereas on my phone they are left, so the next one overlaps part of the pattern and a sort of elliptical spiral staircase emerges. I expect this is what the code is supposed to do, leave them, but I don't know what the second call, to PROCellipse, actually does. I'm guessing it just draws an outline round the already drawn ellipse. So on the Tab, perhaps that's not working either and is filling it in background colour or something. But the Tab is ancient.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

Yeah, it hadn't quit. Killing the process and re-running BBC BASIC, as you say, reinstates the 3, but my tests were with a 4, and some angles still fail. Sorry to say.


Re: Problem with ellipsefill on Android using BBCSDL 1.00a

lettersquash <j.r.freestone@...>
 

OK, so I did close BBCSDL before trying different values of n% (number instead of 20 as above), and it failed on other numbers.

But being Android, perhaps it didn't quit, because when I just started it again and checked, the changes to ellipse.bbc in @lib% remain.

So if I understand right, that's bad news. With the "4 instead of 3" fix, if you try 12 instead of 20 (say) in ellipses.bbc, it fails again. 20 just happens to work out to avoid the error.