Program libraries

615 views
Skip to first unread message

Don Shepherd

unread,
Apr 6, 2010, 9:36:17 AM4/6/10
to tinspire
In CAS OS version 2, several libraries are included: conics,
numtheory, and linear algebra. Looking at these files, you don't see
any source code. My question is this: were these libraries created
with the standard NSpire BASIC system, and if they were why don't we
see the source code?

Is there a way for me, using NSpire's BASIC, to hide my source code so
that my students can access the program or function but cannot see the
source code? I have read the "libraries" section of the
documentation, but cannot find anything that addresses this.

Thanks.

Nelson Sousa

unread,
Apr 6, 2010, 9:38:19 AM4/6/10
to tins...@googlegroups.com

Libraries are simple tns documents with programs or functions defined in them. When placed under MyLib those programs/libraries can be accessed (if they were defined as LibPriv or LibPub) from other documents.

To see the source code open the library file itself and use the program editor.

All programs/functions are written in standard Nspire basic code, just like any other program.

You can't hide the source code of a file. You can close the program editor but anybody can reopen the program editor to see the code.


Cheers,
Nelson

--
To post to this group, send email to tins...@googlegroups.com
To unsubscribe send email to tinspire+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
The tns documents shared by group members are archived at
http://lafacroft.com/archive/nspire.php

To unsubscribe, reply using "remove me" as the subject.

Andy Kemp

unread,
Apr 6, 2010, 9:43:55 AM4/6/10
to tins...@googlegroups.com
The libraries are all available to read.  They are stored in the MyLib folder - on the software this is probably in a folder called TI-Nspire (or something like this) in your MyDocs folder.  If you open the appropriate TNS file from within the MyLib folder then you can then open/edit the individual functions...

If you make your library public, and put it in the MyLib folder then it will be accessible from others but you can't view the source without directly opening the library TNS file...

Does that make sense?

Ray Fox

unread,
Apr 6, 2010, 10:03:17 AM4/6/10
to tins...@googlegroups.com
Try deleting the page once you have written the code.
It should still function, but can not be seen.

Don Shepherd

unread,
Apr 6, 2010, 5:28:18 PM4/6/10
to tinspire
Ah, OK, thanks guys. When I have created programs in the past I just
saved them with the program editor window open, so I didn't know that
you could actually close the program editor window and the code would
still be there. That's good to know. But you can only open the
program editor in a calculator page, and most of those pages in these
libraries are not calc pages, I see. But now I do see the code.

Thanks again all.


On Apr 6, 10:03 am, Ray Fox <kenra...@gmail.com> wrote:
> Try deleting the page once you have written the code.
> It should still function, but can not be seen.
>
>
>
> On Tue, Apr 6, 2010 at 8:43 AM, Andy Kemp <a...@1kemp.co.uk> wrote:
> > The libraries are all available to read.  They are stored in the MyLib
> > folder - on the software this is probably in a folder called TI-Nspire (or
> > something like this) in your MyDocs folder.  If you open the appropriate TNS
> > file from within the MyLib folder then you can then open/edit the individual
> > functions...
>
> > If you make your library public, and put it in the MyLib folder then it
> > will be accessible from others but you can't view the source without
> > directly opening the library TNS file...
>
> > Does that make sense?
>

> > On Tue, Apr 6, 2010 at 2:36 PM, Don Shepherd <sheph...@iglou.com> wrote:
>
> >> In CAS OS version 2, several libraries are included:  conics,
> >> numtheory, and linear algebra.  Looking at these files, you don't see
> >> any source code.  My question is this:  were these libraries created
> >> with the standard NSpire BASIC system, and if they were why don't we
> >> see the source code?
>
> >> Is there a way for me, using NSpire's BASIC, to hide my source code so
> >> that my students can access the program or function but cannot see the
> >> source code?  I have read the "libraries" section of the
> >> documentation, but cannot find anything that addresses this.
>
> >> Thanks.
>
> >> --
> >> To post to this group, send email to tins...@googlegroups.com

> >> To unsubscribe send email to tinspire+u...@googlegroups.com<tinspire%2Bunsubscribe@googlegroups.c­om>


> >> For more options, visit this group at
> >>http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> >> The tns documents shared by group members are archived at
> >>http://lafacroft.com/archive/nspire.php
>
> >> To unsubscribe, reply using "remove me" as the subject.
>
> > --
> > To post to this group, send email to tins...@googlegroups.com

> > To unsubscribe send email to tinspire+u...@googlegroups.com<tinspire%2Bunsubscribe@googlegroups.c­om>


> > For more options, visit this group at
> >http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> > The tns documents shared by group members are archived at

> >http://lafacroft.com/archive/nspire.php- Hide quoted text -
>
> - Show quoted text -

