Help with Macintosh programming

macintosh programming, mac programming, mac os programming, mac os x programming, mac programming language, mac programing

Archive for October, 2012

Obtaining a long long value from an NSTextField

I’m reading a number from an NSTextField that could be bigger than
2^32.  NSTextField has methods to return intValue, floatValue, and
doubleValue, but not longLongValue.

I know that I can move it into an NSString, then convert substrings to
intValues and work out the long long by multiplying.  Before I do that,
though, I wonder if anyone has a better idea.

I’m still on 10.2, if it matters.

Thanks,

.
posted by admin in Uncategorized and have Comments (2)

Problem With NSLog()

Hello, All.

I’m having a problem with NSLog().  Specifically, it doesn’t work
(display its output to the Run Log) for me anymore.  I’m using it in
places where it’s obvious that the code around it is being executed,
and it works just fine if I create a new Cocoa Application.  The
problem seems to have started shortly after I changed the build style
of my app from Development to Deployment.  However, changing it back
to Development doesn’t seem to help.  Any suggestions?

By the way, I’m using XCode with 10.3.  Thanks in advance.

posted by admin in Uncategorized and have No Comments

using stl header

all,

try to compile a C++ program using STL features. g++ could not resolve the
"#include <string>", noticed that the header is in
"/usr/include/gcc/darwin/3.1/g++-v3", could compile with explicit path,
but just wondering what to setup to include with explicitly setting the
path.

thanks,

ym

posted by admin in Uncategorized and have Comments (5)

HBITMAP able to work on MAC?

hello..

do anyone know whether the code below is able to work on MAC??

HBITMAP hbm;
hbm=LoadBitmap(GetDLLInstance(gPlugInRef) ,MAKEINTRESOURCE(i+6));

Thanks !


Best Regards
Eleen

posted by admin in Uncategorized and have Comments (7)

How to learn Carbon

I have been programming under Cocoa for a while now and am very
comfortable in that environment. However I want to port some existing
Unix graphics library to the Mac, so I will need to use the Carbon API.

The problem I have is that there doesn’t seem to be any introductory
documentation shipped with Xcode or on Apple’s developer website that
teachs how to use Carbon. There isn’t even a Carbon, section in their
sample code library. It seems as if Apple doesn’t really want people
using Carbon. The only resources I can find is the Orielly book
"Learning Carbon" which is a few years old.

Any tips on the best way to learn Carbon?

- Steve

posted by admin in Uncategorized and have Comments (2)

Obtaining a long long value from an NSTextField

I’m reading a number from an NSTextField that could be bigger than
2^32.  NSTextField has methods to return intValue, floatValue, and
doubleValue, but not longLongValue.

I know that I can move it into an NSString, then convert substrings to
intValues and work out the long long by multiplying.  Before I do that,
though, I wonder if anyone has a better idea.

I’m still on 10.2, if it matters.

Thanks,

posted by admin in Uncategorized and have Comments (2)

Problem With NSLog()

Hello, All.

I’m having a problem with NSLog().  Specifically, it doesn’t work
(display its output to the Run Log) for me anymore.  I’m using it in
places where it’s obvious that the code around it is being executed,
and it works just fine if I create a new Cocoa Application.  The
problem seems to have started shortly after I changed the build style
of my app from Development to Deployment.  However, changing it back
to Development doesn’t seem to help.  Any suggestions?

By the way, I’m using XCode with 10.3.  Thanks in advance.

posted by admin in Uncategorized and have No Comments

using stl header

all,

try to compile a C++ program using STL features. g++ could not resolve the
"#include <string>", noticed that the header is in
"/usr/include/gcc/darwin/3.1/g++-v3", could compile with explicit path,
but just wondering what to setup to include with explicitly setting the
path.

thanks,

ym

posted by admin in Uncategorized and have Comments (5)

HBITMAP able to work on MAC?

hello..

do anyone know whether the code below is able to work on MAC??

HBITMAP hbm;
hbm=LoadBitmap(GetDLLInstance(gPlugInRef) ,MAKEINTRESOURCE(i+6));

Thanks !


Best Regards
Eleen

posted by admin in Uncategorized and have Comments (7)

How to learn Carbon

I have been programming under Cocoa for a while now and am very
comfortable in that environment. However I want to port some existing
Unix graphics library to the Mac, so I will need to use the Carbon API.

The problem I have is that there doesn’t seem to be any introductory
documentation shipped with Xcode or on Apple’s developer website that
teachs how to use Carbon. There isn’t even a Carbon, section in their
sample code library. It seems as if Apple doesn’t really want people
using Carbon. The only resources I can find is the Orielly book
"Learning Carbon" which is a few years old.

Any tips on the best way to learn Carbon?

- Steve

posted by admin in Uncategorized and have Comments (2)