Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating my first package

35 views
Skip to first unread message

Cecil Westerhof

unread,
Jan 5, 2018, 10:59:06 AM1/5/18
to
I am trying to create my first package. For this I follow:
https://www.tcl.tk/man/tcl8.5/tutorial/Tcl31.html

It states there that you need to make a pkgIndex.tcl file. I found:
https://wiki.tcl.tk/3388?redir=1493

But this says:
pkg_mkIndex, considered deprecated

So how should I create pkgIndex.tcl?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Gerald Lester

unread,
Jan 5, 2018, 11:10:01 AM1/5/18
to
On 01/05/2018 09:54 AM, Cecil Westerhof wrote:
> I am trying to create my first package. For this I follow:
> https://www.tcl.tk/man/tcl8.5/tutorial/Tcl31.html
>
> It states there that you need to make a pkgIndex.tcl file. I found:
> https://wiki.tcl.tk/3388?redir=1493
>
> But this says:
> pkg_mkIndex, considered deprecated
>
> So how should I create pkgIndex.tcl?
>

Use pkg_mkIndex -- if it works, great. If not, use a text editor (maybe
copy one of the ones already on your system and edit it).

--
+----------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+----------------------------------------------------------------------+

Cecil Westerhof

unread,
Jan 5, 2018, 12:59:06 PM1/5/18
to
Gerald Lester <Gerald...@KnG-Consulting.net> writes:

> On 01/05/2018 09:54 AM, Cecil Westerhof wrote:
>> I am trying to create my first package. For this I follow:
>> https://www.tcl.tk/man/tcl8.5/tutorial/Tcl31.html
>>
>> It states there that you need to make a pkgIndex.tcl file. I found:
>> https://wiki.tcl.tk/3388?redir=1493
>>
>> But this says:
>> pkg_mkIndex, considered deprecated
>>
>> So how should I create pkgIndex.tcl?
>>
>
> Use pkg_mkIndex -- if it works, great. If not, use a text editor (maybe
> copy one of the ones already on your system and edit it).

It works. Now I should make a real package from it. ;-)

Are there any naming conventions? I know have dcblUtilities in:
dcblUtilities/dcblUtilities.tcl

Now I have to put all the proc's in the namespace and change all the
programs using it.

Cecil Westerhof

unread,
Jan 5, 2018, 2:14:06 PM1/5/18
to
Cecil Westerhof <Ce...@decebal.nl> writes:

> Gerald Lester <Gerald...@KnG-Consulting.net> writes:
>
>> On 01/05/2018 09:54 AM, Cecil Westerhof wrote:
>>> I am trying to create my first package. For this I follow:
>>> https://www.tcl.tk/man/tcl8.5/tutorial/Tcl31.html
>>>
>>> It states there that you need to make a pkgIndex.tcl file. I found:
>>> https://wiki.tcl.tk/3388?redir=1493
>>>
>>> But this says:
>>> pkg_mkIndex, considered deprecated
>>>
>>> So how should I create pkgIndex.tcl?
>>>
>>
>> Use pkg_mkIndex -- if it works, great. If not, use a text editor (maybe
>> copy one of the ones already on your system and edit it).
>
> It works. Now I should make a real package from it. ;-)
>
> Are there any naming conventions? I know have dcblUtilities in:
> dcblUtilities/dcblUtilities.tcl
>
> Now I have to put all the proc's in the namespace and change all the
> programs using it.

Done: it was a lot simpler as I expected.

Ricardo kozmate.net

unread,
Jan 6, 2018, 6:17:39 AM1/6/18
to
Em 05/01/18 17:51, Cecil Westerhof escreveu:
> Gerald Lester <Gerald...@KnG-Consulting.net> writes:
>
>> On 01/05/2018 09:54 AM, Cecil Westerhof wrote:
[...]

>
> It works. Now I should make a real package from it. ;-)
>
> Are there any naming conventions? I know have dcblUtilities in:
> dcblUtilities/dcblUtilities.tcl
>
> Now I have to put all the proc's in the namespace and change all the
> programs using it.
>

If you still haven't met the "Tcl Style Guide" page (and pdf) take a
look at <http://wiki.tcl.tk/708>, you may like it - I do.

--
{ricardo from kozmate.net}

Cecil Westerhof

unread,
Jan 6, 2018, 9:44:06 AM1/6/18
to
If I not had enough to learn already. :-D

Thanks, I will take that into account. I will try to take this into
account before I publish it on GitHub.
0 new messages