Is "Sender" read only or can I set it for another event?

kcorey

Member
Licensed User
Longtime User
Is it possible inside of an event handler to create a new event?

Inside my _gesture handler I'm checking for a few things (down and up inside a single widget means a 'click'. down in one widget, move, up in another means a 'drag', etc)

In my _Click handler, I get the Sender object and read its tag to figure out where the event originated.

In my _gesture handler, I'd like to fabricate an click event (or a drag) from a given object.

However, if I say something like this in my handler

Sender = v

I get the error below.

Is there a right way to do this from within B4A, or is this only available to a java lib?

-Ken

-----------------------------------------------------------------
Compiling code. 0.01
Compiling layouts code. 0.00
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 221
Sender = v
javac 1.6.0_24
src\com\flippinbits\milestones\main.java:396: unexpected type
required: variable
found : value
anywheresoftware.b4a.keywords.Common.Sender(mostCurrent.activityBA) = (Object)(_v.getObject());
^
1 error
 

mc73

Well-Known Member
Licensed User
Longtime User
I think you can set a global variable containing an ID or description of the handler you want. Then, in the event, you may check for this variable, by firstly calling the same subroutine. Forgive me, though, if I didn't understand well the subject.
 
Upvote 0

kcorey

Member
Licensed User
Longtime User
Well, Yeah...

I think you can set a global variable containing an ID or description of the handler you want. Then, in the event, you may check for this variable, by firstly calling the same subroutine. Forgive me, though, if I didn't understand well the subject.

I *could* hack it in, but intuition says that's opening a can of maintenance worms down the road.

-Ken
 
Upvote 0
Top