f



Proposed Modules: Tk::MDTextBook (renamed: Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk)

A set of modules that allow easy mixing of code types to be interpretted as 
a Tk application...
The input is in MIME-multipart/mixed format, and easy entity can be markdown 
(displayed formatted
in a Text with options to add Tk windows and behaviours), perl (eval()ed), 
yaml (structure made available
to app) or menu in yaml (posted on main mindow).

The purpose of this is to contribute to a compiled program (for 
Windows/Mac/Linux) that can run appended scripts in this format.  The reason 
for having this format is that resources can be included in the one file. 
The Markdown stuff
is to allow easy inclusion of controls in the context of a document.


Tk::MDText - a Tk::Text that displays Markdown with Tk "tags" to include 
widgets inline.

Tk::MDTextBook - a Tk::NoteBook that reads multipart document and contructs 
an app (using MDTexts)

Tk::MDTextBook::Data2Tk - quick sub to make a window and give <DATA> to 
Tk::MDTextBook

Does that make sense to anybody??  Here's an example:

E.g.:



use strict;
use Tk::MDTextBook::Data2Tk; # exports one sub:
data2tk;
__DATA__
MIME Version: 1.0
Content-Type: multipart/mixed; boundary=##--##--##--##--##
Title: Window Title

Here is a prologue
--##--##--##--##--##
Content-Type: application/x-ptk.markdown
Title: _Basic MarkDown
ID: Page1

# MarkDown Tk Text Thingy.

## Here is a sub-header

And a paragraph here
because I wanted to
check that it handles stuff
right over several lines.

--##--##--##--##--##
Content-Type: application/x-ptk.markdown
Title: _Tk and Scripting
ID: Page2

##### Tk windows and scripts

Here is my markdown.  Here is some stuff in a preformatted block:

    field label    <Tk::Entry>   <-- put stuff here!
    another label  <Tk::Entry>   ... and more
    and so on      <Tk::Button -text="Here is some text!">

--##--##--##--##--##
Content-Type: application/x-yaml.menu

---
- _File:
  - _Exit: exit
- '---' : '---'
- _Help:
  - _About: MyPackage::ShowPreamble
  - _Help : MyPackage::ShowEpilog

--##--##--##--##--##
Content-Type: application/x-perl

package MyPackage;

## the most useful of the following will get included in the module 
itself...

sub myScriptSub {
  print "Hello from script sub!\n";
}

sub getObjectList {
  my @shelf = @Tk::MDTextBook::Shelf;
  my $object = $shelf[$#shelf]; # get the last one!
  return $object->{Objects};
}

sub getMW {
  return $Tk::MDTextBook::Data2Tk::MW;
}

sub getPreamble {
  return getObjectList()->{Main}->{Preamble};
}

sub getEpilog {
  return getObjectList()->{Main}->{Epilog};
}

sub ShowPreamble {
  getMW()->messageBox(-message=>getPreamble());
}

sub ShowEpilog {
  getMW()->messageBox(-message=>getEpilog());
}

--##--##--##--##--##--
Here is the epilogue




---






[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <20131220121453.11844.qmail@lists-nntp.develooper.com>,
"Jimi Wills" <???> wrote:

> Tk::MDText - a Tk::Text that displays Markdown with Tk "tags" to include 
> widgets inline.


> Does that make sense to anybody??  Here's an example:

The idea sounds interesting and makes sense, but I wonder if there's a
better name for it. 

I didn't immediately think of Markdown with MD in this context, but
maybe that doesn't have to be part of the name. The main feature is
including parts in a MIME format, right?

If you still settle on the name you have now, that's fine.

Good luck, :)

-- 
brian d foy (one of many PAUSE admins), http://pause.perl.org
PAUSE instructions:  http://pause.perl.org/pause/query?ACTION=pause_04about
Archives: http://www.xray.mpe.mpg.de/mailing-lists/modules
Please send all messages back to modules@perl.org with no CC to me.




---


> The idea sounds interesting and makes sense, but I wonder if there's a
> better name for it.

Thanks, Brian.
I agree about the names...

> I didn't immediately think of Markdown with MD in this context, but
> maybe that doesn't have to be part of the name. The main feature is
> including parts in a MIME format, right?

how about...

- instead of Tk::MDText...
Tk::Markdown - to display markdown (subset: I'm not going to try to support 
inline html!)
Tk::MarkdownTk - a Tk::Markdown that also has the Tk tags functionality... 
eg <Tk::Button -text="whatever">

- and instead of MDTextBook...
Tk::MIMEApp - uses MIME multipart to construct an app.

Jimi


---
0
jimiwills
12/22/2013 10:26:47 AM
comp.lang.perl.misc 33233 articles. 2 followers. brian (1246) is leader. Post Follow

0 Replies
847 Views

Similar Articles

[PageSpeed] 49

Reply:

Similar Artilces:

Re: Proposed Modules: Tk::MDTextBook [renamed Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk
A set of modules that allow easy mixing of code types to be interpretted as a Tk application... The input is in MIME-multipart/mixed format, and easy entity can be markdown (displayed formatted in a Text with options to add Tk windows and behaviours), perl (eval()ed), yaml (structure made available to app) or menu in yaml (posted on main mindow). The purpose of this is to contribute to a compiled program (for Windows/Mac/Linux) that can run appended scripts in this format. The reason for having this format is that resources can be included in the one file. The Markdown stuff is to allow easy inclusion of controls in the context of a document. Tk::MDText - a Tk::Text that displays Markdown with Tk "tags" to include widgets inline. Tk::MDTextBook - a Tk::NoteBook that reads multipart document and contructs an app (using MDTexts) Tk::MDTextBook::Data2Tk - quick sub to make a window and give <DATA> to Tk::MDTextBook Does that make sense to anybody?? Here's an example: E.g.: use strict; use Tk::MDTextBook::Data2Tk; # exports one sub: data2tk; __DATA__ MIME Version: 1.0 Content-Type: multipart/mixed; boundary=##--##--##--##--## Title: Window Title Here is a prologue --##--##--##--##--## Content-Type: application/x-ptk.markdown Title: _Basic MarkDown ID: Page1 # MarkDown Tk Text Thingy. ## Here is a sub-header And a paragraph here because I wanted to check that i...

Re: Proposed CPAN Module: Tk::Canvas::Music (renamed to Tk::Music)
Hi... It's been a while, but I'm getting back to thinking about this Tk::Music module... How do people want this to work... so far we have the following requirements: 1. Some way of storing a bunch of notes 2. Some way of displaying them a) An object that uses a Tk::Canvas to display either: i) The whole sheet????? or: ii) One page at a time?????? b) A Page object that contains everything to be displayed on one page in the way of systems??? c) A System object that contains measures d) A Measure object that contains notes e) An Element object that...

Tk::send & Tk::Receive
Hi all, One of my apps sends tcl/tk script bits to our mail client (ExMH) so it can make ExMH pop up message composition windows. I need to write a small helper stub that does the same, but that doesn't itself have a GUI. It also needs to be as small as possible (memory footprint wise). Does anyone know a way to send data to active Tcl programs like Tk::send but without perl/Tk? TIA, MB On Fri, 21 Jul 2006 15:34:45 +1000, Matthew Braid <not@invalid.invalid> wrote: >Hi all, > >One of my apps sends tcl/tk script bits to our mail client (ExMH) so it...

Linux Perl-TK -> Win32 Perl-Tk
I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would like to run on my Win32 laptop. I am not interested in dual-booting this laptop but would like to get the app up an running. I'm a perl-Tk hack at best. What is the best/easiest way to port the application? thanks, Mike On Tue, 21 Dec 2004 03:01:21 +0000, Michael Seningen wrote: > I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would > like to run on my Win32 laptop. > > I am not interested in dual-booting this laptop but would like to get > the ap...

Perl/Tk and Tk 8.5
Is there any word on when the enhancements in Tk 8.5 (Tiles, themes, better-looking widgets) will be made available in the Perl/Tk port? I know that ActiveState has made some of this available for awhile in the "Tkx" module, but I'm interested in cross-platform support and am wondering when 8.5 will be incorporated in the base "Tk" port module. [Cross-posted to comp.lang.perl.tk with follow-ups set to go there.] Steve wrote: > Is there any word on when the enhancements in Tk 8.5 (Tiles, themes, > better-looking widgets) will be made available in the P...

Bug in perl tk (Tk::Tree) ?
Hello, This simple script below... ------------------------------------------------------------ #!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::widgets qw/Tree ItemStyle/; my $mw = MainWindow->new(); $mw->fontCreate("MyFont", -family=> 'helvetica', -size => 9, -weight=>'medium'); my $t = $mw->Tree()->pack(); $t->ItemStyle('imagetext', -stylename => 'foobar', -activeforeground => '#ff0080', -font => 'MyFont', ); $t->add('root', -style => &...

perl tk equivilent to Tcl/Tk fitToContents
Is there a perlTk equivilent to the TclTk fitToContents command you can run on a window. By default it seems that it automatically dits to contents for me, until a user does a manual resize, then it stops... Randell Pelak wrote: > Is there a perlTk equivilent to the TclTk fitToContents command you > can run on a window. By default it seems that it automatically dits > to contents for me, until a user does a manual resize, then it stops... So once the user sets the window the way they want, you're going to change it? Not very user friendly. You could just make the ...

