Need some explanation about interface in LibreOffice basic - libreoffice-basic

I need to program something in LibreOffice Basic, but I've never done that before. I just have the basis in python, so it's really new for me.
I didn't find any recent documentation, so I'm reading the basic guide from 2010.
But there is a point I really don't understand, They speak about various interface but I don't succeed to understand their interest and when I should call it.
If you can explain it I would love it.
Thank you !

Don't go deeper, no need. To write working code in Basic, you do not need additional information - you just need to know the list of methods of each object, no more. Which interface provided this method to the object shouldn't bother you.
See chapter 3.6.4. Interfaces in Pitonyak's book. The list of available methods is easy to obtain using the MRI or Xray tool extension. MRI is convenient in that after an in-depth study of the object, you immediately get a piece of code ready for use.
(Unfortunately, this extension works extremely unstable with the latest versions of LibreOffice)
Update Video on YouTube

Python is very good when working with LibreOffice. See http://christopher5106.github.io/office/2015/12/06/openoffice-libreoffice-automate-your-office-tasks-with-python-macros.html.
You'll still need MRI or XrayTool and Pitonyak's book as explained by #JohnSUN. Also you'll want APSO and a reference such as https://wiki.openoffice.org/wiki/Python/Transfer_from_Basic_to_Python.
For a single small project though, Basic may be better as there are more examples available.

Related

Using scripting to test a program

I've been tasked with testing a Windows program that is essentially a collection of links to various exe files. My job is basically to click all the links to make sure they work (yay!). To makes things a bit easier on myself, I want to create a simple script that will do the clicking for me. I have a programming background (familiar with C/C++, Java), but have never scripted anything before.
Despite googling and searching around on stackoverflow, I wasn't able to find anything that explains what would be involved in creating something like this. I downloaded a program called AutoHotKey (http://www.autohotkey.com/) that seems promising, but before I dive into it I want to see what suggestions you all have.
Thanks!
Never tried autohotkey so I can't give you feedback. But I played around a bit with Sikuli which is agnostic of the UI technology used (working with image recognition). It works fine and you should be able to come up with a working prototype in a couple of hours.
HP Unified Functional Testing (http://www8.hp.com/us/en/software-solutions/unified-functional-testing-automated-testing/) provides similar functionality as Sikuli. As licensed software, it isn't free, but provides a lot more features and support than Sikuli (which is open source) does.

How do I create an IMServicePlugin on OS X? No documentation on file structure

Apple has provided good documentation on the protocols for IMServicePlugin.framework, but provides literally zero documentation on how this is compiled, in what format, what keys for the services plist are what, etc. Has anyone had experience with this? If so, are you aware of any documentation on the subject?
Apple has a sample plugin that implements IRC, you can find it here. I know that it says that it's legacy, but that's the only sample code you'll find I'm afraid.
If you want to build one from scratch, it's actually quite "simple": In Xcode, create a new project and select Bundle, link against the IMServicePlugIn.framework and make sure that your Principal Class conforms to the IMServicePlugIn. Then, well, do whatever you need to do. When in doubt about anything, the documentation is pretty extensive (but it seems like you've already found out about that).

What Doxygen alternative would Dave DeLong use?

Yesterday, Dave DeLong answered a question of mine. It wasn't the answer I was looking for, but in the question he mentioned an alternative way of generating doxygen-style documentation for Objective-C.
Before I could really look into it, someone (maybe Dave himself) noticed the answer didn't match the question that well and removed it. *poof* gone was the link to that documentation tool.
I can't remember the name, but I'm fairly certain it's neither HeaderDoc nor Doxygen itself.
Dave, you out there? What was that link again?
I'm clearly not Dave DeLong, but I'd use appledoc, it's pretty darn awesome!
Developer Page quote:
appledoc is command line tool that helps Objective-C developers generate
Apple-like source code documentation
from specially formatted source code
comments. It's designed to take as
readable source code comments as
possible for the input and use
comments as well as surrounding source
code to generate visually appealing
documentation in the form of HTML as
well as fully indexed and browsable
Xcode documentation set. Although
there are several tools that can
create HTML documentation for
Objective-C, all of those know to me
fall short in meeting the minimum of
goals described below.
Human readable source code appledoc is designed to keep source
code comments as readable as possible
even within your source code editor.
Cross references to objects and members Creating cross references to
classes, categories or protocols is
straightforward and automated as much
as possible.
Apple-like source code HTML documentation Generate appealing
HTML documentation with the same style
as Apple's.
Xcode documentation set creation Generate and install fully indexed and
browsable Xcode documentation sets.
Documentation set can also be
automatically installed to Xcode.
Single tool from sorce code to doc set Single tool to drive generation
from source code parsing to
documentation set installation
Easily customizable output appledoc gives you a lot of command
line switches so you can parameterize
output. If this is not enough, you can
change any or all of the template
files to suit your needs.
100% Objective-C implementation The whole appledoc is written in
Objective-C, so you can easily change
it using familiar language and tools.
This also make debugging much simpler
and effective.

Is there any Subtext IDE or equivalent Example-driven Visual Programming Language/Interface published on the Internet?

