Handles.Beams.PreviousPage()

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

User avatar
sideshowbond
Posts: 153
Joined: 18 Nov 2016, 20:58

Handles.Beams.PreviousPage()

Postby sideshowbond » 15 Aug 2018, 12:50

I was just trying

Code: Select all

Handles.Beams.PreviousPage()

and it would just straight jump to what seems to be an inaccessible page 0.

Code: Select all

NextPage
jumps straight to page 1 regardless of its previous position. Is that expected behaviour or am I doing something wrong here?
icke_siegen
Posts: 899
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Handles.Beams.PreviousPage()

Postby icke_siegen » 15 Aug 2018, 21:29

Does previousPage() really jump STRAIGHT to page 0? From my experience it decrements, one by one, until it reaches page 0.

Apart from that you are right - it doesn't look right
User avatar
Gregory
Site Admin
Posts: 1103
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Handles.Beams.PreviousPage()

Postby Gregory » 22 Aug 2018, 14:02

The next and previous page functions unfortunately do not work properly for workspace windows as they attempt to loop around the maximum number of pages. For the playback faders this is 60, so when you are on that page pressing next page will take you to page 1 and the opposite is true with previous page. However workspace windows do not have a predefined maximum page number so this is set to zero which means that next page always loops around to page 1 and when on page 1 previous page will take you to the maximum page which is zero. One work around is to set the page directly e.g.:

Code: Select all

Handles.Beams.ChangePage(Handles.Beams.Page.Index + 1)

Note however that this doesn't do any error checking so will allow you to go to any page number including negative page numbers.

Who is online

Users browsing this forum: No registered users and 1 guest