[01 Feb 2010] Loading a Brush in a Mac (x86) Executable

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
PEB
Posts: 591
Joined: Sun Feb 21, 2010 1:28 am

[01 Feb 2010] Loading a Brush in a Mac (x86) Executable

Post by PEB »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 01 Feb 2010 14:58:55 -0000

Hi Andreas,

I'm having trouble with the following script when compiled for Mac (x86).

Code: Select all

BackgroundBrush=LoadBrush(NIL, "Background.png")
CreateTexturedBGPic(1,BackgroundBrush,640,480)
DisplayBGPic(1)

Repeat
	WaitEvent
Forever
The following error message is displayed: "Cannot open file Background.png"

The file "Background.png" is located in the same folder as the executable. Should it be placed someplace else? Does this script work for you when compiled for x86 Mac?
User avatar
airsoftsoftwair
Posts: 5915
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[01 Feb 2010] Re: Loading a Brush in a Mac (x86) Executable

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 01 Feb 2010 22:36:27 +0100
Hi Andreas,

I'm having trouble with the following script when compiled for Mac (x86).

Code: Select all

BackgroundBrush=LoadBrush(NIL, "Background.png")
CreateTexturedBGPic(1,BackgroundBrush,640,480)
DisplayBGPic(1)

Repeat
	WaitEvent
Forever
The following error message is displayed: "Cannot open file Background.png"

The file "Background.png" is located in the same folder as the executable. Should it be placed someplace else?
Yes, it must be put into the "Resources" folder of the app bundle. I changed the behaviour in 4.5 to adhere to Apple's UI guide lines which say that all accompanying app files must be put into the "Resources" folder.
PEB
Posts: 591
Joined: Sun Feb 21, 2010 1:28 am

[01 Feb 2010] Re: Loading a Brush in a Mac (x86) Executable

Post by PEB »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 1 Feb 2010 17:41:57 -0800 (PST)

That worked. Thanks!
Locked