Page 1 of 1

Question about CocoaMessage, sharedApplication, delegate

Posted: Mon Jun 06, 2022 3:41 pm
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?

Re: Question about CocoaMessage, sharedApplication, delegate

Posted: Mon Jun 06, 2022 5:04 pm
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.