• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!


  • Subject: Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
  • From: Jerry Krinock <email@hidden>
  • Date: Thu, 19 Jan 2006 05:56:23 -0800
  • Thread-topic: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!

Thank you, Eric.

on 06/01/18 19:30, Eric Albert at email@hidden wrote:

> When in doubt, take a look at the header.

Better: When in state of complete confusion, take a look at the header.

> In this case, you'll see in
> Aliases.h that the AliasRecord struct is opaque if
> MAC_OS_X_MIN_VERSION_REQUIRED >= MAC_OS_X_VERSION_10_4.  In other
> words, if the "Mac OS X Deployment Target" setting for your project is
> 10.4 or later, the AliasRecord struct is opaque.

Yes, Deployment Target was the difference between Project A and Project B.
I now get consistent behavior with both of them, depending on Deployment
Target:

Deployment Target   Result
-----------------   ----------------------
COMPLIER_DEFAULT    same AliasRecord error
10.2                no errors
10.3                no errors
10.4                same AliasRecord error

However, the above results were obtained after I pasted in your suggested
code:

> Here's how to write your code in a way that'll work no matter what your
> deployment target:
> AliasRecord aliasHeader = *(AliasPtr)[decodedData bytes];
> #if MAC_OS_X_MIN_VERSION_REQUIRED >= MAC_OS_X_VERSION_10_4
> nBytesAliasRecord = GetAliasSize(&aliasHeader) ;
> #else
> nBytesAliasRecord = aliasHeader.aliasSize ;
> #endif

Personally, I am fine with changing from COMPILER_DEFAULT in Project B to
10.2 for this particular project, but I'd like to understand what is going
on.  I'm sure I did not change Project B's Deployment Target since
yesterday.  COMPILER_DEFAULT worked fine in Xcode 2.2 but gave this error
after 2.2.1.  Project B did cause a lot of internal errors in Xcode for the
first few hours or so.  They seem to have stopped now, after several
re-launches.

I put in some #pragma message to try and see what was going on with your
compiler directives and macros, but I didn't get any messages.  Does
Xcode/gcc support anything like "#pragma message"?

> That's because AliasRecords, as you've noticed, get written to disk but
> are also referenced in data, which means that they often have to be
> big-endian even on little-endian systems.  Rather than enumerate the
> cases in which you'd want big- or little-endian AliasRecords, we made
> the data type opaque and added new APIs which deal in native-endian
> data.  They're Get/SetAliasUserType and GetAliasSize, and there are
> also FromPtr versions of each if you have an AliasRecord * instead of
> an AliasHandle.

Sounds like I'd better test this section of code very carefully on the Intel
Mac.

Jerry


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
      • From: Eric Albert <email@hidden>
    • Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
      • From: Fritz Anderson <email@hidden>
References: 
 >Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!! (From: Eric Albert <email@hidden>)

  • Prev by Date: Re: Folder image tool
  • Next by Date: XCode debugger issue
  • Previous by thread: Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
  • Next by thread: Re: After 2.2.1: 'AliasRecord' has no member named 'aliasSize'. UNTRUE!!
  • Index(es):
    • Date
    • Thread