Re: NSWindow Level Side Effect - PopUp to Normal

2013-10-29 Thread Caylan Larson
> This works great…  except when the window nears the main menu.  If I get 
> close to the main menu, the child window’s frames start to get limited in 
> upward mobility.  This causes drawing bugs.  Strangely, the redrawing doesn’t 
> happen until I setFrame: (vs setFrameOrigin).  However, dragging is not the 
> only one use case where the main menu breaks the design - it happens when the 
> window resizes vertically and tries to cross the main menu boundary (user 
> drag and user zoom gesture).


I fixed this problem by adding the following snippet to each child NSWindow 
subclass implementation.

-(NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
{
return frameRect;
}

Of course, I left the default constraint on the main window because it makes 
sense from the user’s perspective.

Cheers,

Caylan
___

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

NSOutlineView subclass not firing data source drag and drop methods

2013-10-29 Thread Michael LaMorte
I'm using the excellent NSOutlineView subclass PXSourceList in one of my 
applications. I'm trying to implement drag and drop to my PXSourceList 
instance. I have:
connected both delegate and data source outlets in IB to my controller
in awakeFromNib in the controller, set self as the delegate and data source
in awakeFromNib in the controller, registered for dragged types
in the controller, implemented the requisite writeItems: validateDrop: 
acceptDrop: and namesOfPromisedFilesDroppedAtDestination: methods and declared 
them in the controller's .h file
For some reason, the drag and drop methods implemented in (4) are not firing at 
all. I've tried:
Placing log statements in the drag and drop data source methods - they never 
get called.
Putting a log statement in one of the other data source method that logs the 
registeredDraggedTypes of the PXSourceList instance - it always returns the 
proper drag types assigned in awakeFromNib.
Taking the PXSourceList view instance and unembedding it from all containing 
views except the NSWindow instance - no luck there either.
Copy-pasting data source code from my application to the sample app that comes 
with PXSourceList - it all works without modification.
Copy-pasting the working code from the example application into the SK source - 
it doesn't work.

So essentially I'm in a spot where all data source methods get called except 
the drag-and-drop methods. It's behaving like I haven't registered for dragged 
types, but 1) I know I have and 2) the instance responds that it is registered 
for the dragged types that I set.

Any ideas?

---
Michael A. LaMorte
Mac Developer
Minder Softworks

___

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

NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Sean Todd
According to the Framework release notes and WWDC 2013 videos, -[NSBundle 
localizedStringForKey:value:table:] is supposed to query a .stringsdict file 
for a key before looking in a .strings file. However, I find that a 
.stringsdict file is never used. I have created a property list file with the 
.stringsdict extension containing the appropriate keys/values as shown in the 
release notes and placed it into the appropriate lproj directory. Base SDK and 
deployment target are both set at 10.9. In code, I am making calls such as 
[NSString localizedStringWithFormat:NSLocalizedStringFromTable(@"%d Brick 
Categories", @"ListWindows", @"Pluralized form of BrickCategory entity key"), 
[theCategories count]]. When I run the app, I find that the localized values 
are never obtained from the .stringsdict file. It finds the key in a .strings 
file if present or fails and just returns the key if it is not present in the 
.strings file.

Is there some critical piece of the puzzle needed to get this work that was not 
mentioned in the videos or the release notes? Or is this functionality just 
missing in the initial release of 10.9?

Xcode Version 5.0.1 (5A2053)
OS X 10.9 (13A603)

Thanks,
Sean
___

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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Kyle Sluder
> On Oct 29, 2013, at 8:59 AM, Sean Todd  wrote:

> 
> According to the Framework release notes and WWDC 2013 videos, -[NSBundle 
> localizedStringForKey:value:table:] is supposed to query a .stringsdict file 
> for a key before looking in a .strings file. However, I find that a 
> .stringsdict file is never used. I have created a property list file with the 
> .stringsdict extension containing the appropriate keys/values as shown in the 
> release notes and placed it into the appropriate lproj directory.

I haven’t tried the functionality out yet myself, but when you say “created a 
property list file,” do you mean an actual XML property list? I would be 
surprised if that worked. The example stringsdict uses a syntax not dissimilar 
from the typical ASCII-plist-esque strings file.

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

Insane Spaces

2013-10-29 Thread Gordon Apple
Having a few issues here with the new screens/spaces feature.  I use second
monitor as presentation screen and do video capture from there.  All the
Mission Control prefs are checked, except for dashboard as a space.  I use
two spaces on main screen.

First, the terminology is confusing.  Mission Control calls spaces
³Desktops².
Second, I need a way to hide the menu on second screen. (Have seen a couple
of suggestions, but haven¹t tried any yet.)
Third, if I put the presentation window on the second screen, then click on
an application window, e.g., my capture controls, then click back on the
presentation screen, if I want to switch  presentation window types, my
related main screen menubar items do not validate, but the same items in the
second screen menubar do.   Bug?

___

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: Insane Spaces

2013-10-29 Thread Lee Ann Rucker
Try my devforum suggestion. From 10.6 to now, I have done everything possible 
to presentationOptions for Fusion's multi-monitor fullscreen, and having 
everything be a "real" fullscreen window works a lot better than faking it with 
the old "kiosk mode" tricks.

And there are still known bugs in 10.9, especially with trying to change 
presentationOptions on the fly. Best to set things up so Cocoa does all the 
work.

- Original Message -
From: "Gordon Apple" 
To: "cocoa-dev@lists.apple.com Dev" 
Cc: "Douglas Ward" 
Sent: Tuesday, October 29, 2013 10:21:06 AM
Subject: Insane Spaces

Having a few issues here with the new screens/spaces feature.  I use second
monitor as presentation screen and do video capture from there.  All the
Mission Control prefs are checked, except for dashboard as a space.  I use
two spaces on main screen.

First, the terminology is confusing.  Mission Control calls spaces
³Desktops².
Second, I need a way to hide the menu on second screen. (Have seen a couple
of suggestions, but haven¹t tried any yet.)
Third, if I put the presentation window on the second screen, then click on
an application window, e.g., my capture controls, then click back on the
presentation screen, if I want to switch  presentation window types, my
related main screen menubar items do not validate, but the same items in the
second screen menubar do.   Bug?

___

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

2013-10-29 Thread jonat...@mugginsoft.com

On 28 Oct 2013, at 20:35, jonat...@mugginsoft.com wrote:

> On 28 Oct 2013, at 17:52, Gerd Knops  wrote:
> 
>> In Interface Builder text fields you can use "Value with Pattern" to combine 
>> multiple properties into a single output. Alternatively in code you can do 
>> something like this:
>> 
>> Gerd
>> 
> 
> Thanks Gerd
> 
> Value with Pattern works as advertised for NSTextField.
> Unfortunately I am binding to an NSPopupButton which lacks this binding.
> 
> XAML bindings, though similar in nature to Cocoa bindings, are somewhat more 
> flexible I think.
> The following illustrates more or less what I need to emulate.
> 
> The converter (eqv to the value transformer) operates on self.name and 
> PeriodTypeComboBox.SelectedItem.Name
> 
> 
>   
>   
>   Based on a
>   
>   
>Converter="{StaticResource StringReplaceConverter}" 
> ConverterParameter="Period">
>   
>ElementName="PeriodTypeComboBox" Path="SelectedItem.Name" />
>   
>   
>   
>   
>   
> 
> 
My solution to providing some sort of emulation of the above behaviour is:

1. Define a NSObject category property bindingDelegate implemented as an 
associated object. All objects that want to make use of delegate based binding 
must have this defined.
eg: [myArray makeObjectsPerformSelector:@selector(setBindingDelegate:) 
withObject:self]
myArray supplies content to myArrayController.

2. Use a custom binding key path, bind=. To bind to -name via the delegate the 
binding key path is bind=name. 
   I could have used bind@name but I thought it would start to get confused 
with the existing usage of @ in bindings.

3. Define a category based override of - (id)valueForUndefinedKey:
The override looks for the delegate prefix and if found calls the delegate 
method - (id)boundObject:(id)boundObject valueForUndefinedKey:(NSString *)key 
options:(NSDictionary *)options;
The delegate can construct the binding value with arbitrary complexity.

Usage is simple:

1. Set the bindingDelegates on myArray (objects of type MyBoundData) as shown 
above.
2. Set the NSPopupButton ContentValues binding to 
myArrayController.arrangedObjects.bind=name
3. Implement the binding delegate method:

- (id)boundObject:(id)boundObject valueForUndefinedKey:(NSString *)key 
options:(NSDictionary *)options
{
id value = nil;
Class boundClass = [boundObject class];

if (boundClass == [MyBoundData class]) {

// bound with bind=name
if ([key isEqualToString:@"name"]) {
NSString *stringValue = [NSString stringWithFormat:@"Based on a 
%@", [boundObject valueForKey:key]];// transform the value
NSString *periodType = 
self.periodTypePopupButton.titleOfSelectedItem;  // Modify based on another 
control
value = [stringValue 
stringByReplacingOccurrencesOfString:@"Periodly" withString:periodType];
}
}

Note that the bind=name syntax could be extend to bind{key:value}=name to allow 
for passing additional options to the binding delegate.

Jonathan

/*==
NSObject+BindingSupportDelegate.h
==*/

@protocol BPBindingSupportDelegate 
@required

/*!
 
 Delegate returns a computed value for the bound object key path.
 
 */
- (id)boundObject:(id)boundObject valueForUndefinedKey:(NSString *)key 
options:(NSDictionary *)options;
@end


@interface NSObject (BindingSupportDelegate)

- (id)extValueForKey:(NSString *)key withTransformerForName:(NSString 
*)transformerName;

/*!
 
 A delegate object dedicated to provide binding support
 
 */
@property (nonatomic, retain) id  bindingDelegate;

@end

/*==
NSObject+BindingSupportDelegate.m
==*/

// The minimal form acceptable form. A  more general form could be 
bind{key:value,...}=
NSString *BindingSupportDelegatePrefix = @"bind=";

@implementation NSObject (BrightPay)

#pragma mark -
#pragma mark Binding delegate

- (void)setBindingDelegate:(id)object
{
objc_setAssociatedObject(self, @selector(bindingDelegate), object, 
OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (id)bindingDelegate {
return objc_getAssociatedObject(self, @selector(bindingDelegate));
}

#pragma mark -
#pragma mark KVC key handling

- (id)valueForUndefinedKey:(NSString *)key
{
id value = nil;

// Look for delegate binding prefix
NSRange prefixRange = [key rangeOfString:BindingSupportDelegatePrefix];
if (prefixRange.location == 0 && [key length] > prefixRange.length && 
self.bindingDelegate) {

NSString *targetKey = [key substringFromIndex:prefixRange.length];
value = [self.bindingDelegate boundObject:self 
valueForUndefi

Codesigning 3rd party framework

2013-10-29 Thread Graham Cox
Having just updated to Xcode 5.0.1, I can’t build one of our apps because it 
uses the Sparkle framework, which isn’t codesigned. Previously this wasn’t an 
issue but it seems Xcode is being a bit stricter than before.

Is there a way I can codesign this module using my own credentials? I have 
little experience of dealing with these issues, most of the time I just hope it 
works and it does, but now it doesn’t I’m in a very tight spot.  - I can’t 
easily downgrade to the older Xcode and I need this app built by tomorrow!

—Graham



___

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: Codesigning 3rd party framework

2013-10-29 Thread Sean McBride
On Tue, 29 Oct 2013 22:30:47 +0100, Graham Cox said:

>Having just updated to Xcode 5.0.1, I can’t build one of our apps
>because it uses the Sparkle framework, which isn’t codesigned.
>Previously this wasn’t an issue but it seems Xcode is being a bit
>stricter than before.
>
>Is there a way I can codesign this module using my own credentials? I
>have little experience of dealing with these issues, most of the time I
>just hope it works and it does, but now it doesn’t I’m in a very tight
>spot.  - I can’t easily downgrade to the older Xcode and I need this app
>built by tomorrow!

You can sign anything, ex:

codesign --sign "Developer ID Application: Rogue Research Inc." 
/path/to/Sparkle.framework/Versions/A

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada

___

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: Codesigning 3rd party framework

2013-10-29 Thread Shazron
See http://furbo.org/2013/10/17/code-signing-and-mavericks/ he specifically
deals with your Sparkle.framework problem


On Tue, Oct 29, 2013 at 5:30 PM, Graham Cox  wrote:

> Having just updated to Xcode 5.0.1, I can’t build one of our apps because
> it uses the Sparkle framework, which isn’t codesigned. Previously this
> wasn’t an issue but it seems Xcode is being a bit stricter than before.
>
> Is there a way I can codesign this module using my own credentials? I have
> little experience of dealing with these issues, most of the time I just
> hope it works and it does, but now it doesn’t I’m in a very tight spot.  -
> I can’t easily downgrade to the older Xcode and I need this app built by
> tomorrow!
>
> —Graham
>
>
>
> ___
>
> 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/shazron%40gmail.com
>
> This email sent to shaz...@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: Codesigning 3rd party framework

2013-10-29 Thread Graham Cox

On 29 Oct 2013, at 10:37 pm, Shazron  wrote:

> See http://furbo.org/2013/10/17/code-signing-and-mavericks/ he specifically 
> deals with your Sparkle.framework problem


Brilliant

You have saved my life (this week at any rate).

—Graham



___

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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Sean Todd
I used the Property List resource template to generate a new property list file 
and then changed the extension from .plist to .stringsdict.
I have also tried changing the file type in Xcode. Nothing has worked for me. 
There is no mention of any special way to create this type of  file. There is 
just an example of its content in the release notes:


http://www.apple.com/DTDs/PropertyList-1.0.dtd";>


...



This is what I have been using.

On Oct 29, 2013, at 11:39 AM, Kyle Sluder  wrote:

>> On Oct 29, 2013, at 8:59 AM, Sean Todd  wrote:
> 
>> 
>> According to the Framework release notes and WWDC 2013 videos, -[NSBundle 
>> localizedStringForKey:value:table:] is supposed to query a .stringsdict file 
>> for a key before looking in a .strings file. However, I find that a 
>> .stringsdict file is never used. I have created a property list file with 
>> the .stringsdict extension containing the appropriate keys/values as shown 
>> in the release notes and placed it into the appropriate lproj directory.
> 
> I haven’t tried the functionality out yet myself, but when you say “created a 
> property list file,” do you mean an actual XML property list? I would be 
> surprised if that worked. The example stringsdict uses a syntax not 
> dissimilar from the typical ASCII-plist-esque strings file.
> 
> --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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Kyle Sluder
On Tue, Oct 29, 2013, at 02:45 PM, Sean Todd wrote:
> I used the Property List resource template to generate a new property
> list file and then changed the extension from .plist to .stringsdict.
> I have also tried changing the file type in Xcode. Nothing has worked for
> me. There is no mention of any special way to create this type of  file.
> There is just an example of its content in the release notes:

I'm sorry, I didn't scroll down the page enough. All the previous
examples are given in ASCII-plist-style format.

Can you please share your strings and stringsdict files? It looks like
in order to get this to work, the localized value in the strings file
must use the new extended format specifier syntax. So your strings file
needs a line like: 

/* ListWindows.strings */
"%d Brick Categories" = "%#@brick_categories@"

/* ListWindows.stringsdict */

  brick_categories
  
NSStringFormatSpecTypeKey
NSStringPluralRuleType
NSStringFormatValueTypeKey
d
zero
No
one
One Brick Category
other
%d Brick Categories
  


--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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Sean Todd
These are my entries in the 2 files:

ListWindows.stringsdict:


http://www.apple.com/DTDs/PropertyList-1.0.dtd";>


%d Brick Categories

NSStringLocalizedFormatKey
Brick %#@num_categories@
num_categories

NSStringFormatSpecTypeKey
NSStringPluralRuleType
NSStringFormatValueTypeKey
d
zero
Categories
one
Category
other
Categories





ListWindows.strings:
"%d Brick Categories” = "%d Brick Categories”;


On Oct 29, 2013, at 5:15 PM, Kyle Sluder  wrote:

> On Tue, Oct 29, 2013, at 02:45 PM, Sean Todd wrote:
>> I used the Property List resource template to generate a new property
>> list file and then changed the extension from .plist to .stringsdict.
>> I have also tried changing the file type in Xcode. Nothing has worked for
>> me. There is no mention of any special way to create this type of  file.
>> There is just an example of its content in the release notes:
> 
> I'm sorry, I didn't scroll down the page enough. All the previous
> examples are given in ASCII-plist-style format.
> 
> Can you please share your strings and stringsdict files? It looks like
> in order to get this to work, the localized value in the strings file
> must use the new extended format specifier syntax. So your strings file
> needs a line like: 
> 
> /* ListWindows.strings */
> "%d Brick Categories" = "%#@brick_categories@"
> 
> /* ListWindows.stringsdict */
> 
>  brick_categories
>  
>NSStringFormatSpecTypeKey
>NSStringPluralRuleType
>NSStringFormatValueTypeKey
>d
>zero
>No
>one
>One Brick Category
>other
>%d Brick Categories
>  
> 
> 
> --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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Kyle Sluder
On Tue, Oct 29, 2013, at 03:31 PM, Sean Todd wrote:
> ListWindows.strings:
> "%d Brick Categories” = "%d Brick Categories”;

Okay, so it looks like you're not using the extended format specifier
syntax that the release notes imply are required.

Make your strings files look like mine and verify whether it works.

--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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Kyle Sluder
On Tue, Oct 29, 2013, at 03:56 PM, Kyle Sluder wrote:
> On Tue, Oct 29, 2013, at 03:31 PM, Sean Todd wrote:
> > ListWindows.strings:
> > "%d Brick Categories” = "%d Brick Categories”;
> 
> Okay, so it looks like you're not using the extended format specifier
> syntax that the release notes imply are required.
> 
> Make your strings files look like mine and verify whether it works.

Hmm. I'm rereading the release notes and having a hard time mapping the
examples to the description of the feature. I've gotta figure out how
this works anyway, so I'm gonna try to build a test app myself.

--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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Kyle Sluder
On Tue, Oct 29, 2013, at 04:05 PM, Kyle Sluder wrote:
> Hmm. I'm rereading the release notes and having a hard time mapping the
> examples to the description of the feature. I've gotta figure out how
> this works anyway, so I'm gonna try to build a test app myself.

Whew. I've got a sample project working:
https://github.com/kylesluder/StringDictTest

Looks like you need an entry in the strings file _as well as_ an entry
in the stringsdict. If you don't provide one, it silently fails to
localize:
https://github.com/kylesluder/StringDictTest/commit/c947b929389b08696ad3d3bdbeae7b8a2bd2f4e1

If you try to be brief by referencing the stringsdict configuration
directly within the strings file, it crashes:
https://github.com/kylesluder/StringDictTest/commit/964eb74d7c536a45172722bbdad027c0920fb020

Hope that helps. This is all awfully verbose and confusing.

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

Pixel perfect drawing on magnified view

2013-10-29 Thread Kenneth Baxter

Hi, I have an NSScrollView and use the magnification property to zoom into my 
view. It's all layer backed and I'm redrawing on setNeedsDisplay: 

I think that it draws in to the layer at 100% scale and then applies a 
transform to the layer, which leaves it looking blurry at large scale values 
etc. I would like to be able to use the smooth magnification and then trigger a 
redraw which draws pixel perfect for the new scale factor when the 
magnification ends. Is this possible in the current scenario? Or will I need to 
take the magnification factor from the scroll view and resize the view to the 
new number of pixels (old size * magnification) and reset the magnification on 
the scroll view to 1.0? Or is there some other way of handling this?

Thanks

Ken


___

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: NSBundle using .stringsdict files MIA in 10.9?

2013-10-29 Thread Sean Todd
I modified my stringsdict file by adding the 2 plurality forms which I had not 
used previously: few and many. With this change I now see the expected outcome. 
OK--so I removed the 2 new key/value pairs so that the file was returned to its 
state when it was not working and re-checked. Behold, it is working correctly. 
I don’t know why it was not working before but it is working now. Something 
seems fragile here. Anyway, thanks for the assistance.

Sean Todd

On Oct 29, 2013, at 6:40 PM, Kyle Sluder  wrote:

> On Tue, Oct 29, 2013, at 04:05 PM, Kyle Sluder wrote:
>> Hmm. I'm rereading the release notes and having a hard time mapping the
>> examples to the description of the feature. I've gotta figure out how
>> this works anyway, so I'm gonna try to build a test app myself.
> 
> Whew. I've got a sample project working:
> https://github.com/kylesluder/StringDictTest
> 
> Looks like you need an entry in the strings file _as well as_ an entry
> in the stringsdict. If you don't provide one, it silently fails to
> localize:
> https://github.com/kylesluder/StringDictTest/commit/c947b929389b08696ad3d3bdbeae7b8a2bd2f4e1
> 
> If you try to be brief by referencing the stringsdict configuration
> directly within the strings file, it crashes:
> https://github.com/kylesluder/StringDictTest/commit/964eb74d7c536a45172722bbdad027c0920fb020
> 
> Hope that helps. This is all awfully verbose and confusing.
> 
> --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