CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQMenuItem.Hint is unassigned

by kattunga » 03 Oct 2013 18:14

TMenuItem doesn't have any "UserData" property. Only TIWCGJQMenuItem has it.
But what I create are TMenuItems in TMainMenu.

TIWCGJQMenuItems are automatically created on rendering. I don't have access to that.
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

by Jorge Sousa » 03 Oct 2013 18:38

Hello

Ahh, you're using TMenuItem, and you wanted to also import the Tag

Do you really have to use TMenuItem?

You can use jqMenu.Items

Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by kattunga » 03 Oct 2013 18:49

Yes, I need to use it because I'm migrating an existing application and I need to keep compatibility with existing code.
As I explain above, the menu in my application is dynamically created and I have lot of existing code to do it based in standard vcl TMainMenu.
May be in short I can directly use jqMenu, but now I need to reuse the most possible my existing code.

Thats why I need to import the tag property.

Regards
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

by Jorge Sousa » 03 Oct 2013 18:53

Hi Christian

What about if we assign JQMenuItem.UserData to MenuItem.Tag internally?

best
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by kattunga » 03 Oct 2013 18:59

I think that the right thing should be to assign to userdata the pointer to the original TMenuItem object.
I don't know if this could cause any memory problem.

Regards
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

by kattunga » 03 Oct 2013 19:11

Another option is to add the tag property to TIWCGJQMenuItem.
I don't see accurate to assign the tag to UserData, it would be confuse to other users.
If this is the only solution I prefer to do it my own in my sourcecode. I already buy it 2 hours ago :)
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

by Jorge Sousa » 03 Oct 2013 22:27

Hi

The problem is not adding a property, this only takes a few seconds to add, the problem is that we need to consider every property in detail, because it takes memory, and at least for Win32 Web Apps, is something that we always have to consider, specially when we already have a property for that purpose.

Best Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by kattunga » 03 Oct 2013 23:28

In my humble opinion, I think that the best should be to store TMenuItem pointer in UserData when menu is automatically created form TMainMenu.

With best regard
Christian
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

by Jorge Sousa » 04 Oct 2013 09:51

Hello

Added Published property Tag: NativeInt to TIWCGJQMenuItem

Best Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by kattunga » 04 Oct 2013 12:18

Thank you very much.

With best regards
Christian
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

Previous

Return to JQMenu

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.