O$: Getting the page number that an object is on, inside a $sendall
Paul Mulroney
pmulroney at logicaldevelopments.com.au
Tue Aug 17 12:04:20 UTC 2021
Hi $All,
I've done this before, I'm sure of it! But I'm having brain fade.
We validate our fields on a window by doing a $sendall, and then displaying the result to the user.
It looks something like this:
> Calculate isErr as ''
> Calculate isWarn as ''
> Do $cwind.$objs.$sendall($ref.$validate)
>
> If len(isErr)
> OK message Validate {[isErr]}
> Quit event handler (Discard event)
> Else If len(isWarn)
> Yes/No message Validate {[isWarn]Continue anyway?}
> If flag false
> Quit event handler (Discard event)
> End If
> End If
In this particular case, I have a paged pane, and I only want to validate fields on eg page 2. I know that I can specify a condition in the $sendall, and I know that there's a $panenumber() method that will tell me which pane an object is on.
I think it should be something like this:
> Calculate pnCurrentPage as 1
> Do $cinst.$objs.PagedPane.$objs.$sendall($ref.$validate,$cinst.$objs.PagedPane.$panenumber($ref)=pnCurrentPage)
But this doesn't do anything. Has anyone done anything like this before?
All help gratefully received.
Regards,
Paul.
Two Eskimos sitting in a kayak were chilly, so they lit a fire in the craft. Unsurprisingly it sank, proving once again that you can't have your kayak and heat it too.
—
Paul W. Mulroney We Don't Do Simple Pty Ltd
pmulroney at logicaldevelopments.com.au Trading as Logical Developments
www.logicaldevelopments.com.au ACN 161 009 374
Ph: +61 8 9458 3889 86 Coolgardie Street
BENTLEY WA 6102
More information about the omnisdev-en
mailing list