target/action
Is this the same as the following?
action is sent to target on a click. The other things you mention are either
not detected or not sent on to the target.
I don't quite understand how target/action works under the hood. If I
were an implementor of NSButton, how would I declare
On 24 Jul 2008, at 3:58 pm, Oleg Krupnov wrote:
target/action
Is this the same as the following?
action is sent to target on a click. The other things you mention
are either
not detected or not sent on to the target.
I don't quite understand how target/action works under the hood. If I
Would a system Service be what you're after? These appear under the
application menu Services. Other than that, I know of no supported
way to insert an item into a menu in every program -- although you
might also try an NSStatusItem. Note, however, that with that
solution, the docs
On Thu, Jul 24, 2008 at 9:15 AM, Graham Cox [EMAIL PROTECTED] wrote:
On 24 Jul 2008, at 3:58 pm, Oleg Krupnov wrote:
Currently the Sent Actions section does not even appear in my custom
view's connections menu at all, how would I make it appear?
To clarify: the reason it's not listed is
Mac Developers,
The CocoaHeads: Silicon Valley meeting tomorrow has been canceled.
We may have a meeting next week on the 31st. Please be sure to check
the web site beforehand to be sure.
Steve
http://cocoaheads.org
___
Cocoa-dev mailing list
On 23 Jul '08, at 9:15 PM, Steve Cronin wrote:
Is this code worth it?
if ([M count]0) [M removeObject:O];
OR should I just do
[M remove O];
No, the first line is not worth it. You've added an extra message-send
(which is _not_ cheap) to pre-check something that the NSArray (really
On 23 Jul '08, at 10:19 PM, Adil Saleem wrote:
Hi,Is it possible to make a program that appears as a menu item for
all applications ? Actually i want to make a custom action which i
want to appear in every application's menu (just like About, Quit
etc...) or it can just appear in the
On 24/07/2008, at 4:12 PM, Jens Alfke wrote:
On 23 Jul '08, at 9:15 PM, Steve Cronin wrote:
Is this code worth it?
if ([M count]0) [M removeObject:O];
OR should I just do
[M remove O];
No, the first line is not worth it. You've added an extra message-
send (which is _not_ cheap) to
On Jul 23, 2008, at 11:28 PM, Oleg Krupnov wrote:
Notifications is another point of confusion for me. I would assume
that notifications should be used when multiple observers can be
connected to an event exposed by an object, in contrast to a simple
delegate outlet, which can only have one
On Jul 24, 2008, at 2:02 AM, Matthew Schinckel wrote:
Am I better off in general (ie, adding objects, removing objects,
etc) using an NS(Mutable)Set instead of an NSArray, if I don't need
sorting and duplicate items?
Since the semantics of an NSSet are looser than those for an NSArray
Ok, an item in services menu or a status item will serve my purpose. But i have
no idea how to make a service or a status item. Can you please point me to some
tutorial or document for that ?
Thank you
--- On Wed, 7/23/08, Jens Alfke [EMAIL PROTECTED] wrote:
From: Jens Alfke [EMAIL
Notifications is another point of confusion for me. I would assume
that notifications should be used when multiple observers can be
connected to an event exposed by an object, in contrast to a simple
delegate outlet, which can only have one connected object. Am I
correct?
They're really for
Apple docs on Status Bars are at:
http://developer.apple.com/documentation/Cocoa/Conceptual/StatusBar/StatusBar.html
There's a MacTech article with walk-thru information here:
http://www.mactech.com/articles/mactech/Vol.22/22.02/Menulet/
Tim
On 24 Jul 2008, at 10:46, Adil Saleem
I have a tableView with one column containing an NSNumber. This tableView is
bound to an array and an arrayController is used as well.
In the case of the unsigned NSNumber 2481864868 (signed -1813102428)...
Sometimes when I load my array from the plist it shows up as the positive
value, and
HI!
Cocoa, Obj-c.
How to creat a file in the folder that has limited permissions (read-only)?
Give me example, please.
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com
Le 24 juil. 08 à 14:24, Macarov Anatoli a écrit :
HI!
Cocoa, Obj-c.
How to creat a file in the folder that has limited permissions (read-
only)?
Give me example, please.
You can use NSTask and /usr/libexec/authopen (and pipes)
See man authopen for details.
If it's not enought, you have to
Hi,
I want to serialize and deserialize my objects to/from XML files.
NOTE: My object is not a dictionary, so I am not using the plist.
I have found NSXMLParser for event-driven parsing and I also found
NSXMLDocument for tree-based parsing.
However, I don't see anything to *serialize* my
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
Someone has an example with authorization services.Le 24 juil. 08 à 14:24,
Macarov Anatoli a écrit :
HI!
Cocoa, Obj-c.
How to creat a file in the folder that has limited permissions (read-
only)?
Give me example, please.
You can use NSTask and /usr/libexec/authopen (and pipes)
See man
HI all!
I'm interested in the way Interface Builder, Instruments and probably
a couple of other apps handle drag and drop. You know, how the item
dragged from the Library panel changes depending where it's about to
be dropped.
I've subclassed my table views and overridden the methods to
I think Apple has one, but to find it, you may have to try to search…
http://developer.apple.com/samplecode/BetterAuthorizationSample/index.html
Le 24 juil. 08 à 15:37, Macarov Anatoli a écrit :
Someone has an example with authorization services.Le 24 juil. 08 à
14:24, Macarov Anatoli a
On 23 Jul '08, at 2:20 PM, Nick Zitzmann wrote:
Calling ObjC methods in a signal handler is not a good idea: http://lists.apple.com/archives/Cocoa-dev/2001/Dec/msg00159.html
I didn't find that during my searches. Good to know. I'll remove all
the Cocoa stuff from the handler. Thanks, Nick.
The documentation for NSTableView setSortDescriptors: starts off with
A table column is considered sortable if it has a sort descriptor
that specifies the sorting . I find this a bit puzzling as this is
the documentation for NSTableView, not NSTableColumn.
What is the correct
On Jul 24, 2008, at 8:48 AM, Timothy Reaves wrote:
The documentation for NSTableView setSortDescriptors: starts off
with
A table column is considered sortable if it has a sort descriptor
that specifies the sorting . I find this a bit puzzling as this is
the documentation for
http://developer.apple.com/samplecode/BetterAuthorizationSample/index.html
From the page: This involves putting the privileged code into a
small, privileged helper tool that is run by launchd.
Argh! Since MacOS 10.4 all processes that are spawned from launchd
(and their children) are
On Thu, Jul 24, 2008 at 12:46 PM, Todd Heberlein [EMAIL PROTECTED] wrote:
Argh! Since MacOS 10.4 all processes that are spawned from launchd (and
their children) are *not* audited by Mac's audit system (BSM).
Well it would certainly have been a feat for them to audit launchd
jobs in 10.3! :D
I'm experiencing strange crashes with NSURLConnection
(EXC_BAD_ACCESS). As far as I know, I'm doing nothing strange. I set
up the request, pass it to a connection, and let it start. Then, after
a second or two, the crash comes.
Note that I'm using garbage collection.
I've narrowed it down
Well it would certainly have been a feat for them to audit launchd
jobs in 10.3! :D Speaking of which, can you provide a reference?
This is more than mildly intriguing to me.
I filed a bug report for this about a year ago for 10.4, but I
discovered it when someone complained that access to
You're right, of course (I forgot about this).
I think I decided not to worry about it too much since it shouldn't
make it into production code (if it does, then I did something wrong).
My main goal was to keep the macro as simple as I could (or at least,
not have to break it onto multiple
On Jul 23, 2008, at 10:51 PM, Graham Cox wrote:
2) I have found that IB automatically treats all member variables of
my custom view's class that are of type id or id... as outlets,
i.e. they appear in the list of outlets on Ctrl+click. This is not
always desirable. How do I prevent some of
On 24 Jul '08, at 12:02 AM, Matthew Schinckel wrote:
Am I better off in general (ie, adding objects, removing objects,
etc) using an NS(Mutable)Set instead of an NSArray, if I don't need
sorting and duplicate items?
As always, it depends. For the most part, sets are faster because
I'm having a hard time understanding return values and maybe messaging
in general. I've looked through Programming in Objective-C, Hillegass
Third Edition and through Apple's documentation, but don't seem to
know enough to find the answer or a proper example I can implement.
I have a view
Sijmen,
It seems to be the call to [connection start] that's causing the
crash. The call to [[NSURLConnection alloc] initWithRequest:request
delegate:self] already starts it loading, so there's no need to call
start.
I don't think it should crash -- that may be an Apple bug -- but it
I have a boolean set for my preferences to check whether the user
wants to backup the database at each start. My only question is how
should I do it? I already log whether they want it or not, so I have
got that far.
Should I read the contents of my backup file? How could I find that
This question has been asked, but never answered.
I'm cleaning up a project and removing methods deprecated in
10.4. The method
- (id)openUntitledDcumentOfType:(NSString*)docType display:(BOOL)display
was deprecated in 10.4. It says to use
openUntitledDocumentAndDisplay:error: instead.
On Jul 24, 2008, at 8:20 AM, Oleg Krupnov wrote:
I want to serialize and deserialize my objects to/from XML files.
Have you read this: http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/index.html
?
Cheers,
Ken
___
Cocoa-dev
On Jul 24, 2008, at 7:24 AM, Macarov Anatoli wrote:
Cocoa, Obj-c.
How to creat a file in the folder that has limited permissions (read-
only)?
This is ambiguous. Do you mean there is a folder to which the user
does not have write permissions and you want to create a file within
it? If
On Thu, Jul 24, 2008 at 2:42 PM, James Bucanek [EMAIL PROTECTED] wrote:
What's the 10.4/10.5 equivalent method for creating
a new document of a specific type?
The docs say to use -makeUntitledDocumentOfType:error: and
-addDocument. All -openUntitledDocumentAndDisplay:error: does is fill
in the
Thanks! That's solved it. Submitted as #6100263, just in case.
Op 24 jul 2008, om 20:10 heeft Jeff Johnson het volgende geschreven:
Sijmen,
It seems to be the call to [connection start] that's causing the
crash. The call to [[NSURLConnection alloc] initWithRequest:request
delegate:self]
On Thu, Jul 24, 2008 at 2:37 PM, Garrett Bjerkhoel [EMAIL PROTECTED] wrote:
I have a boolean set for my preferences to check whether the user wants to
backup the database at each start. My only question is how should I do it? I
already log whether they want it or not, so I have got that far.
On Jul 24, 2008, at 4:10 AM, Oleg Krupnov wrote:
Notifications is another point of confusion for me. I would assume
that notifications should be used when multiple observers can be
connected to an event exposed by an object, in contrast to a
simple
delegate outlet, which can only have one
On Jul 23, 2008, at 1:09 PM, Karl Moskowski wrote:
I'm working on a Foundation tool to be used as a launchd daemon.
It's a Leopard-only GC app that uses FSEvents to watch for changed
files.
Can anyone offer any tips or guidance? Thanks.
I have a couple other tips, since you're writing a
Hi, what needs to be done to have Cocoa Touch appear in XCode?
The left -pane in the new project pane shows iPhone and Mac OS X
sections. I click on Applications beneath iPhone and do not see it.
One of the videos for iPhone shows it being there.
thanks in advance.
I have a boolean set for my preferences to check whether the user
wants to backup the database at each start. My only question is how
should I do it? I already log whether they want it or not, so I have
got that far.
Should I read the contents of my backup file? How could I find that
On 24-Jul-08, at 5:52 PM, Chris Hanson wrote:
On Jul 23, 2008, at 1:09 PM, Karl Moskowski wrote:
I'm working on a Foundation tool to be used as a launchd daemon.
It's a Leopard-only GC app that uses FSEvents to watch for changed
files.
Can anyone offer any tips or guidance? Thanks.
I
Once through your run loop is also a good place to hint to the
collector that it should collect if necessary. A non-GC app would
probably bracket the run of the run loop in an autorelease pool. A
decent technique for this is to get the underlying CFRunLoop from
the NSRunLoop (they're
On 24-Jul-08, at 6:28 PM, Jean-Daniel Dupas wrote:
Once through your run loop is also a good place to hint to the
collector that it should collect if necessary. A non-GC app would
probably bracket the run of the run loop in an autorelease pool.
A decent technique for this is to get
Howdie,
I'm playing around with the NSToolTipAttribute in attributed strings
and I seem to be finding that the attribute is not written to the
pasteboard when I cut/paste or drag text around in an NSTextView. Is
this a known issue?
Checking Google I discovered that back in 2004 it was
Looking at my problem further, I'm thinking I should make webServer a
delegate of each of the devices. That would allow me to encapsulate
the HTTP Posts and Gets for all of the devices in a single class. A
device's methods could invoke the webServer delegate when they need to
send
Hello List
I'm working on an app where I have a NSTableView with one column
containing strings.
I want this column to automatically resize itself within the
ScrollView to fit the width of the widest string.
In order to do this I came up with the following code:
Hi Folks,
I have a NSTableview with a datasource consisting of an NSArray of
dictionaries. One column in my table has an NSPopupbuttonCell. The
content and contentValues are bound to a Core Data Account object.
I use a name property as my contentValue.
I'm having trouble changing
On 24-Jul-08, at 6:05 PM, David Parker wrote:
Hi, what needs to be done to have Cocoa Touch appear in XCode?
iPhone SDK
--
Until an announcement is made otherwise, developers should be aware
that the iPhone SDK is still under non-disclosure (section 5.3 of the
iPhone Development
Aha, that makes sense, pity it's not in the documentation I was
referring to:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScroller_Class/Reference/Reference.html#/
/apple_ref/doc/uid/2340-1956
I'll fill in the feedback.
(alas, I'll have to have a
Try using -boundingRectWithSize:options:attributes instead with
NSStringDrawingUsesDeviceMetics.
Aki
On 2008/07/24, at 14:23, Jacob Ole Juul Kolding wrote:
Hello List
I'm working on an app where I have a NSTableView with one column
containing strings.
I want this column to automatically
On Thu, Jul 24, 2008 at 1:35 PM, Nate Weaver [EMAIL PROTECTED] wrote:
You're right, of course (I forgot about this).
I think I decided not to worry about it too much since it shouldn't make it
into production code (if it does, then I did something wrong). My main goal
was to keep the macro as
i have an NSTableView that uses a data source (no bindings, but i
don't think this is relevant). one column uses a custom cell that is
actually a subclass of NSTokenFieldCell (but i don't think this is
relevant either). i draw this cell differently depending on whether
or not the row it is in
On Jul 24, 2008, at 8:20 AM, Nicolas L. wrote:
HI all!
I'm interested in the way Interface Builder, Instruments and
probably a couple of other apps handle drag and drop. You know, how
the item dragged from the Library panel changes depending where it's
about to be dropped.
I've
I have a view embedded in a NSScrollView. When the view is small
there's a large expanse of grey visible. I'd like to draw a drop-
shadow around the view in this situation to help it stand out slightly
from the background. What's a good approach to do this?
tia,
cheers, Graham
Are you just trying to delete old array controllers that are in entity
mode? You'll have to go through each array controller one by one and
take a look at which entity they've been assigned.
Once you delete the controllers, the bindings to those controllers
will be deleted as well. So this
On Jul 21, 2008, at 8:52 PM, Todd Heberlein wrote:
Is there a way to link a controller (e.g., the NSArrayController) to
my NSDocument's NSUndoManager without having to add a bunch of code
to my NSDocument subclass?
For example, in Hillegass's book, the first example of RaiseMan
(Chap 8)
I have a window with a bunch of text fields. I also have an Apply
button which takes the current settings and applies them to the data
model.
If I have edited text in a field but not hit return or tab or anything
else that triggers target/action, the edit is ignored. So I need a way
to
It's not trivial, but you want to create a transparent window and show
it while simultaneously returning an empty image. Then in the
draggedImage:movedTo method you can update the position of the window
and depending on ui window element it is over, change the shape.
~Phil
On Jul 24,
Hi Graham,
Try -[NSControl validateEditing].
Validation sets the object value of the cell to the current contents
of the cell's editor (the NSText object used for editing), storing it
as a simple NSString or an attributed string object based on the
attributes of the editor.
-Ken
On Thu, Jul
I should mention I'm not using Core Data - by data model I mean my
own d/m code.
Mmmm, coffee... now there's a thought.
Graham
On 25 Jul 2008, at 12:30 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Apologies for the off-list reply, work email addy..
Try [managedObjectContext
Hey everyone!
Singapore CocoaHeads is being held today (25 Jul 08) from 7 - 9pm!
Location:
iShop
#03-04 Orchard Cineleisure
8 Grange Road
Proceed to training room 3, or just ask the shop floor staff about
Singapore CocoaHeads and they'll direct you to where we're meeting.
CocoaHeads is a group
Graham Cox wrote:
I need a way to commit ... pending edits
as part of my response to the Apply button.
I don't know that this is the correct way, but there is a built-in mechanism
that will do what you want:
If you were to makeFirstResponder nil for the window containing the text field,
You need to call this on the NSTextField's cell:
setSendsActionOnEndEditing:YES
Hope it helps.
-Chaitanya
On 24-Jul-08, at 10:23 PM, Graham Cox wrote:
I have a window with a bunch of text fields. I also have an Apply
button which takes the current settings and applies them to the data
On Jul 24, 2008, at 9:23 PM, Graham Cox wrote:
I have a window with a bunch of text fields. I also have an Apply
button which takes the current settings and applies them to the data
model.
If I have edited text in a field but not hit return or tab or
anything else that triggers
chaitanya pandit wrote:
You need to call this on the NSTextField's cell:
setSendsActionOnEndEditing:YES
sendsActionOnEndEditing appears to be ON by default. And it doesn't affect
pending edits anyway. The problem is how to cause textDidEndEditing to fire.
Hence my suggestion to
I have a problem about ABAddressBook, i want get
NSData with ABPerson'
vCardRepresentation fuction,the NSData is vcard 3.0
formatter,but i want to get vcard 2.1 formatter, how
to get vcard 2.1 formatter with vCardRepresentation,
follow is my code :
ABPerson* thePerson = [theArray
70 matches
Mail list logo