New topic: 

Passing a delagate as a parameter of a method

<http://forums.realsoftware.com/viewtopic.php?t=47763>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        neonash7777          Post subject: Passing a delagate as a 
parameter of a methodPosted: Thu May 02, 2013 10:07 am                          
       
Joined: Mon Nov 29, 2010 7:01 pm
Posts: 438                I need to pass a delegate as a parameter of a method. 
Is this possible? If so what am I doing wrong?

I have a method called MsgBox2 with parameters:
text as string, returnString as string = "", cancelString as string = "", 
altString as string = "", delegateMethod as Delegate = nil

In the body of the method:
dim m as new WebDialogMsgBox
m.TextAreaMsg.Text = text
..
if delegateMethod <> nil then  AddHandler m.dismissed, delegateMethod
m.Show


But I get a declaration error for this method.   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to