monomac

MonoMac / Xamarin.Mac binding simple dylib not working

笑着哭i 提交于 2019-12-24 08:43:26
问题 I'm trying to bind some native code for use in MonoMac / Xamarin.Mac, but I'm not sure where I'm going wrong. I create a simple dylib to test with: nativelibrary.h : - (NSString *)echo:(NSString *)message; I know that my library is fine, because I reference it and use it in an Objective-C / Cocoa application. Next, I try to generate the initial binding file using parse.exe: mono parse.exe [path...]/nativelibrary.h Problem #1 No 'gen.cs' file is generated as per Miguel's guide Problem #2 Parse

How to set Xamarin MonoMac project so its build outputs .app package instead of .exe?

 ̄綄美尐妖づ 提交于 2019-12-23 21:10:12
问题 I am trying to get Mac package (.app) as build output when building MonoMac project in Xamarin. This project is actually a default one - it only displays an empty window and can be created in Xamarin through: Add New Project... , select Mac(open source) and then MonoMac Project (C#) . Project builds with no errors but build output is .exe file. How can I set project build so it outputs .app package instead of .exe? I looked at Project Options-->Build-->General where could select Compile

MonoGame Samples not compiling on Mountain Lion

故事扮演 提交于 2019-12-22 18:38:37
问题 So I installed MonoFramework, MonoDevelop and MonoMac and downloaded the latest version of MonoGame. I tried compiling the samples but they all fail with the same error Parsing error of #error Unknown platform . The problem seems to be that for some reason #if MONOMAC and #elif MONOMAC are being ignored. If I remove the Windows, XBOX and Linux related code and get rid of the #if MONOMAC the code compiles and executes. Has there been a change and should I use something else instead of MONOMAC

Is it possible to use Razor as a standalone library (without any asp.net business) on OSX (via Mono)

非 Y 不嫁゛ 提交于 2019-12-22 08:31:48
问题 I would like to write a proof of concept MonoMac app which renders html "Views" using c# and Razor. Is this possible? If not, does anyone recommend any other Templating engines that compare to the simplicity of Razor. I don't mind writing it in Objective-C if I have to, but Mono would be simpler. 回答1: I think you may be interested in this project. You just have to download zip which consists of two DLLs, reference them in your project and examples like these just works. Have in mind that you

Is MonoMac deprecated?

馋奶兔 提交于 2019-12-21 12:11:15
问题 The page for MonoMac seems to be abandoned. It seems to be last-updated a few years ago, because it says "Mountain Lion" is the "new" operating system. New Lion and Mountain Lion APIs for AppKit And MonoMac is under "Unsupported" in the Xamarin Studio (I wanted to download Mono Develop, but the page automatically was redirected to Xamarin Studio). So is MonoMac deprecated or is it still actively being developed along with Xamarin.Mac? 回答1: The difference is not well communicated; they don't

NullReferenceException when accessing GUI Components in Controllers constructor

强颜欢笑 提交于 2019-12-12 15:12:44
问题 In Mono I have a simple NSWindow with Controller on it I drop a NSSplitView and a NSButton. If I try to access the NSSplitView out of the Contstructor or Initialize() Method I get a nullReferenceException. Instead if I try to access the NSSplitView from a ButtonClicked Method, it works. Well, it seems that the Framework creates the GUI Components after the controller's Construtor is called. But where should I put my code to configure GUI Components if not in the Constructor? Thanks in advance

Generate classes from CoreData model

倖福魔咒の 提交于 2019-12-12 00:14:53
问题 I'm trying to develop a pair of C# applications, one iOS, one Mac, that use the same CoreData database. Effectively, the desktop app populates it, and then it's distributed as part of the iOS app. I can use XCode to generate an .xcdatamodeld file describing what I want the database to look like. I can use momc to compile that into a .momd file. I can include the .mom file from within that into my Mono project, and load it into a NSManagedObjectModel , from which I can access all the

Bundle Multiple Xamarin apps in one pkg installer

雨燕双飞 提交于 2019-12-11 23:16:07
问题 I have few Xamarin apps and I want to bundle them all as a single pkg/installer and organize them into a folder under Applications similar to the following snapshot attached. Is there an option to specify additional Xamarin apps in the bundle settings of the project or any build script needs to be written? Can anybody point to some samples ? Thanks, Suma. 回答1: 1. pkg installer: Packages See Payload section to add folder and your .app files. They also support Certification for signing

NSPasteboard and MonoMac

狂风中的少年 提交于 2019-12-11 12:04:49
问题 I had problems with copy and paste on MonoMac and found Clipboard.GetText() always returns empty string in Mono on Mac which suggested using NSPasteboard but I can't find any good examples or explanation on how to do so in Mono/C#. I think I understand the Objective-C API but the mapping the C# I find confusing so any help would be great. 回答1: Here is a simple example of copying and pasting a string: private static string[] pboardTypes = new string[] { "NSStringPboardType" }; public static

MonoMac window closing without error

穿精又带淫゛_ 提交于 2019-12-10 21:30:06
问题 I'm just starting out with MonoMac in Xamarin Studio, and I've run into the strangest problem: I a window with an NSButton and a NSTextField on it. By this point I've cut out the event handler on the button, so it doesn't DO anything, except highlight when I click it. The button creation code looks like this: nsButton = new NSButton(new System.Drawing.RectangleF(0, 0, 100, 100)); nsButton.BezelStyle = NSBezelStyle.RoundRect; nsButton.Font = NSFont.SystemFontOfSize( NSFont