Ticket #269 (reopened defect)

Opened 3 years ago

Last modified 2 years ago

Math opens in Panoply

Reported by: mankoff Owned by: mankoff
Priority: critical Milestone: Waiting on REALBasic
Component: EVA Version: EVA 1.5
Keywords: Cc:
OS:

Description


Change History

Changed 3 years ago by mankoff

  • status changed from new to assigned

Changed 3 years ago by mankoff

  • status changed from assigned to closed
  • resolution set to fixed

Math should now open in EVA. However, due to the nature of this bug, its a hard one to test/verify...

My solution:

    cmd = './bin/SetFile -c "EVA_" -t "nCDF" '
    spawn, cmd + file
    cmd = "/usr/bin/open"
    spawn, [cmd,file], /NOSHELL

becomes

    cmd = "/usr/bin/open -a EVA.app " + file
    spawn, cmd

Changed 3 years ago by mchandler

I have very little idea why it occurred. It occurred because of something the Finder does. At this point I am unable to solve the problem 100%, yet I can still make it work.

That means: Math operated files, if double-clicked on, may still open in Panoply. *ANY* .nc file may still open in Panoply, even one produced by EdGCM or downloaded off our website. Hence I have not solved it 100%. But I can make it work just like EdGCM does: EVA will open it because I, as a programmer, am making EVA open it, even if you, as users (double-click) might still run into bugs. Since very few people double-click and the software (programmers) do most of the file opening, this is OK I think. For now at least.

The complete discussion is, of course, archived with the ticket: http://dev.edgcm.columbia.edu/ticket/269

For a technical discussion that is over my head, try reading these two articles: http://www.macosxhints.com/article.php?story=20051104055843452&query=open+with http://discussions.info.apple.com/webx?13@19.lcjUaQT2Tyh.3@.68ade1b3/22

and what your present fix is?

The previous fix was:

1) Use an apple-supplied tool called "SetFile" to tell the OS that EVA owns/created the file

./bin/SetFile -c "EVA_" -t "nCDF"

2) Tell the file to "open" itself (basically, double-click)

/usr/bin/open <FILE>

The new fix is:

1) Skip step 1 because it wasn't working

2) Tell the open command to explicitly use EVA

/usr/bin/open -a EVA.app <FILE>

I originally tried this fix when the problem first cropped up, but I messed up the testing. Because my IDL code doesn't know where EVA.app is (since you can drag-and-drop the bundle anywhere), I couldn't run that open command the way I originally tried...

I was testing it wrong: EVA.app was not running, I was testing the math mode in IDL, and IDL (or actually, Unix at this point) was saying "I can't find EVA.app".

My bug was that EVA.app SHOULD HAVE BEEN RUNNING when I test it, because if it is running (and by definition it always will be when the user does a math operation) then the finder doesn't need to know where EVA.app is, it just needs to be told "EVA.app" and it will use the EVA.app that is currently running.

Stupid mistake about 3 months ago that I realized yesterday when I went back to try to solve it again. If you look at the change log (or at the comments in the ticket) you'll see that the current solution is actually significantly simpler. 2 lines instead of 4, and we don't have to carry around the Apple SetFile utility inside of the bundle.

Also, why do you think it effected the Powerbook in Oklahoma while not effecting my G5 with the same installed version of EVA?

No idea. Read the articles above and tell me if you can figure it out. But since this is an OS-level thing, their Finder did something slightly differently, which put Panoply before EVA, whereas your computer had EVA before Panoply in some list of what to launch somewhere. Nothing to do with my code.

Changed 3 years ago by mchandler

  • status changed from closed to reopened
  • resolution deleted

Changed 3 years ago by mchandler

  • status changed from reopened to closed
  • resolution set to fixed

Changed 3 years ago by mankoff

Further testing and the bug still exists. Based on the above discussions, I think this is a system level bug that I cannot fix. Therefore, math files are being given the .netcdf extension so Panoply won't touch them.

Changed 3 years ago by mankoff

  • priority changed from highest to high
  • status changed from closed to reopened
  • resolution deleted
  • severity changed from critical to normal
  • milestone changed from EVA 1.1 to No Milestone

This should, someday, be fixed to work with a .nc extension. Hence, re-opened.

Changed 3 years ago by mankoff

  • milestone changed from No Milestone to Waiting on Apple

Changed 2 years ago by mankoff

  • version changed from EVA 1.1 to EVA 1.5
  • milestone changed from Waiting on Apple to Waiting on REALBasic

According to RBS, EVA ships with a buggy Info.plist file. Manually adding the correct file association to Info.plist, and then re-installing (delete, re-drag onto the disk) associates files with EVA.

I'll plan on fixing this for the next release.

Note: See TracTickets for help on using tickets.