Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TXNNewOblect stopped working




On 29-nov-04, at 17:27, Bryan Pietrzak wrote:


On Nov 29, 2004, at 3:00 AM, Jan E. Schotsman wrote:

Hello all,

I got a bug report on 9.2.2 for my app which I wanted to test. However, all of sudden I am getting a -50 error from TXNNewObject on startup when I try to create the log file. The same code used to work before. Previous versions of the application have the same problem.
Did Mac OS 10.3.6 change something in Classic that may cause this?


Jan.

Code snippet:

txnFrameOptions = kTXNWantVScrollBarMask + kTXNDontDrawCaretWhenInactiveMask +
kTXNAlwaysWrapAtViewEdgeMask + kTXNReadOnlyMask;


error = TXNNewObject( nil, window, &viewRect, txnFrameOptions, kTXNTextEditStyleFrameType, kTXNTextensionFile, kTextEncodingMacRoman, &txnObject, &txnFrameID, nil );

Are you 100% sure your parameters are correct?

Try calling IsValidWindowRef() on the window.

Verify the Rects are correctly formed. (I had a problem once where I accidently had a malformed rect where the top was greater than the bottom.)

For what it's worth, I wouldn't use kTextEncodingMacRoman since it's not technically the correct data type, instead I'd use kTXNSystemDefaultEncoding, or one of the three encodings defined as TXNPermanentTextEncodingType. (Yes, I know the same value and all, but it's just syntactic sugar :)

Bryan


I have uploaded a small test project. Someone with Codewarrior 8.3 and Mac OS 9.2.2. installed please test if this happens everywhere?
If it only happens on my system it must be hosed, right?
Then I have a problem because I can't start up from the original 9.0.4 system CD's for some reason.


<http://home.planet.nl/~jeschot/TestTXN.sit.hqx>


Jan.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >TXNNewOblect stopped working (From: "Jan E. Schotsman" <email@hidden>)
 >Re: TXNNewOblect stopped working (From: Bryan Pietrzak <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.