Re: Visual Builder question, method onClick

From: Tim Gimmel <tjg_at_gimmel.org>
Date: Wed, 24 Dec 2008 16:40:01 -0600
To: Prima Group <prima_at_prima.eu.org>

Dmitry,
Thank you very much for your reply! Ok, then my question is how do I
insert my sub in the object inspector? I see the "$self = $_[0];" in
the object inspector, but I do not understand the correct syntax to
insert the sub. (I have tried just plugging in my sub, something like
"bandSelect('7')" )

Thanks very much!

Tim

On Wed, 2008-12-24 at 22:55 +0100, Dmitry Karasik wrote:
> Hi Tim!
>
> On 24 дек 08 at 21:29, "Tim" (Tim Gimmel) wrote:
>
> Tim> I am very unclear on how the onClick method works. The onClick =>
> Tim> Prima::VB::VBLoader::GO_SUB('my $self = $_[0]; makes no sense to me
> Tim> and I have not been able to find the docs to explain this method
> Tim> (clearly).
>
> Hello Tim,
>
> The GO_SUB invocation in .fm files is needed for the dual use of the code.
> When a .fm file is loaded using VBLoad, the code is passed through "eval",
> and when the file is edited in VB, it is not, but the code can be edited
> in the object inspector. The GO_SUB method is not explained because .fm
> files are not intended for manual editing.
>
> Tim> Prima::VBLoad( './FT950.fm', Form1 => { centered => 1 }, )-> execute;
>
> The invocation is correct. All subs stored in FT950.fm will be
> processed automatically.
>
> Tim> Also do I need a "run Prima" statement? It appears the execute
> Tim> method does the trick.
>
> True, that is because execute() is intended for dialog execution, which
> is an event loop itself. If you need to run Form1 while other windows
> (if any) need to be accessed too, then execute() is not to be used,
> while "run Prima" is. For a single form though, execute() is a perfectly
> legal invocation.
>
Received on Wed 24 Dec 2008 - 23:37:24 CET

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET