Page 1 of 1

Groovy SVG buttons

Posted: Thu May 18, 2023 9:34 am
by richmond62

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 1:00 pm
by richmond62
Having messed around with that tutorial I started thinking . . .

. . . dangerous, of course . . .

. . . and felt an urge to either ask a question and/or criticise LiveCode in a majorish way . . .

. . . dangerous, of course . . .

LC comes with a tool palette containing about 7 or so basic objects that can be pulled, pushed and tweaked via the properties palettes.

Several years ago it was stated that 'most' of RR/LC was written in itself . . .

So, . . . here it comes . . . is there a way [no, I don't mean widgets] in which one can make one's own objects with properties palettes and so on?

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 4:07 pm
by FourthWorld
Why not? Palettes have been an xTalk staple since '87, along with the ability to get and set properties from script.

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 6:11 pm
by dunbarx
Richard.

I think what Richmond is asking about is a widget made with LCS, not a palette stack with gadgets on it floating around the card.

I think he is hoping to be able to do this without having to learn LCB.

Richmond? If so, then I am excited about LCS widgets, which are supposed to be just around the corner.

Craig

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 6:46 pm
by FourthWorld
Objects have properties, which can be read and written. Widgets are a class of object. Inspectors are tools to let the user view and edit those properties

I understand the question. I don't understand how it's a question.

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 6:53 pm
by richmond62
No: I am not asking about widgets of any shape or form.

I am asking whether it is possible to make new objects in LiveCode.

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 7:36 pm
by FourthWorld
Define "object".

If you mean custom controls, yes, the DataGrid is a powerful example, but simpler cloned groups driven by a common parent script is a common development pattern.

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 7:59 pm
by richmond62
At the risk of being dead goofy: these are what I mean by objects (being well aware that at least one of them, the DataGrid, is
a composite object):
-
SShot 2023-05-18 at 21.56.41.png
SShot 2023-05-18 at 21.56.41.png (20.89 KiB) Viewed 9026 times

Re: Groovy SVG buttons

Posted: Thu May 18, 2023 9:08 pm
by dunbarx
Richmond is asking for a new object class, like a button or a field.

So, what is an example of a new such thing?

Craig

Re: Groovy SVG buttons

Posted: Fri May 19, 2023 8:11 am
by richmond62
Or, a 'new' button that is NOT a modified version of the existing button but a new beast.

When I was 4 years old a great-aunt of mine sent me a bix of LEGO (1966) . . . being an intelligent woman, having sent me blocks and plates that year, the following one she sent me wheels and windows . . . knowing that after a year I would have exhausted possibilities with blocks and plates.

Re: Groovy SVG buttons

Posted: Fri May 19, 2023 1:42 pm
by dunbarx
Richmond.

What is a "new" button?

A button is already an established object class. You can pretty much make a button do whatever you want, and look however you want. You can make a "button" out of a graphic or an image.

What is a "new" button ???

Craig

Re: Groovy SVG buttons

Posted: Fri May 19, 2023 2:47 pm
by richmond62
A 'new' button is something one can drag and drop from a tools palette & then access ALL its properties from a single props palette (rather than, say, mess around with props palettes of various components inwith a group).

Re: Groovy SVG buttons

Posted: Fri May 19, 2023 3:07 pm
by dunbarx
Richmond.

Ah. It is a property inspector gadget you want, not a new object class. Something like the DataGrid property inspector?

So if you make a group of controls, you want a tool to construct such an inspector? How did Trevor deVore construct the inspector for the DG? Have you asked him?

I wonder if Xavvi can build such a thing?

Craig

Re: Groovy SVG buttons

Posted: Fri May 19, 2023 3:18 pm
by dunbarx
Richmond.

A group already has a "standard" inspector upon creation. Widgets each have their own.

I assume Trevor made a custom stack that looked and felt like any standard LC inspector. He rolled his own, in other words, just like you will have to do at least for the near future.

Craig

Re: Groovy SVG buttons

Posted: Fri May 19, 2023 3:54 pm
by FourthWorld
richmond62 wrote:
Fri May 19, 2023 2:47 pm
A 'new' button is something one can drag and drop from a tools palette & then access ALL its properties from a single props palette (rather than, say, mess around with props palettes of various components inwith a group).
The LiveCode Inspector shows only the most commonly used properties.

If you want an editor for ALL properties a property sheet, such as Toolbook and others have, provides a list layout better suited for that then a hand-drawn layout of controls in an inspector.

I believe the property sheet I made for LC is available in LiveNet.