Launchd never stops my HelperTool

2015-12-04 Thread Gerriet M. Denkmann
I have a HelperTool (installed via SMJobBless). 

The HelperTool does:

NSXPCListener *listener = [[NSXPCListener alloc] initWithMachServiceName: 
bundleId ];
listener.delegate = myNSXPCListenerDelegate;
[listener resume];
NSRunLoop *currentRunLoop = [NSRunLoop currentRunLoop]; 
[ currentRunLoop run ]; 


“Daemons and Services Programming Guide” → “Creating XPC Services” → 
"Understanding the Structure and Behavior" says:
"XPC services are managed by launchd, which launches them on demand, restarts 
them if they crash, 
and terminates them (by sending SIGKILL) when they are idle.”

“launches them on demand” works fine.

But: “terminates them when they are idle”  never happens.

What to do:

(a) Just trust launchd; it probably has decided that relaunching is more 
costly than keeping the process running.

(b) launchd has no idea that the HelperTool is idle, because the RunLoop is 
still running. The HelperTool should quit the RunLoop when there are no more 
active NSXPCConnections.

If (b) what should the HelperTool do if it decides there is no more work to do:
(b1) just exit(EXIT_SUCCESS)
(b2) [listener invalidate], followed by exit(EXIT_SUCCESS).

Gerriet.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

SceneKit Normals

2015-12-04 Thread Rick Mann
Based on examples I've found around the web, when creating geometry in SceneKit 
programmatically, it seems to want normals per-vertex, rather than per-face.

The code I'm working with that's actually generating the mesh has a single 
per-face normal. I can certainly duplicate that three times for each face to 
provide vertex normals, but I'm wondering if there's a way to just tell 
SceneKit that I have a single normal *per face* and to use that.

Is this possible? Thanks!

-- 
Rick Mann
rm...@latencyzero.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

UIView underlying rects for drawRect

2015-12-04 Thread Roland King
NSView has a method getRectsBeingDrawn:count: which gives you the actual rects 
being drawn in a drawRect: call. Is there something equivalent for a UIView? 
Does UIView even do as I believe NSView does and only invalidate just the areas 
passed to setNeedsDisplayInRect:, meaning those are the only areas you actually 
need to redraw, or does it blow away the entire containing rectangle so you 
must repaint the entire area?  

I have a time-series view which only invalidates a tiny sliver of view which 
changed and only draws that in drawRect:. However when the series gets long 
enough it trims the left hand end, so two tiny slivers of view are invalidated, 
one at each end, drawRect: coalesces them into one rect the entire size of the 
window and the whole series redraws on every iteration. I spotted this when I 
left the simulator running for an hour and the fans suddenly started spinning 
up. 

I can work around it by overriding setNeedsDisplayInRect: and queuing up 
non-contiguous updates, releasing them only when drawRect has been called, but 
it would be nice not to have to. I suspect I’m SOL on this one. 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

NSDocument and NSViewControllers

2015-12-04 Thread Rick Mann
I have a very complex "document" that I'm writing an editor for. It's a 
collection files, lending itself to the bundle document style. I use 
NSFileWrappers, and when I open one of these in my app, I get called to read 
the contents. I don't have to read every file all the time, it depends on what 
aspect the user is editing.

One part of the document is a 3D mesh file. I'm using SceneKit to display it, 
and I have an NSViewController subclass and SCNView subclass. I can get at the 
document from the NSViewController subclass via a rather cumbersome "let doc = 
self.view.window?.windowController?.document as? ModelDocument".

But NSViewController has a "representedObject". This suggests something outside 
the VC can inject the model into the VC, improving decoupling between the VC 
and the NSDocument subclass. But I don't see any good way to get at the VC, 
except in makeWindowControllers(). Is that the right place?

