Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: IsMethod() for use in functions Date: Wed, 6 Jul 2016 08:26:13 +0200 Lines: 44 Message-ID: References: <7b1onb5ll4canvl4atovj95868k9knr8d9@4ax.com> X-Trace: individual.net COf2gYPFXHjm7XRFfkxNZgM8mYo+uapBBQVc1oVvZbon0E/1Y= Cancel-Lock: sha1:Qc4B+XZ1Wl646W0I2CQy+NDNsso= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:9510 Hi Dick, > > I don't know if there is a function to check for a function > > existence - but you can call a function with Clipper calling > > convention with _CallClipFunc() passing the parameters in an array. > > > > I wasn't aware of this one (I even couldn't find it in the help! - > where did you get this from?) I see that it's used in the > SystemLibrary a few times. it is not documented . I think someone pointed me there... > But somehow it doesn't seem to work. I have this in my code: > _CallClipFunc(#TestThis,{"Hello"}) > > and straight below it: > > FUNCTION TestThis(cParm AS STRING) > ErrorBox{,cParm}:Show() > RETURN TRUE maybe you should remove the "as string" from the parameter? For me the following code works: METHOD OKButton( ) CLASS MainDialog _CallClipFunc( #DickFunc, { self, "Hi Dick" } ) SELF:EndDialog(0) RETURN SELF function DickFunc( oWindow, cMessage ) InfoBox{ oWindow, "DickFunc", cMessage }:Show() return nil Wolfgang --