O$: Getting the page number that an object is on, inside a $sendall

Alex Clay aclay at mac.com
Tue Aug 17 12:16:10 UTC 2021


Hi Paul,

You might need to use $sendallref as the argument to $panenumber.

See some similar examples here: https://www.omnis.net/developers/resources/technotes/tngi0027.jsp <https://www.omnis.net/developers/resources/technotes/tngi0027.jsp>

Alex

> On Aug 17, 2021, at 08:04, Paul Mulroney <pmulroney at logicaldevelopments.com.au> wrote:
> 
> 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
> 
> 
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list