Part of the issue is that I may have multiple windows possible for each 
document (like I said, it's quite complex). Certainly multiple views, and I'm 
not a big fan of Xcode-style all-in-one-window UIs. It might work better in 
this particular case, since it's much more rare the user needs multiple aspects 
open simultaneously (like, multiple source files). In any case, a particular 
window may never be opened, so I don't want to make all the window controllers 
at once.

What do most people do in this situation?

TIA,

-- 
Rick Mann
rm...@latencyzero.com



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Swift screensavers in Ubuntu?

2015-12-04 Thread SevenBits
On Friday, December 4, 2015, Juanjo Conti  wrote:

> Now that Swift is open source and runs on Ubuntu, do you think a Swift Mac
> OS X screensaver could run as a screensaver in Ubuntu? What about a GUI
> used to config the screensaver?


What Apple open sourced was Swift the language, not Swift "the amazing
thing you can make apps in now". Cocoa isn't included in the open source
version, neither is most features you need to make it do applications.

While there will likely be some effort by someone to make some sort of
bridge, Apple will certainly never release it or support it.


>
> Yes, I'm asking if our screensaver https://screensaver.ninja/ could run in
> Ubuntu :)
>
> --
>
> Juanjo Conti http://goog_2023646312>@carouselapps.com
> >>
>
> Software Engineer - Carousel Apps 
>
> --
> Carousel Apps Limited, registered in England & Wales with registered number
> 7689440 and registered office 20-22 Wenlock Road, London, N1 7GU, United
> Kingdom. Any communication sent by or on behalf of Carousel Apps or any of
> its subsidiary, holding or affiliated companies or entities is confidential
> and may be privileged or otherwise protected. If you receive it in error
> please inform us and then delete it from your system. You should not copy
> it or disclose its contents to anyone. Messages sent to and from Carousel
> Apps may be monitored to ensure compliance with our internal policies and
> to protect our business. Emails are not secure and cannot be guaranteed to
> be error free. Anyone who communicates with us by email is taken to accept
> these risks.
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com )
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/sevenbitstech%40gmail.com
>
> This email sent to sevenbitst...@gmail.com 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Swift screensavers in Ubuntu?

2015-12-04 Thread Greg Parker

> On Dec 4, 2015, at 3:17 PM, Juanjo Conti  wrote:
> 
> Now that Swift is open source and runs on Ubuntu, do you think a Swift Mac
> OS X screensaver could run as a screensaver in Ubuntu? What about a GUI
> used to config the screensaver?

Not without a lot of work. Open-source Swift is available for Linux but the 
Swift/ObjC/Cocoa bridge is not. That would break your OS X screensaver assuming 
that it draws anything.

Somebody would have to do something like port the Swift-ObjC bridging machinery 
to the GNU Objective-C runtime and update the GNUstep SDK to work with the 
Swift-ObjC importer. 


-- 
Greg Parker gpar...@apple.com Runtime Wrangler



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Swift screensavers in Ubuntu?

2015-12-04 Thread Juanjo Conti
Now that Swift is open source and runs on Ubuntu, do you think a Swift Mac
OS X screensaver could run as a screensaver in Ubuntu? What about a GUI
used to config the screensaver?

Yes, I'm asking if our screensaver https://screensaver.ninja/ could run in
Ubuntu :)

-- 

Juanjo Conti http://goog_2023646312>@carouselapps.com
>

Software Engineer - Carousel Apps 

-- 
Carousel Apps Limited, registered in England & Wales with registered number 
7689440 and registered office 20-22 Wenlock Road, London, N1 7GU, United 
Kingdom. Any communication sent by or on behalf of Carousel Apps or any of 
its subsidiary, holding or affiliated companies or entities is confidential 
and may be privileged or otherwise protected. If you receive it in error 
please inform us and then delete it from your system. You should not copy 
it or disclose its contents to anyone. Messages sent to and from Carousel 
Apps may be monitored to ensure compliance with our internal policies and 
to protect our business. Emails are not secure and cannot be guaranteed to 
be error free. Anyone who communicates with us by email is taken to accept 
these risks.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ARC and IBOutlet - strong vs weak......

2015-12-04 Thread Mike Throckmorton

Quincey Morris Friday, December 4, 2015 10:04 AM


That sounds like a definitive answer. So you’re asking us because … why?


Definitive for the leading question, but not the secondary:


If strong, do I need to set the outlets to nil in the corresponding dealloc 
method?