Porting tk extensions to perl/tk how-to guide
We have a few tk extensions involving direct xlib calls. Is there any cookbook approach to converting these extensions to perl/tk extensions, or any general description of the process? ...

Tcl/Tk to Perl/TK Translation Problem
Hello, I am having problems translating the following tcl/tk code to perl/tk: ============ tcl code ============ label .controls.sizel -text "Size:" grid .controls.quall .controls.quallo .controls.qual .controls.qualhi -sticky ew grid .controls.sizel .controls.sizesm .controls.size .controls.sizelg -sticky ew grid .controls.colorl .controls.color -sticky ew grid configure .controls.color -columnspan 3 grid configure .controls.quall .controls.sizel .controls.colorl -sticky e grid configure .controls.quallo .controls.sizesm -sticky e grid configure .controls.qualh...

Perl/Tk Novice....Tk Error ...Help!
Hi, Does anynody know and understand the following Tk error - Possible precedence problem on bitwise ^ operator at .../blib/lib/Tk/Scale.pm (autosplit into .../blib/lib/auto/Tk/Scale/Increment.al) line 242. I'm trying to get a scale value when I click on the slider. Are there any simple examples of all the pre-ambles required to set up a slider on a canvas and capture the input from the user ? Any pointers would behighly appreciated. Thanks much in advance, Nash nrg@ornl.gov ...

perl -e "use Tk" failed after installing perl tk
Now I want to debug perl script through ptkdb under Windows XP. I installed perl tk 804.028 using the below command first because ptkdb depends on perl tk. ppm install Tk But some errors pop out when the command(perl -e "use Tk") exec after installing perl tk, " Can't locate Tk.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/ lib .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. " ActivePerl: Build 1004 Perl: 5.10.0 On 19 mai, 15:30, Erik <zhengfen...@gmail.com> wrote: > Now I want to debug perl script thro...

sweetening tk with tk::sugar
hi, i'm sending this here in case you missed the announcement on http://jquelin.blogspot.com/2009/11/sweetening-tk.html if you're tired of tk's verbosity that makes you write things such as: $widget->pack( -side => 'top', -expand => 1, -fill => 'both', -padx => 10, -pady => 10, ); you may appreciate tk::sugar that allows you to write instead: use Tk::Sugar; $widget->pack( top, xfill2, pad10 ); it's only syntaxic sugar, there's nothing magical underneath. but i think this i...

