Re: Constraining window width to scrolling contents with autolayout

2015-05-25 Thread Jonathan Hull
I believe this is where the constraint priorities come in.  The window size 
will be affected by constraints with priorities larger than 500 and may 
override constraints under 500.  Also, when dealing with ScrollViews it can get 
a bit tricky, so it helps to add a single view inside the scrollView which you 
can apply constraints against and then add your contents to that view.

In this case you would add an inequality constraint between that view in the 
scrollView and the window’s main view (i.e. the window width must be 
less-than-or-equal to the scrollView’s content plus some constant). You might 
need to write that programmatically (as opposed to in IB).

(Note: This is off the top of my head, haven’t gotten a chance to test it)

Thanks,
Jon


> On May 24, 2015, at 10:00 PM, Rick Mann  wrote:
> 
> I have a bunch of views statically arranged inside an NSScrollView. Their 
> relative size doesn't change. But it's a large view, and I want to be able to 
> view it on smaller displays, hence the scroll view.
> 
> Is there a way to constrain the window size to never be larger than just big 
> enough to disable to scroll bars using autolayout constraints?
> 
> -- 
> 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/jhull%40gbis.com
> 
> This email sent to jh...@gbis.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

10.10 replacement for SMJobCopyDictionary

2015-05-25 Thread Gerriet M. Denkmann
How to translate this into 10.10 without deprecation warnings?

CFDictionaryRef diref = SMJobCopyDictionary( kSMDomainSystemLaunchd, 
“de.mdenkmann.MyTool” );
if ( diref == nil ) //  MyTool is not running 

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: 10.10 replacement for SMJobCopyDictionary

2015-05-25 Thread Kyle Sluder
On Mon, May 25, 2015, at 06:13 AM, Gerriet M. Denkmann wrote:
> How to translate this into 10.10 without deprecation warnings?
> 
> CFDictionaryRef diref = SMJobCopyDictionary( kSMDomainSystemLaunchd,
> “de.mdenkmann.MyTool” );
> if ( diref == nil ) //  MyTool is not running 


The point of launchd is to start jobs on-demand. Why are you trying to
check if your launchd job is already running? What's to say that as soon
as launchd tells you it's running, it doesn't turn around and kill it
because its sudden termination suspension count dropped to 0?

--Kyle Sluder

___

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: Copy test docs to Simulator App's Documents folder?

2015-05-25 Thread Michael David Crawford
I'm still trying to load the simulator with some sample files for my
app's Documents folder.

I'm able to put documents in the Documents folder for my app on my
iPad.  I can use the Devices window to copy my .xcappdata folder to my
project heirarchy.  I can select it to be added to my simulated app in
the Edit Scheme / Options dialog.

The .xcappdata folder does contain the desired documents but they
don't show up in my app's UI.  Is this a known bug in Xcode or the
Simulator?

There is some possibility it is a bug in my code.  I'll look into that
while I eagerly await your response.
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/

   Available for Software Development in the Portland, Oregon Metropolitan
Area.


On Mon, Apr 20, 2015 at 8:45 PM, Michael Crawford  wrote:
> (David Brittain sent me his AppDataInfo.plist.)
>
> That gets me part of the way there but now I get the message
> "Application Data package not copied to the Simulator" because it
> doesn't have a data folder, along with the promise to copy it the
> _next_ time it is run, however that doesn't happen.  Google yields no
> joy.
>
> Possibly the settings in my plist aren't consistent with the rest of
> the project I will check that.
>
> Someone already filed a radar in which he request that we be able to
> set up Application Data for the Simulator.
>
> --
> Michael David Crawford, Consulting Software Engineer
> mdcrawf...@gmail.com
> http://www.warplife.com/mdc/
>
>Available for Software Development in the Portland, Oregon Metropolitan
> Area.
___

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: What is overwriting 'isa' with 0xbaddc0dedeadbead ?

2015-05-25 Thread Greg Parker

> On May 23, 2015, at 6:26 PM, Jens Alfke  wrote:
> 
>> On May 23, 2015, at 3:31 PM, Jens Alfke > > wrote:
>> 
>> I’m not sure I can simplify this into a test case, but I’ll try.
> 
> FYI, I’ve boiled it down into a small test case and submitted it as 
> rdar://21090194 . I’ve also found some workarounds, so I can 
> get on with my life now…

Thanks for the bug report. If your workarounds look relevant to the bug then 
please describe them there. If the behavior differs or does not differ in debug 
vs release builds please mention that too.


-- 
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

Re: What is overwriting 'isa' with 0xbaddc0dedeadbead ?

2015-05-25 Thread Greg Parker

On May 23, 2015, at 4:54 PM, Ken Thomases  wrote:
> 
> On May 23, 2015, at 12:54 PM, Jens Alfke  wrote:
> 
>> On May 23, 2015, at 9:20 AM, Greg Parker  wrote:
>>> 
>>> free() does that sometimes. If zombies doesn't find anything then try guard 
>>> malloc.
>> 
>> Good suggestion! I’d forgotten about guard malloc. This changes the crash; 
>> now the parameter to objc_release points to unmapped memory, implying that 
>> the object has been dealloced:
>> 
>> (lldb) p/x $rdi
>> (unsigned long) $2 = 0x61000d5a3fd0
>> (lldb) x $rdi
>> error: memory read failed for 0x61000d5a3e00
>> 
>> Still no clue what object this is/was, though. And it seems weird that it 
>> got freed instead of turned into a zombie, since I still have zombies 
>> enabled too.
> 
> Set the environment variable MallocStackLoggingNoCompact=1 before running the 
> app.  When it crashes, use the malloc_history tool to see the allocation 
> history of the object address.  (gdb had an "info malloc-history" command.  
> According to , the equivalent for lldb is 
> "command script import lldb.macosx.heap" once to introduce the command and 
> then "malloc_info --stack-history ".)

You can also use the Allocations instrument to record and display allocation 
and retain/release history of individual objects. It should work fine alongside 
Guard Malloc.


-- 
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

Re: What is overwriting 'isa' with 0xbaddc0dedeadbead ?

2015-05-25 Thread Daniel DeCovnick
Do you have an OpenRadar for it? Sounds like a fascinating bug. 

Daniel

On May 23, 2015, at 6:26 PM, Jens Alfke  wrote:

> 
>> On May 23, 2015, at 3:31 PM, Jens Alfke  wrote:
>> 
>> I’m not sure I can simplify this into a test case, but I’ll try.
> 
> FYI, I’ve boiled it down into a small test case and submitted it as 
> rdar://21090194 . I’ve also found some workarounds, so I can 
> get on with my life now…
> 
> —Jens

___

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