Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

brap posted:

Does swiftpm work in Xcode yet

Yes. Works well, even.

Adbot
ADBOT LOVES YOU

Doctor w-rw-rw-
Jun 24, 2008
The wrong answer is to support CocoaPods. They are not good and the interactions I’ve had with their devs have solidified this.

Go with Carthage or swiftpm IMO.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

brap posted:

Does swiftpm work in Xcode yet

Yes, and the integration is mostly great. The main awkwardness is that it works slightly differently from the command-line swiftpm tool and there's a bunch of functionality that's only available via xcode, but that probably doesn't matter to most people.

TheReverend
Jun 21, 2005

I was thinking cocoapods because everyone and their dog uses it but I also know that's a pretty lovely justification on its own .

Doctor w-rw-rw-
Jun 24, 2008
When I talked to one at a WWDC a couple of years back they didn’t know what an ASCII plist was and insisted that they didn’t have to care, then complained about xcodeproj files not committing well because those numbers kept on changing (the ones introduced by the XML to ASCII plist conversion which they also didn’t know about).

For something intended to integrate with Xcode projects that was a big yikes for me.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
Xcode projects aren’t XML though, they’re UTF-8 OpenStep plists read and written by our custom archiver.

TheReverend
Jun 21, 2005

Okay so I spent all morning loving with xcframeworks and like 10 min with swiftPM and I don't care anymore, swiftPM is gonna be what we use come hell or high water. Amen.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Good call!

And agreed re: CocoaPods being bad. It's probably a requirement if you're making some library that needs to be incredibly easy for a wide audience to integrate. But if you can avoid it then you should absolutely avoid it.

Can't wait until SwiftPM supports resources. Goodbye CocoaPods forever.

Doctor w-rw-rw-
Jun 24, 2008

eschaton posted:

Xcode projects aren’t XML though, they’re UTF-8 OpenStep plists read and written by our custom archiver.

Yes that’s my point. They didn’t care about ASCII plists’ existence, partly because Xcode at the time helpfully converted the plist to that format, but the numbers used for cross referencing objects were no longer the same, causing the merge issues in the first place.

The terminology “ascii plist” is commonly used to refer to the text plist format even if it’s actually utf8 because it’s primarily text based and not XML.

Doctor w-rw-rw- fucked around with this message at 02:26 on Feb 6, 2020

lord funk
Feb 16, 2004

Is there a way to 'train' the quick open (command-shift-o) in Xcode? I'm working in a view controller every day, but the quick open defaults to a model object I haven't touched in months.

Good Sphere
Jun 16, 2018

Can anyone achieve the result shown in the Apple docs for the CIFilter CIHeightFieldFromMask?

I'm using the black and white text image used in the docs. I get back the same result as the input image. I tried the default input radius, and various input radii using a UISlider that ranges from 0 to 100.

code:
ciImage = ciImage
        .applyingFilter("CIHeightFieldFromMask", parameters: [kCIInputImageKey: ciImage,
                                                              kCIInputRadiusKey: ShadedHeightMaskInputRadius])
