Warning: Blatant self serving plug:
Target/Action, Delegates, and Notifications are all software design patterns.
They aren't even unique to Cocoa, but Cocoa has particularly elegant
implementations.
You can read/review all about these patterns and more including analysis of
the m
There is an interesting study regarding the sociology of Cocoa Indie
developers at http://madebysofa.com/indiefever/ which I read and
enjoyed via http://daringfireball.net/.
My wife and I used to describe the various Cocoa developer forums,
WWDC, the old MacHack, Stepwise, etc. as my "islan
As is the case with all NSViews, the frame of the view defines the area
occupied by the view in its superview's coordinate system. The bounds of a
view defines that view's own coordinate system irrespective of the frame.
Therefore, if the frame size and bounds size for a particular view are
d
See a break point in drawRect: and then tell us why it is being
called. Seriously, do you have some philosophical objection to using
the debugger ? Isn't this what it's for ?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not
You ask an interesting computer science question (that's unrelated to Cocoa).
Surely the following sequence of words would produce Word[1-9]{1,2} instead
of Word[0-9]{1,2} because there is no representative 0 in the sample ?
"Word1"
"Word2"
"Word5"
"Word8"
"Word11"
"Word19"
"Word23"
"W
Have a look at http://www.stepwise.com/Articles/2006/eb1/index.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
You are off to a good start by trying to mimic something as well conceived and
implemented as Cocoa's -hitTest: approach.
Now, because you want to re-invent the solution, you will need to know a lot
of details about graphics programming and associated mathematics. Determining
whether a 2D
I am a little bit confused by Scott's statement that "if you use layers-hosting
views, then you should not rely on view drawing at all ... conversely, if you
use layer-backed views then you should not directly access the views."
I may just misunderstand what Scott means, but I have used lay
Over 130 outlets! Holy Sassafras Tea! That is ten to fifteen times more
outlets than I have ever seen in a single class in 20 years of Objective-C
programming!
I suspect you are doing something very wrong.
First, use the Model-View-Controller pattern. Dont store application state
Ashley,
As it happens, I have written a chapter in "Cocoa Design Patterns"
about "why" NSArrayController and friends exist and how to use them.
I am interested in feedback on the chapter. Contact me privately if
you want to see if we can arrange some way for you to review the
chapter.
See
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_4.html
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list
There are many pure C++ applications in the world that implement
undo. You don't have to use the Cocoa undo at all if portability is
important. Implement undo in C++ using the Command pattern or
whatever technique you want. Then integrate Cocoa GUI support via
menu items etc. for invokin
In answering some private email about the forthcoming "Cocoa Design Patterns"
book, I made the following observations.
Design patterns describe high quality practical solutions to recurring
programming problems and can sometimes be quite abstract. Design patterns
state how to solve pr
ANN: The publisher of the upcoming Cocoa Design Patterns book has made
approximately half of the content available via the Safari Rough Cuts system.
Customers can (for a fee) start reading and commenting on the book now while it
is still in development. Readers get early access to the conten
A better subjuct might have been "How should I use interface objects to select
command line arguments?" or something like that. The current subject adds no
value and will not help others search for information in the future.
Having said that...
One approach you might take (that will
> How do I allow controller A to send commands to controller B and vice
> versa? If controller A initialized controller B, then A knew about B, but
> what about the other way round?
1) A can have an instance variable that points to B.
2) B can have an instance variable that points to A.
Changing the opengl viewport every time you draw is generally a poor
practice. Setting the viewport is traditionally one of the most
expensive open gl operations. The window will not resize anywhere
near as often as the view will be redrawn. That is why it is usually
better to reset the
I use the -resize method within an NSOpenGLView subclass. Is there
some reason you don't use an NSOpenGLSubclass ?
@implementation EBNMapOpenGLView
- (id)initWithFrame:(NSRect)frame
{
static NSOpenGLPixelFormatAttribute attribs[] =
{
NSOpenGLPFANoRecovery,
NSOpenGLPFAWindow
I would like to dispatch a message to a C++ controller letting it
know that the window has been resized to x,y dimensions.
Then you want the window delegate messages.
- (void)windowDidResize:(NSNotification *)notification
Also, please use the available documentation.
http://developer.apple.
I have been working with Cocoa and its predecessors for so long that I
can't remember how long it took me to learn to use the frameworks.
One of my first non-trivial NeXTstep applications was a Tetris game.
It was about 1989 or early 1990 when a friend was admiring my NeXT
cube. She aske
Try this search
http://developer.apple.com/cgi-bin/search.pl?q=NSOpenGLView&num=10&site=(samplecode)
Take insight from the samples. Start with NSOpenGLView unless you
have some strong reason to poll your own.
___
Cocoa-dev mailing list (Cocoa-de
On May 23, 2008, at 5:30 PM, [EMAIL PROTECTED] wrote:
On May 23, 2008, at 2:49 PM, Johnny Lundy wrote:
I decided to once again go verbatim through Cocoa Fundamentals. So
far it has been largely "uh-huh, yep", but the File's Owner, my
nemesis, comes up again.
[deleted]
Again, I'm sensing a very fun
Your question was very good. My only criticism of the way you asked
you question is the vague title of the post. Ask as many questions
like this per day as you want.
change the following:
- (id) directoryTable: (NSTableView *) aTableView
objectValueForTableColumn:(NSTableColumn *) aTableCo
What programming experience do you have? Perhaps I can explain File's Owner in
terms of some other framework you already know ?
You use the Files Owner proxy in each nib file to enable connections or
key paths to objects that are not instantiated within that nib file. Interface
Builder ne
Apple removed fax support in Mac OS X 10.0 and then restored it in OS
X 10.3.
http://developer.apple.com/technotes/tn2002/tn2082.html
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to
[deleted]
But there is no clear specific conceptual reason (that I know of) why
a list of these connections could not be made more user-editable.
What's more, this makes documenting simple code examples much harder,
as the drags all need to be documented in a necessarily less-rigourous
way (and p
In the NeXTstep 2.0 or 3.0 time frame, NeXT added AppKit framework
support for faxing. Anything that could be printed could be faxed.
The cool part was that all existing AppKit based applications
automatically got fax support via the print panel without even being
recompiled. This is ano
I have started a guided introduction to Cocoa programming at the Cocoadev wiki
site: http://www.cocoadev.com/
The goal is to provide an sequence in which to learn Cocoa and links to the
basic information. My hope is that by just stating a step by step sequence of
topics, users will be abl
I agree completely with Mark Roseman's analysis:
1) Too many chioces
2) Too many concepts
3) Too much housekeeping
4) Doesn't support everything
5) Too much hype.
The only additions I can make are the following:
1) Many folks from the Windows worls are certainly familiar with
Given your class:
// Popup.h
// TestPopup
#import
@interface Popup : NSObject
{
NSArray *popupArray;
NSString *selectedGame;
}
@property (readwrite, copy) NSArray *popupArray;
@property (readwrite, copy) NSString *selectedGame;
@end
To start with, in my opinion you have a brok
1) NSCell is often used along with the Prototype design pattern. See the
-setPrototype: method of NSMatrix. When so configured, NSMatrix copies its
prototype cell as needed to create new instances.
2) Of course NSCell implements . Otherwise it couldn't be used in
Interface Builder becau
I am not sure I understand the OP's question, but the shortest answer seems to
be to override the super class's designated initializer.
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_6.html
http://developer.apple.com/documentation
One of the coolest examples of dynamic language untility was provided By
Apple's Enterpriise Objects Framework (EOF).
Here is a brief quote from
http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/WebObjects_4.5/System/Documentation/Developer/EnterpriseObjects/DevGuide/EOFDevGu
First, let me say that I have enjoyed the Kevin Hoffman's .Net Addicts Blog
posts comparing Cocoa and Objective-C to .Net and C#. I personally think C# is
a great language and I appreciate .Net as well. There are many programming
tasks which are easier and simpler with the aid of dynamic langu
FROM : Peter Duniho
DATE : Mon May 19 07:03:25 2008
[deleted]
Real people are having real problems getting into Cocoa. I don't see
the kind of repeated commentary about poor documentation and
difficult APIs in the C#/.NET forums or Java forums. It comes up
once in a blue moon, but not with the
On Sun, May 18, 2008 at 8:41 PM, Julius Guzy
<> wrote:
Tthe fact is that there will be others like me who do not find it
easy to get into cocoa. At this stage I'll not be jumping ship but
believe me I've had sleeples nights about it. Mainly i'll not do it
because although I'm far from attack spee
Johnny Lundy had a difficult time using NSPopupButon along with
bindings. The struggles are archived via www.cocoabuilder.com for
posterity. Mr. Lundy recently wrote "...I am still very very hesitant
to put another NSPopUpButton on my interface, because of the complete
absence of guidance
There are conventions and metaphors of human computer interfaces.
Apple used to provide interactive training programs to explain the use
of a mouse to customers in stores. My own father who is a brilliant
scientist could not initially master double-click and fifteen years
later frequentl
The potential audience for a computer programming documentation can range from
beginner's who don't know what a compiler is to people who are experts
themselves and just want a quick reference. Beginners are frustrated when
prerequisite knowledge is assumed, and experts are frustrated when they
> OK - I really don't need the name then, but I am puzzled as to
> how my new class got instantiated. Here's what I did:
> 1. Create the class, the .h and .m files.
Great. This is how Objective-C classes are generally created. Good job.
> 2. Code the ivars, their @property directives, an
But, just exactly HOW does the actual documentWindow object get passed so that
someMethod can look at one of its properties?
This question is oriented to "behind the scenes"
For the current version of Interface Builder, see
- (void)connectOutlet:(NSString
*)outletofSourceObject:(id)sou
The obstacles, misconceptions, and prerequisite concepts that need to
be mastered when learning Cocoa vary dramatically based on the past
experience of the learner. I am a very experienced Cocoa programmer.
I am also an author of the thickest Cocoa Programming book and have
another Cocoa
Regarding flowing text around objects, do you have a function for
breaking an arbitrary shape into a series of line rectangles that
you'd be prepared to share with the world?
http://www.cocoabuilder.com/archive/message/cocoa/2007/2/22/179186
___
Cocoa
Micro Tile Arrays are a general solution for minimal rectangular decomposition
of arbitrary shapes. The overlapping rectangles problem is the simplest case
and easily solved by utas.
Here is an open source implementation:
http://www.levien.com/libart/uta.html
___
See the TextEdit example code on you hard disk. The last time I looked, it was
not a document based application, and it certainly displays an Open dialog.
Or, you can look at the sample in Cocoa Programming which explains in detail
how the Cocoa document infrastructure works including a partia
>1) Write each portion of the code by assigning to intermediate ivars.
>This of course is easiest if you just type them in-line as you write
>them, but then of course they will not show up in the debugger so it
> is better to go ahead and type them in the @interface section.
Say what ? Loca
This is a prime use for Higher Order messaging:
http://www.metaobject.com/papers/Higher_Order_Messaging_OOPSLA_2005.pdf
http://www.cocoadev.com/index.pl?HigherOrderMessaging
http://www.oreilly.com/pub/a/mac/2004/07/16/hom.html
HOM takes this
// which of these employee objects earn more than 10
open a terminal or your favorite internet search and type "man nohup".
___
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.
Wow! Dave Hersey wrote a very detailed and comprehensive post that must have
taken a long time. Sadly, I disagree with almost all of it.
NSMatrix is an "older" class that predates the "data source" design pattern
that emerged (i think) in NeXTstep 3.0 in about 1994 as I recall. I think
NSMat
We have been asked not to paraphrase or restate the memory management
rules in this forum because slight inaccuracies, imprecisions,
misstatements, or just idiocy confuses people. Here is a quote:
From
file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.doc
In Ruby GC just works dandy without thought. Why is it so different in
Cocoa Obj2.0?
What kinda of real headaches will I have jumping into osx programing
compared to ruby ?
The short answer is that Ruby is a nifty high level scripting language
that insulates the programmer thoroughly from poin
> You'll probably have to learn the old way, "retain and release,"
> which is unique to Objective-C.
For the record, reference counting for memory management is one of the
oldest techniques in software and is not unique to Objective-C or
Cocoa. Microsoft Foundation Class CString uses it. CO
When dealing with an over release problem, just turn on NSZombieEnabled, and
you will quickly find the problem.
If you restrict retains and releases to accessors, you won't have very many
places you need to look.
___
Cocoa-dev mailing list (Cocoa-dev
If all you want is a custom shape button, subclass NSButton and override a few
methods, -hitTest:.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/occ/instm/NSView/hitTest:
Use whatever image you want. Then implemen
There is this example of buttons on a button:
http://www.stepwise.com/Articles/Technical/NSCell.html
But from your description, I suspect you want Core Animation Layers:
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html
__
101 - 155 of 155 matches
Mail list logo