08-11-2012 09:29 AM - edited 08-11-2012 09:30 AM
@Ben wrote:
@iCat wrote:
@P Anand wrote:
How about?
You should be more specific when you want to solve any problem. Please do not post very simple question to which the others cannot understand whats in your mind and what you want to achieve. Please explain as much as possible so that you will not be questioned.
Good luck.
I want to know if using local variables that way is safe.
Judging by your questions I hope not to be singing an old song to you but...
Please do let yourself be mislead by the term "local variable" and thinking they are the same as locals used in text based languages. While in other lahguages, a local is a name associated with a memory location, in LV a local is a method of accessing a GUI object that should be thought of as an I/I device that lets you update a user or get a selection from a user. We would never think of using a register in the I/O device as a method to share data between threads in other languages and similarly, we should not use locals to share data in LV. They are I/O devices.
There are many methods to share data and comunicate across threads process contexts and platforms for that matter.
One of the simplest to understand, flexible, robust methods is an Action Engine (see the link provided above).
And in the event you missed it...
Local in LV = I/O device.
Ben
I wasn't using it as a local variable in the same sense as other languages.
I did that because that was the only way, which I knew, to have a tab control switch to the next tab entry every second.
Do you know a safer way to have a tab control switch to the next entry?
08-11-2012 10:42 AM
I wasn't using it as a local variable in the same sense as other languages.
I did that because that was the only way, which I knew, to have a tab control switch to the next tab entry every second.
Do you know a safer way to have a tab control switch to the next entry?
There is nothing wrong with using a local variable for that.
08-12-2012 11:54 AM
08-12-2012 07:34 PM
Mea culpa for mentioning queues in the same sentence as notifiers. 😛
08-12-2012 08:08 PM
08-12-2012 09:05 PM
@Sergey Kolbunov wrote:
Actually my reply above is for apok's example on the first page of the topic. Sorry, I did not link the reply to his message.
Yeah but it might be my fault he gave a queue example. Anyway, the gentle nudges in the right direction have been made. 🙂
08-13-2012 08:39 AM
@Hornless wrote:
Anyway, the gentle nudges in the right direction have been made. 🙂
yes, it has....
08-13-2012 09:06 AM
I think that a notifier is also a many-to-many message.