Ticket #1406 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Padre::Plugin::Moose 0.08 cretique as requested

Reported by: bowtie Owned by: azawawi
Priority: trivial Milestone:
Component: plugins Version: 0.95
Keywords: Cc:

Description

                   Padre 0.95
Core...
                  osname linux
                archname i686-linux-thread-multi
            Distribution Ubuntu 11.04 
                  Kernel 2.6.38-13-generic
                    Perl 5.14.2
                 Threads 3
                     RAM (unsupported)
Wx...
                      Wx 0.9903
               WxWidgets 2.8.11
                 unicode 1
        Alien::wxWidgets 0.54
 Wx::Perl::ProcessStream 0.30
           Wx::Scintilla 0.37_04
Other...
                     PPI 1.215
           Debug::Client 0.17_06
                  Config /usr/src/Padre/Padre/.padre

Ok, tome style to start with.

1, open Padre, F8 click on Method

Error: Can't locate object method "methods" via package "Padre::Plugin::Moose::Program" at /usr/src/Padre/Padre-Plugin-Moose/lib/Padre/Plugin/Moose/Main.pm line 334.
**
GLib:ERROR:/build/buildd/glib2.0-2.28.6/./glib/gmain.c:2443:g_main_dispatch: assertion failed: (current->dispatching_sources == &current_source_link)

2, open Padre, F8 click on SubType?

Error: Can't locate object method "subtypes" via package "Padre::Plugin::Moose::Program" at /usr/src/Padre/Padre-Plugin-Moose/lib/Padre/Plugin/Moose/Main.pm line 316.
**
GLib:ERROR:/build/buildd/glib2.0-2.28.6/./glib/gmain.c:2443:g_main_dispatch: assertion failed: (current->dispatching_sources == &current_source_link)

3, ... F8 Attribute

Error: Can't locate object method "attributes" via package "Padre::Plugin::Moose::Program" at /usr/src/Padre/Padre-Plugin-Moose/lib/Padre/Plugin/Moose/Main.pm line 298.
**
GLib:ERROR:/build/buildd/glib2.0-2.28.6/./glib/gmain.c:2443:g_main_dispatch: assertion failed: (current->dispatching_sources == &current_source_link)

4, ... F8 Role ok
5, ... F8 Class ok
6, ... F8 Generate ok, Humm
7, ... F8 Reset ok, but why the info box, I clicked the the button :)


Attachments

Moo1.png (50.0 KB) - added by bowtie 2 years ago.
Moo1

Change History

Changed 2 years ago by bowtie

Moo1

comment:1 Changed 2 years ago by bowtie

Part 2

https://metacpan.org/module/Moose::Manual

following above, we can generate, the following.

package Person;

use Moose; # automatically turns on strict and warnings
use namespace::clean; # Keep imports out of your namespace

has 'first_name' => (
    is  => 'rw',
    isa => 'Str',
);
has 'last_name' => (
    is  => 'rw',
    isa => 'Str',
);

__PACKAGE__->meta->make_immutable; # Makes it faster at the cost of startup time

1;

package User;

use Moose; # automatically turns on strict and warnings
use namespace::clean; # Keep imports out of your namespace

extends 'Person';

has 'password' => (
    is  => 'rw',
    isa => 'Str',
);
has 'last_login' => (
    is  => 'rw',
    isa => 'DateTime',
);

sub login {
    my $self = shift;
}

__PACKAGE__->meta->make_immutable; # Makes it faster at the cost of startup time

1;


package main;
my $o1 = Person->new;
my $o2 = User->new;

Moo1

Ouch! note attribute access and type have switched around in display, happens for items as well, I think you need more options for Attributes,

I think you should look at using wxStaticBoxSizer, to visually group items in dialogue,

  • Outline
  • TreeView
  • 5 action buttons

comment:2 Changed 2 years ago by azawawi

0.09 should solve the crash problems among others.

Will work on the rest. Thanks for the critique :)

comment:3 Changed 2 years ago by azawawi

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 0.11. Hope you like it :)

Note: See TracTickets for help on using tickets.