ComboBox Menu Functionality in Datagrids

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

ComboBox Menu Functionality in Datagrids

Post by Gage » Mon Jul 29, 2013 6:49 pm

Hello,

I have been designing a highly customized Datagrid form, and some of the objects that are shown in a few of the rows (depending on the content the row is displaying from an SQL database) are Option Menus, styled as ComboBox Menus.

I have scripted these objects to update the dgData of the DG on MenuPick. I use a script that works perfectly on the same object when it is NOT placed in a DG, however the MenuPick message is never received by the object when it is located in a row of the DG.

Why would it be that the ComboBox Menu object never receives the MenuPick message when I pick something from its menu? Again, this is ONLY a problem when the control is in a row of a DG; it is working flawlessly to handle the selected item with the script when the object is simply placed on the card alone or in a group.

I can include any script that users would like to see, however, I suspect this is more of a message path question, or something about the internal workings of a Datagrid inherently preventing the control from receiving messages.

Please let me know if you have any experience with this, or any suggestions!

Regards,
Phil E.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ComboBox Menu Functionality in Datagrids

Post by Klaus » Tue Jul 30, 2013 11:22 am

Hi Phil,

we can only guess without more info and looking at your scripts!
And guessing is highly ineffective :-D


Best

Klaus

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: ComboBox Menu Functionality in Datagrids

Post by Gage » Thu Aug 01, 2013 7:08 pm

Klaus,

Thought I would just include the whole test stack. Should be attached.

Thanks!
Phil E.
Attachments
Edit Profile DG Test.livecode.zip
(19.52 KiB) Downloaded 287 times

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: ComboBox Menu Functionality in Datagrids

Post by Gage » Wed Aug 07, 2013 9:37 pm

Hi, Klaus,

Have you been able to take a look at the stack I included, by any chance?

I know you're probably very busy, but I just figured I would try to send a reminder.

Best,
Phil E.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ComboBox Menu Functionality in Datagrids

Post by Klaus » Thu Aug 08, 2013 11:31 am

Hi Phil,

yes, I am quite busy, so it would be very helpful to add a little description and/or recipe to your example stack.
Like: What and When should happen and doesn't! As I wrote "guessing is ineffective!" ;-)


Best

Klaus

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: ComboBox Menu Functionality in Datagrids

Post by Gage » Mon Aug 12, 2013 8:27 pm

Hi Klaus,

Thank you for finding the time!

So, as I said in the first post of the thread, the question really seems pretty simple. I have script located within the ComboBox Menus in the DG Form's Row Template. These scripts are supposed to do XYZ on MenuPick. Regardless what the scripts do, MenuPick is never sent to the ComboBoxes when a new menu item is picked in the populated DG Form.

However, for completeness, as I said in the first post, the objects are supposed to update the dgData of the datagrid when a new menu item is picked. Again, I can handle debugging that part of it; I just would love to find out why the MenuPick message is never being sent to the ComboBox Menu buttons located in the DG. Since it's not sent, it renders the code I have there irrelevant. However, the same method DOES WORK for identical objects located OUTSIDE a datagrid. (Therefore, I suspect something about DGs make the message path change, or make the MenuPick message not make it to the object)

Hope that clarifies what I am looking for. Not worried so much about the performance of the code, just want to know why the MenuPick message is not sent to the ComboBox Menu buttons when a menu item is picked from one of their lists.

Much gratitude!
Phil E.

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: ComboBox Menu Functionality in Datagrids

Post by Gage » Sat Sep 14, 2013 11:53 pm

Hello,

I still have not figured out a solution to this question. I feel that it should be a fairly simple answer, if the question is understood. Just want to know if there is a special way to make the script of an ComboBox Menu functional when the Option Menu is an object in a the row template of a data grid, since my ComboBox Menus don't have their script accessed on MouseDown.

Thanks,
Phil E.

Post Reply