Le 10 janv. 09 à 07:03, Brian Bruinewoud a écrit :
Hi,
I'm an experienced C++ developer but a relative newbie to Objective-
C and Cocoa and am learning my way.
I'm porting a program to Mac OS X Cocoa and part of the requirements
is a CAD-like functionality. A substantial part of the rest
Books:
This is pretty definitive:
http://www.amazon.com/Programming-Quartz-Graphics-Kaufmann-Computer/dp/0123694736/ref=sr_1_1?ie=UTF8&s=books&qid=1231668829&sr=1-1
This is much shorter, but a good quick start:
http://www.amazon.com/Quartz-2D-Graphics-Mac-Developers/dp/0321336631/ref=sr_1_2?ie
I have an NSPopUpButtonCell subclass for custom drawing. Quite simply,
how can do custom highlighting before the popup menu appears? -
highlight:withFrame:inView: is called before the menu appears, but no
drawing is done. The same code in an NSButtonCell subclass works fine.
___
On Jan 11, 2009, at 1:50 AM, Ken Thomases wrote:
On Jan 11, 2009, at 1:28 AM, ewan.dela...@math.unicaen.fr wrote:
If you must work character-by-character,
use character constants (e.g. >'0' or '9')
In that (unlikely) situation, how would I test, say, equality
of characters ? For example, if
On Jan 10, 2009, at 11:48 PM, Michael Ash wrote:
Except that if Apple renames one of their ivars to match the name of
one of your subclass's ivars nothing happens. You don't crash, you
don't misbehave. Everything continues on like usual.
Unlike methods, ivars are *not* looked up by name, b
Le 11 janv. 09 à 15:41, Adam R. Maxwell a écrit :
On Jan 11, 2009, at 1:50 AM, Ken Thomases wrote:
On Jan 11, 2009, at 1:28 AM, ewan.dela...@math.unicaen.fr wrote:
If you must work character-by-character,
use character constants (e.g. >'0' or '9')
In that (unlikely) situation, how would
On Jan 11, 2009, at 9:41 AM, Adam R. Maxwell wrote:
On Jan 11, 2009, at 1:50 AM, Ken Thomases wrote:
On Jan 11, 2009, at 1:28 AM, ewan.dela...@math.unicaen.fr wrote:
If you must work character-by-character,
use character constants (e.g. >'0' or '9')
In that (unlikely) situation, how woul
On Sun, Jan 11, 2009 at 10:08 AM, glenn andreas wrote:
>
> On Jan 10, 2009, at 11:48 PM, Michael Ash wrote:
>>
>> Except that if Apple renames one of their ivars to match the name of
>> one of your subclass's ivars nothing happens. You don't crash, you
>> don't misbehave. Everything continues
I don't think I see this issue in my own code using UIImageView with a like
number of JPEG's. How large are yours? For a variety of reasons, I have
found that optimizing mine as 150KB or less each is acceptable for 480 * 320
pixel images. On the other hand, while speed appears fine (and I can ea
I've developed some small Cocoa programs and now I'm looking to learn
some of the more advanced topics (bindings, controllers, etc.). I'd
like to create a Cocoa program that has multiple "document types"
corresponding to tables in a database (i.e., I'll be able to open
separate windows fo
You have lost me...but I will keep it in mind for later. What I do
know is that if I step through the code, **that line** is never
returned to, so the admonition that once "Return" is invoked,
nothing further will be done is advice well taken.
You should review the memory management guide f
As Glenn indicated, this is largely a factor of the size of the
images. Layers are considerably lighter weight than Views (with the
associated functionality loss). Of course, doing what you want to do
- depending on the animation involved - might simply be having two
image views and anima
Well, it's good to know that. One thing I had assumed (possibly
erroneously) is that other initializers and factory methods would internally
call init for basic initialization. That would be consistent with your
claim that factory methods are just convenience methods. I found out that's
not
On Jan 11, 2009, at 09:52, davel...@mac.com wrote:
What I want to do is have a window that I can click on a button that
says "new person" and I want it to open a window (from a separate
nib file) with text fields for entering a first and last name. I
created a separate Window nib file (Pers
On Sun, Jan 11, 2009 at 2:50 AM, Ken Thomases wrote:
> Sure it would. Both unichar (as typedef'd) and char are integer types in C.
> '7' is another way of writing a number, although not the number 7. Which
> number depends on the encoding of your source file, but in most modern
> systems it wou
On Jan 11, 2009, at 10:48 AM, Kyle Sluder wrote:
On Sun, Jan 11, 2009 at 2:50 AM, Ken Thomases
wrote:
Sure it would. Both unichar (as typedef'd) and char are integer
types in C.
'7' is another way of writing a number, although not the number 7.
Which
number depends on the encoding of yo
Greetings
I'm looking for a way to programatically get the machine icon from my
servers, just like finder does in the finder.
for every type of mac it has a different icon, and for windows
computers, it;s the nice crash screen icon.
I would like my application to represent the network hosts
On Sun, Jan 11, 2009 at 1:24 AM, wrote:
> This is what I did in my project, using the code below. I can't
> help feeling that this code is dirty because it relies on the character
> for the "j" digit being indexed as unichar number j+48. Can anyone
> tell me what would be the clean way to do th
I achieved this recently by learning from the example of "MyRecorder"
on the Apple developer website. If you want a copy of the code that I
used to get it working please e-mail me and I'll send it to you. I
don't want to post it here as it's probably more appropriate to the QT-
API list, and
On Sun, Jan 11, 2009 at 1:56 PM, Greg Titus wrote:
> Cocoa does use UTF-16 as the encoding for its unichar type in NSStrings, but
> the low 7-bits of UTF-16 (characters 0-127) are identical to the ASCII
> encodings, so you can cast (char)'7' or (unichar)'7' and get 0x37 either way
> and it'll be i
I'm trying to replace some IBActions with bindings so I can bind through
one nib to another through an object controller. I recently discovered the
button binding example and have been able to do this successfully. However,
one thing escapes me. I have a passel of related buttons connected t
Thanks for that, Scott. Due to your input, I found the problem. It
turns out [super init] was not being called for CATextLayer. Here is
my hierarchy:
NSObject<-CALayer<-CATextLayer<-NDInfoLayer<-SpeedInfoLayer
NDInfoLayer contains common attributes and behavior (NSFont(s),
NSMutableAttr
Hi,
Not sure if I'm addressing the right list for this topic.
I'm just trying to get a notion of my memory requirements for a
program I am designing to run on my Mac Pro. I will have large volumes
of data passing through the program and I'm worrying about minimising
page collisions
I've ha
On 11 Jan 2009, at 21:44, julius wrote:
About This Mac says that I have 2GB of internal memory.
Is this 2GB of 64-bit words or 2GB of 8-bit bytes?
8 bits. Always 8 bits.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post adm
On Jan 11, 2009, at 4:44 PM, julius wrote:
About This Mac says that I have 2GB of internal memory.
Is this 2GB of 64-bit words or 2GB of 8-bit bytes?
I appreciate that GB is Giga Byte but ..
Similarly with respect to the L2 Cache, I have 12 MB per processor,
is that 12 MB by 8 bits or 64
On Jan 11, 2009, at 5:04 PM, Kenneth Bruno II wrote:
On Jan 11, 2009, at 4:44 PM, julius wrote:
About This Mac says that I have 2GB of internal memory.
Is this 2GB of 64-bit words or 2GB of 8-bit bytes?
I appreciate that GB is Giga Byte but ..
Similarly with respect to the L2 Cache, I ha
Depending on what sort of data you has, you could try allocating all of
your memory on startup, organised into related "zones". That way you are
not constantly allocating/deallocating anything. Just overwriting
values. This can provide an unbelievable speed inprovement, and low
memory overheads
On 11-Jan-09, at 1:24 PM, Gordon Apple wrote:
Well, it's good to know that. One thing I had assumed (possibly
erroneously) is that other initializers and factory methods would
internally
call init for basic initialization.
You can't assume that. That's where the designated initializer
On 11 Jan 2009, at 22:04:09, Kenneth Bruno II wrote:
In actuality a gibibyte (GiB) is 2^20 bytes but it's not used in all
the places it should be used.
It's rarely used at all, for several reasons. One is that it makes
little sense to your average consumer, but the more amusing reason
th
I've searched this list and google and haven't found a solid answer.
My app is 10.5 only. I have a UTI set up in Info.plist with
UTExportedTypeDeclarations. Do I still need CFBundleDocumentTypes,
since it seems pretty redundant?
Cheers,
Mitch
___
On Jan 11, 2009, at 2:22 PM, Kyle Sluder wrote:
On Sun, Jan 11, 2009 at 1:56 PM, Greg Titus
wrote:
Cocoa does use UTF-16 as the encoding for its unichar type in
NSStrings, but
the low 7-bits of UTF-16 (characters 0-127) are identical to the
ASCII
encodings, so you can cast (char)'7' or (un
On Jan 11, 2009, at 5:26 PM, Benjamin Dobson wrote:
On 11 Jan 2009, at 22:04:09, Kenneth Bruno II wrote:
In actuality a gibibyte (GiB) is 2^20 bytes but it's not used in
all the places it should be used.
It's rarely used at all, for several reasons. One is that it makes
little sense to
On Jan 8, 2009, at 10:43 PM, Ben Trumbull wrote:
Why aren't you using a separate MOC for the main thread and the
NSOperation ?
Because I'm used to programming for other databases (MySQL, OpenBase,
ODBC, etc.) where locking and unlocking the main database connection
as needed was "good e
i noticed the window of the OS Install Assistant of Parallels 4.0 only
has a close button in the top left corner of the window. i didn't
know this was possible. how is this accomplished?
see attached image.
<>___
Cocoa-dev mailing list (Cocoa-dev@list
On Mon, Jan 12, 2009 at 1:18 PM, Chunk 1978 wrote:
> i noticed the window of the OS Install Assistant of Parallels 4.0 only
> has a close button in the top left corner of the window. i didn't
> know this was possible. how is this accomplished?
>
With the exception of Panels, this is discouraged
On Sun, Jan 11, 2009 at 7:18 PM, Chunk 1978 wrote:
> i noticed the window of the OS Install Assistant of Parallels 4.0 only
> has a close button in the top left corner of the window. i didn't
> know this was possible. how is this accomplished?
I don't think you can do it in Cocoa; you certainly
On Sun, Jan 11, 2009 at 5:27 PM, Mitchell Livingston wrote:
> My app is 10.5 only. I have a UTI set up in Info.plist with
> UTExportedTypeDeclarations. Do I still need CFBundleDocumentTypes, since it
> seems pretty redundant?
Yes, it's the only way to actually associate the document type with
you
humm... would be interesting to know how it's possible... so you think
it's programatically accomplished with carbon? maybe it's a custom
view placed over hiding the other buttons in carbon?
On Sun, Jan 11, 2009 at 7:36 PM, Kyle Sluder wrote:
> On Sun, Jan 11, 2009 at 7:18 PM, Chunk 1978 wrote:
Thanks for the link. I removed CFBundleTypeExtensions, but now the
file icon won't show up for any of that file type (for example, I
associate the file to another app, the icon changes for that app; I
then re-associate the file with my app but the icon doesn't change
back. When I re-add CFB
On Jan 11, 2009, at 7:18 PM, Chunk 1978 wrote:
i noticed the window of the OS Install Assistant of Parallels 4.0 only
has a close button in the top left corner of the window. i didn't
know this was possible. how is this accomplished?
One way to accomplish things is to search the archives:
On Jan 11, 2009, at 1:35 PM, Quincey Morris wrote:
On Jan 11, 2009, at 09:52, davel...@mac.com wrote:
What I want to do is have a window that I can click on a button
that says "new person" and I want it to open a window (from a
separate nib file) with text fields for entering a first and l
On 11 Jan 2009, at 22:19, Jacob Rhoden wrote:
Depending on what sort of data you has, you could try allocating all
of your memory on startup, organised into related "zones". That way
you are not constantly allocating/deallocating anything. Just
overwriting values. This can provide an unbeli
On Sun, Jan 11, 2009 at 4:44 PM, julius wrote:
> About This Mac says that I have 2GB of internal memory.
> Is this 2GB of 64-bit words or 2GB of 8-bit bytes?
> I appreciate that GB is Giga Byte but ..
Others have covered this adequately but I just want to reinforce that
there's essentially no
I want to force derived classes to implement a given interface without
provided a default implementation. Does the concept exist in
Objective-C (I'm almost sure it does)? If so, what does the syntax
look like?
-Michael
--
The united stand. The divided get played.
--
They're called "Protocols" and were the original inspiration for
Java's interfaces:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_7_section_1.html
HTH,
Dave
On 11 Jan, 2009, at 7:20 PM, Michael A. Crawford wrote:
I want to force derived classes to imp
I submitted this question only after trying to find the answer in a
couple newer Cocoa programming texts that I own. Then, I went and dug
up a older text from 2002: Cocoa Programming from Anguish, Buck, and
Yacktman. I found something called a Protocol. From what I've read
so far this is
On 12 Jan 2009, at 1:20 pm, Michael A. Crawford wrote:
I want to force derived classes to implement a given interface
without provided a default implementation. Does the concept exist
in Objective-C (I'm almost sure it does)? If so, what does the
syntax look like?
The nearest thing to
On 11-Jan-09, at 6:32 PM, cocoa-dev-requ...@lists.apple.com wrote:
Still,
anyone wants to give me some guidance on protocols and how they should
be employed, I'm all ears (eyes).
Well, here's one I just employed. Define it like this
@protocol PAImageCollection
@required
- (int)collection
If I allocate a font object for use with NSMutableAttributedString and
assign said font to the string using the addAttribute method, will the
reference count on the font be incremented? (I assume that if the
answer is yes, then removeAttribute will decrement the reference count.)
As a bonu
Hi,
I'm an experienced C++ developer but a relative newbie to Objective-C
and Cocoa and am learning my way.
I would like to implement an inspector that has views that show/hide
by clicking on their headings similar to the ones in the Interface
Builder inspector.
This control doesn't see
--- On Sat, 1/10/09, Quincey Morris wrote:
> > So, are you saying that changeKeyPath isn't an
> override or a delegate method? If so, then why don't I
> have to put a stub in the .h file? I thought that unless I
> was implementing an override or delegate method that the
> stub in the .h was requ
Hello,
*** A short description of the problem ***
NSTextField that is bound to NSArrayController's 'selection.attribute'
such that the attribute is part of the NSArrayController's sort
descriptors gets out of sync when modified.
*** A longer description of the problem ***
I have an NSTa
I'd want to read the contents of the file iTunes stores in ~/Music/
iTunes/iTunes Library in my Cocoa Application.
How can i do?
Thanks,
Luca C.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator co
Hi folks,
I'm attempting to write unit tests for target-action connections for
Cocoa user interfaces, as described by Chris Hanson in his article "Unit
testing Cocoa user interfaces: Target-Action"(1) but am not succeeding.
I have created a trivial Cocoa Application, with trivial model and
contro
It's important to note that the reason for this peculiarity is that in
computer science we use powers of 2 extensively. As an electrical
engineer, I find the use of kilo, mega, giga, etc. prefixes irritating
as these are defined by the SI system to be 10^3, 10^6 and 10^9,
respectively. See
I am somewhat new to cocoa development and have yet to look at
controls but would something like that entail view swapping?
Joseph Crawford
On Jan 11, 2009, at 3:20 AM, Brian Bruinewoud wrote:
Hi,
I'm an experienced C++ developer but a relative newbie to Objective-
C and Cocoa and am learn
Here's a BSD licensed implementation by Jonathan Dann:
http://espresso-served-here.com/2008/10/24/i-love-outline-views-heres-mine/
On 11-Jan-09, at 3:20 AM, Brian Bruinewoud wrote:
Hi,
I'm an experienced C++ developer but a relative newbie to Objective-
C and Cocoa and am learning my way.
On Jan 11, 2009, at 05:25, Russell Martin wrote:
Here's the source of changeKeyPath:
- (void)changeKeyPath:(NSString *)keyPath
ofObject:(id)obj
toValue:(id)newValue
{
// setValue:forKeyPath: will cause the key-value observing method
// to be called, which
On 11 Jan 09, at 13:43, Luca wrote:
I'd want to read the contents of the file iTunes stores in ~/Music/
iTunes/iTunes Library in my Cocoa Application.
How can i do?
You can't; the format isn't documented, and changes frequently. Use
the XML version instead, or use Scripting Bridge to access
On Jan 11, 2009, at 7:59 PM, Michael A. Crawford wrote:
If I allocate a font object for use with NSMutableAttributedString
and assign said font to the string using the addAttribute method,
will the reference count on the font be incremented? (I assume that
if the answer is yes, then remov
All,
I'm trying to get drag-and-drop to work, using the finder as a
destination. I can drag my files into mail using NSTIFFPboardType.
My draggingSourceOperationMaskForLocal returns NSDragOperationEvery.
But, when I drag my file onto a finder window, I get no icon at all...
no little g
On Jan 11, 2009, at 09:54, Dado Colussi wrote:
I have an NSTableView with a single column bound to an
NSArrayController that manages an entity in an XML Core Data
storage. I have programmatically added one NSSortDescriptor to the
array controller for attribute 'name'. I have bound the table
Hi All,
I want to create custom control that looks like a multiple monitor control that
manages monitors on Mac. The custom control should allow the rectangle dragging
and resizing same way we are moving monitor rectangle can be moved. If there
are two rectangles then custom control should not
On Jan 11, 2009, at 2:49 PM, David H. Silber wrote:
I have created a trivial Cocoa Application, with trivial model and
controller classes, and with a view built in Interface Builder. The
application changes its window title when its button is pressed, so it
obviously can load its window and is
On Jan 11, 2009, at 9:48 PM, Eric Smith wrote:
I'm trying to get drag-and-drop to work, using the finder as a
destination. I can drag my files into mail using NSTIFFPboardType.
My draggingSourceOperationMaskForLocal returns
NSDragOperationEvery. But, when I drag my file onto a finder
Hey,
I have an NSSet which I need to iterate through and remove any objects if
they fail a certain test (this is a client/server setup, so I am testing the
connection to connected clients). However, if I remove an object from the
set while iterating through it, I get this message logged to the cons
On Jan 11, 2009, at 20:55, Quincey Morris wrote:
- (void) setName: (NSString*) newName {
name = newName; // add copy/retain/release stuff as necessary for
your memory management model
[self performSelector: @sel (changeSortName) withObject: nil
afterDelay: 0];
}
Oops, just remembered th
On Jan 11, 2009, at 11:17 PM, Bridger Maxwell wrote:
I have an NSSet which I need to iterate through and remove any
objects if
they fail a certain test (this is a client/server setup, so I am
testing the
connection to connected clients). However, if I remove an object
from the
set while it
On Jan 11, 2009, at 23:17, Bridger Maxwell wrote:
I have an NSSet which I need to iterate through and remove any
objects if
they fail a certain test (this is a client/server setup, so I am
testing the
connection to connected clients). However, if I remove an object
from the
set while iterat
69 matches
Mail list logo