I had tested this and it appeared as if I did not need to nil 
out the reference at dealloc (this makes sense) but is it an on 
purpose behaviour that is supported by the ARC implementation or 
is it some side effect that may go away?


Most likely the former, but who likes to leave potential down 
the road a** biters lying around.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: ARC and IBOutlet - strong vs weak......

2015-12-04 Thread Quincey Morris
On Dec 4, 2015, at 06:16 , Dave  wrote:
> 
> I asked about this on Twitter to an engineer on the IB team and he confirmed 
> that strong should be the default and that the developer docs are being 
> updated.

That sounds like a definitive answer. So you’re asking us because … why?

Here’s how I understand the situation:

If you use a NSWindowController or NSViewController subclass to load the nib, 
the controller keeps strong references to all the top-level objects in the nib. 
That means all referenced objects in the nib stay alive, too — which is to say, 
all of them, since the nib is a hierarchy of references. (The only exceptions 
would be if relationships are changed directly by code, which is therefore not 
a good idea.)

So, from that point of view, it’d be fine for all outlets to be weak.

However, when windows close or views are swapped out, you don’t have control of 
the order of deallocation of the controllers, which means that the owner of an 
outlet may see the outlet go to nil if the controller is deallocated first.

If the outlet owner can tolerate its outlets becoming nil, then that’s fine 
too, and the outlets can be weak.

But sometimes is tricky to handle this without crashes. (That’s why, for 
example, it’s often useful to nil out the ‘delegate' property of some object 
that’s using the outlet owner. It prevents delegate methods being called and 
possible using a stale or nil reference to something.) It’s easier to make the 
outlets strong — not to keep them alive generally, but specifically to keep 
them alive as long as their owner.

That’s an easy answer, but if that happens to cause retain cycles, then you 
need to find a solution to *that* problem, which might be using a weak outlet 
after all, or dealing with the situation in some other. (Nil-ing out a strong 
delegate property also helps with this problem, often.)

Summary: it’s not so very complicated, but there’s no single answer that always 
works. "Always making your outlets strong, except when you are solving a 
reference cycle", sounds like a good rule of thumb.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

ARC and IBOutlet - strong vs weak......

2015-12-04 Thread Dave
Hi All,

This is for Mac, not iOS.

Under ARC, should an IBOutlet be strong or weak?

If strong, do I need to set the outlets to nil in the corresponding dealloc 
method?

I did a google for this and are many conflicting answers to this question but 
one with a lot of votes on Stack Overflow is this:

The current recommended best practice from Apple is for IBOutlets to be strong 
unless weak is specifically needed to avoid a retain cycle. As Johannes 
mentioned above, this was commented on in the "Implementing UI Designs in 
Interface Builder" session from WWDC 2015 where an Apple Engineer said:

And the last option I want to point out is the storage type, which can either 
be strong or weak. In general you should make your outlet strong, especially if 
you are connecting an outlet to a subview or to a constraint that's not always 
going to be retained by the view hierarchy. The only time you really need to 
make an outlet weak is if you have a custom view that references something back 
up the view hierarchy and in general that's not recommended.

I asked about this on Twitter to an engineer on the IB team and he confirmed 
that strong should be the default and that the developer docs are being updated.

Thanks a lot,
Cheers
Dave
 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Best Control for a Matrix these days?

2015-12-04 Thread Jonathan Mitchell

> On 4 Dec 2015, at 11:21, Dave  wrote:
> 
> Hi All,
> 
> Well, I’ve got plenty of options to be going on with!
> 
> I’ve got a better “Spec” now, the Maximum is up to 3 Columns, but with a 
> variable number of rows in each Column. So, I don’t think I can base it on 
> NSTableView as (off to the top, not used NSTableVIew on Mac for a long time), 
> I seem to remember it supports a fixed number of Rows per Column…..
The guts of what I use is here. SorryI forgot to post it earlier.

https://gist.github.com/Thesaurus/f6e6d60495cb8f29eb48/edit

