Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added BuiltInSequence() Builtin #2270

Closed
wants to merge 1 commit into from
Closed

Conversation

phil65
Copy link
Contributor

@phil65 phil65 commented Feb 21, 2013

Handy function for bit more complex skinning stuff.
useful..

  • when using $INFO[Skin.String(...)] or $VAR[] for < onclick > in skins (could make use of it in Nox)
  • 2+ executes with one AlarmClock
  • Keymaps (?)

Usage
BuiltInSequence(Builtin1,BuiltIn2,...,BuiltInX)

@jmarshallnz
Copy link
Contributor

I can see the usefulness, but it seems a bit fugly. I can't really think of a better way to do it though without some sort of "end of function/expression" character (e.g. semicolon).

@phil65
Copy link
Contributor Author

phil65 commented Mar 22, 2013

even nicer would be if we could define some builtin sequences with xml.
so same structure like < variable > nodes except that every value gets evaluated, not only till the first hit.
that way we could even use conditions. implementing that is beyond my coding capabilities though, i still have much to learn..

@jmarshallnz
Copy link
Contributor

Well, I guess with multiple bar (do we support this?) you'd have it anyway, right? It's mainly for those cases where you want a single string to represent multiple actions. Semi-colon separated would be a bit nicer I think, but may be trickier to implement as you'd need to split things up first (taking into account quotes).

@phil65
Copy link
Contributor Author

phil65 commented Apr 8, 2013

what do you mean with multiple var?
atm we can call a var from inside another var var if you mean that (< value >$VAR[xyz]</ value > )
what i mean is (and would would be more powerful) is something like this

< action name="ExampleAction" >
< builtin condition="Control.HasFocus(xxx)" >SetProperty(bla,bla)< /builtin >
< builtin condition="Control.HasFocus(yyy)" >SetProperty(bla,bla2)< /builtin >
< builtin >ActivateWindow(....)< /builtin >
...
< /action >

with difference to vars that every builtin gets evaluated, even when the first one is true for example.

and then < onclick >Action(ExampleAction)< /onclick >

would have to be seperate from vars since multiple hits can only work for builtins, not for info labels.
as i said i think i won´t get that done in a way that you´d accept the pull request, just an idea i was havin :)

concerning the PR: if wanted I can try to adjust it to your wishes. busy with some other stuff atm so it will have to wait a bit then.
is there any advantage when using semicolon as a seperator?
we don´t use that anywhere else in skin xmls. escaping should work correctly i think when using commas since commas are only used inside brackets (parser respects that afaik)

@MartijnKaijser
Copy link
Member

@phil65
i'm closing this for now until you will have time to work on this PR.
Create a new one when time comes

@phil65 phil65 deleted the ActionSequence branch October 16, 2014 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants