I have a menu item that is bound to a target. The menu is resides in
has Auto Enables Items checked which means that it should call -
validateMenuItem on a items target if it is available. However
validate is never called on the target. If I remove the binding and
set the target to one
In that case, you'd want to use the virtual keycode - available as [event
keyCode] - rather than the character code. I thought when you'd posted your
original question, though, you said that you wanted your keyboard event
matching to be dependent on the keyboard layout, so that if you used,
I've setup a temporary managed object context to export data to an
external XML file (persistent store). When I remove the persistent
store from the context, I am getting errors like this:
Exception raised during posting of notification. Ignored. exception:
'The NSManagedObject with
On 1 Apr 2009, at 11:20, Drew McCormack wrote:
I've setup a temporary managed object context to export data to an
external XML file (persistent store). When I remove the persistent
store from the context, I am getting errors like this:
[...]
This has been included to remove the object
On Apr 1, 2009, at 3:34 AM, Ben Lachman wrote:
I have a menu item that is bound to a target. The menu is resides
in has Auto Enables Items checked which means that it should call -
validateMenuItem on a items target if it is available. However
validate is never called on the target. If I
Michael Ash wrote:
On Tue, Mar 31, 2009 at 3:57 PM, Luca C. luca.pazzere...@gmail.com
wrote:
2009/3/31 Ammar Ibrahim ammar.ibra...@gmail.com
If I want to add a track to iTunes, I need to make sure iTunes is
responsive.
Are you sure it is that important? Actually, if you run an AS
script
Hi there, I have to parse a xml return the values for val id
(attribute). I have pasted a sample xml below. response field values
val id=AL Alabama/val . . . val id=WYWyoming/val /values
/field field values val id=1Australia/val . . . val
id=150Zambia/val /values /field /response I am able to
Hello list,
I tried simple program that add first name and last name to address book. I
just loop it to 3000 times.
I am saving the address book outside the loop.
but when it executes its [book save] command, my application goes in to Not
responding mode for few seconds.
Then i tried to save it
Hello everyone,
This seems it should be easy enough but I can't quite figure it out. Normally
when selecting an item in a table view it gets highlighted blue. How do you
disable this highlighting?
Thank you,
Rick
___
Cocoa-dev mailing
We may be able to combine forces here. What I was doing gets the
correct answer from the switch, but what I was finding is that certain
circumstances do not result in a message being sent from the switch.
I forget just now which circumstance it was, but I believe it was a
direct tap on
On Mar 30, 2009, at 5:55 AM, Richard Somers wrote:
I have a basic core data document based application (Hillegass 3rd
Edition, Chapter 11, CarLot). With a single primary window every
thing works. Then a second window is added with a generic master
detail interface using the core data
Am 01.04.2009 um 15:58 schrieb Jo Phils:
Hello everyone,
This seems it should be easy enough but I can't quite figure it
out. Normally when selecting an item in a table view it gets
highlighted blue. How do you disable this highlighting?
This was answered just a few days ago on this
On Mar 31, 2009, at 9:18 PM, Graham Cox wrote:
On 01/04/2009, at 4:46 AM, Eric Gorr wrote:
There is a bug when changing from [[NSCursor arrowCursor] set] to a
NSCursor based on a 64x64 PNG.
Basically, there is some horrible cursor flickering.
For a demonstration of this bug, please
Hi Drew,
When writing a custom to-many accessor in an NSManagedObject
subclass, you need to invoke the correct KVO -will/didChange methods
These are:
-[NSManagedObject willChangeValueForKey:withSetMutation:usingObjects:]
-[NSManagedObject didChangeValueForKey:withSetMutation:usingObjects:]
Hey Graham :
Yeah, I finally figured that out. ;) It now works like a charm.
On 3/31/09 7:20 PM, Graham Cox graham@bigpond.com wrote:
On 01/04/2009, at 1:16 PM, Pierce Freeman wrote:
The global variable is in the Controller.h... Is this what you are
asking
for?
No. Just
Matching on keycode will almost always confuse your users.
There are at least 9 different Cyrillic keyboard layouts supported by
OS X. If you write code that matches the virtual keycode for 2nd rank
11th key, it will match з (ze) for half or those layouts and
п (pe) for the other half.
I've a list of hardware devices in an NSTableView. The contents of the table
view are updated accordingly using the device model (C++) getters in
objectValueForTableColumn and using the device model setters in
setObjectValue.
However, the device model can also asynchronously create (sometimes
On 4/1/09 12:25 PM, has said:
ObjC-appscript is almost entirely thread-safe. You'll need to watch
when using methods that rely on the Carbon Process Manager (some
initializers, -isRunning) as the PM APIs don't appear to be thread-
safe itself
Looking through Processes.h, it would appear that all
On Wed, Apr 1, 2009 at 10:51 AM, Grant Erickson erick...@umn.edu wrote:
I've a list of hardware devices in an NSTableView. The contents of the table
view are updated accordingly using the device model (C++) getters in
objectValueForTableColumn and using the device model setters in
On Wed, Apr 1, 2009 at 10:33 AM, Pierce Freeman
piercefreema...@comcast.net wrote:
Yeah, I finally figured that out. ;) It now works like a charm.
Just for completeness, the plain-language concept to remember is:
// Let there be an NSMutableArray pointer named 'globalVariable'.
On Apr 1, 2009, at 3:34 AM, Ben Lachman wrote:
I have a menu item that is bound to a target. The menu is resides
in has Auto Enables Items checked which means that it should call -
validateMenuItem on a items target if it is available. However
validate is never called on the target. If I
On Apr 1, 2009, at 3:57 PM, Sean McBride wrote:
On 4/1/09 12:25 PM, has said:
ObjC-appscript is almost entirely thread-safe. You'll need to watch
when using methods that rely on the Carbon Process Manager (some
initializers, -isRunning) as the PM APIs don't appear to be thread-
safe itself
On Apr 1, 2009, at 7:17 AM, Vijay Kanse wrote:
is This a behavior of address book for more than 1000 records ? if
it is,
how can i fix it?
You can't. As you've discovered, the AddressBook framework is rather
slow when it comes to large batch operations, and has been since they
Thank you for your reply and my apologies for asking what had been answered a
few days ago. :-) It does lead me to another question though...I'm still a
beginner and I have never overridden a method via subclassing before. Is there
a tutorial you might be able to point me to that could show
On Wed, Apr 1, 2009 at 11:54 AM, Jo Phils jo_p...@yahoo.com wrote:
Thank you for your reply and my apologies for asking what had been answered a
few days ago. :-) It does lead me to another question though...I'm still a
beginner and I have never overridden a method via subclassing before.
Hi Greg, actually /Users/Shared didn't work either. If I am logged in
as admin it works, but if I am logged in as a normal user it doesn't.
My code is:
#define LOG_PATH_FOLDER @/Users/Shared/Library/Preferences/
#define LOG_FILENAME@MyLog.plist
#define LOG_PATH
Matching on keycode will almost always confuse your users.
There are at least 9 different Cyrillic keyboard layouts supported by OS X.
If you write code that matches the virtual keycode for 2nd rank 11th key, it
will match з (ze) for half or those layouts and п (pe) for the other
half. Your
This is not doing exactly what you think it is.
You are certainly right that UIKit calls should /always/ be made from
the main thread, but the performSelector:withObject:AfterDelay
method actually performs the selector on the same thread that you call
it from, not a separate thread. This
On Apr 1, 2009, at 7:51 AM, Grant Erickson wrote:
I've a list of hardware devices in an NSTableView. The contents of
the table
view are updated accordingly using the device model (C++) getters in
objectValueForTableColumn and using the device model setters in
setObjectValue.
However, the
The part that's tripping me up is launch System Preferences and then opening
a certain pane. In Apple Script, I'd say:
*tell* application System Preferences
activate
*set* *the* current pane *to* pane id com.foo.prefpane
*end* *tell*
[[NSWorkspace sharedWorkspace]
On Wed, Apr 1, 2009 at 7:28 AM, Eric Gorr mail...@ericgorr.net wrote:
In the real application, there are some cursors based on 64x64 images. When
switching to these cursors, one sees the cursor quickly jump to a different
position and then back to where it should be. This is very jarring and
On Wed, Apr 1, 2009 at 1:54 PM, Mark Suman mwsu...@gmail.com wrote:
The part that's tripping me up is launch System Preferences and then
opening
a certain pane.
Just open the .prefPane bundle itself - System Preferences.app knows how to
handle the rest. For instance:
[[NSWorkspace
On Apr 1, 2009, at 2:04 PM, Shawn Erickson wrote:
On Wed, Apr 1, 2009 at 7:28 AM, Eric Gorr mail...@ericgorr.net
wrote:
In the real application, there are some cursors based on 64x64
images. When
switching to these cursors, one sees the cursor quickly jump to a
different
position and
A quick question - why are you using a 64x64 image? Couldn't you use a
smaller image?
E.
On Wed, Apr 1, 2009 at 2:09 PM, Eric Gorr mail...@ericgorr.net wrote:
On Apr 1, 2009, at 2:04 PM, Shawn Erickson wrote:
On Wed, Apr 1, 2009 at 7:28 AM, Eric Gorr mail...@ericgorr.net wrote:
In the
I mean a Cocoa bindings kind of binding. e.g. the target binding
of the menu item is bound in IB. The action field of the binding is
set to print:. I'm not talking about the traditional way of
connecting a button/menu item to another object through the basic
control drag from source to
I have a tendency to overcomplicate things. Thanks for the simple solution.
That worked like a charm.
Mark
On Wed, Apr 1, 2009 at 12:07 PM, Sherm Pendley sherm.pend...@gmail.comwrote:
On Wed, Apr 1, 2009 at 1:54 PM, Mark Suman mwsu...@gmail.com wrote:
The part that's tripping me up is
On Apr 1, 2009, at 2:09 PM, Eric Gorr wrote:
On Apr 1, 2009, at 2:04 PM, Shawn Erickson wrote:
On Wed, Apr 1, 2009 at 7:28 AM, Eric Gorr mail...@ericgorr.net
wrote:
In the real application, there are some cursors based on 64x64
images. When
switching to these cursors, one sees the cursor
On Wed, Apr 1, 2009 at 12:15 AM, Nate Weaver natewea...@xtechllc.comwrote:
On Mar 30, 2009, at 5:44 PM, Ammar Ibrahim wrote:
- It's known that if any dialog is open in iTunes it freezes any
communication through the scriptable interface, how can I detect that
and
put all my messages in
On Wed, Apr 1, 2009 at 2:25 PM, has hengist.p...@virgin.net wrote:
Michael Ash wrote:
On Tue, Mar 31, 2009 at 3:57 PM, Luca C. luca.pazzere...@gmail.com
wrote:
2009/3/31 Ammar Ibrahim ammar.ibra...@gmail.com
If I want to add a track to iTunes, I need to make sure iTunes is
responsive.
2009/4/1 Michael Ash michael@gmail.com
No, don't do this. AppleScript is not safe to use outside the main
thread. If you must run AppleScript asynchronously, either spawn a
subprocess to run it or, better yet, don't use AS at all but send
Apple Events in some other way, such as with
On Mar 31, 2009, at 9:34 PM, Trygve Inda wrote:
Using these two calls:
NSRect nsRect = [screen frame];
CGRect cgRect = CGDisplayBounds (displayID);
I get for my two screens:
NSx=0y=0 w=2560h=1600 // screen A
CGx=0y=0 w=2560h=1600
NSx=-1920
Thanks Jonathan. You're absolutely right.
However, when I made the appropriate changes, I have the same issue:
with my new custom remove... accessor, I get the exception, and
without the custom accessor, there is no exception. So something
strange is still going on.
Here is the new
I've setup a temporary managed object context to export data to an
external XML file (persistent store). When I remove the persistent
store from the context, I am getting errors like this:
Exception raised during posting of notification. Ignored. exception:
'The NSManagedObject with
On Wed, Apr 1, 2009 at 10:21 PM, Luca C. luca.pazzere...@gmail.com wrote:
2009/4/1 Michael Ash michael@gmail.com
No, don't do this. AppleScript is not safe to use outside the main
thread. If you must run AppleScript asynchronously, either spawn a
subprocess to run it or, better
Namaste!
I'm having trouble with an implementation of drag-and-drop for a
core-data-based application.
Scenario: I'm implementing the drag destination for file names coming from
an application (like Finder). The receiving window will take the filenames
and create the appropriate records for
On Apr 1, 2009, at 7:17 AM, Vijay Kanse wrote:
is This a behavior of address book for more than 1000 records ? if
it is,
how can i fix it?
You can't. As you've discovered, the AddressBook framework is rather
slow when it comes to large batch operations, and has been since they
switched from
Memo Akten wrote:
Hi Greg, actually /Users/Shared didn't work either. If I am logged
in as admin it works, but if I am logged in as a normal user it
doesn't. My code is:
#define LOG_PATH_FOLDER @/Users/Shared/Library/Preferences/
#define LOG_FILENAME @MyLog.plist
#define LOG_PATH
On Apr 1, 2009, at 12:31 PM, Ben Lachman wrote:
I mean a Cocoa bindings kind of binding. e.g. the target
binding of the menu item is bound in IB. The action field of the
binding is set to print:. I'm not talking about the traditional
way of connecting a button/menu item to another
2009/4/1 Ammar Ibrahim ammar.ibra...@gmail.com
On Wed, Apr 1, 2009 at 10:21 PM, Luca C. luca.pazzere...@gmail.com wrote
I didn't realize the unsafety of NSAppleScript - so I have been quite
lucky, because my usage of applescript in non-main threads haven't caused
me
any problems.
If you like that type of higher-level, more Objective-C-like approach,
you might want to have a look at Objective-XML, and more specifically
the MAX parser ( MAX = Message oriented API for XML):
http://www.metaobject.com/blog/2009/01/iphone-xml-performance.html
On Apr 1, 2009, at 2:04 PM, ammar.ibrahim wrote:
Right now, I'm more confused than I was, hehe. My question is: Why
would I
care about thread safety? Assuming that everytime I communicate
with iTunes
I create a thread and have the communication happen from there,
even if it's
blocking and
Forgive me for being dense. Where is the subtle bug?
The code is using CGMainDisplayID (not [NSScreen mainScreen] which
would be the display with the key window)
CGMainDisplayID is documented as:
===
The main display is the display with its screen location at (0,0) in
global
My mistake, I saw mainScreenRect and assumed it was the frame of what
Cocoa calls the main screen.
-Peter
On Apr 1, 2009, at 2:52 PM, Jesper Storm Bache wrote:
Forgive me for being dense. Where is the subtle bug?
The code is using CGMainDisplayID (not [NSScreen mainScreen] which
would be
Are there any samples of using
NSAccessibilityLinkedUIElementsAttribute? Specifically, I need to do
something like what iTunes does where it links the outline view in
the left navigation with the content view in the middle.
+++
Rich Collyer - Senior Software Engineer
My boss has just discovered the iPhone Field Test mode (described here:
http://www.wirelessinfo.com/content/inside-the-iphone-field-test-mode.ht
m) and was wondering whether there is a mechanism for a regular Cocoa
app to get at that Cell information.
I'm guessing the answer is no, but I figured
Good (otherwise I would have had to change a few things on my side).
The term main is very confusing and I did log the following radar a
while back.
6392495 Confusing documentation for NSScreen
It looks like it has been fixed (and is ready to be included in a
future documentation
Thanks, Dave. The first link does seem to have a workaround for the
crash. (Not sure the second link is the same problem, though.)
Bug filed:
rdar://problem/6747757
The question is whether this is a framework bug or just a
documentation bug. Can anyone from Apple please clarify this?
Hello.
I would like to be able to intercept double clicks on the text in an
NSTextView even if the text is not a link and is not in an
NSTextAttachmentCell. I did try to do this by implementing the
textView: willChangeSelectionFromCharacterRange: toCharacterRange and
comparing the
Hi,
I have some code that draws attributed string to a given location
using given fonts/sizes/styles with [NSAttributedString
drawWithRect:options:].
However, I found that the string were not aways aligned to top on some
fonts when I supply NSStringDrawingUsesLineFragmentOrigin option,
which
I would like to be able to intercept double clicks on the text in
an NSTextView even if the text is not a link and is not in an
NSTextAttachmentCell. I did try to do this by implementing the
textView: willChangeSelectionFromCharacterRange: toCharacterRange
and comparing the initial and the
Yeah, it helps a lot... And hopefully anyone that has this problem will look
at this before writing to any support site. :)
On 4/1/09 8:06 AM, I. Savant idiotsavant2...@gmail.com wrote:
On Wed, Apr 1, 2009 at 10:33 AM, Pierce Freeman
piercefreema...@comcast.net wrote:
Yeah, I finally
On Tue, Mar 31, 2009 at 6:21 PM, Steve Cronin steve_cro...@mac.com wrote:
Folks;
I'm reading input from a text file (stringWithContentsOfFile) I have no
control over.
Testing is going well until a I encounter a phrase is wrapped in curly
quotes.
(Note phrases wrapped in straight quotes are
Dear All,
i m developing one application, my requirement is that when the user opens the
application first time in simulator, i want to display 1.icn file as an app
icn, and if not the first time. then i wana display 2.icn.
is it possible?
Regards,
Fawad Shafi
Using isOn gives you whether the switch is on of off. I'm not sure if
this is what you are looking for. In my case I wanted to know whether
the user is manipulating (touching) the switch, regardless of its
state. I found a way to do it. The code is as follows:
Add this upon creation of the
Just to chime in The RegexKit linked below is absolutely
FANTASTIC. I use it pretty much any time I need to do beyond-basic
text manipulation. RegexKitLite is some NSString categories, allowing
you to do things like [myString isMatchedByRegex:@some regex] and so
on. It's incredibly
Not without hacking something, no. The bundle directory is write-
protected, which means you can't alter Info.plist (which is where the
icon is specified).
Dave
On Apr 1, 2009, at 9:44 AM, fawad shafi wrote:
Dear All,
i m developing one application, my requirement is that when the user
Indeed. I actually already knew that -
performSelector:withObject:afterDelay: executes in the caller's thread
but, in n my haste to throw together a quick test, succumbed to my
thread-safety obsession (thanks to years of Java programming). No
harm, though.
I ended up doing something
For my case, I just needed to know when the value changed. So I
adapted what you came up with to look like this:
[switchView addTarget:self action:@selector(switchTouched:)
forControlEvents:UIControlEventValueChanged];
UIControlEventAllTouchEvents was sending 3 messages to switchTouched:
NSApplication provides the instance method setApplicationIconImage:
At startup (say, the applicationDidFinishLaunching: method) you could
determine what icon you need to display and set it, using the above
method, to the appropriate icns file from your bundle.
Note that this will not
Given that he mentioned running it in the simulator, I was guessing
that he was asking about an iPhone application (upon which assumption
I based my answer).
Dave
On Apr 1, 2009, at 6:24 PM, Kiel Gillard wrote:
NSApplication provides the instance method setApplicationIconImage:
At
Indeed. I actually already knew that -
performSelector:withObject:afterDelay: executes in the caller's thread
but, in n my haste to throw together a quick test, succumbed to my
thread-safety obsession (thanks to years of Java programming). No
harm, though.
I ended up doing something
That's ok, his original question said first time in simulator so I
figured his app had some sort of simulator mode for its first launch.
Kiel
On 02/04/2009, at 11:26 AM, Dave DeLong wrote:
Given that he mentioned running it in the simulator, I was guessing
that he was asking about an
There is no -numberWithString:, no. You'd need to do something like
[NSNumber numberWithDouble:[someStr doubleValue]].
- Bryan
On Apr 1, 2009, at 9:17 PM, Greg Robertson wrote:
I would like to convert an NSString to an NSNumber. Is there a direct
method for this or should I go NSString to
As far as I know, this is the simplest way:
NSNumber *number = [NSNumber numberWithDouble:[@3.14159 doubleValue]];
Kiel
On 02/04/2009, at 12:17 PM, Greg Robertson wrote:
I would like to convert an NSString to an NSNumber. Is there a direct
method for this or should I go NSString to double and
I would like to convert an NSString to an NSNumber. Is there a direct
method for this or should I go NSString to double and then double to
NSNumber?
Thanks
Greg
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
I am using a pull-down NSPopUpButton for a little button which
displays a little menu. The menu has some commands in it, i.e. it's
not a selection menu, the title of the button just displays an icon,
no title, no indication of a current item from the menu. I am calling
(ahem, sending)
Does anyone here know of any Obj-C functional equivalent to Python
generator functions? These are *categorically* different that the
Spotlight API generator functions.
Here's a link in case you're not familiar with them:
http://is.gd/qcYt
Any ideas?
Live Playfully,
Sam
-
If he
I have a view that has hundreds of subviews. The user can control
filters which causes different of the subviews to be presented; the
collection of selected-for-presentation subviews are repositioned in
the super view. I can think of two ways to handle this, and am not
sure which is best:
On 01 Apr 09, at 19:04, Sam Krishna wrote:
Does anyone here know of any Obj-C functional equivalent to Python
generator functions? These are *categorically* different that the
Spotlight API generator functions.
Depends on what you're after. If all you need is to be able to iterate
over an
On 01 Apr 09, at 15:58, Jeff Laing wrote:
My boss has just discovered the iPhone Field Test mode (described
here:
http://www.wirelessinfo.com/content/inside-the-iphone-field-test-mode.ht
m) and was wondering whether there is a mechanism for a regular Cocoa
app to get at that Cell information.
Thank you very much I will do my homework...
Sincerely,
Rick
From: I. Savant idiotsavant2...@gmail.com
To: Jo Phils jo_p...@yahoo.com
Cc: Jens Miltner j...@mac.com; Cocoa List cocoa-dev@lists.apple.com
Sent: Thursday, April 2, 2009 12:02:29 AM
Subject: Re:
I'm trying to determine at runtime if a type is CoreFoundation or
Cocoa, for example NSArray/CFArray. I must use Carbon API however to
determine this before I attempt to use Cocoa methods for introspection.
My first test was to use CFGetTypeID and CFCopyTypeIDDescription but
they both
On Thu, Apr 2, 2009 at 12:33 AM, Ryan Joseph
thealchemistgu...@gmail.com wrote:
I'm trying to determine at runtime if a type is CoreFoundation or Cocoa, for
example NSArray/CFArray. I must use Carbon API however to determine this
before I attempt to use Cocoa methods for introspection.
My
On Wed, Apr 1, 2009 at 9:55 PM, Rua Haszard Morris
r.haszardmor...@adinstruments.com wrote:
I am using a pull-down NSPopUpButton for a little button which displays a
little menu. The menu has some commands in it, i.e. it's not a selection
menu, the title of the button just displays an icon, no
On Apr 1, 2009, at 5:01 PM, Keary Suska wrote:
On Apr 1, 2009, at 12:31 PM, Ben Lachman wrote:
I mean a Cocoa bindings kind of binding. e.g. the target
binding of the menu item is bound in IB. The action field of the
binding is set to print:. I'm not talking about the traditional
way
I'm trying to implement code that downloads contact image from the
net. I thought the following would do...
NSString* mapURL = [currentStringValue
stringByReplacingPercentEscapesUsingEncoding: NSASCIIStringEncoding];
NSData* imageData = [[NSData alloc]initWithContentsOfURL:[NSURL
86 matches
Mail list logo