• 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: Java Cocoa - App doesnt work outside of PB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java Cocoa - App doesnt work outside of PB


  • Subject: Re: Java Cocoa - App doesnt work outside of PB
  • From: email@hidden
  • Date: Fri, 12 Apr 2002 12:36:24 +0100

Sorted!
I guess using absolute paths is a bit of a no-no . I changed it to
NSImage.imageNamed("crosshair.tif") which is a bit more dynamic

thanks




Pascal Pochet <email@hidden> on 12/04/2002 12:25:15 PM

To: email@hidden
cc:
Subject: Re: Java Cocoa - App doesnt work outside of PB


>ObjCJava WARNING:jobjc_jvm_newObject(): constructor with signature
>(Lcom/apple/cocoa/foundation/NSRect;)V on class mapView failed (should
>morph the java exception)
>2002-04-12 11:48:28.965 Trout[3075] AppKitJava: uncaught exception
>OBJCJava_RUNTIME_EXCEPTION ((null))
>2002-04-12 11:48:28.965 Trout[3075] AppKitJava: exception = (null
>description)
>2002-04-12 11:48:28.965 Trout[3075] AppKitJava: terminating.
>
>public class mapView extends NSScrollView
>{
>
> private mapPanel thePanel;
> NSTextField currentZoom;
>
> public mapView(NSRect aRect)
> {
> super(aRect);
> setHasVerticalScroller(true);
> setHasHorizontalScroller(true);
> NSClipView theView = new NSClipView();
> thePanel = new mapPanel(new NSRect(0.0f,0.0f,1000.0f,1000.0f));
> theView.setDocumentView(thePanel);
> setContentView(theView);
> NSImage crosshair = new NSImage
>("Trout.app/contents/resources/crosshair.tif",false);
> NSCursor theCursor = new NSCursor(crosshair,new NSPoint(8,8));
> setDocumentCursor(theCursor);
> }
>...


Don't know if it is related to your problem but it's not impossible:

I have seen that the system property "user.dir" doesn't return the
correct value when the application is launched from the Finder, so if
the new NSImage call is internally using "user.dir" (the directory
that contains your app), it may explain your problem.
Try putting the new NSImage in a try-catch clause and dump the stack
frame in case of exception.

Pascal







**********************************************************************************
Our network may monitor outgoing and incoming e-mail messages for
security and customer service purposes, but this e-mail is confidential.
Please notify the sender immediately if you receive it in error, and then delete it.
Thank you.
_______________________________________________
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: Java Cocoa - App doesnt work outside of PB
      • From: David Remahl <email@hidden>
  • Prev by Date: Re: Java Cocoa - App doesnt work outside of PB
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: Java Cocoa - App doesnt work outside of PB
  • Next by thread: Re: Java Cocoa - App doesnt work outside of PB
  • Index(es):
    • Date
    • Thread