Messages sent while editing group

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Messages sent while editing group

Post by bd525 » Mon Jan 02, 2023 6:25 pm

I have mouseEnter and mouseLeave handlers in my movie script that set the text of a field. When I try to edit a group that doesn't include the field in question those handlers generate an error because, apparently, when in group edit mode Livecode forgets about other objects not in that group. I can neutralize those handlers in advance by commenting them out, but that's rather a pain in the neck.

As with many of my posts I suspect the solution is simple, but I have not been able to find it.

Thanks!

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Messages sent while editing group

Post by Klaus » Mon Jan 02, 2023 7:04 pm

Unfortunately this is a known "feature". :?

I definitively consider this a bug, edit mode should not do this, but there was a discussion on the mailinglist
some time ago with the result that this is considered to be a feature...

Sorry for the bad news.

bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Re: Messages sent while editing group

Post by bd525 » Mon Jan 02, 2023 8:06 pm

Bad news, indeed, but thanks for the quick answer, Klaus.

Bruce

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Messages sent while editing group

Post by dunbarx » Tue Jan 03, 2023 3:22 am

Hi.

Can you please tell me in different words what you are seeing? I understand you have certain handlers, but also that you say "edit a group that doesn't include the field in question".

You are in edit mode. What do those handlers have to do with the editing process? They cannot fire while editing.

I am missing it.

Craig

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Messages sent while editing group

Post by Klaus » Tue Jan 03, 2023 11:03 am

Hi Craig,
dunbarx wrote:
Tue Jan 03, 2023 3:22 am
...
You are in edit mode. What do those handlers have to do with the editing process? They cannot fire while editing...
FYI: https://quality.livecode.com/show_bug.cgi?id=23143

Best

Klaus

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Messages sent while editing group

Post by stam » Tue Jan 03, 2023 12:08 pm

Klaus wrote:
Tue Jan 03, 2023 11:03 am
Hi Craig,
dunbarx wrote:
Tue Jan 03, 2023 3:22 am
...
You are in edit mode. What do those handlers have to do with the editing process? They cannot fire while editing...
FYI: https://quality.livecode.com/show_bug.cgi?id=23143

Best

Klaus
A lot of this is confusing, especially to newcomers.
The perceptual difficulty arises from the fact that newcomers used to other environments expect to have an 'IDE' version of an app for design/coding purposes, which then can (usually by compilation) be made to run as an app - therefore there are 2 distinct conceptual modes - a 'design' mode and a 'runtime' mode.

The conceptual difficulty arises from the fact that in LC you are presented with a 'design' mode and a 'runtime' mode in the form of a tool which you toggle, but that is complete fiction ;)
This lie is clearly fostered by LC itself to present an 'easy' interface to newcomers, while old-timers are wiser than than that.
Both tools run in both IDE and standalone. It was only very recently I discovered that actually 'pointer tool' - which in my mind had become the 'IDE design tool' based on LC's own innumerable tutorials actually runs just fine in standalones, and actually has a clear role in standalone apps (even though I managed to break this by adding my own code to controls ;) )

So the concept of 'runs in browse tool' and 'runs in pointer tool' are not synonymous for runs in app & runs in IDE. Hence many messages and reacting to mouse events is a feature not a bug; but I would still argue these should not work while designing the app in the IDE.

In my mind, instead of the artificial distinction between tools to discern if designing or testing an app, there should be an additional switch which denotes exactly that - design mode and runtime mode (instead of which tool is selected, since both tools work in both circumstances).

My $0.02 anyway...

bd525
Posts: 80
Joined: Sun Aug 31, 2014 12:43 am

Re: Messages sent while editing group

Post by bd525 » Tue Jan 03, 2023 2:01 pm

Replying to Craig (dunbarx): They do fire. They fire while in edit mode, not running mode, in the development (Livecode) environment. As far as I can tell it only happens to me when I edit a group. When I move the pointer to edit a group member a mouseEnter or mouseLeave handler pops up in debug mode with an error "no such object."

Having said that I seem to have solved the problem by making the mouse handlers more restrictive (better "if" conditions). So, all's well that ends well.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Messages sent while editing group

Post by dunbarx » Wed Jan 04, 2023 2:04 pm

Klaus, Stam and bd525.

As usual, it is my brain that is the problem. I even have posts here dealing with those two messages firing in edit mode.

I just did not understand the question as posted.

Craig

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”