Help with Macintosh programming

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

Archive for September, 2010

CVS Question

Hi All,

I’m about to start setting up a new Source Control System and would like to
try CVS. We will be running the following config:

Server will run Linux (most likely on a PC Box).

Clients will be:

MacOS (Classic and X), running CW and PB.
Windows 98/2000/NT
Sun Solaris
Linix on PC’s

We would most likely want to be able to have a Standalone Client for
Mac/Sun/Windows.

Can CVS handle this ok?

Where can I get info/download etc on this?

Thanks a lot
Dave

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

Dialing a Modem

I am looking for a way to dial the modem under Mac OS 9.1 and carbon. I don’t
want to jump fully to Mac OS X yet, so IO Kit is not an option. I am trying to
use Open Transport, but just can’t get it to work. Any sample code out there,
or some advice?

Thanks,
Darryl

posted by admin in Uncategorized and have Comments (9)

Cocoa-Java+JDirect trouble

I am experimenting with a Cocoa based Java application under Mac OS X,
building in Interface Builder.
I use Jdirect (3.0) access to the toolbox for getting data from preX
resource forks, setting file creators etc.
The first call to such a function (for example in getting an FSSpec
from a file path, or other JDirect calls) takes a long time, sometimes
the disk cursor starts spinning, textfields in the window are not
updated although there code has been called, and sometimes all reaction
ceases, requiring a forced quit.
If program survives the first JDirect call, it seems to react properly
on subsequent calls.
The library modules are (lazy)loaded as it seems they should be.
Is something going wrong with the event loop, with the java engine?
I do use Carbonlock to avoid thread problems, but this doesnt seem to
make much difference.
Anybody an idea what happens and where the culprit can be found?

Thanks in advance for who can supply help.

Hans van der Meer

posted by admin in Uncategorized and have No Comments

mystery disk activity

I have a video application which I have written.
It runs under MacOS 9.1 on a PowerMac.  I can hear
the disk thrashing when the program runs.  It is
clearly tied to the frame rate I am using.  It
"ticks" for every frame.  When I slow it down,
I can hear the individual disk(?) "ticks" in sync
with the frame capture.  I have virtual memory turned
off.  The program uses 15 MByte heap and 1 MByte stack.
I have 256 MByte RAM.  Any thoughts would be appreciated.
I am mystified.  I am sending the same inquiry to the
company which manufactured the frame grabber and provided
the driver for it. ???

Don

P.S.: The portion of code which is running when this is
occurring requires no disk access whatever.

posted by admin in Uncategorized and have Comments (2)

Where is the security class in MacOS java???

Hi all,
Looking for the right class to grant permission to read a .txt file on my
machine and over the internet…
I’m running MRJ 2.2.5…
I should miss something somewhere.

Thanks for yur help…

posted by admin in Uncategorized and have Comments (2)

Interface mechanism for hierarchica data

Hi all. I’ve got a weird set of data that I can’t find a good way to
display. It’s a pile of data that needs to be decoded, and it consists
of a couple of fixed fields, followed by variable-length structs and
lists, that may or may not exist depending upon preceding data.

I was thinking that some kind of hierarchical display is the (only)
solution, but which one? If was thinking of the OS X Finder-style
browser, which I assume is some form of NSBrowser or something, but I
really don’t have the time (yes, everybody says that, but it’s true).
So I’m thinking of a twist-down like the DataBrowser, where fixed
fields and such are list entries (like a file in the usual examples),
and the variable-length or lists-of-structs are the twists (like a
folder).

Something like:
Attribute 1 = x
Attribute 2 = y
List of Structs R
    Struct 1
        Attribute 1
        Atribute 2
    Struct 2
    Struct 3
List of Structs S
   Struct 1
   List of Structs  T
        Struct 1
        Struct 2
and so on.

Whaddaya think?

The primary problem is that the actual data content can’t reallky be
effectively displayed in a list.

posted by admin in Uncategorized and have Comment (1)

FREAKISH error with floating points and the '==' operator.

Hi-

    I’ve been trying to write a relatively simple algorithm to convert a
double to a string (printable using quickdraw text routines).  In any
case, in part of the algorithm, the computer insists that a number does
not equal itself.  Basically i have a number (sum), that keeps getting
stuff added to it until it’s as big or bigger than the desired double.
However, sometimes when sum IS actually equal to the double, the
computer will insist that it’s actually greater than.  I’ve found this
has been happening mostly when the double (and sum) are in the range of
0 to 1.  (Incidentally, i tried modifying the comparison to be double +
1 == sum + 1. Oddly enough, this fixed most of the errors.  (for
instance, 0.123 != 0.123, but 1.123 == 1.123).  However, there still are
some that have that error (mostly ending in …. 75 for some reaons).

Has anyone had this problem before? Or am i just missing something about
the proper use of floating point numbers?

Thanks,
Ian Biringer

posted by admin in Uncategorized and have Comments (9)

calling functions in MacsBug

I seem to remember there was some way to call functions from within
MacsBug (not dcmds, but ‘regular’ code that exists in memory, e.g.
SysBeep, CFGetRetainCount, etc.), but I can’t remember what the exact
syntax was (it’s not in the official documentation).
Does anybody know / remember?

-jens


Jens Miltner                                   Netopia Development GmbH
e-mail:jum AT mac DOT com                      Germany    

posted by admin in Uncategorized and have Comments (5)

Controlling the CursorDevice

I am having a problem with the CursorDevice functions,
the problem is due to the single tasking (cooperative
multitasking) nature of MacOS 9 the functions that control
the cursor do no take effect immediately, but some time
later. Unfortunately I can’t find anything that defines
when, I assume this is because it depends on the app
that is in the foreground.

In order to deal with latency issues my code operates
in a defered timer routine in the background.

I need to know when my command has been processed
so that I can issue another, (to prevent bizareness in
the way the cursor behaves) is there any way of doing
this? Can anyone point me at any resources / code
examples.

Thanks in advance.

Brian

posted by admin in Uncategorized and have No Comments

NSDocument printShowingPrintPanel problem – question

I was wondering if someone could help me out here-

I have created a new document based application, and want to override
the default printing mechinism to print my view, and not the whole
window.

So in my MyDocument class (which subclasses NSDocument) I added this
code, just as a stub:

- (void)printShowingPrintPanel:(BOOL)flag {
    NSLog(@"printShowingPrintPanel\n");

}

and when I go to print from the File menu, it seems to be completely
ignored.

I have read all the documentation I could find on custom printing, and
even looked at sample code that seems to be doing this and working just
dandy- but I can’t seem to get anywhere with it.

any suggestions?

thanks,

-gus

posted by admin in Uncategorized and have Comments (4)