What's the CTouch current page

Discussion in 'Pascal Logic Code Examples' started by Dave Byron, May 27, 2006.

  1. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Assuming you have a project with say 40 pages how do you find out what page is currently showing?
    The “ShowingPage” seems to be based on the fact that you know the answer before you ask the question or
    do you have to do something like (syntax not valid).

    If Showingpage(‘aaaa’) then

    Else If Showingpage(‘bbbb’) then
    ………

    And so on, but you need to know the page names.
    OR
    For x =0 to 40 do
    If Showingpage(x) then

    Endif
    next

    any ideas please.
    dave
     
    Dave Byron, May 27, 2006
    #1
  2. Dave Byron

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    There is currently no way of finding the current page other than what you have suggested. A "CurrentPage" function is on the list of things to do, but it never seemed like a very useful thing.
     
    Darren, May 29, 2006
    #2
  3. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Darren
    what I want it for was so I could reset timeout timer when a new page was selected by looking at the returned last page and current page names or numbers.
    The "getclick" function does not work with themes on pages need it to look at the whole page theme and the page itself.


    dave
     
    Last edited by a moderator: May 29, 2006
    Dave Byron, May 29, 2006
    #3
  4. Dave Byron

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    OK. This relates to your other post http://www.cbusforums.com/forums/showthread.php?t=2450
    I am not sure what you mean by this. Can you clarify please ?
     
    Darren, May 29, 2006
    #4
  5. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Darren
    The pic on the other thread shows buttons down left side that are a theme page
    and are used on all the linked pages.
    But the "getclick" does not get set on the theme buttons (Home, entry, etc) only when you move to the right and click on button on the page itself.

    do you want me to send the files to u ??

    dave
     
    Dave Byron, May 29, 2006
    #5
  6. Dave Byron

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    I have worked out the cause of the problem. If the PICED page has changed since the click, then GetClick will return false, otherwise you may think that the user has clicked on the new page, which is not the case. This means that if the user clicks on a button which changes the page, the GetClick function will return false.

    So your problem is not actually related to the fact that these buttons are on a theme page, it is caused by the change of page clearing the GetClick.
     
    Darren, May 31, 2006
    #6
  7. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Darren
    Tks so it means I will not know they changed page from the buttons only when they click somwhere on the new page itself.
    Another new command "transparent themes" or "layer merging", think about that one under a palm tree at end of month.

    tks again
    dave
     
    Dave Byron, May 31, 2006
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.