Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Global Function

6 posts in Objects Last posting was on 2002-06-29 13:31:43.0Z
Alejandro Vignolo Posted on 2002-06-27 18:59:16.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Alejandro Vignolo" <mmalvicini@belt.com.ar>
From: "Alejandro Vignolo" <avignolo@belt.com.ar>
Subject: Global Function
Date: Thu, 27 Jun 2002 15:59:16 -0300
Lines: 5
Organization: Belt s.r.l.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: server2000.belt.com.ar 200.42.70.11
Message-ID: <364_nZ$q34gHCHA.1020@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1146
Article PK: 713708

I need to Know How obtain which window calls a global function (not a window
function) within a function.


De Permentier Davy Posted on 2002-06-28 07:16:24.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "De Permentier Davy" <NO_SPAM_davy.de.permentier@cmlag.fgov.be>
Subject: Re: Global Function
Date: Fri, 28 Jun 2002 09:16:24 +0200
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: 193.190.121.69
Message-ID: <364_pLGY9TnHCHA.1020@forums.sybase.com>
References: <364_nZ$q34gHCHA.1020@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1144
Article PK: 713709

Hey,

I'm not sure if I understand correctly but here it goes anyway...
If you just want to find out which window calls the global function without
running the application, just do a global search on your application for
that global function.
If for example you want to know at runtime which window called the global
function, you can use "This.ClassName" in your window and pass it as an
argument to that global function or something.

Hope this helps,
Davy

"Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
news:nZ$q34gHCHA.1020@forums.sybase.com...
> I need to Know How obtain which window calls a global function (not a
window
> function) within a function.
>
>
>


Alejandro Vignolo Posted on 2002-06-28 13:26:14.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Alejandro Vignolo" <avignolo@belt.com.ar>
Subject: Re: Global Function
Date: Fri, 28 Jun 2002 10:26:14 -0300
Lines: 45
Organization: Belt s.r.l.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: server2000.belt.com.ar 200.42.70.11
Message-ID: <364_qMNYcjqHCHA.1020@forums.sybase.com>
References: <364_nZ$q34gHCHA.1020@forums.sybase.com> <364_pLGY9TnHCHA.1020@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1143
Article PK: 713706

Davy:
Thank you for your previous solution, but althought it's correct, it is of
no real use to us. Allow me to clarify our problem:

We have a fully programmed system, where permanent calls to a global
function are made(and new arguments cannot be added to it).

From inside this function, i need to know the name of the window which
called that function.

Let me repear myself: This is a Global type Function to which new arguments
cannot be added. NOT not a window function.

Thanks in advance

"De Permentier Davy" <NO_SPAM_davy.de.permentier@cmlag.fgov.be> wrote in
message news:pLGY9TnHCHA.1020@forums.sybase.com...
> Hey,
>
> I'm not sure if I understand correctly but here it goes anyway...
> If you just want to find out which window calls the global function
without
> running the application, just do a global search on your application for
> that global function.
> If for example you want to know at runtime which window called the global
> function, you can use "This.ClassName" in your window and pass it as an
> argument to that global function or something.
>
> Hope this helps,
> Davy
>
>
> "Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
> news:nZ$q34gHCHA.1020@forums.sybase.com...
> > I need to Know How obtain which window calls a global function (not a
> window
> > function) within a function.
> >
> >
> >
>
>


Simon Caldwell [TeamSybase] Posted on 2002-06-28 14:00:43.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Simon Caldwell [TeamSybase]" <simonDOTcaldwellATbigfootDOTcom>
Subject: Re: Global Function
Date: Fri, 28 Jun 2002 15:00:43 +0100
Lines: 73
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: getreal.demon.co.uk 193.237.14.95
Message-ID: <364_LHwyo2qHCHA.654@forums.sybase.com>
References: <364_nZ$q34gHCHA.1020@forums.sybase.com> <364_pLGY9TnHCHA.1020@forums.sybase.com> <364_qMNYcjqHCHA.1020@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1142
Article PK: 713702

Not nice, but given your limitations possibly the best you can do:
In your ancestor window, set a global variable (or, better, an instance
variable in a global NVO) to 'this' in the activate event. Then in your
global function, read the value of the variable.
If you had two windows w1 and w2, and in w1 had some code like
w2.wf_something()
and wf_something called the global function, then it would give w1 as the
calling window, not w2. This may or may not be what you want.

