PDA

View Full Version : Confusing behvior with predefined events



m1duckett
August 7th, 2007, 11:40 PM
Hi,

I have a script action in GML file "A"



gir.TriggerEvent("PLAY", xxx)


it does not matter what value "xxx" is.

I have an event in GML file "B" that should perform a test action (i.e. OSD text). This action has a "predefined event" PLAY event associated with it.

No matter what device ID is used in the "triggerEvent" method, the action in "B" always fires. I have tried using an "event filter" to only allow a specific ID (different from "A"), but the action continues to fire.

Is this correct behavior?

This reason this is important is I am trying to use the predefined events feature that G4 provides, however, I do not want "PLAY" events to be triggered across all GML files.

What is the correct way to filter predefined events?

I am hoping that enable/disable is not the answer, because I have an asynchronous event that changes TV channels periodically. Meaning this GML would always need to be receiving events. I would not want the channel changing to interfere with the foreground task (i.e. watching of a DVD or other activities).

I realize I can do this without predefined events, but it sort of defeats the abstraction (i.e. event <=> physical device) the predefined events feature provides.

Thoughts?

Thanks!

Rob H
August 8th, 2007, 02:49 AM
It looks like you've found a problem (although I'm using G5 here) - the Event Filter setting isn't being picked up by the look of things, or at least it isn't persisting.

m1duckett
August 8th, 2007, 01:08 PM
It looks like you've found a problem (although I'm using G5 here) - the Event Filter setting isn't being picked up by the look of things, or at least it isn't persisting.

It is interesting that you say it is not persisting. I notice that there is an event filter at the bottom of the "Event" dialog box too (seperate from the conditional/event filter). I also attempted to set this to something other than "Any Source" (i.e. "girder events"). Every time I re-opened the event dialog, the filter was reset to "Any source".

Is this supposed to work this way?

Does this mean people do not use the "conditional event filters"?

Is what I am trying to do not the correct approach? Again, I am trying to abstract the event from the physical device using "predefined events" and control the firing of actions through conditionals, rather than attempting to enable/disable groups.

Rob H
August 8th, 2007, 02:26 PM
I suspect that most people only use one remote so the situation doesn't arise.

Generally you'd use a predefined event like PLAY to play music or video, and you'd also use a Window Conditional to control whether the group responds to the event.

m1duckett
August 8th, 2007, 03:44 PM
Cool. Thanks!

The model is "logical" remote, a LUA script is "pressing" the buttons, when SageTV sends an asynchronous signal to change the direcTV channel. I hoping to not have to hardwire, but that is OK.

PLAY is just an example, :) -- KEY 0 => KEY 9 are the real "buttons".

It would still be nice if the event filter conditional worked :)

m1duckett
August 8th, 2007, 07:00 PM
Does this also imply that the "predefined event" strings are reserved in Girder? Since



gir.TriggerEvent("PLAY", xxx)


causes predefined "PLAY" events to fire independent of "xxx".

Again, "PLAY" is an example, I am applying the question to ALL predefined event strings.

Rob H
August 9th, 2007, 03:19 AM
In that case you're probably better off just defining your own event strings.

m1duckett
August 9th, 2007, 10:14 PM
Well, it looks like things work better, if I generate a test event via "F5" (i.e. gir.TriggerEvent) and then drag the event from the log into the tree.

At least the conditional event filter works, with these manually generated events. However, it does not seem that the "predefined events" can be filtered.

It also seems this (i.e. drag n drop) is the only way to change "Event device" to something that is not in the pick list.

Am I correct that the "Event device" field does not allow text entry?

Rob H
August 10th, 2007, 05:14 AM
Come to think of it, that probably makes some sort of sense - the predefined events are intended to make it easy to produce GML files that work with any remote that has been mapped.