[Gambas-user] Write a new component: Firmata (Second attempt)

PICCORO McKAY Lenz mckaygerhard at gmail.com
Tue Mar 27 23:05:45 CEST 2018


i always dissapoint with that behaviour.. if component are not in
standar path user project does not load..

i want that if componet also has build in the project can be used
firts event the present in the system..

also a custom path provided by project to "search" the module/component .. .
Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


2018-03-27 11:16 GMT-04:00 Benoît Minisini <g4mba5 at gmail.com>:
> Le 27/03/2018 à 17:03, Matias De lellis a écrit :
>>
>>
>> I attach a test version of the component. It has a Led class - Which is
>> literally a copy of 'SwitchButton' - which is shown in the toolbar, but when
>> I put the control on the form, I can not get it to show the Switch. It show
>> the component icon.. :disapointed:
>
>
> The IDE can only display the controls it uses itself. For every other
> control, it will display a frame with the control icon inside (it does not
> know how to draw the control).
>
> Otherwise, you can define the "_DrawWith" constant to tell the IDE which
> standard control it can use instead to draw the new control.
>
> I don't want the IDE to dynamically load components just to draw them,
> because it's a security risk, and a potential source of errors.
>
>>
>> Please.. keep in mind that it is just an example, I do not want to show
>> the SwitchButton. I want to draw a led considering a color, and this seemed
>> like a good starting point... :wink:
>>
>> Can you please check if I'm missing something?
>>
>> p.s:
>> 2nd doubt: Is there any way to install the component for the user to
>> test.? $home/.local/gambas??
>
>
> No. You can do that with library projects, not component projects.
>
> See components like what device drivers are for the Linux kernel.
>
> If your control is well written, we can put it in the 'gb.form' component.
> That way, the IDE, as it uses that component, will be able to draw it.
>
> Regards,
>
> --
> Benoît Minisini
>
> --------------------------------------------------
>
> This is the Gambas Mailing List:
> https://lists.gambas-basic.org/listinfo/user
>
> Search the list:
> https://lists.gambas-basic.org/cgi-bin/search.cgi
>
> Hosted by https://www.hostsharing.net


More information about the User mailing list