Nelson Sousa

unread,
Apr 6, 2010, 6:30:44 PM4/6/10
to tins...@googlegroups.com

you can always insert new pages with a program editor window.

After a library is finished the only pages needed are the notes pages with the documentation, so most authors delete all unused pages. Also to avoid accidental editing of any programs that could break functionality.


Cheers,
Nelson

Eric Findlay

unread,
Apr 6, 2010, 8:30:48 PM4/6/10
to tins...@googlegroups.com
This seems like an apt place to put this:

FYI, the scratchpad is treated like a new document, so if you're
designing a library, and open the scratchpad to test it, there are a few
things you need to do first.

1) Store your code. Use Ctrl+B or Menu->2->1 to check the syntax of the
code and store it.

2) Save your document. Use Ctrl+S to save.

3) Refresh Libraries via Tools-> Refresh Libraries

4) in Scratchpad, make sure you use the FULL path of the library
function, ie: libName\libFunc(), etc.

Again, this is because the scratchpad is treated as a separate document,
so in order for the scratchpad to recognize the library
functions/programs, you must type the entire path. The first 3 steps
are to ensure that all your changes are up to date before testing.

Addendum: you can get around this by creating a new calc page in the
library document to test with, but that may be just as much work, and
you may not like to clutter your document with extra pages.

--
For I am convinced that neither death nor life, neither angels nor
demons, neither the present nor the future, nor any powers, neither
height nor depth, nor anything else in all creation, will be able to
separate us from the love of God that is in Christ Jesus our Lord.
- Romans 8:38-39 (NIV)
--
Eric Findlay
AKA Eagle-Man

On 06/04/2010 3:30 PM, Nelson Sousa wrote:
>
> you can always insert new pages with a program editor window.
>
> After a library is finished the only pages needed are the notes pages
> with the documentation, so most authors delete all unused pages. Also to
> avoid accidental editing of any programs that could break functionality.
>
>
> Cheers,
> Nelson
>
> On Tue, Apr 6, 2010 at 22:28, Don Shepherd <shep...@iglou.com
> <mailto:shep...@iglou.com>> wrote:
>
> Ah, OK, thanks guys. When I have created programs in the past I just
> saved them with the program editor window open, so I didn't know that
> you could actually close the program editor window and the code would
> still be there. That's good to know. But you can only open the
> program editor in a calculator page, and most of those pages in these
> libraries are not calc pages, I see. But now I do see the code.
>
> Thanks again all.
>
>
> On Apr 6, 10:03 am, Ray Fox <kenra...@gmail.com

> <mailto:tins...@googlegroups.com>


> > >> To unsubscribe send email to
> tinspire+u...@googlegroups.com

> <mailto:tinspire%2Bunsu...@googlegroups.com><tinspire%2Bunsubscribe@googlegroups.c�om>


> > >> For more options, visit this group at
> > >>http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> > >> The tns documents shared by group members are archived at
> > >>http://lafacroft.com/archive/nspire.php
> >
> > >> To unsubscribe, reply using "remove me" as the subject.
> >
> > > --
> > > To post to this group, send email to tins...@googlegroups.com

> <mailto:tins...@googlegroups.com>


> > > To unsubscribe send email to
> tinspire+u...@googlegroups.com

> <mailto:tinspire%2Bunsu...@googlegroups.com><tinspire%2Bunsubscribe@googlegroups.c�om>


> > > For more options, visit this group at
> > >http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> > > The tns documents shared by group members are archived at
> > >http://lafacroft.com/archive/nspire.php- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> To post to this group, send email to tins...@googlegroups.com

> <mailto:tins...@googlegroups.com>


> To unsubscribe send email to tinspire+u...@googlegroups.com

> <mailto:tinspire%2Bunsu...@googlegroups.com>


> For more options, visit this group at
> http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> The tns documents shared by group members are archived at
> http://lafacroft.com/archive/nspire.php
>
>

> --
> To post to this group, send email to tins...@googlegroups.com
> To unsubscribe send email to tinspire+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> The tns documents shared by group members are archived at
> http://lafacroft.com/archive/nspire.php
>
>
>
>

> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.800 / Virus Database: 271.1.1/2793 - Release Date: 04/05/10 11:32:00
>

Don Shepherd

unread,
Apr 7, 2010, 5:21:09 AM4/7/10
to tinspire
Thanks Eric. That seems like a reasonable approach to testing a
library.

If you decide to type the name of the library function in the
scratchpad, as opposed to using the catalog, I notice the
documentation pages of conics, linalgcas, and numtheory say use CAPS
(where CAPS=CTRL+Shift) divide to get the \ character. That sequence
gives you /. It seems that just SHIFT divide gives you the desired
\. Perhaps this is due to a change between the clickpad and touchpad
versions, I don't know.

