Question about CocoaMessage, sharedApplication, delegate

Mac OSX specific forum
Wolfram
Enthusiast
Enthusiast
Posts: 568
Joined: Thu May 30, 2013 4:39 pm

Question about CocoaMessage, sharedApplication, delegate

Post by Wolfram »

If I use the same cocoaMessage multiple times inside my program will it work like a procedure or
will it compile the same code on every line where I write it?

Is it fine to store the sharedApplication and appDelegate in a global variable on program start or is there something to consider?
macOS Catalina 10.15.7
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Question about CocoaMessage, sharedApplication, delegate

Post by wilbert »

Wolfram wrote: Mon Jun 06, 2022 3:41 pm If I use the same cocoaMessage multiple times inside my program will it work like a procedure or
will it compile the same code on every line where I write it?
CocoaMessage is a procedure just like any other builtin procedure.
Wolfram wrote: Mon Jun 06, 2022 3:41 pm Is it fine to store the sharedApplication and appDelegate in a global variable on program start or is there something to consider?
That should be fine.
Windows (x64)
Raspberry Pi OS (Arm64)
Post Reply