Adding events to controls

Want to add an event to a pushbutton, but event selections are only connected to the containing window. What am I missing here?

Double click the control. Or right-click the control. Or select the control in the navigator and use the menu. What am I missing?

save the project when you add a control to avoid a bug in Xojo.
Else the list of events may be empty.

[quote=63935:@Christian Schmitz]save the project when you add a control to avoid a bug in Xojo.
Else the list of events may be empty.[/quote]

?

[quote=63943:@Michel Bujardet]
?[/quote]
When you first add a control to the window, the event handlers for that control don’t appear in the drop down menu until you save the project.

Haven’t run into that one yet.

I just checked with 4.1 Mac and when I add a control to the Window, events for it are available right away…

Interesting… I’m on Mac 10.7.5 with 4.1 and it happens to me all the time.

Many thanks everyone. I will try the save technique.

Has anyone reported this bug?

Yes its case 26713.

I see a difference in

  • double-clicking on a control in the library to add it to the window, and
  • dragging a control into the window.
    In the first case the navigator marks the added control, in the latter case the window.

Saving did the trick…

If only I could reproduce the initial conditions that make this NOT work initially I’d fix it

[quote=64015:@Eli Ott]I see a difference in

  • double-clicking on a control in the library to add it to the window, and
  • dragging a control into the window.
    In the first case the navigator marks the added control, in the latter case the window.[/quote]

Yes that appears to actually be a bug
Can you file a report with this observation
That may contribute to the difference

Norman, here is a screen recording of the event handlers not available bug. If you want me to file a feedback case later I can, but I don’t have the time right now. Hopefully this can help you find the bug.

https://www.dropbox.com/s/6judawb0uwx68gh/Screen%20Recording%2017.mov

I think you misunderstand
26713 has LOTS of people posting movies etc but that doesn’t mean I can reproduce it
Attach this to that report & I’ll try again but I’ve never been able to reproduce it when running the IDE sources so its hard to find & fix

Not that I haven’t tried as I can certainly imagine it would be very annoying

<https://xojo.com/issue/26713> is now showing as fixed! Well done, Norman!

every reproducible case/comment that showed this I can no longer reproduce with internal builds of “the next release” so it looks “fixed”
But I’m sure once we release it into the wild someone will find a way to make it not work
I have faith

I will say that having a couple reproducible sets of steps went a VERY long way to fixing it where most reports amounted to “Its broken please fix it” with not much else to go on

[quote=64076:@Norman Palardy]es that appears to actually be a bug
Can you file a report with this observation
That may contribute to the difference[/quote]

I am not trying to be awkward with this comment as I have noticed it on many different forums but when someone posts a potential bug on the forum as above and an employee of Xojo confirms it is likely a bug then why is it necessary for the poster to log the the bug. Xojo know about it because Norman Palardy confirmed it. Do Xojo only act on bugs identified on their system by their users? Strange.

All the best

Terry

Not at all, but getting the user who experienced the bug to document the problem will generally present a clear picture of the users experience which won’t necessarily be what’s presented in this forum. Also giving the user a chance to document the steps required to exhibit the issue will help debug the problem. And don’t forget Xojo devs are using Xojo too - they’re also users.

I always ask my clients to “show me the problem” - the biggest frustration - they can’t while I’m watching.

You may notice how users of your own software have a knack to run into bugs that you never though where possible. Release a build, hand it to a non-programmer, and click ! Bug !

It tends to be the same for Xojo. We run into bugs that often are difficult to predict, and even less to reproduce. The particular https://xojo.com/issue/26713 bug took almost a month of discussion back and forth among beta testers until someone found a way to make it reproductible. Then when Norman was able to reproduce it, it took very little time to fix.

The need to go through Feedback, I believe, is not only to fit within Xojo internal trackable methods coherence, but also to insure that users who report will take the time to adequately report the bug, and attach projects or crash dumps that will help corner the insect.

Haven’t you noticed how sometimes people try to post unusable crash dump excerpts in the forum ? Feedback insures the integrity and coherence of the report.

As for bugs identified by their own staff, like the one you may find in your own code, they are silently fixed before we have a chance to know about them. And it is only natural.