Out of interest, why can't you add an argument to the global function?
Or better, replace the global function with an object function in a global
NVO - this would allow the function to be overloaded if a future change
required the addition of another new argument, so allowing a default value
to be given.

Simon

--
All views expressed in this message are my own and not necessarily those of
my employer

"Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
news:qMNYcjqHCHA.1020@forums.sybase.com...
> Davy:
> Thank you for your previous solution, but althought it's correct, it is of
> no real use to us. Allow me to clarify our problem:
>
> We have a fully programmed system, where permanent calls to a global
> function are made(and new arguments cannot be added to it).
>
> From inside this function, i need to know the name of the window which
> called that function.
>
> Let me repear myself: This is a Global type Function to which new
arguments
> cannot be added. NOT not a window function.
>
> Thanks in advance
>
>
> "De Permentier Davy" <NO_SPAM_davy.de.permentier@cmlag.fgov.be> wrote in
> message news:pLGY9TnHCHA.1020@forums.sybase.com...
> > Hey,
> >
> > I'm not sure if I understand correctly but here it goes anyway...
> > If you just want to find out which window calls the global function
> without
> > running the application, just do a global search on your application for
> > that global function.
> > If for example you want to know at runtime which window called the
global
> > function, you can use "This.ClassName" in your window and pass it as an
> > argument to that global function or something.
> >
> > Hope this helps,
> > Davy
> >
> >
> > "Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
> > news:nZ$q34gHCHA.1020@forums.sybase.com...
> > > I need to Know How obtain which window calls a global function (not a
> > window
> > > function) within a function.
> > >
> > >
> > >
> >
> >
>
>


Alejandro Vignolo Posted on 2002-06-28 19:24:22.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Alejandro Vignolo" <avignolo@belt.com.ar>
Subject: Re: Global Function
Date: Fri, 28 Jun 2002 16:24:22 -0300
Lines: 90
Organization: Belt s.r.l.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: customer.iplannetworks.net 200.69.233.145
Message-ID: <364_gW4dkrtHCHA.654@forums.sybase.com>
References: <364_nZ$q34gHCHA.1020@forums.sybase.com> <364_pLGY9TnHCHA.1020@forums.sybase.com> <364_qMNYcjqHCHA.1020@forums.sybase.com> <364_LHwyo2qHCHA.654@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1137
Article PK: 713703

Simon:
We can't modify de fuction because the funcion is call in every windows
(almost 1300), this function is used to set "Begin Tran", "Commit Tran" or
"Rollback" throught Microsoft SQL 2000.

Thank's
Ale.

"Simon Caldwell [TeamSybase]" <simonDOTcaldwellATbigfootDOTcom> wrote in
message news:LHwyo2qHCHA.654@forums.sybase.com...
> Not nice, but given your limitations possibly the best you can do:
> In your ancestor window, set a global variable (or, better, an instance
> variable in a global NVO) to 'this' in the activate event. Then in your
> global function, read the value of the variable.
> If you had two windows w1 and w2, and in w1 had some code like
> w2.wf_something()
> and wf_something called the global function, then it would give w1 as the
> calling window, not w2. This may or may not be what you want.
>
> Out of interest, why can't you add an argument to the global function?
> Or better, replace the global function with an object function in a global
> NVO - this would allow the function to be overloaded if a future change
> required the addition of another new argument, so allowing a default value
> to be given.
>
> Simon
>
> --
> All views expressed in this message are my own and not necessarily those
of
> my employer
>
>
> "Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
> news:qMNYcjqHCHA.1020@forums.sybase.com...
> > Davy:
> > Thank you for your previous solution, but althought it's correct, it is
of
> > no real use to us. Allow me to clarify our problem:
> >
> > We have a fully programmed system, where permanent calls to a global
> > function are made(and new arguments cannot be added to it).
> >
> > From inside this function, i need to know the name of the window which
> > called that function.
> >
> > Let me repear myself: This is a Global type Function to which new
> arguments
> > cannot be added. NOT not a window function.
> >
> > Thanks in advance
> >
> >
> > "De Permentier Davy" <NO_SPAM_davy.de.permentier@cmlag.fgov.be> wrote in
> > message news:pLGY9TnHCHA.1020@forums.sybase.com...
> > > Hey,
> > >
> > > I'm not sure if I understand correctly but here it goes anyway...
> > > If you just want to find out which window calls the global function
> > without
> > > running the application, just do a global search on your application
for
> > > that global function.
> > > If for example you want to know at runtime which window called the
> global
> > > function, you can use "This.ClassName" in your window and pass it as
an
> > > argument to that global function or something.
> > >
> > > Hope this helps,
> > > Davy
> > >
> > >
> > > "Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
> > > news:nZ$q34gHCHA.1020@forums.sybase.com...
> > > > I need to Know How obtain which window calls a global function (not
a
> > > window
> > > > function) within a function.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Andy Turiansky [TeamSybase] Posted on 2002-06-29 13:31:43.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Andy Turiansky [TeamSybase]" <andyt@delanet.com>
From: "Andy Turiansky [TeamSybase]" <andyt@delanet.com>
Subject: Re: Global Function
Date: Sat, 29 Jun 2002 09:31:43 -0400
Lines: 107
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: pcp01507286pcs.kenets01.pa.comcast.net 68.82.145.191
Message-ID: <364_hJx#YJ3HCHA.1020@forums.sybase.com>
References: <364_nZ$q34gHCHA.1020@forums.sybase.com> <364_pLGY9TnHCHA.1020@forums.sybase.com> <364_qMNYcjqHCHA.1020@forums.sybase.com> <364_LHwyo2qHCHA.654@forums.sybase.com> <364_gW4dkrtHCHA.654@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1136
Article PK: 713700

