firemonkey-style


Error Reading StyleBook1.ResourcesBin in FireMonkey


Using XE7, I wrote a simple component based on TComboColorBox customizing its style. What I do it is just recall the MyStyle.style file where an instance of TLayout and of TRectangle are used. In the following the simple code:
unit URectangleComboColor
interface
uses
System.classes, System.Rtti, System.UITypes, FMX.colors, FMX.controls;
type
TRecComboColor = class(TComboColorBox)
FStyleBook : TStyleBook;
procedure docolorchange(sender:tobject); override;
public
constructor create(aowner: tComponent); override;
end;
procedure register;
implementation
{ TRecComboColor }
procedure TRecComboColor.docolorchange(sender:tobject);
begin
inherited;
self.StylesData['rectanglestyle.fill.Color'] := self.Color;
end;
constructor TRecComboColor.create(aowner: tcomponent);
begin
inherited;
Fstylebook := tstylebook.Create(nil);
Fstylebook.FileName :='C:\.....\MyLibrary\MyStyle.style';
self.StyleLookup := 'MyStyle1';
self.StylesData['rectanglestyle.Fill.Color'] := self.Color;
width := 20;
height:= 20;
end;
procedure Register;
begin
RegisterComponents('Samples', [TRecComboColor]);
end;
end.
It works nicely both at run-time and at design-time. The problem is raised if I try to use this component in a TStylebook to define a new style. In a new very simple project (a form plus one instance of TStylebook) I get the following error if I try to run it using my component in the Style designer:
Exception EReadError in module Project1.exe at 000B5C20. Error reading StyleBook1.ResourcesBin: Class TRecComboColor not found.
Any idea?

Related Links

Error Reading StyleBook1.ResourcesBin in FireMonkey

Categories

HOME
google-chrome
libgdx
dotnetnuke
redmine
concurrency
iverilog
material-components
share
clone
position
minecraft
match
alljoyn
csrf
freertos
jpa-2.0
fresco
bnf
pywinauto
renderscript
error-logging
gollum-wiki
stackexchange.redis
pymongo
sybase-ase
pyspark-sql
django-import-export
amazon-cloudtrail
d3.js-v4
memory-fences
plantuml
listjs
markov-chains
ng-repeat
llvm-ir
rdp
praat
grails-spring-security
plane
oauth2-playground
grails3.2.0
hdiv
angular-datatables
hypothesis-test
dagger
permission-denied
moinmoin
asihttprequest
liteide
adblock
karabiner
gestures
android-sharing
word-2007
test-data
http-basic-authentication
stateless-session-bean
dynamics-crm-4
instafeedjs
boost-compute
decoder
dmarc
visual-studio-monaco
maven-release-plugin
odp.net-managed
preferenceactivity
wif4.5
self
highest
netdatacontractserializer
360-degrees
gql
vdm-sl
web-api
baseadapter
directorysearcher
operands
microsoft-expression-web
wicket-1.5
cout
dmake
producer
igor
xcode6.3.1
otl
treeline
refit
jomsocial
windows-taskbar
profiles
lsa
sensormanager
vlab
examine
xalan
idispatch
onconfigurationchanged
stretch
hardcode
netstream
background-repeat
mmc3
representation
mediacontroller
airprint
anonymous-types
libxslt
hungarian-notation
ios-4.2
mongrel
zend-test
projectpier
fuzzy-comparison
levels
remote-working

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App