aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2006-01-16 16:26:58 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2006-01-16 16:26:58 +0000
commit447a1fe81422c021e33787ba11c56fa34d379c9d (patch)
tree8ecefbac29923517d3daa0fb2081b2fe3cea8877 /external
parent6727d8b42c156a14ea690ceff639fcc1ad7f18af (diff)
now selectors take delegates instead of function names, lists without selectors ok, added the PureData.dll assembly to let people compile externals without having to compile the pd project
svn path=/trunk/externals/clr/; revision=4424
Diffstat (limited to 'external')
-rwxr-xr-xexternal/External.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/external/External.cs b/external/External.cs
index 8abcd68..7e5a69c 100755
--- a/external/External.cs
+++ b/external/External.cs
@@ -17,15 +17,16 @@ namespace PureData
// now you can do what you like...
Console.WriteLine("pointer set!");
Console.WriteLine("setting selectors..");
- pd.AddSelector(x, "sel1", "Sel1", ParametersType.None);
- pd.AddSelector(x, "sel2", "Sel2", ParametersType.None);
- pd.AddSelector(x, "selFloat", "SelFloat", ParametersType.Float);
- pd.AddSelector(x, "selString", "SelString", ParametersType.Symbol);
- pd.AddSelector(x, "selGenericList", "SelGenericList", ParametersType.List);
+ pd.AddSelector(x, "sel1", new pd.DelegateWithoutArguments(Sel1));
+ pd.AddSelector(x, "sel2", new pd.DelegateWithoutArguments(Sel2));
+ pd.AddSelector(x, "selFloat", new pd.DelegateFloat(SelFloat));
+ pd.AddSelector(x, "selString", new pd.DelegateString(SelString));
+ pd.AddSelector(x, "selGenericList", new pd.DelegateArray(SelGenericList));
+ pd.AddSelector(x, new pd.DelegateArray(SelGenericList));
- pd.AddSelector(x, "", "GetBang", ParametersType.Bang);
- pd.AddSelector(x, "", "GetFloat", ParametersType.Float);
- pd.AddSelector(x, "", "GetSymbol", ParametersType.Symbol);
+ pd.AddSelector(x, new pd.DelegateWithoutArguments(GetBang));
+ pd.AddSelector(x, new pd.DelegateFloat(GetFloat));
+ pd.AddSelector(x, new pd.DelegateString(GetSymbol));
Console.WriteLine("selectors set");
pd.AddOutlet(x, ParametersType.Float);
@@ -34,7 +35,7 @@ namespace PureData
public void GetBang()
{
- pd.PostMessage("GetBang invoked!");
+ pd.PostMessage("GetBang invoked!");
}
public void GetFloat(float f)
@@ -101,7 +102,7 @@ namespace PureData
}
case (AtomType.Symbol):
{
- ret[i] = new Atom(a.string_value + "-lo-giuro");
+ ret[i] = new Atom(a.string_value + "-edited");
pd.PostMessage(a.string_value);
break;
}
@@ -111,6 +112,7 @@ namespace PureData
}
+
}