Jump to content

toolbar icon-repeat & component name displayed

Recommended Posts




I have a set of visual components in the MDL group. Look and see, there are 16 different components, each has its own icon, but only the first 13 corresponds to its glyphs.


Another issue is you can not change the "component name" displayed on the toolbar (the component name listed must correspond to its component name).

for instance, I would like to display "Button" on the toolbar, if I changed TButton to Button will raise a fatal crash.


  1.1 Start Date      : Thu, 19 May 2016 05:02:22 +0400
  1.2 Name/Description: smartms.exe - (Smart Mobile Studio ID)
  1.3 Version Number  :
  1.4 Parameters      : 
  1.5 Compilation Date: Mon, 18 Apr 2016 22:12:29 +0400
  1.6 Up Time         : 22 seconds

  2.1 Date          : Thu, 19 May 2016 05:02:45 +0400
  2.2 Address       : 00A5EB6F
  2.3 Module Name   : smartms.exe - (Smart Mobile Studio ID)
  2.4 Module Version:
  2.5 Type          : Exception
  2.6 Message       : Component Button does not appear to be available.
  2.7 ID            : 8A6D
  2.8 Count         : 1
  2.9 Status        : New
  2.10 Note         : 

Active Controls:
  4.1 Form Class   : TfrmMain
  4.2 Form Text    : Smart Mobile Studio Educational []
  4.3 Control Class: TImgView32
  4.4 Control Text : 

; Smart.Common.Form.TSmartForm.AddComponent (Line=224 - Offset=3)
; ---------------------------------------------------------------
00A5EB4C  mov     [ebp-$14], eax
00A5EB4F  mov     byte ptr [ebp-$10], $11
00A5EB53  lea     eax, [ebp-$14]
00A5EB56  push    eax
00A5EB57  push    $00
00A5EB59  mov     ecx, $00A5EC08                                      ; 'C'
00A5EB5E  mov     dl, $01
00A5EB60  mov     eax, dword ptr [Exception]
00A5EB65  call    -$00629E0A
00A5EB6A  call    -$00654E0B
; Line=226 - Offset=5
; -------------------
00A5EB6F  mov     ecx, ebx          ; <-- EXCEPTION
00A5EB71  mov     dl, $01
00A5EB73  mov     eax, dword ptr [TSmartComponent]
00A5EB78  call    Smart.Common.Component.TSmartComponent.Create
00A5EB7D  mov     edi, eax
; Line=229 - Offset=8
; -------------------
00A5EB7F  lea     edx, [ebp-$08]
00A5EB82  mov     eax, edi
00A5EB84  call    Smart.Common.Component.TSmartComponent.GetCompName
; Line=230 - Offset=9
; -------------------
00A5EB89  xor     ebx, ebx
; Line=232 - Offset=11
; --------------------
00A5EB8B  inc     ebx
; Line=233 - Offset=12
; --------------------
00A5EB8C  lea     edx, [ebp-$18]  

Share this post

Link to post
Share on other sites

You may not rename the component name as it is used to locate the component in your code. If you rename it, it can't find it and thus it might crash. This said, it should not actually crash but show as usable error message.


I just fixed the crash so that it now reads 'Component could not be added' (with a more detailed reason depending on the error).


At the same time I changed the code to show the glyph name instead of the component name. This gives you the freedom to change the text below the glyph independently.


This will be available in the next version of the IDE.


Regarding the same icon after 13 items, I could not reproduce this issue so far, but I just had a peek into this issue so far.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now