Hi all,
I have a custom subclass of NSCell which is used in a custom NSView (not a
control) to draw an array of icons. The cell has an editable text label. I can
set up and edit the label fine, but I'm having trouble cleaning up when the
edit has finished. What I'm left with is an empty white b
On Jun 26, 2010, at 2:27 AM, Graham Cox wrote:
> What is the correct way to tear down or remove the field editor when editing
> is complete?
The field editor is intimately connected to the window, so it's often the
window's responsibility to manage it. See the discussion of the -[NSWindow
end
On 26/06/2010, at 6:16 PM, Ken Thomases wrote:
> On Jun 26, 2010, at 2:27 AM, Graham Cox wrote:
>
>> What is the correct way to tear down or remove the field editor when editing
>> is complete?
>
> The field editor is intimately connected to the window, so it's often the
> window's responsibi
The final piece of the problem was that the hosting custom view was directly
calling -resetCursorRects, in violation of the documentation. Once I changed
this to the recommended -invalidateCursorRectsForView:, everything was
hunky-dory.
--Graham
On 26/06/2010, at 8:46 PM, Graham Cox wrote:
Hello,
The list search keeps timing out for me, and web searches are not finding
anything. I can see how to tell if an NSNumber was initialized with an int or
boolean (NSCFNumber vs. NSCFBoolean). However, I can't figure out how to
determine if the NSNumber was initialized with an int or float.
-[NSNumber objCType]
Compare that against @encode(float), @encode(int), etc.
Cheers,
Dave
On Jun 26, 2010, at 10:45 AM, Jaime Magiera wrote:
> Hello,
>
> The list search keeps timing out for me, and web searches are not finding
> anything. I can see how to tell if an NSNumber was initialized
On Jun 26, 2010, at 12:46 PM, Dave DeLong wrote:
> -[NSNumber objCType]
>
> Compare that against @encode(float), @encode(int), etc.
That did the trick. Thanks!
if((strcmp([aNumber objCType], @encode(int))) == 0) {
On Jun 26, 2010, at 9:45 AM, Jaime Magiera wrote:
> Hello,
>
> The list search keeps timing out for me, and web searches are not finding
> anything. I can see how to tell if an NSNumber was initialized with an int or
> boolean (NSCFNumber vs. NSCFBoolean). However, I can't figure out how to
>
On Jun 26, 2010, at 10:52, Kyle Sluder wrote:
> On Jun 26, 2010, at 9:45 AM, Jaime Magiera wrote:
>
>> Hello,
>>
>> The list search keeps timing out for me, and web searches are not finding
>> anything. I can see how to tell if an NSNumber was initialized with an int
>> or boolean (NSCFNumber
My current ad hoc work flow for toolbar icons which are geometric in
nature.
• Use "Inkscape".
• Use a small canvas size of 28 points wide x 22 points high.
• Try to make sure the ink is generally constrained with the
individual point boundaries.
• Save the "Inkscape" file as a pdf.
• Op
On 26 Jun 2010, at 19:51, Quincey Morris wrote:
> On Jun 26, 2010, at 10:52, Kyle Sluder wrote:
>
>> On Jun 26, 2010, at 9:45 AM, Jaime Magiera wrote:
>>
>>> Hello,
>>>
>>> The list search keeps timing out for me, and web searches are not finding
>>> anything. I can see how to tell if an NSN
Hello, List
I know that adding annotations to pdf is supported on Mac OS X,
PDFAnnotations, but i can not find out such object for iOS, after googling,
seems this functionality is supported on iPad now, but what about iPhone? Can
anyone give me a hint? Thanks in advance.
XiaoGang___
On Sat, Jun 26, 2010 at 12:45 PM, Jaime Magiera
wrote:
> Hello,
>
> The list search keeps timing out for me, and web searches are not finding
> anything. I can see how to tell if an NSNumber was initialized with an int or
> boolean (NSCFNumber vs. NSCFBoolean). However, I can't figure out how to
I create my icons as vector graphics without worrying *at all* about pixel
boundaries and then scale them to fit at display time. Life improved markedly
when I went this route. Although they might not be as sharp as 'pixel-perfect'
bitmapped images it means I don't have to worry too much about
Hi all,
I'm having difficulties with the undo/redo mechanism and my Core Data objects.
The problem is that I create a CoreData object (say a rectangle), then set some
of its attributes according to some controls values (the position and size of a
CALayer the user has just created in a view). Th
The two sizes of the icons when displayed as "normal" and "small" are 32x32 and
24x24. While the recommended way of handling this is to create a multi-image
file as has been described previously, or to use a PDF, I find drawbacks in
both approaches
- multi-image files are normally just the two s
The docs say: "There are two further restrictions on __block variables: they
cannot be variable length arrays, and cannot be structures that contain C99
variable-length arrays."
This would seem to imply that a __block variable *can* be a *fixed* length
array. But when I try to write into such an a
On 2010 Jun 26, at 16:01, Guillaume Laurent wrote:
> I'm having difficulties with the undo/redo mechanism and my Core Data objects.
Uh-huh.
> The problem is that I create a CoreData object (say a rectangle), then set
> some of its attributes according to some controls values (the position and
On Jun 26, 2010, at 6:38 PM, Matt Neuburg wrote:
> The docs say: "There are two further restrictions on __block variables: they
> cannot be variable length arrays, and cannot be structures that contain C99
> variable-length arrays."
>
> This would seem to imply that a __block variable *can* be a
hmmm. Your saying this doesn't work?
NSBlockOperation * foo = [NSBlockOperation
blockOperationWithBlock:^{
__block char array1[5];
array1[0] = 'T';
}];
It works fine for me. Are you saying something different?
-
That's going to create a new copy of the array every time the block is
executed, and the array is not accessible outside of the scope of the block.
Matt was asking about:
__block char array1[5];
NSBlockOperation * foo = [NSBlockOperation blockOperationWithBlock:^{
array1[0] = 'T';
}
Dave
On
On Jun 26, 2010, at 11:51 AM, Quincey Morris wrote:
> 1. Unless this has changed recently, [NSNumber numberWithInt: 1] and
> [NSNumber numberWithBool: YES] both return the same (singleton) object, as do
> [NSNumber numberWithInt: 0] and [NSNumber numberWithBool: NO].
This is not true in Snow L
I understand all that. I was providing an example to seek clarity in his
question. But I understand what he is asking now, thanks.
-Tony
On Jun 26, 2010, at 7:50 PM, Dave DeLong wrote:
> That's going to create a new copy of the array every time the block is
> executed, and the array is not a
On Jun 26, 2010, at 7:48 PM, Tony Romano wrote:
> hmmm. Your saying this doesn't work?
>
> NSBlockOperation * foo = [NSBlockOperation
> blockOperationWithBlock:^{
> __block char array1[5];
>
> array1[0] = 'T';
> }];
>
>
Actually, I read this again.
OP posted: "This would seem to imply that a __block variable *can* be a *fixed*
length
array. But when I try to write into such an array inside a block, I get a
compile error, "cannot access __block variable of array type inside block."
In the example I listed below,
On Sat, Jun 26, 2010 at 8:51 PM, Tony Romano wrote:
> OP posted: "This would seem to imply that a __block variable *can* be a
> *fixed* length
> array. But when I try to write into such an array inside a block, I get a
> compile error, "cannot access __block variable of array type inside block."
On Jun 26, 2010, at 8:56 PM, Kyle Sluder wrote:
> Putting __block variables inside of blocks is completely pointless.
> The purpose of the __block qualifier is to mark variables in the
> enclosing scope to be copied into the block.
Unless you have a Block within the Block and you want to share a
That's why I asked for an example of what the op question is
Sent from my phone, Thanks Tony
On Jun 26, 2010, at 8:56 PM, Kyle Sluder wrote:
> On Sat, Jun 26, 2010 at 8:51 PM, Tony Romano wrote:
>> OP posted: "This would seem to imply that a __block variable *can* be a
>> *fixed* length
>> ar
On Jun 26, 2010, at 9:14 PM, Tony Romano wrote:
> That's why I asked for an example of what the op question is
http://lists.apple.com/archives/cocoa-dev/2010/Jun/msg01040.html
> This would seem to imply that a __block variable *can* be a *fixed* length
> array. But when I try to write into such
- (void)_copyOrMoveURLs:(SEL) s opMove:(BOOL)op src:(NSDictionary *)URLs
completionHandler:(void (^)(NSDictionary *newURLs, NSError
*error))handler
{
__block char array1[5];
array1[0] = 'W';
NSBlockOperation * foo = [NSBlockOperation
blo
The reason for the __block specifier is to allow the variable to be written to.
If the variable remains a const, then the complier can optimize how the block
is stored. If the data is changed, much of the optimization is lost.
-Tony
On Jun 26, 2010, at 8:56 PM, Kyle Sluder wrote:
> On Sat, J
On 27 Jun 2010, at 3:19, Richard Somers wrote:
> With an NSButton the pdf file works great and looks great when scaling set to
> none. When the pdf file is used as the image for the toolbar item, it gets
> asymmetrically stretched and looks horrible. Thus the reason for converting
> the pdf to
32 matches
Mail list logo