I guess, I have to finally register at yet another list. ;)
Yes I know. It was really an attempt to group them logically since they
belong to the same piddle.
Ok, in principle I was right but I need a temporary variable to
construct the reference.
What works is:
$n=$mw->"$name\_plot1";
$mw->$n->dataSets->{set1}->change_data(0,1);
What does not work is
$mw->{$mw->"$name\_plot1"} -> ...
$mw->($mw->"$name\_plot1") -> ...
$mw->eval($mw->"$name\_plot1") -> ... # NiceSlice thinks $mw
contains a piddle and complains!
or any way do directly construct the method call.
Ingo
On 07/29/2013 06:55 PM, David Mertens wrote:
> Argh, I meant to use "place" instead of "pack in the example code. Sorry!
>
>
> On Mon, Jul 29, 2013 at 12:54 PM, David Mertens
> <[email protected] <mailto:[email protected]>> wrote:
>
> On Mon, Jul 29, 2013 at 12:21 PM, Ingo Schmid <[email protected]
> <mailto:[email protected]>> wrote:
>
> David,
>
>
> sorry for having yet another question.
>
> To logically group two plots, I created a Groupbox $box and
> then in 4box $plot1 (name=name1) and $plot2 (name=>name2).
>
> Now I try to access from $plot2 datasets in $box->{name1}. But
> it does not exist!
>
> I know that Groupbox is probably the wrong tool, but what are
> better ones?
>
>
> Did you know that any widget can serve as a container for any
> other widget? If you're just trying to have two widgets
> side-by-side, you can say something like this:
>
> use strict;
> use warnings;
>
> use Prima qw(Application);
> use PDL::Graphics::Prima;
>
> my $main_window = Prima::MainWindow->create(
> size => [600, 300],
> );
>
> # Add the first plot
> my $plot1 = $main_window->insert(Plot =>
> pack => {
> # Pack it into the left half of the window
> anchor => 'sw', x => 0, y => 0, relheight => 1, relwidth
> => 0.5
> },
> ... other initialization ...
> );
>
> my $plot2 = $main_window->insert(Plot =>
> pack => {
> # Pack it into the right half of the window
> anchor => 'sw', relx => 0.5, y => 0, relheight => 1,
> relwidth => 0.5
> },
> ... other initialization ...
> );
>
> ... other code that uses $plot1 and $plot2 ...
>
> run Prima;
> __END__
>
> There are a few ways of doing this without storing the plot
> widgets in lexical variables, but I suppose that's getting a bit
> off-topic for the PDL mailing list. If you want to pose the
> question on the Prima mailing list, I can try to address it at
> greater length there.
>
>
> On 07/29/2013 05:45 PM, David Mertens wrote:
>> In short, no, alpha-transparency is not supported.
>
> That's unfortunate! Any chance this will change? Is it
> difficult to implement?
>
> Ingo
>
>
> I would love to see this happen, but I don't have the time to work
> on it at the moment. (We discussed it a little bit back in
> February, I think, but the Prima email archives
> <http://www.prima.eu.org/archives/> haven't been refreshed in a
> while so I can't find the link.)
>
> David
>
>
>
>
> --
> "Debugging is twice as hard as writing the code in the first place.
> Therefore, if you write the code as cleverly as possible, you are,
> by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl