having it in the framework.
Gideon
On 21/07/2010, at 9:41 AM, Matt Neuburg wrote:
On or about 7/20/10 4:19 PM, thus spake Gideon King gid...@novamind.com:
It's a real shame that printing
support isn't there nicely for table views...
I don't really understand this kind of complaint. If you
Thanks Quincey - here's the code:
[[resultsTableView
tableColumnWithIdentifier:@startDateColumnIdentifier] bind:@title
toObject:resultsArrayController
withKeyPath:@arrangedObjects.topic.taskStartStringForPanel options:nil];
If the cell for the column is an NSTextFieldCell, and the
:
On Jul 17, 2010, at 23:21, Gideon King wrote:
[[resultsTableView
tableColumnWithIdentifier:@startDateColumnIdentifier] bind:@title
toObject:resultsArrayController
withKeyPath:@arrangedObjects.topic.taskStartStringForPanel options:nil];
If the cell for the column
Thanks for the suggestion Quincey - I have just finished implementing an
NSTableColumn subclass which does the observing etc, and is working nicely, but
as you say, it's not the neatest solution. Your idea sounds like an interesting
one to pursue - I could just make up a dummy property that
Sorry if this is a dumb question, but when someone has clicked a column header
to sort a table on that column, how do they get it back to its natural,
unsorted order?
In a certain other operating system, the standard behaviour seems to be that
the sorting is three state:
I have two situations where I want to combine two editable values into one
table column in an NSTableView:
- one is a checkbox and date picker (so you can check if you want to specify a
date, and edit the value if the checkbox is checked),
- and the other is a text field and a popup button
Hi, I'm having trouble doing something I would have thought would be very
simple.
I have some columns in an NSTableView where I need to display NSButtonCells,
and I need the titles to be dynamic as the underlying data (in coredata)
changes. I can bind the value to an NSTextFieldCell and it
Using initWithVCardRepresentation: to create an ABPerson gives me a new person
every time even if that person is already in Address book. If you drag a vCard
into address book and it's already there, it prompts you as to whether to use
the existing/new/merge etc., so obviously there is some way
Hi,
I have an NSTableView bound to an NSArrayController, which gets its data from
an NSMutableArray of objects.
One column of my table is set up as a button cell where I use
tableView:dataCellForTableColumn:row: to return a different button cell (or
sometimes nil) depending on the data for
Thanks for trying to help, but I'm not sure the meaning of your answer, or what
other information I could provide about the situation. Could you please clarify?
Regards
Gideon
On 14/07/2010, at 5:29 AM, Keary Suska wrote:
On Jul 13, 2010, at 10:38 AM, Gideon King wrote:
Hi,
I have
I found the problem. It was that I was looking in my source array using
objectAtIndex:row, which is the actual row in the table as displayed. Seeing as
my array is not sorted - it just has sort descriptors applied, I was getting
the wrong value from my data array.
I resolved the issue by
I have tested using the orderOut: way of working around this issue, and it
works for me. I will still file a bug report on the issue.
Gideon
On 02/07/2010, at 3:48 PM, Nick Zitzmann wrote:
On Jul 1, 2010, at 9:41 PM, Dave Fernandes wrote:
Hmmm. I still can't get it to happen
Hi, I have a panel which has an IKImageKitBrowser in it, and when I close the
window, if I have any images selected, I get this message:
Error: kCGErrorInvalidConnection: CGSGetSurfaceBounds: Invalid connection
Error: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch
errors as
I think the issue is more to do with the scaling leaving the lines moved from
the pixel boundaries, and with only 24 or 32 pixels to play with, it's pretty
noticeable when it blurs across two pixels.
Gideon
On 27/06/2010, at 8:42 PM, Graham Cox wrote:
On 27/06/2010, at 11:00 AM, Gideon
I'm just using a standard NSToolbarItem. In any case, I doubt that would change
anything if the line is being drawn on two pixels. With the way I am doing it,
I can get it right on the pixels every time, and in many cases I want to adjust
things a bit between the 24 and 32 pixel images anyway,
The two sizes of the icons when displayed as normal and small are 32x32 and
24x24. While the recommended way of handling this is to create a multi-image
file as has been described previously, or to use a PDF, I find drawbacks in
both approaches
- multi-image files are normally just the two
I am encountering this issue when trying to save my atomic store. The
backtraces don't seem to give anything useful to locate the issue.
Any suggestions as to how to find the cause of this?
Thanks
Gideon___
Cocoa-dev mailing list
Hi, I have a toolbar that has been set up in Interface Builder, and this is
working just fine, but now I am in a situation where for some users of the
application I want to remove a couple of items from the toolbar items
completely. I will know whether I need them or not when the window is
Hi, I have a toolbar item that I want to use for having an item that I drag
onto my main view. I can initiate the drag from my custom view, but the window
gets moved by the mouse down/dragged. I'm sure this will be trivial, but can't
think of how to do this...I've overridden mouseDown: and
Perfect, thanks Peter. I knew there was something like that, and had searched
for canDrag, but hadn't thought of canMove...
Gideon
On 23/06/2010, at 12:12 PM, Peter Ammon wrote:
Sounds like you want to override -mouseDownCanMoveWindow to return NO.
Hi all,
I have a view which uses an NSGradient to display part of the view. It displays
correctly on screen, but when I use dataWithPDFInsideRect, the PDF doesn't show
the gradient correctly. It appears that it doesn't honor the opacity settings
of the colors and instead uses solid colors.
Is
Thanks, using an image worked. I hope they move to supporting translucent
gradients soon.
Gideon
On 17/06/2010, at 12:33 AM, Graham Cox wrote:
PDF doesn't support gradients with transparency.
This sucks majorly actually, as it makes true WYSIWYG impossible.
A workaround might be to
Suggest you look at the Using Text Tables section of the Text Layout
Programming Guide for Cocoa. It shows how to use the NSTextTable,
NSTextTableBlock etc. Looks promising for what you describe. Disclaimer: I
haven't used it myself.
HTH
Gideon
On 14/06/2010, at 11:46 PM, Alexander Cohen
I have a situation where I create a temporary managed object context and do a
bunch of things with various managed objects before releasing the context
again.
After this, there appears to be an asynchronous cleanup operation done by
coredata, at which point I get an exception as per the trace
Thanks Jerry mm
@mm The problem is I don't know what to put breakpoints on
@jerry My understanding is that with the core data, they have their own memory
management scheme which will reuse the space of something that has been
invalidated, and that invalidated is not equal to deallocated. If I
Thanks Jerry
Whoops/sorry. I forgot that -[NSManagedObject valueForKey:] is an Apple
method so all you get is stupid registers and no symbols. (Text is not
colorized in email.)
So there are two ways to do this. One way would be, assuming that all of
your managed objects descend
You might like to check out doing it using validateUserInterfaceItem: or
validateMenuItem:
HTH
Gideon
On 14/06/2010, at 11:23 AM, Tony Romano wrote:
Binding a menuitem's hidden attribute to the selection doesn't work in the
case of a context menu because the selection happens as it changes
Thanks for the code Graham. I implemented it just with a simple boolean to
control whether it is really printing or not, and that will be sufficient for
my current needs, but I'll keep your solution in mind for if I come across it
again.
Gideon
On 11/06/2010, at 10:36 PM, Graham Cox wrote:
Hi, I have an offscreen view that I want to get the PDF data from. I use the
dataWithPDFInsideRect method, but I have found that this creates an
NSPrintOperation. This is a problem because I want to print using different
settings for this view only when a *real* print operation is happening. I
Hi all,
I have a view where I set the cursor in a mouse moved event, when the mouse is
over certain places in my view (resize handles for objects). This works fine,
but sometimes I need to add some subviews to this view, and for some reason,
when I do, it stops setting the cursors in some of
Thanks Jim - I switched it over and it works fine, and with much less overhead
on mouse moved too.
Regards
Gideon
If I understand correctly you are calling NSCursor's -set from within your
view's -mouseMoved: method. If you are just changing cursor to indicate
resize control areas, it
Hi, I have a canvas view which has a whole lot of text views as subviews.
When a person types a letter while the canvas is the first responder, I want to
change the first responder to the appropriate text view and replace anything in
that text view with the letter typed.
In my canvas view, I
Hi, I want to make a window appear above a certain point of a view in a
scrollview. When the user clicks outside the window, it will close. While the
window is displayed, the user should not be able to scroll the scrollview.
This is the behavior you get with a context menu, and I want to
Hi, I'm getting the message:
An instance 0x11d0ce4b0 of class NMGeneralPrintAccessoryController was
deallocated while key value observers were still registered with it.
Observation info was leaked, and may even become mistakenly attached to some
other object. Set a breakpoint on
10.6.3
On 25/05/2010, at 11:17 PM, Roland King wrote:
what version of what operating system are you using?
On 25-May-2010, at 9:14 PM, Gideon King wrote:
Hi, I'm getting the message:
An instance 0x11d0ce4b0 of class NMGeneralPrintAccessoryController was
deallocated while key value
I have found the problem. In awakeFromNib, I have several calls like this:
[self addObserver:self forKeyPath:@thingy
options:NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionNew
context:NULL];
And in the dealloc method, I have:
[self removeObserver:self forKeyPath:@thingy];
for all
If you want to do something that the standard undo manager doesn't do, you
could drop in GCUndoManager from http://apptree.net/gcundomanager.htm
I have been using it in my current project, and have found the ability to
actually see what is going on in the undo stack a real boon, and of course
In the NSPrintInfo documentation, when talking about the printSettings, it says:
Adding keys to the dictionary is equivalent to calling the Core Printing
function PMPrintSettingsSetValue. Your new keys are added to the current print
settings and are saved with any user preset files generated by
The dictionary method only returns standard attributes:
(gdb) po [oldPrintInfo dictionary]
{
NSBottomMargin = 72;
NSCopies = 1;
NSDetailedErrorReporting = 0;
NSFaxNumber = ;
NSFirstPage = 1;
NSHorizonalPagination = 0;
NSHorizontallyCentered = 1;
NSJobDisposition =
It appears that when you create a print operation, it is directly associated
with a view. In my print accessory, I can make changes that would make it much
easier to render the data that the user is requesting by using a different
view. Is there any way to change the view or maybe swap out the
I'm looking for some sample code that shows how to take a token in a text view
and represent it as a single graphical item - just like what xcode does when it
does method completion, and it puts the arguments in a single blue capsule
thing that is treated as one single character (only I
That looks to be exactly what I was looking for, thanks.
Gideon
On 19/05/2010, at 10:31 PM, Jonathan del Strother wrote:
Try NSTokenField ?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
I'm the one who started the thread, and it's the same for me - my program
doesn't explicitly link against those libraries, but something somewhere
obviously does. The first I knew about it was when a customer queried it,
asserting that it was shortening his battery life on his laptop.
Seeing
I obviously have the utility style mask set on a window somewhere in one of my
nibs, but I have 40 nibs in my project and it would take ages to go through
every one of the windows in every nib to find the culprit. Is there some way I
can search in my xib files, or set a breakpoint in my code so
Found it -
find . -name *xib -print -exec grep NSWindowStyleMask {} \;
was my friend.
Gideon
___
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
Hi, I am trying to override the setting of text size in my text storage
subclass. I have overridden the setAttributes:range: method, and told the text
to use a standard font size (keeping the other font attributes), but when I am
editing, and use the font panel to set the font, although the
Hi, I've had a query from a user of my software, and he says that when he runs
it, his MacBook Pro switches to use the NVidia graphics chip.
I haven't done anything in my program to specifically force that (and I'm not
sure whether it is possible to in normal Cocoa code). Is there something
Not particularly. I mean it is a graphics based program, but we don't have
animations going on while the program is just sitting there, and we don't use
any opengl or anything like that. Even when the user is interacting with it,
it's just normal screen redraws - nothing I would have thought
AM, GMail Account wrote:
How does the user know it's your program, and that it's starting the GPU?
On Monday, May 3, 2010, Gideon King gid...@novamind.com wrote:
Not particularly. I mean it is a graphics based program, but we don't have
animations going on while the program is just sitting
On 04/05/2010, at 10:14 AM, Charles Srstka wrote:
If you posted the results to the list, it could be very useful, as someone
may see something in there that they recognize.
OK - in case it is useful, here are the results of running the app with that
setting, and sorting the output and
Hi, I have some places in my code where I have managed objects that need to
observe various key paths. If one of these objects has been deleted by the
user, and then they undo, I need to re-establish the KVO.
As undo doesn't call awakeFromFetch, I need to do this somewhere else. I have
Thanks guys - will look into that.
On 02/05/2010, at 3:11 AM, Kyle Sluder wrote:
On Sat, May 1, 2010 at 9:34 AM, Dave Fernandes
dave.fernan...@utoronto.ca wrote:
If you are observing something that is not part of your data model, you
might try using mechanisms other than KVO to keep your
McBride wrote:
Gideon King (gid...@novamind.com) on 2010-05-01 09:42 said:
Hi, I have some places in my code where I have managed objects that need
to observe various key paths.
Why? (I'm curious... I've never used such a pattern.) Perhaps instead
you could override setters so
Hi all,
I'm having a really strange problem with a simple method call:
CGFloat newMin = 150.0f;
CGFloat newMax = 0.0f;
[mapContentSubview setMinDimension:newMin andMaxDimension:newMax];
The method is defined as:
- (void)setMinDimension:(CGFloat)newMinDimension
That was it - importing the wrong header. Thanks.
Look like a problem where the method declaration does not match exactly the
definition (or you call the method without having imported the header and the
compiler don't know the method signature).
-- Jean-Daniel
Hi
I have an importer to convert different file types into my native file format.
Due to the nature of the importer process, I need to run it as a separate
converter, so the process flow is:
1. The user selects the file to open (not in my native format)
2. The program reads it and writes out a
Absolutely. Use an NSTabView, but set it to be tabless, and create your own
control to change the selected tab.
Regards
Gideon
On 09/04/2010, at 1:06 AM, Philip Mobley wrote:
I need to have a tab style interface, but am not able to use the built in
NSTabView because the style is not
Hi Ken
If someone created another copy of your database, I imagine the last path
component could be duplicated, since it would not know about the other copy and
create the same primary key.
I believe that the URI is made up of the store id / entity / reference object.
With a document based
On 05/04/2010, at 6:51 AM, Ben Trumbull wrote:
No, this is going the wrong way. The objectID is the object's identity in
the persistent store (e.g. primary key). You don't need to store pieces of
it somewhere else.
NSPredicate *predicate = [NSPredicate predicateWithFormat:@self == %@,
, Sean McBride wrote:
On Sun, 4 Apr 2010 23:14:20 +1000, Gideon King said:
I have some queries that used to look up objects based on an elementID
attribute, which used to be my unique identifier for objects, created
when the objects were inserted or loaded.
I use this pattern also.
I am now
I have some queries that used to look up objects based on an elementID
attribute, which used to be my unique identifier for objects, created when the
objects were inserted or loaded. I am now moving away from that and using the
standard managed object IDs and reference objects.
So I used to do
Wow, this is huge! Obviously the user doesn't expect the document to disappear
and a new one open up just because they did a Save As operation, so I would
have to go through every single part of the application, work out every
reference to a managed object, and either throw them away or fetch
Phew, that's a relief. I'll look forward to hearing what I'm doing wrong in my
sample project then.
Regards
Gideon
On 04/04/2010, at 11:22 AM, Ben Trumbull wrote:
On Apr 3, 2010, at 5:07 PM, Gideon King wrote:
Wow, this is huge! Obviously the user doesn't expect the document
Excellent, thanks for that. I thought that once a managed object ID had been
assigned, that newReferenceObjectForManagedObject: should always return the
same value, so I was regenerating it from the previous data instead of
generating a new one if it either had a temporary object id or no
Ah, so when it says the method must derive the reference object from the
managed object’s values it is talking about the managed object's persisted
values. So I could get rid of my extra attribute in my managed object class and
just set my UUID using a method similar to what you define below,
Hi,
I would like to have an application I am working on to be able to start up in
the normal way from the finder, but also have an alternative startup that users
can access in some way, where I will display a panel that most users wouldn't
normally want to see.
Issues I am having with this
Excellent, I like the new way of doing it using NSEvent directly, but I do need
to support Leopard.
If you launch from Finder holding the Option key, Finder closes the window you
launched from, but I can tell people to put it in the dock and launch from
there to avoid that.
Here's what I'm
That's the instance method. New in 10.6 is the class method of the same name,
which is what I need in this case, since I don't have an event to work with.
On 03/04/2010, at 12:09 PM, Klaus Backert wrote:
On 3 Apr 2010, at 01:15, Gideon King wrote:
Excellent, I like the new way of doing
When I create a document, save it, then save as, then save as again, it
duplicates the persistent store, so the managed objects I have been using in my
application are all invalidated.
Now there are a whole lot of places in my application where I have KVO set up
on properties of the managed
Hi all
I have a scrollview, and I want to add a fixed position subview on top of it so
it always displays at the same place relative to the top left of the
scrollview, no matter whether the user scrolls the document or resizes etc.
I have tried the following methods, but none of them have left
Thanks, but it does have to work on 10.5.
Gideon
On 31/03/2010, at 4:46 PM, Kyle Sluder wrote:
Why does it need to be a subview of the scroll view? If you're
targeting 10.6 it sounds like you could just make it a peer of the
scroll view and size it appropriately. Just make sure that you
Hi
I want to put a child window over the top of one of my views. I have a few
nested RBSplitViews and I want to get the origin of the contents of one of
those split views, but no matter what I do, it seems to come up with strange
results.
I have scrollView as a subview of one of the
You've got your keys and values the wrong way around in your dictionary. The
method name hints at this - object first, then key.
On 30/03/2010, at 3:12 AM, Dale Miller wrote:
two attribute dictionaries:
stext = [[NSDictionary alloc]initWithObjectsAndKeys:
Hi All
I have an NSTextView subclass, and when I make it first responder, it updates
the color in the color panel, which causes the color panel to send a
changeColor: message. Ditto when I change the selection.
In some cases, the color of my text is affected by things other than my
textview,
I sometimes have that problem on Snow Leopard too. Relatively rare, thank
goodness, but certainly an issue sometimes.
Gideon
On 25/03/2010, at 12:17 PM, Nick Zitzmann wrote:
On Mar 24, 2010, at 7:44 PM, Brian Willoughby wrote:
Another potentially important detail is that I am running
I had this problem too, and in the end, I found a solution which was to make
sure I had completed my updates of the text, and in my
textStorageDidProcessEditing: method, I add the following:
[[NSRunLoop currentRunLoop] performSelector:@selector(updateSelectedRange:)
target:self.editingView
Ah, I've been seeing a bunch of TNode errors too - I thought it must be
something I was doing wrong. Could never work out any rhyme or reason to it, or
reproduce it here, but received quite a few reports of crashes due to this from
customers. Glad to know I'm not going crazy.
/2010, at 7:04 PM, Gideon King wrote:
During the course of the Save As operation, core data creates a temporary
clone of my managed objects, which appears to be part of its normal way of
doing things (I can replicate this in a test project), but in the case of my
project it is creating *two
Thanks Paul - good to know what the error message means. The only file in that
folder is the saved as, saved as file.
When you do a save as, it appears that the steps core data follows are
different than when it does the first save as. I have a simple project where I
am trying to trace through
BTW, loading and saving as seems to have some points in common with the second
save as I mentioned in my previous email:
Load a file and Save As without making any changes:
a. Initializes a new atomic store
b. Reads from an empty file at the new save location within its temporary
folder,
c.
During the course of the Save As operation, core data creates a temporary clone
of my managed objects, which appears to be part of its normal way of doing
things (I can replicate this in a test project), but in the case of my project
it is creating *two* clones of all my objects. One has the
Go to your project Info panel, and make sure the debug configuration is chosen.
In the Language section add -DISDEBUGGING to the Other C Flags
Then you will be able to use #ifdef ISDEBUGGING etc in your code.
HTH
Gideon
On 21/03/2010, at 3:22 PM, BareFeet wrote:
Hi all,
OK, I'm missing
I open a file, then immediately close it. I get this error message saying that
one of the objects has been invalidated, but I have no idea what is
invalidating the object.
How do I debug this?
The NSManagedObject with ID:0x11a415320 x-coredata://whatever has been
invalidated.
0
Thanks Ben
One of the other things I had been working on must have fixed the underlying
problem, and my implementation of identifier and setIdentifier were actually
causing this issue. I completely removed those two methods (which is of course
going directly against the documentation at the
Having sorted out the problem that occurred when I closed files, I am now back
to the save as issue (I was hoping that the two problems were related, but
apparently not). I have reverted to using a stock standard
NSManagedObjectContext I still haven't a clue where to look to debug this.
I know that the URL is valid and it's readable. I can open the file in my
application. I can read it into an NSData with dataWithContentsOfURL:
The purpose of what I am doing is trying to migrate to an XML store to see if
that will help me isolate the problem I am having with save as, which I
Ah, I think I had a fundamental misunderstanding - I thought it would load the
store, but it only returns it if it's already loaded in the coordinator.
The documentation gives no clue of this - all it says is:
Parameters
URL
An URL object that specifies the location of a persistent store.
out.
Regards
Gideon
On 12/03/2010, at 6:50 PM, Gideon King wrote:
Having sorted out the problem that occurred when I closed files, I am now
back to the save as issue (I was hoping that the two problems were related,
but apparently not). I have reverted to using a stock standard
Thanks for that suggestion Ben - I haven't come across that method of debugging
before. I tried doing it based on the address that I got from the stack trace,
but I just seem to get the things relevant to the NSNumber:
$ /Developer/usr/bin/malloc_history 12908 0x100e00860
ALLOC
it
down.
Thanks in advance.
Gideon
On 11/03/2010, at 11:05 AM, Kyle Sluder wrote:
On Wed, Mar 10, 2010 at 4:45 PM, Gideon King gid...@novamind.com wrote:
Seeing as none of this appears to have anything to do with my code, I am
assuming that some notification created somewhere in my
:
On 2010 Mar 11, at 02:27, Gideon King wrote:
or whether I would have to subclass NSConcreteNotification and override
dealloc and then use pose as, so I could print out the notification name
etc, to get the info
That would work, but Method Replacement [1] was added in Objective-C 2.0
This is really cool...so I can replace a method without being a subclass or
category.
So I implemented an NSObject subclass with the new method, and did the method
exchange, and my new method was called instead of the old one, but I had a
problem - the call to the switched out method (dealloc
detail, I now have the
conceptual understanding of the problem and believe I will be able to fix it.
What a relief!
Regards
Gideon
On 12/03/2010, at 1:54 PM, Jerry Krinock wrote:
On 2010 Mar 11, at 18:00, Gideon King wrote:
This is really cool...so I can replace a method without being
In the documentation, it says that I have to override:
type
identifier
setIdentifier
metadata
metadataForPersistentStoreWithURL:error:
setMetadata:forPersistentStoreWithURL:error:
from NSPersistentStore in addition to the overrides for NSAtomicStore, but the
CustomAtomicStoreSubclass example
I have a core data based application, and use the NSPersistentDocument's
-managedObjectContext to get my managed object context. As far as I can see, I
do not retain or release it anywhere in my code, but apparently it is getting
over released when I close my document. My test case is to start
The custom store seems like the most probable source of issues. One source
of problems I've seen is when a custom store doesn't handle either the
metadata or the objectIDs correctly. The store UUID and the object's IDs
need to be stable (e.g. if we ask your store for its UUID, it
10.6.2. I did receive a suggestion from Jerry Krinock over the weekend to try
switching to an XML store and seeing whether that fixed the problem, so I could
narrow it down as to what was causing the problem, but haven't had time to look
into that yet (I have a lot of custom code for
There is no target when you connect to the first responder - in effect the
target is determined at runtime by the window order, view hierarchies,
controllers etc. I suggest you read up on the responder chain. Once you
understand it, it's very logical and powerful.
HTH
Gideon
On 02/03/2010,
I'm having another look at an issue I posted about a couple of weeks ago, where
Save As was causing an error. At the time, I was using a custom managed object
context. I have now reverted to a standard managed object context. I do not
create or release this managed object context anywhere - it
Hi all, I am getting the message The NSManagedObject with ID (whatever) has
been invalidated when I try to save a new document in my application. It is
just a plain blank document that I have not made any changes to.
This did not happen when I saved my document in my build from one week ago,
201 - 300 of 359 matches
Mail list logo