TK-SCHEMA, TK-FORM, TK-POP, etc from Patterson & Gray 312967
Does anyone have these free softwares in their library to send me? (only to study them and my mumps collection) After completing the form for download at the offcial site the link is broken and they are not included in M3Lite or MV1 :( Thanks in advanced. ...

TK-SCHEMA, TK-FORM, TK-POP, etc from Patterson & Gray 187214
Does anyone have these free softwares in their library to send me? (only to study them and my mumps collection) After completing the form for download at the offcial site the link is broken and they are not included in M3Lite or MV1 :( Thanks in advanced. On Feb 19, 4:29=A0pm, mumpscode <mumpsc...@hotmail.com> wrote: > Does anyone have these free softwares in their library to send me? > (only to study them and my mumps collection) > > After completing the form for download at the offcial site the link > is broken and they are not included in M3Lite or MV1 :(...

Does Ruby/Tk have all features as perl/Tk or java swing?
Hi I am perl and java programmer. I want to make a quite complex application using a lot GUI components like Spreadsheet, Menu, Tab etc..in Ruby. I have tried Ruby for some simple non-GUI applications and really like the language. It will be time consumming if I start to write software in Ruby and later find out that it lacks this and that. So someone have worked much with Ruby/Tk can answer my questions. 1. Does Ruby/Tk have all features as perl/Tk or java swing? 2. Does Ruby have features like Java Applet running in a web browser? 3. JRuby is an interpreter that I can run both java and ...

[tk] Equivalent to Perl's Tk::Tiler?
Hi All: I making arbitrarily large forms and in doing similar in Perl, I've used Tk::Tiler, a scrollable frame. I'd just pack my various entries into the form, and set a max size, from which the form would automatically scroll if the contents were larger than the form size. I've found a scrollable canvas sample I could use, but worry about the of resources it might take up. Any pointers? Thanks. Forrest From: Forrest Chang <fkc_email-news@yahoo.com> Subject: [tk] Equivalent to Perl's Tk::Tiler? Date: Tue, 6 Dec 2005 02:17:33 +0900 Message-ID: <81lkyz79...

compiling perl/tk widget (outside tk) on win32 ?
hi, i've got a problem, i have my external perl/tk widget, partially written in C it works well on linux when compiling, i'm using Tk::MMutil::TkExtMakefile to build make file; it somehow recognizes that i'm compiling the widget outside of Tk itself, at the end it produces Plotviewer.sl dynamic library when compiling on win32 (win xp, vc60), i get the same message when building makefile (that it recognized that i'm building the widget outside of Tk itself) but then it fails first problem is that it tries to create pTk.dll; not Plotviewer.dll; why ? second prob...

Re: Tcl/Tk to Perl/TK Translation Problem
Philippe de Rochambeau <philippe@wwphi.net> wrote: > Hello, > > I am having problems translating the following tcl/tk code to perl/tk: > > ============ tcl code ============ > label .controls.sizel -text "Size:" > > grid .controls.quall .controls.quallo .controls.qual .controls.qualhi > -sticky ew > grid .controls.sizel .controls.sizesm .controls.size .controls.sizelg > -sticky ew > grid .controls.colorl .controls.color -sticky ew > grid configure .controls.color -columnspan 3 > grid configure .controls.quall .control...

Tk
When I run the following code, script kept running and I have to force it to stop. Could you check the code to give suggestions how to improve it? Thanks a lot! from Tkinter import * from Tkinter import _cnfmerge class Dialog(Widget): def __init__(self, master=3DNone, cnf=3D{}, **kw): cnf =3D _cnfmerge((cnf, kw)) self.widgetName =3D '__dialog__' Widget._setup(self, master, cnf) self.num =3D self.tk.getint( apply(self.tk.call, ('tk_dialog', self._w, cnf['title'], cnf['text'...

Using Tcl::Tk Module with Tcl/Tk 8.5
Not sure if this is the right place for this question, as it is with relation to the Tcl::Tk module, rather than Perl/Tk specifically. I'd like to use Tcl::Tk with Tcl/Tk 8.5 rather than 8.4. To that end, on a clean Debian Testing system I have installed only Tcl/Tk 8.5 and also finally managed to install the Tcl::Tk module. I was having problems installing the Tcl-0.95 module, which Tcl::Tk depends on, but fixed it with a specific include path call: >sudo perl Makefile.PL --tclsh /usr/bin/tclsh8.5 --tclconfig /usr/lib/tcl8.5/tclConfig.sh --include /usr/include/tcl8.5 Fo...

Perl::Tk vs Tcl::Tk vs Tkx vs ...?
Hi all, thanks to Jeff's response i got insight into other possibilities than Perl::Tk. differences between Perl::Tk and both other modules are obvious. i've read some materials about Tcl::Tk and Tkx and for me it seems they are very similar. could you please point some differences? benefits? etc.? for me it seems both are trying to use Tcl as a middle tier to avoid producing tones of code - simpler maintainance, thin layer, more up to date. unfortunately as i understood it is impossible to reuse Tk::* modules written especially for Perl::Tk but on the other hand it is possibl...

Re: What's new in Tk 8.4 for Perl/Tk
Revised: http://www.lehigh.edu/~sol0/ptk/whats-new.html -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to majordomo@lists.stanford.edu ...

w2ksp4 cygwin Perl/Tk 'cpan -i Tk' fails
Hello, world! I have a W2K SP4 box with a fresh install of Cygwin, and would like to use Perl/Tk. When I attempt to install the Tk module using cpan: dpchrist@w2k30g:~$ cpan -i Tk CPAN: Storable loaded ok Going to read /home/dpchrist/.cpan/Metadata Database was generated on Sat, 13 Sep 2003 12:45:46 GMT Running install for module Tk ... Failed Test Stat Wstat Total Fail Failed List of Failed -------------------------------------------------------------------- ----------- t/cursor.t 255 65280 1 1 100.00% 1 t/entry.t ...

Ruby/TK equivalent to Perl/TK "Scrolled" method
Perl/Tk contains a "Scrolled" method which is a shortcut method for creating a widget with a scrollbar (Learning Perl/TK, by Walsh, pg. 126) without creating a widget and a scrollbar separately. Does Ruby/TK have a similar method, or do I have to create the widget and scrollbar separately? Thanks! -- Posted via http://www.ruby-forum.com/. Alex DeCaria schrieb: > Perl/Tk contains a "Scrolled" method which is a shortcut method for > creating a widget with a scrollbar (Learning Perl/TK, by Walsh, pg. 126) > without creating a widget and a scrollbar separately. ...

Web resources about - Proposed Modules: Tk::MDTextBook (renamed: Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk) - comp.lang.perl.misc

Resources last updated: 3/6/2016 11:13:39 PM