Oops I triggered an update (HSplit and VSplit is now Splitter)

Feel free to talk about non programming issues here.
Post Reply
User avatar
BruceSteers
Posts: 654
Joined: Thursday 23rd July 2020 5:20pm

Oops I triggered an update (HSplit and VSplit is now Splitter)

Post by BruceSteers » Thursday 18th March 2021 7:27pm

So all it started with me using the new html previewer in the IDE.

I wished it could split horizontally and not just vertically as it would have been handy with the doc i was editing.
I had a look at the gambas code and it was all a bit beyond me so..

So yesterday evening i went to the bugtracker and submitted a "Request" and asked Benoit nicely if it might be possible to make the previewer do that.
Then i went to off work to clean the doctors.

Half way through my shift i thought , actually wouldn't it be cool if a HSplit or VSplit could change orientation?
There'd be loads of uses for that.

So after work i had another look at gambas code but this time at the HSplit, VSplit and their parent class _Split.
I found a way and added a function Switch() to _Split
That allowed either HSplit or VSplit to change just like that :)
The code looked good, functionally cool.
I I explained on the bugtracker request that I'd had a better idea to make splitters swappable and submitted a merge request.......

Then in the afternoon i have been working on a roof and by the time i'd finished Benoit has agreed the Split view being able to change is a good idea but not the way i did it so he's made a better way to handle Splits with only one class instead of 3 but now HSplit and VSplit have become depreciated and there is a new split panel class called Splitter and it is Horizontal or Vertical by setting the Arrangement property.

I tested it out by using it on the gambas html previewer ......


It works a treat :)
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
PJBlack
Posts: 159
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Oops I triggered an update (HSplit and VSplit is now Splitter)

Post by PJBlack » Thursday 18th March 2021 11:38pm

BruceSteers wrote:
Thursday 18th March 2021 7:27pm
It works a treat :)
äääähm ...

- splatter needs a nice icon in the tool bar

- setting a editor window to spilt vertically :

Code: Select all

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then again

Code: Select all

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then it show up right ...

setting a editor window to spilt horizontally works fine.

- crying at a very top-level: trying to split one of the splitted did clear the splitting

User avatar
BruceSteers
Posts: 654
Joined: Thursday 23rd July 2020 5:20pm

Re: Oops I triggered an update (HSplit and VSplit is now Splitter)

Post by BruceSteers » Friday 19th March 2021 1:57am

PJBlack wrote:
Thursday 18th March 2021 11:38pm
BruceSteers wrote:
Thursday 18th March 2021 7:27pm
It works a treat :)
äääähm ...

- splatter needs a nice icon in the tool bar

- setting a editor window to spilt vertically :

Code: Select all

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then again

Code: Select all

This application has raised an unexpected error and must abort.
Invalid object (#29).
ScrollArea.ScrollArea_Arrange.457
[Ignore] then it show up right ...

setting a editor window to spilt horizontally works fine.

- crying at a very top-level: trying to split one of the splitted did clear the splitting
er what do you mean setting an editor window? only the Splitter container can do this.

I've used it on a few things , had no problems at all.
It's essentially no different to the old HSplit VSplit that used to use _Split.class and set the arrangement at creation, now arrangement can be switched.

You'll have to watch how the objects inside are set up though to be sure they can take a dual mode split , probably best to put them in their own panels and only set alignment/arrangement of things inside.

it's probably the layout of your objects than make it go wrong in vertical.
there's always a way fella :)
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
PJBlack
Posts: 159
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Oops I triggered an update (HSplit and VSplit is now Splitter)

Post by PJBlack » Friday 19th March 2021 2:44am

ok forget about it ...

i thought that ide editor uses internally the hsplit/vsplit to split the code window

User avatar
BruceSteers
Posts: 654
Joined: Thursday 23rd July 2020 5:20pm

Re: Oops I triggered an update (HSplit and VSplit is now Splitter)

Post by BruceSteers » Friday 19th March 2021 9:33am

PJBlack wrote:
Friday 19th March 2021 2:44am
ok forget about it ...

i thought that ide editor uses internally the hsplit/vsplit to split the code window
aah.
no it's splPreview
currently a HSplit , convert it into Splitter :)
I've submitted a merge request so hopefully it will be in gambas soon anyway :)
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 654
Joined: Thursday 23rd July 2020 5:20pm

Re: Oops I triggered an update (HSplit and VSplit is now Splitter)

Post by BruceSteers » Friday 19th March 2021 11:06am

Here's the link to the changes i made to make the previewer work as other things do in gambas (using a toolbutton and the toolbar actions)

https://gitlab.com/bsteers4/gambas/-/tr ... er-arrange
Wishing well
Bruce

If at first you don't succeed , try it differently.

Post Reply