Re: Control default color inconsistencies

2016-12-15 Thread Andreas Falkenhahn
On 14.12.2016 at 18:47 Gary L. Wade wrote:

> Set the background color of self.view to something other than black
> and your button and label will be more visible.

Thanks, that was indeed the problem. UIButton and UILabel both seem to use
a clear background color as the default, which resulted in the UIView's
background color, which was black, shining through them. 

I'm now stealing the default background color of the UITableView for my
UIView to get a consistent look, i.e. I'm doing the following in my
view controller's viewDidLoad():

self.view.backgroundColor = tableView.backgroundColor;

Everything looks correctly then.

-- 
Best regards,
 Andreas Falkenhahnmailto:andr...@falkenhahn.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: Large "Data" support

2016-12-15 Thread Daryle Walker

> On Dec 6, 2016, at 12:31 PM, Jens Alfke  wrote:
> 
> 
>> On Dec 6, 2016, at 12:32 AM, Alastair Houghton > > wrote:
>> 
>> 1. If you mmap() data, you don’t actually have to read all of it; it’s read 
>> from disk on demand.
> 
> I was assuming Daryle wanted to create the Data from scratch, not read it 
> from a file. If the data is read from a file, then I agree with you 100%.

No, the plan is read-only, potentially from a huge file.  I’ve been looking at 
the Swift 3 stuff now, and “Data” initializer takes the same parameters as 
"NS(Mutable)Data," including memory-mapping.

I’m working on Mac applications, BTW.  (Cranky Old Man mode: that used to be 
assumed; now it’s the other way around (i.e. iPhone & friends unless I 
specify).  Just ticked off that I skipped a lot of the WWDC 2016 videos from my 
binge since they were iPhone & friends oriented.  And the first third of the 
last Mac announcement was a future AppleTV app.  And get off my lawn.)

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT 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: Representing an object graph

2016-12-15 Thread Daryle Walker

> On Dec 5, 2016, at 8:17 PM, Jens Alfke  wrote:
> 
> 
>> On Dec 5, 2016, at 4:18 PM, Daryle Walker  wrote:
>> 
>> I've heard that Core Data is a object graph and persistence library. What if 
>> you want just the first part?  
> 
> You can use the XML-based store instead of SQLite, and just not bother to 
> write the XML anywhere…

But if I maintain multiple contexts, like the main-thread and secondary-thread 
contexts vended by NSPersistentContainer, wouldn’t I need a store so the 
contexts can find each others’ updates?

(And like the other guy said, I’d probably use an in-memory store.)

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT 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: Representing an object graph

2016-12-15 Thread Daryle Walker

> On Dec 6, 2016, at 10:18 PM, Chris Hanson  wrote:
> 
> On Dec 5, 2016, at 4:18 PM, Daryle Walker  > wrote:
> 
>> I've heard that Core Data is a object graph and persistence library. What if 
>> you want just the first part?  The graph seems like a neat way to save on 
>> modeling code, the external format is not database-ish at all (so the 
>> capability for custom export formats won't help). Can I just not use the 
>> persistence part and use custom save & load functions? Or do I have to (or 
>> should) give up on Core Data?
> 
> This is exactly the sort of thing that subclassing NSAtomicStore 
>  lets you do.
> 
> There are only a few methods to override, and then you can just use one of 
> your own documents as if it were one of the built-in persistent store types.

I have looked into that, that’s why I wrote in:

>> the external format is not database-ish at all (so the capability for custom 
>> export formats won't help)

The store format assumes there’s at least one field in a record that can be 
used like a database(-ish) index.  Custom stores can’t help if the data is too 
dumb to have such a qualifying field.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT 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: Representing an object graph

2016-12-15 Thread Chris Hanson
On Dec 15, 2016, at 7:24 PM, Daryle Walker  wrote:
> 
> On Dec 6, 2016, at 10:18 PM, Chris Hanson mailto:c...@me.com>> 
> wrote:
>> 
>> On Dec 5, 2016, at 4:18 PM, Daryle Walker > > wrote:
>> 
>>> I've heard that Core Data is a object graph and persistence library. What 
>>> if you want just the first part?  The graph seems like a neat way to save 
>>> on modeling code, the external format is not database-ish at all (so the 
>>> capability for custom export formats won't help). Can I just not use the 
>>> persistence part and use custom save & load functions? Or do I have to (or 
>>> should) give up on Core Data?
>> 
>> This is exactly the sort of thing that subclassing NSAtomicStore 
>>  lets you do.
>> 
>> There are only a few methods to override, and then you can just use one of 
>> your own documents as if it were one of the built-in persistent store types.
> 
> I have looked into that, that’s why I wrote in:
> 
>>> the external format is not database-ish at all (so the capability for 
>>> custom export formats won't help)
> 
> The store format assumes there’s at least one field in a record that can be 
> used like a database(-ish) index.  Custom stores can’t help if the data is 
> too dumb to have such a qualifying field.

What do you mean?

Most atomically read/written file formats should be supportable as an 
NSAtomicStore. Object IDs can be purely an in-memory construct for such a 
store, for example based on the order an object was (initially) read or 
instantiated.

  -- Chris

___

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

Requires High Performance Graphic Card - Why?

2016-12-15 Thread Gerriet M. Denkmann
macOS 12.2; MacBook Pro (Retina, Mid 2012).

Activity Monitor → Energy tells me that my app requires a "High Performance 
Graphic Card”.

The problem: it has absolutely no reason to do so.
The app does some WiFi stuff and displays the result in a window. There is 
almost no graphics (except from some sliders, buttons, a colour well, etc.) - 
and there definitely is no need for “High Performance Graphics” of any sort.

How to debug this?

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

Re: Requires High Performance Graphic Card - Why?

2016-12-15 Thread Alastair Houghton
On 16 Dec 2016, at 04:11, Gerriet M. Denkmann  wrote:
> 
> macOS 12.2; MacBook Pro (Retina, Mid 2012).
> 
> Activity Monitor → Energy tells me that my app requires a "High Performance 
> Graphic Card”.
> 
> The problem: it has absolutely no reason to do so.
> The app does some WiFi stuff and displays the result in a window. There is 
> almost no graphics (except from some sliders, buttons, a colour well, etc.) - 
> and there definitely is no need for “High Performance Graphics” of any sort.
> 
> How to debug this?

This is one of those things that you just need to know.  You need to add the 
key NSSupportsAutomaticGraphicsSwitching to your app’s Info.plist; see

  https://developer.apple.com/library/content/qa/qa1734/_index.html

Kind regards,

Alastair.

--
http://alastairs-place.net


___

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