Source language: Translate to:

Using Newlisp Plug-in

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Using Newlisp Plug-in

Postby cp4w » Thu Dec 28, 2006 1:38 pm

Continuing thread . . .


O.K Sam



Thanks. I will try it.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby HPW » Thu Dec 28, 2006 2:40 pm

Now If I want to show it in Neobook listbox I convert it.
Is there an easier way?


The suggestions from Sam will help you to get it done by using newlisp as a utility for neosripting (function-calling with return-value-processing).

But you can also go further into newLISP, by using the additional commands provided by the plugin. You can use the commands nbset, nbget and nbplay to manipulate neobook vars directly in newlisp and fire nbactions directly in newlisp. So no processing of return values. Calling nbplay can load your listbox-content directly from newlisp-code.

Lots of possibilitys there!
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby cp4w » Thu Dec 28, 2006 10:36 pm

Thanks HPW, I will look into any supplied examples.

Now I have another question related to my previous question, for you and Sam.

Follow it with this: Code:
hpwnewLispCall "(join '[result] {[#13]})" "[result]"


What would be the way to convert the other way around. For instance when neobook action script executes dbffieldtovar the values are seperated by [#13] . How can this be turned into a "list" for newlsip?
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby HPW » Thu Dec 28, 2006 11:29 pm

For instance when neobook action script executes dbffieldtovar the values are seperated by [#13] . How can this be turned into a "list" for newlsip?


Code: Select all
hpwnewLispCall "(setq mylist(parse {[dbresult]} {[#13]}))" "[lispresult]"


You get the list in mylist in newlisp and in [lispresult] in neobook.

See also the excellent newLISP manual:
\newlisp\manual_frame.html

And there chapter: String and conversion functions

In native newLISP it looks like this:
Code: Select all
newLISP v.9.0.13 on Win32.

> (setq a "Test1\nTest2\nTest3")
"Test1\nTest2\nTest3"
> a
"Test1\nTest2\nTest3"
> (silent(print a))
Test1
Test2
Test3
>
> (setq mylist(parse a "\n"))
("Test1" "Test2" "Test3")
>
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby cp4w » Fri Dec 29, 2006 7:37 am

Thanks Hans, for your help and great plug-in.

It is starting to come together for me.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest