Re: what should I understand from kAudioQueueProperty_CurrentLevelMeterDB

2011-05-08 Thread Graham Cox

On 08/05/2011, at 8:28 PM, Niran Bala wrote:

> How should I interpret this value?
> 
> When I mute the Mic on my laptop, this value is -120


My GUESS (only) would be that this is the line level, which is logical, since 
it couldn't possibly be actual sound pressure level, since the signal is 
amplified through some unknown amplifier and speaker system before becoming 
sound.

Decibels are only a relative measurement, there's not really any such thing as 
a "decibel" as a physical quantity. You can express a relative measurement in 
terms of decibels, or you can qualify the level against some reference standard 
in decibels, for example 1dBm is 1mW of power, and the ear-splitting 120dB SPL 
is referenced to a pressure of 20 micropascals rms.

You need to find in the documentation or ask what 0dB is considered to be in 
this measurement system.

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


what should I understand from kAudioQueueProperty_CurrentLevelMeterDB

2011-05-08 Thread Niran Bala
Hi,

I am trying to measure dB levels of my voice.

I use the following code.

UInt32 propertySize = format.mChannelsPerFrame * sizeof 
(AudioQueueLevelMeterState);
AudioQueueGetProperty(
  queue,
  
(AudioQueuePropertyID)kAudioQueueProperty_CurrentLevelMeterDB,
  levels,
  &propertySize); 

The peakpower levels[0].mPeakpower is always negative, and the max value when I 
shout at the mic is 0.0

How should I interpret this value?

When I mute the Mic on my laptop, this value is -120

When I read many posts, they say I have to add the abs(-120) to the peakpower 
to get a positive value. 

but my voice's decibel can not be 120, as this would cause eardrum rapture?

I am trying to do a Decibel Meter.

please help.

Thanks
Niran
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: superview

2011-05-08 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 5/8/11 5:37 PM, Kyle Sluder wrote:
> On Sun, May 8, 2011 at 5:08 PM, Nelson Hazeltine  wrote:
>> Since the value of superview is the next responder (the receiver, most often 
>> a view controller in iPhone applications)
> 
> Where did you get this idea? See the documentation for -[UIResponder
> nextResponder]:
> http://developer.apple.com/library/ios/documentation/uikit/reference/UIResponder_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006783-CH4-SW12

It seems likely the the OP generalized from Figure 1-1 at
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/EventsiPhoneOS/EventsiPhoneOS.html#//apple_ref/doc/uid/TP40009541-CH2-SW5
(or a similar diagram) and erroneously concluded that superview and
nextResponder are synonymous.

To answer the question I _think_ the OP is asking:

UIView descends from UIResponder, not the other way around.

Since a superview is always going to be a UIView, -superview returns
UIView*, not the more general UIResponder*.

Any superview can of course then, in principle, serve as nextResponder.
 But this is going to depend on how you linked up the responder chain,
what is getting returned from -canBecomeFirstResponder, etc.  _By
default_ the superview is also nextResponder, but this can be changed,
and often is.  Quoting from the UIResponder docs for -nextResponder:
"UIView implements this method by returning the UIViewController object
that manages it (if it has one) or its superview (if it doesn?t)."

On iOS the responder chain seems a little more locked down than on OS X
since the former does not implement (publicly) the -setNextResponder
method that is present in NSResponder.  However, as noted in the
UIResponder documentation, you certainly can override -nextResponder
("Subclasses must override this method to set the next responder") to
insert objects into the responder chain yourself if needed.


- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFNxz6vaOlrz5+0JdURAvRtAJ0S1oFE7lfk5qdA06kC/MV1yBr4iQCeLUwC
aGavRlvCpVwt0Yeki64W4Z4=
=yO/j
-END PGP SIGNATURE-
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: superview

2011-05-08 Thread Kyle Sluder
On Sun, May 8, 2011 at 5:08 PM, Nelson Hazeltine  wrote:
> Since the value of superview is the next responder (the receiver, most often 
> a view controller in iPhone applications)

Where did you get this idea? See the documentation for -[UIResponder
nextResponder]:
http://developer.apple.com/library/ios/documentation/uikit/reference/UIResponder_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006783-CH4-SW12

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


superview

2011-05-08 Thread Nelson Hazeltine
Since the value of superview is the next responder (the receiver, most often a 
view controller in iPhone applications), how is it that the type for superview 
is UIView?  Isn't this inconsistent?


NH


___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Communicate Between CocoaAsyncSocket and Java Socket

2011-05-08 Thread Greg Guerin

Bing Li wrote:


I believe TCP can be used between Java and iOS. However, I worry that
particular serialization exists in CocoaAsyncSocket so that Java  
cannot

deserialize successfully. Do you think the issue exists?



No.  If there is an issue, it's almost certainly in your code.

