A little while ago I posted a query here asking if anybody knew of a Cocoa
class to create a weekly calendar, somewhat like the iCal week view. Although
there were a couple of promising replies, I decided to roll my own,
"CSWeekView". I've released it on GitHub under the LGPL.
For my program'
move or resize.
>>
>> It currently only has a single day view, but it might be a starting point.
>> If you're interested, I'd be happy to share the code with you.
>>
>> Cheers,
>> Jim
>>
>>
>>
>>
>> On Dec 17, 2009, a
Does anybody know of some Cocoa classes that would allow me to mimic the week
view shown by iCal? I've looked around for such a thing online without success.
Also, in case there are none out there in the wild: I'm looking for some
pointers on how to implement this weekly calendar view. Here ar
Ah, I see. Strange that this would be the default behavior.
-Dave
On Dec 15, 2009, at 11:07 AM, Markus Spoettl wrote:
On Dec 15, 2009, at 8:02 PM, David Hirsch wrote:
The same behavior happens in a non-document-based app.
Did you switch off "Release When Closed" for the window
Okay, all: can somebody explain this error to me? The debugger isn't
much help and the problem is not in my code (because I can reproduce
this without writing any code!).
1) Make a new document-based cocoa project in XCode.
2) Open MainMenu.xib in IB, add a new blank window. Set the window
f the error.
-Dave
On Dec 14, 2009, at 3:01 PM, David Hirsch wrote:
(After drafting the first version of this email, I found a sort-of
solution, but I do not understand why it works. I thought that
simple properties (e.g., object.foo) essentially just called the
foo:/setFoo: methods, particu
(After drafting the first version of this email, I found a sort-of
solution, but I do not understand why it works. I thought that simple
properties (e.g., object.foo) essentially just called the foo:/setFoo:
methods, particularly if you used @property (assign). That is
apparently not the
I'm trying to track down a bug. The subject says it all: If I've
created an observer programatically, then saved both the observed and
observer objects with encodeObject:forKey:, will decodeObjectForKey
recreate that observer for me, or do I need to do it myself?
__
This is quite helpful, Quincey, but one thing you wrote surprises me:
If you have a simple 'int' property backed by a single 'int'
instance variable, changing the variable directly in your class
implementation will not generate any KVO notifications. Changing the
*property* -- which in that
Dec 2, 2009, at 4:17 AM, Quincey Morris wrote:
On Dec 1, 2009, at 16:19, David Hirsch wrote:
The problem is, when I add a new Room to the master rooms array,
and then add that room to the roomCosts array of each Course's
roomConstraint, the table column doesn't get updated, unt
-Dave
On Dec 1, 2009, at 4:19 PM, David Hirsch wrote:
First thanks for all the help to date. I'm learning a great deal.
The current problem:
I have a model for which I cannot seem to figure out the correct key
paths for binding.
My doc has a rooms array (of Rooms) and a courses a
First thanks for all the help to date. I'm learning a great deal.
The current problem:
I have a model for which I cannot seem to figure out the correct key
paths for binding.
My doc has a rooms array (of Rooms) and a courses array (with
NSArrayControllers). Each course has a roomConstraint
m in for the sake of docs-obedience anyhow.
Thanks for the help.
-Dave
On Dec 1, 2009, at 2:05 PM, Sean McBride wrote:
On 12/1/09 1:51 PM, David Hirsch said:
Well, that is a nice bit of code to have, but it doesn't really
address the issue. As I wrote in my original post, there are a
nu
to be selected?)
-Dave
On Dec 1, 2009, at 1:44 PM, Sean McBride wrote:
On 11/30/09 7:57 PM, David Hirsch said:
I'm trying to have my table immediately enable editing of added
items.
I have a handy NSTableView category to do that:
- (void)makeEditableSelectedCellOfColumn
I have read about this online, but I can't find a solution that (a)
works and (b) seems wise.
I'm trying to have my table immediately enable editing of added
items. The NSTableView is bound to an NSArrayController. I've
subclassed NSArrayController, and tried this first:
- (void)add:(id)s
oblem.
Thanks,
-Dave
On Nov 29, 2009, at 4:54 PM, Graham Cox wrote:
On 30/11/2009, at 10:31 AM, David Hirsch wrote:
I'm trying to use bindings as much as possible, but I think I need
to do this with actions & outlets. I have a NSArrayController
(courseController) managing an
I'm trying to use bindings as much as possible, but I think I need to
do this with actions & outlets. I have a NSArrayController
(courseController) managing an NSMutableArray (courses) of Course
objects. In order to correctly initialize each Course, I need to have
data from other arrays (
I want to know if I can do this with bindings or not. I've read a
good deal, and tried a few things without success.
My document class has an array of Instructors, with a controller.
Each instructor has a timeConstraint, which in turn has an array of
NSNumbers. I have an NSTableView boun
I think you are missing the point of the quote, which is that drawing
programs are an exception to the typical rule that view data must be
strictly separated from the model ("However, in this case"). When the
model data is all about visual information (drawing), then you have no
choice but
I am starting to write a course-instructor-room scheduling application
with a number of separate lists (e.g., courses, rooms, instructors),
each of which will be fairly short, but might have quite a few
fields. The main application window will be trivial - a set of
buttons, each of which o
So, I'm hearing folks sing the praises of CoreData, which I have not
yet learned. It seems like a long uphill climb, but if life will be
spectacular afterwards, I'll do it. I am a semi-casual programmer;
I've just finished a couple of small programs that do not use
CoreData, and I can see
they
arrive at the phase object (typically in a setter). And this is the
place to record the information needed for undoing the change.
Hope this makes any sense
Kai
On 9.10.2009, at 19:53, David Hirsch wrote:
Hello list-
I have a document-based application. Each document has a NSArray
of p
Hello list-
I have a document-based application. Each document has a NSArray of
phases. Phases is an NSArrayController created in IB and bound to
FIle's Owner.phases. When a given phase is selected in the
NSTableView (bound to phase controller), then its properties show up
in a set of
find their error in the future.
Note that I was thus incorrect: binding works through accessors,
apparently. This was not clear from the docs I had read.
-Dave
On Oct 6, 2009, at 8:21 PM, Graham Cox wrote:
On 07/10/2009, at 2:12 PM, David Hirsch wrote:
I would strongly recommend a pro
On Oct 6, 2009, at 7:56 PM, Graham Cox wrote:
In Interface Builder, I would like to bind a text field to the
current score. When I set up the text field value's binding to
File's Owner.quizResults.currentScore, the app crashes inside
loadNib (inside NSPopAutoreleasePool). Is that expect
Hello list-
Here is part of my app:
@interface ModeQuizDoc : NSDocument
{
QuizResults *quizResults;
}
@implementation ModeQuizDoc
- (id)init
{
self = [super init];
if (self) {
quizResults = [[[QuizResults alloc] init] retain];
}
}
@interface QuizResults : NS
NSArrayController has things like insert: or add:
-Dave
On Oct 5, 2009, at 10:36 AM, Kyle Sluder wrote:
On Oct 5, 2009, at 10:26 AM, David Hirsch wrote:
I (now) realize that I could use the arrayController to populate
the array, but retaining my direct array manipulation and doing the
even without these two lines - how are you populating
the array controller in code ?
Am 05.10.2009 um 19:19 schrieb David Hirsch:
That's right on the money: The array was indeed bound to the
contentArray in IB (otherwise it would never have been able to show
any data), but I need
y controller in a non KVO
way... but still, w/o code not to be discussed.
Cheers,
Volker
Am 05.10.2009 um 18:47 schrieb David Hirsch:
Thanks, Volker. rearrangeObjects did work, but I don't understand
why that call should be necessary. If anybody out there wants to
educate me, I
single [NSArrayController
rearrangeObjects] call or similar.
Volker
Am 05.10.2009 um 18:32 schrieb David Hirsch:
My window has two NSTableViews. Each has two columns, each of
which is bound to a field in Phases, an NSArrayController.
When my window is displayed, I calculate my model, and th
My window has two NSTableViews. Each has two columns, each of which
is bound to a field in Phases, an NSArrayController.
When my window is displayed, I calculate my model, and the
NSTableViews show the headers, but blank data cells. However, when I
click the header of one table, all four
Well, I can work around it but I don't understand this at all.
Apparently the context is flipped, or getPixelAtX:y: is flipped, or
something. In this code, the first NSLog statement gives all zeros,
and the second gives the intended red color. However flipped returns
NO. Any ideas as to
Jonathan, Dave-
Nothing works yet. Dave's NSLog statement prints
"NSCalibratedRGBColorSpace 0 0 0 0", and restoring the graphics
context does not help the problem. Still stumped.
-Dave
This is just as guess, but perhaps there's an issue with the drawing
not being completed and flushed ba
In the code below, the TIFF gets saved correctly (transparent but for
the red square), but when I query the pixel at (40,40) which should be
in the middle of the red square, I get a black pixel (r==g==b==a==0.0):
offscreenRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil
I cannot figure out why this does not work:
Phase *thisPhase = [phases objectAtIndex:i];
float testmode = [thisPhase mode];
float testmode2 = [[phases objectAtIndex:i] mode];
Following along with the code execution in the debugger, testmode gets
35 matches
Mail list logo