Hi all,
I'm trying to compile PLP projects, but I'm running into a number of
problems:
This is my sample code from my PLP project:
using System;
using System.ComponentModel;
using System.Windows.Input;
namespace PortTest
{
public class MyClass: INotifyPropertyChanged
{
public MyClass ()
{ }
public event PropertyChangedEventHandler PropertyChanged;
public ICommand Command{get;set;}
}
public static class Extensions
{
public static void NaString (this string p)
{
p.ToString();
}
}
}
If I compile this code with Mono MDK 2.10.x, I get an error that ICommand is
not found.
If I compile this code with Mono MDK 3.0.3, I get an error that extension
methods are not available and that I should add a reference to
"System.Core". If I manually add
namespace System.Runtime.CompilerServices
{
public class ExtensionAttribute: Attribute
{
}
}
I can get the PLP to compile in 3.0.3
BUT
When I try to use this PLP in my MonoTouch test app, I run into more
problems:
Here is the sample code:
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using PortTest;
using System.Windows.Input;
namespace TouchMulti
{
public class Application
{
// This is the main entry point of the application.
static void Main (string[] args)
{
MyClass x = null;
ICommand x2 = null;
UIApplication.Main (args, null, "AppDelegate");
}
}
}
The 3.0.3 compiled version states that INotifyPropertyChanged is not
available and that I should add a reference to System v4.0.0.0 assembly.
The 2.10.x version seems to work.
Anything that I can try to do differently?
Thanks,
Dawid
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/Trying-to-compile-PLP-on-Mono-for-MAC-with-MonoTouch-tp4657946.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch