mouseUp/Down event
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
mouseUp/Down event
I have a list field on my card with a mouseUp message handler in its object script. When I click on a line in the list, the handler is never called (I have an answer command as the first statement to let me know it's being executed). Same thing if try to use a mouseDown.
Still evaluating the demo so maybe I'm not understanding this but it should work, shouldn't it?
Also, on an unrelated topic, is there a card property for the number of objects on a card?
Thanks,
Pete
Still evaluating the demo so maybe I'm not understanding this but it should work, shouldn't it?
Also, on an unrelated topic, is there a card property for the number of objects on a card?
Thanks,
Pete
Hi Pete,
Are you absolutely sure that you created a list field? Is the listBehavior property of the field true and is the lockText true as well? The lockText must be true for the mouseDown and mouseUp mesages to be sent.
You can retrieve the number of objects with the controls property:
put the number of controls of this cd
Best,
Mark
Are you absolutely sure that you created a list field? Is the listBehavior property of the field true and is the lockText true as well? The lockText must be true for the mouseDown and mouseUp mesages to be sent.
You can retrieve the number of objects with the controls property:
put the number of controls of this cd
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi Mark,
Yes the listBehavior ( and click to toggle) is true and so is lockText. The object script just has:
on mouseUp
answer information "entering mouse up"
end mouseUp
and I never get the message when I click on the list. Whatever I click on is highlighted so seems like the click is recognised at some level.
Pete
Yes the listBehavior ( and click to toggle) is true and so is lockText. The object script just has:
on mouseUp
answer information "entering mouse up"
end mouseUp
and I never get the message when I click on the list. Whatever I click on is highlighted so seems like the click is recognised at some level.
Pete
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
A thought came to me, did you check your stack or card script for a mouseUp message? The possible reason why the mouseUp message isn't getting sent to your field object is because you have a mouseUp message on a card or a stack or some control that is over that field.phaworth wrote:Hi Mark,
Yes the listBehavior ( and click to toggle) is true and so is lockText. The object script just has:
on mouseUp
answer information "entering mouse up"
end mouseUp
and I never get the message when I click on the list. Whatever I click on is highlighted so seems like the click is recognised at some level.
Pete
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
Supposedly no. Hmm if it makes any difference, here's a sample stack I made awhile ago. I may have to reply at some later point because I'm at school and it's only break time. xD
http://www.mediafire.com/file/imthd0jtw ... sample.rev
http://www.mediafire.com/file/imthd0jtw ... sample.rev
I'm sure this has something to do with my problem. I just quit Revolution and restarted it and got a window with title "Errors" when I opened the stack I'm working on. The rest of the info in the window says:
Compiling at 10:56:55pm
Type: Expression: Missing Factor
Object Products
Line BTgetProductInfo()
Hint )
I had to type the above in manually since the window won;t let me copy the text.
BTGetProductInfo is a function I wrote that gets called at the card open message and also at the mouse up event. It returns no values, just gets values from an SQLite db and puts them into fields on the card.
SO I guess now I'm wondering why I'm just starting to get this error message and most of all, what it means so I can fix it.
Compiling at 10:56:55pm
Type: Expression: Missing Factor
Object Products
Line BTgetProductInfo()
Hint )
I had to type the above in manually since the window won;t let me copy the text.
BTGetProductInfo is a function I wrote that gets called at the card open message and also at the mouse up event. It returns no values, just gets values from an SQLite db and puts them into fields on the card.
SO I guess now I'm wondering why I'm just starting to get this error message and most of all, what it means so I can fix it.
phawort,
Perhaps you should click that little blue-ish square in the script window and correct the error that's displayed in the bottom of the script window?
You should probably also read up on the message hierarchy. Read the first part of the docs included with Revolution or go here.
Perhaps you should click that little blue-ish square in the script window and correct the error that's displayed in the bottom of the script window?
You should probably also read up on the message hierarchy. Read the first part of the docs included with Revolution or go here.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
I have read and understood the message hierarchy. I have three scripts, card, stack, and object. The only one that includes a mouseUp handler is the script for the list field handler.
The problem is obviously being caused by the compilation error and I would have fixed it without bothering the forum if there was any clue as to what the error "Missing Factor" means anywhere in any of the documentation.
The problem is obviously being caused by the compilation error and I would have fixed it without bothering the forum if there was any clue as to what the error "Missing Factor" means anywhere in any of the documentation.
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact: