Hmm, I just added it, and I still get the same linking error. Any other
ideas?
I could probably use an example project which successfully uses CALayers,
too. I can't find any on the net that are helpful.
On Sat, Apr 12, 2008 at 7:36 PM, Michael Vannorsdel [EMAIL PROTECTED]
wrote:
Did you put
I noticed:
//GameBoard.h*
#import Cocoa/Cocoa.h
#import Quartz/Quartz.h
You've added QuartzCore.framework, but Quartz.h isn't the top-level
header for QuartzCore. You're importing a header in a framework you
aren't linking to.
Either link to
I've spoken too soon, I'm afraid. Quartz.h also imports QuartzCore.h,
and as such what I said isn't entirely accurate. You'll still import
the header for QuartzCore, so that's not your problem.
Have you verified in your project target that the QuartzCore framework
is listed in the Link
Ah! It compiled. Thank you very much! And thanks to Michael for putting
together the sample project.
Now to get the CALayer to draw a path. Most of the documentation I've seen
suggest to do this with a delegate function, is that correct? Here is the
delegate function I've written (a.k.a. copied
Are you calling the CALayer's setNeedsDisplay to trigger a redraw?
On Apr 13, 2008, at 1:01 AM, Greg Sabo wrote:
Ah! It compiled. Thank you very much! And thanks to Michael for
putting
together the sample project.
Now to get the CALayer to draw a path. Most of the documentation
I've seen
Any way to take an NSTextField containing some amount of text, and resize it
vertically so all the text fits within the frame? The sizeToFit message
seems to do this, except on the horizontal axis.
Thank you!
___
Cocoa-dev mailing list
On Apr 12, 2008, at 8:30 PM, Ben Lachman wrote:
In general the naming convention used in Objective-C is that class
names start with capitals and variable names start with lower-case
characters (both use bumpy case which I think you know). For
instance NSWindow (class) and aWindow
On Apr 13, 2008, at 5:31 AM, Thomas Backman wrote:
Are you running the app in debug mode? I've made the mistake of
trying to debug in release mode a few times, and it often shows
some insane values for variables.
This is news to me. How can I tell? In the Run menu, the Go item is
On 2008 Apr, 13, at 1:38, Jeff wrote:
Any way to take an NSTextField containing some amount of text, and
resize it
vertically so all the text fits within the frame? The sizeToFit
message
seems to do this, except on the horizontal axis.
If you mean one line of text, there was [NSFont
Hi Everybody,
I'm delving into Quartz 2D programming for the first time so this is
probably a newb issue, but either way I'm stumped. I have a
controller that is calling several custom drawing methods in my custom
view. The drawing methods call Quartz and tell it to draw various
things
In the mean time, there is this.
http://lipidity.com/apple/ilife-controls-hud-windows-and-more
Jon
On Sat, Apr 12, 2008 at 7:21 PM, Michael Watson [EMAIL PROTECTED]
wrote:
You aren't missing anything. Apple gave us an official HUD panel and
UI
guidelines surrounding it, and failed to
First, thanks to Quincey Morris for clarifying the
mutableArrayValueForKey issue to get proper KVO on a mutableArray when
deleting objects from the Model. It works just fine. I think that will
also allow me to get my addObject button to work.
I am tackling these issues one at a time. My
I've been struggling for the past week with the exact same problem.
Does anyone know of a workaround, or should I just roll my own PDFView
and PDFThumbnailView?
Thanks for any ideas.
Kevin
On Apr 8, 2008, at 3:41 PM, Antonio Nunes wrote:
On Apr 8, 2008, at 10:19 PM, Justin Hawkwood
Hi!
How come some menu items are enabled and others disabled while there
is a modal session going on?
Does this mean that Apple has implemented validateMenuItem somewhere
in the responder chain to check for modalWindow and attachedSheet?
Where in the responder chain would that be?
I have
Also check this out
http://shiira.jp/hmblkappkit/en.html
On Apr 13, 2008, at 9:02 AM, Jonathan Dann wrote:
In the mean time, there is this.
http://lipidity.com/apple/ilife-controls-hud-windows-and-more
Jon
On Sat, Apr 12, 2008 at 7:21 PM, Michael Watson mikey-
[EMAIL PROTECTED] wrote:
I see in some Apple's Cocoa examples that ivars are set to nil in the
dealloc method. The auto generated Core Data AppDelegate for new
projects is doing this for each ivar. Here is a simple example:
- (void)dealloc {
[appointments release];
appointments = nil;
[super dealloc];
}
Hi
I have a window (NSBorderlessWindowMask), this window gets pushed away
when my Dock appears from being hidden.
How can I bypass this behaviour for my window?
Should I use applicationDidChangeScreenParameters and reposition the
window, or is there an option to make my window not care
Hello,
I've been writing a library that uses NSAllocateCollectable() quite a
bit and I have a few questions about proper usage.
- Copying data
if I am copying to a malloc'd block, I can use memmove() regardless of
whether the source is GC'd or not, right?
if I am copying to a GC block
On Sun, Apr 13, 2008 at 6:48 PM, Ferhat Ayaz [EMAIL PROTECTED] wrote:
I see in some Apple's Cocoa examples that ivars are set to nil in the
dealloc method. The auto generated Core Data AppDelegate for new projects
is doing this for each ivar. Here is a simple example:
- (void)dealloc {
Earlier I wrote:
On Apr 13, 2008, at 5:31 AM, Thomas Backman wrote:
Are you running the app in debug mode? I've made the mistake of
trying to debug in release mode a few times, and it often shows
some insane values for variables.
This is news to me. How can I tell? In the Run menu, the
Hi All,
I'm trying to re-create the iTunes and HUD window scrollbars for my
project. I've managed to get a good looking NSScrollerKnob, and
NSScrollerKnobSlot using bezier paths and gradients, but now I'm
moving on to the arrows and the curved ends of the slot.
To get the knob I've
On Apr 13, 2008, at 12:15 PM, Lincoln Green wrote:
NSAttributedString *string = [textView attributedSubstringFromRange:
[textView selectedRange]];
[textView setString:string];
You're passing an NSAttributedString to a method that expects a
NSString.
You probably would want to
on 4/13/08 10:12 AM, [EMAIL PROTECTED] purportedly said:
How come some menu items are enabled and others disabled while there
is a modal session going on?
Because the UI has to protect the integrity of the concept of modality. If
you bring up an application-modal window, you wouldn't want a
On 2008 Apr, 13, at 10:48, Ferhat Ayaz wrote:
I see in some Apple's Cocoa examples that ivars are set to nil in
the dealloc method...why is it necessary...?
Usually it is not, but sometimes it is. I can't remember the specific
examples right now, but maybe to avoid a retain cycle, some
On Sun, Apr 13, 2008 at 12:48 PM, Ferhat Ayaz [EMAIL PROTECTED] wrote:
why is it necessary to set the variable appointments (for instance) to nil
in this example? Should we do this for each variable? When have we to do
this?
Usually it's not. For me, it's 100% a best practices thing. It
On 13-Apr-08, at 12:02 PM, [EMAIL PROTECTED] wrote:
why is it necessary to set the variable appointments (for instance)
to nil
in this example? Should we do this for each variable? When have we
to do
this?
IMO, it's totally unnecessary. Seems to be a cargo culting thing more
than
On Apr 13, 2008, at 12:27 PM, Jerry Krinock wrote:
Usually it is not, but sometimes it is. I can't remember the
specific examples right now, but maybe to avoid a retain cycle, some
other object may have a weak reference to the ivar, or the ivar may
have been made a delegate of some
On Apr 13, 2008, at 12:14 PM, j o a r wrote:
On Apr 13, 2008, at 10:48 AM, Ferhat Ayaz wrote:
why is it necessary to set the variable appointments (for instance)
to nil in this example? Should we do this for each variable? When
have we to do this?
You should rarely, if ever, have to do
On Apr 13, 2008, at 12:36 PM, stephen joseph butler wrote:
Usually it's not. For me, it's 100% a best practices thing. It never
hurts, so why not get into the habit of doing it?
Two reasons:
* I don't think that it can be described as a best practice to begin
with, and
* You could end
Alright, the logic of this code(to me) is as follows; Make a new
attributed string with the value of the textView's selected text.
Then, print it in the console. But, of course, it doesn't work. what
am I missing?
NSAttributedString *aString = [[textView textStorage]
On Sun, Apr 13, 2008 at 2:52 PM, j o a r [EMAIL PROTECTED] wrote:
Two reasons:
* I don't think that it can be described as a best practice to begin with,
and
* You could end up hiding what I would consider to be real problems in
your code.
I want to detect real problems as soon as
Hello all.
I am trying to set the color of the title and subtitle in an
IKImageBrowserView. From what I see in the documentation I need to set
up a dictionary with key-value pairs that describe the attributes of
what I want to set it to. I have the snippet of code that I'm trying
to use
On Apr 13, 2008, at 12:40 PM, Alex Curylo wrote:
No, I can personally assure you that exact practice has led me to
finding many dozens -- quite possibly several hundreds by now
actually -- of 'calling methods of a deleted object' type bugs in C+
+ code, particularly game code I port from
On Apr 13, 2008, at 9:41 PM, Adam R. Maxwell wrote:
Whenever you call out from your dealloc method (ie. any method you
call on some other object than self, and even any method on self
that you haven't implemented in your own class, or that could be
overridden by subclasses) you invite
On 13-Apr-08, at 1:06 PM, Greg Titus wrote:
The big difference is that in Objective-C, trying to send a message
to nil results in a no-op instead of an access violation, so your
defensive C++ practice is actually going to tend to mask those same
errors in Objective-C and make them harder
Thanks Mark (and Jim) for the NSZombieEnabled/NSDeallocateZombies
reminder. This showed me that the object has indeed been deallocated
by the time that breakpoint was reached.
Setting an earlier breakpoint I was able to get some more information
on this unknown observer:
I'm trying to do some drawing in Quartz 2D. I'm trying to set the
blending mode of my CGContextRef to the equivalent of
NSCompositeSourceOver from NSGraphicsContext. It doesn't look like
there is such a blending mode for a CGContext. Am I mistaken in this,
or is there another way of
Hi Thaddeus,
To change the title attributes, use setValue:forKey with the key
IKImageBrowserCellsTitleAttributesKey and pass a dictionary that
contains the text attributes.
To get the list of keys for the attribute dictionary see the section
standard attributes of the following page:
This is because the actual value assignment was optimized and moved
later in the code. GDB can't really follow the source all that well
because the instructions that belong to each line of code are now
moved all around to improve performance.
On Apr 13, 2008, at 6:31 AM, Thomas Backman
Thanks very much Thomas -- it works now :-)
Thaddeus O. Cooper
([EMAIL PROTECTED])
On Apr 13, 2008, at 1:50 PM, thomas goossens wrote:
Hi Thaddeus,
To change the title attributes, use setValue:forKey with the key
IKImageBrowserCellsTitleAttributesKey and pass a dictionary that
contains
You want to just leave the pointer alone and turn on NSZombiesEnabled
when you run your app. Then instead of the object on the other end of
the pointer being freed, it'll point to a special zombie class which
will helpfully raise you an exception when you try to send it a
message. This has
My first project using Bindings (my first project actually) and I am
having problems.
I have several tables that are bound to models. All these models are
related through a single column (sum of all items in column A of Table
1 gives the value of column A of Table 2 and so on). The bindings work
On 13-Apr-08, at 2:15 PM, Greg Titus wrote:
You want to just leave the pointer alone and turn on
NSZombiesEnabled when you run your app.
Huh. I'd actually stumbled across NSDebug.h before, but the
documentation at the top
WARNING: Unsupported API.
This module contains material that is
On Apr 13, 2008, at 3:35 PM, Alex Curylo wrote:
OK, then, what would an equivalently useful value to set a released
Objective-C object pointer/ivar to in order to cause any subsequent
access of it to stop the program immediately? 0xDEADBEEF perhaps?
Well.. you could do what Greg said and go
On Apr 13, 2008, at 1:01 PM, Lincoln Green wrote:
Alright, the logic of this code(to me) is as follows; Make a new
attributed string with the value of the textView's selected text.
Then, print it in the console. But, of course, it doesn't work. what
am I missing?
NSAttributedString
On Apr 13, 2008, at 1:08 PM, Ferhat Ayaz wrote:
Maybe it is possible to invoke dealloc twice in multithreaded
applications? And setting to nil prevents an exception like
BAD_ACCESS if this happens?
I'm not sure how you would end up in that type of situation (the
default implementation
This list has been a great thing for me. I got 2 of my 3 stumpers
solved with the help of people here.
What's the most clean and elegant (MVC compliant) way to receive an
end-editing notice from a plain vanilla NSTextField?
I want my user to be able to just type in a string, end editing
On Sun, Apr 13, 2008 at 12:36 PM, stephen joseph butler
[EMAIL PROTECTED] wrote:
On Sun, Apr 13, 2008 at 12:48 PM, Ferhat Ayaz [EMAIL PROTECTED] wrote:
why is it necessary to set the variable appointments (for instance) to nil
in this example? Should we do this for each variable? When have
I believe this is a typo in the documentation. The method you want to
override is actually spelled -drawArrow:highlightParts:
Hope this helps.
On Sun, Apr 13, 2008 at 9:18 PM, Jonathan Dann [EMAIL PROTECTED] wrote:
Hi All,
I'm trying to re-create the iTunes and HUD window scrollbars for my
On 14/04/2008, at 7:17 AM, antikraft clover wrote:
I have several tables that are bound to models. All these models are
related through a single column (sum of all items in column A of Table
1 gives the value of column A of Table 2 and so on). The bindings work
fine. But,when I edit the
Is it possible to create a tabview who's tabviewitems have a custom
look, For instance, the label is horizontal when the tabs are on the
side, or can have icons? If so could I get a pointer to some info as I
cant seem to find any.
___
Cocoa-dev
On Sun, Apr 13, 2008 at 5:33 PM, Alex Curylo [EMAIL PROTECTED] wrote:
On 13-Apr-08, at 2:15 PM, Greg Titus wrote:
You want to just leave the pointer alone and turn on NSZombiesEnabled when
you run your app.
Huh. I'd actually stumbled across NSDebug.h before, but the documentation
at
You should find this thread of interest:
http://www.cocoabuilder.com/archive/message/cocoa/2008/1/25/197293
--
m-s
On 13 Apr, 2008, at 15:18, Jonathan Dann wrote:
Hi All,
I'm trying to re-create the iTunes and HUD window scrollbars for my
project. I've managed to get a good looking
Sean --
Nothing in KVO's guts registers arrays as observers, and nothing in
Cocoa Bindings either as far as I know.
For the curious, NSKeyValueObservances are instances of an internal
class that gets instantiated and put in the observation info of
observed object. (Hugely subject to
At 6:13 PM -0700 4/8/08, [EMAIL PROTECTED] wrote:
However, I would like to use Core Data to manage these items. I figure
I could have my add and remove methods insert and remove objects from
the managed object context as well as the KVO-compliant mutable array,
but when I undo such an action,
delegate, subclass or setting the contents property (not applicable in
this case)..
all are valid ways to provide the data..
On Apr 13, 2008, at 3:01 AM, Greg Sabo wrote:
Now to get the CALayer to draw a path. Most of the documentation
I've seen
suggest to do this with a delegate function,
Seriously, we're arguing about this ?
If you want a total hack, just assign (id) 0x1 to any variable that
... please step away from the tequila.
I have a radical suggestion:
Test your software.
Like crazy talk!!
The detection of this class of bugs is extraordinarily easy to
automate, so
Hey guys,
I have been asking a few questions around NSCollectionView and
NSTableView before. While I did get some of it working just fine, I've
also run into one or the other problem. So I thought I take a step
back and ask for some more general feedback. So I thought I just
explain what
Howdy,
I have a matrix of radio buttons that I'm trying to bind-ify. The two
options in the matrix should shown with the titles:
Mac OS Extended
Mac OS Extended Journaled
The *values* of these two items should be:
HFS+
Journaled HFS+
Then what I'd
On Apr 13, 2008, at 10:56 AM, Mohsan Khan wrote:
I have a window (NSBorderlessWindowMask), this window gets pushed
away when my Dock appears from being hidden.
Huh. I wouldn't expect it to do that given that it's borderless.
How can I bypass this behaviour for my window?
Should I use
Naturally, right after I gave up on solving it for the night, I guessed the
solution.
I figured I'd reply to myself and say that, to save others the trouble of
trying.
It was indeed something embarrassingly simple: I had accidentally created a
method with the same name as an accessor which
Hello everyone,
I'm trying to implement a Choose Template sheet that pops down with
the creation of a new document, one very similar to the Choose
Template sheet that pops down for each new Keynote document.
I've researched it a bit and found an app that subclasses
NSDocumentController
On Apr 13, 2008, at 6:35 PM, Ben Trumbull wrote:
Seriously, we're arguing about this ?
If you want a total hack, just assign (id) 0x1 to any variable that
... please step away from the tequila.
Heh. No amount of testing (see below for framing of this statement)
will catch every fault.
On Apr 13, 2008, at 6:24 PM, Development wrote:
Is it possible to create a tabview who's tabviewitems have a custom
look, For instance, the label is horizontal when the tabs are on the
side, or can have icons? If so could I get a pointer to some info as
I cant seem to find any.
Rather
On Apr 13, 2008, at 11:10 PM, Kip Nicol wrote:
I'm trying to implement a Choose Template sheet that pops down
with the creation of a new document, one very similar to the Choose
Template sheet that pops down for each new Keynote document.
Kip,
Erik Buck wrote an article about such an
Has anyone had any problems with creating Properties with Objective-C
2.0 that are also Outlets?
I been using this inside my code, and I want to be sure there is no
problems with this. I create fairly standard (readonly) and
(readwrite, copy) properties using ivars, @property and
On Apr 13, 2008, at 9:46 PM, Steve Sheets wrote:
The documentation does not explicitly say you can do this. I just
want to know if anyone has seen an issue?
I would fully expect it work just fine. Not an authoritative answer,
but it must be reassuring to know I don't think you're crazy. :)
67 matches
Mail list logo