(ShadedHeightMaskInputRadius is the variable that's affected by my UISlider)

Good Sphere fucked around with this message at 19:48 on Feb 12, 2020

KidDynamite
Feb 11, 2005

My only issue with swiftpm is that it doesn't support custom schemes yet. Otherwise it's great.


What are y'all doing for oauth 2? I was trying to roll my own solution and I'm timeboxing it.

Stringent
Dec 22, 2004


image text goes here
I just switched a project over from Carthage to SwiftPM and it was :discourse:

Gonna go through and switch over anything else I can next week.

Glimm
Jul 27, 2005

Time is only gonna pass you by

Is there a preferred way to cross compile a Swift app for Ubuntu?

If possible I'd like to make my builds with GitHub Actions or locally and scp them to my server to run them.

The advice I've seen online is to run vagrant and compile with an Ubuntu VM and deploy that. Seems a bit convoluted but not too terrible.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
You mean compile some server-side Swift on your Mac and run it on Ubuntu? Seems like you should be able to do so with the Docker images.

I imagine most people deploying server-side Swift right now are just building their application on their server, or using an Ubuntu VM or Docker image to do so.

Doctor w-rw-rw-
Jun 24, 2008

Glimm posted:

Is there a preferred way to cross compile a Swift app for Ubuntu?

If possible I'd like to make my builds with GitHub Actions or locally and scp them to my server to run them.

The advice I've seen online is to run vagrant and compile with an Ubuntu VM and deploy that. Seems a bit convoluted but not too terrible.

https://github.com/compnerd/swift-build

let me know if you need any help with that

Glimm
Jul 27, 2005

Time is only gonna pass you by

Doctor w-rw-rw- posted:

https://github.com/compnerd/swift-build

let me know if you need any help with that

Thanks, I'll check it out!

https://swift.org/blog/preview-package/

This looks awesome, a Swift package for previewing future standard library updates.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Doctor w-rw-rw- posted:

When I talked to one at a WWDC a couple of years back they didn’t know what an ASCII plist was and insisted that they didn’t have to care, then complained about xcodeproj files not committing well because those numbers kept on changing (the ones introduced by the XML to ASCII plist conversion which they also didn’t know about).

For something intended to integrate with Xcode projects that was a big yikes for me.

I kinda want to know who you talked to so I can properly picture this interaction.

Also, not that anyone here appears to be, but I wouldn't recommend anyone betting big on Cocoapods in general. It's currently being abused for dependency management @ Square but once they're done with it the main devs probably won't be spending much time supporting it.

Dog on Fire
Oct 2, 2004

Does anyone know if Apple will start requiring support for split screen on iPad from April? This talk said that they would, but this item says that it's 'strongly encouraged'.

brand engager
Mar 23, 2011

I got back to working on that network stuff after a few months of working on other tickets, and that NwTCPConnection class is some clown poo poo. The callback for the read function won't be called until either there's data or the connection breaks, with no way to check if there's pending data to read. You also aren't supposed to read/write again until the callback runs. So what ends up happening is you guess whether there might be data from the remote host, and if you guess wrong that connection is just unusable until the connection times out.

I swapped to these stream-based classes instead which have their own weirdness (gotta use UnsafePointers), but are still easier to work with: https://developer.apple.com/documentation/foundation/streams_sockets_and_ports. The delegate those use is pretty nice too, it'll let me know when it's got data from the remote host.

brand engager
Mar 23, 2011

Are extensions limited to 15MB of memory? I had my vpn thing going with the debugger attached, and it hit 15MB while trying to load all of forbes's bullshit and got killed.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I don't believe custom keyboards, share extensions, or the notification extensions are so limited. But they don't run all the time, only on demand, so that's probably not a useful comparison.

If it helps, that sounds like a limit that's undocumented and prone to change without warning between point releases. Your experimenting is likely to be the best source of info (alongside devforums posts. Definitely try a search there, if you haven't already, and try posting a thread if you come up empty).

Also, some limits and behaviors change when a debugger's attached, so I recommend experimenting both with and without. (My guess is that a memory limit wouldn't change, but who knows.)

brand engager
Mar 23, 2011

