Re: Complete example

From: Jason Taylor <jtaylor_at_bastyr.edu>
Date: Mon, 30 Aug 2004 10:33:59 -0700
To: Dmitry Karasik <dmitry_at_karasik.eu.org>

Dmitry Karasik wrote:

> Hi Jason!
>
>On 28 Aug 04 at 00:36, "Jason" (Jason Taylor) wrote:
>
> Jason> Does anyone have a complete script example they're willing to share
> Jason> that uses one or more forms built with the visual builder?
>
>Here's a hello world:
>
> use strict;
> use Prima qw(VB::VBLoader Application);
> my $form = Prima::VBLoad('hello.fm');
> run Prima;
>
>where the hello.fm is below. BTW, did you check Prima::VB::VBLoader
>manpage?
>
># VBForm version file=1.2 builder=0.2
># [preload]
>sub
>{
> return (
> 'Button1' => {
> class => 'Prima::Button',
> module => 'Prima::Buttons',
> profile => {
> owner => 'Form1',
> text => 'Hello, world!',
> origin => [ 30, 32],
> name => 'Button1',
> y_centered => 1,
> x_centered => 1,
> size => [ 96, 36],
> onClick => Prima::VB::VBLoader::GO_SUB('
>my $self = $_[0];
>$::application-> close;
>','Button1', 'onClick'),
> }},
> 'Form1' => {
> class => 'Prima::Window',
> module => 'Prima::Classes',
> parent => 1,
> code => Prima::VB::VBLoader::GO_SUB(''),
> profile => {
> width => 156,
> left => 346,
> name => 'Form1',
> origin => [ 346, 418],
> height => 100,
> bottom => 418,
> size => [ 156, 100],
> sizeDontCare => 0,
> originDontCare => 0,
> }},
> );
>}
>
>
Thank you. Yes, I have looked at the manpage. I was also looking at
Prima/PS/Setup.pm \ setup.fm and Prima/Image/tiff.pm \ tiff.fm.

I'm wondering if there is a "standard" for whether the code for events
should be part of the .fm or in the .pm\.pl? Or what what are the
advantages\disadvantages of one way over the other?
Received on Mon 30 Aug 2004 - 19:34:21 CEST

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