> 
> I leaning towards doing it either as Nested Stack Views or just as an NSView 
> Subclass, although the Auto-Layout stuff complicates this greatly so I think 
> is the way to go on this………
> 
> All the Best
> Dave
> 
>> On 3 Dec 2015, at 18:54, Lee Ann Rucker  wrote:
>> 
>> That doesn't give you enough control over row/column layout. How about 
>> nested NSStackViews?
>> 
>> 
>> NSCollectionView
>> --
>> Gary L. Wade (Sent from my iPad)
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.garywade.com_&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=ie7S-J__EKnfyVOBV7-jV2rZ--p47O6vkyTklpDM3h4&m=Ovx3p7ZngLjpJw59NjTdXanjpTLNJOtQ2jbtXQvp1LU&s=bN3Fn68sVADDHN4nV5L5JDZKhAD1-eJgMxuVVWacYjg&e=
>>  
>> 
>> 
>>> On Dec 3, 2015, at 5:00 AM, Dave  wrote:
>>> 
>>> Hi,
>>> 
>>> This is a Mac question, not iOS.
>>> 
>>> Which Class is the latest best practise for displaying a matrix in a View.
>>> 
>>> The matrix can be maximum 3 rows x 4 columns and each item contains a small 
>>> Icon type image and a Text String.
>>> 
>>> I get an array of arrays and two parameters that tell me how many rows and 
>>> columns to populate:
>>> 
>>> numColumns = 3;
>>> numRows = 2;
>>> 
>>> Would be:
>>> 
>>> columnArray [0] = rowArray[0] - Payload Object
>>> columnArray [0] = rowArray[1] - Payload Object
>>> 
>>> columnArray [1] = rowArray[0] - Payload Object
>>> columnArray [1] = rowArray[1] - Payload Object
>>> 
>>> columnArray [2] = rowArray[0] - Payload Object
>>> columnArray [2] = rowArray[1] - Payload Object
>>> 
>>> 
>>> Thanks a lot
>>> All the Best
>>> Dave
>>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
>> )
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
>> 
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com 
>> 
>> 
>> This email sent to lruc...@vmware.com 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com
> 
> This email sent to jonat...@mugginsoft.com

Regards

Jonathan Mitchell
Mugginsoft LLP

jonat...@mugginsoft.com
-
KosmicTask - the Integrated Scripting Environment for OS X.
http://www.mugginsoft.com/KosmicTask
-
Follow on Twitter @KosmicTask
-
Github http://github.com/mugginsoft













___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Best Control for a Matrix these days?

2015-12-04 Thread Dave
Hi All,

Well, I’ve got plenty of options to be going on with!

I’ve got a better “Spec” now, the Maximum is up to 3 Columns, but with a 
variable number of rows in each Column. So, I don’t think I can base it on 
NSTableView as (off to the top, not used NSTableVIew on Mac for a long time), I 
seem to remember it supports a fixed number of Rows per Column…..

I leaning towards doing it either as Nested Stack Views or just as an NSView 
Subclass, although the Auto-Layout stuff complicates this greatly so I think is 
the way to go on this………

All the Best
Dave

> On 3 Dec 2015, at 18:54, Lee Ann Rucker  wrote:
> 
> That doesn't give you enough control over row/column layout. How about nested 
> NSStackViews?
> 
> 
> NSCollectionView
> --
> Gary L. Wade (Sent from my iPad)
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.garywade.com_&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=ie7S-J__EKnfyVOBV7-jV2rZ--p47O6vkyTklpDM3h4&m=Ovx3p7ZngLjpJw59NjTdXanjpTLNJOtQ2jbtXQvp1LU&s=bN3Fn68sVADDHN4nV5L5JDZKhAD1-eJgMxuVVWacYjg&e=
>  
> 
> 
>> On Dec 3, 2015, at 5:00 AM, Dave  wrote:
>> 
>> Hi,
>> 
>> This is a Mac question, not iOS.
>> 
>> Which Class is the latest best practise for displaying a matrix in a View.
>> 
>> The matrix can be maximum 3 rows x 4 columns and each item contains a small 
>> Icon type image and a Text String.
>> 
>> I get an array of arrays and two parameters that tell me how many rows and 
>> columns to populate:
>> 
>> numColumns = 3;
>> numRows = 2;
>> 
>> Would be:
>> 
>> columnArray [0] = rowArray[0] - Payload Object
>> columnArray [0] = rowArray[1] - Payload Object
>> 
>> columnArray [1] = rowArray[0] - Payload Object
>> columnArray [1] = rowArray[1] - Payload Object
>> 
>> columnArray [2] = rowArray[0] - Payload Object
>> columnArray [2] = rowArray[1] - Payload Object
>> 
>> 
>> Thanks a lot
>> All the Best
>> Dave
>> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
> )
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
> 
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com 
> 
> 
> This email sent to lruc...@vmware.com 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Need Help with Swift

