Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 15-Aug-2014 19:57:18

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

template plugit questions

I have been looking through the template plugit code on the wiki, and since I will be building (or modding)  a couple of these, I have some general questions:

the PARAM tag :

the "name" param contain the name of the editor variable to save
the "type" param contain the type of the param, it can be :
"value"

1. are "values" always stored as strings?

fun cbCloseEdit(ctrlinit)=
  // get the check state and add it to the param list
  let itoa getEdCtrlCheckState ctrlinit -> state in
    ["oninit" state]::
    nil;;

2. this callback function is the a reserved term ('cbCloseEdit') that you use to save  data to the .xml file when the plugit is closed, correct?

3. and lastly, the done event cannot send strings to another plugit (at least when I open the 'edit links' window.  how would I modify the editor/client/xml code to allow for this?

I'm looking at the http://redmine.scolring.org/projects/op … t_api.html page to see how this template works.
thx.

Offline

#2 15-Aug-2014 21:34:04

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: template plugit questions

Hi !

1 : Yes smile

2 : Yes

3 : Don't understand ^^

Offline

#3 16-Aug-2014 18:06:36

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: template plugit questions

thanks for the reply Arkeon, as for question 3, here is a picture:
howtosendstring.png

how do I get the drop down (1) to be activated, so a string can  be passed with the 'done' event?
what is the box below that (2) for, is it for the user parameter passed in the link?
how are the link parameters saved to the .xml file?
how is

fun cbGo(inst, from, action, param, rep, uparam)

represented in the fields of the link dialog window?

thx (for your patience, once I learn this plugit api I think I can really help others as opposed to working on my own dead end coding).
-h

Last edited by hebdemnobad (16-Aug-2014 18:09:43)

Offline

#4 16-Aug-2014 18:10:29

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: template plugit questions

just add enum in Action like this : in the xml file

    <ACTION name="Set view position">
      <ENUM value="x y" />
      <ENUM value="x%25+y%25" />
      <ENUM value="10 10" />
      <ENUM value="50%25+50%25" />
    </ACTION>

Offline

#5 16-Aug-2014 20:51:58

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: template plugit questions

thx for the reply Arkeon but I don't understand....to get a string passed from "done" to "go", don't I have to change the code for the "done" event in the .xml? and how would I implement that in the editor and/or client files?

Offline

#6 16-Aug-2014 21:07:02

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: template plugit questions

hmm it don't work like this

this content in the xml is only for presets or data format.

in a plugit when you call SendPluginEvent you send the link parameter with it.
SendPluginEvent inst "myevent" "done" nil
SendPluginEvent inst "myevent" "go" nil

then if you manually set a link parameter in the link interface, this one will overwrite the link value sent by the plugIT event.

Offline

#7 18-Aug-2014 15:58:14

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: template plugit questions

arkeon wrote:

hmm it don't work like this

this content in the xml is only for presets or data format.

in a plugit when you call SendPluginEvent you send the link parameter with it.
SendPluginEvent inst "myevent" "done" nil
SendPluginEvent inst "myevent" "go" nil

thx...so in the link dialog, what graphic element represents the param in SendPluginEvent, and in other plugit functinos, what graphic element represents uparam?

Offline

#8 18-Aug-2014 16:49:07

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: template plugit questions

The combo box only contains presets from xml when you select one it just copy it to the user param txtbox

Offline

#9 19-Aug-2014 13:15:37

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: template plugit questions

arkeon wrote:

just add enum in Action like this : in the xml file

    <ACTION name="Set view position">
      <ENUM value="x y" />
      <ENUM value="x%25+y%25" />
      <ENUM value="10 10" />
      <ENUM value="50%25+50%25" />
    </ACTION>


So those XML tags determine what's in the dropdown  list (1) in my picture?

Offline

#10 20-Aug-2014 00:24:55

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: template plugit questions

Yes that's it.

Offline

#11 21-Aug-2014 14:26:58

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: template plugit questions

hebdemnobad wrote:
arkeon wrote:

just add enum in Action like this : in the xml file

    <ACTION name="Set view position">
      <ENUM value="x y" />
      <ENUM value="x%25+y%25" />
      <ENUM value="10 10" />
      <ENUM value="50%25+50%25" />
    </ACTION>


So those XML tags determine what's in the dropdown  list (1) in my picture?

So this means that the options in the dropdown list (1) are determined by the action xml markup, not the event xml markup? Or can they be determined by both action markup and event markup?

Offline

#12 21-Aug-2014 14:30:39

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: template plugit questions

Yes it can be only defined by Action.
But you're right some place to show the Event data format should be usefull even if it's generally in the documentation.

Offline

#13 21-Aug-2014 14:38:31

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: template plugit questions

arkeon wrote:

Yes it can be only defined by Action.
But you're right some place to show the Event data format should be usefull even if it's generally in the documentation.

thx

Offline

Board footer

Powered by FluxBB