On 19 Dec 08, at 19:28, Ken Thomases wrote:
I think your only avenue is to implement explicit KVV methods for
your properties which have the necessary knowledge to test their
type. I suppose you could file a feature request to extend declared
properties so they can synthesize a type-checkin
On 20 Dec 2008, at 8:05 pm, Andrew Farmer wrote:
However, I think you've overengineering things here. The standard
runtime introspection methods, like [NSObject class] and [NSObject
isKindOfClass:], should be more than enough to implement this sort
of functionality.
You might be right a
Sorry to jump in to this a little late, but a guy in our CocoaHeads
group wrote a framework as part of his Master's thesis work. It's a
datastructure framework and contains a bunch of datastructures not
available (publicly) in Cocoa, such as stacks, queues, dequeues, avl/
rb/aa-trees, treap
I have a concern that the direct use of a pointer as a memory address
may have a problem in the case of GC. In Java, object reference is not
a simple memory address because objects may be moved by GC. Does Cocoa
has a GC implementation avoid it?
2008/12/19 Carter R. Harrison :
>
> On Dec 18, 200
The objective-c garbage collector does not move objects, so that is
not an issue with using raw pointers.
Sent from my iPhone
On Dec 20, 2008, at 6:50, "Dong Feng" wrote:
I have a concern that the direct use of a pointer as a memory address
may have a problem in the case of GC. In Java, obj
How do you sort an NSMutableArray, when the difference between the two
objects is determined by information not contained completely within the
objects themselves. ie in Java you can implement a Comparator that takes
two objects to compare then. Is this similar in Cocoa?
ie in this case I need
On Dec 20, 2008, at 6:15 AM, Jacob Rhoden wrote:
How do you sort an NSMutableArray, when the difference between the
two objects is determined by information not contained completely
within the objects themselves. ie in Java you can implement a
Comparator that takes two objects to compare t
Thanks for the idea Mike. Not sure how I could implement this without
sending the notification in every setter of the class though...
Andre Masse
On Dec 19, 2008, at 19:24, Mike Abdullah wrote:
Since you apparently want to just know that one of the fields
changed, but not which one specif
Here is how I arrived at the conclusion that NSRectFill is the
bottleneck. (I cannot show the code because it's spread over objects).
The slowness of redraw is only noticeable when I drag the mouse, e.g.
to resize an object in the custom view. I see that update of the
resized object is always late
Le 20 déc. 08 à 15:22, Oleg Krupnov a écrit :
Here is how I arrived at the conclusion that NSRectFill is the
bottleneck. (I cannot show the code because it's spread over objects).
The slowness of redraw is only noticeable when I drag the mouse, e.g.
to resize an object in the custom view. I se
Sorry for the blank previous mail.
Try to call NSFillRect with the rect pased as parameter in drawRect:
and before applying the scaling method.
As the rect parameter contains the invalid rect in screen coordinates,
you don't have to transform it before filling the rect with white.
Le 20 dé
Hi Eric,
thanks for the quick response.
"Listening" to the Carbon Event you described did it. The only
"disadvantage" is: Now the App depends on Carbon.framework so far it
was Cocoa, Quartz, QuartzCore and ScriptingBridge only
But, between the lines of your reply I could read that the
Le 20 déc. 08 à 15:33, Jean-Daniel Dupas a écrit :
Sorry for the blank previous mail.
Try to call NSFillRect with the rect pased as parameter in drawRect:
and before applying the scaling method.
As the rect parameter contains the invalid rect in screen
coordinates, you don't have to transf
Hi,
is there a public API to catch the new trackpad multi touch events in Mac
OSX?
Regards,
Andreas
___
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 c
MathPaper project chapter 10 in Oreilly¹s ³Building Cocoa Applications²
fails with the following error:
³2008-12-20 11:23:59.664 MathPaper[517] *** -[NSCFDictionary
setObject:forKey:]: attempt to insert nil value²
Note that I am using Xcode 2.4.1. I also have the evaluator copied under
MathPaper
Hi everyone.I am trying to create some animation when to change the size of
a CALayer object.
My code looks like this:
CABasicAnimation * _animation =[CABasicAnimation animation].
[_animation setKeyPath:@"frame.size"];
NSSize _size;
*_size.**width** = 400**;*
*_size.**height** = 300**;*
*_animat
On Sat, Dec 20, 2008 at 5:16 AM, Graham Cox wrote:
> KVV works pretty well for this - it also solves another related situation
> where I can usefully convert objects to other types in some cases - but what
> I still haven't quite worked out yet is how to *prevent* the situation
> arising in the fi
On Sat, Dec 20, 2008 at 7:00 AM, Clark S. Cox III wrote:
> The objective-c garbage collector does not move objects, so that is not an
> issue with using raw pointers.
But note that storing a pointer value in a string like this is still
problematic under garbage collection. It will not act like a
On Sat, Dec 20, 2008 at 9:22 AM, Oleg Krupnov wrote:
> Here is how I arrived at the conclusion that NSRectFill is the
> bottleneck. (I cannot show the code because it's spread over objects).
>
> The slowness of redraw is only noticeable when I drag the mouse, e.g.
> to resize an object in the cust
i have a window with a toolbar, and instead of having a sharp
separation between the toolbar and window, i've created a gradient
from toolbar color to window color (which is simply a custom view
placed over the window). this gradient looks correct on my iMac 24",
and correct on other MacBooks. ho
On Dec 20, 2008, at 9:18 AM, Michael Ash wrote:
When doing things like this you always need to coalesce events before
drawing. If you're triggering a redraw for every event then you always
leave yourself open to problems. The moment that your events come in
faster than your redraws can occur, you
> An NSMapTable can be configured to give either reasonable behavior
> (strong or zeroing weak reference) so use that instead.
Or, in this special case, simply make sure that the dictionary is only used
while the controller is live--especially easy if the dictionary is a private
field of the contr
Hi,
I'm using a master/detail view in my application. If the user select
another row in the master table and the detail has been modified, I
want to present an alert to save, cancel or return to detail. I'm not
using binding here, only datasource and delegate methods. So in -
selectionShou
Hi,
does anyone knows how can I use the NSBezierPath function to create a
circle?
thanx.
___
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-de
On Dec 20, 2008, at 11:35 AM, Amr Nashaat wrote:
does anyone knows how can I use the NSBezierPath function
NSBezierPath is not a "function", but anyway...
to create a circle?
+ (NSBezierPath *)bezierPathWithOvalInRect:(NSRect)aRect
where aRect describes a square.
_
On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash wrote:
> A simple way to do this is to avoid calling setNeedsDisplay: (or its
> friends) directly from your event handler. Instead start a timer with
> some suitably small interval, and set a flag. If the flag is already
> set, don't start the timer, i
It certainly doesn't blend the toolbar to the toolbar to the window,
but I don't see anything else wrong with the gradient.
Why do you want to do this anyway? Note that the gradient will always
look silly on Tiger.
On 20 Dec 2008, at 17:39:16, Chunk 1978 wrote:
i have a window with a tool
I have the "Uses Find Panel" checked for the only NSTextView in a
window, but it does not use a Find panel. I think it used to use the
Find Panel before (but I am not sure). Is there something more that
is needed besides checking that box?
Some other possibilities:
1. I noticed the items i
On Sat, Dec 20, 2008 at 11:28 AM, Richard S. French
wrote:
> Note that I am using Xcode 2.4.1. I also have the evaluator copied under
> MathPaper in targets.
Where is it being copied to? (It is under a "Copy Files" phase, correct?).
Instead of just printing "path set", try logging the value of
On Dec 20, 2008, at 6:49 AM, Joachim Deelen wrote:
Hi Eric,
thanks for the quick response.
"Listening" to the Carbon Event you described did it. The only
"disadvantage" is: Now the App depends on Carbon.framework so far
it was Cocoa, Quartz, QuartzCore and ScriptingBridge only
But,
On Sat, Dec 20, 2008 at 2:10 PM, John Nairn wrote:
> 1. I noticed the items in the Find menu were not connected to any actions. I
> tried connecting them all to performFindPanelAction: (I could not find any
> other options that make sense), but that did not make it work.
Looking at TextEdit's Mai
I'm hoping that all of the asterisks are just artifacts from a copy/
paste maneuver or something, however, if they are not then you're
missing some serious fundamentals. This code will never compile.
Let's just assume a copy/paste issue. If you are wanting to animate
the size of the frame, u
Thanks Kyle. That did solve it. I am guessing it never worked before
and that my original nib file was created before 10.3 and thus did
not use the required performFindPanelAction tags.
I did wire them to the correct actions, by I assume NSTextView
validated according to those tags and sinc
On 20-Dec-08, at 10:56 AM, Andreas Eriksson wrote:
Hi,
is there a public API to catch the new trackpad multi touch events
in Mac
OSX?
No.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comm
On Sat, Dec 20, 2008 at 1:35 PM, Amr Nashaat wrote:
> Hi,
>
> does anyone knows how can I use the NSBezierPath function to create a
> circle?
Have you considered searching the internet? If I take your question
and put it verbatim into Google, the very first hit that comes back
has sample code tha
On Sat, Dec 20, 2008 at 1:51 PM, Kyle Sluder wrote:
> On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash wrote:
>> A simple way to do this is to avoid calling setNeedsDisplay: (or its
>> friends) directly from your event handler. Instead start a timer with
>> some suitably small interval, and set a fl
See -sortUsingFunction:context: in NSMutableArray’s documentation. As
Ricky Sharp has already mentioned, there’s also -sortUsingSelector:,
however if you’re comparing partly with external data you might like
having the void * context provided by this method.
Sincerely,
Rob
On 20-Dec-08, at
Le 20 déc. 08 à 21:14, Michael Ash a écrit :
On Sat, Dec 20, 2008 at 1:51 PM, Kyle Sluder
wrote:
On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash
wrote:
A simple way to do this is to avoid calling setNeedsDisplay: (or its
friends) directly from your event handler. Instead start a timer
wit
Le 20 déc. 08 à 22:47, Jean-Daniel Dupas a écrit :
Le 20 déc. 08 à 21:14, Michael Ash a écrit :
On Sat, Dec 20, 2008 at 1:51 PM, Kyle Sluder
wrote:
On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash
wrote:
A simple way to do this is to avoid calling setNeedsDisplay: (or
its
friends) direct
Okay, I took your suggestions. It seems that my array of characters is
the issue. My ByteCount s and other variables have seemingly correct
values, but the array of chars' value does not change from before it
gets written to. So, I tried a few more ways and no luck.
I tried using a UInt8 *c
On 21 Dec 2008, at 4:39 am, Chunk 1978 wrote:
is there a reason why my
dad's 20 alu iMac 2007 would be displaying this gradient improperly?
Many Macs have 6-bit LCD displays, making them incapable of displaying
32-bit colour, which requires 8-bit pixels. Could that be it?
You might also
On 21 Dec 2008, at 4:07 am, Michael Ash wrote:
You could build a table, either manually or perhaps with the help of
some sort of crazy macro. But there is absolutely no way to get the
NSColor out of -(void)setColor:(NSColor*)c at runtime because that
info simply isn't there.
Yep, I've come t
On 21 Dec 2008, at 5:23 am, Andre Masse wrote:
I'm using a master/detail view in my application. If the user select
another row in the master table and the detail has been modified, I
want to present an alert to save, cancel or return to detail.
Just my 2¢ worth, but this sounds like a ho
On Dec 20, 2008, at Dec 20:12:08 AM, Graham Cox wrote:
On 20 Dec 2008, at 4:52 pm, Graham Cox wrote:
On 20 Dec 2008, at 3:15 pm, Steve Wetzel wrote:
Regarding memory management - does it make more sense to copy the
object to be pushed from within the Stack object rather then
copying it
My app maintains in its managed object context an array of, say,
Potato objects. The potatoes in this central managed object context
come and go occasionally -- someone might throw in a new one, or eat
one. An archived potato is low in calories, consisting of a half
dozen numbers or short
I'm using a master/detail view in my application. If the user
select another row in the master table and the detail has been
modified, I want to present an alert to save, cancel or return to
detail.
Just my 2¢ worth, but this sounds like a horrible UI. If I get
interrupted by an alert ev
On 21 Dec 2008, at 10:52 am, Steve Wetzel wrote:
I guess can simply assign the pointer, but if I do, it seems to me I
will need an NSMutableArray to hold myObj1... myObj10 (or more). If
I do that, what benefit is the stack?
I don't really follow your argument. Presumably you decided you
On 21 Dec 2008, at 11:03 am, Rob Rix wrote:
Not to be picky, but Mail’s accounts pane actually works the way he
describes. If I select an account, uncheck “Include when
automatically checking for new mail” and then select a different
account, it asks me if I want to save the changes before
I had a similar problem and there were serious performance issues
with the built-in sorting. I could make it work with
sortUsingFunction:context:, but the performance depends significantly
on the efficiency of that method (i.e., how much work it takes to
interact with that external data). I
On 2008 Dec, 20, at 10:23, Andre Masse wrote:
I'm using a master/detail view in my application. If the user select
another row in the master table and the detail has been modified, I
want to present an alert to save, cancel or return to detail.
Back to the original question, I always thoug
On Sat, Dec 20, 2008 at 6:58 PM, Jerry Krinock wrote:
> My app maintains in its managed object context an array of, say, Potato
> objects. The potatoes in this central managed object context come and go
> occasionally -- someone might throw in a new one, or eat one. An archived
> potato is low i
On Sat, Dec 20, 2008 at 4:47 PM, Jean-Daniel Dupas
wrote:
> So I think that you're right (and that everything is synchronous) but I also
> think that the 'flush results to screen' blocks until the screen is ready
> and so limit the number of redraw to the refresh rate of the screen.
> If this is e
On Sat, Dec 20, 2008 at 6:52 PM, Steve Wetzel wrote:
> I do see your point Graham but what I am trying to understand is how to work
> with the stack if I don't copy the object to put on it. If I simply push
> the pointer on the stack, it seems that I have to make a lot of objects in
> the code th
On 2008 Dec, 20, at 17:55, Kyle Sluder wrote:
This doesn't make sense... you don't store arrays in managed object
contexts.
Whoops. Indeed, that does not make sense. I should have said that
there are potatoes inserted into the app's central managed object
context. They're not in an arr
On 18/12/2008, at 2:20 PM, Andrew Merenbach wrote:
Is there a reason to use it in the case that one might instead use -
isEqual: or, as was discussed in a recent thread, -isEqualToString:
(which was stated, if I recall correctly, to be optimized for speed
in the case of strings)?
Apologie
On 21 Dec 2008, at 12:26 pm, Jerry Krinock wrote:
On 2008 Dec, 20, at 10:23, Andre Masse wrote:
I'm using a master/detail view in my application. If the user
select another row in the master table and the detail has been
modified, I want to present an alert to save, cancel or return to
Thanks for your replies guys.
This application is a front end to a database with a lot of data
entries and deals with legal data. There's a lot of validations going
on and data integrity is vital. Normally, the user will save or cancel
by clicking a button in the detail view and changes wil
I am doing something very similar to you. I have an application-based
library of potatoes, and each document has a copy of some of those
potatoes. I did this because the document may be opened on another
computer that does not have access to the same library (or as you
mention, the library
On Dec 20, 2008, at 22:00, Graham Cox wrote:
If the UI is part of an inspector-type interface, i.e. modeless,
then just make the change but do it undoably. Performing the Undo
naturally updates any visible UI that matters (KVO/Bindings makes
this trivial).
The main case where a Save/Cance
On Sat, Dec 20, 2008 at 9:29 PM, Jerry Krinock wrote:
> Both. The app-wide MOC has its PSC set to the app-wide PSC, which in turn
> has a persistent store in the Application Support folder.
OK, good, glad I understood you there.
> By UUID, I believe you mean [[[self objectID] URIRepresentation]
On 20 Dec 08, at 02:16, Graham Cox wrote:
On 20 Dec 2008, at 8:05 pm, Andrew Farmer wrote:
However, I think you've overengineering things here. The standard
runtime introspection methods, like [NSObject class] and [NSObject
isKindOfClass:], should be more than enough to implement this sort
61 matches
Mail list logo