Help with Macintosh programming

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

Archive for November, 2011

Porting Windows To OSX

I have recently bought a new G4 mac and have been eager to start
programming with it. My first attempted project is to port my
companies socket libraries for use in OSX with the plan to use them to
write my own e-mail application. My attempt is still in the
re-compiling stage at the moment because so many of the core libraries
in C++ for windows do not map straight to OSX with many having
different names or not having the same stuff in them. I have begun the
process of writing mac specific # defines but it very tiresome and
frustrating searching through all the libraries for what I am looking
for. Is there anywhere out there with at least some sort of hints as
to where to look for these functions, classes and libraries or
possibly a full mapping of windows compiler libraries to OSX gcc
compiler? If anyone out there can help I would be very grateful.

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

[Mac Developers] Welcome to Pascal Central

To all Pascal programmers on the Macintosh:  

The following is a summary of the current contents available at Pascal
Central. For any of you who may not know about Pascal Central, Pascal
Central provides the pascal community one place to obtain Pascal
technical information, Pascal source code, and Pascal-related internet
links.  

The home page is at http://pascal-central.com/  

Pascal Central is broken up into the following sections:  

FEATURED ARTICLES:  These are the latest articles contributed to Pascal
Central. See the end of this note for a summary of these articles.  

FORUMS & LINKS:  This pages provides information on Pascal forums (such
as the MacPascal mailing list, and the Pascal newsgroups), and several
links to Pascal related web sites (for PC and Mac).  To join the
MacPascal mailing list, go to
http://www.stairways.com/mailinglists/macpascal.html.  

PASCAL TOOLS: This page is intended to be a one-stop shopping place for
obtaining free tools to help you program in Pascal.  

PASCAL ADVOCACY:  This page features Pascal announcements, and provides
a list of Apple contacts for advocating support of Pascal on the
Macintosh.  

PASCAL BOOKS:  A list of Pascal related programming books, sorted by
year.  All include links to Amazon.com reviews and availability.

PASCAL REFERENCES:  A collection of articles which are related to
miscellaneous Pascal topics, such as Pascal Standards, different
compilers, and Apple’s new Universal Headers.  

PASCALWARE:  Freeware and Shareware applications written in Pascal.  

THE ARCHIVE:  The complete archive of articles submitted to Pascal
Central, in order of most recent first.  

THE FAVORITES:  Statistics, by month, on frequency of visits at Pascal
Central. Check out which pages are the favorites.  

SOURCE CODE:  Three different pages dedicated to source code, including
NOTHING BUT MACINTOSH SOURCE CODE, a list of links to a variety of
source code pages, MERLIN’S CAVERN, a collection of complete Pascal
source code packages, including running applications, all for the Mac,
and MORGANA’S CAVERN, a collection of complete Pascal source code
packages, including running applications, all for Windows.

Enjoy!
Bil


—-
  Bill Catambay, Software Developer, Webmaster                    
  Pascal Central    -> http://pascal-central.com/                
  Morgana’s Revenge -> http://www.excaliburworld.com/emr/        

posted by admin in Uncategorized and have No Comments

[Ann] Prospero Pascal, and Friends of Pascal

