• 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: Current process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current process


  • Subject: Re: Current process
  • From: Renaud Boisjoly <email@hidden>
  • Date: Tue, 11 Jun 2002 11:39:08 -0400

Hi again Nathan

It seems I always get a result of 0 from
(theItemInfo & kLSItemInfoAppPrefersClassic)

I tried using NSLog to show its value while SimpleText was running, but it always says 0... am I missing something? Perhaps I'm using this arong. What I did is the following:

- (BOOL)test {
ProcessSerialNumber theProccessSerialNumber;
FSSpec theSpec;
ProcessInfoRec theInfoRec;
FSRef theRef;
LSItemInfoRecord theItemInfo;

GetFrontProcess( &theProccessSerialNumber );

theInfoRec.processInfoLength = sizeof(ProcessInfoRec);
theInfoRec.processName = NULL;
theInfoRec.processAppSpec = &theSpec;

GetProcessInformation( &theProccessSerialNumber, &theInfoRec );

FSpMakeFSRef ( &theSpec, &theRef );

LSCopyItemInfoForRef( &theRef, kLSRequestBasicFlagsOnly, &theItemInfo);
NSLog(@"Classic? %d",(theItemInfo.flags &kLSItemInfoAppPrefersClassic));
return (theItemInfo.flags & kLSItemInfoAppPrefersClassic) != 0;
// return theResult;
}

Which always returns NO it seems...

thanks for all your help!

Renaud

On Tuesday, June 11, 2002, at 08:38 AM, Nathan Day wrote:

On Tuesday, June 11, 2002, at 09:58 PM, Renaud Boisjoly wrote:

return (theItemInfo & kLSItemInfoAppPrefersClassic) != 0;

This line should be

return (theItemInfo.flags & kLSItemInfoAppPrefersClassic) != 0;
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Current process
      • From: Nathan Day <email@hidden>
References: 
 >Re: Current process (From: Nathan Day <email@hidden>)

  • Prev by Date: newbie trouble with multiple nibs, menu's, runmodalforwindow and pasting
  • Next by Date: Re: NSSlider's mouseDown implementation
  • Previous by thread: Re: Current process
  • Next by thread: Re: Current process
  • Index(es):
    • Date
    • Thread