It seems like just using the catalog would be easier.

Don

> >     <mailto:tinspire%2Bunsu...@googlegroups.com><tinspire%2Bunsubscr...@googlegroups.c om>


> >      > >> For more options, visit this group at
> >      > >>http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> >      > >> The tns documents shared by group members are archived at
> >      > >>http://lafacroft.com/archive/nspire.php
>
> >      > >> To unsubscribe, reply using "remove me" as the subject.
>
> >      > > --
> >      > > To post to this group, send email to tins...@googlegroups.com
> >     <mailto:tins...@googlegroups.com>
> >      > > To unsubscribe send email to
> >     tinspire+u...@googlegroups.com

> >     <mailto:tinspire%2Bunsu...@googlegroups.com><tinspire%2Bunsubscr...@googlegroups.c om>


> >      > > For more options, visit this group at
> >      > >http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> >      > > The tns documents shared by group members are archived at

> >      > >http://lafacroft.com/archive/nspire.php-Hide quoted text -


>
> >      > - Show quoted text -
>
> >     --
> >     To post to this group, send email to tins...@googlegroups.com
> >     <mailto:tins...@googlegroups.com>
> >     To unsubscribe send email to tinspire+u...@googlegroups.com
> >     <mailto:tinspire%2Bunsu...@googlegroups.com>
> >     For more options, visit this group at
> >    http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> >     The tns documents shared by group members are archived at
> >    http://lafacroft.com/archive/nspire.php
>
> > --
> > To post to this group, send email to tins...@googlegroups.com
> > To unsubscribe send email to tinspire+u...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> > The tns documents shared by group members are archived at
> >http://lafacroft.com/archive/nspire.php
>
> > No virus found in this incoming message.
> > Checked by AVG -www.avg.com

> > Version: 9.0.800 / Virus Database: 271.1.1/2793 - Release Date: 04/05/10 11:32:00- Hide quoted text -

Nelson Sousa

unread,
Apr 7, 2010, 5:34:43 AM4/7/10
to tins...@googlegroups.com

On the touchpad the \ character is located under ther ?! menu (key at the right of G on the lower part of the keyboard). You can also access it from the symbol palette, but it's buried way down.

Or, and I think this is the easier way to access library functions, define the functions/programs as LibPub and access them from the Catalog.

Cheers,
Nelson

Eric Findlay

unread,
Apr 8, 2010, 2:55:40 AM4/8/10
to tins...@googlegroups.com
I think that may have been an error. I have always used Shift+divide
for \. I'm not sure about the touchpad as I just ordered mine tonight.

--
For I am convinced that neither death nor life, neither angels nor
demons, neither the present nor the future, nor any powers, neither
height nor depth, nor anything else in all creation, will be able to
separate us from the love of God that is in Christ Jesus our Lord.
- Romans 8:38-39 (NIV)
--
Eric Findlay
AKA Eagle-Man

> Version: 9.0.801 / Virus Database: 271.1.1/2797 - Release Date: 04/07/10 11:32:00
>

Don Shepherd

unread,
Apr 8, 2010, 4:47:14 AM4/8/10
to tinspire
Actually, there are at least three ways to get it: shift+divide, ?!
menu, and symbol palette.

> >>>       >  >http://lafacroft.com/archive/nspire.php-Hidequoted text -


>
> >>>       >  - Show quoted text -
>
> >>>      --
> >>>      To post to this group, send email to tins...@googlegroups.com
> >>>      <mailto:tins...@googlegroups.com>
> >>>      To unsubscribe send email to tinspire+u...@googlegroups.com
> >>>      <mailto:tinspire%2Bunsu...@googlegroups.com>
> >>>      For more options, visit this group at
> >>>    http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> >>>      The tns documents shared by group members are archived at
> >>>    http://lafacroft.com/archive/nspire.php
>
> >>> --
> >>> To post to this group, send email to tins...@googlegroups.com
> >>> To unsubscribe send email to tinspire+u...@googlegroups.com
> >>> For more options, visit this group at
> >>>http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> >>> The tns documents shared by group members are archived at
> >>>http://lafacroft.com/archive/nspire.php
>
> >>> No virus found in this incoming message.
> >>> Checked by AVG -www.avg.com
> >>> Version: 9.0.800 / Virus Database: 271.1.1/2793 - Release Date: 04/05/10 11:32:00- Hide quoted text -
>
> >> - Show quoted text -
>
> > No virus found in this incoming message.
> > Checked by AVG -www.avg.com

> > Version: 9.0.801 / Virus Database: 271.1.1/2797 - Release Date: 04/07/10 11:32:00- Hide quoted text -

Reply all
Reply to author
Forward
0 new messages