NetTalk Central

Author Topic: Cycle statement in web?  (Read 2927 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Cycle statement in web?
« on: July 28, 2014, 04:04:39 AM »
Hi Bruce

What web statement can I use in the web in place of the "cycle" statement?

Kind regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cycle statement in web?
« Reply #1 on: July 28, 2014, 06:09:29 AM »
Cycle is a code statement used in loops to return to the top of the loop.
NetTalk apps are written in clarion, so Cycle works just like before - you don't need to change it at all - it jumps to the top of the loop.

I suspect you are referring to the CYCLE statement used to "swallow" a windows event - assuming you still use that Legacy-based tradition, but given that the WebProcedures have neither an ACCEPT loop, nor Windows events, I'm not sure what you are trying to accomplish.

You'd probably be better off framing the question around the problem you are actually trying to solve, rather than looking for some equivalent of how you might solve the problem using some other architecture.

cheers
Bruce



johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Cycle statement in web?
« Reply #2 on: July 28, 2014, 09:13:31 PM »
Hi Bruce

I use a memory form with buttons on it. On the 'Add server side code here' embed-point I have some code with an  If statement and in that statement a  cycle statement. The cycle was to go back to the window and not to run the rest of the code.

The cycle giving a compile error.

What I did is to use session variables and then filter on the session values. This is working fine like this. Just wonder if there is a better way to do it?

Many tanks
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cycle statement in web?
« Reply #3 on: July 29, 2014, 04:43:39 AM »
>> On the 'Add server side code here' embed-point I have some code with an  If statement

right click on the procedure and choose "source". Then go view your embed code in context. Then the answer to your question becomes obvious.

I _always_ recommend inspecting your embed code in context. Frankly I'm not sure how you write embed code without knowing the context, but I'm not as bright as some folk...

cheers
Bruce