NetTalk Central

Author Topic: Number of records and actual page in 7.15  (Read 2925 times)

estadok

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • EstaSoft
    • Email
Number of records and actual page in 7.15
« on: July 17, 2013, 08:47:58 AM »
Hi!

I have a bit of code in NTbrowse procedure (before buttons) which I using for display count of filtered records of table and actual page. In NT 7.12 all work fine, but in NT 7.15 it actually works to, but doesn't refreshes with browse, and I have for example: "Count of filtered records 0  Actual Page 1". In firebug I see that the browse, nav. buttons, and action buttons are in separate <div> and my <table> is in between browse and nav. I think, there was the problem.  The question is, in which embed point I shall put my code to do my stuff?
« Last Edit: July 17, 2013, 10:11:22 AM by estadok »
Clarion 9.0.10376
NetTalk 7.26
SecWin 6.25
StringTheory 1.92

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Number of records and actual page in 7.15
« Reply #1 on: July 17, 2013, 10:02:16 PM »
yes, embedded html in browses is likely to be a problem because of the overhaul. The best approach is probably to post an example so I can experiment and see what works best.

the correct point will depend enormously on exactly what, and more specifically _when_, you need the html updated.

cheers
Bruce

estadok

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • EstaSoft
    • Email
Re: Number of records and actual page in 7.15
« Reply #2 on: July 17, 2013, 10:30:43 PM »
Here the example

[attachment deleted by admin]
Clarion 9.0.10376
NetTalk 7.26
SecWin 6.25
StringTheory 1.92

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Number of records and actual page in 7.15
« Reply #3 on: July 23, 2013, 04:30:15 AM »
Hi Alexandr,

couple errors I noticed in the example - not sure if they also apply to your app; I think maybe they're just small errors in making the example, I'm guessing your app is ok though.

a) your use of direction# is broken, because implicit variables only live "inside" one routine, and you're setting it in one routine, but using it in another. Rather make a local variable and then you can set it and use it as you have done.

b) I got an ASSERT when I ran the program because you were using records(MailBoxes) but the MailBoxes table was not opened at that point.

Back to your question - I'm gonna answer this as more of a tutorial than a straight-out answer.
a) you need 7.17 or later
b) put your code in a routine
c) figure out what "events" should trigger the routine [note 1]
d) right-click on the procedure, choose Source, search for TakeEvent  Routine and make calls to your routine there.

[note 1] To "see" events as they arrive in the browse in Debugview, turn on the option Send Stage to Debugview.

Cheers
Bruce


estadok

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • EstaSoft
    • Email
Re: Number of records and actual page in 7.15
« Reply #4 on: July 23, 2013, 04:35:57 AM »
Thanks Bruce! I will try, and will write about result. Will wait for 7.17.
Clarion 9.0.10376
NetTalk 7.26
SecWin 6.25
StringTheory 1.92