Skip to content

Instantly share code, notes, and snippets.

View gist:30301
public class LineEditor {
public delegate string [] AutoCompleteHandler (string text, int pos);
/// <summary>
/// Invoked when the user requests auto-completion using the tab character
/// </summary>
/// <remarks>
/// The result is null for no values found, an array with a single
/// string, in that case the string should be the text to be inserted
View gist:33008
Index: mediaelement.cpp
===================================================================
--- mediaelement.cpp (revision 120951)
+++ mediaelement.cpp (working copy)
@@ -348,6 +348,12 @@
SetValue (MediaElement::AttributesProperty, Value::CreateUnref (new MediaAttributeCollection ()));
SetValue (MediaElement::MarkersProperty, Value::CreateUnref (new TimelineMarkerCollection ()));
+
+ printf ("Object at: 0x%p\n", this);
View gist:211118
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Drawing;
namespace AdMobLib {
[BaseType (typeof (UIView))]
interface AdMobView {
[Export ("initWithFrameRect:")]
IntPtr Constructor (RectangleF rect);
View gist:230514
<%@ WebService Language="c#" Codebehind="TestService.asmx.cs" Class="WebServiceTests.TestService" %>
using System;
using System.Web.Services;
using System.Web.Services.Protocols;
namespace WebServiceTests
{
public class TestService : System.Web.Services.WebService
{
View gist:271893
Unhandled Exception: System.MissingMethodException: No constructor found for MonoTouch.UIKit.UIControlEventProxy::.ctor(System.IntPtr)
at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00134] in /Developer/MonoTouch/Source/mcs/class/corlib/System/Activator.cs:284
at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in /Developer/MonoTouch/Source/mcs/class/corlib/System/Activator.cs:233
at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in /Developer/MonoTouch/Source/mcs/class/corlib/System/Activator.cs:228
at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x0000d] in /cvs/iphone/monotouch/ObjCRuntime/Runtime.cs:142
at MonoTouch.ObjCRuntime.Runtime.GetNSObject (IntPtr ptr) [0x0001f] in /cvs/iphone/m
View gist:271904
Thread started:
..
Unhandled Exception: System.ArgumentException: GCHandle value belongs to a different domain
at System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value) [0x0003d] in /Developer/MonoTouch/Source/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:129
at System.Runtime.InteropServices.GCHandle.FromIntPtr (IntPtr value) [0x00000] in /Developer/MonoTouch/Source/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:172
at MonoTouch.AudioToolbox.AudioQueue.property_changed (IntPtr userData, IntPtr AQ, AudioQueueProperty id) [0x00000] in /cvs/iphone/monotouch/AudioToolbox/AudioQueue.cs:333
at (wrapper native-to-managed) MonoTouch.AudioToolbox.AudioQueue:property_changed (intptr,intptr,MonoTouch.AudioToolbox.AudioQueueProperty)
View gist:272217
MCS [net_2_0] Mono.Security.dll
Stacktrace:
at Mono.CSharp.Driver.Main (string[]) <0xffffffff>
at Mono.CSharp.Driver.Main (string[]) <0x00046>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00054>
Native stacktrace:
/cvs/llvm/mono/mono/mini/mono [0x4908fc]
View gist:278950
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.AddressBook;
using MonoTouch.AudioToolbox;
namespace Test
View gist:279503
class Settings {
bool AirplaneMode;
Sounds sounds;
Brightness brightness;
}
class Sounds {
[Icon ("silent.png")]
Section Silent;
View gist:281469
//
// The entire UI created at http://tirania.org/tmp/a.png
// is created, rendered and maintained with the following
// code.
//
// But @JosephHill would like *more* metadata, he would
// like *more* typing and would like *more* explicit this
// and *explicit* that
//
// Those of us that were born with good taste, reject that