From 84de6b7d71cc72c7c1e52edbad02563bbb3e0867 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 22 Sep 2006 09:20:21 +0000 Subject: small fixes for tutorial examples fixed help methods fixed typos, dates, contact info added typed flext::NewAligned svn path=/trunk/; revision=6000 --- externals/grill/flext/tutorial/simple3/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'externals/grill/flext/tutorial/simple3/main.cpp') diff --git a/externals/grill/flext/tutorial/simple3/main.cpp b/externals/grill/flext/tutorial/simple3/main.cpp index 33b81032..d1630e77 100644 --- a/externals/grill/flext/tutorial/simple3/main.cpp +++ b/externals/grill/flext/tutorial/simple3/main.cpp @@ -1,7 +1,7 @@ /* flext tutorial - simple 3 -Copyright (c) 2002,2003 Thomas Grill (xovo@gmx.net) +Copyright (c) 2002-2006 Thomas Grill (gr@grrrr.org) For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "license.txt," in this distribution. @@ -15,8 +15,8 @@ This is an example of an object digesting several "tagged" messages #include // check for appropriate flext version -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) -#error You need at least flext version 0.4.0 +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) +#error You need at least flext version 0.5.0 #endif class simple3: @@ -34,13 +34,15 @@ protected: void m_sym(t_symbol *s); // override default flext help function - virtual void m_help(); + void m_help(); private: FLEXT_CALLBACK(m_tag) // callback for method "m_tag" (no arguments) FLEXT_CALLBACK_I(m_tag_and_int) // callback for method "m_tag_and_int" (int arguments) FLEXT_CALLBACK_S(m_sym) // callback for method "m_sym" (with one symbol argument) + + FLEXT_CALLBACK(m_help) // callback for method "m_help" (no arguments) }; // instantiate the class (constructor takes no arguments) @@ -59,6 +61,8 @@ simple3::simple3() FLEXT_ADDMETHOD_I(0,"hula",m_tag_and_int); // register method for tag "hula" and int argument FLEXT_ADDMETHOD(0,m_sym); // register method for all other symbols + + FLEXT_ADDMETHOD_(0,"help",m_help); // register method for "help" message } void simple3::m_tag() -- cgit v1.2.1