If the function in question is a global function, as I think you've stated,
and you have 1300 windows that call this function, then you'd really only
have to cange the function once. As long as all your windows are inherited
from the ancestor, then what Simon suggested should work for you.

"Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
news:gW4dkrtHCHA.654@forums.sybase.com...
> Simon:
> We can't modify de fuction because the funcion is call in every
windows
> (almost 1300), this function is used to set "Begin Tran", "Commit Tran" or
> "Rollback" throught Microsoft SQL 2000.
>
> Thank's
> Ale.
>
> "Simon Caldwell [TeamSybase]" <simonDOTcaldwellATbigfootDOTcom> wrote in
> message news:LHwyo2qHCHA.654@forums.sybase.com...
> > Not nice, but given your limitations possibly the best you can do:
> > In your ancestor window, set a global variable (or, better, an instance
> > variable in a global NVO) to 'this' in the activate event. Then in your
> > global function, read the value of the variable.
> > If you had two windows w1 and w2, and in w1 had some code like
> > w2.wf_something()
> > and wf_something called the global function, then it would give w1 as
the
> > calling window, not w2. This may or may not be what you want.
> >
> > Out of interest, why can't you add an argument to the global function?
> > Or better, replace the global function with an object function in a
global
> > NVO - this would allow the function to be overloaded if a future change
> > required the addition of another new argument, so allowing a default
value
> > to be given.
> >
> > Simon
> >
> > --
> > All views expressed in this message are my own and not necessarily those
> of
> > my employer
> >
> >
> > "Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
> > news:qMNYcjqHCHA.1020@forums.sybase.com...
> > > Davy:
> > > Thank you for your previous solution, but althought it's correct, it
is
> of
> > > no real use to us. Allow me to clarify our problem:
> > >
> > > We have a fully programmed system, where permanent calls to a global
> > > function are made(and new arguments cannot be added to it).
> > >
> > > From inside this function, i need to know the name of the window which
> > > called that function.
> > >
> > > Let me repear myself: This is a Global type Function to which new
> > arguments
> > > cannot be added. NOT not a window function.
> > >
> > > Thanks in advance
> > >
> > >
> > > "De Permentier Davy" <NO_SPAM_davy.de.permentier@cmlag.fgov.be> wrote
in
> > > message news:pLGY9TnHCHA.1020@forums.sybase.com...
> > > > Hey,
> > > >
> > > > I'm not sure if I understand correctly but here it goes anyway...
> > > > If you just want to find out which window calls the global function
> > > without
> > > > running the application, just do a global search on your application
> for
> > > > that global function.
> > > > If for example you want to know at runtime which window called the
> > global
> > > > function, you can use "This.ClassName" in your window and pass it as
> an
> > > > argument to that global function or something.
> > > >
> > > > Hope this helps,
> > > > Davy
> > > >
> > > >
> > > > "Alejandro Vignolo" <avignolo@belt.com.ar> wrote in message
> > > > news:nZ$q34gHCHA.1020@forums.sybase.com...
> > > > > I need to Know How obtain which window calls a global function
(not
> a
> > > > window
> > > > > function) within a function.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>