The following new articles are now featured at Pascal Central:
(http://pascal-central.com/)

Review: Prospero Extended Pascal  (Bill Catambay)
——————————–
A full review of Prospero Software’s Extended Pascal, a 32-bit Pascal
compiler for Windows.

Friends of Pascal (Bill Catambay)
—————–
Many thanks to those who have made voluntary contributions to help pay
for the domain registration and other administrative activities in
support of Pascal Central.

http://pascal-central.com/friends.html

Recent additions to Merlin’s Tower (Mac OS X Sample Code)
———————————-
GrabBag, by David Bainbridge

Merlin’s Tower is at http://pascal-central.com/merlinx.html

The intent of Pascal Central is to provide the Pascal community one
place to obtain Pascal technical information, Pascal source code, and
Pascal-related internet links.

http://pascal-central.com/

Please consider contributing your Pascal Central source code!
http://pascal-central.com/submit.html

Enjoy


—-
  Bill Catambay, Software Developer, Webmaster                    
  Pascal Central  -> http://pascal-central.com/                  
  EMR Infinity    -> http://www.excaliburworld.com/emr/          

posted by admin in Uncategorized and have No Comments

[Cocoa] right-click

I want to check for right mouse button down & up. Steve can take his single
button and, well, never mind. The NSRightMouseDown/Up events don’t seem to
get sent. I guess what I need to do is look for ctrl-click. Is there an
easy way to do this, or do I need to look for ‘ctrl down, button down, button
up, ctrl up’ sequence?

-Liz

posted by admin in Uncategorized and have Comments (8)

readme files

Hi,

In OS 9 I had created a readme file for my app. It was a SimpleText
document, with some PICTs embedded as a resource. I then put an
option-space (IIRC), and the pics would show up at that position in the
document. However – this doesn’t work in OSX, because the TEXT document
now opens in TextEdit, and the pictures are gone.

What is the recommended way for making a readme file tha works both in
OSX and OS9? Should I just make a HTML file of it?

thanks,

- Koen.


If you can read this, you have been brainwashed.

posted by admin in Uncategorized and have Comments (3)

#pragma pack

In MSVC there is a pragma called pack, is there an analog in Apple’s IDE?

posted by admin in Uncategorized and have Comments (9)

OS X backspace character question

I am writing and encoding function for a basic C programming class I
am taking.  I was given a routine that runs using the curses.h
library.  On OS X I am instead using the ncurses library.  The routine
is used to read in a password.  It should behave as below:

This is the input message

will show up as

*************************

I have this working except for one thing.  The desired behavior allows
the function to recognize when the backspace key is pressed.  In this
case I do the following in ncurses mode.

*p is a pointer to the input array

while ((*p=getch()) != ‘\r’)
{
if(*p == ‘\b’)
  addstr("\b \b");
else
  addstr("*");
p++;

}

My problem is that the program never takes the first branch of the if,
it always takes the else.  Since the function given to me was tested
on Solaris and HP-unix flavors I was thinking that maybe on OS X
pressing the backspace key generates something other than \b ?????
Does anyone know if this is the case, if not anyone got a clue what I
did wrong?

Marcus

posted by admin in Uncategorized and have No Comments

Receive ALL key events? GUI without Dock Icon?

Applications such as LaunchBar and ‘LiteSwitch X’ are able to receive
key events when they are not in the foreground.  How?

Further, LiteSwitch X manages to not have a dock icon, though it does
have a GUI. How?

posted by admin in Uncategorized and have Comment (1)

[Cocoa] frame/bounds

I’ve been muddling along ok now, but I’ve got some bugs that won’t
straighten out becuase I’m not really clear on the concept.

Here’s what the  NSView page says for the frame and bounds methods:

       frame

       Returns the receiver’s frame rectangle, which defines its position in
       its superview. The frame rectangle may be rotated; use the frameRotation
       method to check this.

       bounds

       Returns the receiver’s bounds rectangle, which expresses its location and
       size in its own coordinate system. The bounds rectangle may be rotated;
       use the boundsRotation method to check this

This doesn’t exactly make it clear as to the distinction.  Watching these
items in the debugger, they always seemt to be the same, despite resizing
the view and changing the scale. The frame size and bounds size are always
precisely the same. The frame origin is 1,1 while the bounds origin is 0,0.

Setting either the frame size larger activates the scrollbars, setting the
bounds size doesn’t. What does setting the bounds do, and why would I want
to?  Am I likely to ever have a legitimate reason to set the origin?

posted by admin in Uncategorized and have Comments (5)

Need u.Utility to find which libraries are loaded

Is there an OS X utility to find the paths to the libaries that an
OS-X process has loaded?  I want to see if my application is perhaps
picking up an older version of a library.  On Windows there are
several of these (ProcView for instance).  Could not find any for
OS-X.

Thanks,

Steve

—————————————————————-
Steven Dubnoff              sdubn…@circlesys.com              
Circle Systems              We make your data instantly usable.
Download Stat/Transfer from http://www.stattransfer.com
1001 Fourth Avenue, #3200   (206) 682-3783
Seattle, WA 98154           Fax (206) 328-4788

posted by admin in Uncategorized and have Comments (2)