Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9507

Re: IsMethod() for use in functions

Path csiph.com!feeder.erje.net!2.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: IsMethod() for use in functions
Date Tue, 5 Jul 2016 21:19:42 +0200
Lines 51
Message-ID <du2fsnF62hoU2@mid.individual.net> (permalink)
References <aopnnb109gjouifhggg7qntmlhv2aca0ri@4ax.com>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 8bit
X-Trace individual.net t+WQ8P6hm/HUZvIr/ugb8wwKrGxRyhn/vGfGehETTqf7wbIng=
Cancel-Lock sha1:MOHzwGjjbNbECzBAAyLqmPVBia8=
In-Reply-To <aopnnb109gjouifhggg7qntmlhv2aca0ri@4ax.com>
X-Priority 3
X-MSMail-Priority Normal
Importance Normal
X-Newsreader Microsoft Windows Live Mail 16.4.3564.1216
X-MimeOLE Produced By Microsoft MimeOLE V16.4.3564.1216
Xref csiph.com comp.lang.clipper.visual-objects:9507

Show key headers only | View raw


Hi Dick,

>IF IsMethod (SELF, #OnlyForSomeUsers)
>Send (SELF, #OnlyForSomeUserl)
>ENDIF
>
>Can I do something similair from within a function? I vaguely remember
>there was something like that.

As Wolfgang mentioned you can use  _CallClipFunc(), but there“s also a
function named  _CallClipFuncPtr().

e.g.

IF (hFunc :=  FunctionSym2Ptr ( #Test )) != NULL_PTR
    _CallClipFuncPtr ( hFunc , { 12 , 16 , "First" }  )

ENDIF

or a more generic solution:

IF IsClipperFunction ( #Test )
    CallClipperFunction ( #Test , { 1 , 8 , "second" } )

ENDIF


----------------------
FUNCTION CallClipperFunction ( symFunc AS SYMBOL , aArgs AS ARRAY ) AS USUAL
PASCAL

    RETURN _CallClipFunc ( symFunc , aArgs )
-----------------------------------------
FUNCTION IsClipperFunction ( symFunc AS SYMBOL )AS LOGIC PASCAL

    RETURN  FunctionSym2Ptr ( symFunc ) != NULL_PTR
-------------------------
FUNCTION Test ( n1  , n2  , c  ) AS STRING  _NC CLIPPER

    MessageBox ( NULL , String2Psz ( NTrim ( n1 + n2 ) + crlf + c ) ,NULL ,
0 )


    RETURN  "Returnvalue"

----------------------------------------


Regards
Karl-Heinz 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

IsMethod() for use in functions D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-07-05 19:01 +0200
  Re: IsMethod() for use in functions "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-05 20:06 +0200
    Re: IsMethod() for use in functions D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-07-05 21:11 +0200
      Re: IsMethod() for use in functions "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-06 08:26 +0200
  Re: IsMethod() for use in functions "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-05 21:19 +0200
    Re: IsMethod() for use in functions D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-07-06 12:00 +0200
      Re: IsMethod() for use in functions "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-06 14:55 +0200
      Re: IsMethod() for use in functions "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-06 21:05 +0200
      Re: IsMethod() for use in functions "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-07 08:18 +0200

csiph-web