Tcl::pTk overwrite About [macOS]

2018-08-13 Thread welle Ozean via tcltk
Hello,

I have a Tk application for macOS written with Tcl::pTk and packed as a
normal macOS bundle. In the macOS menu, under the name of the application
bundle there is a menu item called "About + Name of application". This is
created auotmatically and contains the Tcl version. In this About menu, I
would like to replace/integrate the default values with information about
my App. Is this possible? If yes, how? I couldn't find any information
online.

Best,
Welle


configuring Tcl.pm to use given tk.framework and tcl.framework

2018-08-17 Thread welle Ozean via tcltk
Hello,

my macOS application (written with Tcl::pTk) uses at the moment the macOS
default Tcl/Tk frameworks, i.e. the highest version it finds on the
machine. I would like to link Tcl::pTk to use a specific Tcl/Tk framework
so that I can include it in the macOS .app bundle and distribute the
framework with the application.

I admit I am not a Tcl expert, only recently switched to Tcl::pTk to be
able to use Tk on a macOS. Can somebody guide me (or point me to some info)
on how I can make Tcl.pm link to my:

tk.framework
tcl.framework

Both frameworks will be inserted in the .app bundle and have a static
position in relation to the executable.

PS: It is possible to use with Tcl.pm the Kit executables generated by
http://kitcreator.rkeene.org/kitcreator

Than you for any advice
Welle


[macOS] Tcl::pTk Drag

2018-09-21 Thread welle Ozean via tcltk
Using Tcl::pTk I am trying to implement Drag on macOS without success.
According to its documentation, Tcl::pTk should support it. This is what I
am trying now (slightly adapted from my version for Windows and Perl/Tk):

$MyWidget->DropSite(-dropcommand => [\_drop, $tap], -droptypes =>
(['Local', 'tkdnd']));

sub accept_drop {
my ($tab) = @_;
my $filePath;
 eval {
if ($^O eq 'MSWin32') {
$filePath = $tab->SelectionGet(-selection => $selection,
 'STRING');
}
else {
$filePath = $tab->SelectionGet(-selection => $selection,
 'FILE_NAME');
}
  }
#DO THINGS with $filePath
}

I have downloaded a binary of tkdnd (libtkdnd2.8.dylib). How do I let
Tcl::pTk know of this library? Or there is any way to implement it without
adding new libraries (I am using the Tcl shipped with macOS).

Thanks
Welle


Re: merging Tcl::Tk and Tcl::pTk

2018-11-21 Thread welle Ozean via tcltk
Hi,

everything that can help the future, robustness, etc. of using Tcl/Tk in
Perl is welcome. It would be nice to see the two merging, providing some
compatibility is preserved. I can give a hand if requested, as I actively
use Tcl::pTk on macOS.

Best
Welle

Am Sa., 10. Nov. 2018 um 13:07 Uhr schrieb Konovalov, Vadim <
vadim.konova...@dell.com>:

> Hi there,
>
>
>
> Al long as full compatibility between Tcl::pTk and perl/Tk haven’t
> happened, I propose to spend some efforts on joining Tcl::Tk and Tck::pTk
> so to have some reasonable compatibility and single module so to not spread
> efforts among these?
>
>
>
> Regards,
>
> Vadim
>


Buttons with icons but without boxes on macOS and Tcl::pTk

2019-02-27 Thread welle Ozean via tcltk
Hello,

using Tcl::pTk I want to move from the ttkButton to a plain clickable (png)
icon on gray background. I do not want the icon in a box, which is the
standard rendering of buttons, as far as I understand. This looks very odd
nowadays. At best, the icon should be accompanied by a test, as this
screenshot shows: https://ibb.co/dfYwKvM

On a mailing list I get the following Tcl/Tk answers:

1) If you add -style Toolbutton to the ttk::button, the button will look
flat and modern. Adding "-compound top" will allow to specify both image
and text.

2)  set i1 [image create photo -file icon.png]
 button .b -image $i1 -text Open -compound top -relief flat
 pack .b
Note that colors for the button widget and/or colors/transparency in
the png image will need to be adjusted so the icon and the button area
fit together seamlessly.

No matter how many combinations I tried, I could not achieve my result (I
always had boxes around the icons, so that I think that Tcl::pTk does not
support much tweaking of the buttons. Has I guess this is the simplest way
to display icons on modern interfaces, maybe somebody here has already
achieved this result.

Welle


Linking to Extensions

2019-06-01 Thread welle ozean via tcltk
Hello,

my application is deployed as macOS .app This has some stringent criteria
on data structure. I use Tcl/Tk as Frameworks.

To link Tcl.pm to my frameworks I set the following two variables:

$ENV{'PERL_TCL_DL_PATH'}
$ENV{'TCLLIBPATH} -> directory containing the frameworks (needed to find Tk)

This works fine. If I install my extensions in the directory containing the
frameworks, the extensions are also correctly loaded. However, this is not
allowed by the .app folder structure. So I need to move the extensions to
another location of the .app folder.

Does Tcl.pm has the possibility to set a second $ENV to look - in my case -
for extensions? (It gowns without saying that I can not move my Frameworks
from the directory they are...)

In TCL it seems it is possible to set a list (see:
https://wiki.tcl-lang.org/page/TCLLIBPATH).

Welle