[objectivemax commit] r27 - in trunk: MaxObject MaxObject-Examples/dr.op MaxObject-Examples/dr.op/DoctorOp.xcodeproj Ma...

1 view
Skip to first unread message

codesite...@google.com

unread,
May 29, 2008, 3:26:38 PM5/29/08
to objective...@googlegroups.com
Author: t...@electrotap.com
Date: Thu May 29 12:26:01 2008
New Revision: 27

Modified:
trunk/MaxObject-Examples/dr.op/DoctorOp.m
trunk/MaxObject-Examples/dr.op/DoctorOp.xcodeproj/project.pbxproj
trunk/MaxObject-Examples/dr.op/dr.op.maxhelp
trunk/MaxObject-Examples/dr.op~/DoctorOp~.xcodeproj/project.pbxproj
trunk/MaxObject/MaxObject.h
trunk/MaxObject/MaxObject.m

Log:
Posting to the Max window is now done using proper Objective-C methods.

Modified: trunk/MaxObject-Examples/dr.op/DoctorOp.m
==============================================================================
--- trunk/MaxObject-Examples/dr.op/DoctorOp.m (original)
+++ trunk/MaxObject-Examples/dr.op/DoctorOp.m Thu May 29 12:26:01 2008
@@ -64,14 +64,14 @@
{
[super initWithObject:x name:s numArgs:argc andValues:argv];
modeAttribute = gensym("+"); // set default
- atom_arg_getsym(&modeAttribute, 0, argc, argv); // support
a 'normal' (non-attribute) arguments
- atom_arg_getfloat(&operandAttribute, 1, argc, argv); // attribute
processing is handled automatically afterwards
+ atom_arg_getsym(&modeAttribute, 0, argc, argv); // support
a 'normal' (non-attribute) argument
+ atom_arg_getfloat(&operandAttribute, 1, argc, argv); // ...

[self createInletWithIndex:0 named:"main_inlet"
withAssistanceMessage:"(int/float) Input"];
[self createInletWithIndex:1 named:"set_inlet"
withAssistanceMessage:"(int/float) Operand"];
[self createOutletWithIndex:0 named:"main_outlet"
withAssistanceMessage:"Computed Output"];

- return self;
+ return self; // attribute processing is handled automatically after
we return
}


@@ -94,7 +94,7 @@
else if(modeAttribute == gensym("/"))
[self sendFloat:(input / operandAttribute) toOutlet:0];
else{
- object_error(maxObjectBridge, "invalid mode attribute for calculation");
+ [self postError:"invalid mode attribute for calculation"];
return MAX_ERR_GENERIC;
}
return MAX_ERR_NONE;
@@ -116,7 +116,7 @@

- (t_max_err) intMessage:(long)value
{
- return (t_max_err)[self floatMessage:(double)value];
+ return [self floatMessage:(double)value];
}


@@ -127,14 +127,15 @@
operandAttribute = atom_getfloat(argv+1);
return [self bangMessage];
}
- object_error(maxObjectBridge, "wrong number of args for list");
+
+ [self postError:"wrong number of args for list: received %ld,
expected 2", argc];
return MAX_ERR_GENERIC;
}


- (t_max_err) postoperatorsTypedMessage:(t_symbol *)s
withNumArgs:(long)argc andValues:(t_atom *)argv
{
- object_post(maxObjectBridge, "Available operators for this object
are: +, -, *, /");
+ [self postMessage:"Available operators for this object are: +, -, *, /"];
return MAX_ERR_NONE;
}

@@ -152,7 +153,7 @@
// And an attribute getter...
- (long) autotriggerAttribute
{
- object_post(maxObjectBridge, "custom getter called");
+ [self postMessage:"custom getter called"];
return autotriggerAttribute;
}


Modified: trunk/MaxObject-Examples/dr.op/DoctorOp.xcodeproj/project.pbxproj
==============================================================================
--- trunk/MaxObject-Examples/dr.op/DoctorOp.xcodeproj/project.pbxproj (original)
+++ trunk/MaxObject-Examples/dr.op/DoctorOp.xcodeproj/project.pbxproj
Thu May 29 12:26:01 2008
@@ -22,7 +22,7 @@
229080DC0CA9FBA300530300 /* DoctorOp.m */ = {isa = PBXFileReference;
fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path =
DoctorOp.m; sourceTree = "<group>"; };
229080F60CA9FF3900530300 /* Cocoa.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework;
sourceTree = "<absolute>"; };
22A403B20CAD7D4300E5299E /* MaxObject.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
MaxObject.framework; path = /Library/Frameworks/MaxObject.framework;
sourceTree = "<absolute>"; };
- 22A403C90CAD7E7000E5299E /* Info.plist */ = {isa = PBXFileReference;
fileEncoding = 30; lastKnownFileType = text.xml; path = Info.plist;
sourceTree = "<group>"; };
+ 22A403C90CAD7E7000E5299E /* Info.plist */ = {isa = PBXFileReference;
fileEncoding = 30; lastKnownFileType = text.plist.xml; path =
Info.plist; sourceTree = "<group>"; };
542ED84F09C02A0000DBC7EB /* dr.op.mxo */ = {isa = PBXFileReference;
explicitFileType = wrapper.cfbundle; includeInIndex = 0; path =
dr.op.mxo; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

@@ -204,7 +204,6 @@
INSTALL_PATH = "";
LIBRARY_SEARCH_PATHS = "";
LIBRARY_STYLE = Bundle;
- OPTIMIZATION_CFLAGS = "-O0";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";

Modified: trunk/MaxObject-Examples/dr.op/dr.op.maxhelp
==============================================================================
--- trunk/MaxObject-Examples/dr.op/dr.op.maxhelp (original)
+++ trunk/MaxObject-Examples/dr.op/dr.op.maxhelp Thu May 29 12:26:01 2008
@@ -1 +1,265 @@
-{
"patcher" : {
"rect" : [ 229., 201., 640., 480. ],
"bgcolor" : [ 1., 1., 1., 1. ],
"bglocked" : 0,
"defrect" : [ 229., 201., 640., 480. ],
"openinpresentation" : 0,
"default_fontsize" : 10.,
"default_fontface" : 0,
"default_fontname" : "Arial",
"boxes" : [ {
"box" : {
"maxclass" : "button",
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 162., 205., 20., 20. ],
"background" : 0,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"ignoreclick" : 0,
"presentation" : 0,
"hidden" : 0,
"id" : "obj-11",
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "mode -",
"linecount" : 1,
"textcolor" : [ 0., 0., 0., 1. ],
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 43., 187., 45., 20. ],
"background" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"presentation" : 0,
"fontface" : 0,
"hidden" : 0,
"id" : "obj-9",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "flonum",
"cantchange" : 0,
"presentation_rect" : [ 235., 183., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 219., 204., 50., 20. ],
"background" : 0,
"numoutlets" : 2,
"mouseup" : 0,
"triscale" : 1.,
"transparent" : 0,
"maximum" : "<none>",
"outlettype" : [ "float", "bang" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"triangle" : 1,
"presentation" : 0,
"minimum" : "<none>",
"fontface" : 0,
"hidden" : 0,
"id" : "obj-8",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "number",
"cantchange" : 0,
"presentation_rect" : [ 91., 282., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 91., 282., 50., 20. ],
"background" : 0,
"numoutlets" : 2,
"mouseup" : 0,
"triscale" : 1.,
"transparent" : 0,
"maximum" : "<none>",
"outlettype" : [ "int", "bang" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"triangle" : 1,
"presentation" : 0,
"minimum" : "<none>",
"fontface" : 0,
"hidden" : 0,
"id" : "obj-7",
"format" : 0,
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "flonum",
"cantchange" : 0,
"presentation_rect" : [ 145., 276., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 143., 282., 50., 20. ],
"background" : 0,
"numoutlets" : 2,
"mouseup" : 0,
"triscale" : 1.,
"transparent" : 0,
"maximum" : "<none>",
"outlettype" : [ "float", "bang" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"triangle" : 1,
"presentation" : 0,
"minimum" : "<none>",
"fontface" : 0,
"hidden" : 0,
"id" : "obj-6",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "flonum",
"cantchange" : 0,
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 152., 174., 50., 20. ],
"background" : 0,
"numoutlets" : 2,
"mouseup" : 0,
"triscale" : 1.,
"transparent" : 0,
"maximum" : "<none>",
"outlettype" : [ "float", "bang" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"triangle" : 1,
"presentation" : 0,
"minimum" : "<none>",
"fontface" : 0,
"hidden" : 0,
"id" : "obj-5",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "number",
"cantchange" : 0,
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 1,
"patching_rect" : [ 101., 174., 50., 20. ],
"background" : 0,
"numoutlets" : 2,
"mouseup" : 0,
"triscale" : 1.,
"transparent" : 0,
"maximum" : "<none>",
"outlettype" : [ "int", "bang" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"triangle" : 1,
"presentation" : 0,
"minimum" : "<none>",
"fontface" : 0,
"hidden" : 0,
"id" : "obj-4",
"format" : 0,
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "dr.op @mode +",
"linecount" : 1,
"textcolor" : [ 0., 0., 0., 1. ],
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 2,
"patching_rect" : [ 272., 307., 89., 20. ],
"background" : 0,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"presentation" : 0,
"fontface" : 0,
"hidden" : 0,
"id" : "obj-3",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "dr.op * 20.",
"linecount" : 1,
"textcolor" : [ 0., 0., 0., 1. ],
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 2,
"patching_rect" : [ 142., 234., 62., 20. ],
"background" : 0,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"presentation" : 0,
"fontface" : 0,
"hidden" : 0,
"id" : "obj-2",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "dr.op",
"linecount" : 1,
"textcolor" : [ 0., 0., 0., 1. ],
"presentation_rect" : [ 0., 0., 0., 0. ],
"numinlets" : 2,
"patching_rect" : [ 282., 142., 55., 20. ],
"background" : 0,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"fontname" : "Arial",
"ignoreclick" : 0,
"presentation" : 0,
"fontface" : 0,
"hidden" : 0,
"id" : "obj-1",
"fontsize" : 10.,
"boxalpha" : 1.
}

}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-11", 0 ],
"destination" : [ "obj-2", 0 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-9", 0 ],
"destination" : [ "obj-2", 0 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-8", 0 ],
"destination" : [ "obj-2", 1 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-7", 0 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-6", 0 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-5", 0 ],
"destination" : [ "obj-2", 0 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-4", 0 ],
"destination" : [ "obj-2", 0 ],
"hidden" : 0,
"color" : [ 0., 0., 0., 1. ],
"midpoints" : [ ]
}

}
]
}

}
\ No newline at end of file
+{
+ "patcher" : {
+ "fileversion" : 1,
+ "rect" : [ 229.0, 201.0, 640.0, 480.0 ],
+ "bglocked" : 0,
+ "defrect" : [ 229.0, 201.0, 640.0, 480.0 ],
+ "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
+ "openinpresentation" : 0,
+ "default_fontsize" : 11.595187,
+ "default_fontface" : 0,
+ "default_fontname" : "Arial",
+ "gridonopen" : 0,
+ "gridsize" : [ 10.0, 5.0 ],
+ "gridsnaponopen" : 0,
+ "toolbarvisible" : 1,
+ "boxanimatetime" : 200,
+ "imprint" : 0,
+ "metadata" : [ ],
+ "boxes" : [ {
+ "box" : {
+ "maxclass" : "message",
+ "text" : "3 70",
+ "numinlets" : 2,
+ "patching_rect" : [ 350.0, 185.0, 33.0, 18.0 ],
+ "id" : "obj-13",
+ "fontname" : "Arial",
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "fontsize" : 11.595187,
+ "presentation_rect" : [ 341.0, 206.0, 0.0, 0.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "message",
+ "text" : "3 70 5",
+ "numinlets" : 2,
+ "patching_rect" : [ 300.0, 185.0, 43.0, 18.0 ],
+ "id" : "obj-12",
+ "fontname" : "Arial",
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "fontsize" : 11.595187
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "button",
+ "numinlets" : 1,
+ "patching_rect" : [ 162.0, 185.0, 20.0, 20.0 ],
+ "id" : "obj-11",
+ "numoutlets" : 1,
+ "outlettype" : [ "bang" ]
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "message",
+ "text" : "mode -",
+ "numinlets" : 2,
+ "patching_rect" : [ 40.0, 200.0, 44.0, 17.0 ],
+ "id" : "obj-9",
+ "fontname" : "Verdana",
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "flonum",
+ "numinlets" : 1,
+ "patching_rect" : [ 200.0, 185.0, 51.0, 19.0 ],
+ "id" : "obj-8",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "float", "bang" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "number",
+ "numinlets" : 1,
+ "patching_rect" : [ 80.0, 280.0, 51.0, 19.0 ],
+ "id" : "obj-7",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "int", "bang" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "flonum",
+ "numinlets" : 1,
+ "patching_rect" : [ 140.0, 280.0, 51.0, 19.0 ],
+ "id" : "obj-6",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "float", "bang" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "flonum",
+ "numinlets" : 1,
+ "patching_rect" : [ 140.0, 155.0, 51.0, 19.0 ],
+ "id" : "obj-5",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "float", "bang" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "number",
+ "numinlets" : 1,
+ "patching_rect" : [ 80.0, 155.0, 51.0, 19.0 ],
+ "id" : "obj-4",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "int", "bang" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "dr.op @mode +",
+ "numinlets" : 2,
+ "patching_rect" : [ 272.0, 307.0, 89.0, 19.0 ],
+ "id" : "obj-3",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "", "" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "dr.op * 20.",
+ "numinlets" : 2,
+ "patching_rect" : [ 140.0, 235.0, 79.0, 19.0 ],
+ "id" : "obj-2",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "", "" ],
+ "fontsize" : 10.0
+ }
+
+ }
+, {
+ "box" : {
+ "maxclass" : "newobj",
+ "text" : "dr.op",
+ "numinlets" : 2,
+ "patching_rect" : [ 282.0, 122.0, 56.0, 19.0 ],
+ "id" : "obj-1",
+ "fontname" : "Verdana",
+ "numoutlets" : 2,
+ "outlettype" : [ "", "" ],
+ "fontsize" : 10.0
+ }
+
+ }
+ ],
+ "lines" : [ {
+ "patchline" : {
+ "source" : [ "obj-9", 0 ],
+ "destination" : [ "obj-2", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ 49.5, 227.0, 149.5, 227.0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-4", 0 ],
+ "destination" : [ "obj-2", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-5", 0 ],
+ "destination" : [ "obj-2", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-11", 0 ],
+ "destination" : [ "obj-2", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-8", 0 ],
+ "destination" : [ "obj-2", 1 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-2", 0 ],
+ "destination" : [ "obj-7", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-2", 0 ],
+ "destination" : [ "obj-6", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-12", 0 ],
+ "destination" : [ "obj-2", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "source" : [ "obj-13", 0 ],
+ "destination" : [ "obj-2", 0 ],
+ "hidden" : 0,
+ "midpoints" : [ ]
+ }
+
+ }
+ ]
+ }
+
+}

Modified: trunk/MaxObject-Examples/dr.op~/DoctorOp~.xcodeproj/project.pbxproj
==============================================================================
--- trunk/MaxObject-Examples/dr.op~/DoctorOp~.xcodeproj/project.pbxproj (original)
+++ trunk/MaxObject-Examples/dr.op~/DoctorOp~.xcodeproj/project.pbxproj
Thu May 29 12:26:01 2008
@@ -20,7 +20,7 @@
0F5B62020919440900A62EB9 /* MaxAPI.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
MaxAPI.framework; path = /Library/Frameworks/MaxAPI.framework;
sourceTree = "<absolute>"; };
229080F60CA9FF3900530300 /* Cocoa.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework;
sourceTree = "<absolute>"; };
22A403B20CAD7D4300E5299E /* MaxObject.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
MaxObject.framework; path = /Library/Frameworks/MaxObject.framework;
sourceTree = "<absolute>"; };
- 22A403C90CAD7E7000E5299E /* Info.plist */ = {isa = PBXFileReference;
fileEncoding = 30; lastKnownFileType = text.xml; path = Info.plist;
sourceTree = "<group>"; };
+ 22A403C90CAD7E7000E5299E /* Info.plist */ = {isa = PBXFileReference;
fileEncoding = 30; lastKnownFileType = text.plist.xml; path =
Info.plist; sourceTree = "<group>"; };
22C8BD840CB3179F0094575E /* DoctorOp~.m */ = {isa =
PBXFileReference; fileEncoding = 30; lastKnownFileType =
sourcecode.c.objc; path = "DoctorOp~.m"; sourceTree = "<group>"; };
22C8BD900CB318640094575E /* MaxAudioAPI.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
MaxAudioAPI.framework; path =
/Library/Frameworks/MaxAudioAPI.framework; sourceTree = "<absolute>"; };
542ED84F09C02A0000DBC7EB /* dr.op~.mxo */ = {isa = PBXFileReference;
explicitFileType = wrapper.cfbundle; includeInIndex = 0; path
= "dr.op~.mxo"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -204,7 +204,6 @@
INSTALL_PATH = "";
LIBRARY_SEARCH_PATHS = "";
LIBRARY_STYLE = Bundle;
- OPTIMIZATION_CFLAGS = "-O0";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";

Modified: trunk/MaxObject/MaxObject.h
==============================================================================
--- trunk/MaxObject/MaxObject.h (original)
+++ trunk/MaxObject/MaxObject.h Thu May 29 12:26:01 2008
@@ -91,4 +91,8 @@
- (void) setSymbol: (t_symbol*)value forKey:(NSString *)key;
- (t_symbol *) symbolForKey: (NSString *)key;

+- (void) postMessage:(char*)string, ...;
+- (void) postWarning:(char*)string, ...;
+- (void) postError:(char*)string, ...;
+
@end

Modified: trunk/MaxObject/MaxObject.m
==============================================================================
--- trunk/MaxObject/MaxObject.m (original)
+++ trunk/MaxObject/MaxObject.m Thu May 29 12:26:01 2008
@@ -400,19 +400,6 @@
}


-- (t_max_err) postMessageToConsole:(t_symbol*)s withNumArgs:(long)argc
andValues:(t_atom *)argv
-{
- // TODO: look for the symbol object_error() in the framework, if it
isn't present, then use error()
- return MAX_ERR_NONE;
-}
-
-- (t_max_err) postErrorToConsole:(t_symbol*)s withNumArgs:(long)argc
andValues:(t_atom *)argv
-{
- // TODO: look for the symbol object_post() in the framework, if it
isn't present, then use post()
- return MAX_ERR_NONE;
-}
-
-
- (t_max_err) sendInt:(long)value toOutlet:(long)indexNum
{
outlet_float(outlets[indexNum], value);
@@ -530,6 +517,42 @@
// If no accessor method is found, then we get the value directly
object_getInstanceVariable(self, [key cString], (void **)&value);
return value;
+}
+
+
+- (void) postMessage:(char*)string, ...
+{
+ va_list argumentList;
+ char formattedString[2048];
+
+ va_start(argumentList, string);
+ vsnprintf(formattedString, 2048, string, argumentList);
+ object_post(maxObjectBridge, formattedString);
+ va_end(argumentList);
+}
+
+
+- (void) postWarning:(char*)string, ...
+{
+ va_list argumentList;
+ char formattedString[2048];
+
+ va_start(argumentList, string);
+ vsnprintf(formattedString, 2048, string, argumentList);
+ object_warn(maxObjectBridge, formattedString);
+ va_end(argumentList);
+}
+
+
+- (void) postError:(char*)string, ...
+{
+ va_list argumentList;
+ char formattedString[2048];
+
+ va_start(argumentList, string);
+ vsnprintf(formattedString, 2048, string, argumentList);
+ object_error(maxObjectBridge, formattedString);
+ va_end(argumentList);
}


Reply all
Reply to author
Forward
0 new messages