TFS 1.X+ get current page in container with pagination

Joe Rod

JoeRod #1189
Joined
Mar 16, 2011
Messages
485
Best answers
2
Likes
108
#1
Is there a way to get current page on container with pagination?
I.E. If i am

current page it would be 2

update:
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
 
Last edited:

Nekiro

worst coder
Support Team
Joined
Sep 7, 2015
Messages
1,743
Best answers
74
Likes
509
#2
I think no, but you can get item index in container and calculate it, for example container has 30 slots and its paginated, indexes starts from 0, then 30 item is on page 2, 29 is on page 1. If you arent working with any item, you just need the page for some reason, then its prolly not possible.
 

Joe Rod

JoeRod #1189
Joined
Mar 16, 2011
Messages
485
Best answers
2
Likes
108
#3
I think no, but you can get item index in container and calculate it, for example container has 30 slots and its paginated, indexes starts from 0, then 30 item is on page 2, 29 is on page 1. If you arent working with any item, you just need the page for some reason, then its prolly not possible.
Ty for answer. Let me explain better
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
 

Nekiro

worst coder
Support Team
Joined
Sep 7, 2015
Messages
1,743
Best answers
74
Likes
509
#4
Ty for answer. Let me explain better
I'm trying to get container slot to get its item (if any) there when i'm moving an item into that container. On first page is ok because getItemByIndex(index) do the work, but problem starts on other pages which i cannot figure the way to get the item there.
I know i can get the number of items using size() and indexes come from 0 to capacity() - 1, but no idea how to use those to calculate actual item index/slot
Ah, when moving the item. Afaik cipsoft client (not sure about otc), does not calculate the exact slot after page 1 (container index > container maxsize), when you move item to paginated container, it's moved into the first slot (index 0 and that's what cipsoft client is sending), that's why you can't get what you want.
 
Last edited:
Top