components

How to use DefineProperties in a custom Class Object for Arrays - Delphi

做~自己de王妃 提交于 2019-12-02 07:39:57
I'm trying to create my own class object and use it to store various data types for my application, this all works fine when using Published Properties, I can stream these to disk and back with no problems. But I need to stream some Arrays of both integer and strings data types as well. I understand that Arrays, amongst other data types can't be published properties because Delphi doesn't know how to stream them, I was led to believe you need to use DefineProperties to accomplish this, I've created a test Array of String as a Public property, I can read and write to it just fine, however I

Passing nil as a parameter in place of a TComponent

*爱你&永不变心* 提交于 2019-12-02 07:39:26
I've come across some code that's throwing an exception (EIntfCasterror Cast not supported) when it passes nil to a constructor expecting a TComponent, like so: obj := SomeClass.Create(nil); The unit this is in does not contain a form and even TForm requires a TComponent be passed to it when you call its constructor. What should I pass in place of nil if anything exists or is there a way to get it to accept nil. Thank you. Also, I don't have the source code which calls the method this is in, or I would just have it pass the form it has access to. EDIT: Fixed the code example. EDIT2: Fixed the

A way to render multiple root elements on VueJS with v-for directive

徘徊边缘 提交于 2019-12-02 06:17:40
Right now, I'm trying to make a website that shows recent news posts which is supplied my NodeJS API. I've tried the following: HTML <div id="news" class="media" v-for="item in posts"> <div> <h4 class="media-heading">{{item.title}}</h4> <p>{{item.msg}}</p> </div> </div> Javascript const news = new Vue({ el: '#news', data: { posts: [ {title: 'My First News post', msg: 'This is your fist news!'}, {title: 'Cakes are great food', msg: 'Yummy Yummy Yummy'}, {title: 'How to learnVueJS', msg: 'Start Learning!'}, ] } }) Apparently, the above didn't work because Vue can't render multiple root elements.

Cannot read property 'post' of undefined vue

别来无恙 提交于 2019-12-02 06:12:58
问题 Thanks for reading my question. I have read about my problem VUE JS 2 + WEBPACK Cannot read property 'get' of undefined VUE RESOURCE But my system no read Vue var :( I have a vue component calls app.vue and i need to use vue-resource to get data from my post. But the error a lot times is: TypeError: Cannot read property 'post' of undefined at VueComponent.loadingProcess Do u have ideas to solve it? My app.vue <script> var Vue = require('vue'); //Vue.use(require('vue-resource')); //Vue.use();

How to add a select all option to select component in CDE

谁都会走 提交于 2019-12-02 05:37:49
for a students projects we are working with Pentaho CDE to create a dashboard. At first it works fine, but now we are hanging at the point adding more than one Select Component. We inserted the Parameters of the Select Components to the SQL-Queries in the Where statement but now we have the problem, that it is not possible to select all elements in one select component and only one in the others. The sample space is getting smaller and smaller the more parameters we add because we can't find out how to select all option in one select component and send this all to the query. Is it possible in

Java Layout not showing components (sometimes)

*爱你&永不变心* 提交于 2019-12-02 04:57:34
I'm writing a MathQuiz for my pupils including JLatexMath for rendering and jinput for the buzzers. The problem is, that sometimes (like every fourth time) when I start the program, none of the components are visible. They appear after resizing the JFrame. First I was thinking of Bugs in the jinput or jlatexMath libraries, but I do get the same Error even with this minimal Code: public class Shell extends JFrame{ private JButton button1; private JButton button2; private Formula formula; public Shell() { super("blaBla"); this.setSize(800, 600); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

CakePHP PaginationRecallComponent, Strict (2048): Declaration of PaginationRecallComponent::initialize()

主宰稳场 提交于 2019-12-02 04:30:19
I have tried to insert PaginationRecallComponent ( http://bakery.cakephp.org/articles/Zaphod/2012/03/27/paginationrecall_for_cakephp_2_x ), in App -> Controller -> Component -> PaginationRecallComponent.php UserController: public $components = array('PaginationRecall'); Why I received the following error: Strict (2048): Declaration of PaginationRecallComponent::initialize() should be compatible with Component::initialize(Controller $controller) [APP/Controller/Component/PaginationRecallComponent.php, line 46] Code Context App::load() - CORE/Cake/Core/App.php, line 567 App::load() - CORE/Cake

focused component reference

别来无恙 提交于 2019-12-02 04:09:26
问题 I am working on a simple java swing based application. How would I get and set the text of the currently focused textfield/textarea of a form? I know how to determine which component has focus but I can not figure out how I can get the selected text of the component. I use getFocusOwner() but it return a Component and therefore does not implement the method getSelectedText(). Do I somehow need to do a typecast? 回答1: Depending on your exact context, you might consider to use a custom

How to catch the moment when the parent control has been resized?

南楼画角 提交于 2019-12-02 02:02:47
问题 I have a visual component derived from TWinControl. I need to do some work in my component when its parent control has been resized. In general case, the "Align" property of my component is alNone. How to catch the event of resizing the parent control? Is it possible? 回答1: If a TWinControl (the parent) is changed in size, then TWinControl.Realign is called in the WM_SIZE handler. This bubbles via TWinControl.AlignControls into iterating over all the child controls which have the Align

List of components implementing NamingContainer

巧了我就是萌 提交于 2019-12-02 01:21:31
问题 I found that there is something called NamingContainer in JSF. It is not clear that which component is a naming container. As far as I know, <h:form> , <h:dataTable> and custom components are naming containers. Where can I get a list of classes that implement javax.faces.component.NamingContainer ? 回答1: it depends on libraries you include. simplest way is to use eclipse type hierarchy. this is mine, and includes jsf RI 2.2, Primefaces 4.0, Omnifaces 1.7 and a couple of self-made: 来源: https:/