On 24 Sep 2010, at 18:13, Ross Carter wrote:
Yeah I have line numbers views set up in all of this too, for which I have
to set the width before I set the strings of the text views so you don't see
the views resizing on first load if the line numbers aren't wide enough to
accommodate the
On 24 Sep 2010, at 19:59, Martin Wierschin wrote:
when I resize the window and need to adjust the frames of both scroll
views, calling -[NSTextView setFrame:] results in the layout manager
invalidating and ensuring layout for the newly visible character range.
Why not just turn off text
On 25 Sep 2010, at 01:23, Douglas Davidson wrote:
On Sep 23, 2010, at 7:54 AM, Jonathan Dann wrote:
In our app, Kaleidoscope, I have 2 text views side-by-side. In one
configuration the layout of the text in each text view is dependent both on
regions of layout in the sibling text view
On 23 Sep 2010, at 23:12, Ross Carter wrote:
Maybe, to disable layout, set the textview's textContainer to nil, then
restore it to enable layout?
Hi Ross,
I'll give it a go. I think tricks like that may help in some of the cases I
have.
Thanks,
Jon
On 23 Sep 2010, at 23:46, Martin Wierschin wrote:
The problem I've had to continuously hack around is that NSTextView, in
conjunction with NSLayoutManager, is rather eager to get the text to
re-layout.
Maybe, to disable layout, set the textview's textContainer to nil, then
restore it
Hi all,
In our app, Kaleidoscope, I have 2 text views side-by-side. In one
configuration the layout of the text in each text view is dependent both on
regions of layout in the sibling text view, and the model objects which
represent the the insert, equal and deleted regions of the diff.
The
On 23 Sep 2010, at 16:45, Matt Neuburg wrote:
Is there a cool dynamic Cocoa way to call super with the same parameters
that came to me? I guess what I'm looking for is a pre-configured invocation
of the current command where I can just change the target to super. No big
deal, but I just
- (id) init {
if(self == [super init]){
Year = 0;
orignalYear = 0;
}
return (self);
}
In addition to the other comments regarding calling super, you don't
need to initialize instance variables to values like 0, 0.0, NO, nil,
FWIW you can't always be sure that NSOperationQueue will be using a
thread per operation. The number of active operations (I explicitly
don't say threads here) depends on system contention. Are your
operations dependent on each other or using shared resources? Are you
setting
From the archives:
http://www.cocoabuilder.com/archive/message/cocoa/2008/5/23/207981
On 28 Jul 2009, at 18:11, Peter Mulholland wrote:
Hello cocoa-dev,
Basically, i'm trying to do a little debug console. I'm using the
NSTextView in NSScrollView from Interface Builder.
I've got a Print
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
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
On 7 Mar 2009, at 05:50, Michael Ash wrote:
On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann j.p.d...@gmail.com
wrote:
Hi All,
In my application I want to create an image of a document window as a
preview prior to displaying the window to the user. To obtain the
CGImage of
a displayed window
On 7 Mar 2009, at 10:20, Jean-Daniel Dupas wrote:
Le 7 mars 09 à 05:50, Michael Ash a écrit :
On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann j.p.d...@gmail.com
wrote:
Hi All,
In my application I want to create an image of a document window
as a
preview prior to displaying the window
On 7 Mar 2009, at 11:14, Paul Sanders wrote:
Which technique? The Quartz technique will get you the full window,
including the titlebar. The -dataWithPDFInsideRect: gets you PDF
data
instead of a bitmap. Neither of which is advantageous when you
want a
bitmap image of the contents of a
On 7 Mar 2009, at 11:00, Kyle Sluder wrote:
On Sat, Mar 7, 2009 at 4:20 AM, Jean-Daniel Dupas
devli...@shadowlab.org wrote:
Has this technic some benefit over locking focus on the window
content view
and using - [NSBitmapImageRep initWithFocusedViewRect:] ?
Which technique? The Quartz
On 7 Mar 2009, at 12:20, Jean-Daniel Dupas wrote:
Le 7 mars 09 à 12:11, Jonathan Dann a écrit :
On 7 Mar 2009, at 10:20, Jean-Daniel Dupas wrote:
Le 7 mars 09 à 05:50, Michael Ash a écrit :
On Fri, Mar 6, 2009 at 1:38 PM, Jonathan Dann
j.p.d...@gmail.com wrote:
Hi All,
In my
Hi All,
In my application I want to create an image of a document window as a
preview prior to displaying the window to the user. To obtain the
CGImage of a displayed window is simple enough using the CGWindow API
as shown below:
- (CGImageRef)CGImage;
{
return
If you're targeting Leopard then you can use the NS_BUILD_32_LIKE_64
flag and use NSRect/Point/Size and CGRect/Point/Size interchangeably
without the cast or the inline conversion functions. Here's a how-to http://theocacao.com/document.page/552
Jonathan
http://espresso-served-here.com
On
Hi Jim,
I've been having major problems with working with non-layer-baked
views to coordinate the animation of their positions. Some of the
caveats I've come across (note that I haven't used -setWantsLayer: on
any of the views as it's unnecessary for animating the frame of an
NSView
On 26 Aug 2008, at 00:52, Graham Cox wrote:
On 26 Aug 2008, at 8:00 am, Jonathan Dann wrote:
Using the private APIs / the method that Rob showed is perfectly
fast.
I'd really like this made easier too, so I filed an enhancement
request rdar://6174287
Is it possible to file a de
On 25 Aug 2008, at 16:58, Tim Andersson wrote:
24 aug 2008 kl. 23.20 skrev Jonathan Dann:
On 24 Aug 2008, at 17:45, Tim Andersson wrote:
YMMV but I'd start with a window as shown in this sample code
http://developer.apple.com/samplecode/RoundTransparentWindow/index.html
and then replace
On 25 Aug 2008, at 21:51, Seth Willits wrote:
On Aug 25, 2008, at 1:33 PM, Ricky Sharp wrote:
There isn't a particularly fast way to do this, although I have
experimented with it a bit in the past. You can use the CGWindow
API to read the contents under your window and apply a blur to
Reposted due to 25KB size limit. Sorry.
On 23 Aug 2008, at 06:42, Adam Thorsen wrote:
Are there any examples of using the UTI API to determine the UTI
given a path to a file?
Thanks,
-Adam
In my app I have a singleton UTI controller class that has an NSArray
property of UTIs supported by
On 4 Aug 2008, at 14:04, Gerriet M. Denkmann wrote:
On 3 Aug 2008, at 16:53, Jonathan Dann wrote:
On 3 Aug 2008, at 04:35, Gerriet M. Denkmann wrote:
On 3 Aug 2008, at 05:51, Jonathan Dann wrote:
On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote:
But all disclosure triangels are now
On 3 Aug 2008, at 04:35, Gerriet M. Denkmann wrote:
On 3 Aug 2008, at 05:51, Jonathan Dann wrote:
On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote:
But all disclosure triangels are now closed. Is there some way to
reopen them to the previous state?
I have the strong feeling that I
On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote:
But all disclosure triangels are now closed. Is there some way to
reopen them to the previous state?
I have the strong feeling that I will have to handle this myself.
Ok. So be it.
It's a common problem. Can I point you here:
On 25 Jul 2008, at 17:21, Garrett Bjerkhoel wrote:
I have a NSOutlineView hooked up to a NSTreeController, which has
multiple entities inside of it. I would like to know how to set it
up having each entity having its own group. I have downloaded
Jonathan Dann's example, which compiles but
How odd I came across this yesterday on my travels! The site for this
source is
http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html
Jonathan
www.espresso-served-here.com
On 25 Jul 2008, at 11:13, Ian Jackson wrote:
Hi Graham,
if I understand your question, then I wanted to do
] *** -[ESTreeNode
isSpecialGroup]: unrecognized selector sent to instance 0x133d20
On Jul 25, 2008, at 12:33 PM, Jonathan Dann wrote:
On 25 Jul 2008, at 17:21, Garrett Bjerkhoel wrote:
I have a NSOutlineView hooked up to a NSTreeController, which has
multiple entities inside of it. I would like
There was an example of this on Cocoa Is My Girlfriend
http://www.cimgf.com/
HTH
Jon
On 18 Jul 2008, at 08:42, chaitanya pandit wrote:
Is there any way to do flip animation like the one with dashboard
widgets when u click the i to change the settings for the widget.
Can it be done for
Hi Ivy,
You can bind the representedObject in NIB, I do it all the time. My
rO is an NSPersistentDocument subclass, which is set immediately after
the view controller is -init-ed. The bindings in the nib are only set
up after -loadView is called, which occurs after something in your app
Hi Ivy,
Can you tell us what the bound object the table receives is? If you
could call this method (which, in its current state, would go in an
NSTableView subclass) somewhere:
- (NSArrayController *)arrayController;
{
return [[[self tableColumnWithIdentifier:@myColumn]
get it.
Cheers,
Sean
On 7/16/08 1:44 PM, Jonathan Dann said:
The duplicate problem is likely fixed by giving the tee controller a
fetch predicate in IB. Set the predicate to something like
parent==nil. This will obviously depend on what you've called your
'parent' property.
I've blogged
Hi Joan,
As Keary says, removing in -dealloc is probably not the best thing to
do as there are a few cases that this can bite you, like if your
window controller retains the view controllers, and -dealloc is called
on the window controller, which would proceed to release its
collection
The duplicate problem is likely fixed by giving the tee controller a
fetch predicate in IB. Set the predicate to something like
parent==nil. This will obviously depend on what you've called your
'parent' property.
I've blogged about doing this with drag and drop in core data and non-
core
Have a look and see if the window is textured or not, it a window
setting in IB. Non-textured windows have no bottom border by
default. Its in the AppKit release notes
http://developer.apple.com/releasenotes/Cocoa/AppKit.html
under the NSWindow heading.
Often this is used in conjunction
Have you seen this
http://katidev.com/blog/2008/04/17/nsviewcontroller-the-new-c-in-mvc-pt-2-of-3/
and this thread
http://www.cocoabuilder.com/archive/message/cocoa/2008/3/19/201743
All of this is covered, with automatic insertion of view controllers
into the responder chain.
If you want
On 10 Jul 2008, at 19:33, Seth Willits wrote:
Has anyone created a custom window like the event info editor in
iCal in 10.5? There's a few things I'm not sure how to do:
1) Drawing the window background gradient is pretty straightforward,
but creating the thin border on the window is
On 27 Jun 2008, at 20:48, Erik Verbruggen wrote:
I know this has been asked before on this list (somewhere earlier
this year), but I couldn't find the posting back. So sorry for
repeating the question, but I'd like to use the HUD of Leopard and
with fitting widgets. Somebody mentioned
and I can't
find the reference for you.
On Jun 16, 2008, at 7:05 AM, Jonathan Dann wrote:
Hi Guys,
I was just looking at passing a CGImageSourceRef to an IKImageView,
the documentation says you can, but there's not method that accepts
it as a parameter. Is this just a feature that isn't
Hi Guys,
I was just looking at passing a CGImageSourceRef to an IKImageView,
the documentation says you can, but there's not method that accepts it
as a parameter. Is this just a feature that isn't present in the
release? Are there release notes that this would be in as Image Kit
isn't
Hi All,
This is something that I haven't seen before. I have a custom view
that inherits from NSView directly and just draws a gradient
background. In IB I've placed an NSSlider on the view which works
fine. The problem comes when drawRect in my custom view is invoked, I
draw the
On 10 Jun 2008, at 17:05, Ken Ferry wrote:
You're probably filling your gradient into the rect passed in
drawRect.
That rectangle just represents the dirty part of your view. If you
had a solid color to draw, you could just fill the rect, but with a
gradient you will get your gradient,
On 5 Jun 2008, at 14:46, Johnny Andersson wrote:
To understand what I have problems with, let's suppose that I want
to put a module consisting of an NSViewController, controlling the
view with two buttons, which in turn contains a DrawView, on my main
window. Do I put my
Is it possible to somehow just launch the quicklook window for a
quicktime file?
The quicklook framework is private and therefore should cannot be
reliably used in an app. There are a few site out there that give
example code that calls it though.
You could use NSWorkspace to bring
On 4 Jun 2008, at 23:18, Nick Zitzmann wrote:
On Jun 4, 2008, at 3:48 PM, Jonathan Dann wrote:
The quicklook framework is private and therefore should cannot be
reliably used in an app. There are a few site out there that give
example code that calls it though.
Since when
To get all the nodes in the tree I do a depth-first search (10.5
only). Add the first method in an NSTreeNode category and the second
to a category on NSTreeController.
// NSTreeNode_Extensions
- (NSArray *)descendants;
{
NSMutableArray *array = [NSMutableArray array];
for
On 31 May 2008, at 19:47, Rick Mann wrote:
Jonathan, thank you for the excellent example on working with the
containers. That will certainly be useful.
You're welcome, but I apologise, I forgot the -rootNodes method that
one of the tree controller methods I sent you calls! This method
The problem is, I don't know how to determine to which row that
newly-added object corresponds in the table view. Is there any way?
I suppose it's the current-selected row, since it's set up to select
on add. Is there a more elegant way to find out, though (i.e., what
if adding didn't
On 31 May 2008, at 21:43, Rick Mann wrote:
Can category methods act as KVC properties?
Yep, the -flattenedObjects method I gave you asks the array of tree
nodes valueForKey:@descendants. -descendants was the NSTreeNode
method I posted.
Jon
smime.p7s
Description: S/MIME
On 31 May 2008, at 17:37, Torsten Curdt wrote:
On May 31, 2008, at 18:27, Jonathan Dann wrote:
Hi Guys,
Just a quick one. I would expect renaming a file named HELLO.TXT
to hello.txt (or another variant where the case of a few letters
change) with -moveItemAtPath:toPath:error
On 31 May 2008, at 18:17, Jens Alfke wrote:
On 31 May '08, at 9:27 AM, Jonathan Dann wrote:
Just a quick one. I would expect renaming a file named HELLO.TXT
to hello.txt (or another variant where the case of a few letters
change) with -moveItemAtPath:toPath:error: to be allowed
On 31 May 2008, at 22:51, stephen joseph butler wrote:
On Sat, May 31, 2008 at 4:35 PM, Jonathan Dann [EMAIL PROTECTED]
wrote:
On 31 May 2008, at 18:17, Jens Alfke wrote:
Try using the system call rename. (Use man 2 rename to see the
documentation.)
Call -fileSystemRepresentation on your
textContainer] setWidthTracksTextView:NO];
[textView setHorizontallyResizable:YES];
}
Thanks,
DC
On May 23, 2008, at 4:08 PM, Jonathan Dann wrote:
Its in SMLViewMenuController.m line -(IBAction)lineWrapTextAction:
Jon
On 23 May 2008, at 22:58, David Carlisle wrote:
Looks interesting. Thanks
Hi Guys,
Has anyone come across this before? I've looked online and I think I
know the problem but the solution is evading me!
I have an NSManagedObject that represents a text file, the text itself
is saved to a text file and the file's attributes are stored in the
persistent store (much
Thanks for the quick reply Ben and your explanation of what's going on.
I've just re-read the Fetching section of the Core Data Programming
Guide and its glaring at me not to fetch using transient attributes.
I appreciate your help.
Jon
On 23 May 2008, at 22:32, Ben Trumbull wrote:
As a
- (void)getSelectedAccount{
NSString *accountName = @Bank;
NSLog(accountName);
accountName = [[MLoutlineViewController selection]
valueForKey:@name];
NSLog(accountName);
//get managedObjectContext in preparation for fetch code
moc =
In addition:
So, I guess my question is: how is your NSOutlineView populated? Do
you have to NSTableColumn of the NSOutlineView bound to the tree
controllers @arrangedObjects.name keypath? If this is the case, in
what way are you giving the tree controller content to work with.
All the
On 19 May 2008, at 13:29, Steven Hamilton wrote:
I have a core data master-detail interface that consists of a
sourcelist on the left and a tableview.
The source list displays object from a core data entity. THe table
view will be populated by a custom datasource as I have to do some
Hi Guys,
In follow-up to the last open invite I've had a couple of responses to
starting an NSCoder night. The proposed location is to vary between
Cardiff and Bristol, is anyone from the surrounding areas interested?
Please contact me off-list.
Look forward to hearing from you.
Jon
On 18 May 2008, at 20:57, Charles Srstka wrote:
Lately, I've been trying to update my stodgy old ways and try to
incorporate some of the new technologies Cocoa has picked up over
the years when starting new projects (my main app has had to be
compatible with older OS X versions, so I
On 18 May 2008, at 18:04, Markus Spoettl wrote:
On May 18, 2008, at 5:25 AM, Klaus Backert wrote:
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName
error:(NSError **)outError
{
*outError = nil;
NSKeyedUnarchiver *archiver;
archiver = [[NSKeyedUnarchiver alloc]
On 18 May 2008, at 23:57, Charles Srstka wrote:
On May 18, 2008, at 5:47 PM, Jonathan Dann wrote:
Not any more, the documentation may not have been updated yet. The
header for NSTreeController says differently as of 10.5. It's
always good to check the docs and the comments in the header
Hi All,
I'm now learning Core Data and was working through the persistent
document tutorial when I hit a snag.
After following the advice in the Adpoting the Mediator Pattern the
object controller now simply prepares its content and fetches the
department object.
I then tried in my
On 14 Apr 2008, at 02:12, Chris Hanson wrote:
On Apr 13, 2008, at 3:13 PM, [EMAIL PROTECTED] wrote:
I believe this is a typo in the documentation. The method you want to
override is actually spelled -drawArrow:highlightParts:
In http://www.cocoabuilder.com/archive/message/cocoa/
In the mean time, there is this.
http://lipidity.com/apple/ilife-controls-hud-windows-and-more
Jon
On Sat, Apr 12, 2008 at 7:21 PM, Michael Watson [EMAIL PROTECTED]
wrote:
You aren't missing anything. Apple gave us an official HUD panel and
UI
guidelines surrounding it, and failed to
Hi All,
I'm trying to re-create the iTunes and HUD window scrollbars for my
project. I've managed to get a good looking NSScrollerKnob, and
NSScrollerKnobSlot using bezier paths and gradients, but now I'm
moving on to the arrows and the curved ends of the slot.
To get the knob I've
On 7 Apr 2008, at 23:52, Adam Gerson wrote:
However, I am using CoreData with my TreeController bound to a Managed
Object Context. Can I still supply a contentArray in this situation?
Adam
On Sun, Apr 6, 2008 at 9:36 AM, Jonathan Dann [EMAIL PROTECTED]
wrote:
Hi Adam,
I've just finished
On 7 Apr 2008, at 01:16, Michael Ash wrote:
In short, if your shortcut conflicts with an existing one then it
won't show. But if it matches an existing one including in terms of
behavior, then it will show.
Yeah but that wasn't happening, my command-G shortcut was conflicting
with the Find
On 26 Mar 2008, at 00:45, Hamish Allan wrote:
Hi Jon,
On Tue, Mar 25, 2008 at 9:49 PM, Jonathan Dann [EMAIL PROTECTED]
wrote:
As of 10.5 it's the Apple-sanctioned way to go! I've used it for
ages
now, no problems at all. The tree node is a proxy for whatever
'real'
item you add
Hi Guys,
I'm using non-contiguous layout in one of my text views and I keep
getting this strange drawing error when I scroll quickly just after
the document has loaded:
http://flickr.com/photos/jonathandann/2364567591/
I have a method that highlights syntax by getting the visible
Ah, thanks. I wonder what the purpose of this subclass is and how
fragile this solution?
As of 10.5 it's the Apple-sanctioned way to go! I've used it for ages
now, no problems at all. The tree node is a proxy for whatever 'real'
item you add to the tree.
You can also get the
Hi All,
I've managed to do the above with NSAnimation, but I'm trying to do
the same using Core Animation.
AFAIK To hide a split view pane when the user clicks a button, you
need to set the frame's height/width to zero and move the divider when
the animation has finished. When using an
Hi Cathy and Paul,
Thanks to you both for your help, I'm really starting to get somewhere
with this now.
I now have a view controller hierarchy that reflects the views in my
app. I've defined my own view controller subclass that I use and an
abstract superclass for the view controllers
Hi Cathy,
Thanks again for your advice. I've got it working now and I'm almost
back I where I was before refactoring, I'm now running into a bindings
problem.
Before using the view controllers I had put 2 tree controllers in my
window controller's nib, 2 outline views were then bound
Hi guys,
I've ended up with a bloated window controller in my document based
app and want to refactor my code using done view controllers. My
question is really about design.
If I have a split view with which contains a split view (like mail)
then should I have a controller for the
Hi Cathy,
Thanks for the comprehensive answer to my question, I wanted to make
sure that I wasn't committing heresy by going down the 'tree of view
controllers' road before jumping in and refactoring all my code. I
was hoping to set it up so I could forget about most of the memory
On 10 Mar 2008, at 22:40, Scott Anguish wrote:
if you stop the animation of the replaceSubview... is that no longer
choppy? This is one of the most expensive animations possible.
That fixed it, looks great now! It was a flickering NSPopUpButton
that was causing me grief.
also, are
I think maybe you missed the existence of _cmd. Both self (this
object) and
_cmd (this selector) are passed as implicit arguments to every
Objective-C
method.
You can also call __func__ from within a method call, I use this often,
NSLog(@%p %s,self,__func__); // Thanks James Bucanek
Jon
Hi Guys,
Does anyone know if there are some release notes specific for 10.5.2?
I remember reading on some blog that there was an NSTreeController
bugfix. I can't seem to be able to find any details on Google other
than these
http://docs.info.apple.com/article.html?artnum=307109
which
On 5 Mar 2008, at 17:25, Christopher Nebel wrote:
On Mar 4, 2008, at 9:36 PM, Jens Alfke wrote:
On 4 Mar '08, at 3:23 PM, Sean McBride wrote:
There's also Canadian English (en_CA), and perhaps others too...
The ISO is in the process of adding en_LOL for Lolcat, aka Kitteh
or Cat
On 4 Mar 2008, at 17:50, Jens Alfke wrote:
On 4 Mar '08, at 3:25 AM, Jonathan Dann wrote:
That is a seriously good framework, and the documentation is great
too.
My only issue with regexkit is that it uses PCRE instead of ICU.
PCRE has to be compiled into the library, making it larger
On 25 Feb 2008, at 23:30, Jonathan Dann wrote:
On 25 Feb 2008, at 23:15, Jerry Krinock wrote:
I presume that sending a notification to a deallocced object causes
a crash?
Invariably! ;)
Oh, yes, it will bite you. Says so right in the documentation of -
[NSDocument close].
Funny how
MATCHES %@,myRegex and
evaluating my plain text document string, but now I'm stuck.
Any help would be grand, thanks.
Jonathan Dann
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
On 3 Mar 2008, at 16:16, Mike Abdullah [EMAIL PROTECTED]
wrote:
Jonathon, you'll have much better luck with NSScanner. It's designed
for exactly what you want.
Mike.
Thanks Mike, just tried it and it works quite well. Any way of using
NSScanner directly with regex? Not
On 1 Mar 2008, at 23:02, Stéphane Sudre wrote:
There seems to be a missing method in NSOutlineView.
You can know an item is expanded only if its parent is expanded (so
that the item itself is visible).
This is problematic if you want to cache the current list of
expanded items. Instead
Hi Guys,
I have a document-based non-GC app in which I register my document
instance to receive an NSViewBoundsDidChangeNotification for my
[[mainTextView enclosingScrollView] contentView].
On dealloc, the document calls [[NSNotificationCenter defaultCenter]
removeObserver:self], but
On 24 Feb 2008, at 22:45, Ralph Manns wrote:
Am 24.02.2008 um 23:37 schrieb Jonathan Dann:
Hi Jon,
thanks for your response and providing your code. Works great.
Ralph.
You're welcome!
Jon
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com
89 matches
Mail list logo