I'm really excited about this new and experimental language named Subtext. But it's author haven't released nothing about it besides some papers and videos. Should I clone it? There are similar alternatives?
UPDATE I'm looking for an example-driven VPL, not just a VPL.
As Edwards' says in his related work section, the Self programming language is very similar. It shares subtext's emphsis on directness, uniformity, and liveness, but doesn't emphasize a tabular format (Schematic tables).
A lot of of work went into the Solaris version:
http://research.sun.com/self/papers/papers.html
seems there's a Mac & linux version, not sure how mature it is:
http://selflanguage.org/
Here's a video demo'ing Self, where they emphasize directness, uniformity, and liveness:
http://www.smalltalk.org.br/movies/
When you say "any VPL", do you mean none at all, or not a run-of-the-mill one? From the wording of the title question, I'll assume the latter. Here're a couple with some serious programming theory behind them:
Morphic is/was a/the UI piece of Self, and is now ported to Squeak:
http://wiki.squeak.org/squeak/2139
Prograph was a way-cool system, but I don't know of an available version.
A bit further out there is Kahn's Toontalk, based on Pictorial Janus:
http://www.toontalk.com/
I am sure you are aware of VPL On Wikipedia that lists many different VPL languages. You have not supplied information on what you are trying to achieve but another site is Synopsis. This is a commercial product.
From their website:
Synopsis is a completely visual RAD tool for Windows that frees you from having to write textual code and learning unnecesary programming details. With Synopsis you can concentrate on creating software instead of wrestling with mundane and complex low-level development tasks.
The image below shows how this application looks:
(source: codemorphis.com)
Granted my knowledge on this subject is limited and I do follow this to see if something really powerful can be created. I did see a project on CodeProject or CodePlex that was written in C# that allowed VPL but I cant find that URL.
If I ever do find that application I will edit this post!
You haven't provided more information about features you expect from such a VPL environment, but I think that "Tersus" could be interesting thing to look at. There're many VPLs, but mainly they're targeted as educational tools or addition to particular technologies (i.e VPL for Microsoft Robotics Studio) to simplify common tasks programming. The "Tersus" is full blown application development platform. It's open source and free to download for many OSes.
http://www.tersus.com
Coherence — The Director’s Cut
The Coherence home page is up at http://coherence-lang.org. The submitted version of the paper is there, with a new intro and a surprise ending.
Coherence claims to be an experimental programming language, a continuation of Subtext using other means.
Intentional shipped, but they are still kind of alpha, with limited distribution and testing. You can make example driven DSLs, but I don't know if the environment itself works that way.
http://lambda-the-ultimate.org/node/3287
You could look at the work on eve that is happening too:
http://incidentalcomplexity.com/

3d files in vb.net

I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction.
What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the 3D file into VB (probably using DX9) and be able to manipulate it using code so that the remote operator will have a better idea of what the robot is doing. The operator will also have live video to look at, but that doesn't really matter for this question.
Any help would be greatly appreciated. Thanks!
Sounds like a tough idea to implement. Well, for VB you are stuck with MDX 1.1(Comes with DirectX SDK) or SlimDX (or other 3rd party Managed DirectX wrapper). The latest XNA (replacement for MDX 1.1/2.0b) is only available for C# coder. You can try some workaround but it's not recommended and you won't get much community support. These are the least you need to get your VB to display some 3d stuffs.
If you want to save some trouble, you could use ready made game engine to simplified you job. Try Ogre, and it's managed wrapper MOgre. It was one of the candidate for my project. But I ended up with SlimDX due to Ogre not supporting video very well. But since video is not your requirement, you can really consider it. Most sample would be in C# also, so you need to convert to VB.Net to use. It won't be hard.
Here comes the harder part, you need to export your model exported from SolidWorks to DirectX Format (*.x). I did a quick search in google and only found a few paid tools to do that. You might need to spend a bit on that or spend more time looking for free converter tools.
That's about it. If you have more question, post again. Good Luck
I'm not sure what the real question is but what I suspect that you are trying to do is to be able to manipulate a SW model of a robot with some sort of a manual input. Assuming that this is the correct question, there are two aspects that need to be dwelt with:
1) The Solidworks module: Once the model of the robot is working properly in SW, a program can be written in VB.Net that can manipulate the positional mates for each of the joints. Also using VB, a window can be programmed with slide bars etc. that will allow the operator to be able to "remotely" control the robot. Once this is done, there is a great opportunity to setup a table that could store the sequencial steps. When completed, the VB program could be further developed to allow the robot to "cycle" through a sequence of moves. If any obstacles are also added to the model, this would be a great tool for collission detection and training off line.
2) If the question also includes the incorporation of a physical operator pendent there are a number of potential solutions for this. It would be hoped that the robot software would provide a VB library for communicating and commanding the Robot programatically. If this is the case, then the VB code could then be developed with a "run" mode where the SW robot is controlled by the operator pendent, instead of the controls in the VB window, (as mentioned above). This would then allow the opertor to work "offline" with a virtual robot.
Hope this helps.