Author Topic: Namespace question?  (Read 3129 times)

0 Members and 1 Guest are viewing this topic.

iradic

  • Guest
Namespace question?
« on: June 22, 2006, 08:44:16 AM »
Hi, my first post here...

When I compile AutoLisp (no VisualLisp) code into VLX does it have it's own namespace for functions and variables?

I started writing Lisp and realized that I have some equally named functions and variables in different LSP files so I thought about just compiling them .)

Didge

  • Bull Frog
  • Posts: 211
Re: Namespace question?
« Reply #1 on: June 22, 2006, 09:03:06 AM »
When compiling within the vlisual lisp editor select the "expert" mode and it'll give you the choice of namespaces, this option will also allow you to include text and dcl files within the "vlx".

Edit:  Oops nearly forgot, welcome to the swamp Iradic :-)
Think Slow......

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Namespace question?
« Reply #2 on: June 22, 2006, 10:22:39 AM »
Welcome to theswamp. :-)

If you make your variables "Private" there won't be a problem with uncompiled lisp.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

iradic

  • Guest
Re: Namespace question?
« Reply #3 on: June 24, 2006, 08:06:52 AM »
The main problem is error handler routine - i used the same name for all of my lisp functions...

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Namespace question?
« Reply #4 on: June 24, 2006, 09:39:14 AM »
Look at this:
http://www.theswamp.org/index.php?topic=8604.0

Also get acquainted with the SEARCH
http://www.theswamp.org/index.php?action=search;advanced

Enter "error handler"  with the quotes! then un-check this  [ ]Check all
then check [ ] AutoLISP (Vanilla / Visual) and check [ ] Show your stuff  

Hit the search button & you will have lots of routines to look at.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Namespace question?
« Reply #5 on: June 24, 2006, 10:55:23 AM »
Hi, my first post here...

When I compile AutoLisp (no VisualLisp) code into VLX does it have it's own namespace for functions and variables?

I started writing Lisp and realized that I have some equally named functions and variables in different LSP files so I thought about just compiling them .)


Welcome;

Make a protected namespace VLX

While in the Make Application do the following:

1. New Application wizard
2. Expert
3. Location and vlx name
4. Click Separate Namespace
5. Select the lisps,fas or PRJ's
6. Select DCL's (if applies)
7. Leave that Standard
8. Build the application

Load the VLX file, and just verify if any of the functions are protected with:

Command: !MyFunctionName

To export or import values to your protected namespace use the VL-DOC-REF - VL-DOC-SET
And for the functions use: VL-DOC-EXPORT - VL-DOC-IMPORT

HTH

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Namespace question?
« Reply #6 on: June 24, 2006, 11:45:40 AM »
Welcome, iradic.

You have two of the best helping you. CAB & LE.

Enjoy theSwamp.
I drink beer and I know things....

iradic

  • Guest
Re: Namespace question?
« Reply #7 on: June 24, 2006, 01:16:07 PM »
Thanks... though I already read about "error handler" that if I read another one I will go crazy :)

Like this one (not quite error handler related):
http://discussion.autodesk.com/thread.jspa?messageID=1112382