Help with Macintosh programming

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

Archive for February, 2012

Best optimized compiler?…

I currently use CodeWarrior v7.1 and it works great, but the code that is
generated is about twice as slow compared to the same code compiled from
Microsoft’s VC++ 6.0 running under Windows adjusting for clock speed.

The only thing I can figure is that the Microsoft compiler is doing a better
job of optimizing the code than Metrowerks is.
I can’t believe the Pentium is that much faster than a G4 running a simple
loop with a few multiplies and adds.

Is there a faster, better optimized compiler out there, or is is worth
updating to CodeWarrior v8?

Thanks!

Bill

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

changing target name in Project Builder ?

How do I change the name of the target in Project Builder.  I’ve built
an applescript droplet, want to change the name of the target, and
change nothing else.  My efforts to build a new target in the same
project have all failed.

Thanks,

Ronald Florence                         www.18james.com

posted by admin in Uncategorized and have Comment (1)

Re: [Q]Cocoa newbie help: drag and drop

In article <no-1701031250540…@p499-apx1.akl.ihug.co.nz>,

 n…@spam.please (Jeremy) wrote:
> I have a class called TElement which stores an NSString and an int. My
> document uses NSMutableArrays of TElement to store data for tableviews
> (string in one tableview column, int in the other). I want to be able to
> drag a row (i.e., an instance of TElement) from a tableview to a textfield
> and display the TElement data in the textfield. Do I have to create my own
> pasteboard data type, or do I call declareTypes:owner: and declare
> TElement as a pasteboard data type, or will one of NSPasteBoard’s data
> types store the desired data?

> I have read through the developer documentaion, but it’s only gotten me
> more confused. Any help appreciated.

If you want to display the data as text in the target, you should be
able to use NSStringPboardType.  You just need to make sure and put an
appropriate string on the pasteboard when dragging starts.  You don’t
need to declare your own pasteboard type unless the receiver may want to
receive a TElement object, or some other nonstandard data type.


Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 1.3: Now runs the Mac OS X "Repair Priveliges" utility.
See http://www.atomicbird.com/

posted by admin in Uncategorized and have No Comments

ResizeWindow acts funny if height or width are made smaller

Hi all,

I receive a mouse down event (inGrow), so I call ResizeWindow().

This works absolutely fine when I make the window bigger, but if I try
to make the window smaller by either reducing the height or the width,
after I release the mouse button the window moves slightly, and then
follows my cursor around the screen.

Im obviuosly doing something wrong, I just wondered if anyone has seen
this behaviour before.

Thanks,

James.

posted by admin in Uncategorized and have No Comments

Old Mac books useful for OSX?

I was a pretty avid developer on the Mac in the 80′s and early 90′s,
then my work took a different turn… but the new unix underpinnings
have me back in the Mac camp. With no knowledge of the new environment
to speak of, my question is whether or not there’s any point in keeping
my tons (over 30) of "Classic" Mac programming books (most of my
previous work was in System 7.5) – to include almost the entire (sigh)
Inside Macintosh series, CodeWarrior 9 books, Dave Marks books, etc.  
There is literally a dumpster sitting in my driveway beckoning (my
college stereo just bit the dust a few minutes ago with all due
reverence) – but I don’t want to trash anything that might actually be
useful in Cocoa Programming.  I have stuff like the numerics and
appltalk manuals too – how about those?

Thanks, and an email response is appreciated since my newsreader seems
to be having a bad week.

- Al

posted by admin in Uncategorized and have Comments (4)

OS X equivalent of /proc/net/dev

I downloaded the new No-IP update client for Linux yesterday.  It is
written in C.  The previous version compiled and seems to work fine on
OS X.  This one does not.  The author says it will work on BSD systems,
but this is apparently one area in which Darwin differs significantly
from BSD.

The hangup seems to be with a function that looks for network devices in
/proc/net/dev.  What is the Darwin/Mac OS X equivalent of /proc/net/dev,
and how can I get to it in C?  

The answer seems to be something along the lines of netstat -a, but
that’s as far as I can get before running out of knowledge.  Hauling out
my trusty old C reference book, would something along the lines of
‘system("netstat -a")’ do it?


Larry Fransson
Seattle, WA

posted by admin in Uncategorized and have Comments (4)

Converting ADSP and NBP to TCP/IP

Hello.  Can you all give me an idea of what it would take for me to
rewrite a server and a client app implemented using the AppleTalk
Manager (ADSP and NBP) to TCP/IP.

Should I use Open Transport?  

I have encapsulated most of my networking stuff in a connection
object.  I need to give my client a bid and want to get a good idea of
the time involved in such a project.  Ballpark estimates are good.

Kaydell

posted by admin in Uncategorized and have No Comments

[Q] Delimiter used by CFURLGetFileSystemRepresentation

How can one determine the delimiter used by
CFURLGetFileSystemRepresentation to separate folders?


== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." – Sun Tzu
== Insults, like violence, are the last refuge of the incompetent… ===

posted by admin in Uncategorized and have Comments (3)

Quick pointers??? Want Translucent image to apper over active window…

Any ptrs to code I can modify?

I want the use to hit a key seqeunce & then have the app
present a translucent set of buttons over the current window.

Pls respond directly to me…

Thanks!

posted by admin in Uncategorized and have No Comments

Mixed c++ and Objective C

I am trying to write a simple program that mixes Objective C and C++.  
The Objective C would hadle all the GUI stuff and the C++ would handle
all the programming logic.  However whenever I go to compile, I will get
weird errors such as:
 header file ‘iostream.h’ not found
 undefined type, found ‘class’

Does anyone know how to get Project builder to find the standard header
files, or why it is not recognizing the keyword ‘class’  Thanks

posted by admin in Uncategorized and have Comments (2)