Page 1 of 1

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

Posted: Sat Jun 13, 2020 5:32 pm
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?

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

Posted: Sat Jun 13, 2020 5:32 pm
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.

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

Posted: Sat Jun 13, 2020 5:32 pm
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!