First, I have used CocoaAsyncSocket to communicate with Java sockets,  
and had no problems.  I have sent and received binary data, lines of  
text, JSON data, and XML data.  It all worked fine.


Second, CocoaAsyncSocket doesn't have any "particular  
serialization".  It's just a socket, and it works with bytes in  
NSData.  There is no other serialization, other than the in-memory  
layout of multibyte data structures you pass to and from NSData.  If  
you don't know exactly what the in-memory structure of the NSData  
bytes is, then you don't really know what you're sending or receiving.


If your Java code needs a particular serialization, then that's  
because your Java code is written a particular way.  The  
CocoaAsyncSocket must serialize data the same way.  If you change the  
Java code to produce or expect some other serialization format, then  
your CocoaAsyncSocket code must match it.


You will need to define the order of bytes in your protocol, by which  
I mean the order of bytes in the messages or streams exchanged  
between the two sides.  If you don't define the order of bytes, then  
there is no clearly defined common ground between the two sides.


  -- GG

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Set the Display link's framerate?

2011-05-08 Thread Thomas Davie

On 8 May 2011, at 20:20, Nick wrote:

> Hi
> Is there any way to customize the frequency of the Core Video Display
> Link's callback calls?
> If not, what is the way to manually limit the "framerate"?

The entire point of a CVDisplayLink is that it's tied to the refresh timing of 
the display.  If you want to drop a frame, don't swap.

Bob

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Set the Display link's framerate?

2011-05-08 Thread Nick
Hi
Is there any way to customize the frequency of the Core Video Display
Link's callback calls?
If not, what is the way to manually limit the "framerate"?
Thank you
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSTextView and NSTextContainer size & clipping area

2011-05-08 Thread Дмитрий Николаев
I will try this solution too. Thanks for suggesting.

08.05.2011, в 21:33, Kyle Sluder написал(а):

> On May 8, 2011, at 3:27 AM, Дмитрий Николаев  wrote:
> 
>> Custom textview resize policy set, so it resizes in all dimensions with 
>> container. This is code for custom NSTextView
>> 
>> -
>> - (void) setFrameSize:(NSSize)newSize {
>> 
>>  [super setFrameSize:newSize];
>> 
>>  NSTextContainer *container = [self textContainer];
>>  newSize.width -= 200;
>>  [container setContainerSize:newSize];
>> }
> 
> Unrelated, by why aren't you just using -[NSTextView setTextContainerInset:] 
> and letting the default width-tracking code do the work for you?
> 
> --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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSTextView and NSTextContainer size & clipping area

2011-05-08 Thread Дмитрий Николаев
It works now. Thank you very much for help!

08.05.2011, в 20:27, Ross Carter написал(а):

> Try wrapping the call to super like this:
> 
> [NSGraphicsContext saveGraphicsState];
> [super drawRect:rect];
> [NSGraphicsContext restoreGraphicsState];
> 
>   
> On May 8, 2011, at 6:27 AM, Дмитрий Николаев wrote:
> 
>> Code in Custom NSTextView - (void) drawRect:
>> 
>> --
>> [super drawRect:dirtyRect];
>> 
>> NSBezierPath* aPath = [NSBezierPath bezierPath];
>> [aPath moveToPoint:NSMakePoint(100, 100)];
>> [aPath lineToPoint:NSMakePoint(500, 100)];
>> [aPath stroke];
>> ---
>> 
>> Custom textview resize policy set, so it resizes in all dimensions with 
>> container. This is code for custom NSTextView
>> 
>> -
>> - (void) setFrameSize:(NSSize)newSize {
>> 
>>  [super setFrameSize:newSize];
>> 
>>  NSTextContainer *container = [self textContainer];
>>  newSize.width -= 200;
>>  [container setContainerSize:newSize];
>> }
>> 
>> 
>> 08.05.2011, в 5:53, Ross Carter написал(а):
>> 
>>> We need to see your code. In general, any drawing code after the call to 
>>> super in the textView's drawRect method will draw. But maybe you are trying 
>>> to do something different.
>>> 
>>> 
>>> On May 7, 2011, at 3:13 AM, Дмитрий Николаев wrote:
>>> 
 But when i try draw a line in NSTextView, it limited to frame of text 
 container too.
 
 06.05.2011, в 22:56, Ross Carter написал(а):
 
> On May 6, 2011, at 2:40 AM, Дмитрий Николаев wrote:
> 
>> If there are any possibility to draw inside text view but outside of 
>> text container ?
> 
> It depends on who is doing the drawing. NSTextView is an NSView subclass 
> and you can override drawRect: just like any NSView. The Cocoa text 
> system, however, draws inside the area specified by a NSTextContainer.
 
 
>>> 
>> 
> 

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSTextView and NSTextContainer size & clipping area

