Wylie
(Lurker)
2003-01-21 04:18 PM
Include FunctionLibrary.kix

Ive just discovered Kix, Its great, but one thing is missing, and Im sure its been thought of before... but... just in case...

With all the UDF's out there, it would be very convienient to build a function library which could be included from multiple kix scripts, alas I cant find an "Include" command in Kix 4.12 (havnt looked at the beta yet). In my mind, this is a "must have".

Having multiple kix scripts, each with their own copy of the same essential UDF's is a pain to maintain, it would be much nicer to have these in one file and just include that into whichever script needed it.

Ok, so having said im new, I'll also add that im no stranger to scripting and have picked up kix as if I'd been using it for years. In 2 days I have a form based logon script that does just about everythng almost finished... another day or so and it will be in production. I dont know whether this is because Im familiar with scripting, or if its because Kix is fantastic, and well supported (Im assuming its the latter)


Sealeopard
(KiX Master)
2003-01-21 04:20 PM
Re: Include FunctionLibrary.kix

It's called CALL.

See How to use UDFs in the FAQ Forum.


Les
(KiX Master)
2003-01-21 04:20 PM
Re: Include FunctionLibrary.kix

I think you overlooked the CALL command.

Darn, Jens slipped in front of me...

[ 21. January 2003, 16:26: Message edited by: LLigetfa ]


Howard Bullock
(KiX Supporter)
2003-01-21 04:20 PM
Re: Include FunctionLibrary.kix

The library you desire is one or more KiXtart script with nothing but UDFs in it. Use CALL "library.kix" to load it into your main script.

{darn} Les is now faster than me. I must be getting old.

[ 21. January 2003, 16:21: Message edited by: Howard Bullock ]


LonkeroAdministrator
(KiX Master Guru)
2003-01-21 04:24 PM
Re: Include FunctionLibrary.kix

and not just les...

darn quick you are all.


Sealeopard
(KiX Master)
2003-01-21 04:28 PM
Re: Include FunctionLibrary.kix

Lonkero: You're late! What's up with that? [Big Grin]

Les
(KiX Master)
2003-01-21 04:38 PM
Re: Include FunctionLibrary.kix

In light of the fact this already exists, this topic is now closed.

Closed it too quick. Here is the originator's response emailed to me:

quote:
You closed the topic before I had a chance to reply.. and in only 20 minutes -
you guys are quick.

Well, since I cant follow up there, I'll follow up here.

Thanks for the pointer.

With the exception of the link to the forum faq, none of the documentation I
could find mentioned this, not even the official stuff. The Call function looked
just like any other call function, most of which call a script which is supposed
to be a standalone script in its own right, and "execute" it in a seperate
memory space, so my new suggestion would be to mention this in the
documentation.

Thanks again.



[ 21. January 2003, 16:57: Message edited by: LLigetfa ]


LonkeroAdministrator
(KiX Master Guru)
2003-01-21 05:04 PM
Re: Include FunctionLibrary.kix

as this is open again...

this has been also suggested before even thought it has been there more than long:
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=4;t=000265
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=4;t=000016

as examples.

[ 21. January 2003, 17:06: Message edited by: Lonkero ]


Les
(KiX Master)
2003-01-21 05:08 PM
Re: Include FunctionLibrary.kix

As a clarification...
The CALL command does not instantiate KiX in another memory space but rather deals serialy with the 'included' script.


LonkeroAdministrator
(KiX Master Guru)
2003-01-21 05:08 PM
Re: Include FunctionLibrary.kix

ok, the new suggestion is not bad.

the manual could indeed state more about this.


Wylie
(Lurker)
2003-01-21 05:11 PM
Re: Include FunctionLibrary.kix

Thanks guys, and thanks for the speed at which you all replied. I feel kind of dumb now, but yes, reading the docs (and a past knowledge of non-kix scripting) led me to believe that CALL would run a script in a seperate memory space.