Re: -[NSWindow makeFirstResponder:] error when NSDrawer is involved

2017-03-25 Thread kata

> 2017/03/25 3:04、Bill Cheeseman  wrotes:
> 
> Has anybody else encountered this issue? Any suggestions?

  I got the same error message even the drawer is hidden.  I set my custom 
control as the first responder in a dialog window just after loading xib. I 
could not rid of this message, then redesign whole dialog without drawer, 
because SDK said drawer is deprecated.

Yoshiaki Katayanagi
http://www.jizoh.jp/english.html


___

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: Maximum image size ?

2016-09-22 Thread kata
  I don't know the definition but my experience.
JPEG accepts up to 65500 pixels width and height.  Core Graphics framework 
supports more than that of course, and also PNG accepts more. Some NSBezierPath 
methods will fail to draw around 8 and many methods fail over 12, then 
i support up to 65500 now.

Yoshiaki Katayanagi
http://www.jizoh.jp/english.html

> 2016/09/22 22:14、Gabriel Zachmann  wrote:
> 
> 
> What is the maximum size of a bitmap image I can render using the Core 
> Graphics framework and CALayer ?
> 
> So far, I had assumed it is the maximum texture size the graphics card can 
> handle, so I determined the limits via
>   glGetIntegerv( GL_MAX_TEXTURE_SIZE, _ );
> 
> But apparently , the limits are much higher.
> 
> How can I determine the limit, so that my app can filter out images over the 
> limit, so that it does not crash in such cases?
> 
> I have checked the documentation, in particular 
> CGImageSourceCreateImageAtIndex() et al., to no avail.
> 
> 
> 
> Best regards, 
> Gabriel.

___

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: Window position updates on demand?

2015-12-17 Thread kata
In my case, my window has no title bar and no frame, I do dragging window by 
myself.
In the NSView in the window

- (void)mouseDown:(NSEvent*)event {
self.mouse = [event locationInWindow];
}

- (void)mouseDragged:(NSEvent *)event {
NSPoint location = [NSEvent mouseLocation];
location.x -= self.mouse.x;
location.y -= self.mouse.y;
[[self window] setFrameOrigin:location];
[self setNeedsDisplay:YES];  // Do something here
}

 then I can do anything during dragging.

Yoshiaki Katayanagi
http://www.jizoh.jp/english.html

2015/12/18 9:32、Cem Karan  wrote:

> Hi all, I'm working on an application that has one primary window and 
> multiple support windows.  The support windows show auxiliary information for 
> what is in the primary window, but not off to the side; they are more like 
> color filters or X-ray glasses.  You slide them over the primary, and they 
> show their extra information.  To get an idea of what I'm talking about, 
> clone https://github.com/ckaran/glfw/tree/transparent_windows, (that's the 
> 'transparent_windows' branch) build it, and run the example that corresponds 
> to 
> https://github.com/ckaran/glfw/blob/transparent_windows/examples/filters.c.  
> You'll get 3 windows, red, green, and blue.  As you drag the blue window over 
> the red one, a triangle will be drawn on the blue window that is centered on 
> the red window.
> 
> All that works, but the problem is that I'm not getting window positions 
> quickly enough; as long as a window is being dragged, it won't send out a 
> notification about its position, which means all the windows get out of sync 
> with one another.  This is annoying.  I traced it down to the OS X code by 
> logging where the windows thought they were, so I know it really is Cocoa and 
> not GLFW.  I tried polling the position of the window, but that doesn't work 
> (the polling is happening, but it prints the same position continuously until 
> dragging stops).  So, how do I get the window to update where it actually, 
> truly is at the moment I ask it?
> 
> Thanks,
> Cem Karan

___

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: Beep ( duration, frequency )

2015-09-23 Thread kata
> Windows has a Beep function:
> 
> BOOL WINAPI Beep(
>  _In_ DWORD dwFreq,
>  _In_ DWORD dwDuration
> );
> 
> Is there anything this easy for OS X?

 If you want to use different sounds for some alerts or notifications, you can 
use sytem provided sounds, such as "Basso", "Frog", "Submarine", etc.

  NSSound *sound = [NSSound soundNamed:@"Submarine"];
  [sound play];

Yoshiaki Katayanagi
http://www.jizoh.jp/english.html


___

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

IKSaveOptions have trouble on Mavericks

2014-03-27 Thread kata
 Hi, all.

 When my program adds IKSaveOptionsAccessoryView to NSSavePanel, the accessory 
view occupies max height always and system prints error messages to console as 
follows.

 start 
2014/03/28 10:37:17.870 SimpleDEMViewer[24153]: Unable to simultaneously 
satisfy constraints:
(
NSLayoutConstraint:0x6080002936a0 'NSView-Encapsulated-Layout-Height' 
V:[IKSaveOptionsContainer:0x1002bd700(200)],
NSLayoutConstraint:0x6080002939c0 
V:[IKSaveOptionsContainer:0x1002bd700(112)]
)

Will attempt to recover by breaking constraint 
NSLayoutConstraint:0x6080002936a0 'NSView-Encapsulated-Layout-Height' 
V:[IKSaveOptionsContainer:0x1002bd700(200)]

Set the NSUserDefault 
NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have 
-[NSWindow visualizeConstraints:] automatically called when this happens.  
And/or, break on objc_exception_throw to catch this in the debugger.
 stop 

My code is as follows.

  id sp = [NSSavePanel savePanel];
  id so = [[IKSaveOptions alloc] initWithImageProperties:nil 
imageUTType:@public.jpeg];
  [so setDelegate:self];
  [so addSaveOptionsAccessoryViewToSavePanel:sp];
  [sp beginSheetModalForWindow:window completionHandler:...];

This issue happens only on Mavericks, not on older systems. My program does not 
take sandbox.
How to fix this issue? I sent a bug report last October but no response.  Bug 
report # is 15327760.

Yoshiaki Katayanagi
http://www.jizoh.jp/english.html


___

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