2016-05-27T00:35:43Z pllx joined #ccl 2016-05-27T00:53:51Z emaczen quit (Ping timeout: 246 seconds) 2016-05-27T01:33:06Z pllx quit (Quit: zz) 2016-05-27T01:54:47Z emaczen joined #ccl 2016-05-27T02:41:27Z emaczen: eschatologist: I have a decent understanding of cocoa development with objective c 2016-05-27T02:42:51Z emaczen: What I want to see and know more of is how to write the code that is setup/handled by XCode/interface builder automatically 2016-05-27T02:43:29Z emaczen: An example is programatically using an NSPageController -- I can't seem to find the details for connecting one to a window and getting it to work properly 2016-05-27T02:48:19Z eschatologist: I see. There won't be any books that tell you how to do that because that's just not how Cocoa development is typically done. 2016-05-27T02:48:35Z emaczen: eschatologist: That is depressing... 2016-05-27T02:48:36Z eschatologist: The thing is though, they're just objects. There's not really much "magic" in Interface Builder. 2016-05-27T02:49:14Z eschatologist: eschatologist: Why's that? Programmatic interfaces just aren't something Cocoa encourages. Interface Builder's not a toy form designer that generates code like the ones on so many other platforms, so it's never been a big deal. 2016-05-27T02:49:20Z emaczen: eschatologist: Yes, but I just have no idea really how to "link" my NSPageController with a window/view 2016-05-27T02:49:49Z eschatologist: An NSPageController is an NSViewController, so what you'll do is instantiate one and then add its view to a window. 2016-05-27T02:50:14Z eschatologist: You'll need to set up your own construct to actually own the page controller (e.g. your window controller would have an ivar to it). 2016-05-27T02:50:22Z eschatologist actually works on this stuff, just FYI 2016-05-27T02:50:54Z emaczen: eschatologist: Can I make a paste? What happens, is that right after it "transitions" the view goes blank 2016-05-27T02:51:11Z eschatologist: Go ahead, but I'm no expert on NSPageController specifically. 2016-05-27T02:51:20Z eschatologist: I'd suggest asking in #macdev or something for that. 2016-05-27T02:51:40Z emaczen: eschatologist: I have been... I'm developing with CCL of course 2016-05-27T02:52:35Z eschatologist: When experimenting with that stuff, it might be useful to also throw together a toy example in ObjC just to see how the API behaves, so you can determine whether the issue is in your understanding of the API or in the Lisp bridge layer. 2016-05-27T02:53:34Z eschatologist: For example, "the view goes blank" reminds me of stuff that would happen when using the Java bridge, where the Cocoa thing to do would be to expect an object with no strong references to just stick around, but Java would helpfully GC it because it had no references. 2016-05-27T02:54:15Z eschatologist: Also, from looking at the docs for NSPageController, it looks like you could instantiate one, set its view to reference a view already in your window, and then let it handle paging for you. 2016-05-27T02:54:47Z emaczen: eschatologist: I think that is where my problem is -- my paste is almost complee 2016-05-27T02:54:50Z emaczen: complete* 2016-05-27T02:56:35Z sixbitslacker quit (Ping timeout: 260 seconds) 2016-05-27T02:59:02Z emaczen: http://paste.lisp.org/+6SI8 2016-05-27T02:59:12Z emaczen: let me know if you have any questions 2016-05-27T03:00:40Z emaczen: O 2016-05-27T03:00:53Z emaczen: I'm pretty confident in my delegate methods 2016-05-27T03:03:54Z eschatologist: I think the thing you'll want is to not add the page controller's view as a subview of the window's content view, but set the page controller's view to be some view in the window's content view. 2016-05-27T03:05:38Z eschatologist: But I'm neither an expert on NSPageController nor the CL/ObjC bridge. All I know is that in general, you should be able to just instantiate views and view controllers, set properties on them etc., and have them work because that's what IB essentially doing for you. 2016-05-27T03:05:47Z emaczen: eschatologist: That confuses me in terms of the arrangedObjects array holds my viewControllers which hold the views that I want to cycle 2016-05-27T03:06:51Z eschatologist: Are you sure NSPageController.arrangedObjects *holds* the controllers for the views you want to cycle, or does it just *reference* them and they should be owned by some other object? 2016-05-27T03:07:08Z eschatologist: Again, that's more of a Cocoa question. If #macdev et al can't help then the cocoa-dev list might be able to. 2016-05-27T03:07:25Z emaczen: eschatologist: good point, I'm not used to thinking in pointer terms 2016-05-27T03:07:59Z emaczen: eschatologist: Do you use CCL for cocoa development? 2016-05-27T03:08:09Z eschatologist: No. 2016-05-27T03:08:18Z emaczen: Why not? 2016-05-27T03:08:23Z emaczen: What do you use CCL for? 2016-05-27T03:08:33Z eschatologist: I mostly just fool around with Lisp. 2016-05-27T03:08:41Z eschatologist: I work on a very large app in ObjC by day. 2016-05-27T03:10:45Z emaczen: " An array containing the objects displayed in the page controller’s view. " -- documentation from Apple I assume this means 'hold' 2016-05-27T03:11:01Z emaczen: This is for the arrangedObjects property for a NSPageController 2016-05-27T03:12:46Z eschatologist: Also, typically in Cocoa you wouldn't subclass something like NSPageController and make the subclass its own delegate, you'd have some other controller that owns an instance of NSPageController also be its delegate. 2016-05-27T03:13:09Z emaczen: Aside from style does it matter in this case? 2016-05-27T03:13:10Z eschatologist: Have you looked at the NSPageController sample code? 2016-05-27T03:13:31Z emaczen: Yes, the PictureSwiper app and the Cards app 2016-05-27T03:13:34Z eschatologist: I have no idea if it matters. 2016-05-27T03:13:51Z emaczen: They both only really show the implementations of the delegate methods 2016-05-27T03:14:18Z emaczen: They don't have anything dealing with setting the view for the NSPageController, and linking the view with the window 2016-05-27T03:16:52Z DavidGuru quit (Read error: Connection reset by peer) 2016-05-27T03:18:15Z eschatologist: Looking at FileCards, MainMenu.xib has an instance of NSPageController in it, connected to the AppDelegate's pageController outlet. That's basically equivalent to "pageController = [[NSPageController alloc] init];" 2016-05-27T03:18:19Z DavidGuru joined #ccl 2016-05-27T03:18:40Z eschatologist: The window has a view in it that the pageController's view is set to, that's basically "pageController.view = customView;" 2016-05-27T03:19:10Z eschatologist: And the pageController's delegate is set to the app controller, that's basically "pageController.delegate = self;" in the AppController. 2016-05-27T03:19:27Z eschatologist: In essence, every connection you see in IB can be translated to a line of code like that. 2016-05-27T03:19:49Z emaczen: How do I view this XIB file? 2016-05-27T03:20:17Z eschatologist: Open FileCards.xcodeproj in Xcode, and then select MainMenu.xib. 2016-05-27T03:20:43Z emaczen: it just opens the design area? 2016-05-27T03:20:52Z emaczen: Isn't a xib file just an XML file? 2016-05-27T03:21:13Z eschatologist: It opens the Interface Builder document, yes. 2016-05-27T03:21:39Z eschatologist: You can control-click on an object in the left side list in Interface Builder to see what connections the object has. 2016-05-27T03:21:52Z emaczen: How do I interpret the XML? 2016-05-27T03:22:36Z eschatologist: Saying a xib is "just an XML file" is making a lot of assumptions about being able to author or interpret the XML. It's not really a hand-authorable format. 2016-05-27T03:23:03Z eschatologist: Xcode compiles the xib to a nib at build time, the nib is what the app loads. 2016-05-27T03:23:19Z eschatologist: (The nib is basically a distilled format that knows what objects to instantiate and connect, without a lot of overhead.) 2016-05-27T03:26:33Z emaczen: I'm not really sure how to read xcode connections 2016-05-27T03:27:12Z eschatologist: Connections are a fundamental Cocoa concept. Something like NSViewController's view is an "outlet" connection, it specifies "this object has a reference to this other object." 2016-05-27T03:27:32Z emaczen: Okay 2016-05-27T03:28:46Z emaczen: What is a "referencing outlet"? 2016-05-27T03:29:10Z eschatologist: That's just a representation going the other direction. 2016-05-27T03:30:21Z emaczen: What do both columns mean? 2016-05-27T03:30:22Z eschatologist: "MyViewController.view = myView;" would show up under Outlets with MyViewController.view on the left and myView on the right when you control-click MyViewController. 2016-05-27T03:31:28Z eschatologist: This is really basic Cocoa stuff. Are you trying to learn how to do Cocoa programmatically without knowing how IB etc. work? 2016-05-27T03:31:34Z eschatologist: That's not the usual route for Cocoa learning. 2016-05-27T03:31:38Z eschatologist: And it's not simpler. 2016-05-27T03:32:28Z emaczen: I've had great success with Cocoa so far I would say -- I still don't know how to do a lot of things I guess, (I've only made small things) 2016-05-27T03:32:40Z eschatologist: I'd strongly recommend reading an ObjC edition of the Hillegass book first, it'll explain the whole gestalt of Cocoa including IB. There are also plenty of online tutorials. 2016-05-27T03:33:36Z eschatologist: Over the years I've seen *a lot* of people coming from other platforms that tend to have toy form builders say "I don't want to use IB, I want to do it all programmatically because I want to know what's going on." But really, it's important to learn the IB way first because the frameworks are actually designed around it and we use it everywhere at Apple. 2016-05-27T03:34:35Z emaczen: Well you can't use CCL with IB anymore... 2016-05-27T03:34:42Z eschatologist: Oh? 2016-05-27T03:35:03Z eschatologist: Oh, because IB can't discover the outlets and actions. 2016-05-27T03:35:25Z emaczen: I thought it had something to do with the XIB vs NIB 2016-05-27T03:36:08Z eschatologist: IB used to let you say "this class has these outlets and these actions" without it scanning any source code. That went away with Xcode 4 in 2009. 2016-05-27T03:39:02Z emaczen: so the objects on the left of MainMenu.Xib refer to what exactly? Like what is "Delegate" who's delegate is it? 2016-05-27T03:39:19Z emaczen: I'm assuming it is the NSPageConroller's delegate 2016-05-27T03:39:27Z emaczen: But in a much larger App how would you know? 2016-05-27T03:39:44Z eschatologist: It's the app's delegate. 2016-05-27T03:40:29Z eschatologist: MainMenu.xib is the main nib file. You can control-click it to see that one of its referencing outlets is the application delegate. 2016-05-27T03:40:35Z emaczen: I usually don't do much with the app's delegate until I actually build a project into an executable 2016-05-27T03:40:36Z eschatologist: is the application delegate's outage 2016-05-27T03:40:56Z eschatologist: In a much larger app you'd typically have a number of xib files. 2016-05-27T03:41:08Z emaczen: Okay I see 2016-05-27T03:41:33Z eschatologist: In FileCards, it's *also* the page controller's delegate. 2016-05-27T03:42:28Z emaczen: and the tableView right? 2016-05-27T03:43:13Z eschatologist: Maybe, I don't have the project open right now (I'm working) but it wouldn't surprise me. 2016-05-27T03:47:32Z emaczen: eschatologist: How much commonlisp do you know? 2016-05-27T03:49:46Z eschatologist: A bit. I've been fooling around with it for 20+ years. 2016-05-27T03:53:34Z emaczen: eschatologist: You really should build some cocoa apps with CCL 2016-05-27T03:54:04Z emaczen: often I use a lisp object for my model 2016-05-27T03:54:45Z eschatologist: I'm more excited by the resurgence in interest in CLIM. 2016-05-27T03:55:34Z emaczen: eschatologist: What is the goal with it? 2016-05-27T03:55:45Z eschatologist: The goal with CLIM? 2016-05-27T04:10:40Z emaczen quit (Ping timeout: 260 seconds) 2016-05-27T04:11:52Z emaczen joined #ccl 2016-05-27T04:14:18Z emaczen: eschatologist: Hah yeah, I just came back from being idle and it placed the #macdev buffer on the #ccl buffer place 2016-05-27T04:15:05Z eschatologist: In any case, the goal with CLIM is to provide a standard and good way to build applications for Common Lisp. 2016-05-27T04:15:37Z eschatologist: The fact that they "look like they are from the 80s" is immaterial. It's purely a matter of what substrate such an application is built atop. 2016-05-27T04:15:45Z emaczen: I don't know much about user interfaces, but how would it be compatible with popular platforms? 2016-05-27T04:16:09Z emaczen: So CLIM would be able to port code to OSX? 2016-05-27T04:16:14Z eschatologist: For example, if McCLIM gets GTK+ and Cocoa back-ends, then applications built with it will look totally native on Linux with GTK+ and on OS X, respectively. 2016-05-27T04:16:22Z eschatologist: CLIM is an abstraction layer. 2016-05-27T04:16:26Z emaczen: Okay, got it. 2016-05-27T04:16:27Z eschatologist: It's *very* different than a widget toolkit. 2016-05-27T04:16:45Z DavidGuru quit (Read error: Connection reset by peer) 2016-05-27T04:16:47Z emaczen: eschatologist: Would you be able to build apps for the app store? 2016-05-27T04:16:57Z emaczen: I mean in your best guess 2016-05-27T04:17:29Z DavidGuru joined #ccl 2016-05-27T04:17:33Z eschatologist: I don't understand the question. 2016-05-27T04:17:34Z eschatologist: Like, why wouldn't you? 2016-05-27T04:17:57Z eschatologist: Whether an app can be on the app store is all about how it's packaged and whether it follows the rules. 2016-05-27T04:25:31Z emaczen: eschatologist: Strictly for Apple, yes I can develop apps with CCL -- I guess I am curious as how practical it will be to do with other platforms as well, and if it is against other companie's rules to use third party tools. 2016-05-27T04:25:50Z eschatologist: Not something I could really speculate about. 2016-05-27T04:26:03Z eschatologist: Again, that's something worth discussing with others. 2016-05-27T04:26:43Z eschatologist quit (Quit: Textual IRC Client: www.textualapp.com) 2016-05-27T04:50:58Z eschatologist joined #ccl 2016-05-27T06:06:47Z pobivan joined #ccl 2016-05-27T06:54:56Z emaczen quit (Ping timeout: 272 seconds) 2016-05-27T07:17:48Z DavidGuru quit (Read error: Connection reset by peer) 2016-05-27T07:17:59Z DavidGuru joined #ccl 2016-05-27T07:18:57Z edgar-rft quit (Quit: edgar-rft) 2016-05-27T07:24:56Z DavidGuru quit (Remote host closed the connection) 2016-05-27T07:26:43Z DavidGuru joined #ccl 2016-05-27T07:34:28Z DavidGuru quit (Remote host closed the connection) 2016-05-27T08:01:47Z hlavaty left #ccl 2016-05-27T08:50:30Z emaczen joined #ccl 2016-05-27T08:56:15Z emaczen quit (Ping timeout: 276 seconds) 2016-05-27T09:03:17Z vydd joined #ccl 2016-05-27T09:03:17Z vydd quit (Changing host) 2016-05-27T09:03:17Z vydd joined #ccl 2016-05-27T09:08:02Z vydd quit (Client Quit) 2016-05-27T09:49:16Z eschatol_ joined #ccl 2016-05-27T09:51:38Z eschatologist quit (Ping timeout: 272 seconds) 2016-05-27T10:19:09Z eschatol_ quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-05-27T10:19:23Z eschatologist joined #ccl 2016-05-27T10:34:13Z edgar-rft joined #ccl 2016-05-27T10:52:08Z emaczen joined #ccl 2016-05-27T10:56:40Z emaczen quit (Ping timeout: 240 seconds) 2016-05-27T10:57:39Z eschatologist quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-05-27T11:04:04Z eschatologist joined #ccl 2016-05-27T11:27:22Z edgar-rft quit (Quit: edgar-rft) 2016-05-27T12:10:06Z eschatologist quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-05-27T12:11:08Z eschatologist joined #ccl 2016-05-27T12:53:14Z emaczen joined #ccl 2016-05-27T12:59:15Z edgar-rft joined #ccl 2016-05-27T12:59:16Z emaczen quit (Ping timeout: 264 seconds) 2016-05-27T14:55:25Z emaczen joined #ccl 2016-05-27T15:01:12Z emaczen quit (Ping timeout: 260 seconds) 2016-05-27T15:46:07Z edgar-rft quit (Quit: edgar-rft) 2016-05-27T16:57:00Z emaczen joined #ccl 2016-05-27T17:26:19Z vydd joined #ccl 2016-05-27T17:26:19Z vydd quit (Changing host) 2016-05-27T17:26:19Z vydd joined #ccl 2016-05-27T18:01:48Z emaczen quit (Ping timeout: 246 seconds) 2016-05-27T19:33:42Z sixbitslacker joined #ccl 2016-05-27T19:35:57Z emaczen joined #ccl 2016-05-27T19:37:07Z eschatologist quit (Quit: My Mac has gone to sleep. ZZZzzz…) 2016-05-27T20:02:20Z eschatologist joined #ccl 2016-05-27T20:20:01Z russellw joined #ccl 2016-05-27T21:07:19Z pllx joined #ccl 2016-05-27T21:11:51Z pobivan quit (Quit: pobivan) 2016-05-27T21:22:24Z emaczen quit (Remote host closed the connection) 2016-05-27T21:22:37Z emaczen joined #ccl 2016-05-27T21:45:12Z pllx quit (Quit: zz) 2016-05-27T22:28:27Z edgar-rft joined #ccl 2016-05-27T23:23:53Z pllx joined #ccl 2016-05-27T23:30:16Z pllx quit (Quit: zz) 2016-05-27T23:37:13Z Blkt quit (Remote host closed the connection) 2016-05-27T23:37:14Z fe[nl]ix quit (Remote host closed the connection) 2016-05-27T23:38:29Z Blkt joined #ccl 2016-05-27T23:38:59Z fe[nl]ix joined #ccl