components

Delphi component spTbxToolbar skin change

江枫思渺然 提交于 2019-12-12 20:02:43
问题 How to change at runtime by code (not for groupskintype), the skin type for a sptbxtoolbar component? 回答1: You can only change the skin of all SpTBXLib components at once. Use this code SkinManager.SetSkin('Office 2007 Blue'); You can however set for each SpTBXLib component if it is drawed using the skin, Windows look or the default look, by setting assigning the SkinType property. MyComponent.SkinType := sknWindows; Hint: Toolbars itself do not have the SkinType property. They are always

Can I ensure components installation order?

被刻印的时光 ゝ 提交于 2019-12-12 19:45:59
问题 I'm considering implementing DB upgrades using WiX installer. So there would be few components with SqlScript elements. But I'm not sure if I can rely on the component execution sequence. Does WiX always add components to MSI Components table in order they are defined in a Fragment? And does Windows installer guarantee to execute them in the order of Components table? 回答1: No, MSI does not process components in any given order. It's non-deterministic. However, the SQL Scripts Custom Actions

ReBuild/Re-render Angular2 component when property is changed

江枫思渺然 提交于 2019-12-12 15:40:18
问题 How to Implment this? My SubComponent import {Component,Input,ngOnInit} from 'angular2/core'; @Component({ selector: 'my-component', template: ` <div>In child component - myAttr = {{ myAttr1 }}</div> ` }) export class MyComponent { @Input() myAttr: number; myAttr1:number; ngOnInit() { this.myAttr1=this.myAttr*10; } } Main Component import {Component} from 'angular2/core'; import {MyComponent} from './sub.component'; @Component({ selector: 'my-app', template: ` <my-component [(myAttr)]="myAttr

PHP Yii: Database connect in runtime

强颜欢笑 提交于 2019-12-12 14:15:52
问题 I would like to connect to a second database with Yii at runtime. The database name would come from a database table after the user to login. I saw in a tutorial I should do this: $db2 = Yii::createComponent(array( 'class' => 'EMongoClient', 'server' => 'mongodb://127.0.0.1:27017', 'db' => $emp['database'] )); Yii::app()->setComponent('db2',$db2); But in my controler when I access Yii::app()->db2 get the error: Property "CWebApplication.db2" is not defined What am I doing wrong? 回答1: The

Castle Windsor: How can I update a components registration

倖福魔咒の 提交于 2019-12-12 13:59:34
问题 If I have defined in config: container.Register( Component.For<X.Y.Z.IActivityService>() .ImplementedBy<X.Y.Z.ActivityService>() .ServiceOverrides(ServiceOverride.ForKey("Listeners").Eq(new [] { typeof(X.Y.Z.DefaultActivityListener).FullName })) .LifeStyle.Transient ); and I wish to extend this configuration and add a new item to the Listeners array property such that the final configuration is effectively: container.Register( Component.For<X.Y.Z.IActivityService>() .ImplementedBy<X.Y.Z

How to reuse an angular component multiple times

时间秒杀一切 提交于 2019-12-12 13:37:32
问题 I'm learning the basics of angular, but i still can't figure out how to reuse the same component multiple times in the same document. This is the relevant code: test.module.ts import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './test.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { } test.component.ts import { Component }

TColorProperty Delphi Berlin 10.1.2?

◇◆丶佛笑我妖孽 提交于 2019-12-12 13:23:31
问题 I'm trying to convert a component from Delphi 7 to Delphi Berlin (flatstyle component: https://sourceforge.net/projects/flatstyle/) After many changes in the source, i´m stuck in TColorPorperty See below: type TRxColorProperty = class(TColorProperty) public function GetValue: string; override; procedure GetValues (Proc: TGetStrProc); override; procedure SetValue (const Value: string); override; In Delphi 7, this class is in VCLEditors unit. But i can´t find in Delphi Berlin. Someone can tell

JForm::getInstance could not load file

你离开我真会死。 提交于 2019-12-12 12:10:52
问题 I am making a form component into joomla.In which i will put one textbox and one editor and one button. i create the view file for this form and the component is successfully install.but when i click to display this form onto the front end,there is an error display like: "The requested page cannot be found. An error has occurred while processing your request. You may not be able to visit this page because of: an out-of-date bookmark/favourite a mistyped address a search engine that has an out

Refresh / Reload ember route from a component

谁说我不能喝 提交于 2019-12-12 11:27:55
问题 I have a component, that's actually a modal dialog. When I am done with that dialog and press the "Ok" button, I want to stay on the stay page from where I opened that dialog. Which isn't difficult. But the problem is that the dialog changes the data (I am getting data through a REST call) so I need to refresh the route that I already am on to reflect the data changes. Since, I am calling it from a component, I don't have Route so can't call route.refresh() . I tried to get the router: this

Spring: Properly setup @ComponentScan

為{幸葍}努か 提交于 2019-12-12 10:48:33
问题 I have following set up for my Spring Application Context . @Configuration public class RmiContext { @Bean public RmiProxyFactoryBean service() { RmiProxyFactoryBean rmiProxy = new RmiProxyFactoryBean(); rmiProxy.setServiceUrl("rmi://127.0.1.1:1099/Service"); rmiProxy.setServiceInterface(Service.class); return rmiProxy; } } @Configuration public class LocalContext { @Bean public Controller Controller() { return new ControllerImpl(); } } @Configuration @Import({RmiContext.class, LocalContext