How can I make my app know about when a space has changed, and when it has done
so to which space it has changed? Also, how can I read which Spaces and how
many are currently available? I'm allowed to use Snow Leopard.
The only thing I'm aware of is the
I don't mind using private API for this. After all my goal is to make some
simple in-house app and it doesn't matter too much if it breaks after some OS X
update.
I am aware the private API discussion is forbidden here. Thus, if anyone can
point me in the right direction, I would appreciate
I'm trying to create an NSMappingModel manually between two models, but it's
not working in that no data gets migrated over (I checked with an SQLite
database browser) to the new store, the tables are just empty.
The source model has one entity Person with two attributes: name and eyeColor.
Ok, that code really looks bad through email, so I'm going to give you a link
to the code in much more pleasant format:
http://pastie.org/888526
I'm trying to create an NSMappingModel manually between two models, but it's
not working in that no data gets migrated over (I checked with an
For a beta version of an app, let's say I want to make sure that users cannot
use the beta for far too long, far longer than the app goes out of beta. (Note
that this case would in reality rarely occur. Most users would end up getting
notified of a new update far sooner. This is just a safety
I have an NSSegmentedControl with 2 segments. The first has a menu set. The
second has no menu.
I have set a target and action for the whole segmented control.
My problem is that I have to hold down the first segment to see the menu for
it. By just clicking on it, the action method gets
Which one would you prefer (assuming you had 99 bucks to spare each year
without trouble) and why?
_
Hotmail: Powerful Free email with security by Microsoft.
I have a delegate of NSTextField that uses the controlTextDidEndEditing: method
to do some stuff when the editing has finished.
However, there are (as far as I can imagine) two types of possible scenarios
under which the editing finishes: 1) the user hits return. in this case, the
focus stays
Sweet, thanks! I didn't even know of NSTextMovement, but doing a search for in
Spotlight, I saw that it was indeed buried somewhere in the Event Handling
Guide :)
So anyway, this is how I'm doing it now, and so far it seems to be working well:
- (void)controlTextDidEndEditing:(NSNotification
How can I send messages to my Cocoa app through the terminal? Say something like
MyGreatMp3Player.app --sendAdvancedMessageThatIsNotInTheUI
create100EmptyPlaylists
I suppose it's hard to do this on the .app since it's just a directory, but you
get the point. Just so the user (but mainly the
No ideas at all? Were my instructions on how to find the iCal text fields that
I want unclear? Please let me know if that is the case.
Go into iCal (in Snow Leopard) and create a new event and and then click
outside that event. Then double-click on that event and hit the Edit button.
In
Hi,
Go into iCal (in Snow Leopard) and create a new event and and then click
outside that event. Then double-click on that event and hit the Edit button.
In the window you see, you have some neat looking text fields that show only
text when not in focus but show you a white background with a
, plonk them into a set, and you will have a unique set of
departments matching the query.
On 22 Jun 2009, at 02:00, Ulai Beekam wrote:
(Sorry, the previous post was not sent with plaintext)
Please draw up the following model on a piece of paper:
We have three entities: Department, Employee
Draw up the following model on a piece of paper:
We have three entities: Department, Employee, and EmployeeCar. Each of them has
the 'name' attribute.
Department has the to-many 'employees' relationship to Employee. Its inverse
is, naturally, the to-one 'department' relationship in Employee.
(Sorry, the previous post was not sent with plaintext)
Please draw up the following model on a piece of paper:
We have three entities: Department, Employee, and EmployeeCar. Each of them has
the 'name' attribute.
Department has the to-many 'employees' relationship to Employee. Its inverse
On Jun 3, 2009, at 4:12 PM, Ulai Beekam wrote:
I have an NSArrayController that, at the request of the user, can be
given a new fetch predicate. To do that I use the setFetchPredicate:
method. How can I detect when this predicate has been applied and
the appropriate fetching is done? I have
I have an NSArrayController that, at the request of the user, can be given a
new fetch predicate. To do that I use the setFetchPredicate: method. How can I
detect when this predicate has been applied and the appropriate fetching is
done? I have not come across any delegate method for it.
I
?
From: cocoa-...@esoteritech.com
To: cocoa-dev@lists.apple.com
Date: Wed, 3 Jun 2009 17:31:32 -0600
Subject: Re: Detecting when fetch: finishes
On Jun 3, 2009, at 5:12 PM, Ulai Beekam wrote:
I have an NSArrayController that, at the request of the user
How would you model smart playlists (like in iTunes) with Core Data?
If you have a Song entity, it is fairly obvious how you model a regular
playlist. The RegularPlaylist entity would simply have a to-many relationship
to the Song entity, being a simple collection of songs that the user adds
Thanks for the reply,
Here is my sample project:
http://dl.getdropbox.com/u/496106/scrollViewSplitViewGlitch.zip
I have added a simple data source to it that gives the table view 10 rows. Just
to emphasize that unchecking show vertical scroller is not really an option
for me because I indeed
You're right, you can't edit the formatter's error in
control:didFailToFormatString:errorDescription: because the error description
has already been determined.
You need to override the getObjectValue:forString:errorDescription: method of
NSFormatter to set a custom error description.
As
Well I'll be damned. I finally found out how to fix this thing. Turns out it is
trivial when you know about it :)
Simply do this in IB:
http://dl.getdropbox.com/u/496106/tableViewIBSetting.png
for the *table view* (not just the scroll view). Then it starts behaving
properly, even when we
I have a serious (well serious according to my own standards) glitch I came
across using NSScrollView (around an NSTableView) when using it with
NSSplitView. I don't want to bore you with a long description, so I made this
nice movie of the glitch:
Because just adding a key to a dictionary does not make it key-value-coding
compliant with respect to that key. KVC is needed for key paths like that to
work.
From: steve_cro...@mac.com
To: cocoa-dev@lists.apple.com
Date: Thu, 30 Apr 2009 19:00:51
Hi,
I find to be a strange problem. I would think that the
control:textView:doCommand... method should indeed get called. Are you
absolutely sure you are spelling it right? Did you put an NSLog(@foo); in
there to make sure it is getting called?
U
Hi,
We all know that we can detect whenregular text in an NSTableView
finishes editing using the control notification method
controlTextDidEndEditing:.
My problem, however, is this: In one of the columns I have attached an
NSPopUpButtonCell. The pop up button has two predetermined
It might be because Apple's way of alloc-ing the field editor on the spot may
not be such a good idea. If I remember correctly, it didn't work for me. That
may be the cause of your problem.
So my suggestion is: Try making an instance variable for the NSTextView, and
create it once in -init or
bind the selection of the popup to a variable and then observe
that variable via KVO. I did that on a single NSPopUpButton, you would
still need to get the affected row.
ALEXander.
On 24.04.2009, at 00:12, Ulai Beekam wrote:
Hi,
We all know that we can detect when regular text
Hi,
I have an (editable) NSTextField with an NSNumberFormatter attached to it. The
text field is bound to some other numerical property (if you want to test this,
you can just make a simple AppController and put the @property(readwrite) int
foo; inside it, and bind the text field to
Noone has an idea?
To elaborate, when not using bindings, the default behavior of text fields with
a number formatter is that when a user tries to enter abc in it, the text
field refuses to lose focus and makes a beeping sounds.
However, when the text field's value binding has been set, a
-dev@lists.apple.com
From: cocoa-...@esoteritech.com
To: ulaibee...@hotmail.com
Subject: Re: Bindings making NSNumberFormatter strange
Date: Wed, 22 Apr 2009 16:46:12 -0600
On Apr 22, 2009, at 3:57 PM, Ulai Beekam wrote:
To elaborate, when not using bindings, the default behavior of text
I have two entities Boss and Employee. Boss has the to-many relationship
'employees'. The inverse is, naturally, the to-one relationship 'boss'.
My problem is this. I have a custom key that I implement for Boss. And while I
am BETWEEN (i.e. the code between) willChangeValue:forKey: and
Hi,
Let's say I have an NSArrayController that contains Employee objects (Core Data
managed objects if you don't mind). Call this controller simply
'employeesArray'.
I want to create a custom view that displays (editable) text fields on the top
of each other, as many as it takes, that
for a custom view
From: kyle.slu...@gmail.com
To: ulaibee...@hotmail.com
CC: cocoa-dev@lists.apple.com
2009/3/19 Ulai Beekam :
I want to create a custom view that displays (editable) text fields on the
top of each other, as many as it takes, that display the *first names* of
the currently
Hi,
Let's say I want to have the field editor for a table view appear 2 pixel below
where it usually is, i.e. shifted 2 pixels down.
How can I do this?
Consider the following hypothetical situation: If I subclass NSTextView and
override the drawRect method like this,
-
2009 16:06:11 -0700
To: csu...@sutes.co.uk
CC: cocoa-dev@lists.apple.com
Subject: Re: NSTableView live resizing glitch
On Mar 12, 2009, at 3:50 PM, Chris Suter wrote:
Hi Ulai,
On Fri, Mar 13, 2009 at 9:33 AM, Ulai Beekam
wrote:
I'm having an NSTableView live resizing glitch
Hi,
I'm having an NSTableView live resizing glitch that is driving me nuts. Please
see this image:
http://img15.imageshack.us/img15/2012/picture1tcz.png
I really need to have the column width independent of the table view's size, so
it is not an option to have the column resize with the
Hi,
How do I create a Safari-style pop-up menu? I'm talking about the pop-up menu
(be sure to correct me if this thing is not even called a pop-up menu) that
appears when you click the button to show off-screen tabs.
Just open Safari (use version 3) and keep creating new tabs until the
Hi,
Just take a look at any toolbar text in Leopard. It has a subtle, white shadow.
How can I get this very same effect in my own app when using NSString's
drawInRect method? What attributes to use? Do you have any sample code?
Thanks, U.
-0500
Use a cell to draw your text and call -setBackgroundStyle: on it with
the parameter NSBackgroundStyleRaised. That'll apply the exact same
shadow that's used on toolbar item labels. Keep in mind that this
method is Leopard-only.
On 21-Feb-09, at 6:10 AM, Ulai Beekam wrote:
Hi,
Just
The default stroke seems to be one that assumes the path you make is the center
of the stroke. How can I make the stroke be on one of the *side* of the path?
Depending on how you look at it it could be to the right, left, outside
or inside. Any way to modify that?
Thanks,U
The clipping path was indeed what I was looking for to solve this. Thank you
sirs! :)
The default stroke seems to be one that assumes the path you make is
the center of the stroke. How can I make the stroke be on one of the
*side* of the path? Depending on how you look at it it could be to
My problem is that when I add directly to the managed object
context, the item is not getting selected automatically in the array
controller (by the way, I see the selection visually by means of the
table view bound to the array controller) even if I have checked the
select on insert
Where can I get Safari-like tabs in my own app? Actually, drag and drop is not
necessary for me, but I need tabs that merge themselves into the toolbar.
For instance, judging from this image: http://www.xtorrentp2p.com/1.png does
he use some known tab implementation? Let's just say I want
Check out PSMTabBarControl over on googlecode:
http://code.google.com/p/maccode/wiki/WhatIsMacCode
Dave
Hmm ok. I checked that out but the palette refused to appear in Interface
Builder. I followed their directions and put PSMTabBarControl.palette folder
into ~/Library/Palettes/ folder
Hi,
How do I programmatically create a managed object (with respect to some entity
in a particular context of course) but WITHOUT adding it to the context?
The reason I want this is to be able to take that new managed object and add it
via an NSArrayController (one that is connected to said
You indicated in your first sentence that you know which managed
object context the new object is destined for. I don't see the
problem. Just insert it when you create it.
My problem is that when I add directly to the managed object context, the item
is not getting selected
That is nice. Thanks.
Can you paste some simple code examples that do some matching against an
NSStrings?
For example, to determine whether myString matches against $s.+
And another example that matches myString against foo(.*)bar and if it
matches puts the stuff in the parantheses in a new
How can I incorporate an (editable) NSTextField into a CALayer, so that I can
put the text field into another layer by doing [parentLayer
addSublayer:textFieldLayer] ?
I really need to do this or some similar thing. Core Animation boasts being
easily be able to create animated user interfaces
will get an -animationDidStop notification at which point you can show
your NSTextField (look at setHidden in NSView). You said simple. I'm not so
sure that's true. I suggest you write some code and post specific
questions. Best Regards, -Matt On Nov 28, 2008, at 7:26 PM, Ulai
Beekam
write some
code and post specific questions.
Best Regards,
-Matt
On Nov 28, 2008, at 7:26 PM, Ulai Beekam wrote:
I want to create this user interface element:
A rounded rectangle somewhere on the window (it should be able to be
created through code, not inside the NIB).
If I
Hi
I know I can put an image into a layer by doing theLayer.contents =
cgTheGreatImage.
But that will just put a single image on the layer. My question is, how can I
use that image to have a repeating pattern on that layer of that single image?
Can you give me short example code snippet?
I want to create this user interface element:
A rounded rectangle somewhere on the window (it should be able to be created
through code, not inside the NIB).
If I double click it, it should increase its height using animation.
But here is the catch: When the heigh is increased, a text field is
Hi,
Let's say I have a plan for a simple app. Nothing too fancy, in a way. To name
an example, it could be one like ShoveBox or Things. Mine is probably simpler
than those. (It will be a good looking UI and icon that will be more trickier
part for me.)
I've already read more than half of
has to do with the aboutWindow outlet being referenced
after the window has been dealloced, you could nil out the aboutWindow
outlet in response to a windowDidCloseClose: delegate method. Jon Hess
On Nov 21, 2008, at 3:19 PM, Ulai Beekam wrote: Hi,I'm trying to do the
exercise on p
Hi,I'm trying to do the exercise on p. 195 in Hillegass (3rd Edition).I have
put this line in the AboutController.h header: IBOutlet NSWindow
*aboutWindow;And I have put these lines in AboutController.m file:-
(IBAction)showAboutPanel:(id)sender
{
if (aboutWindow == nil)
{
56 matches
Mail list logo