[11:43:17] hi [11:43:29] earlier this day i was able to watch the livestream of the SMWcon [11:43:37] however, now it says "you need an account" [13:26:02] hi [13:26:07] how's it going in berlin? [13:52:14] (CR) Jeroen De Dauw: [C: 2] Fix global var access [extensions/SemanticMediaWiki] - https://gerrit.wikimedia.org/r/92609 (owner: Jeroen De Dauw) [14:04:40] [travis-ci] wikimedia/mediawiki-extensions-SemanticMediaWiki#304 (master - b3698c2 : jeroendedauw): The build was fixed. [14:04:40] [travis-ci] Change view : https://github.com/wikimedia/mediawiki-extensions-SemanticMediaWiki/compare/2b751a389d89...b3698c289090 [14:04:40] [travis-ci] Build details : http://travis-ci.org/wikimedia/mediawiki-extensions-SemanticMediaWiki/builds/13262073 [19:42:08] hi, with text properties that have an allowed set of values, is there any way to restrict allowed transistions to implement some kind of simple state machine? [20:30:05] PlasmaHH: im new to SMW, but maybe a {{#switch that sets the values= ? [20:30:49] if you mean, in a form edit [20:36:25] kermit: hm, I dont see how that could help here, how would it prevent the user from chosing an invalid entry from the dropdown? [20:46:44] PlasmaHH: dropdown input type [20:46:55] er [20:47:03] im saying those would be the only ones in the dropdon [20:47:11] the ones you list [20:47:27] you wouldnt list invalid ones [20:50:56] <_ken_> I think the other _ken_ is me [20:50:58] <_ken_> ugh [20:51:19] <_ken_> Or it's someone else named "Ken A" also [20:51:22] <_ken_> from New England [20:51:43] where would I implement it, in the Form: for that entry? I dont see any way to get the current value there... let me read the docs again, maybe I overlooked something [20:51:43] <_ken_> logged into a Semantic Mediawiki IRC [20:51:55] ken is such a rare name, I think its you. [20:52:21] <_ken_> I don't know where it's logged in from though, which is weird [20:52:32] PlasmaHH: ohh, getting the current value, i dont know how to do that part either, but i havent tried [20:52:54] PlasmaHH: you should be able to get the value in the same way you would get it into any page? [20:53:11] if there isnt a form way [20:53:34] #show [20:54:11] <_ken_> kermit: can't you just use Allows values? [20:54:38] <_ken_> http://semantic-mediawiki.org/wiki/Property:Allows_value [20:54:58] <_ken_> Unless I'm missing something or misunderstanding me [20:55:36] <_ken_> I use that for my dropdowns and users simply can't pick other values [20:57:39] _ken_: yes, you are missing my original requirement ;) [20:58:01] <_ken_> lol I figured [20:58:02] kermit: for #show I would need to pass the current page as a parameter it seems, or is there a variant that says "show property of current page" ? [20:58:15] maybe {{FULLPAGENAME}} ? [20:58:25] i havent tried that in a form though [20:58:41] [[{{FULLPAGENAME}}]] [21:00:11] <_ken_> PlasmaHH: What was the existing requirement? [21:00:16] and an inverse query on your field [21:01:03] kermit: hm, I have {{#show [[{{FULLPAGENAME}}]] | ?MyProperty }} in the Form: and whene using it to edit osme page it shows there only the FULLPAGENAME replaced, but the rest is put there verbatim :/ [21:01:19] _ken_: to further restrict valid values based on the current one, to implement some kind of state machine [21:01:43] _ken_: like you may change A->B and B->C but never A->C [21:02:00] er n/m on the inverse query part [21:02:25] PlasmaHH: #show: [21:02:25] : [21:03:10] ah, silly mistake. now I get something. a yellow triangel. hmpf [21:03:50] ahwithout the [[]] around FULLPAGENAME It works [21:04:02] or at least, it displays something useful. now I need to feed it into a switch [21:05:01] oh yeah, sorry about the [[]] [21:06:02] well, it made sense, given that when not using the magic word I would use them [21:08:10] <_ken_> PlasmaHH: I do something similar where I get the possible values (or the existing values) via ask or show and then I use the explode parser function to trim down what I want [21:08:43] <_ken_> though arraymaps are better Yaron says [21:08:53] <_ken_> not sure if that helps, I have to step afk for a bit [21:12:07] hm, I dont know why, but today I forget the : for almost all parser functions [21:28:02] kermit: hm, I am not sure, but it seems that the {{{field| part is evaluated when saving the forms page or so, at least I dont get any results at all when I do {{{field|State|}}} but when I put the into the description text part of the form, it displays fine (the comma seperated list of valid values) [21:28:21] *{{{field|State|values=}}} [21:42:48] PlasmaHH: are you using dropdown or combobox or autocomplete? [21:43:06] the values have nowhere to go, otherwise [21:43:12] dropdown [21:43:27] it works fine when I "hardcode" values=something,blah,xxx [21:47:05] kermit: when I replace the values=a,b,c,d with values= where mytemplateexpression evaluates in the surrounding wikitext to x,y,z, then the dropdown only shows one value, and that is the wikicode of my template call expression [21:57:26] kermit: it looks like {{{ is evaluated before any templates, and after templates are run, {{{ has no further effect. or at least it feels like that. [22:04:26] huh, i thought it always evaluated inside to out [22:04:37] but i only started SMW 2 weeks ago [22:05:16] documentation seems to suggest that for form definitions, these tags are somehow special: "Wiki-text and some HTML, can be freely embedded anywhere outside of the tags" [22:06:56] ah, it suggests that I can escape the stuff, lets see [22:09:08] kermit: yay, it works that ! I have to create a template that includes the {{{ but as {{{ [22:11:33] oh i read something about a two pass evalutation model in forms [22:12:07] hum, one thing is weird, I did not notice before. The dropdown also includes some "empty string" [22:12:18] trailing comma? [22:12:27] nope. its the frist elemtn [22:12:50] maybe "existing values only" ? [22:13:04] though thats for comboboxes [22:13:40] hm, maybe mandatory, lets see [22:14:06] yep, that was it [22:16:08] so, great, thank you very much for your help, tomorrow I will see if I can implement some kind of audit trail for various fields