Great, got it working now. Thanks a lot for the lead... to be honest
pulling the dataSource's strings feels a bit hackish but at least it's
confined to the controller class that is the table's dataSource, so
it's a unique place in my app anyway. Works a treat ;-)
I also feel I understand
On 20 Apr 08, at 18:55, John Joyce wrote:
Looks like I found a solution... anyone please let me know if my
solution stinks. (or any of the rest of this thing!)
In the method
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
I added this:
[textView setString:[[stickitNotes
Thanks Graham - I have updated my code as well.
I also think I solved the focus problem. Tried most of the responder
methods without luck so I took a different tack. I realized that I
would only have 3 views that could grab the focus so I created a
global variable 'currentResponder' (will
Hello everyone,
I can't seem to get this to work, yet it seems like it should be so
easy. I have an NSBitmapImageRep, and I want to crop it to a given
NSRect. The code I've attempted so far is this:
// Create an NSImage for the current image rep
NSImage *source = [[NSImage
On 21 Apr 2008, at 9:43 pm, Daniel Thorpe wrote:
[source compositeToPoint:NSZeroPoint fromRect:extent
operation:NSCompositeSourceIn fraction:1.0];
Try using NSCompositeSourceCopy here instead.
G.
___
Cocoa-dev mailing list
Hi,
I have some code that sometimes needs to cancel aka stop a running
NSViewAnimation and start another. It seems on Tiger the real view
coordinates are animated but on Leopard only an proxy is anmiated.. -
on Leopard the view with the stopped animation is very visibly redrawn
at the
Oops, I meant NSCompositeCopy
g.
On 21 Apr 2008, at 9:55 pm, Graham Cox wrote:
On 21 Apr 2008, at 9:43 pm, Daniel Thorpe wrote:
[source compositeToPoint:NSZeroPoint fromRect:extent
operation:NSCompositeSourceIn fraction:1.0];
Try using NSCompositeSourceCopy here instead.
G.
Hard to tell from the code posted. Maybe extent is incorrect?
You can just draw the source imageRep directly - you don't have to
wrap it in an image, and given that you just want a straight copy
it'll be simpler too. Use [imageRep drawAtPoint:...] This may not have
a bearing on your
On Apr 21, 2008, at 6:45 AM, [EMAIL PROTECTED] wrote:
Date: Mon, 21 Apr 2008 01:16:56 -0700
From: Andrew Farmer [EMAIL PROTECTED]
Subject: Re: After Unarchive Object Exists, After First GUI Action,
gone...
To: John Joyce [EMAIL PROTECTED]
Cc: cocoa-dev@lists.apple.com
Message-ID:
The extent rect is correct, I've double checked that.
Looking at the docs for NSImageRep's drawAtPoint and drawInRect
methods, it looks like they only allow you to draw the whole image
rep, not a rect within the rep.
I think the problem might be that the cropping is working fine, it's
Cursor-tracking glitches, where the cursor doesn't revert when
exiting a view, are really common in Cocoa apps. I see them in all
kinds of apps, even major Apple ones like Mail and Xcode. I think
it's due to bugs in AppKit, unfortunately. These bugs have been
around since at least 10.0,
Niklas:
I'm no expert on Web Services on Objective-C, but I've been playing
around with them a bit. One thing that I have discovered is that
CFTypeRef is not _always_ a dictionary. In some cases, it wants a
string. For example, if you run WSMakeStubs on the National Weather
Service's
Message: 1
Date: Sun, 20 Apr 2008 14:02:52 -0600
From: Keary Suska [EMAIL PROTECTED]
Subject: Re: Binding NSButton enabled state
To: Cocoa-Dev (Apple) cocoa-dev@lists.apple.com
Message-ID: [EMAIL PROTECTED][EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII
on 4/20/08
On 21 Apr 2008, at 11:21 pm, Daniel Thorpe wrote:
The extent rect is correct, I've double checked that.
Looking at the docs for NSImageRep's drawAtPoint and drawInRect
methods, it looks like they only allow you to draw the whole image
rep, not a rect within the rep.
True, but if you
Right, well, I've solved my problem, but using a completely different
method. I still don't know/understand how to crop an NSImage to a
smaller NSRect within the image's bounds.
However, this is what I've done to solve this...
// imageRep is my NSBitmapImageRep which contains the
Message: 1
Date: Sun, 20 Apr 2008 14:02:52 -0600
From: Keary Suska [EMAIL PROTECTED]
Subject: Re: Binding NSButton enabled state
To: Cocoa-Dev (Apple) cocoa-dev@lists.apple.com
Message-ID: [EMAIL PROTECTED][EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII
on 4/20/08
On Apr 21, 2008, at 8:35 AM, Ewan Delanoy wrote:
[theButton setTitle:[NSString stringWithFormat:@Put a n with a
tilde,like this : %c,0X00F1]];
Unfortunately, at runtime the exotic character is displayed
incorrectly:
it appears as
a breve (Unicode character number 02D8 instead of 00F1).
I am trying to understand NSCollectionView with Apple provided sample
IconCollection. I would like to write an action code to handle selection of
items in this collection view. How do I do it ?
thanks,
Leo
I've run into some trouble using revert with NSUserDefaultsController:
It doesn't work. My settings do not revert to their previous settings. I'm
working on a prefs window and what I want to have happen is if a user clicks
the cancel button, any changes made are reverted to their previous setting.
%c is interpreted at runtime according to the default string
encoding for that process. This depends on what the user's preferred
language is set to, but for English and most European languages it's
MacRoman. That choice makes sense for backward-compatibility reasons,
but nowadays it tends
My app has a 3D view window that displays a large OpenGL view over
most of it's surface, along with a group of controls that run down the
left side of the window. The user can resize the window quite small,
which makes some of the controls disappear off the bottom of the
window. My
on 4/21/08 2:06 AM, [EMAIL PROTECTED] purportedly said:
I am trying to figure out how to calculate a running total using core
data. I have created an entity called Transactions that have the
following properties.
Transactions
amount
balance
snip
This routine only copies the amount
Le 21 avr. 08 à 16:48, Jens Alfke a écrit :
On 21 Apr '08, at 6:35 AM, Ewan Delanoy wrote:
It seems clear that this is a conflicting encoding issue, but between
which encodings?
coming from where? (The default file encoding is Unicode UTF-8 in
the
Xcode preferences, and it seems there is
On Apr 20, 2008, at 11:37 AM, Manfred Schwind wrote:
Getting the height of a text for a given width is easy and I've done
that countless times.
Also getting the width of a string (layed out in one line if it has
no newlines) is no problem.
But I have a different problem. I try to give an
When I compile then launch my app, I get this message on the Console
Could not find image named 'icnabcd'.
Now, there is no such an icon named that way on my nib file.
Anyway I started a search on the project and found the following lines in
the Nib file
object class=NSCustomResource
On 21 Apr 2008 07:41:25 -0700 , Jens Alfke [EMAIL PROTECTED] wrote:
On 21 Apr '08, at 6:22 AM, Ling Wang wrote:
Do you mean that it is unclear why this happens and there is no way
for application developers to avoid this annoyance?
As far as I know, yes. :-(
Jens
Perhaps it's not
Is the view drawing on a thread other than the main thread?
That might not be allowed (I'm not sure about Cocoa...in
Carbon this was never possible).
For the doesNotRecognizeSelector case, do you see any compiler
warnings about this? That would at least show if it's your
code that's referring
First issue I see is how you can know what transaction objects occur prior
to any given object. I don't think you can rely on objects being retrieved
in any specific order that your data model doesn't enforce.
You're correct - you can't rely on the order in which instances are
fetched.
... of course, even if you use a predicate to specify a date range,
the transaction order still doesn't matter. I digress.
Sorry - this is confusing. I meant to delete this paragraph after I
realized that the OP is talking about a running balance after each
transaction, rather than the
On Apr 21, 2008, at 4:55 PM, Kevin Grant wrote:
Is the view drawing on a thread other than the main thread?
That might not be allowed (I'm not sure about Cocoa...in
Carbon this was never possible).
No, it all happens on the main thread.
For the doesNotRecognizeSelector case, do you see any
I have a simple test application with a few custom menu items. Let's
assume that _none_ of these items has a key equivalent of COMMAND +
(right arrow) for now.
When the first responder of the application is an NSTextField, and the
user produces COMMAND + (right arrow), the insertion point is
(By the way, in 10.5, GCC now allows you to use non-ascii
characters in string literals right in your source code. So there's
no need to construct a string with an $(D+P(B in it
programmatically, as long as you're building with Xcode 3.0.)
What will be the output encoding in this case
Folks;
I'm having some difficulty getting consistent contextual menu behavior
in NSTableView.
In the Finder and iTunes (what I feel most users are familiar with) if
a row is selected but the user causes a contextual menu on a different
row then row selection changes.
(I don't want to
In The Path Of Key Events in the URL you posted, the #1 item in the
list is key equivalents.
AppKit checks keyDown events to see if command is held; if it is, it
tries to match it against the menus before passing it through the
responder chain.
I think your best bet is to dim your menu item or
I seem to recall that in 10.5 there is new API, either in
NSTableView or NSActionCell, that makes this easy to do; but I just
looked through both headers and can't find it. Does anyone else
remember?
Yeah, I remember. The DragNDropOutlineView demo shows how.
Basically, you implement:
On Apr 18, 2008, at 3:37 PM, John Stiles wrote:
Ben Lachman wrote:
Well, you should be able to just override the drawing code, since
thats really your problem. Going directly against the docs,
while it may work fine now, is playing with fire in my opinion.
Yeah… that's why I posted :)
Hello,
I have built and runt the OpenGLScreenSnapshot app successfully using
the sample code available here:
http://devworld.apple.com/samplecode/OpenGLScreenSnapshot/index.html
The app permits to take a picture of the screen.
While running the OpenGLScreenSnapshot app, one must select the
On Apr 21, 2008, at 5:52 PM, Quincey Morris wrote:
If d is a local variable, as this code fragment seems to say, what's
keeping it (and therefore d.someView) from getting garbage collected
as soon as it goes out of scope? 'setVideoDataSource' is documented
to *not* retain the view (in
I've studied the pasteboard docs, and wonder if there is a simple way to
copy the contents of an NSString to the general clipboard. In AS or AS
Studio it's just set the clipboard to variable. Is there such a
convenience method in Cocoa?
Study the docs again, the answers are there if you've
Corbin Dunn wrote:
On Apr 18, 2008, at 3:37 PM, John Stiles wrote:
Ben Lachman wrote:
Well, you should be able to just override the drawing code, since
thats really your problem. Going directly against the docs, while
it may work fine now, is playing with fire in my opinion.
Yeah…
On Apr 18, 2008, at 2:35 PM, Hal Mueller wrote:
Maybe try
[[NSNotificationCenter defaultCenter] removeObserver:nil name:nil
object:self]
in your dealloc method? I think that will patch the symptom, but I
still don't understand why you're getting the original error.
I tried that, but no
On Apr 21, 2008, at 7:24 AM, Peter Hoerster wrote:
is there a method to detect from the background if a foreground
program is running in fullscreen mode?
I have to hide a floating panel when a video or game software is
running fullscreen.
It depends on what you mean by fullscreen mode.
On Apr 21, 2008, at 1:03 PM, Nick Rogers wrote:
when I run my cocoa app, Activity monitor shows it having 2 threads,
and thats ok, cause I'm running one POSIX thread with the start of
the app and which remains till the app is exited.
The problem is when I detach a new NSThread, from which
Hi,
I'm looking to add in drag and drop support to my app, but one thing which
isn't clear at the minute, is whether you are suppose to subclass the
NSViews or use delegates to do this. I would have assumed delegates as makes
the most future proof solution, so I added a
[webWindow
Thanks for the reply.
No, it doesn't affect my app. I was just asking whether it is a problem.
On 22-Apr-08, at 1:52 AM, David Duncan wrote:
On Apr 21, 2008, at 1:03 PM, Nick Rogers wrote:
when I run my cocoa app, Activity monitor shows it having 2
threads, and thats ok, cause I'm running
hi,
when I run my cocoa app, Activity monitor shows it having 2 threads,
and thats ok, cause I'm running one POSIX thread with the start of
the app and which remains till the app is exited.
The problem is when I detach a new NSThread, from which I'm calling
performSelectorOnMainThread:
I would probably override -menuForEvent: instead of -rightMouseDown: .
Leopard also has a bit nicer contextual menu handing for table/outline
views: If you right-click a row that's not currently selected it
highlights just an outline and doesn't change the selection (you can
use
On 4/22/08 1:33 AM, Nick Rogers said:
when I run my cocoa app, Activity monitor shows it having 2 threads,
and thats ok, cause I'm running one POSIX thread with the start of
the app and which remains till the app is exited.
The problem is when I detach a new NSThread, from which I'm calling
Does Cocoa provide any high-level serial port access API? Or do I just
use IOKit?
--
Rick
___
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
I have a custom NSView subclass that draws a semi-transparent
background with the following:
[[NSColor colorWithDeviceRed:0.0f green:0.0f blue:0.0f
alpha:QuickViewControlAlphaValue] set];
NSRectFill(rect);
Why is it that any subview I add to my custom view gets drawn with the
same alpha
On Apr 19, 2008, on Mon, 21 Apr 2008 10:06:47 +0530, JanakiRam wrote:
This code works fine , but when i try to mount another volume/
account on the same server , this code doesn't seem to work.I'm
always getting -43 error.If i unmount the earlier volume/account on
the same server then
I started a very simple non-document Cocoa app project. I added a
controller class derived from NSWindowController, and added an
NSObject to my .xib to represent it. I've connected an outlet in my
controller to a field in the window, and a button in the window to an
action in the
Has anyone gotten this example to work in Leopard?
http://developer.apple.com/documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/SynchroScroll.html
I just tried it and I'm having terrible luck. The view is just blanking
itself out immediately. I can get it to sort-of work if I
AMSerialPort is nice. I use it with USB-serial converters and with
Bluetooth serial devices.
http://www.harmless.de/cocoa.php
Hal
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to
I started a very simple non-document Cocoa app project. I added a
controller class derived from NSWindowController, and added an
NSObject to my .xib to represent it. I've connected an outlet in my
controller to a field in the window, and a button in the window to an
action in the
I found thee things which, in conjunction, solve the problem:
1 - Rewrite synchronizedViewContentBoundsDidChange as follows.
-scrollToPoint seems broken. (I am clamping the scroll view to the left
side on purpose)
- (void)synchronizedViewContentBoundsDidChange:(NSNotification
*)notification
I my app I want to be able to use drawing paths for two purposes:
1. Clip images to the path
2. Generate points that lie on the path as a function of the distance
along the path
I want to be able to create paths with Omnigraffle or some other
vector-image app, and export them to PDF or
On Apr 21, 2008, at 6:15 PM, Rick Mann wrote:
I started a very simple non-document Cocoa app project. I added a
controller class derived from NSWindowController, and added an
NSObject to my .xib to represent it. I've connected an outlet in my
controller to a field in the window, and a
On Apr 21, 2008, at 5:21 PM, Ken Thomases wrote:
Sometimes an NSWindowController is instantiated in a NIB as a
controller for a window in that same NIB. Other times, an
NSWindowController is outside the NIB that contains its window, and
is used to load that NIB.
I suspect that
On 22 Apr 2008, at 10:23 am, Steve Weller wrote:
Are there any easy ways of calculating the points on the path as a
function of the distance from the start of the path?
I'm not sure about the rest of your question but I can answer this
part. The short answer is no - it's really tricky.
On Apr-21-2008, at 6:34 PM, Rick Mann wrote:
I basically want my controller to go do some stuff after it and the
window are loaded. -setWindow seems like an ugly place to do this,
and -init is probably too early. Is there a better place?
- (void)awakeFromNib
- Jeff
On Mon, Apr 21, 2008 at 7:22 PM, Rick Mann [EMAIL PROTECTED] wrote:
Argh. So hard to find stuff in the docs. Where is mach_port_deallocate()?
egrep -R mach_port_deallocate /usr/include
It would appear to be in mach/mach_port.h (at least on 10.5).
On Apr 21, 2008, at 5:50 PM, stephen joseph butler wrote:
egrep -R mach_port_deallocate /usr/include
Oh I forgot to try that.
It would appear to be in mach/mach_port.h (at least on 10.5).
I used to try to include the actual file I needed, but that seemed to
break the Frameworks thing.
Being somewhat new to Cocoa, I often wonder if there's a better way to
do things.
I'm doing some stuff with USB, and the example code I'm using uses
IOServiceAddMatchingNotification() to add a pointer to a C callback to
get notified when things happen on the USB bus.
In C++, one
Oh, there was a fourth problem actually. This doesn't work in all cases:
NSRect changedBounds = [changedContentView bounds];
It should have been
NSRect changedBounds = [changedContentView documentVisibleRect];
Also, I switched to RBSplitView to work around issue 3.
Is there an IB3 plugin
NM that last part, I found the plugin. For the archives, it's at
http://brockerhoff.net/src/RBSplitView.ibplugin.zip
Sorry, all, for the multiple replies-to-self here :)
John Stiles wrote:
Oh, there was a fourth problem actually. This doesn't work in all cases:
NSRect changedBounds =
Whoops, the URL should be: http://apptree.net/drawkitmain.htm
On 22 Apr 2008, at 10:35 am, Graham Cox wrote:
On 22 Apr 2008, at 10:23 am, Steve Weller wrote:
Are there any easy ways of calculating the points on the path as a
function of the distance from the start of the path?
I'm not
On 22 apr 2008, at 02.50, stephen joseph butler wrote:
egrep -R mach_port_deallocate /usr/include
Even better - use the search dialog in the free Text Editor
TextWrangler from BareBones Software
(www.barebones.com) Then you will get a dialog where you can browse
any results.
I have an NSTextField into which I pour some text. I'd like to resize
the text field's frame to accommodate the typeset text. I'd like to
adjust only the frame's vertical size, leaving the width fixed. I'd
appreciate any pointers about what methods I can use to accomplish this.
Hi everyone,
I have resized a few columns in a table to be just a few pixels wider than
the actual names of those columns. I have used bindings to connect an
NSArrayController to these columns. When I test the interface in Interface
Builder as well as building and running the project in Xcode, I
Thanks Peter, the workaround worked nicely
Vance
On Apr 21, 2008, at 9:25 PM, Peter Ammon wrote:
On Apr 21, 2008, at 5:23 PM, vance wrote:
Hi
I am seeing annoying flickering when resizing a status bar item
using a custom view.
I tried using
* [statusItem setLength:XX.X] and
71 matches
Mail list logo