I am getting funny results using grouping in NSUndoManager.
If I begin a group on mouse down, and end the group on mouse up, even
if I do nothing in between, it seems to record an undo task, with the
plain name Undo in the menu, dirtying the document. The task is
null - it doesn't actually
hello!
I'm trying to figure out how to use openAL without alut (as alut is no longer
included in the openAL framework). The roadblock I am facing is that
alBufferData requires a pointer to a sound's bitmap data.
NSSound doesn't seem to have the appropriate method. Any suggestions?
Please
Le 8 avr. 08 à 05:28, Peter Zegelin a écrit :
I have managed to get my slider working the way I want it to by
overriding mousedown and mousedragged, however there is still one
small detail. I cant see how to make the slider knob show its
'pushed' image while the slider is being dragged.
Graham Cox wrote:
I am getting funny results using grouping in NSUndoManager.
If I begin a group on mouse down, and end the group on mouse up, even if
I do nothing in between, it seems to record an undo task, with the plain
name Undo in the menu, dirtying the document. The task is null - it
I have managed to get my slider working the way I want it to by
overriding mousedown and mousedragged, however there is still one
small detail. I cant see how to make the slider knob show its
'pushed' image while the slider is being dragged. Does anyone know
how to do this?
thanks!
Change your function definition to -
(NSString*)convertFunctionWithValues:(NSString*)etc and just add
return retVal;
Also, its not really necessary but in the interest of good coding
practices you may want to consider passing an array (NSArray of
NSNumber or whatever) to
On 8 Apr 2008, at 09:37, Bryan Henry wrote:
Change your function definition to -
(NSString*)convertFunctionWithValues:(NSString*)etc and just add
return retVal;
Also, its not really necessary but in the interest of good coding
practices you may want to consider passing an array
Also, according to your code at the bottom here, you want to return
a value from a METHOD not a function.
Mike.
That's splitting hairs just a little. Most people use the terms
interchangeably, at least informally, and trying to introduce the
distinction just for the sake of it has the
Well, you can't return anything if your method's return is declared as
void. It would have to be the type of object you're returning, which
in this case is an NSString. Hence:
- (NSString) convertFunctionWithValues:(NSString *) valueOne ...
At the end of your method, you would use the
Does it have to return void? If not, how about returning an NSString*?
- (NSString *)convertFunctionWithValues:(NSString *)valueOne
ValueTwo:(double)valueTwo ValueThree:(double)valueThree
ValueFour:(double)valueFour
ValueFive:(NSString *)valueFive ValueSix:(double)valueSix
{
NSString
There's quite a few printf arguments the Mac OS doesn't support right
now. An alternative is to shuffle pointers around:
NSString * string1 = @you, * string2 = @hello;
...
if([language isEqualToString:@Backwards Latin])
{
NSString * temp = string1;
string1 = string2;
I'm looking for a way to switch parameters order in order to use the
same parameters for different languages.
something like
NSString string1=@you
NSString string1=@hello
NSString str=[NSString stringWithFormat:@%2 %1, string1,string2];
will make str value hello you.
I have been working with
Mac OS X has layered bootstrap nameservers. The bottom layer is the
root layer and all others like the console user's layer go on top.
For security, layers can see connections at their level or below, but
not above. This in short means the root layer cannot see any other
connections not
Well, I have found a good solution using
stringByReplacingOccurrencesOfString:withString:options:range:
The only problem is that one of the parameters is a float, and if I
want to display it with more or less precision I would have to make a
preprocess of the parameter format into the string.
Now
You can use the POSIX standard library (sprintf) rather than NSStrings
for this...
On Apr 8, 2008, at 5:48 AM, Jere Gmail wrote:
On Apr 8, 2008, at 3:33 AM, Jere Gmail wrote:
I'm looking for a way to switch parameters order in order to use the
same parameters for different languages.
Douglas
Thanks, I did realize my mistake as I remembered that the RTFD is a
package and not a file.
Fred
On 7 Apr 2008, at 17:36, Douglas Davidson wrote:
As others have noted, RTFD is a packaged file format, consisting of
a directory in the file system containing the underlying RTF and
On Apr 8, 2008, at 4:52 AM, Bryan Henry wrote:
Also, according to your code at the bottom here, you want to return
a value from a METHOD not a function.
That's splitting hairs just a little.
No, it's precisely accurate. While the meaning is clear in this
case, failure to use proper
On 8 Apr 2008, at 11:33, Jere Gmail wrote:
I'm looking for a way to switch parameters order in order to use the
same parameters for different languages.
something like
NSString string1=@you
NSString string1=@hello
NSString str=[NSString stringWithFormat:@%2 %1, string1,string2];
will make str
I think using the capacity of Cocoa would be simplier. Look at the doc
on the localization :
http://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/Articles/StringsFiles.html#//apple_ref/doc/uid/2005
This line :
NSLog(@%3$u : %2$@ : %1$@, @le 1, @le 2, 3);
result
Thanks, but unfortunately you're mistaken as far as I and my
exhaustive project find command can see - Sketch does not use undo
grouping at all (seems there is no real need for Sketch to deal with
the possibility of multiple undoable operations being grouped because
it's so simple and only
See [NSApplication setApplicationIconImage: (NSImage*)]. This changes
the application's icon, and updates its dock icon.
On Mar 30, 2008, at 10:42 AM, Samvel wrote:
I'd like my application to show number of completed tasks in Dock
Icon as it is done in Mail (number of unread emails).
Hi,
I have a layer-backed NSView, say an NSButton (or a complete view
hierarchy with many controls), and I am transforming - moving,
rotating, etc. - its layer around. Now when I try to click the
NSButton at its currently visible position, drawn by the CALayer, it
does not work. I have
On leopard or later, you can just do:
[[[NSApplication sharedApplication] dockTile] setBadgeLabel:[[NSNumber
numberWithInt:42] stringValue]];
to put 42 as a badge
Matt
On 8 Apr 2008, at 14:06, Adam P Jenkins wrote:
See [NSApplication setApplicationIconImage: (NSImage*)]. This
changes
Hi,
I've currently got a function of type void that works swimmingly in
the debugger. I now need to populate a text field with the value of
the generated string within the function. The function is declared
along the lines:
- (void)convertFunctionWithValues:(NSString *)valueOne
On 8 Apr 2008, at 13:20, Jason Stephenson wrote:
I. Savant wrote:
No, it's precisely accurate. While the meaning is clear in this
case, failure to use proper terminology on a technical mailing list
can cause confusion resulting in more noise and wasted time. A
method is a method. A
On Apr 8, 2008, at 3:38 AM, Frédéric Testuz wrote:
I think using the capacity of Cocoa would be simplier. Look at the
doc on the localization :
http://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/Articles/StringsFiles.html#//apple_ref/doc/uid/2005
Or perhaps
On Apr 7, 2008, at 2:36 PM, Quincey Morris wrote:
On Apr 7, 2008, at 12:10, Chris Hanson wrote:
On Apr 7, 2008, at 1:50 AM, Quincey Morris wrote:
Yet a core principle of Core Data is its abstraction of the model
away from the structure of the various persistent store formats.
Core Data
Hey everybody. I'm working on a small app - to make the post shorter,
lets just say that it displays (plain) text, but I want the user to be
able to pick the font used (the same font should be used for all the
text).
Right now, I have a changedFont: method in my controller class, that
Are you sending convertFont: to the sender of changedFont:? I think
this is required or controls start to get confused. May or may not
solve your problem though.
On Apr 8, 2008, at 8:41 AM, Thomas Backman wrote:
Hey everybody. I'm working on a small app - to make the post
shorter, lets
I have the string representation of a percentage value, that goes to 6
places beyond the decimal point. Something like this:
64.123456%. I want to round that to 2 places and keep the percent sign at
the end e.g. 64.12% and return it as an NSString. I was playing around with
NSNumberFormatter (in
Hm ...I had to bind it to a NSCollectionItemView subclass that routes
to the AppController.
cheers
--
Torsten
On Apr 7, 2008, at 18:04, Torsten Curdt wrote:
Hm ...I was trying to bind a button inside a NSCollectionItemView
view to an action in my AppController. This obviously does not work.
For string formats there's %.2f which means show 2 places after the
decimal, it's rounded as well. Also, you can use %% to print a
literal % symbol.
On Apr 8, 2008, at 9:07 AM, Lorenzo Thurman wrote:
I have the string representation of a percentage value, that goes to 6
places beyond the
This seems like a lot of trouble to go to. Why not do something like
this?
NSString *inString = @64.123456%;
NSString *outString = [NSString stringWithFormat:@%.2f%%, [inString
doubleValue]];
Hank
On Apr 8, 2008, at 11:07 AM, Lorenzo Thurman wrote:
I have the string representation of a
Call me crazy, but why wouldn't this work? (warning: typed in mail)
return ([NSString stringWithFormat:@%.*f%%,places,[valueToRound
doubleValue]]);
Lorenzo Thurman mailto:[EMAIL PROTECTED] wrote (Tuesday, April 8, 2008 8:07
AM -0500):
I have the string representation of a percentage
Yep, I am, unfortunately.
The whole method, bar 3 lines for saving to user defaults, is
- (void)changeFont:(id)sender {
NSFont *oldFont = [textView font];
NSFont *newFont = [sender convertFont:oldFont];
[textView setFont:newFont];
}
Worth mentioning is that before clicking in the
From Core Animation for OS X, by Bill Dudney:
Since the view is managing the layer and has to be intimately
familiar with what is going on with the layer it is not recommended
that we manipulate the layer in any way except through the methods
exposed through the view. As long as we use
The font panel sends it's messages to the shared font manager. You
can make your own font panel subclass and tell the font manager to use
it with setFontPanelFactory:. It's possible the textView is absorbing
the changedFont: message, you might need to implement
Hi All,
Would someone provide me a pointer for how to get the mouse location
in the coordinate system of a transformed layer that is underneath the
mouse. I thought I could do something like this:
Mouse_Location = [Target_Layer convertPoint:
NSPointToCGPoint( [NSEvent mouseLocation] )
Well, I was thinking more along the lines of an RBSplitView, something
you can just drop into your nib/code and suddenly your toolbars are
better :)
Thanks for the pointers, everyone.
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote on
2008-04-07 17:47:30:
I'm looking for an open-source
Hey Mani,
I never solved the problem completely, however, I realized that what
you need to do, or so it seems, is to somehow get notified when the
animation has finished and then actually move the button to the
position where the animation stopped. It seems really convoluted to
me, but I
On Apr 7, 2008, at 10:03 PM, Jens Alfke wrote:
On 7 Apr '08, at 8:11 PM, Mike wrote:
I need to get the creator code of my app's bundle without diving
into the bundle and reading the plist directly.
You're mixing up HFS creator codes with bundle identifiers, I think.
HFS creator codes are
After a great amount of trial and error, It is my belief that I would
like to use Core Data with bindings in order to keep my UI synced
with my model objects. Here's the summary:
I have a custom view (CellMapView) controlled by a custom window
controller (CellMapController) in an
don't work with the layer directly when you have layer-backed views
only do it when you are using layer-hosting views
On Apr 8, 2008, at 8:30 AM, Manfred Schwind wrote:
Hi,
I have a layer-backed NSView, say an NSButton (or a complete view
hierarchy with many controls), and I am
Adding a cell, in addition to creating a new Cell entity, also has to do
some custom tasks on initialization. Each cell has a one-to-one
relationship with another managed object (Scene), so the scene object needs
to be created and inserted in to the MOM when the cell is created.
This is
On Apr 8, 2008, at 9:15 AM, douglas a. welton wrote:
Hi All,
Would someone provide me a pointer for how to get the mouse location
in the coordinate system of a transformed layer that is underneath
the mouse. I thought I could do something like this:
Mouse_Location = [Target_Layer
I don't know about NSView, but I was having the same issue with
NSWindow and this fixed it:
-(BOOL)canBecomeKeyWindow
{
return YES;
}
wes
On Fri, Apr 4, 2008 at 3:33 PM, [EMAIL PROTECTED] wrote:
Thanks for the reply. Actually I read those posts already, that's why
I threw out the
My only question with that is that I will need to fetch all existing
cells, and I as I understood it this was something that was not to be
done in awakeFromInsert. Is that something I dreamed up?
Thanks,
Mike
On Apr 8, 2008, at 1:20 PM, I. Savant wrote:
Adding a cell, in addition to
On Tue, Apr 8, 2008 at 2:45 PM, Michael Burns [EMAIL PROTECTED] wrote:
My only question with that is that I will need to fetch all existing cells,
and I as I understood it this was something that was not to be done in
awakeFromInsert. Is that something I dreamed up?
If that's a rule
Right now, there is no way to specify Japanese Hiragana just using
Cocoa API.
Starting from Leopard, you can use -[NSTextFieldCell
setAllowedInputSourceLocales:] with an array containing @ja (the
Japanese locale) to narrow it to Japanese input modes.
Or, also from Leopard, you can use
I would like to force a text input method, such as the Japanese
hiragana input, onto a NSTextField programatically. How would I go
about doing this?
--
定魅刀利
Dimitri Bouniol
[EMAIL PROTECTED]
http://web.mac.com/dimitri008/
___
Cocoa-dev mailing
Interestingly enough, I started looking back to figure out where I
had read that and realized it had come up in a thread I started back
in September (http://www.cocoabuilder.com/archive/message/cocoa/
2007/9/21/189533). The only way I have found to accomplish what I
need to is by putting
By default, the line break mode is clip (single line). Change it to
word-wrapping let you change the height.
Aki
On 2008/04/08, at 12:28, Dean Ritchie wrote:
I'm new to XCode 3 and Interface Builder. Trying to redo an earlier
Cocoa application, I need to specify a vertical text field,
On Tue, Apr 8, 2008 at 3:34 PM, Michael Burns [EMAIL PROTECTED] wrote:
Interestingly enough, I started looking back to figure out where I had read
that and realized it had come up in a thread I started back in September
(http://www.cocoabuilder.com/archive/message/cocoa/2007/9/21/189533). The
I'm new to XCode 3 and Interface Builder. Trying to redo an earlier
Cocoa application, I need to specify a vertical text field, like
20x120, but Interface Builder dims out the height value. Since this
was available in 1.5, I assume I'm missing some obvious parameter
somewhere that would
On Apr 8, 2008, at 5:41 AM, [EMAIL PROTECTED] wrote:
On leopard or later, you can just do:
[[[NSApplication sharedApplication] dockTile] setBadgeLabel:
[[NSNumber numberWithInt:42] stringValue]];
to put 42 as a badge
Matt
On 8 Apr 2008, at 14:06, Adam P Jenkins wrote:
See [NSApplication
I know I can place a menu on the system bar to make my application
accesible when on background, but right now I can't find it.
I did it last year but totally forgot.
Anyone can help?
--
http://zon7blog.wordpress.com/
And again we fall.
___
Cocoa-dev
on 4/8/08 1:23 AM, [EMAIL PROTECTED] purportedly said:
I have an object observing an NSArrayController's arrangedObjects
property. My observeValueForKeyPath:... is called as expected, except
for shutdown. When I quit my application, it is called multiple times,
but the array contents haven't
NSStatusItem?
On Tue, Apr 8, 2008 at 10:59 PM, Jere Gmail [EMAIL PROTECTED] wrote:
I know I can place a menu on the system bar to make my application
accesible when on background, but right now I can't find it.
I did it last year but totally forgot.
Anyone can help?
--
I'm not sure if it's supposed to work or not, but I have been
struggling with the same thing and finally settled for a solution
where I created a timer when the cell started tracking. The timer
fires after half a second and if the button is no longer pressed by
then invalidates itself. It's not
I have a PDFView in my Core Data application which I generate when the
tab is changed to view it. During the generation of the PDF file, the
undoManager seems to get cleared out (but the window stays dirty) when
I call:
[myPDFView setDocument:previewPDF];
So I tried adding the following
on 4/7/08 3:50 PM, [EMAIL PROTECTED] purportedly said:
[column bind:NSValueBinding toObject:contentsCTRL withKeyPath:@myKey
options:nil];
Is myKey a property of the NSArrayController? If not, why should it
respond to it?
Best,
Keary Suska
Esoteritech, Inc.
Demystifying technology for your
My NSPersistentDocument app has two kinds of windows that can be shown
for a given document.
A few revisions back (I just noticed it last night, though), Type2
windows stopped showing up in the Window menu. I can create them, and
they respond to the Bring All To Front menu item. Type1
You can use NSApplication's addWindowsItem:title:filename: to manually
add windows to the list. Also make sure your windows don't have
isExcludedFromWindowsMenu set to YES.
On Apr 8, 2008, at 3:21 PM, Hal Mueller wrote:
My NSPersistentDocument app has two kinds of windows that can be
Hi,
My app is not a document-based application. And it has a main window
and other windows.
What I want to ask you to tell me is how to remain still the main
window even if user
option-clicks the close box of one of the other windows.
I tried observing with its name nil and object nil.
On Apr 8, 2008, at 2:31 PM, Michael Vannorsdel wrote:
Also make sure your windows don't have isExcludedFromWindowsMenu
set to YES.
Thanks, that was the clue to the fix. In IB I had accidentally
changed the class of the window to something that had that set to NO
by default.
Hal
On Apr 8, 2008, at 10:19 PM, Justin Hawkwood wrote:
How do I call [myPDFView setDocument:previewPDF] without clearing
out the undoManager?
I don't think you can. (And if you can, I'd really, really like to
know :-) I filed a bug report on this back in Feb. (#5733716).
António
I put some code into my observe method to get the arrangedObjects
array out of the NSArrayController, and then I print that array to the
screen. On exit of the application, the observe method gets called
around 7 times, and there doesn't seem to be a difference in the array
contents
Hi,
I have a source list (an NSOutlineView bound to an NSTreeController),
with three sections: one containing fixed items, one dynamic items,
and one items the user can add and remove (c.f. the iTunes source list
sections 'Library', 'Shared' and 'Playlists').
Because my add and remove controls
Hi,
I have a string declaration of:
returnString = [NSString stringWithFormat:@%c-%i-%i-%f,
asciiString, firstDouble, secondDouble, thirdDouble];
Which is producing a weird output when used outside of an NSLog.
Examining each parameter in the debugger shows exactly what I want,
i.e. an
On Apr 8, 2008, at 1:33 PM, Stuart Green wrote:
Hi,
I have a string declaration of:
returnString = [NSString stringWithFormat:@%c-%i-%i-%f,
asciiString, firstDouble, secondDouble, thirdDouble];
If asciiString really is an ASCII (null-terminated) string, then you
need to use %s, not %c.
Hi, thanks for that.
The current version of Sketch doesn't have this code, which is why I
couldn't find it ;-)
It does confirm the problem I'm having though so that's useful to know
- it means I'm not doing something stupid with the undo manager.
Interesting that they removed this from
Try casting them to ints before formatting:
returnString = [NSString stringWithFormat:@%c-%i-%i-%f, asciiString,
(int)firstDouble, (int)secondDouble, thirdDouble];
On Apr 8, 2008, at 1:33 PM, Stuart Green wrote:
Hi,
I have a string declaration of:
returnString = [NSString
On Apr 8, 2008, at 12:33 PM, Stuart Green wrote:
returnString = [NSString stringWithFormat:@%c-%i-%i-%f,
asciiString, firstDouble, secondDouble, thirdDouble];
Which is producing a weird output when used outside of an NSLog.
Examining each parameter in the debugger shows exactly what I
On Tue, Apr 8, 2008 at 8:33 PM, Stuart Green [EMAIL PROTECTED] wrote:
returnString = [NSString stringWithFormat:@%c-%i-%i-%f,
asciiString, firstDouble, secondDouble, thirdDouble];
You have a format string for character-integer-integer-float/double,
not string, double, double, double.
CocoaHeads Lake Forest will be meeting on the second Wednesday in
April. We will be meeting, as usual, in the community room of the El
Toro branch of the Orange County Public Library at 24672 Raymond Way,
Lake Forest, CA 92630.
Please join us from 7pm to 9pm on Wednesday, 4/9.
We are going to
What advantage does NSUinteger have over uint32? I realize that on
a 64 bit machine, it would be a uint64.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the
On Apr 8, 2008, at 6:30 PM, Timothy Reaves wrote:
What advantage does NSUinteger have over uint32? I realize that on
a 64 bit machine, it would be a uint64.
None. It only declares the integer to be 32-bit on 32-bit builds, and
64-bit on 64-bit builds.
Nick Zitzmann
That's pretty much it. Since 64bit on mac are LP64, int is always
32bits. Using NSUInteger gives you an integer that behaves like
ILP64, 32bit on 32bit arch, 64bit on 64bit arch, if you're looking for
that behavior.
On Apr 8, 2008, at 6:30 PM, Timothy Reaves wrote:
What advantage does
On Apr 8, 2008, at 5:30 PM, Timothy Reaves wrote:
What advantage does NSUinteger have over uint32? I realize that on
a 64 bit machine, it would be a uint64.
Advantage? None, really. It's a question of what you're trying to
express -- do you want specifically a 32-bit unsigned integer,
Ken Thomases wrote:
On Apr 7, 2008, at 10:49 PM, Mike wrote:
In that case, how do I get the fullpath to the item from the iterator?
There doesn't seem to be any key in the info dictionary for the
current item's fullpath.
Huh? You mean the enumeratedItem from your original code snippet? You
I'm using bind:toObject:withKeyPath:options: to programmatically set up
bindings from a set of proxy objects (the receiver) to various properties on
a model object, and while changes to the model properties are properly being
reflected in the proxies, changes to the proxy properties are not being
But that still leaves the question unresolved. How do you add an
object into a dictionary via NSDictionaryController?
I have a NSCollectionView bound to a NSArrayController and am able to
add things to its content array via addObject. Works great, the
object immediately shows up in the
Actually on Leopard you should be able to store an NSValue as an
attribute, simply by using an attribute of type Transformable, and
setting the Value Transformer Name to NSUnarchiveFromData.
I just tried it though, and it seems like there is a bug which
prevents it from working. Basically
On Thu, Apr 3, 2008 at 4:31 AM, Daniel Thorpe [EMAIL PROTECTED] wrote:
I have gone with using a ...AsString attribute and using NSRectFromString.
Seems to work okay, although I've got no idea if it's the most efficient
method. I think Core Data seems a little limited in that you can't store an
84 matches
Mail list logo