Book a Demo

Author Topic: Shape scripting documentation  (Read 2800 times)

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Shape scripting documentation
« on: February 22, 2006, 06:02:21 am »
I have a feeling that the power of the shape scripting function has only been partially revealed.  In the help, there's "Commands (Version 1.0)" which lists a range of functions/operations,  however if you look at the examples you find things appearing such as

   layouttype =
   addSubShape()

which don't appear to be documented (unless I've missed something),  and it wouldn't surprise me if there's more missing from the help.   Anyone know where we can get a definitive list of what you can do with shape scripts ?

thanks

thomaskilian

  • Guest
Re: Shape scripting documentation
« Reply #1 on: February 22, 2006, 06:37:20 am »
I just reported some docu flaws. height should be preferredheight and width the same. Layouttype is also reported. These are promised to be fixed in a later release.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Shape scripting documentation
« Reply #2 on: February 22, 2006, 09:57:01 am »
Hi Graham,

I've reported this too, but Thomas and I are certainly not the first. The Sparxians have acknowledged to be incomplete and out of date elsewhere in this forum.

Neil (KP at Sparx) has replied that he is actively working through the code behind this feature, and making progress on documentation. I've not been too successful with his advice to date, but that is primarily because I have been busy in the engine room of my project and unable to surface for this. However, it has become somewhat more important - that's my fault, for solving the more pressing problems - so I'll delve into this.

One thing I'm certain I was able to do was to get the name of an element to display. Instead of the "text" command I used the "println" command, with the information as follows:
println("#NAME#");
Case (perhaps) and punctuation (for sure) appear to be significant. This got the name to display, in the upper right corner. There should be other commands to place and justify as you require.

Neil used the command:
if (HasProperty("language","Java"))
{
PrintWrapped("#dateCreated#");
}

The above is verbatim. My excuse for not trying this yet is that it is Java, and I didn't want to spill any on me.   ;)

I'll let you guys know how I fare as I work on this.

Thomas: Should we start some kind of discussion on the User Group or something? It would be a good idea to accumulate any wisdom we find by guess and by gosh. I'm sure Neil would also appreciate anything we come up with, as he muddles through the innards.

David
No, you can't have it!

thomaskilian

  • Guest
Re: Shape scripting documentation
« Reply #3 on: February 22, 2006, 10:47:34 am »
Hi David,
I might not be able to go into too much detail since I try to a) cover many threads here with short hints where possible and b) have to do something for living.

However, it's a very good idea to discuss this topic (and others) here. This shape thingy is quite new and there are probably not too many people which have played around enough. I'm sure that Sparx will welcome user feedback in form of suggestions and also criticism.