🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2682

Re: SetTimer in TForm descedant

#2682
From: Michel Leunen
Date: Thu, 01 Feb 2007 08:05
19 lines
1627 bytes
Alex Liu wrote:

> when i compile it shows "E2235 member function must be called or its address 
> taken"
> if i remove the TimerFcn declaration in TForm1 (i.e. TIMERPROC 
> TimerFcn(...), i can pass compilation but  cannot access the controls.

You must declare your callback function as 'static'.
Member functions and stand-alone functions are not the same. The formers 
have a 'this' pointer associated with them that do not have the seconds.

Michel
-- 
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Technical Details
Message-ID: <45c19ef4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45c159aa@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,68809160c683a9df
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 01 Feb 2007 09:05:19 +0100
From: Michel Leunen <nospam@noreply.be>
Organization: www.leunen.com
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: SetTimer in TForm descedant
References: <45c159aa@newsgroups.borland.com>
In-Reply-To: <45c159aa@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.247.69.170
Message-ID: <45c19ef4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170317044 81.247.69.170 (1 Feb 2007 00:04:04 -0800)
Lines: 19
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail