CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQMenuItem.OnClick.Indicator - in IDE -vs- programming

General discussion

by ScottWGast » 13 May 2014 23:03

I am able to set the .Indicator to formMain.IWCGJQLockIndicator1 in the IDE without any problems (and it works fine at runtime) , but if I try to _set_ the .Indicator at runtime, I get an "Invalid class typecast" in the code below:

Code: Select all
var
  i: Integer;
begin
  // set the menu items Lock Indicator
  for i := 0 to Self.menuEmailEdit.MenuItems.Count - 1 do
      Self.menuEmailEdit.MenuItems[i].OnClick.Indicator := (Owner as TformMain).IWCGJQLockIndicator1;                 // <<-- Invalid class typecast
end


Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Jorge Sousa » 13 May 2014 23:18

Hi

The error is in (Owner as TformMain), your code
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Jorge Sousa » 13 May 2014 23:18

Hi

The error is in (Owner as TformMain), your code
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Alexander Bulei » 14 May 2014 10:27

Hi ScottWGast,

Sorry for asking, do you have debug?

It easy to check with CTRL+F7 (Evaluate/Modify window)...

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to General - Archive

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.