I'm not sure why I was even holding onto that much memory. I'm using the foundation Data class for buffers, and I thought those auto-release the memory when they get de-inited. Maybe I have a retain cycle keeping a reference to some of them that's keeping them from being cleaned up

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
They should free up (unless you're using the initializer that says not to). You can use the memory graph thinger while attached with the debugger to see what has references to what, it's the debug toolbar icon that's a couple circles connected by lines.

brand engager
Mar 23, 2011

Cool I'll see if I can find them with that at work tomorrow.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Is anyone use Apollo GraphQL in Swift? Having a problem where `nil` arguments are being sent as `null` instead of being omitted.

soundsection
May 10, 2010
I was thinking about mucking around with some audio reactive visual thingos and was wondering if there is a core library for reading data from whatever current state of the audio output stream is on iOS devices? Or is this the kind of thing that would involve setting up a music picking interface in the application itself?

edit: yeah ignore, i can see its a dumb question and would probably be a security vulnerability if you could observe the devices audio output. guess ill mess around with playing music the proper way.

soundsection fucked around with this message at 10:11 on Mar 4, 2020

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I tried to subclass NSTimeZone for use with an NSDateFormatter, overriding methods like secondsFromGMT(for:). But the formatter never calls my time zone??? So much for that idea.

If corelibs-foundation is anything to go by, the formatter just passes the time zone identifier down into ICU, and obviously my custom identifier is unknown to ICU. What's the point of the NSTimeZone methods if all it does is wrap an identifier string? Just an old API?

Thought I was being so clever.

Froist
Jun 6, 2004

I've got a side-project which I use as my playground for improving my Swift knowledge, and I'm not sure whether what I'm trying to do is possible or not, getting muddy with Generics. I have a bunch of endpoints that I've standardised to return data in the format:
code:
{
    "timestamp": ""2020-04-13T14:17:59.213Z",
    "error": "Optional error string",
    "result": // Array or object depending on the endpoint
}
On the Swift side I've defined a generic "Response" type, and typealiases for each response type:
code:
struct MyAppResponse<T>: Decodable where T: Decodable {
  let timestamp: Date
  let error: String?
  let result: T?
}
typealias ActorsResponse = MyAppResponse<Actors> // Example
I've also got all my endpoints in an enum, so I can pass them around type-safe and iterate over them to fetch their data (with added conditions that aren't really relevant).

The part I'm struggling with is decoding the JSON response in a generic way, and handling the "error" property in one place before getting into branching code for the different result types. Because JSONDecoder needs the Type passing as a parameter, I can't find a way to do this without explicitly defining every decoding case in a switch statement, which means the error handling has to be repeated too:

code:
func fetchAndHandleData(for: endpoint Endpoint) {
    // get Data object from request
    switch endpoint {
        case .actors:
            guard let responseObj = try? JSONDecoder().decode(ActorsResponse.self, from: data) else { return displayDataFormatError() }
            guard responseObj.error == nil else { return displayResponseError(responseObj.error!) }
            guard let actors = responseObj.result else { return displayNoResultError() }
            updateActors(actors)
        case .movies:
            guard let responseObj = try? JSONDecoder().decode(ActorsResponse.self, from: data) else { return displayDataFormatError() }
            guard responseObj.error == nil else { return displayResponseError(responseObj.error!) }
            guard let movies = responseObj.result else { return displayNoResultError() }
            updateMovies(movies)
        ...
What I'd really like is to be able to define a function on my enum which maps each endpoint to its result type, and avoid at least the first two repeated lines above. Something like:

code:
enum Endpoint: String, CaseIterable {
  case appConfig
  case actors
  case movies
  
  var responseType: Decodable.Type {
    switch self {
    case .appConfig:  return MyAppResponse<AppConfig>.self
    case .actors:     return MyAppResponse<[Actor]>.self
    case .movies:     return MyAppResponse<[Movie]>.self
    }
  }
}


func fetchAndHandleData(for: endpoint Endpoint) {
    // get Data object from request
    guard let responseObj = try? JSONDecoder().decode(endpoint.returnType, from: data) else { return displayDataFormatError() }
    guard responseObj.error == nil else { return displayResponseError(responseObj.error!) }

    switch endpoint {
        case .actors:
            updateActors(responseObj.result as? [Actors])
        case .movies:
            updateMovies(responseObj.result as? [Movies])
        ...
But this fails with "Cannot invoke 'decode' with an argument list of type '(Decodable.Type, from: Data)'", which I don't really understand if I'm honest as it seems to match the function signature.

Is there a way to make this work, or does Swift's type inference prevent it? I've tried to find code snippets doing a similar thing (as I figure it's some minutiae of the syntax I'm getting wrong) but nothing has come up.

Stringent
Dec 22, 2004


image text goes here

Froist posted:

I've got a side-project which I use as my playground for improving my Swift knowledge, and I'm not sure whether what I'm trying to do is possible or not, getting muddy with Generics. I have a bunch of endpoints that I've standardised to return data in the format:
code:
{
    "timestamp": ""2020-04-13T14:17:59.213Z",
    "error": "Optional error string",
    "result": // Array or object depending on the endpoint
}
On the Swift side I've defined a generic "Response" type, and typealiases for each response type:
code:
struct MyAppResponse<T>: Decodable where T: Decodable {
  let timestamp: Date
  let error: String?
  let result: T?
}
typealias ActorsResponse = MyAppResponse<Actors> // Example
I've also got all my endpoints in an enum, so I can pass them around type-safe and iterate over them to fetch their data (with added conditions that aren't really relevant).

The part I'm struggling with is decoding the JSON response in a generic way, and handling the "error" property in one place before getting into branching code for the different result types. Because JSONDecoder needs the Type passing as a parameter, I can't find a way to do this without explicitly defining every decoding case in a switch statement, which means the error handling has to be repeated too:

code:
func fetchAndHandleData(for: endpoint Endpoint) {
    // get Data object from request
    switch endpoint {
        case .actors:
            guard let responseObj = try? JSONDecoder().decode(ActorsResponse.self, from: data) else { return displayDataFormatError() }
            guard responseObj.error == nil else { return displayResponseError(responseObj.error!) }
            guard let actors = responseObj.result else { return displayNoResultError() }
            updateActors(actors)
        case .movies:
            guard let responseObj = try? JSONDecoder().decode(ActorsResponse.self, from: data) else { return displayDataFormatError() }
            guard responseObj.error == nil else { return displayResponseError(responseObj.error!) }
            guard let movies = responseObj.result else { return displayNoResultError() }
            updateMovies(movies)
        ...
What I'd really like is to be able to define a function on my enum which maps each endpoint to its result type, and avoid at least the first two repeated lines above. Something like:

code:
enum Endpoint: String, CaseIterable {
  case appConfig
  case actors
  case movies
  
  var responseType: Decodable.Type {
    switch self {
    case .appConfig:  return MyAppResponse<AppConfig>.self
    case .actors:     return MyAppResponse<[Actor]>.self
    case .movies:     return MyAppResponse<[Movie]>.self
    }
  }
}


func fetchAndHandleData(for: endpoint Endpoint) {
    // get Data object from request
    guard let responseObj = try? JSONDecoder().decode(endpoint.returnType, from: data) else { return displayDataFormatError() }
    guard responseObj.error == nil else { return displayResponseError(responseObj.error!) }

    switch endpoint {
        case .actors:
            updateActors(responseObj.result as? [Actors])
        case .movies:
            updateMovies(responseObj.result as? [Movies])
        ...
But this fails with "Cannot invoke 'decode' with an argument list of type '(Decodable.Type, from: Data)'", which I don't really understand if I'm honest as it seems to match the function signature.

Is there a way to make this work, or does Swift's type inference prevent it? I've tried to find code snippets doing a similar thing (as I figure it's some minutiae of the syntax I'm getting wrong) but nothing has come up.

There's a library I use for all of this that does exactly that: https://github.com/Moya/Moya

Check out the docs for usage and the code for how it's done, it's all pretty straight forward once you see it.

brand engager
Mar 23, 2011

I don't think you can pass a protocol to decode, has to be a real type

dizzywhip
Dec 23, 2005

I think you'd have more luck representing your endpoints as separate types or functions rather than enum cases. `fetchAndHandleData` can be a method extension on the generic protocol your endpoint types conform to, or a generic helper function that your endpoint functions call.

Kreeblah
May 17, 2004

INSERT QUACK TO CONTINUE


Taco Defender
I'm super new to objective C, Cocoa, etc., so I'm probably doing plenty of things wrong here, but I'm trying to write a couple of classes to detect when a (non-HID) USB device is detected or removed, and call an arbitrary selector on an arbitrary object whenever either of those things happens. I almost have it working, but something's not quite right.

My code's here. USBDetectionDevice.h/.m is basically a glorified struct. USBDetectionDetect.m/.h are where the meat of this is.

The behavior I'm seeing is that when I compile it as is, it detects nothing. Ever. However, if I compile it with lines 59 and 63 of USBDetectionDetect.m commented out (the CFDictionarySetValue calls), it detects all the USB devices attached to the host and works as I'd expect . . . but only once. It doesn't detect newly-plugged in devices. It does detect disconnection of the devices that were plugged in when it was first run, but it doesn't detect reconnection of them.

Is there anybody here who might have any ideas about where I'm going wrong?


Never mind. I rewrote it and it works now.

Kreeblah fucked around with this message at 00:35 on Apr 16, 2020

Supersonic
Mar 28, 2008

You have used 43 of 300 characters allowed.
Tortured By Flan
I've been spending the past several months learning Swift and SwiftUI, and I've reached a point where I'm feeling somewhat comfortable building different kinds of apps. However, I'm currently running into an issue with my current project. I'm building aSwiftUI Mac OS app which receives MIDI input from a controller and displays the notes pressed to the corresponding grids onscreen. I have MIDI input working and a basic GUI made, but I'm running into two issues with displaying the note pressed on the grid.

The grid is created dynamically using SwiftUI Grid and ranges from 0-127 (for the small version). I've written a series of methods which map the MIDI input to the grid, and right now I'm able to respond to button presses by using .overlaypreferencevalue from anchor preferences in combination with Published variables from the combine framework. Here's what it looks like when 4 notes are held on the MIDI controller at once. Although it currently works I'm running into two issues:

Firstly, as you can see in the screenshot, the same notes repeat themselves a few times on the grid, but only one grid element is mapped per note. I did this by creating a method that converts MIDI notes to locations on the onscreen grid like so (128 values for the small MIDI controller version):
code:
  func midiToSmallGrid(noteNumber: UInt8) -> Int {
         let smallGrid: [UInt8: UInt8] = [ 30: 112, 31: 113, 32: 114, 33: 115, 34: 116, 35: 117, 36: 118, 37: 119, 38: 120, 39: 121, 40: 122, 41: 123, 42: 124, 43: 125, 44: 126, 45: 127, 46: 86, 47: 87, 48: 88, 49: 89, 50: 90, 51: 91, 52: 92, 53: 93, 54: 94, 55: 95, 56: 75, 57: 76, 58: 77, 59: 78, 60: 79, 61: 59, 62: 60, 63: 61, 64: 62, 65: 63, 66: 43, 67: 44, 68: 45, 69: 46, 70: 47, 71: 27, 72: 28, 73: 29, 74: 30, 75: 31, 76: 11, 77: 12, 78: 13, 79: 14, 80: 15, 190: 190 ]

         return Int(smallGrid[noteNumber]!)
    } 
My initial thought was to create a dictionary of Int:[Int_x, Int_y] to map one note to multiple grid elements, but it seems like .overlaypreferencevalue only accepts single variables. Is there a way to highlight multiple notes on the grid?

Secondly, when no button is pressed, the location of .overlaypreferencevalue is set to 0. This causes the highlight rectangle to start in the very first grid element. Is there a way to make this hidden? I can't seem to set this to a value outside the index since I'll get an out of bounds error. This is what it looks like when no MIDI keypress is detected.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Froist posted:

But this fails with "Cannot invoke 'decode' with an argument list of type '(Decodable.Type, from: Data)'", which I don't really understand if I'm honest as it seems to match the function signature.

Is there a way to make this work, or does Swift's type inference prevent it? I've tried to find code snippets doing a similar thing (as I figure it's some minutiae of the syntax I'm getting wrong) but nothing has come up.

This is a bit of a hole currently. You'd need to use `_openExistential` to effectively open the Decodable.Type to get the concrete type which can then be decoded. You'd need to know which type you want though.

Froist
Jun 6, 2004

Stringent posted:

There's a library I use for all of this that does exactly that: https://github.com/Moya/Moya

Check out the docs for usage and the code for how it's done, it's all pretty straight forward once you see it.

brand engager posted:

I don't think you can pass a protocol to decode, has to be a real type

dizzywhip posted:

I think you'd have more luck representing your endpoints as separate types or functions rather than enum cases. `fetchAndHandleData` can be a method extension on the generic protocol your endpoint types conform to, or a generic helper function that your endpoint functions call.

Simulated posted:

This is a bit of a hole currently. You'd need to use `_openExistential` to effectively open the Decodable.Type to get the concrete type which can then be decoded. You'd need to know which type you want though.

Thanks for all the pointers! It basically confirmed I wasn't missing something and what I wanted can't be done.

I ended up refactoring to scrap the generics and switch to a protocol with the common fields defined as vars, so a common handler can cast to that protocol and check the common error cases. I'd hoped to avoid duplicating these common field variables into each endpoint definition, but overall the code I've ended up with is far cleaner.

Stringent
Dec 22, 2004


image text goes here

Froist posted:

Thanks for all the pointers! It basically confirmed I wasn't missing something and what I wanted can't be done.

I ended up refactoring to scrap the generics and switch to a protocol with the common fields defined as vars, so a common handler can cast to that protocol and check the common error cases. I'd hoped to avoid duplicating these common field variables into each endpoint definition, but overall the code I've ended up with is far cleaner.

If it isn't proprietary I'd love to see your code for this. I'm always looking for different ways to do this since it comes up so much.

*edit* Actually after rereading I think I get how you're doing it, but post the code if you can by all means.

Stringent fucked around with this message at 12:29 on Apr 29, 2020

Froist
Jun 6, 2004

Stringent posted:

If it isn't proprietary I'd love to see your code for this. I'm always looking for different ways to do this since it comes up so much.

*edit* Actually after rereading I think I get how you're doing it, but post the code if you can by all means.

Sure, it's only for a hobby project so happy to share. I've removed the specific endpoint URLs and cut it down to a minimal case - in practice there are more endpoints, a caching system so the data isn't always fetched from the server, and proper error handling, but this (hopefully) demonstrates the design pattern. It works fine for me in practice but happy to receive any code review/improvement suggestions!

https://pastebin.com/NAsjbSLc

I did look into Moya that you suggested but it didn't quite do what I wanted. Plus I'm not that keen on pulling in libraries when (for something reasonably simple) I can roll my own solution and learn along the way. I'd rather have 100 lines of code that I understand myself and does only what I want than a more flexible library I have to learn. Obviously there are limits to this :)

Stringent
Dec 22, 2004


image text goes here

Froist posted:

I did look into Moya that you suggested but it didn't quite do what I wanted. Plus I'm not that keen on pulling in libraries when (for something reasonably simple) I can roll my own solution and learn along the way. I'd rather have 100 lines of code that I understand myself and does only what I want than a more flexible library I have to learn. Obviously there are limits to this :)

Yeah no doubt, I use Moya because if I didn't I'd just have to rewrite it. And I may end up doing so anyhow for my laziness. Looking forward to having a look at your code in the morning.

Stringent fucked around with this message at 15:20 on Apr 29, 2020

Adbot
ADBOT LOVES YOU

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I created this mapview deal, and then I want to do a thumbnail view up above. Do I have the mapview update the controller (that handles the zoom slider) and then have the controller relay that back to the thumbnail view? (coordinates of current view, size of the mapview, and the current zoom factor so it can generate a colored box the size of the current 'view')

It's not really a thumbnail but an indicator of where the current view is on the grand scheme of however large the map coordinates could be. But anyway.

That just seems...kind of goofy. Maybe I should just have the mapview draw the thumbnail opaquely in the corner of itself. It'd be simpler.

But then what am I going to do when I allow the user to select walls/things, and need to show the texture and other info related to that object? Would I have a property of the mapview with the ID of the currently selected object, and then just highlight that in another window that has all the textures? Something like [[self superview] updateToolsWindow]?

I do like one Cocoa project every 3 years and can never remember the best ways to link up different views.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply