Markus,
If your app is Leopard only, you better checkout:
NSTrackingArea at:
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjec
ts/chapter_7_section_4.html#//apple_ref/doc/uid/1060i-CH8-
DontLinkElementID_30
NSTrackingArea has methods to
On Jul 1, 2008, at 7:16 PM, mmalc Crawford wrote:
On Jul 1, 2008, at 4:33 PM, Graham Cox wrote:
I also have a number of methods that allow things to be added
from arrays, or indexed by an index set. Is there a way to make
these KVC/KVO compliant or would they all
have to call through to
Apologies for suggesting what you had already tried. I had overlooked
the original message!:-)
Regards
Shripada
On Jul 1, 2008, at 10:10 PM, Shripada Hebbar wrote:
If your app is Leopard only, you better take a look into
NSTrackingArea at:
Hi,
Thank you for all of your comments Ken, very helpful.
On 2 Jul 2008, at 09:16, Ken Thomases wrote:
custom class (say, Preferences) -- again, making the dictionary an
implementation detail -- and making the keys into properties of the
Preferences class. In either case, there should be
On 1 Jul 2008, at 18:20, [EMAIL PROTECTED] wrote:
Hello,
I have a date event returned as a date time string from a feed in the
following format,
Tue 01 Jul 2008 15:00:00 +0100
I'm assuming this is GMT plus one hour, I'd like to convert this
string to
the to a more user friendly date
On Jul 2, 2008, at 3:16 AM, Ken Thomases wrote:
As a model object, NSMutableDictionary is somewhat problematic. It
is only KVO-compliant if it is modified with setValue:forKey:. Any
change made via setObject:forKey:, the NSMutableDictionary primitive
method, is not broadcast to
On Jul 2, 2008, at 5:12 AM, dreamcat7 wrote:
Thank you for all of your comments Ken, very helpful.
You're welcome.
On 2 Jul 2008, at 09:16, Ken Thomases wrote:
custom class (say, Preferences) -- again, making the dictionary
an implementation detail -- and making the keys into properties
On Tue, Jul 1, 2008 at 6:18 PM, Keary Suska [EMAIL PROTECTED] wrote:
When I modify their contents, they are modified using setObject:forKey:,
-setValue:forKey: is the KVO-compliant mutator.
--Kyle Sludert
___
Cocoa-dev mailing list
Replying to myself...
On Jul 2, 2008, at 4:51 AM, Ken Thomases wrote:
You should probably implement your removeObjectsInArray: in terms of
-[NSArray indexOfObjectIdenticalTo:] and removeObjectsAtIndexes:.
You know what? That would probably be tedious and error-prone. Given
that you
Thanks for that Ken, that's a very useful heads-up that I wasn't
previously aware of. I was part way through changing the code when I
got this, and it meant I could back out most of the changes. It's
working well now... I did go with your suggestion here for -
removeObjectsInArray: since it
On Wed, 2 Jul 2008 00:20:53 -0400, Moses Hall [EMAIL PROTECTED] said:
Hi folks,
Here's a problem I'm having under Tiger, developing an LSUIElement
application (Input Method server -- it's the UI for IPA Palette
[www.blugs.com/IPA]). I have an NSTabView, one of whose panes has a
search field which
On 2 Jul 2008, at 12:14, Ken Thomases wrote:
See my other message. Turns out I was wrong about
NSMutableDictionary and KVO. :(
Yes, but your main point which was not to expose it - still true.
If you really need for there to be a dynamic set of properties,
you can accomplish that using
Hi There,
I have been scratching my head and trying everything to get this to
work and as a noob I find the docs a bit sparse of real world
examples.
I am trying to get performSelector: withObject: afterDelay to work but
not sure what to stick where.
I have a bit of static text I set with a
On 2 Jul 2008, at 15:09, Papa-Raboon wrote:
Hi There,
I have been scratching my head and trying everything to get this to
work and as a noob I find the docs a bit sparse of real world
examples.
I am trying to get performSelector: withObject: afterDelay to work but
not sure what to stick
On Jul 2, 2008, at 9:23 AM, Mike Abdullah wrote:
On 2 Jul 2008, at 15:09, Papa-Raboon wrote:
I have a bit of static text I set with a value of: @record Added
with the following: [complete setStringValue:@Record added]; and I
want it to disappear after 3 seconds and I thought the easiest way
If all else fails, maybe you could check the screen to see if the menu
bar is being displayed.
As this is off topic please reply off list.
On 2 Jul 2008, at 09:01, Толя Макаров wrote:
By loginwindow.app I meant when there is a user in login window
after ScreenSaver. And by loginwindow.app
Yeah, to me it is... although I still agree that it's not an ideal
solution for a Cocoa application...
By the way, assuming you change char *args[] = { -a, Safari,
NULL }; to char *args[] = { /usr/bin/open, -a, Safari, NULL };
the exec* example actually works while the LaunchServices
Dear all,
after 2 years of objective-c/Cocoa programming I feel I need to see a
code doctor. One of the app we publish is now widely used and I feel
it needs a serious screening. I have learned from scratch, with no
prior programming experience. I think 2 days would do. I live in
Geneva,
As a general rule, the tracking rects are smaller then the whole
window, and technically need the mouse to enter/exit, which I don't
see happening, if they are the same size.
Try something like:
[[mWindow contentView] addTrackingRect:NSInsetRect([mWindow frame],
[mWindow
Change the owner: parameter from [mWindow contentView] to self, or
whatever class instance has the enter/exit methods.
On Jul 2, 2008, at 2:10 PM, Wesley Smith wrote:
Hi Tony,
Thanks for the response. I'm still not getting the trigger. Based on
your advice, I changed the code to:
NSRect f
I've disabled column sorting. When I click on the header it seems to
select the entire row.
You mean, 'column', not row, right?
try setAllowsColumnSelection:NO
..corbin
I want to disable this functionality, partly because it is
meaningless for my app, and partly because I would like to
On Tue, Jul 1, 2008 at 5:29 PM, Wesley Smith [EMAIL PROTECTED] wrote:
Hi,
I'm trying to get the following events to trigger:
- (void)mouseEntered:(NSEvent *)theEvent
- (void)mouseExited:(NSEvent *)theEvent
I'm using this call to get it to work:
[[mWindow contentView]
Say I have a method that needs to return two equally important values
(in my case, a string and an offset into it). I am overthinking how
to do it, and I though it would be interesting to see what others have
done.
I see these opportunities (my use of 'object' and 'value' is blurred
If it were an oft-used pair, I'd probably make a struct to hold them
together, but if it's a just-this-one-method, just-this-one-time thing
I'd settle with a Dictionary.
Of course, you do have one more option: pass-by-reference or pointer.
I've never been a big fan, personally, because I prefer
On Wed, Jul 2, 2008 at 1:48 PM, James Montgomerie [EMAIL PROTECTED] wrote:
2) Define a custom C struct (like NSRect, but with e.g. 'string' and
'offset' members) and return objects in it. Just like any other returned
objects, the caller would be expected to retain them individually if it
if you have the @property statement, and you use the I think @synthesize
(could be wrong about that) you don't need to write the functions yourself.
Try taking out the @property statement.
On Wed, Jul 2, 2008 at 10:13 AM, Milen Dzhumerov [EMAIL PROTECTED] wrote:
Hi all,
I've run into a
On Jul 2, 2008, at 3:22 PM, Andy Lee wrote:
There is quite a bit of precedent for methods of this form -- in
the Xcode documentation window, you can
...enter get in the searchf field, and *then*...
do an API Starts With search, sort by language, and look at the
Objective-C methods.
I'd use an NSArray for this, wrapping the offset in an NSNumber.
Joel
P.S. Note to Mr. Butler:
The correct term is complement; not compliment.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
On Wed, Jul 2, 2008 at 12:27 PM, Antonio Di Ferdinando
[EMAIL PROTECTED] wrote:
Does anybody know what's wrong with this? Or, alternatively, other
solutions?
For one, the Cocoa-Java Bridge is deprecated, so I wouldn't be
surprised if you are actually running into a problem that Apple will
When I find myself in the situation you describe, my first instinct is
to re-examine the basic design to see if the code can be re-
structured. In your case, a better approach might be to have two
separate methods, one which just returns the string, and another which
takes a string as
You might want to take a look at doing it in regular Objective-C using
Apple's QuickTime Kit framework.
http://developer.apple.com/documentation/QuickTime/Conceptual/QTKitProgrammingGuide/Chapter01/chapter_1_section_1.html#/
/apple_ref/doc/uid/TP40001245-CH202-TPXREF101
-- Ilan
On Jul 2,
So it seems I need to do more bookwork myself, but I'm wondering
which
direction others would recommend:
a) Set up a single tracking area for the whole view, and perform
all my own
hit testing every time the mouse moves.
b) Keep the per-item tracking areas, but perform my own testing in
2) Define a custom C struct (like NSRect, but with e.g. 'string' and
'offset' members) and return objects in it. Just like any other
returned objects, the caller would be expected to retain them
individually if it needed to keep them around.
I'd probably do it this way if the method was
On Jul 2, 2008, at 10:13 AM, Milen Dzhumerov wrote:
I've run into a something I find strange. I've got a property
declared as:
@property(readwrite, assign, nonatomic) CGImageRef image;
...
When I try to set it using KVC (e.g. [obj setValue:[NSValue
valueWithPointer:image]
On 03/07/2008, at 3:13 AM, Milen Dzhumerov wrote:
[snip]
Any hints on why the class is not KVC-compliant? I've read the docs
and it seems to satisfy the bullet points listed (moreover it's even
declared as @property so the naming of the setters / getters should
be alright).
Pointers
On Jul 2, 2008, at 12:26 PM, Alex Wait wrote:
if you have the @property statement, and you use the I think
@synthesize
(could be wrong about that) you don't need to write the functions
yourself.
Today I took some time again to test my app on more architectures than
just i386, and I'm encountering a strange problem on PowerPC with a
custom view that hosts Core Animation layers. While other built-in
views like NSButton are redrawing fine, none of my custom layer-
hosting view's
On Wed, Jul 2, 2008 at 4:59 PM, Antonio Di Ferdinando
[EMAIL PROTECTED] wrote:
Everything is done in Java and, since I need to integrate this tony bit into
it, I need to use Java.
I see. Perhaps some form of inter-process communication is best,
then. Especially if you're dealing with
On Tue, Jul 1, 2008 at 2:01 PM, JongAm Park
[EMAIL PROTECTED] wrote:
Is this a bug? regression?
It may be a bug, but it's certainly not a regression. It would be a
regression if the issue were on Leopard and not on Tiger. You have
the opposite issue, which is more typical.
--Kyle Sluder
I have an NSTreeController bound to a data model:
[m_rulesDMTreeController bind:@contentArray
toObject:rulesDM
withKeyPath:@rules
options:nil];
and an NSTableColumn(inside an nsoutlineview) bound to the
On 1 Jul 2008, at 17:19, Ron Lue-Sang wrote:
On Jul 1, 2008, at 12:05 AM, Andy Kim wrote:
Thanks - I've seen solutions like this before, I just wanted to
get it working the regular way!
I totally understand the sentiment.
Is itemForPersistentObject expecting an NSTreeNode? You say you
Matt Neuburg wrote:
What's the purpose of this test? Is it necessary? Is it working? Try putting
an NSLog inside the test to see whether it is passing/failing when you think
it should be.
Thanks for the the response, Matt.
The if ([[item identifier] isEqual:@Search]) is to avoid stealing
key
El 30/06/2008, a las 19:33, [EMAIL PROTECTED] escribió:
hey,
I have a project that uses Bonjour for some of its communication,
theres a server and a client, and I was having tremendous difficulty
getting it to work, pouring and pouring over my code, only to
discover some weeks later that
Hi All,
I'm writing a program with a helper agent. The agent runs in the
background, occasionally putting up alerts for the user to see. When the
main program is running, it communicates information to the agent about
what alerts to display. Then, the agent remembers this information after
I need some way for the agent to save its list of alerts in case the
user logs out or shuts down. The list is stored as an
NSMutableDictionary. Thoughts?
NSUserDefaults?
--
I.S.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please
I thought of that, and it's certainly a possibility, but it seems mainly
intended for preferences. I was wondering, before I turn to that, if
there's some other way of doing it that's more designed for this.
Thanks,
Daniel
I. Savant wrote:
I need some way for the agent to save its list of
On Jul 2, 2008, at 5:21 PM, Daniel Richman wrote:
I thought of that, and it's certainly a possibility, but it seems
mainly intended for preferences. I was wondering, before I turn to
that, if there's some other way of doing it that's more designed for
this.
-[NSDictionary
On Jul 2, 2008, at 4:04 PM, Hamish Allan wrote:
This is a rather unuseful attitude to take. Clearly, this thread
started as a result of the distinction. Also, Apple's own
documentation disagrees with you, as it states that Cocoa bindings are
built on KVB.
No, it doesn't.
Cocoa bindings is
On Jul 2, 2008, at 7:04 PM, Hamish Allan wrote:
On Wed, Jul 2, 2008 at 5:31 PM, Scott Anguish [EMAIL PROTECTED]
wrote:
Key value Binding and Cocoa Bindings are the same thing.
Key-Value Binding is implemented at the foundation level. Cocoa
Bindings is
the name used for the additional
On Jul 1, 2008, at 11:45 AM, lbland wrote:
If you have to bind your entities to anything then you might try a
Core Data representation.
No, don't do this.
As the documentation takes pains to point out, Core Data is not an
entry-level technology. If you're still trying to get your head
On Jul 2, 2008, at 6:33 PM, Ken Thomases wrote:
On Jul 2, 2008, at 5:21 PM, Daniel Richman wrote:
I thought of that, and it's certainly a possibility, but it seems
mainly intended for preferences. I was wondering, before I turn to
that, if there's some other way of doing it that's more
Thanks! This is perfect.
Ken Thomases wrote:
On Jul 2, 2008, at 5:21 PM, Daniel Richman wrote:
I thought of that, and it's certainly a possibility, but it seems
mainly intended for preferences. I was wondering, before I turn to
that, if there's some other way of doing it that's more
On Wed, Jul 2, 2008 at 6:09 PM, Joan Lluch (casa) [EMAIL PROTECTED] wrote:
Basically, all you have to do is to always return autoreleased objects from
your methods, and always send release to objects that you created with alloc
or were returned by any method containing new or copy. Also, if you
It would be a nightmare to recreate them by hand... , especially for the big
project which needs to move to Cocoa..
No better method?
On Mon, Jun 30, 2008 at 3:37 AM, Christopher Pavicich [EMAIL PROTECTED] wrote:
Hi:
There is no way to automatically convert a Carbon Interface Builder
In OSX up to 10.4 we could use Contextual Menu Workshop and similar
(based on carbon) to make your own CM for finder.
Now for 10.5 I have been searching the devdocs and hit a wall.
Does anyone have any pointers to how I can make a menu item appear for
my backup/restore gadget? Cocoa based
This question was asked recently on the carbon-dev list and the
answer was that there is no way to automate the process, nor even a
method to get you part-way. Unfortunately this is likely to be one of
those painful transitions for you...
On Jul 2, 2008, at 8:31 PM, Fosse wrote:
It would
56 matches
Mail list logo