Thanks Mike --- Following your recommendation and the docs, I managed to
extract the value of the @"NSTextMovement" key from the notification userInfo
Dictionary, which contains just what I needed.
However, I found that my problem is a bit deeper --- I want to finish the text
editing session
Hi,
Apologies in advance for being stupid!
I've got an app I'm trying to create, using Core Data, I created the
data model, and Dragged some of the interface into place in the nib.
I've almost got the bindings sorted so it's got Array controllers for
all the entities, and it's pretty much
On 22 Jul 2010, at 05:30, Kyle Sluder wrote:
> On Wed, Jul 21, 2010 at 3:27 AM, Elizabeth Kellner wrote:
>> Second is that this app is being launched programmatically from
>> another app, using [NSTask launchedTaskWithLaunchPath:arguments:]. If
>> I launch the app directly, it does not seem to i
Hi All,
I have localized my app in English and French languages.
But I want to load French strings being in English language based on radio
button input (English and French).
Is it possible?
Is there any cocoa way of doing this?
Regards
Cocoa.learner
_
Thanks GT for your reply and interest.
I know one way that preparing a key-value dictionary from string table and
rendering those.
But at the same time I would like the input to change as well. That is if
French is selected then the input (keyboard) also change to French input.
So I am looking for
Amy Gibbs wrote:
> how do
> I reference the Arrays/Array controllers in the code?
>. I've
> added a 'calculate' button, so now I just need to take the 2
> properties from the selected product, do the maths, and set the cost
> property with the result.
Why don't use use bindings of the bu
The simplest way is to create action methods in your controller class,
along with ivars for the array controllers you need to access,
something like this in the header:
@interface MyController : NSObject {
IBOutlet NSArrayController *masterController;
IBOutlet NSArrayController *detailControll
Hi developers,
I search in google, but can see nothing. Is there Cocoa fuction for objects
like printf(), without timestamps?
--
best regards
Ariel
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
Could you be looking for NSLog?
http://www.cocoadev.com/index.pl?NSLog
On 22 July 2010 12:32, Ariel Feinerman wrote:
> Hi developers,
>
> I search in google, but can see nothing. Is there Cocoa fuction for objects
> like printf(), without timestamps?
>
> --
> best regards
> Ariel
>
On 22/07/2010, at 9:32 PM, Ariel Feinerman wrote:
> Hi developers,
>
> I search in google, but can see nothing. Is there Cocoa fuction for objects
> like printf(), without timestamps?
>
> --
> best regards
> Ariel
Depending on the information you want to see in printf, you can use
NSStringFr
Le 22 juil. 2010 à 13:32, Ariel Feinerman a écrit :
> Hi developers,
>
> I search in google, but can see nothing. Is there Cocoa fuction for objects
> like printf(), without timestamps?
Not the most efficient way, but straightforward for debugging purpose:
printf("%s", [[NSString stringWithFor
I think a more basic question is what you're doing in -drawRect that would
generate an exception in the first place. Typically a view should already have
access to any relevant resources (strings, images, whatever) before -drawRect
is ever called. Assuming that the exception is a reasonable erro
On Jul 21, 2010, at 5:27 AM, Elizabeth Kellner wrote:
> First is that app in question is a cocoa app that previously was a
> command line app, and so it is *not* calling NSApplicationMain. It
> starts its own run loop. Although I'm calling CFRunLoopRunInMode in
> the loop, could there be some ot
On Jul 22, 2010, at 2:47 AM, Motti Shneor wrote:
> Thanks Mike --- Following your recommendation and the docs, I managed to
> extract the value of the @"NSTextMovement" key from the notification userInfo
> Dictionary, which contains just what I needed.
>
> However, I found that my problem is a
Depending on your needs, the CGWindow API may do what you want. It can generate
images of windows, and then you could crop the image down. But if you're going
for transparency that probably won't work.
On Jul 21, 2010, at 10:55 AM, Oleg Krupnov wrote:
> Hi,
>
> I need to make a snapshot of a
Hi!
I'd like to highlight some text in a NSTextView by showing it in small caps. It
seems this is not a standard text attribute, so this is not possible unless
changing [NSTextView string] contents. Is this right?
Thanks!
Vincent___
Cocoa-dev mailing
On Jul 22, 2010, at 4:47 AM, Motti Shneor wrote:
> My Question: How can I Persuade the FieldEditor to end an Editing Session
> when these specific key-combinations occur? Should I override something? Is
> there a specific Delegate for that?
You might try subclassing the field editor and overri
On Jul 22, 2010, at 11:44 AM, Vincent Habchi wrote:
> I'd like to highlight some text in a NSTextView by showing it in small caps.
> It seems this is not a standard text attribute, so this is not possible
> unless changing [NSTextView string] contents. Is this right?
No, you do not have to modi
Ross,
thanks a lot for your hints.
> Small caps is not a trivial thing to implement, especially if you care about
> how they look.
Not too much. I just want to dynamically highlight keywords in a SQL sentence
(e.g. out of "select * from" -> "SELECT * FROM"). My present solution is to get
the
Thank you for yours, but I am looking for more convenient way, I mean a
function for console output, not for debugging like NSLog(),
so I wish:
NSLog(@"object is %@", obj);
// $ object is [object description]
I would not wish to convert NSString to utf8 for printf(), I wish to use
NSString
2010/
Greetings,
I want to be able to deselect the keyboard focus of a control after hitting
Return, whereas Tab moves to the nextKeyView.
When using editable NSTextField objects I can achieve this in the action method
with:
[ window makeFirstResponder:[ window contentView ]];
But when using ed
On Thu, Jul 22, 2010 at 12:57 PM, Ariel Feinerman wrote:
> Thank you for yours, but I am looking for more convenient way, I mean a
> function for console output, not for debugging like NSLog(),
>
> so I wish:
>
> NSLog(@"object is %@", obj);
> // $ object is [object description]
>
> I would not wi
Fantastic, Thank You, got that bit working, just for reference I've
got the following:
@interface ishop_AppDelegate : NSObject
{
IBOutlet NSWindow *window;
IBOutlet NSArrayController *Products;
NSPersistentStoreCoordinator *persistentStoreCoordinator;
NSManagedObjectModel *
Stephen,
you are right, I wish to get a function can use printf style, prints
Objective-C objects clearly and efficiently by %@,
I do not understand, hm, why there is no such function (except NSLog()) in
Cocoa?
Charlie,
-desription message can return localized NSString, so using of utf16 is
nec
On Jul 22, 2010, at 2:05 am, Amy Gibbs wrote:
> Some things I want to do though need to be actually coded, but how do I
> reference the Arrays/Array controllers in the code? Do I need to declare
> them? They aren't at the moment that I can see, but somehow it's using them.
> All the tutorials
On Jul 22, 2010, at 1:20 PM, Amy Gibbs wrote:
> double *price, *uom, *cost;
You have declared pointers to double, a scalar type. "double" is _not_ an
object type.
> price = [Product valueForKey:@"UOMcost"];
> uom = [Product valueForKey:@"purchaseUOM"];
The above is wrong, an
On Jul 22, 2010, at 1:44 PM, Ariel Feinerman wrote:
> you are right, I wish to get a function can use printf style, prints
> Objective-C objects clearly and efficiently by %@,
>
> I do not understand, hm, why there is no such function (except NSLog()) in
> Cocoa?
You've been given all of the t
Ken,
thank you, I have not known about -initWithFormat:arguments: is excellent
message, I think I find function I am looking for,
http://cocoaheads.byu.edu/wiki/different-nslog
2010/7/22 Ken Thomases
> On Jul 22, 2010, at 1:44 PM, Ariel Feinerman wrote:
>
> > you are right, I wish to get a fun
In the past I have used the construct
NSEnumerator *_enumerator = [_array objectEnumerator];
id _id = nil;
while (nil != (_id = [_enumerator nextObject])) {
.
.
.
if (condition)
break;
}
if (nil == _id) {
.
.
.
}
to determine if the entire contents of _array had been investigated and, if
not
I've tried declaring all sorts of things trying to get it to work :D
float, decimal, (the entity properties are decimal in the datamodel),
NSNumber, but I still get the error: invalid operands to binary /
I assume I can't use int as the figures aren't integers, I only need
it to 2 decimal p
On Jul 22, 2010, at 12:16, Charlie Dickman wrote:
> When trying to use, instead,
>
> for (id _id in _array) {
> }
>
> how, without reverting to effectively using an enumerator as in
>
> id theID = nil;
> for (id _id in _array) {
> .
> .
> .
> if (condition) {
> theID = _id;
> break;
> }
> .
On Thu, Jul 22, 2010 at 1:03 PM, Amy Gibbs wrote:
> I've tried declaring all sorts of things trying to get it to work :D float,
> decimal, (the entity properties are decimal in the datamodel), NSNumber, but
> I still get the error: invalid operands to binary /
Step one: stop thrashing. The compi
On Jul 22, 2010, at 13:03, Amy Gibbs wrote:
> I've tried declaring all sorts of things trying to get it to work :D float,
> decimal, (the entity properties are decimal in the datamodel), NSNumber, but
> I still get the error: invalid operands to binary /
>
> I assume I can't use int as the figu
On Thu, Jul 22, 2010 at 11:05 AM, Jochen Moeller wrote:
> Greetings,
>
> I want to be able to deselect the keyboard focus of a control after hitting
> Return, whereas Tab moves to the nextKeyView.
This is accomplished by the field editor. See the documentation for
-[NSText isFieldEditor].
>
> W
So replace printf by asl_log.
And if this is not convenient enough:
#define MyLog(fmt, ...) asl_log(NULL, NULL, ASL_LEVEL_NOTICE, "%s", [[NSString
stringWithFormat:fmt, ##__VA_ARGS__] UTF8String])
Or if you prefere a function
void MyLog(NSString *fmt, ...) {
va_list args;
va_start(args, fm
As far as I can tell, when LSUIElement is set to 1,
applicationShouldTerminate: is not called when a Cocoa application
receive a terminate request.
Is there a way in this case to prevent the application from being
terminated by friend terminate requests (SIGTERM would be accepted)?
Mac O
On Thu, Jul 22, 2010 at 11:44 AM, Ariel Feinerman wrote:
> Stephen,
> you are right, I wish to get a function can use printf style, prints
> Objective-C objects clearly and efficiently by %@,
>
> I do not understand, hm, why there is no such function (except NSLog()) in
> Cocoa?
>
> Charlie,
> -
On Jul 22, 2010, at 1:10 PM, Quincey Morris wrote:
> id _id;
>
> for (_id in array) {
> }
>
> if (_id)
> {
> }
If I use this to go backward through the array:
for (_id in [array reverseObjectEnumerator]) {
}
...is it still considered 'fast' enumeration?
-Jon
__
On 23/07/2010, at 9:28 AM, Jonathon Kuo wrote:
> If I use this to go backward through the array:
>
> for (_id in [array reverseObjectEnumerator]) {
> }
>
> ...is it still considered 'fast' enumeration?
Yes, NSEnumerator conforms to the fast enumeration protocol.
--Graham
_
On Jul 22, 2010, at 16:37, Graham Cox wrote:
> On 23/07/2010, at 9:28 AM, Jonathon Kuo wrote:
>
>> If I use this to go backward through the array:
>>
>> for (_id in [array reverseObjectEnumerator]) {
>> }
>>
>> ...is it still considered 'fast' enumeration?
>
>
> Yes, NSEnumerator conforms
Hello Kyle,
thanks for your answer. I did as you suggested. But both -makeFirstResponder:
and
-resignFirstResponder return YES after pressing Return in the textFieldCell.
So in my new test version the focus should move to an NSTextField after Return
is pressed in the textFieldCell within the N
Hello,
I'm having an issue with NSPropertyListSerialization, where I will call
dataWithPropertyList:format:options:error:, to get the data from a property
list–this part goes fine. However, then I need the data as a string, so I can
upload it to a web service. However, when I call initWithData:
On 7/22/2010 6:25 PM, Joe Turner wrote:
I'm having an issue with NSPropertyListSerialization, where I will
call dataWithPropertyList:format:options:error:, to get the data from a
property list–this part goes fine. However, then I need the data as a
string, so I can upload it to a web service. Ho
On Thu, Jul 22, 2010 at 6:25 PM, Joe Turner wrote:
> I'm having an issue with NSPropertyListSerialization, where I will call
> dataWithPropertyList:format:options:error:, to get the data from a property
> list–this part goes fine. However, then I need the data as a string, so I can
> upload it
Il giorno 22/lug/2010, alle ore 11.15, cocoa learner ha scritto:
> I have localized my app in English and French languages.
> But I want to load French strings being in English language based on radio
> button input (English and French).
>
> Is it possible?
> Is there any cocoa way of doing this?
Hi,
how can I accept a dragged message from Mail.app into a NSTableView and how can
I read the message's content?
I receive the message URL in form of message: when I use
NSURLPboardType as in the following example.
- (void)awakeFromNib
{
[tableView registerForDraggedTypes:[NSArray arr
Hi,
I have a requirement to have the main window for a certain application
to stay on top of all other windows. What I found out is that if I use
anything higher than kCGNormalWindowLevel for the NSWindow level, I
achieve the expected result (for instance: kCGFloatingWindowLevel).
However, Spaces
On Jul 22, 2010, at 12:29 PM, Aragao, Andre Augusto de (Andre) wrote:
> I have a requirement to have the main window for a certain application
> to stay on top of all other windows. What I found out is that if I use
> anything higher than kCGNormalWindowLevel for the NSWindow level, I
> achieve t
48 matches
Mail list logo