2015-12-04 Thread Roland King

> On 4 Dec 2015, at 16:07, Stevo Brock  wrote:
> 
> This seems to do the trick.
> 
> I wasn’t able to just do ABC.class, as the “.class” wasn’t registered as 
> valid.
> 
> What I ended up with was a static method on the class, and calling the static 
> method, and voilà! Everything is working.
> 
> So now to clean things up…
> 
> Thanks guys so much for your help.  

well that’s just a whole bunch of ugly. Before you get TOO far, try and 
optimized release build, make sure it doesn’t go optimize that out and break it 
all again. You know these compilers love to leave the best until last. 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Need Help with Swift

2015-12-04 Thread Stevo Brock
This seems to do the trick.

I wasn’t able to just do ABC.class, as the “.class” wasn’t registered as valid.

What I ended up with was a static method on the class, and calling the static 
method, and voilà! Everything is working.

So now to clean things up…

Thanks guys so much for your help.  

-Stevo Brock
 Owner
 Sunset Magicwerks, LLC
 www.sunsetmagicwerks.com
@SunsetMagicwrks
 818-478-9758

> On Dec 3, 2015, at 11:45 PM, Roland King  wrote:
> 
> 
>> On 4 Dec 2015, at 15:42, Stevo Brock > > wrote:
>> 
>> So strange…
>> 
>> I added
>> 
>> class IB_MediaItemViewController_PhotoMediaItemView : 
>> MediaItemViewController
>> {
>> }
>> 
>> and used IB_MediaItemViewController_PhotoMediaItemView in the Storyboard, 
>> and I still see this error:
>> 
>> 2015-12-03 23:35:52.400 Media Tools[14523:313526] Unknown class 
>> _TtC11Media_Tools45IB_MediaItemViewController_PhotoMediaItemView in 
>> Interface Builder file.
>> 
>> So strange…
> 
> Try using it somewhere - even in a method which can’t possibly ever get 
> called. I don’t know if Swift suffers from the same problem with IB as ObjC 
> does, that if you have a class which is reference ONLY in your IB file, and 
> not in code, none of the code for it actually ends up in the binary. 
> 
> I have little hack files in some of my projects which just do 
> 
>   SomeClassIWantToLoad.class
> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Need Help with Swift

2015-12-04 Thread Stevo Brock
I think the trick with all these ideas is that IB will just remove the <…> when 
it good and well pleases and then you’re back to square one.  

-Stevo Brock
 Owner
 Sunset Magicwerks, LLC
 www.sunsetmagicwerks.com
@SunsetMagicwrks
 818-478-9758

> On Dec 3, 2015, at 11:44 PM, Quincey Morris 
>  wrote:
> 
> On Dec 3, 2015, at 23:30 , Roland King mailto:r...@rols.org>> 
> wrote:
>> 
>> Quincey had one idea - but I don’t know how you @objcname a specialisation 
>> of a generic. 
> 
> Well, yes, that’s a good objection.
> 
> It seems to me that the three things to try, if they haven’t been tried yet 
> are:
> 
> 1.class: 
> Media_Tools.MediaItemViewController
>   module: empty
> 
> 2.class: MediaItemViewController
>   module: Media_Tools
> 
> 3.class: MediaItemViewController< Media_Tools.PhotoMediaItemView>
>   module: Media_Tools
> 
> It looks like Swift classes have a stringified name that Obj-C is supposed to 
> recognize, that includes an explicit “myModule.” prefix. My understanding is 
> that the module field in IB adds the module, but it may not do so for the 
> specialization. Whether the generic specialization is in the class name 
> string is anybody’s guess.
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com