2011-05-08 Thread Kyle Sluder
On May 8, 2011, at 3:27 AM, Дмитрий Николаев  wrote:

> Custom textview resize policy set, so it resizes in all dimensions with 
> container. This is code for custom NSTextView
> 
> -
> - (void) setFrameSize:(NSSize)newSize {
> 
>   [super setFrameSize:newSize];
> 
>   NSTextContainer *container = [self textContainer];
>   newSize.width -= 200;
>   [container setContainerSize:newSize];
> }

Unrelated, by why aren't you just using -[NSTextView setTextContainerInset:] 
and letting the default width-tracking code do the work for you?

--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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSTextView and NSTextContainer size & clipping area

2011-05-08 Thread Ross Carter
Try wrapping the call to super like this:

[NSGraphicsContext saveGraphicsState];
[super drawRect:rect];
[NSGraphicsContext restoreGraphicsState];


On May 8, 2011, at 6:27 AM, Дмитрий Николаев wrote:

> Code in Custom NSTextView - (void) drawRect:
> 
> --
> [super drawRect:dirtyRect];
> 
> NSBezierPath* aPath = [NSBezierPath bezierPath];
> [aPath moveToPoint:NSMakePoint(100, 100)];
> [aPath lineToPoint:NSMakePoint(500, 100)];
> [aPath stroke];
> ---
> 
> Custom textview resize policy set, so it resizes in all dimensions with 
> container. This is code for custom NSTextView
> 
> -
> - (void) setFrameSize:(NSSize)newSize {
> 
>   [super setFrameSize:newSize];
> 
>   NSTextContainer *container = [self textContainer];
>   newSize.width -= 200;
>   [container setContainerSize:newSize];
> }
> 
> 
> 08.05.2011, в 5:53, Ross Carter написал(а):
> 
>> We need to see your code. In general, any drawing code after the call to 
>> super in the textView's drawRect method will draw. But maybe you are trying 
>> to do something different.
>> 
>> 
>> On May 7, 2011, at 3:13 AM, Дмитрий Николаев wrote:
>> 
>>> But when i try draw a line in NSTextView, it limited to frame of text 
>>> container too.
>>> 
>>> 06.05.2011, в 22:56, Ross Carter написал(а):
>>> 
 On May 6, 2011, at 2:40 AM, Дмитрий Николаев wrote:
 
> If there are any possibility to draw inside text view but outside of text 
> container ?
 
 It depends on who is doing the drawing. NSTextView is an NSView subclass 
 and you can override drawRect: just like any NSView. The Cocoa text 
 system, however, draws inside the area specified by a NSTextContainer.
>>> 
>>> 
>> 
> 

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Documentation generation

2011-05-08 Thread Thomas Davie
Excellent stuff thanks – hit a few bugs in it, but with some tweaking, its 
output looks absolutely brilliant.

Cheers

Tom Davie

On 8 May 2011, at 14:11, Dave DeLong wrote:

> AppleDoc produces Apple-like docsets:
> 
> https://github.com/tomaz/appledoc
> 
> Cheers,
> 
> Dave
> 
> Sent from my iPhone
> 
> On May 8, 2011, at 4:42 AM, Thomas Davie  wrote:
> 
>> Heya,
>> 
>> I'm working on improving my CoreParse 
>> (http://www.github.com/beelsebob/CoreParse) framework by actually 
>> documenting it properly.  The problem I'm hitting though is that either the 
>> two major documentation generators suck (doubt that, probably PEBKAC), or 
>> their default configuration sucks.  I've had a go with both doxygen and 
>> headerdoc.
>> 
>> Headerdoc seems to produce some reasonably clear and well organised output, 
>> but I can't find any way to configure the output to be a bit prettier.
>> 
>> Doxygen seems to produce a pretty cluttered mess as output, with a bunch of 
>> stuff that I really don't want, but I've not found any good documentation on 
>> how to configure it to produce nicer output.  The GUI tool seems to be a 
>> perfect example of how not to design a GUI wrapper for a command line tool.  
>> Perhaps the design skills involved in it hint at why I don't like the 
>> structure of it's output either.
>> 
>> Does anyone know a good way to get clean, reasonably configurable html 
>> output for objective-c documentation?  Ideally, I'd like something that just 
>> dumps out almost exactly the style apple use for their docs, without too 
>> much need to play about.
>> 
>> Thanks
>> 
>> Tom Davie___
>> 
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com
>> 
>> This email sent to davedel...@me.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Documentation generation

2011-05-08 Thread Dave DeLong
AppleDoc produces Apple-like docsets:

https://github.com/tomaz/appledoc

Cheers,

Dave

Sent from my iPhone

On May 8, 2011, at 4:42 AM, Thomas Davie  wrote:

> Heya,
> 
> I'm working on improving my CoreParse 
> (http://www.github.com/beelsebob/CoreParse) framework by actually documenting 
> it properly.  The problem I'm hitting though is that either the two major 
> documentation generators suck (doubt that, probably PEBKAC), or their default 
> configuration sucks.  I've had a go with both doxygen and headerdoc.
> 
> Headerdoc seems to produce some reasonably clear and well organised output, 
> but I can't find any way to configure the output to be a bit prettier.
> 
> Doxygen seems to produce a pretty cluttered mess as output, with a bunch of 
> stuff that I really don't want, but I've not found any good documentation on 
> how to configure it to produce nicer output.  The GUI tool seems to be a 
> perfect example of how not to design a GUI wrapper for a command line tool.  
> Perhaps the design skills involved in it hint at why I don't like the 
> structure of it's output either.
> 
> Does anyone know a good way to get clean, reasonably configurable html output 
> for objective-c documentation?  Ideally, I'd like something that just dumps 
> out almost exactly the style apple use for their docs, without too much need 
> to play about.
> 
> Thanks
> 
> Tom Davie___
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com
> 
> This email sent to davedel...@me.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Communicate Between CocoaAsyncSocket and Java Socket

2011-05-08 Thread Bing Li
Dear Chris,

Thanks so much for your reply!

I believe TCP can be used between Java and iOS. However, I worry that
particular serialization exists in CocoaAsyncSocket so that Java cannot
deserialize successfully. Do you think the issue exists?

Best regards,
Bing

On Sun, May 8, 2011 at 6:40 AM, Chris Hanson  wrote:

> On May 7, 2011, at 1:50 PM, Bing Li wrote:
>
> > I attempt to use CocoaAsyncSocket to communicate with Java server/client.
> Is
> > it possible to achieve the goal?
>
> Yes, at least in the abstract; TCP is TCP.
>
> You don't need to use CocoaAsyncSocket if you don't want to - you can just
> use the BSD-level socket(2) API if you like.  Or you can use NSFileHandle or
> CFSocket.  Or any of a number of other wrappers.
>
>  -- 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Documentation generation

2011-05-08 Thread Thomas Davie
Heya,

I'm working on improving my CoreParse 
(http://www.github.com/beelsebob/CoreParse) framework by actually documenting 
it properly.  The problem I'm hitting though is that either the two major 
documentation generators suck (doubt that, probably PEBKAC), or their default 
configuration sucks.  I've had a go with both doxygen and headerdoc.

Headerdoc seems to produce some reasonably clear and well organised output, but 
I can't find any way to configure the output to be a bit prettier.

Doxygen seems to produce a pretty cluttered mess as output, with a bunch of 
stuff that I really don't want, but I've not found any good documentation on 
how to configure it to produce nicer output.  The GUI tool seems to be a 
perfect example of how not to design a GUI wrapper for a command line tool.  
Perhaps the design skills involved in it hint at why I don't like the structure 
of it's output either.

Does anyone know a good way to get clean, reasonably configurable html output 
for objective-c documentation?  Ideally, I'd like something that just dumps out 
almost exactly the style apple use for their docs, without too much need to 
play about.

Thanks

Tom Davie___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSTextView and NSTextContainer size & clipping area

2011-05-08 Thread Дмитрий Николаев
Code in Custom NSTextView - (void) drawRect:

--
[super drawRect:dirtyRect];

NSBezierPath* aPath = [NSBezierPath bezierPath];
[aPath moveToPoint:NSMakePoint(100, 100)];
[aPath lineToPoint:NSMakePoint(500, 100)];
[aPath stroke];
---

Custom textview resize policy set, so it resizes in all dimensions with 
container. This is code for custom NSTextView

-
- (void) setFrameSize:(NSSize)newSize {

   [super setFrameSize:newSize];

   NSTextContainer *container = [self textContainer];
   newSize.width -= 200;
   [container setContainerSize:newSize];
}


08.05.2011, в 5:53, Ross Carter написал(а):

> We need to see your code. In general, any drawing code after the call to 
> super in the textView's drawRect method will draw. But maybe you are trying 
> to do something different.
> 
> 
> On May 7, 2011, at 3:13 AM, Дмитрий Николаев wrote:
> 
>> But when i try draw a line in NSTextView, it limited to frame of text 
>> container too.
>> 
>> 06.05.2011, в 22:56, Ross Carter написал(а):
>> 
>>> On May 6, 2011, at 2:40 AM, Дмитрий Николаев wrote:
>>> 
 If there are any possibility to draw inside text view but outside of text 
 container ?
>>> 
>>> It depends on who is doing the drawing. NSTextView is an NSView subclass 
>>> and you can override drawRect: just like any NSView. The Cocoa text system, 
>>> however, draws inside the area specified by a NSTextContainer.
>> 
>> 
> 

___

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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