Re: GUI program on Mac OS in D?

2018-02-07 Thread mrphobby via Digitalmars-d-learn
On Monday, 5 February 2018 at 19:44:37 UTC, Jacob Carlborg wrote: Note that this applies to all classes, not just NSString. Ah yes, I will make sure it works for all the NSObject types. class NSStringRef { public:     this(string s) {     str_ =

Re: GUI program on Mac OS in D?

2018-02-05 Thread mrphobby via Digitalmars-d-learn
On Thursday, 21 December 2017 at 17:56:54 UTC, mrphobby wrote: Thanks for sharing! Your solution is more complete for sure. I think I will borrow a few ideas here :) I've been playing around with this a bit and it works pretty well. One thing that bothers me is the handling of NSString. I

Re: GUI program on Mac OS in D?

2017-12-21 Thread mrphobby via Digitalmars-d-learn
On Thursday, 21 December 2017 at 15:45:32 UTC, Adam D. Ruppe wrote: oh sorry i forgot to post this sooner here's my code so far. when i'm reasonably happy with it, it will be part of my simpledisplay.d. I might leave it undocumented, but if you wanted to dive into my source the final version

Re: GUI program on Mac OS in D?

2017-12-21 Thread mrphobby via Digitalmars-d-learn
On Thursday, 14 December 2017 at 19:10:26 UTC, mrphobby wrote: On Thursday, 14 December 2017 at 14:07:25 UTC, Adam D. Ruppe wrote: I was playing with this myself based on Jacob's code and made it look like this: extern (Objective-C) interface ViewController : NSViewController {

Re: GUI program on Mac OS in D?

2017-12-14 Thread mrphobby via Digitalmars-d-learn
On Thursday, 14 December 2017 at 14:07:25 UTC, Adam D. Ruppe wrote: I was playing with this myself based on Jacob's code and made it look like this: extern (Objective-C) interface ViewController : NSViewController { extern (C) @ObjCMethodOverride("loadView") static

Re: GUI program on Mac OS in D?

2017-12-14 Thread mrphobby via Digitalmars-d-learn
On Thursday, 14 December 2017 at 16:12:30 UTC, Jacob Carlborg wrote: No, that would not work. Several years ago I created an The bridge basically wrapped an Objective-C object inside a D object, resulted in two objects for each object instead of one. That bridge turned out to be a failure,

Re: GUI program on Mac OS in D?

2017-12-14 Thread mrphobby via Digitalmars-d-learn
On Thursday, 14 December 2017 at 11:36:46 UTC, mrphobby wrote: I'm thinking it would be nice to wrap this setup code into some kind of mixin template so that I could put the required configuration setup in each class. In other languages like Python or C# I would maybe decorate my methods with

Re: GUI program on Mac OS in D?

2017-12-14 Thread mrphobby via Digitalmars-d-learn
On Thursday, 14 December 2017 at 10:14:13 UTC, Jacob Carlborg wrote: That is to register the methods with the Objective-C runtime. Currently the @selector attribute can only be used on methods that are already implemented in Objective-C. If a need to implement a new method or override an

Re: GUI program on Mac OS in D?

2017-12-13 Thread mrphobby via Digitalmars-d-learn
On Wednesday, 13 December 2017 at 15:17:59 UTC, Jacob Carlborg wrote: I forgot to mention that there have been several discussions around adding support for reference counted classes. Several of the mentioning interfacing with Objective-C is important/a requirement. Ok, good to know! I have

Re: GUI program on Mac OS in D?

2017-12-13 Thread mrphobby via Digitalmars-d-learn
On Thursday, 23 November 2017 at 17:28:43 UTC, Jacob Carlborg wrote: I have a simple example [2] of an application that shows a window with a WebKit view, i.e. and embedded browser. This works with the upstream DMD and LDC compilers. It basically only contains bindings for what I needed for

Re: GUI program on Mac OS in D?

2017-12-08 Thread mrphobby via Digitalmars-d-learn
On Thursday, 7 December 2017 at 12:27:36 UTC, Guillaume Piolat wrote: On Thursday, 7 December 2017 at 12:18:21 UTC, Guillaume Piolat wrote: You can easily make a DUB frontend to do that, for example https://github.com/AuburnSounds/Dplug/tree/master/tools/dplug-build And it might be cleaner

Re: What is "stringImportPaths"

2017-12-08 Thread mrphobby via Digitalmars-d-learn
On Thursday, 7 December 2017 at 09:47:31 UTC, Jacob Carlborg wrote: On 2017-12-06 20:05, mrphobby wrote: There are two kinds of language constructs that uses the "import" keyword. One is the "Import Declaration" [1] which is the most common one and is used to import other symbols. The other

Re: GUI program on Mac OS in D?

2017-12-08 Thread mrphobby via Digitalmars-d-learn
On Thursday, 7 December 2017 at 09:39:45 UTC, Jacob Carlborg wrote: The latest DMD compiler only supports what's in the official documentation, i.e. [1]. What's documented in DIP43 [2] (except anything marked with "unimplemented") is what's been implemented in one of my forks. I'm working on

What is "stringImportPaths"

2017-12-06 Thread mrphobby via Digitalmars-d-learn
Can anyone explain what "stringImportPaths" is? I have seen this being used in dub.json files and I think I kind of know what it does, but I haven't been able to find a clear explanation in any documentation of what it does. It does not look like anything I'm familiar with from other

Re: GUI program on Mac OS in D?

2017-12-06 Thread mrphobby via Digitalmars-d-learn
On Friday, 24 November 2017 at 15:56:21 UTC, Jacob Carlborg wrote: BTW, the following line [3] of the Dub file will embed the Info.plist file in the executable, which can be handy if you don't want to use application bundles. The Info.plist file is not always necessary, I think my sample