Page 1 of 1

navigation shortcuts

PostPosted: Mon Nov 10, 2003 3:04 pm
by IT2Be
Related to my previous request but still...

I would like some shortcuts to give the user the possibility to navigate to first, previous, next, last records.

Is this something to do ourselves or something that we can have that as a standard?

Re: navigation shortcuts

PostPosted: Mon Nov 10, 2003 9:52 pm
by mattman
IT2BE wrote:Related to my previous request but still...

I would like some shortcuts to give the user the possibility to navigate to first, previous, next, last records.

Is this something to do ourselves or something that we can have that as a standard?


Seems like it might be something you can do with the pending feature of being able to write menus. If you can attach methods to menus and shortcuts to menus then you will likely have key-command support.

But then, I'm not one of the developers.

PostPosted: Mon Nov 10, 2003 9:55 pm
by IT2Be
That's what I thought too but still wanted to ask the developers. You never know what goodies they have for us on the shelf...

PostPosted: Tue Nov 11, 2003 1:47 am
by Jan Blok
Not planned becouse it so easy:
controller.recordIndex = 1;//first
controller.recordIndex++;//next
controller.recordIndex--;//previous

For lastrecord you have to loop (we don not have all rows availeble at all times in servoy client, there could be possible millions!, probably a bad thing to go to last record)

for (var x = 1 ; x <= controller.getMaxRecordIndex() ; x++)
{
controller.recordIndex = x;
}

PostPosted: Tue Nov 11, 2003 11:24 am
by jcompagner
To directly go to the last record without getting all the other records:

while(controller.recordIndex != controller.getMaxRecordIndex() )
{
controller.recordIndex = controller.getMaxRecordIndex();
}

PostPosted: Tue Nov 11, 2003 11:27 am
by IT2Be
Thanks for the tip guys!!!